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
Created by sergeybaranov on 24/1/18.
public interface CustomerService { LinkedList getCustomers(); HashMap getCustomersReports(List ids); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n public int describeContents() { return 0; }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\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}", "@Override\n\tprotected void interr() {\n\t}", "public final void mo51373a() {\n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "private void poetries() {\n\n\t}", "@Override\n public void init() {\n }", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n\tpublic void one() {\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\tpublic void init() {\n\t\t\n\t}", "@Override\n void init() {\n }", "@Override public int describeContents() { return 0; }", "@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 }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "protected boolean func_70814_o() { return true; }", "private void m50366E() {\n }", "@Override\n public void init() {}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void init() {}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n public int retroceder() {\n return 0;\n }", "@Override\n protected void initialize() {\n\n \n }", "@Override\n protected void init() {\n }", "public void mo38117a() {\n }", "@Override\n\tpublic void einkaufen() {\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 public void init() {\n\n }", "@Override\n public void init() {\n\n }", "public void gored() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\n public void initialize() { \n }", "public void method_4270() {}", "@Override\n public int getSize() {\n return 1;\n }", "@Override\n\tpublic void init() {\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\n\tpublic void nghe() {\n\n\t}", "Consumable() {\n\t}", "@Override\n\tpublic void ligar() {\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}", "private Rekenhulp()\n\t{\n\t}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "@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}", "private void init() {\n\n\t}", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void jugar() {}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\r\n\tpublic void just() {\n\t\t\r\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "private void strin() {\n\n\t}", "private void kk12() {\n\n\t}", "@Override\n\tpublic void init()\n\t{\n\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\t\tpublic void init() {\n\t\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n public int describeContents()\n {\n return 0;\n }", "private MetallicityUtils() {\n\t\t\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n public String toString() {\n return \"\";\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }" ]
[ "0.59097266", "0.57188267", "0.5668903", "0.56641924", "0.565465", "0.56514484", "0.56494474", "0.5586877", "0.5586877", "0.5505066", "0.5501554", "0.5475003", "0.5473314", "0.5463251", "0.54627043", "0.54411995", "0.543866", "0.5429439", "0.5427567", "0.54213005", "0.5409168", "0.5408122", "0.5408122", "0.5408122", "0.5408122", "0.5408122", "0.54074293", "0.5398919", "0.5391412", "0.5391412", "0.5391412", "0.5391412", "0.5391412", "0.5391412", "0.5386844", "0.5385887", "0.5379484", "0.5376571", "0.53561765", "0.53544843", "0.5351337", "0.5343716", "0.53437114", "0.5342946", "0.5342946", "0.5321981", "0.5304208", "0.52766865", "0.5276369", "0.5275652", "0.52678704", "0.52678704", "0.52678704", "0.52578133", "0.52578133", "0.5257364", "0.52544105", "0.5246468", "0.52445376", "0.524439", "0.52416295", "0.52402604", "0.52384627", "0.5229637", "0.5228502", "0.52214175", "0.5220189", "0.5220189", "0.5220189", "0.521964", "0.52145946", "0.52145946", "0.52145946", "0.5210051", "0.5210051", "0.5210051", "0.520465", "0.5193096", "0.51894754", "0.5188202", "0.5187157", "0.51817954", "0.5177813", "0.5177813", "0.5174913", "0.51740456", "0.5164016", "0.51553476", "0.51553476", "0.5153934", "0.5151549", "0.51458204", "0.5137319", "0.5134205", "0.51314855", "0.512591", "0.512591", "0.51203823", "0.5120322", "0.5120322", "0.5120322" ]
0.0
-1
/ Validation class will check the error and display the error on respective fields but it won't resist the form submission, so we need to check again before submit
@Override public void onClick(View view) { if ( checkValidation () ) submitForm(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void validation() {\n\t\tif ((!textFieldName.getText().isEmpty()) && (!textField_FirstName.getText().isEmpty())\n\t\t\t\t&& (!textField_Town.getText().isEmpty()) && (!textField_Town.getText().isEmpty())) {\n\n\t\t\tif ((isValidEmailAddress(textField_Email.getText()) == true)) {\n\t\t\t\ttextField_Email.setBackground(Color.white);\n\t\t\t\tif ((force(textField_Mtp.getText()) > 82)) {\n\t\t\t\t\ttextField_Mtp.setBackground(Color.white);\n\t\t\t\t\tactionGiveServeur();\n\n\t\t\t\t} else {\n\t\t\t\t\tshowMessageDialog(null, \"Votre mot de passe est trop faible\");\n\t\t\t\t\ttextField_Mtp.setText(\"Mot de passe trop simple : changer le \");\n\t\t\t\t\ttextField_Mtp.setBackground(Color.RED);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ttextField_Email.setText(\"Email invalide\");\n\t\t\t\ttextField_Email.setBackground(Color.RED);\n\t\t\t\tshowMessageDialog(null, \"Email est invalide\");\n\t\t\t}\n\t\t} else {\n\n\t\t\tshowMessageDialog(null, \"Certain champs sont vide !\");\n\t\t}\n\t}", "@Override\n public void validate() {\n boolean b = false;\n\n //retrieving the contact us form details from request object\n String firstName = objContactUsForm.getName().trim();\n String email = objContactUsForm.getEmail().trim();\n String message = objContactUsForm.getMessage().trim();\n\n //now validating each of the field\n if (firstName.isEmpty()) {\n addFieldError(\"name\", getText(\"name.required\"));\n b = true;\n }\n\n if (email.isEmpty()) {\n addFieldError(\"email\", getText(\"email.required\"));\n b = true;\n }\n if (!b) {\n Pattern p = Pattern.compile(\".+@.+\\\\.[a-z]+\");\n Matcher m = p.matcher(email);\n boolean matchFound = m.matches();\n if (!matchFound) {\n addFieldError(\"email\", \"Please Provide Valid Email ID\");\n }\n }\n\n if (message.isEmpty()) {\n addFieldError(\"message\", getText(\"message.required\"));\n b = true;\n }\n\n if (!b) {\n boolean matches = message.matches(\"[<>!~@$%^&\\\"|!\\\\[#$]\");\n if (matches) {\n addFieldError(\"message\", \"Please Provide Valid Message Name\");\n b = true;\n }\n }\n }", "private void validation() {\n this.validate();\n this.repaint();\n }", "private boolean formValidated() {\n boolean flag = true;\n name_error.setVisibility(View.GONE);\n family_error.setVisibility(View.GONE);\n address_region_error.setVisibility(View.GONE);\n address_city_error.setVisibility(View.GONE);\n address_error.setVisibility(View.GONE);\n gender_error.setVisibility(View.GONE);\n cellphone_error.setVisibility(View.GONE);\n address_postal_code_error.setVisibility(View.GONE);\n if (address_spinner.getSelectedItem() == null || address_spinner.getSelectedItem().equals(getString(R.string.address_province_placeholder))) {\n address_region_error.setVisibility(View.VISIBLE);\n address_region_error.setText(R.string.error_isrequired);\n flag = false;\n }\n if (city_spinner.getVisibility() == View.VISIBLE && (city_spinner.getSelectedItem() == null || city_spinner.getSelectedItem().equals(getString(R.string.address_city_placeholder)))) {\n address_city_error.setVisibility(View.VISIBLE);\n address_city_error.setText(R.string.error_isrequired);\n flag = false;\n }\n if (postal_spinner.getVisibility() == View.VISIBLE && (postal_spinner.getSelectedItem() == null || postal_spinner.getSelectedItem().equals(getString(R.string.delivery_neighbourhood)))) {\n address_postal_region_error.setVisibility(View.VISIBLE);\n address_postal_region_error.setText(R.string.error_isrequired);\n flag = true;\n }\n if (BamiloApplication.CUSTOMER.getGender().isEmpty()) {\n if (gender_spinner.getSelectedItem() == null || gender_spinner.getSelectedItem().equals(getString(R.string.gender))) {\n gender_error.setVisibility(View.VISIBLE);\n gender_error.setText(R.string.error_isrequired);\n flag = false;\n }\n }\n if (name.getText().length() >= 0) {\n /* */\n if (name.getText().length() < 2) {\n name_error.setVisibility(View.VISIBLE);\n name_error.setText(R.string.error_isrequired);\n flag = false;\n }\n\n }\n if (family.getText().length() >= 0) {\n /* */\n if (family.getText().length() < 2) {\n family_error.setVisibility(View.VISIBLE);\n family_error.setText(R.string.error_isrequired);\n flag = false;\n }\n\n }\n if (address.getText().length() >= 0) {\n /* */\n if (address.getText().length() < 2) {\n address_error.setVisibility(View.VISIBLE);\n address_error.setText(R.string.error_isrequired);\n flag = false;\n }\n\n }\n Pattern pattern = Pattern.compile(getString(R.string.cellphone_regex), Pattern.CASE_INSENSITIVE);\n\n Matcher matcher = pattern.matcher(cellphone.getText());\n boolean result = matcher.matches();\n if (!result) {\n cellphone.setVisibility(View.VISIBLE);\n cellphone_error.setVisibility(View.VISIBLE);\n cellphone_error.setText(R.string.address_phone_number_invalidity_error);\n flag = false;\n }\n if (cellphone.getText().length() == 0) {\n cellphone.setVisibility(View.VISIBLE);\n cellphone_error.setVisibility(View.VISIBLE);\n cellphone_error.setText(R.string.error_isrequired);\n flag = false;\n }\n\n\n if (postal_code.getText().length() != 0 && postal_code.getText().length() != 10) {\n address_postal_code_error.setVisibility(View.VISIBLE);\n flag = false;\n }\n\n if (gender_lable.length() == 0) {\n gender_error.setVisibility(View.VISIBLE);\n flag = false;\n }\n return flag;\n }", "private boolean validateFields(){ \n ImplLogger.enterMethod(); \n StringBuffer validationMessage = new StringBuffer();\n boolean isValidationPassed = true;\n if(!ImplValidationUtils.isAlphaSpace(pharmaNameTextField.getText())){\n validationMessage.append(ImplConst.VALIDATE_NAME);\n validationMessage.append(ImplConst.NEXT_LINE);\n pharmaNameTextField.setBackground(Color.red);\n isValidationPassed = false;\n } \n if(!ImplValidationUtils.isAlphabetOnly(userNameTextField.getText())){\n validationMessage.append(ImplConst.VALIDATE_USERNAME);\n validationMessage.append(ImplConst.NEXT_LINE);\n userNameTextField.setBackground(Color.red);\n isValidationPassed = false;\n }\n if(ImplCommonUtil.isUserNameExist(userNameTextField.getText())){\n validationMessage.append(ImplConst.VALIDATE_USERNAME_EXIST);\n validationMessage.append(ImplConst.NEXT_LINE);\n userNameTextField.setBackground(Color.red);\n isValidationPassed = false;\n }\n if(!ImplValidationUtils.isInteger(contactTextField.getText())){\n validationMessage.append(ImplConst.VALIDATE_CONTACT);\n validationMessage.append(ImplConst.NEXT_LINE);\n contactTextField.setBackground(Color.red);\n isValidationPassed = false;\n }\n if(!ImplValidationUtils.isInteger(zipCodeTextField.getText())){\n validationMessage.append(ImplConst.VALIDATE_ZIPCODE);\n validationMessage.append(ImplConst.NEXT_LINE);\n zipCodeTextField.setBackground(Color.red);\n isValidationPassed = false;\n }\n if(ImplValidationUtils.isStringEmptyOrNull(passwordField.getText())){\n validationMessage.append(ImplConst.VALIDATE_PASSWORD);\n validationMessage.append(ImplConst.NEXT_LINE);\n passwordField.setBackground(Color.red);\n isValidationPassed = false;\n }\n if(ImplValidationUtils.isStringEmptyOrNull(confirmPasswordField.getText())){\n validationMessage.append(ImplConst.CONFIRM_VALIDATE_PASSWORD);\n validationMessage.append(ImplConst.NEXT_LINE);\n confirmPasswordField.setBackground(Color.red);\n isValidationPassed = false;\n }\n if (!ImplValidationUtils.isStringEmptyOrNull(confirmPasswordField.getText()) && !confirmPasswordField.getText().equals(passwordField.getText())){\n validationMessage.append(ImplConst.CONFIRM_VALIDATE_PASSWORD);\n validationMessage.append(ImplConst.NEXT_LINE);\n isValidationPassed = false; \n }\n if(!isValidationPassed){\n JOptionPane.showMessageDialog(null,validationMessage);\n } \n ImplLogger.exitMethod();\n return isValidationPassed;\n }", "public boolean Validate() {\n String[] testArr = {titleTxf.getText(), fNameTxf.getText(), sNameTxf.getText(),\n initialTxf.getText(), hNumTxf.getText(), cNumTxf.getText(), emailTxf.getText(), idNumTxf.getText(),\n (String) maritalCbx.getSelectedItem(), \n resTxf1.getText() + \"\" + resTxf2.getText(), zipResTxf.getText(),postTxf1.getText() + \"\" + postTxf2.getText(),\n zipPostTxf.getText() };\n\n // verify user has entered data into required fields\n String inputTest = \"\";\n\n for (int i = 0; i < testArr.length; i++) {\n if (testArr[i].equals(inputTest)) {\n\n JOptionPane.showMessageDialog(rootPane, \"please fill in all required fields\", \"ERROR\", ERROR_MESSAGE);\n \n return false;\n \n\n }\n \n \n }\n //verify Home number\n if(hNumTxf.getText().length()!=10){\n \n JOptionPane.showMessageDialog(rootPane, \"Invaild Home number\", \"ERROR\", ERROR_MESSAGE);\n errHNum.setText(\"!\");\n \n return false;\n }\n else{\n errHNum.setText(\"\");\n }\n //verify CellNo\n if(cNumTxf.getText().length()!=10){\n \n JOptionPane.showMessageDialog(rootPane, \"Invaild Cellphone number\", \"ERROR\", ERROR_MESSAGE);\n errCNum.setText(\"!\");\n \n return false;\n \n }\n else{\n errCNum.setText(\"\");\n }\n //verify email\n String email =emailTxf.getText(); \n if(!email.contains(\"@\")|| !email.contains(\".\")){\n \n JOptionPane.showMessageDialog(rootPane, \"Invaild email address\", \"ERROR\", ERROR_MESSAGE);\n errEmail.setText(\"!\");\n return false;\n }\n else{\n errEmail.setText(\"\");\n }\n \n //verify ID No. (Local)\n String ID = idNumTxf.getText();\n if(ID.length()!=13){\n \n JOptionPane.showMessageDialog(rootPane, \"Invaild ID number\", \"ERROR\", ERROR_MESSAGE);\n errID.setText(\"!\");\n return false;\n }\n else{\n errID.setText(\"\");\n }\n \n if(zipResTxf.getText().length()!=4){\n JOptionPane.showMessageDialog(rootPane, \"Invaild Zip Code\", \"ERROR\", ERROR_MESSAGE);\n errZipRes.setText(\"!\");\n return false;\n \n }\n else{\n \n errZipRes.setText(\"\");\n }\n if(zipPostTxf.getText().length()!=4){\n JOptionPane.showMessageDialog(rootPane, \"Invaild Zip Code\", \"ERROR\", ERROR_MESSAGE);\n errZipPost.setText(\"!\");\n return false;\n \n }\n else{\n \n errZipPost.setText(\"\");\n }\n \n \n return true;\n\n }", "private void batchValidate() {\n lblIdError.setText(CustomValidator.validateLong(fieldId));\n lblNameError.setText(CustomValidator.validateString(fieldName));\n lblAgeError.setText(CustomValidator.validateInt(fieldAge));\n lblWageError.setText(CustomValidator.validateDouble(fieldWage));\n lblActiveError.setText(CustomValidator.validateBoolean(fieldActive));\n }", "public void validationErr()\r\n\t{\n\t\tSystem.out.println(\"validation err\");\r\n\t}", "private void checkRegistationValidation() {\r\n\t\tUtility.hideKeyBoard(this);\r\n\t\tif (firstName.getText().toString().length() == 0\r\n\t\t\t\t&& lastName.getText().toString().length() == 0\r\n\t\t\t\t&& emailAddress.getText().toString().length() == 0\r\n\t\t\t\t&& password.getText().toString().length() == 0\r\n\t\t\t\t&& confirmPassword.getText().toString().length() == 0) {\r\n\t\t\tshowToastMessage(\"All fields are mendatory\");\r\n\t\t} else if (emailAddress.getText().toString().length() == 0) {\r\n\r\n\t\t\temailAddress.setError(Constant.emailFieldValidation);\r\n\t\t\temailAddress.setText(\"\");\r\n\t\t\temailAddress.requestFocus();\r\n\t\t} else if (firstName.getText().toString().length() == 0) {\r\n\t\t\tfirstName.setError(\"Enter first name\");\r\n\t\t\tfirstName.setText(\"\");\r\n\t\t\tfirstName.requestFocus();\r\n\t\t} else if (lastName.getText().toString().length() == 0) {\r\n\t\t\tlastName.setError(\"Enter first name\");\r\n\t\t\tlastName.setText(\"\");\r\n\t\t\tlastName.requestFocus();\r\n\t\t} else if (password.getText().toString().length() == 0) {\r\n\t\t\tpassword.setError(Constant.passwordFieldValidation);\r\n\t\t\t;\r\n\t\t\tpassword.setText(\"\");\r\n\t\t\tpassword.requestFocus();\r\n\t\t} else if (!Utility.validateEmail(emailAddress.getText().toString())) {\r\n\t\t\temailAddress.setError(Constant.emailFormatValidation);\r\n\t\t\temailAddress.setText(\"\");\r\n\t\t\temailAddress.requestFocus();\r\n\r\n\t\t} else if (!password.getText().toString()\r\n\t\t\t\t.equals(confirmPassword.getText().toString())) {\r\n\t\t\tconfirmPassword.setError(\"Confirm password not same as password\");\r\n\t\t\tconfirmPassword.setText(\"\");\r\n\t\t\tconfirmPassword.requestFocus();\r\n\t\t} else {\r\n\t\t\tif (isConnectedToInternet()) {\r\n\t\t\t\tloadingProgress.setVisibility(View.VISIBLE);\r\n\t\t\t\tsendRegistrationRequestToServer();\r\n\r\n\t\t\t} else {\r\n\t\t\t\tnew Utility().showCustomDialog(\"Ok\", \"Internet Connection\",\r\n\t\t\t\t\t\t\"no internet access\", false, RegistrationActivity.this,\r\n\t\t\t\t\t\tnull, null);\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void validate() {\n\t\terrors.clear();\n\t\t\n\t\tif(!this.id.isEmpty()) {\n\t\t\ttry {\n\t\t\t\tLong.parseLong(this.id);\n\t\t\t} catch(NumberFormatException ex) {\n\t\t\t\terrors.put(\"id\", \"Id is not valid.\");\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(this.firstName.isEmpty()) {\n\t\t\terrors.put(\"firstName\", \"First name is obligatory!\");\n\t\t}\n\t\t\n\t\tif(this.lastName.isEmpty()) {\n\t\t\terrors.put(\"lastName\", \"Last name is obligatory!\");\n\t\t}\n\t\t\n\t\tif(this.nick.isEmpty()) {\n\t\t\terrors.put(\"nick\", \"Nick is obligatory!\");\n\t\t}\n\t\t\n\t\tif(DAOProvider.getDAO().doesNickAlreadyExist(nick)) {\n\t\t\terrors.put(\"nick\", \"Nick already exist!\");\n\t\t}\n\n\t\tif(this.email.isEmpty()) {\n\t\t\terrors.put(\"email\", \"EMail is obligatory!\");\n\t\t} else {\n\t\t\tint l = email.length();\n\t\t\tint p = email.indexOf('@');\n\t\t\tif(l<3 || p==-1 || p==0 || p==l-1) {\n\t\t\t\terrors.put(\"email\", \"EMail is not valid.\");\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(this.password.isEmpty()) {\n\t\t\terrors.put(\"password\", \"Password is obligatory!\");\n\t\t}\n\t}", "private static Boolean validateForm() {\n\t\t\tBoolean valid = true;\n\t\t\tSystem.out.println(\"Index: \"+portfolio.findByCode(pCode.getText()));\n\t\t\tif(pCode.getText().equals(\"\")) {\n\t\t\t\tmsgCode.setText(\"Project code is required\");\n\t\t\t\tvalid = false;\n\t\t\t} else if(portfolio.findByCode(pCode.getText()) >= 0) {\n\t\t\t\tmsgCode.setText(\"Project already exists!\");\n\t\t\t\tvalid = false;\n\t\t\t} else {\n\t\t\t\tmsgCode.setText(\"\");\n\t\t\t}\n\t\t\t\n\t\t\tif(pName.getText().equals(\"\")) {\n\t\t\t\tmsgName.setText(\"Project Name is required!\");\n\t\t\t\tvalid = false;\n\t\t\t} else {\n\t\t\t\tmsgName.setText(\"\");\n\t\t\t}\n\t\t\t\n\t\t\tif(pClient.getText().equals(\"\")) {\n\t\t\t\tmsgClient.setText(\"Client is required!\");\n\t\t\t\tvalid = false;\n\t\t\t} else {\n\t\t\t\tmsgClient.setText(\"\");\n\t\t\t}\n\t\t\t\n\t\t\tif(pSDate.getText().equals(\"\")) {\n\t\t\t\tmsgSDate.setText(DATE_FORMAT + \" Start Date is required\");\n\t\t\t\tvalid = false;\n\t\t\t} else {\n\t\t\t\tmsgSDate.setText(DATE_FORMAT);\n\t\t\t}\n\t\t\t\n\t\t\tswitch(pType) {\n\t\t\tcase \"o\":\n\t\t\t\tif(pDeadline.getText().equals(\"\")) {\n\t\t\t\t\tmsgDeadline.setText(DATE_FORMAT + \" Deadline is required!\");\n\t\t\t\t\tvalid = false;\n\t\t\t\t} else {\n\t\t\t\t\tmsgDeadline.setText(DATE_FORMAT);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tDouble b = Double.parseDouble(pBudget.getText());\n\t\t\t\t\tif(b<0) {\n\t\t\t\t\t\tmsgBudget.setText(\"Must be a positive value\");\n\t\t\t\t\t\tvalid=false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmsgBudget.setText(\"\");\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tmsgBudget.setText(\"Invalid number!\");\n\t\t\t\t\tvalid = false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tint c = Integer.parseInt(pCompletion.getText());\n\t\t\t\t\tif(c<0 || c>100) {\n\t\t\t\t\t\tmsgCompletion.setText(\"Value must be between 0 and 100\");\n\t\t\t\t\t\tvalid = false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmsgCompletion.setText(\"\");\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tmsgCompletion.setText(\"Invalid number!\");\n\t\t\t\t\tvalid = false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase \"f\":\n\t\t\t\tif(pEndDate.getText().equals(\"\")) {\n\t\t\t\t\tmsgEndDate.setText(DATE_FORMAT + \" End date is required!\");\n\t\t\t\t\tvalid = false;\n\t\t\t\t} else {\n\t\t\t\t\tmsgEndDate.setText(DATE_FORMAT);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tDouble b = Double.parseDouble(pTotalCost.getText());\n\t\t\t\t\tif(b<0){\n\t\t\t\t\t\tmsgTotalCost.setText(\"Must be a positive number\");\n\t\t\t\t\t\tvalid=false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmsgTotalCost.setText(\"\");\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tmsgTotalCost.setText(\"Invalid number!\");\n\t\t\t\t\tvalid = false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\treturn valid;\n\t\t}", "private boolean validate() {\n if(edtMobileNumber.getText().toString().length() <= 0){\n edtMobileNumber.setFocusable(true);\n edtMobileNumber.setError(Constants.ERR_MSG_MOBILE);\n return false;\n }else if(edtFirstName.getText().toString().length() <= 0){\n edtFirstName.setFocusable(true);\n edtFirstName.setError(Constants.ERR_MSG_FIRST_NAME);\n return false;\n }else if(edtLastName.getText().toString().length() <= 0){\n edtLastName.setFocusable(true);\n edtLastName.setError(Constants.ERR_MSG_LAST_NAME);\n return false;\n }else if(edtDateOfBirth.getText().toString().length() <= 0){\n edtDateOfBirth.setFocusable(true);\n edtDateOfBirth.setError(Constants.ERR_MSG_DATE_OF_BIRTH);\n return false;\n }else if(edtEnterPin.getText().toString().length() <= 0){\n edtEnterPin.setFocusable(true);\n edtEnterPin.setError(Constants.ERR_MSG_PIN);\n return false;\n }else if(edtConfirmPin.getText().toString().length() <= 0){\n edtConfirmPin.setFocusable(true);\n edtConfirmPin.setError(Constants.ERR_MSG_CONFIRM_PIN);\n return false;\n }else if(spnStatus.getSelectedItemPosition() == 0){\n Toast.makeText(context, Constants.ERR_MSG_STATUS, Toast.LENGTH_SHORT).show();\n return false;\n }else if(spnBloodGroup.getSelectedItemPosition() == 0){\n Toast.makeText(context, Constants.ERR_MSG_BLOOD_GROUP, Toast.LENGTH_SHORT).show();\n return false;\n }else if(rgGender.getCheckedRadioButtonId() == -1){\n Toast.makeText(context,Constants.ERR_MSG_GENDER,Toast.LENGTH_SHORT).show();\n return false;\n }\n return true;\n }", "private void displayValidity() {\n if (allValid) spnValid.setText(\"All fields are valid!\");\n else spnValid.setText(\"There are invalid fields. Please go back and check these.\");\n }", "@Override\n\tpublic void validate() {\n\t\tFormFieldValidator.validateStudent(this, student);\n\t\tFormFieldValidator.validateCourseList(this, courseID);\n\t}", "public static void validate() {\r\n\t\tfrmMfhEmailer.validate();\r\n\t}", "protected boolean validateInputs() {\n if (KEY_EMPTY.equals(firstName)) {\n etFirstName.setError(\"First Name cannot be empty\");\n etFirstName.requestFocus();\n return false;\n }\n if (KEY_EMPTY.equals(lastName)) {\n etLastName.setError(\"Last Name cannot be empty\");\n etLastName.requestFocus();\n return false;\n }\n if (KEY_EMPTY.equals(username)) {\n etUsername.setError(\"Username cannot be empty\");\n etUsername.requestFocus();\n return false;\n }\n if (KEY_EMPTY.equals(email)) {\n etEmail.setError(\"Email cannot be empty\");\n etEmail.requestFocus();\n return false;\n }\n if (KEY_EMPTY.equals(password)) {\n etPassword.setError(\"Password cannot be empty\");\n etPassword.requestFocus();\n return false;\n }\n if (KEY_EMPTY.equals(confirmPassword)) {\n etConfirmPassword.setError(\"Confirm Password cannot be empty\");\n etConfirmPassword.requestFocus();\n return false;\n }\n if (!password.equals(confirmPassword)) {\n etConfirmPassword.setError(\"Password and Confirm Password does not match\");\n etConfirmPassword.requestFocus();\n return false;\n }\n if (KEY_EMPTY.equals(major)) {\n etMajor.setError(\"Major cannot be empty\");\n etMajor.requestFocus();\n return false;\n }\n if (KEY_EMPTY.equals(university)) {\n etUniversity.setError(\"university cannot be empty\");\n etUniversity.requestFocus();\n return false;\n }\n\n\n\n if(!isStudent && !isTutor){\n //Show a toast or some kind of error\n Toast toast = Toast.makeText(this, \"message\", Toast.LENGTH_SHORT);\n toast.setText(\"please check the account type\");\n toast.setGravity(Gravity.CENTER, 0, 0);\n //other setters\n toast.show();\n return false;\n }\n\n\n return true;\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 }", "private void updateValidationMessages()\r\n {\r\n String errorMessage = myModel.getErrorMessage();\r\n String warningMessage = myModel.getWarningMessage();\r\n\r\n if (StringUtils.isNotEmpty(errorMessage))\r\n {\r\n myValidator.setValidationResult(ValidationStatus.ERROR, errorMessage);\r\n }\r\n else if (StringUtils.isNotEmpty(warningMessage))\r\n {\r\n myValidator.setValidationResult(ValidationStatus.WARNING, warningMessage);\r\n }\r\n else\r\n {\r\n myValidator.setValidationResult(ValidationStatus.VALID, null);\r\n }\r\n }", "public boolean validarForm() throws Exception {\r\n\r\n tbxNro_identificacion\r\n .setStyle(\"text-transform:uppercase;background-color:white\");\r\n lbxNro_ingreso.setStyle(\"background-color:white\");\r\n tbxCodigo_prestador\r\n .setStyle(\"text-transform:uppercase;background-color:white\");\r\n tbxCodigo_diagnostico_principal\r\n .setStyle(\"text-transform:uppercase;background-color:white\");\r\n tbxCausa_muerte\r\n .setStyle(\"text-transform:uppercase;background-color:white\");\r\n lbxEstado_salida.setStyle(\"background-color:white\");\r\n dtbxFecha_ingreso.setStyle(\"background-color:white\");\r\n\r\n Admision admision = ((Admision) lbxNro_ingreso.getSelectedItem()\r\n .getValue());\r\n\r\n boolean valida = true;\r\n\r\n String mensaje = \"Los campos marcados con (*) son obligatorios\";\r\n\r\n if (tbxNro_identificacion.getText().trim().equals(\"\")) {\r\n tbxNro_identificacion\r\n .setStyle(\"text-transform:uppercase;background-color:#F6BBBE\");\r\n valida = false;\r\n }\r\n if (tbxCodigo_prestador.getText().trim().equals(\"\")) {\r\n tbxCodigo_prestador\r\n .setStyle(\"text-transform:uppercase;background-color:#F6BBBE\");\r\n valida = false;\r\n }\r\n if (admision == null) {\r\n lbxNro_ingreso.setStyle(\"background-color:#F6BBBE\");\r\n valida = false;\r\n }\r\n if (tbxCodigo_diagnostico_principal.getText().trim().equals(\"\")) {\r\n tbxCodigo_diagnostico_principal\r\n .setStyle(\"text-transform:uppercase;background-color:#F6BBBE\");\r\n valida = false;\r\n }\r\n\r\n if (lbxCausa_externa.getSelectedIndex() == 0) {\r\n lbxCausa_externa\r\n .setStyle(\"text-transform:uppercase;background-color:#F6BBBE\");\r\n valida = false;\r\n }\r\n\r\n if (valida) {\r\n if (lbxEstado_salida.getSelectedItem().getValue().equals(\"2\")\r\n && tbxCausa_muerte.getText().trim().equals(\"\")) {\r\n tbxCausa_muerte\r\n .setStyle(\"text-transform:uppercase;background-color:#F6BBBE\");\r\n mensaje = \"Usted selecciono el estado de la salida como muerto(a) \\npor lo tanto debe seleccionar la causa de muerte\";\r\n valida = false;\r\n }\r\n }\r\n\r\n if (valida) {\r\n if (!lbxEstado_salida.getSelectedItem().getValue().equals(\"2\")\r\n && !tbxCausa_muerte.getText().trim().equals(\"\")) {\r\n lbxEstado_salida.setStyle(\"background-color:#F6BBBE\");\r\n mensaje = \"Usted selecciono una casua de muerte \\npor lo tanto debe seleccionar el estado a la salida como muerto (a)\";\r\n valida = false;\r\n }\r\n }\r\n\r\n if (valida) {\r\n if (dtbxFecha_ingreso.getValue().compareTo(\r\n dtbxFecha_egreso.getValue()) > 0) {\r\n dtbxFecha_ingreso.setStyle(\"background-color:#F6BBBE\");\r\n mensaje = \"La fecha de ingreso no puede ser mayor a la fecha de egreso\";\r\n valida = false;\r\n }\r\n }\r\n\r\n if (!valida) {\r\n Messagebox.show(mensaje,\r\n usuarios.getNombres() + \" recuerde que...\", Messagebox.OK,\r\n Messagebox.EXCLAMATION);\r\n }\r\n\r\n return valida;\r\n }", "public void validate() {\n\t\tthis.invalidated = false;\n\t}", "public boolean validateForm() {\r\n\t\tint validNum;\r\n\t\tdouble validDouble;\r\n\t\tString lengthVal = lengthInput.getText();\r\n\t\tString widthVal = widthInput.getText();\r\n\t\tString minDurationVal = minDurationInput.getText();\r\n\t\tString maxDurationVal = maxDurationInput.getText();\r\n\t\tString evPercentVal = evPercentInput.getText();\r\n\t\tString disabilityPercentVal = disabilityPercentInput.getText();\r\n\t\t\r\n\t\t/**\r\n\t\t * Step.1 - Ensure all inputs are numbers\r\n\t\t */\r\n\t\t\r\n\t\t// Try to parse length as int\r\n\t\ttry {\r\n\t\t\tvalidNum = Integer.parseInt(lengthVal);\r\n\t } catch (NumberFormatException e) {\r\n\t \tsetErrorMessage(\"Length must be an integer\");\r\n\t return false;\r\n\t }\r\n\t\t\r\n\t\t// Try to parse width as int\r\n\t\ttry {\r\n\t\t\tvalidNum = Integer.parseInt(widthVal);\r\n\t } catch (NumberFormatException e) {\r\n\t \tsetErrorMessage(\"Width must be an integer\");\r\n\t return false;\r\n\t }\r\n\t\t\r\n\t\t// Try to parse width as int\r\n\t\ttry {\r\n\t\t\tvalidNum = Integer.parseInt(minDurationVal);\r\n\t } catch (NumberFormatException e) {\r\n\t \tsetErrorMessage(\"Min Duration must be an integer\");\r\n\t return false;\r\n\t }\r\n\t\t\r\n\t\t// Try to parse width as int\r\n\t\ttry {\r\n\t\t\tvalidNum = Integer.parseInt(maxDurationVal);\r\n\t } catch (NumberFormatException e) {\r\n\t \tsetErrorMessage(\"Max Duration must be an integer\");\r\n\t return false;\r\n\t }\r\n\t\t\r\n\t\t// Try to parse width as int\r\n\t\ttry {\r\n\t\t\tvalidDouble = Double.parseDouble(evPercentVal);\r\n\t } catch (NumberFormatException e) {\r\n\t \tsetErrorMessage(\"EV % must be a number\");\r\n\t return false;\r\n\t }\r\n\t\t\r\n\t\t// Try to parse width as int\r\n\t\ttry {\r\n\t\t\tvalidDouble = Double.parseDouble(disabilityPercentVal);\r\n\t } catch (NumberFormatException e) {\r\n\t \tsetErrorMessage(\"Disability % must be a number\");\r\n\t return false;\r\n\t }\r\n\t\t\r\n\t\t/**\r\n\t\t * Step.2 - Ensure all needed inputs are non-zero\r\n\t\t */\r\n\t\t\r\n\t\tvalidNum = Integer.parseInt(lengthVal);\r\n\t\tif (validNum <= 0) {\r\n\t\t\tsetErrorMessage(\"Length must be greater than 0\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tvalidNum = Integer.parseInt(widthVal);\r\n\t\tif (validNum <= 0) {\r\n\t\t\tsetErrorMessage(\"Width must be greater than 0\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tvalidNum = Integer.parseInt(minDurationVal);\r\n\t\tif (validNum < 10) {\r\n\t\t\tsetErrorMessage(\"Min Duration must be at least 10\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tvalidNum = Integer.parseInt(maxDurationVal);\r\n\t\tif (validNum < 10) {\r\n\t\t\tsetErrorMessage(\"Max Duration must be at least 10\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tvalidDouble = Double.parseDouble(evPercentVal);\r\n\t\tif (validDouble < 0) {\r\n\t\t\tsetErrorMessage(\"EV % can't be less than 0\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tvalidDouble = Double.parseDouble(disabilityPercentVal);\r\n\t\tif (validDouble < 0) {\r\n\t\t\tsetErrorMessage(\"Disability % can't be less than 0\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Step.3 - Ensure Max Duration can't be smaller than Min Duration\r\n\t\t */\r\n\t\t\r\n\t\tif (Integer.parseInt(minDurationVal) > Integer.parseInt(maxDurationVal)) {\r\n\t\t\tsetErrorMessage(\"Max Duration can't be less than Min Duration\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Step.4 - Ensure values aren't too large for the system to handle\r\n\t\t */\r\n\t\t\r\n\t\tif (Integer.parseInt(lengthVal) > 15) {\r\n\t\t\tsetErrorMessage(\"Carpark length can't be greater than 15 spaces\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (Integer.parseInt(widthVal) > 25) {\r\n\t\t\tsetErrorMessage(\"Carpark width can't be greater than 25 spaces\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (Integer.parseInt(minDurationVal) > 150) {\r\n\t\t\tsetErrorMessage(\"Min Duration can't be greater than 150\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif (Integer.parseInt(maxDurationVal) > 300) {\r\n\t\t\tsetErrorMessage(\"Max Duration can't be greater than 300\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif (Double.parseDouble(evPercentVal) > 100) {\r\n\t\t\tsetErrorMessage(\"EV % can't be greater than 100\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif (Double.parseDouble(disabilityPercentVal) > 100) {\r\n\t\t\tsetErrorMessage(\"Disability % can't be greater than 100\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif (Integer.parseInt(minDurationVal) > 150) {\r\n\t\t\tsetErrorMessage(\"Min Duration can't be greater than 150\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}", "protected void validateAction() {\r\n\t\tthis.lblLoading.setVisible(true);\r\n\t\tThread longThread = new Thread(new Runnable() {\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\tMajFicheClientCarteFidelite.this.newsletter = MajFicheClientCarteFidelite.this.valeurCaseNewsletter;\r\n\t\t\t\tif (checkfields()) {\r\n\t\t\t\t\tconfirmation();\r\n\t\t\t\t} else {\r\n\t\t\t\t\talerte();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tlongThread.start();\r\n\t}", "public boolean validation(){\n String Venuename= venuename.getText().toString();\n String Address= address.getText().toString();\n String Details= details.getText().toString();\n String Venueimage= venueimage.getText().toString();\n if(Venuename.isEmpty()){\n venuename.setError(\"Please enter the item name\");\n venuename.requestFocus();\n return false;\n }\n if(Address.isEmpty()){\n address.setError(\"Please enter the item name\");\n address.requestFocus();\n return false;\n }\n if(Details.isEmpty()){\n details.setError(\"Please enter the item name\");\n details.requestFocus();\n return false;\n }\n if(Venueimage.isEmpty()){\n venueimage.setError(\"Please Select the image first\");\n return false;\n }\n\n\n return true;\n }", "private void displayValidationError() {\n\n\t\tif (null != validationErrorTitle) {\n\t\t\tvalidationErrorParent.toFront();\n\t\t\tAppController.showMessage(validationErrorParent, validationErrorMessage, validationErrorTitle,\n\t\t\t\tvalidationErrorType);\n\t\t}\n\n\t\tclearValidationError();\n\t}", "protected void updateValidity(){}", "private void checkFields() {\n if (month.getText().toString().isEmpty()) {\n month.setError(\"enter a month\");\n month.requestFocus();\n return;\n }\n if (day.getText().toString().isEmpty()) {\n day.setError(\"enter a day\");\n day.requestFocus();\n return;\n }\n if (year.getText().toString().isEmpty()) {\n year.setError(\"enter a year\");\n year.requestFocus();\n return;\n }\n if (hour.getText().toString().isEmpty()) {\n hour.setError(\"enter an hour\");\n hour.requestFocus();\n return;\n }\n if (minute.getText().toString().isEmpty()) {\n minute.setError(\"enter the minute\");\n minute.requestFocus();\n return;\n }\n if (AMorPM.getText().toString().isEmpty()) {\n AMorPM.setError(\"enter AM or PM\");\n AMorPM.requestFocus();\n return;\n }\n if (place.getText().toString().isEmpty()) {\n place.setError(\"enter the place\");\n place.requestFocus();\n return;\n }\n }", "public boolean validarForm() throws Exception {\r\n\r\n\t\ttbxIdentificacion\r\n\t\t\t\t.setStyle(\"text-transform:uppercase;background-color:white\");\r\n\t\tlbxTipo_disnostico\r\n\t\t\t\t.setStyle(\"text-transform:uppercase;background-color:white\");\r\n\t\tlbxCodigo_consulta_pyp\r\n\t\t\t\t.setStyle(\"text-transform:uppercase;background-color:white\");\r\n\r\n\t\tString mensaje = \"Los campos marcados con (*) son obligatorios\";\r\n\r\n\t\tboolean valida = true;\r\n\r\n\t\tif (tbxIdentificacion.getText().trim().equals(\"\")) {\r\n\t\t\ttbxIdentificacion\r\n\t\t\t\t\t.setStyle(\"text-transform:uppercase;background-color:#F6BBBE\");\r\n\t\t\tvalida = false;\r\n\t\t}\r\n\r\n\t\tif (lbxTipo_disnostico.getSelectedIndex() == 0) {\r\n\t\t\tlbxTipo_disnostico\r\n\t\t\t\t\t.setStyle(\"text-transform:uppercase;background-color:#F6BBBE\");\r\n\t\t\tvalida = false;\r\n\t\t}\r\n\r\n\t\tif (!lbxFinalidad_cons.getSelectedItem().getValue().toString()\r\n\t\t\t\t.equalsIgnoreCase(\"10\")\r\n\t\t\t\t&& lbxCodigo_consulta_pyp.getSelectedIndex() == 0) {\r\n\t\t\tlbxCodigo_consulta_pyp\r\n\t\t\t\t\t.setStyle(\"text-transform:uppercase;background-color:#F6BBBE\");\r\n\t\t\tvalida = false;\r\n\t\t}\r\n\r\n\t\tif (tbxTipo_principal.getText().trim().equals(\"\")) {\r\n\t\t\tmensaje = \"Debe digitar la impresion diagnostica\";\r\n\t\t\tvalida = false;\r\n\t\t} else if (vaidarIgualdad(tbxTipo_principal.getText(),\r\n\t\t\t\ttbxTipo_relacionado_1.getText(),\r\n\t\t\t\ttbxTipo_relacionado_2.getText(),\r\n\t\t\t\ttbxTipo_relacionado_3.getText())) {\r\n\t\t\tmensaje = \"no se puede repetir la impresion diagnostica\";\r\n\t\t\tvalida = false;\r\n\t\t}\r\n\r\n\t\tif (!valida) {\r\n\t\t\tMessagebox.show(mensaje,\r\n\t\t\t\t\tusuarios.getNombres() + \" recuerde que...\", Messagebox.OK,\r\n\t\t\t\t\tMessagebox.EXCLAMATION);\r\n\t\t}\r\n\r\n\t\treturn valida;\r\n\t}", "void onValidationFailed();", "public void validate(){\n if (validated){\n validated = false;\n } else {\n validated = true;\n }\n }", "private boolean validateForm() {\n\n String email = mEditTextViewEmail.getText().toString();\n if (TextUtils.isEmpty(email)) {\n mTextInputLayoutEmail.setError(\"Emaill Id Required\");\n Toast.makeText(MainActivity.this, \"Email field required\", Toast.LENGTH_SHORT).show();\n return false;\n } else if (!isEmailValid(email)) {\n mTextInputLayoutEmail.setError(\"A valid Email id is required\");\n return false;\n } else {\n mTextInputLayoutEmail.setError(null);\n }\n\n String password = mEditTextViewPassword.getText().toString();\n if (TextUtils.isEmpty(password)) {\n mTextInputLayoutPassword.setError(\"Password required\");\n Toast.makeText(MainActivity.this, \"Password field required\", Toast.LENGTH_SHORT).show();\n return false;\n } else if (!isPasswordValid(password)) {\n mTextInputLayoutPassword.setError(\"Password must be at least 6 characters\");\n return false;\n } else {\n mTextInputLayoutPassword.setError(null);\n }\n\n return true;\n }", "private void checkFields() {\n\t\t\n\t\tboolean errors = false;\n\t\t\n\t\t// contact name\n\t\tString newName = ((TextView) findViewById(R.id.tvNewContactName)).getText().toString();\n\t\tTextView nameErrorView = (TextView) findViewById(R.id.tvContactNameError);\n\t\tif(newName == null || newName.isEmpty()) {\n\t\t\terrors = true;\n\t\t\tnameErrorView.setText(\"Contact must have a name!\");\n\t\t} else {\n\t\t\tnameErrorView.setText(\"\");\n\t\t}\n\t\t\n\t\t// contact phone number\n\t\tString newPhone = ((TextView) findViewById(R.id.tvNewContactPhone)).getText().toString();\n\t\tTextView phoneNumberErrorView = (TextView) findViewById(R.id.tvContactPhoneError);\n\t\tif(newPhone == null || newPhone.isEmpty()) {\n\t\t\terrors = true;\n\t\t\tphoneNumberErrorView.setText(\"Contact must have a phone number!\");\n\t\t} else {\n\t\t\tphoneNumberErrorView.setText(\"\");\n\t\t}\n\t\t\n\t\t// contact e-mail\n\t\tString newEmail= ((TextView) findViewById(R.id.tvNewContactEmail)).getText().toString();\n\t\tTextView emailErrorView = (TextView) findViewById(R.id.tvContactEmailError);\n\t\tif(newEmail == null || newEmail.isEmpty()) {\n\t\t\terrors = true;\n\t\t\temailErrorView.setText(\"Contact must have an E-mail!\");\n\t\t} else if (!newEmail.matches(\".+@.+\\\\..+\")) {\n\t\t\terrors = true;\n\t\t\temailErrorView.setText(\"Invalid E-mail address! Example:\"\n\t\t\t\t\t+ \"[email protected]\");\n\t\t} else {\n\t\t\temailErrorView.setText(\"\");\n\t\t}\n\t\t\n\t\t// contact note\n\t\tString newNote = ((TextView) findViewById(R.id.tvNewContactNote)).getText().toString();\n\t\t\n\t\t// contact Facebook profile address\n\t\tString newAddress = ((TextView) findViewById(R.id.tvNewContactAddress)).getText().toString();\n\t\t\n\t\t// save the new contact if all the required fields are filled out\n\t\tif(!errors) {\n\t\t\tif(newNote == null || newNote.isEmpty()) {\n\t\t\t\tnewNote = \"No note.\";\n\t\t\t}\n\t\t\t\n\t\t\tif(newAddress == null || newAddress.isEmpty()) {\n\t\t\t\tnewAddress = \"No address.\";\n\t\t\t}\n\t\t\tHomeActivity.listOfContacts.add(new Contact(newName, newPhone, newEmail, \n\t\t\t\t\tnewNote, newAddress));\n\t\t\tIntent intent = new Intent(AddContactActivity.this, HomeActivity.class);\n\t\t\tstartActivity(intent);\n\t\t}\n\t}", "public void validate(){\r\n\t\ttry{\r\n\t\t\t//First name, last name, date of birth and email are compulsory.\r\n\t\tif(FirstName==null||LastName==null||Dob==null||Email==null) \r\n\t\t\tthrow new Exception(\"One of the field is Empty :\\n(First name / last name / dob / email )\");\r\n\t\tif(TelephoneNumber!=0||MobileNumber!=0)\r\n\t\t\tthrow new Exception(\"Enter Contact Number\");\r\n\t\t\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\t\t\r\n\t\t/*finally{\r\n\t\t\tSystem.out.println(\"Program Executed\");\r\n\t\t}*/\r\n\t}", "@Override\n public void validate() {\n if (this.password.length() < 2) {\n addFieldError(\"password\", \"too short\");\n }\n System.out.println(\"**************Validation\");\n }", "@Override\n\t\tprotected void revalidate() {\n\t\t\tvalid = true;\n\t\t}", "private boolean validateFields() {\n\t\tList<String> errorMsg = new ArrayList<>();\n\n\t\tif (aliasField.getText().equals(\"\"))\n\t\t\terrorMsg.add(\"Alias cannot be left empty.\\n\");\n\n\t\tif (carComboBox.getValue() == null)\n\t\t\terrorMsg.add(\"A car should be assigned to the trip.\\n\");\n\n\t\tif (routeComboBox.getValue() == null)\n\t\t\terrorMsg.add(\"A route should be assigned to the trip.\\n\");\n\n\t\tfor (StopPoint stopPoint : stopPoints) {\n\t\t\tif (stopPoint.getTime() == null || stopPoint.getTime().equals(\"\"))\n\t\t\t\terrorMsg.add(\"You need to set an arriving time for '\" + stopPoint.toString() + \"'.\\n\");\n\t\t}\n\n\t\tif (endDatePicker.getValue() != null && startDatePicker.getValue() != null)\n\t\t{\n\t\t\tif (startDatePicker.getValue().isBefore(LocalDate.now())) {\n\t\t\t\terrorMsg.add(\"Trip start date should be after current date.\\n\");\n\t\t\t} else if (endDatePicker.getValue().isBefore(startDatePicker.getValue())) {\n\t\t\t\terrorMsg.add(\"Trip end date should be after start date.\\n\");\n\t\t\t} else {\n\t\t\t\tSet<DayOfWeek> recurrence = RecurrenceUtility.parseBitmaskToSet(getRecurrence());\n\t\t\t\tboolean isValidRecurrence = false;\n\t\t\t\tfor (LocalDate now = startDatePicker.getValue(); !now.isAfter(endDatePicker.getValue()); now = now.plusDays(1)) {\n\t\t\t\t\tif (recurrence.contains(now.getDayOfWeek()))\n\t\t\t\t\t\tisValidRecurrence = true;\n\t\t\t\t}\n\t\t\t\tif (!isValidRecurrence) {\n\t\t\t\t\terrorMsg.add(\"No recurrent day exists between trip start date and end date.\\n\");\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\terrorMsg.add(\"Trip starts date or/and end date is invalid.\\n\");\n\t\t}\n\n\t\t// consistency check\n\t\t// WOF & registration cannot be expired before the end date of recurring trip\n\t\tCar car = carComboBox.getValue();\n\t\tif (endDatePicker.getValue() != null && startDatePicker.getValue() != null && car != null) {\n\t\t\tif (LocalDate.parse(car.getWof()).isBefore(endDatePicker.getValue()) ||\n\t\t\tLocalDate.parse(car.getRegistration()).isBefore(endDatePicker.getValue())) {\n\t\t\t\terrorMsg.add(String.format(\"The expiration date of a recurring trip cannot occur after the expiry date of car's WOF and registration.\\n\" +\n\t\t\t\t\t\t\t\t\"------------------------------------------------\\n\" +\n\t\t\t\t\t\t\t\t\"Details for car [%s]:\\n\" +\n\t\t\t\t\t\t\t\t\" a. WOF expire date is %s.\\n\" +\n\t\t\t\t\t\t\t\t\" b. Registration expire date is %s.\\n\" +\n\t\t\t\t\t\t\t\t\"------------------------------------------------\\n\",\n\t\t\t\t\t\tcar.getPlate(), car.getWof(), car.getRegistration()));\n\t\t\t}\n\t\t}\n\n\t\t// handle and show error message in dialog\n\t\tif (errorMsg.size() != 0) {\n\t\t\tStringBuilder errorString = new StringBuilder(\"Operation failed is caused by: \\n\");\n\t\t\tfor (Integer i = 1; i <= errorMsg.size(); i++) {\n\t\t\t\terrorString.append(i.toString());\n\t\t\t\terrorString.append(\". \");\n\t\t\t\terrorString.append(errorMsg.get(i - 1));\n\t\t\t}\n\t\t\tString headMsg = mode == Mode.ADD_MODE ? \"Failed to add the trip.\" : \"Failed to update the trip.\";\n\t\t\trss.showErrorDialog(headMsg, errorString.toString());\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "ValidationResponse validate();", "public void validate() {}", "protected void validateInput()\r\n\t{\r\n\t\tString errorMessage = null;\r\n\t\tif ( validator != null ) {\r\n\t\t\terrorMessage = validator.isValid(text.getText());\r\n\t\t}\r\n\t\t// Bug 16256: important not to treat \"\" (blank error) the same as null\r\n\t\t// (no error)\r\n\t\tsetErrorMessage(errorMessage);\r\n\t}", "public static void error()\r\n {\r\n valid=false;\r\n\r\n }", "public void printValidateInformation() {\n\n if(!validateFirstName()){\n System.out.println(\"The first name must be filled in\");\n }\n if(!validateFirstNameLength()){\n System.out.println(\"The first name must be at least 2 characters long.\");\n }\n if(!validateLastName()){\n System.out.println(\"The last name must be filled in\");\n }\n if(!validateLastNameLength()){\n System.out.println(\"The last name must be at least 2 characters long.\");\n }\n if(!validateZipcode()){\n System.out.println(\"The zipcode must be a 5 digit number.\");\n }\n if (!validateEmployeeID()){\n System.out.println(\"The employee ID must be in the format of AA-1234.\");\n }\n\n if(validateFirstName() && validateFirstNameLength() && validateLastName() && validateLastNameLength()\n && validateZipcode() && validateEmployeeID()){\n System.out.println(\"There were no errors found.\");\n }\n }", "private boolean checkValidity() {\n if(txtSupplierCode.getText().equals(\"\")) {\n JOptionPane.showMessageDialog(null, \"Please Enter the Supplier Code!!\", \"EMPTY SUPPLIER CODE\", JOptionPane.ERROR_MESSAGE);\n txtSupplierCode.setBackground(Color.RED);\n return false;\n }\n if(txtSupplierName.getText().equals(\"\")) {\n JOptionPane.showMessageDialog(null, \"Please Enter the Supplier Name!!\", \"EMPTY SUPPLIER NAME\", JOptionPane.ERROR_MESSAGE);\n txtSupplierName.setBackground(Color.RED);\n return false;\n }\n return true;\n }", "private boolean Validate() {\n EditText titleText = findViewById(R.id.register_movie_title_txt);\n EditText yearText = findViewById(R.id.register_movie_year_txt);\n EditText ratingText = findViewById(R.id.register_movie_rating_txt);\n\n\n boolean is_filled_required_fields = false;\n is_filled_required_fields = titleText.getText().toString().length() > 0\n && yearText.getText().toString().length() > 0\n && ratingText.getText().toString().length() > 0;\n\n if (!is_filled_required_fields) {\n Snackbar mySnackbar = Snackbar.make(findViewById(R.id.activity_register_base_layout), \"Please fill required fields\", BaseTransientBottomBar.LENGTH_SHORT);\n mySnackbar.show();\n }\n return is_filled_required_fields;\n }", "public void validate() {\n\t\tlog(\"In validate of LoginAction\");\n\t\t//if (StringUtils.isEmpty(user.getUserId())) {\n\t if (StringUtils.isEmpty(userId)) {\t\n\t\t\tlog(\"In validate of LoginAction: userId is blank\");\n\t\t\taddFieldError(\"userId\", \"User ID cannot be blank\");\n\t\t}\n\t\t//if (StringUtils.isEmpty(user.getPassword())) {\n\t if (StringUtils.isEmpty(password)) {\n\t\t\tlog(\"In validate of LoginAction: password is blank\");\n\t\t\taddFieldError(\"password\", \"Password cannot be blank\");\n\t\t}\n\t\tlog(\"Completed validate of LoginAction\");\n\t}", "private boolean validate() {\n\n EditText fnameET = findViewById(R.id.fnameET);\n EditText lnameET = findViewById(R.id.lnameET);\n EditText perNoET = findViewById(R.id.perNoET);\n EditText lecEmailET = findViewById(R.id.lecEmailET);\n EditText adminCodeET = findViewById(R.id.adminCodeET);\n EditText passwET = findViewById(R.id.passwET);\n EditText cpasswET = findViewById(R.id.cpasswET);\n\n String fname = fnameET.getText().toString().trim();\n String lname = lnameET.getText().toString().trim();\n String personNo = perNoET.getText().toString().trim();\n String lectEmail = lecEmailET.getText().toString().trim();\n String adminCode = adminCodeET.getText().toString().trim();\n String password = passwET.getText().toString().trim();\n String cpassword = cpasswET.getText().toString().trim();\n\n //boolean flag;\n\n if(fname.isEmpty()) {\n fnameET.setError(\"Field can't be empty!\");\n fnameET.requestFocus();\n return false;\n } /*else {\n flag = false;\n }*/\n\n if(lname.isEmpty()) {\n lnameET.setError(\"Field can't be empty!\");\n lnameET.requestFocus();\n return false;\n } /*else {\n flag = false;\n }*/\n\n if(personNo.isEmpty()) {\n perNoET.setError(\"Field can't be empty!\");\n perNoET.requestFocus();\n return false;\n } /*else {\n flag = false;\n }*/\n\n if(lectEmail.isEmpty()) {\n lecEmailET.setError(\"Field can't be empty!\");\n lecEmailET.requestFocus();\n return false;\n } else if (!Patterns.EMAIL_ADDRESS.matcher(lectEmail).matches()) {\n lecEmailET.setError(\"check that your email is entered correctly!\");\n lecEmailET.requestFocus();\n return false;\n } /*else {\n flag = false;\n }*/\n\n if(adminCode.isEmpty()) {\n adminCodeET.setError(\"Field can't be empty!\");\n adminCodeET.requestFocus();\n return false;\n } /*else {\n flag = false;\n }*/\n\n if(password.isEmpty()) {\n passwET.setError(\"Field can't be empty!\");\n passwET.requestFocus();\n return false;\n } /*else {\n flag = false;\n }*/\n\n if(cpassword.isEmpty()) {\n cpasswET.setError(\"Field can't be empty!\");\n cpasswET.requestFocus();\n return false;\n } else if (!cpassword.equals(password)) {\n cpasswET.setError(\"password doesn't match the above entered password!\");\n cpasswET.requestFocus();\n return false;\n } /*else {\n flag = false;\n }*/\n\n return true;\n }", "boolean validateInput() {\n if (etFullname.getText().toString().equals(\"\")) {\n etFullname.setError(\"Please Enter Full Name\");\n return false;\n }\n if (etId.getText().toString().equals(\"\")) {\n etId.setError(\"Please Enter ID\");\n return false;\n }\n if (etEmail.getText().toString().equals(\"\")) {\n etEmail.setError(\"Please Enter Email\");\n return false;\n }\n if (etHall.getText().toString().equals(\"\")) {\n etHall.setError(\"Please Enter Hall Name\");\n return false;\n }\n if (etAge.getText().toString().equals(\"\")) {\n etAge.setError(\"Please Enter Age\");\n return false;\n }\n if (etPhone.getText().toString().equals(\"\")) {\n etPhone.setError(\"Please Enter Contact Number\");\n return false;\n }\n if (etPassword.getText().toString().equals(\"\")) {\n etPassword.setError(\"Please Enter Password\");\n return false;\n }\n\n // checking the proper email format\n if (!isEmailValid(etEmail.getText().toString())) {\n etEmail.setError(\"Please Enter Valid Email\");\n return false;\n }\n\n // checking minimum password Length\n if (etPassword.getText().length() < MIN_PASSWORD_LENGTH) {\n etPassword.setError(\"Password Length must be more than \" + MIN_PASSWORD_LENGTH + \"characters\");\n return false;\n }\n\n\n return true;\n }", "@Override\n public void validate(Form<?> form) {\n if (form.findSubmittingButton() != form.get(\"save\")) { \n return;\n }\n\n updateModels();\n if (rolesFormComponent.getRolesNamesForStoring().isEmpty()) {\n form.error(new ParamResourceModel(\"emptyRoles\", getPage()).getString());\n }\n }", "public boolean hasFieldErrors();", "private void validateFields() {\n\t\t// TODO validate ID\n\t\tboolean valid = (mEdtAddress.getText().length() > 2)\n\t\t\t\t&& (mEdtPassword.getText().length() > 0);\n\t\tmBtnNext.setEnabled(valid);\n\t}", "private boolean isValidate() {\n name = edt_name.getText().toString();\n phone = edt_phone.getText().toString();\n landMark = edt_landmark.getText().toString();\n address = edt_address.getText().toString();\n city = edt_city.getText().toString();\n state = edt_state.getText().toString();\n if (name.length() == 0) {\n edt_name.setError(\"Please Enter Name \");\n requestFocus(edt_name);\n return false;\n } else if (phone.isEmpty()) {\n edt_phone.setError(\"Please Enter Phone Number \");\n requestFocus(edt_phone);\n return false;\n } else if (phone.length() != 10) {\n edt_phone.setError(\"Please Enter Valid Phone Number \");\n requestFocus(edt_phone);\n return false;\n } else if (address.length() == 0) {\n edt_address.setError(\"Please Enter Address\");\n requestFocus(edt_address);\n return false;\n } else if (city.length() == 0) {\n edt_city.setError(\"Please Enter City Name\");\n requestFocus(edt_city);\n return false;\n } else if (state.length() == 0) {\n edt_state.setError(\"Please Enter State Name\");\n requestFocus(edt_state);\n return false;\n }\n return true;\n }", "private boolean isFormValid(AdminAddEditUserDTO dto)\r\n\t{\n\t\tSOWError error;\r\n\t\tList<IError> errors = new ArrayList<IError>();\t\t\r\n\t\t\r\n\t\t// First Name\r\n\t\tif(com.newco.marketplace.web.utils.SLStringUtils.isNullOrEmpty(dto.getFirstName()))\r\n\t\t{\r\n\t\t\terror = new SOWError(getTheResourceBundle().getString(\"Admin_First_Name\"),\r\n\t\t\t\t\tgetTheResourceBundle().getString(\"Admin_First_Name_Validation_Msg\"), OrderConstants.FM_ERROR);\r\n\t\t\terrors.add(error);\r\n\t\t}\r\n\t\t// Last Name\r\n\t\tif(com.newco.marketplace.web.utils.SLStringUtils.isNullOrEmpty(dto.getLastName()))\r\n\t\t{\r\n\t\t\terror = new SOWError(getTheResourceBundle().getString(\"Admin_Last_Name\"),\r\n\t\t\t\t\tgetTheResourceBundle().getString(\"Admin_Last_Name_Validation_Msg\"), OrderConstants.FM_ERROR);\r\n\t\t\terrors.add(error);\r\n\t\t}\r\n\t\t\r\n\t\t// User Name\r\n\t\tif(com.newco.marketplace.web.utils.SLStringUtils.isNullOrEmpty(dto.getUsername()))\r\n\t\t{\r\n\t\t\terror = new SOWError(getTheResourceBundle().getString(\"Admin_User_Name\"),\r\n\t\t\t\t\tgetTheResourceBundle().getString(\"Admin_User_Name_Validation_Msg\"), OrderConstants.FM_ERROR);\r\n\t\t\terrors.add(error);\r\n\t\t}\r\n\t\telse\r\n\t\t{\t\r\n\t\t\t//User Name Length Check\r\n\t\t\tif((dto.getUsername().length() < 8) || (dto.getUsername().length() >30)){\r\n\t\t\t\terror = new SOWError(getTheResourceBundle().getString(\"Admin_User_Name\"),getTheResourceBundle().getString(\"Admin_User_Name_Length_Validation_Msg\"), OrderConstants.FM_ERROR);\r\n\t\t\t\terrors.add(error);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tString jobRole = getParameter(\"jobRole\");\r\n\t\tif(\"-1\".equals(jobRole))\r\n\t\t{\r\n\t\t\terror = new SOWError(getTheResourceBundle().getString(\"Admin_Job_Role\"),\r\n\t\t\t\t\tgetTheResourceBundle().getString(\"Admin_Job_Role_Validation_Msg\"), OrderConstants.FM_ERROR);\r\n\t\t\terrors.add(error);\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t// Handle Primary Email\r\n\t\tif(com.newco.marketplace.web.utils.SLStringUtils.isNullOrEmpty(dto.getEmail()))\r\n\t\t{\r\n\t\t\terror = new SOWError(getTheResourceBundle().getString(\"Admin_Email\"),\r\n\t\t\t\t\tgetTheResourceBundle().getString(\"Admin_Email_Validation_Msg\"), OrderConstants.FM_ERROR);\r\n\t\t\terrors.add(error);\t\t\t\t\t\t\t\t\t\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif(com.newco.marketplace.web.utils.SLStringUtils.isEmailValid(dto.getEmail()) == false)\r\n\t\t\t{\r\n\t\t\t\terror = new SOWError(getTheResourceBundle().getString(\"Admin_PrimaryEmail\"),\r\n\t\t\t\t\t\tgetTheResourceBundle().getString(\"Admin_Email_Pattern_Validation_Msg\"), OrderConstants.FM_ERROR);\r\n\t\t\t\terrors.add(error);\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse if(dto.getEmail().equals(dto.getEmailConfirm()) == false)\r\n\t\t\t{\r\n\t\t\t\terror = new SOWError(getTheResourceBundle().getString(\"Admin_PrimaryEmail\"),\r\n\t\t\t\t\t\tgetTheResourceBundle().getString(\"Admin_Email_Confirm_Validation_Msg\"), OrderConstants.FM_ERROR);\r\n\t\t\t\terrors.add(error);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Check for existing username, only in Add mode\r\n\t\tString mode = (String)getSession().getAttribute(\"addEditUserMode\");\r\n\t\tif(mode != null)\r\n\t\t{\r\n\t\t\tif(mode.equals(\"add\"))\r\n\t\t\t{\r\n\t\t\t\tif(manageUsersDelegate.getAdminUser(dto.getUsername()) != null || manageUsersDelegate.getBuyerUser(dto.getUsername()) != null)\r\n\t\t\t\t{\r\n\t\t\t\t\terror = new SOWError(getTheResourceBundle().getString(\"Admin_User_Name\"), getTheResourceBundle().getString(\"Admin_Existing_User_Validation_Msg1\")+\" \" + dto.getUsername() +\" \" +getTheResourceBundle().getString(\"Admin_Existing_User_Validation_Msg2\"), OrderConstants.FM_ERROR);\r\n\t\t\t\t\terrors.add(error);\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\t\t\r\n\t\t// If we have errors, put them in request.\r\n\t\tif(errors.size() > 0)\r\n\t\t{\r\n\t\t\tsetAttribute(\"errors\", errors);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tgetSession().removeAttribute(\"addEditUserMode\");\r\n\t\t\tgetSession().removeAttribute(\"originalUsername\");\t\t\t\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "public boolean validateInputFields(){\n if(titleText.getText().isEmpty() || descriptionText.getText().isEmpty()){\n showError(true, \"All fields are required. Please complete.\");\n return false;\n }\n if(locationCombo.getSelectionModel().isEmpty()){\n showError(true, \"Please select a location.\");\n return false;\n }\n if(contactCombo.getSelectionModel().isEmpty()){\n showError(true, \"Please select a contact.\");\n return false;\n }\n if(typeCombo.getSelectionModel().isEmpty()){\n showError(true, \"Please select the type.\");\n return false;\n }\n if(customerCombo.getSelectionModel().isEmpty()){\n showError(true, \"Please select a customer.\");\n return false;\n }\n if(userCombo.getSelectionModel().isEmpty()){\n showError(true, \"Please select a user.\");\n return false;\n }\n return true;\n }", "@Override\r\n\tprotected boolean validateFields(String action) {\r\n\t\t// Booleano para indicar que hubo error\r\n\t\tisError = false;\r\n\t\t// IRI Concepto\r\n\t\tif (this.isBlanks(object.getDcoiricaf())) {\r\n\t\t\tisError = true;\r\n\t\t\tthis.getErrorMessages().add(\r\n\t\t\t\t\tApplicationMessages.getMessage(\"USR0008\",\r\n\t\t\t\t\t\t\tApplicationMessages.getMessage(\"se010_iriDetail\")));\r\n\t\t}\r\n\t\t// Concepto Semántico\r\n\t\tif (this.isBlanks(object.getCosccosak())) {\r\n\t\t\tisError = true;\r\n\t\t\tthis.getErrorMessages().add(\r\n\t\t\t\t\tApplicationMessages.getMessage(\"USR0008\",\r\n\t\t\t\t\t\t\tApplicationMessages\r\n\t\t\t\t\t\t\t\t\t.getMessage(\"se010_semanticConcept\")));\r\n\t\t}\r\n\t\t// Valida relaciones\r\n\t\tfor (Sedrelco relco : object.getRelcos()) {\r\n\t\t\t// Valor Relacion\r\n\t\t\tif (this.isBlanks(relco.getDrcvalraf())) {\r\n\t\t\t\tisError = true;\r\n\t\t\t\tthis.getErrorMessages().add(\r\n\t\t\t\t\t\tApplicationMessages.getMessage(\"USR0008\",\r\n\t\t\t\t\t\t\t\tApplicationMessages\r\n\t\t\t\t\t\t\t\t\t\t.getMessage(\"se010_valueRelation\")));\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Retorna\r\n\t\treturn !isError;\r\n\t}", "private boolean isInputValid() {\n String errorMessage = \"\";\n\n if (ServiceName.getText() == null || ServiceName.getText().length() == 0) {\n errorMessage += \"No valid name!\\n\";\n }\n if (Serviceemail.getText() == null || Serviceemail.getText().length() == 0) {\n Pattern p = Pattern.compile(\"[_A-Za-z0-9][A-Za-z0-9._]*?@[_A-Za-z0-9]+([.][_A-Za-z]+)+\");\n Matcher m = p.matcher(Serviceemail.getText());\n if (m.find() && m.group().equals(Serviceemail.getText())) {\n errorMessage += \"No valid Mail Forment!\\n\";\n }\n }\n if (servicedescrip.getText() == null || servicedescrip.getText().length() == 0) {\n errorMessage += \"No valid description !\\n\";\n }\n if (f == null && s.getImage() == null) {\n errorMessage += \"No valid photo ( please upload a photo !)\\n\";\n }\n if (Serviceprice.getText() == null || Serviceprice.getText().length() == 0) {\n errorMessage += \"No valid prix !\\n\";\n } else {\n // try to parse the postal code into an int.\n try {\n Float.parseFloat(Serviceprice.getText());\n } catch (NumberFormatException e) {\n errorMessage += \"No valid prix (must be a Float)!\\n\";\n }\n }\n if ( !Weekly.isSelected() && !Daily.isSelected() && !Monthly.isSelected()) {\n errorMessage += \"No valid Etat ( select an item !)\\n\";\n }\n if (Servicesatet.getSelectionModel().getSelectedIndex() == -1) {\n errorMessage += \"No valid etat ( select an item !)\\n\";\n }\n if (ServiceCity.getSelectionModel().getSelectedIndex() == -1) {\n errorMessage += \"No valid City ( select an item !)\\n\";\n }\n if (servicetype.getSelectionModel().getSelectedIndex() == -1) {\n errorMessage += \"No valid Type ( select an item !)\\n\";\n }\n if (errorMessage.length() == 0) {\n return true;\n } else {\n // Show the error message.\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setTitle(\"Invalid Fields\");\n alert.setHeaderText(\"Please correct invalid fields\");\n alert.setContentText(errorMessage);\n alert.showAndWait();\n return false;\n }\n }", "@Override\r\n\tpublic void validate() {\n\t\t\r\n\t}", "public boolean validateuser(){\n if(fname.getText().toString().isEmpty()){\n fname.setError(\"Enter your first name\");\n fname.requestFocus();\n return false;\n }\n if(lname.getText().toString().isEmpty()){\n lname.setError(\"Enter your last name\");\n lname.requestFocus();\n return false;\n }\n if(username.getText().toString().isEmpty()){\n username.setError(\"Enter your last name\");\n username.requestFocus();\n return false;\n }\n if(password.getText().toString().isEmpty()||password.getText().toString().length()<6){\n password.setError(\"Enter your password with digit more than 6\");\n password.requestFocus();\n return false;\n }\n return true;\n }", "protected void validate() {\n // no op\n }", "private boolean getValidation() {\n strLoginMail = inputLoginMail.getText().toString().trim();\n strLoginPass = inputLoginPass.getText().toString().trim();\n\n if (strLoginMail.isEmpty()) { // Check Email Address\n inputLoginMail.setError(getString(dk.eatmore.demo.R.string.email_blank));\n inputLoginMail.requestFocus();\n return false;\n } else if (!isValidEmail(strLoginMail)) {\n inputLoginMail.setError(getString(dk.eatmore.demo.R.string.invalid_email));\n inputLoginMail.requestFocus();\n return false;\n } else if (strLoginPass.isEmpty()) { // Check Password\n inputLoginPass.setError(getString(dk.eatmore.demo.R.string.password_empty));\n inputLoginPass.requestFocus();\n return false;\n }\n\n return true;\n }", "private void validateAndUpdate(TextField textField, boolean isValid, Label ruleField, String ruleMessage) {\r\n \tif (textField != null) {\r\n \t\tif (textField.getText().equals(\"\")) {\r\n \t\t\treturn;\r\n \t\t}\r\n \t\tString color = isValid ? \"white\" : \"red\";\r\n \t\ttextField.setStyle(\"-fx-background-color: \" + color);\r\n \t\tif (isValid) {\r\n \t\t\tbackUpData.writeCarDataToFile(carData.getDoorLength(), carData.getRearDoorLength(), carData.getBlindZoneValue(),\r\n \t\t\t\t\t\t\t\t\t\t carData.getTopSpeed(), carData.getFrontDistParking());\r\n \t\t\tboolean notReady = ! carData.isReady();\r\n \t\t\tmainRuleLabel.setVisible(notReady);\r\n \t\t\tdisableModeButtons(driveModeButton, blindZoneModeButton, parkingModeButton, notReady);\r\n \t\t\tif (notReady) {\r\n \t\t\t\tvalidateAndUpdate(null, false, mainRuleLabel, \"Update vehicle data\"); \t\t\t\t\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n \telse {\r\n \t\tbackUpData.writeUserDataToFile(smartBrakeActivated, blindspotAlwaysActivated, audioWarningActivated);\r\n \t}\r\n \t\r\n if (ruleField != null) {\r\n \truleField.setText(ruleMessage);\r\n \tif (isValid) {\r\n \t\truleField.setTextFill(Color.GREEN);\r\n \t}\r\n \telse {\r\n \t\truleField.setTextFill(Color.RED); \t\t\r\n \t}\r\n \truleField.setVisible(true);\r\n }\r\n }", "private boolean validateInput(){\n Window owner=root.getScene().getWindow();\n inputFileds.addAll(txtfn,txtln,txtsurname,txtDOB,txtResidence,txtMobile,txtID,username);\n for (TextField textField : inputFileds) {\n if(textField.getText().isEmpty()){\n //set css stroke\n Dialog.showMessageDialog(owner,\"Missing Details\",\"Invalid Input\",DialogIcon.WARNING);\n textField.requestFocus();\n return false;\n }\n }\n inputFileds.removeAll(txtDOB,txtMobile,username);\n for (TextField textField : inputFileds) {\n if(textField.getText().length()>30){\n //set css stroke\n Dialog.showMessageDialog(owner,\"Sorry the text you entered can not be greater that 30 characters\",\"Text too Long\",DialogIcon.WARNING);\n textField.requestFocus();\n return false;\n }\n }\n if(username.getText().length()>20 || username.getText().length()<4){\n Dialog.showMessageDialog(owner, \"Sorry your Username has to be More than 3 Characters and can not Exceed 20 Charchaters\", \"Invalid input\",DialogIcon.WARNING);\n username.requestFocus();\n return false;\n }\n if(pass.getText().isEmpty()){\n Dialog.showMessageDialog(owner,\"Missing Details\",\"Invalid Input\",DialogIcon.WARNING);\n pass.requestFocus();\n return false;\n }\n if(pass.getText().length()>20 || pass.getText().length()<4){\n Dialog.showMessageDialog(owner, \"Sorry your Password has to be More than 3 Characters and can not Exceed 20 Charchaters\", \"Invalid Input\",DialogIcon.WARNING);\n pass.requestFocus();\n return false;\n }\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n SimpleDateFormat yearFormat = new SimpleDateFormat(\"yyyy\");\n try {\n date = dateFormat.parse(txtDOB.getText());\n Calendar cal=Calendar.getInstance();\n int year=Integer.parseInt(yearFormat.format(date));\n if (year <= 1900 || year>cal.get(Calendar.YEAR)) {\n Dialog.showMessageDialog(owner,\"Invalid Date of Birth\", \"Invalid Input\",DialogIcon.WARNING);\n txtDOB.requestFocus();\n return false;\n }\n String initialEntry=txtDOB.getText();\n String parsedValue=dateFormat.format(date);\n if(!initialEntry.equals(parsedValue)){\n Dialog.showMessageDialog(owner, \"Note your Date of Birth has been corrected\", \"Date Corrected\",DialogIcon.INFORMATION);\n }\n txtDOB.setText(dateFormat.format(date));\n } catch (ParseException ex) {\n Dialog.showMessageDialog(owner,\"Invalid Date of Birth\", \"Invalid Input\",DialogIcon.WARNING);\n txtDOB.requestFocus();\n return false;\n }\n try {\n int mobile=Integer.parseInt(txtMobile.getText());\n } catch (NumberFormatException e) {\n Dialog.showMessageDialog(owner, \"Invalid Mobile Number\", \"Invalid data\",DialogIcon.WARNING);\n txtMobile.requestFocus();\n return false;\n }\n if(txtMobile.getText().length() != 10){\n Dialog.showMessageDialog(owner, \"Sorry your Mobile Number is invalid\", \"Invalid input\",DialogIcon.WARNING);\n txtMobile.requestFocus();\n return false;\n }\n String sql=\"select Username,Password from users where Username=?\";\n try(PreparedStatement prstmt=con.prepareStatement(sql)) {\n prstmt.setString(1, username.getText());\n ResultSet rs=prstmt.executeQuery();\n if(rs.next()){\n Dialog.showMessageDialog(owner, \"Sorry Username already exists\\n Please change to different Username\", \"Username Exists\",DialogIcon.WARNING);\n username.requestFocus();\n return false;\n }\n rs.close();\n } catch (SQLException e) {\n System.err.println(e);\n }\n return true;\n }", "private boolean validateInput(){\n boolean result = false;\n\n if(!us.setUsername(userField.getText())){\n errorLabel.setText(\"Nombre de usuario invalido\");\n } else if(!us.setPassword(passField.getText())){ //Valido 1 por uno los campos que ingreso el usuario\n errorLabel.setText(\"Contraseña invalida\");\n } else if(!us.setName(nameField.getText())){\n errorLabel.setText(\"Nombre Invalido\");\n } else if(!us.setSurname(surnameField.getText())){\n errorLabel.setText(\"Apellido Invalido\");\n } else if(!us.setDni(dniField.getText())){\n errorLabel.setText(\"Dni invalido\");\n } else if(!ageField.getText().matches(\"\\\\d{2}\")){\n errorLabel.setText(\"Edad invalida\");\n }\n else{\n us.setAge(Integer.parseInt(ageField.getText()));\n result = true;\n }\n return result;\n }", "private boolean isInputValid() {\n\t\tString errorMessage = \"\";\n\t\t\n\t\tif (dateField.getText() == null || dateField.getText().length() == 0) {\n\t\t\terrorMessage += \"Kein gültiges Datum!\\n\";\n\t\t} else {\n\t\t\tif (!DateUtil.validDate(dateField.getText())) {\n\t\t\t\terrorMessage += \"Kein gültiges Datum. Benutze das dd.mm.yyy Format!\\n\";\n\t\t\t}\n\t\t}\n\t\tString categoryFieldSelection = categoryField.getSelectionModel().getSelectedItem();\n\t\tif (categoryFieldSelection.isEmpty() || categoryFieldSelection.length() == 0) {\n\t\t\terrorMessage += \"Keine gültige Kategorie!\\n\";\n\t\t}\n\t\tif (useField.getText() == null || useField.getText().length() == 0) {\n\t\t\terrorMessage += \"Kein gültiger Verwendungszweck!\\n\";\n\t\t}\n\t\tif (amountField.getText() == null || amountField.getText().length() == 0) {\n\t\t\terrorMessage += \"Kein gültiger Betrag!\\n\";\n\t\t} \n\t\t/**else {\n\t\t\t// try to parse the amount into a double\n\t\t\ttry {\n\t\t\t\tDouble.parseDouble(amountField.getText());\n\t\t\t} catch (NumberFormatException e) {\n\t\t\t\terrorMessage += \"Kein zulässiger Betrag! (Nur Dezimalzahlen erlaubt)\\n\";\n\t\t\t}\n\t\t}**/\n\t\tif (distributionKindField.getText() == null || distributionKindField.getText().length() == 0) {\n\t\t\terrorMessage += \"Keine gültige Ausgabeart!\\n\";\n\t\t}\n\n\t\tif (errorMessage.length() == 0) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\t// Show the error message.\n\t\t\tAlert alert = new Alert(AlertType.ERROR);\n\t\t\talert.initOwner(dialogStage);\n\t\t\talert.setTitle(\"Ungültige Eingaben\");\n\t\t\talert.setHeaderText(\"Bitte korrigieren Sie die Fehler in den Feldern.\");\n\t\t\talert.setContentText(errorMessage);\n\t\t\talert.showAndWait();\n\t\t\treturn false;\n\t\t}\n\t}", "@Override\n\t@FXML\n\tpublic boolean validate() {\n\t\t\n\t\tboolean isDataEntered = true;\n\t\tLocalDate startDate = Database.getInstance().getStartingDate();\n\t\tSystem.out.println();\n\t\tif(amountField.getText() == null || amountField.getText().trim().isEmpty())\n\t\t\tisDataEntered = setErrorTxt(\"You left the amount field empty.\");\n\t\telse if(!(Validation.validateAmount(amountField.getText())))\n\t\t\tisDataEntered = setErrorTxt(\"Please enter a valid amount\");\n\t\telse if(creditTextField.getText() == null || creditTextField.getText().trim().isEmpty())\n\t\t\tisDataEntered = setErrorTxt(\"You left the credit text field empty.\");\n\t\telse if(!(Validation.validateChars(creditTextField.getText())))\n\t\t\tisDataEntered = setErrorTxt(\"Please only enter valid characters\");\n\t\telse if(dateField.getValue() == null) {\n\t\t\tisDataEntered = setErrorTxt(\"You left the date field empty.\");\t\t\t\n\t\t}\n\t\telse if(dateField.getValue().isBefore(startDate))\n\t\t\tisDataEntered = setErrorTxt(\"Sorry, the date you entered is before the starting date.\");\n\t\treturn isDataEntered;\n\t}", "private boolean checkValidations() {\n if (TextUtils.isEmpty(etFirstName.getText().toString().trim())) {\n appUtils.showSnackBar(getActivity().findViewById(android.R.id.content), getString(R.string.empty_name_war));\n return false;\n } else if (etPhoneNo.getText().length() > 0 && etPhoneNo.getText().toString().trim().length() < 7) {\n appUtils.showSnackBar(getActivity().findViewById(android.R.id.content), getString(R.string.valid_mo_no_war));\n return false;\n }\n /*else if (TextUtils.isEmpty(etAdress.getText().toString().trim())) {\n appUtils.showSnackBar(getActivity().findViewById(android.R.id.content), getString(R.string.empty_address_war));\n return false;\n } else if (countryId==null || countryId.equals(\"\")) {\n appUtils.showSnackBar(getActivity().findViewById(android.R.id.content), getString(R.string.country_war));\n return false;\n } else if (stateId==null || stateId.equals(\"\")) {\n appUtils.showSnackBar(getActivity().findViewById(android.R.id.content), getString(R.string.state_war));\n return false;\n }*/ /*else if (cityId==null || cityId.equals(\"\")) {\n appUtils.showSnackBar(getActivity().findViewById(android.R.id.content), getString(R.string.city_war));\n return false;\n }*/\n else\n return true;\n }", "public boolean checkFields(){\n String message = \"\";\n if (firstName.getText().isEmpty()){\n message=\"First name is required\";\n }\n if (lastName.getText().isEmpty()){\n if (message.isEmpty())\n message = \"Last name is required\";\n else\n message = \"First name and Last name are required\";\n }\n if (birthday.getValue() == null){\n if (message.isEmpty())\n message = \"please select your birthday\";\n else if (firstName.getText().isEmpty()&& !lastName.getText().isEmpty())\n message = \"First name and birthday required\";\n else if (!firstName.getText().isEmpty() && lastName.getText().isEmpty())\n message = \"Last name and birthday required\";\n else\n message = \"all fields are required\";\n }\n errorDisplay.setText(message);\n return message.equals(\"\");\n }", "@Override\n\tpublic void validate()\n\t{\n\n\t}", "public void clearErrors() {\n\t\tnameCG.setClassName(\"control-group\");\n\t\tdescriptionCG.setClassName(\"control-group\");\n\t\tpriceCG.setClassName(\"control-group\");\n\n\t\tvalidationButton.setVisible(false);\n\t\tvalidationPanel.setVisible(false);\n\t}", "Form clearValidation();", "@Override\r\n\tprotected void validate() {\n\t}", "private boolean validateForm() {\n boolean valid = true;\n\n String email = inputEmailEt.getText().toString();\n if (TextUtils.isEmpty(email)) {\n inputEmailLayout.setErrorEnabled(true);\n inputEmailLayout.setError(getString(R.string.need_email));\n valid = false;\n } else {\n inputEmailLayout.setError(null);\n inputEmailLayout.setErrorEnabled(false);\n }\n\n String password = inputPassordEt.getText().toString();\n if (TextUtils.isEmpty(password)) {\n inputPasswordLayout.setErrorEnabled(true);\n inputPasswordLayout.setError(getString(R.string.need_password));\n valid = false;\n } else {\n inputPasswordLayout.setError(null);\n inputPasswordLayout.setErrorEnabled(false);\n }\n return valid;\n }", "private boolean validateInputs() {\n if (Constants.NULL.equals(review)) {\n reviewET.setError(\"Must type a review!\");\n reviewET.requestFocus();\n return false;\n }\n if (Constants.NULL.equals(heading)) {\n headingET.setError(\"Heading cannot be empty\");\n headingET.requestFocus();\n return false;\n }\n return true;\n }", "ValidationError getValidationError();", "private void submitForm() {\n if (!validateName()) {\n return;\n }\n\n if (!validateEmail()) {\n return;\n }\n\n if (!validatePassword()) {\n return;\n }\n\n// Toast.makeText(getApplicationContext(), \"Thank You!\", Toast.LENGTH_SHORT).show();\n}", "@Override\n\tpublic void validate() {\n\t\tSystem.out.println(user+\"//\"+password);\n\t\tif (user == null || user.trim().equals(\"\")) {\n\t\t\taddFieldError(\"user\", \"The user is required\");\n\t\t}\n\t\tif (password == null || password.trim().equals(\"\")) {\n\t\t\taddFieldError(\"password\", \"password is required\");\n\t\t}\n\t}", "public boolean validar() {\n if (foto==null){\n Toast.makeText(this, getResources().getString(R.string.error_f), Toast.LENGTH_SHORT).show();\n foto.requestFocus();\n return false;\n }\n\n if (txtID.getText().toString().isEmpty()) {\n txtID.setError(getResources().getString(R.string.error_ID));\n txtID.requestFocus();\n return false;\n }\n\n if (txtNombre.getText().toString().isEmpty()) {\n txtNombre.setError(getResources().getString(R.string.error_nombre));\n txtNombre.requestFocus();\n return false;\n }\n\n if (txtTipo.getText().toString().isEmpty()) {\n txtTipo.setError(getResources().getString(R.string.error_tipo));\n txtTipo.requestFocus();\n return false;\n }\n\n /*if (o1 == 0) {\n Toast.makeText(this, getResources().getString(R.string.error_cantidad), Toast.LENGTH_SHORT).show();\n cmbSexo.requestFocus();\n return false;\n }*/\n\n if (txtCantidad.getText().toString().isEmpty()) {\n txtCantidad.setError(getResources().getString(R.string.error_cantidad));\n txtCantidad.requestFocus();\n return false;\n }\n\n return true;\n\n }", "@After\n public static void renderValidationErrors() {\n if (validation.hasErrors()) {\n response.status = 400;\n Map<String, String> errorsMap = new HashMap();\n for (Error error : validation.errors()) {\n errorsMap.put(error.getKey(), Messages.get(error.message()));\n }\n renderJSON(errorsMap);\n }\n }", "public int ValidateAndGetSupplierFields()\n {\n int error = 0;\n \n if(txtSuplId.getText() == null || txtSuplId.getText().equals(\"\")) \n {\n saveSupl.setSupplId(Integer.valueOf(\"0\"));\n }else\n {\n saveSupl.setSupplId(Integer.valueOf(txtSuplId.getText())); //pk - not expected to be null!\n }\n \n if(!ValidateFields.validateStringCharTextField(txtSuplCode.getText())) \n {\n error++;\n txtSuplCode.requestFocus();\n txtSuplCode.setStyle(\"-fx-border-color: red;\");\n \n txtError.setText(ERR_SUPLIER_CODE);\n return error;\n }else\n {\n txtSuplCode.setStyle(\"-fx-border-color: transparent;\");\n txtError.setText(\"\");\n saveSupl.setSupplCode(txtSuplCode.getText()); //Save the value to supplier object\n }\n \n if(!ValidateFields.validateStringCharTextField(txtSuplContact.getText())) \n {\n error++;\n txtSuplContact.requestFocus();\n txtSuplContact.setStyle(\"-fx-border-color: red;\");\n \n txtError.setText(ERR_SUPLIER_CONTACT);\n return error;\n }else\n {\n txtSuplContact.setStyle(\"-fx-border-color: transparent;\");\n txtError.setText(\"\");\n saveSupl.setSuplContact(txtSuplContact.getText()); //Save the value to supplier object\n }\n \n \n if(!ValidateFields.validatePhoneNumberTextField(txtSuplTel.getText())) \n {\n error++;\n txtSuplTel.requestFocus();\n txtSuplTel.setStyle(\"-fx-border-color: red;\");\n \n txtError.setText(ERR_SUPLIER_TEL);\n return error;\n }else\n {\n txtSuplTel.setStyle(\"-fx-border-color: transparent;\");\n txtError.setText(\"\");\n saveSupl.setSuplTel(txtSuplTel.getText()); //save the value\n }\n \n if(!ValidateFields.validatePhoneNumberTextField(txtSuplCell.getText())) \n {\n error++;\n txtSuplCell.requestFocus();\n txtSuplCell.setStyle(\"-fx-border-color: red;\");\n \n txtError.setText(ERR_SUPLIER_TEL);\n return error;\n }else\n {\n txtSuplCell.setStyle(\"-fx-border-color: transparent;\");\n txtError.setText(\"\");\n saveSupl.setSuplCell(txtSuplCell.getText()); //save the value\n }\n \n if(!ValidateFields.validatePhoneNumberTextField(txtSuplFax.getText())) \n {\n error++;\n txtSuplFax.requestFocus();\n txtSuplFax.setStyle(\"-fx-border-color: red;\");\n \n txtError.setText(ERR_SUPLIER_FAX);\n return error;\n }else\n {\n txtSuplFax.setStyle(\"-fx-border-color: transparent;\");\n txtError.setText(\"\");\n saveSupl.setSuplFax(txtSuplFax.getText()); //save the value\n }\n \n if(!ValidateFields.validateEmailTextField(txtSuplEmail.getText())) \n {\n error++;\n txtSuplEmail.requestFocus();\n txtSuplEmail.setStyle(\"-fx-border-color: red;\");\n \n txtError.setText(ERR_SUPLIER_EMAIL);\n return error;\n }else\n {\n txtSuplEmail.setStyle(\"-fx-border-color: transparent;\");\n txtError.setText(\"\");\n saveSupl.setSuplEmail(txtSuplEmail.getText()); //save the value\n }\n \n if(!ValidateFields.validateStringCharTextField(txtSuplBank.getText())) \n {\n error++;\n txtSuplBank.requestFocus();\n txtSuplBank.setStyle(\"-fx-border-color: red;\");\n \n txtError.setText(ERR_SUPLIER_BANK);\n return error;\n }else\n {\n txtSuplBank.setStyle(\"-fx-border-color: transparent;\");\n txtError.setText(\"\");\n saveSupl.setSuplBank(txtSuplBank.getText()); //save the value\n }\n \n if(!ValidateFields.validateIntegerNumberTextField(txtSuplBranchCode.getText())) \n {\n error++;\n txtSuplBranchCode.requestFocus();\n txtSuplBranchCode.setStyle(\"-fx-border-color: red;\");\n \n txtError.setText(ERR_SUPLIER_BRANCH_CODE);\n return error;\n }else\n {\n txtSuplBranchCode.setStyle(\"-fx-border-color: transparent;\");\n txtError.setText(\"\");\n saveSupl.setSuplBranchCode(Integer.valueOf(txtSuplBranchCode.getText())); //save the value\n }\n \n if(!ValidateFields.validateIntegerNumberTextField(txtSuplAccNum.getText())) \n {\n error++;\n txtSuplAccNum.requestFocus();\n txtSuplAccNum.setStyle(\"-fx-border-color: red;\");\n \n txtError.setText(ERR_SUPLIER_ACC);\n return error;\n }else\n {\n txtSuplAccNum.setStyle(\"-fx-border-color: transparent;\");\n txtError.setText(\"\");\n saveSupl.setSuplAccNum(Integer.valueOf(txtSuplAccNum.getText())); //Save the value to supplier object\n }\n \n if(!ValidateFields.validateStringCharTextField(txtSuplAccType.getText())) \n {\n error++;\n txtSuplAccType.requestFocus();\n txtSuplAccType.setStyle(\"-fx-border-color: red;\");\n \n txtError.setText(ERR_SUPLIER_ACC_TYPE);\n return error;\n }else\n {\n txtSuplAccType.setStyle(\"-fx-border-color: transparent;\");\n txtError.setText(\"\");\n saveSupl.setSuplAccType(txtSuplAccType.getText()); //save the value\n }\n \n if(!ValidateFields.validateStringCharTextField(txtSuplComments.getText())) \n {\n error++;\n txtSuplComments.requestFocus();\n txtSuplComments.setStyle(\"-fx-border-color: red;\");\n \n txtError.setText(ERR_SUPLEMENT_DESC);\n return error;\n }else\n {\n txtSuplComments.setStyle(\"-fx-border-color: transparent;\");\n txtError.setText(\"\");\n saveSupl.setSuplComments(txtSuplComments.getText()); //save the value\n }\n \n return error;\n }", "private void validation() {\n Pattern pattern = validationfilterStringData();\n if (pattern.matcher(txtDrug.getText().trim()).matches() && pattern.matcher(txtGenericName.getText().trim()).matches()) {\n try {\n TblTreatmentadvise treatmentadvise = new TblTreatmentadvise();\n treatmentadvise.setDrugname(txtDrug.getText());\n treatmentadvise.setGenericname(txtGenericName.getText());\n treatmentadvise.setTiming(cmbDosestiming.getSelectedItem().toString());\n cmbtiming.setSelectedItem(cmbDosestiming);\n treatmentadvise.setDoses(loadcomboDoses());\n treatmentadvise.setDuration(loadcomboDuration());\n PatientService.saveEntity(treatmentadvise);\n JOptionPane.showMessageDialog(this, \"SAVE SUCCESSFULLY\");\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(this, \"STARTUP THE DATABASE CONNECTION\");\n }\n } else {\n JOptionPane.showMessageDialog(this, \"WRONG DATA ENTERED.\");\n }\n }", "private boolean checkInputFields(){\r\n\t\tString allertMsg = \"Invalid input: \" + System.getProperty(\"line.separator\");\r\n\t\t\r\n\t\t//Check input for MCS text field\r\n\t\ttry{\r\n\t\t\tFloat testValue = Float.parseFloat(m_MCSTf.getText());\r\n\t\t\tif(testValue < 0 || testValue > 1)\r\n\t\t\t\tthrow new NumberFormatException();\r\n\t\t}catch (NumberFormatException e){\r\n\t\t\tallertMsg += \"Please enter a number between 0 and 1 as a MCS score.\" + System.getProperty(\"line.separator\");\r\n\t\t}\r\n\t\t//Check input for relevance score weight and coherence score weight text fields\r\n\t\ttry{\r\n\t\t\tFloat relScoreW = Float.parseFloat(m_RelScoreTf.getText());\r\n\t\t\tFloat cohScoreW = Float.parseFloat(m_CohScoreTf.getText());\r\n\t\t\tif(relScoreW < 0 || relScoreW > 1)\r\n\t\t\t\tthrow new NumberFormatException();\r\n\t\t\tif(cohScoreW < 0 || cohScoreW > 1)\r\n\t\t\t\tthrow new NumberFormatException();\r\n\t\t\tif((relScoreW + cohScoreW) != 1)\r\n\t\t\t\tthrow new NumberFormatException();\r\n\t\t}catch (NumberFormatException e){\r\n\t\t\tallertMsg += \"Please enter a number between 0 and 1 as a weight for relevance and coherence score.\" + System.getProperty(\"line.separator\");\r\n\t\t\tallertMsg += \"Sum of the weights for relevance and coherence score must be 1.\" + System.getProperty(\"line.separator\");\r\n\t\t}\r\n\t\t//Check input for MCS text field\r\n\t\ttry{\r\n\t\t\tFloat testValue = Float.parseFloat(m_KeyTf.getText());\r\n\t\t\tif(testValue < 0)\r\n\t\t\t\tthrow new NumberFormatException();\r\n\t\t}catch (NumberFormatException e){\r\n\t\t\tallertMsg += \"Please enter a positive number as multiplier for keyword concepts.\" + System.getProperty(\"line.separator\");\r\n\t\t}\r\n\t\t//Check input for category confidence weight\r\n\t\ttry{\r\n\t\t\tFloat testValue = Float.parseFloat(m_CatConfTf.getText());\r\n\t\t\tif(testValue < 0)\r\n\t\t\t\tthrow new NumberFormatException();\r\n\t\t}catch (NumberFormatException e){\r\n\t\t\tallertMsg += \"Please enter a positive number as a weight for the weight of the category confidence of concepts.\" + System.getProperty(\"line.separator\");\r\n\t\t}\r\n\t\t//Check input for weight of repeated concepts\r\n\t\ttry{\r\n\t\t\tFloat testValue = Float.parseFloat(m_RepeatTf.getText());\r\n\t\t\tif(testValue < 0)\r\n\t\t\t\tthrow new NumberFormatException();\r\n\t\t}catch (NumberFormatException e){\r\n\t\t\tallertMsg += \"Please enter a positive number as a weight for repeated concepts.\" + System.getProperty(\"line.separator\");\r\n\t\t}\r\n\t\t//Check input for number of output categories\r\n\t\ttry{\r\n\t\t\tInteger testValue = Integer.parseInt(m_MaxCatsTf.getText());\r\n\t\t\tif(testValue < 1)\r\n\t\t\t\tthrow new NumberFormatException();\r\n\t\t}catch (NumberFormatException e){\r\n\t\t\tallertMsg += \"Please enter a positive number for the maximum number of output categories.\" + System.getProperty(\"line.separator\");\r\n\t\t}\r\n\t\ttry{\r\n\t\t\tInteger testValue = Integer.parseInt(m_MinCatsTf.getText());\r\n\t\t\tif(testValue < 1)\r\n\t\t\t\tthrow new NumberFormatException();\r\n\t\t}catch (NumberFormatException e){\r\n\t\t\tallertMsg += \"Please enter a positive number for the minimum number of output categories.\" + System.getProperty(\"line.separator\");\r\n\t\t}\r\n\t\ttry{\r\n\t\t\tFloat testValue = Float.parseFloat(m_MinCatScoreTf.getText());\r\n\t\t\tif(testValue < 0.0f || testValue > 1.0f)\r\n\t\t\t\tthrow new NumberFormatException();\r\n\t\t}catch (NumberFormatException e){\r\n\t\t\tallertMsg += \"Please enter a positive number between 0 and 1 as minimum category score.\" + System.getProperty(\"line.separator\");\r\n\t\t}\r\n\t\tif(allertMsg.length() > 18){\r\n\t\t\tAlert alert = new Alert(AlertType.ERROR);\r\n\t\t\talert.setContentText(allertMsg);\r\n\t\t\talert.showAndWait();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public static void startValidation() {\n errList = new ArrayList<>();\n }", "private boolean validateForm() {\n Boolean validFlag = true;\n String email = emailTxt.getText().toString().trim();\n String name = nameTxt.getText().toString().trim();\n String phone = phoneTxt.getText().toString().trim();\n String password = passwordTxt.getText().toString();\n String confirPassWord = confirmPasswordTxt.getText().toString();\n\n Pattern emailP = Pattern.compile(\"^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\\\.[A-Z]{2,6}$\", Pattern.CASE_INSENSITIVE);\n Matcher emailM = emailP.matcher(email);\n boolean emailB = emailM.find();\n\n if (TextUtils.isEmpty(email) || email.equals(\"\") || !emailB) {\n emailTxt.setError(\"Email bị để trống hoặc không dúng định dạng.\");\n validFlag = false;\n } else {\n emailTxt.setError(null);\n }\n\n if (TextUtils.isEmpty(password) || password.length() < 6) {\n passwordTxt.setError(\"Mật khẩu phải 6 ký tự trở lên\");\n validFlag = false;\n } else {\n passwordTxt.setError(null);\n }\n\n Pattern phoneP = Pattern.compile(\"[0-9]{8,15}$\");\n Matcher phoneM = phoneP.matcher(phone);\n boolean phoneB = phoneM.find();\n\n if (TextUtils.isEmpty(phone) || phone.length() < 8 || phone.length() > 15 || !phoneB) {\n phoneTxt.setError(\"Số điện thoại bị để trống hoặc không đúng định dạng\");\n validFlag = false;\n } else {\n phoneTxt.setError(null);\n }\n if (confirPassWord.length() < 6 || !confirPassWord.equals(password)) {\n confirmPasswordTxt.setError(\"Xác nhận mật khẩu không đúng\");\n validFlag = false;\n } else {\n confirmPasswordTxt.setError(null);\n }\n\n Pattern p = Pattern.compile(\"[0-9]\", Pattern.CASE_INSENSITIVE);\n Matcher m = p.matcher(name);\n boolean b = m.find();\n if (b) {\n nameTxt.setError(\"Tên tồn tại ký tự đặc biệt\");\n validFlag = false;\n } else {\n nameTxt.setError(null);\n }\n if (TextUtils.isEmpty(name)) {\n nameTxt.setError(\"Không được để trống tên.\");\n validFlag = false;\n } else {\n nameTxt.setError(null);\n }\n\n return validFlag;\n }", "protected boolean validateForm() {\r\n PerformanceTrace performanceTrace = new PerformanceTrace(TRACE_TAG, \".validateForm()\");\r\n performanceTrace.enterScope();\r\n\r\n HttpServletRequest request = super.getRequest();\r\n BaseSessionStateManager state = super.getState();\r\n boolean isValid = true;\r\n\r\n FamilyPlanValueBean familyPlanBeanFromState = (FamilyPlanValueBean) state.getAttribute(\"familyPlanBean\", request);\r\n FamilyPlanValueBean familyPlanBeanFromRequest = FamilyPlanConversation.createFamilyPlanValueBean(request);\r\n\r\n // *******************************\r\n // *** SAVE OR SAVE AND SUBMIT ***\r\n // *******************************\r\n if (super.isButtonPressed(FamilyPlanConversation.SAVE_BUTTON_ON_DETAIL_PAGE)\r\n || super.isButtonPressed(FamilyPlanConversation.SAVE_SUBMIT_BUTTON)) {\r\n familyPlanBeanFromRequest.setFamilyPlanEvent(familyPlanBeanFromState.getFamilyPlanEvent());\r\n\r\n // At least one principal must be selected.\r\n String[] checkedPrincipals = CheckboxHelper.getCheckedValues(request, \"cbxPrincipalsOnPlan\");\r\n if (checkedPrincipals.length <= 0) {\r\n isValid = false;\r\n setErrorMessage(Messages.MSG_SVC_NEED_PRINCIPALS);\r\n }\r\n // Page can't be populated if there are more than 100 principals in the stage\r\n if (checkedPrincipals.length > 100) {\r\n isValid = false;\r\n setErrorMessage(Messages.MSG_SVC_LISTBOX_FULL);\r\n }\r\n\r\n // The 'Date Plan Prepared' date cannot be after today.\r\n if (familyPlanBeanFromRequest.getDatePlanPrepared() != null) {\r\n if (DateHelper.isAfterToday(familyPlanBeanFromRequest.getDatePlanPrepared())) {\r\n isValid = false;\r\n setErrorMessage(\"txtDatePlanPrepared\", Messages.MSG_FP_DATE_BEFORE_SAME_CURR);\r\n }\r\n }\r\n // The 'Date Plan Completed' date cannot be after today.\r\n if (familyPlanBeanFromRequest.getDatePlanCompleted() != null) {\r\n if (DateHelper.isAfterToday(familyPlanBeanFromRequest.getDatePlanCompleted())) {\r\n isValid = false;\r\n setErrorMessage(\"txtDatePlanCompleted\", Messages.MSG_FP_DATE_BEFORE_SAME_CURR);\r\n }\r\n }\r\n // The 'DateCurrentEvalCompleted' date cannot be after today.\r\n if (familyPlanBeanFromRequest.getDateCurrentEvalCompleted() != null) {\r\n if (DateHelper.isAfterToday(familyPlanBeanFromRequest.getDateCurrentEvalCompleted())) {\r\n isValid = false;\r\n setErrorMessage(\"txtDateReviewedWithFamily\", Messages.MSG_FP_DATE_BEFORE_SAME_CURR);\r\n }\r\n }\r\n\r\n // 'Next Review Due' date cannot be before the 'Date Plan Completed'.\r\n if (familyPlanBeanFromRequest.getDatePlanPrepared() != null\r\n && familyPlanBeanFromRequest.getDateNextEvalDue() != null) {\r\n if (DateHelper.isBefore(familyPlanBeanFromRequest.getDateNextEvalDue(),\r\n familyPlanBeanFromRequest.getDatePlanPrepared())) {\r\n isValid = false;\r\n setErrorMessage(Messages.MSG_SVC_REVIEW_BEF_COMP_WARN);\r\n }\r\n }\r\n\r\n // If the family plan has never been appproved, the 'Next Review Due' date\r\n // cannot be more than 3 months beyond the 'Date Plan Completed' for an\r\n // FPR or FRE stage, or more than 6 months for an FSU stage. If the family\r\n // plan has already been approved, the 'Next Review Due' date cannot be\r\n // more than 3 months beyond the 'Current Eval Completed' date for an FPR\r\n // or FRE stage, or more than 6 months for an FSU stage.\r\n if (!CodesTables.CEVTSTAT_APRV.equals(familyPlanBeanFromRequest.getFamilyPlanEvent().getEventStatusCode())) {\r\n if (familyPlanBeanFromRequest.getDatePlanPrepared() != null\r\n && familyPlanBeanFromRequest.getDateNextEvalDue() != null) {\r\n org.exolab.castor.types.Date datePlanComp = familyPlanBeanFromRequest.getDatePlanPrepared();\r\n org.exolab.castor.types.Date nextEvalDue = familyPlanBeanFromRequest.getDateNextEvalDue();\r\n\r\n // Get the number of days/months between the 'Date Plan Completed'\r\n // and 'Next Review Due' date. (The Vector returned by the\r\n // getDatesInRange() method includes the 'Date Plan Completed', so\r\n // subtract 1 from the total size.)\r\n gov.georgia.dhr.dfcs.sacwis.core.utility.Date datePlanCompAsImpactUtilDate = new gov.georgia.dhr.dfcs.sacwis.core.utility.Date(\r\n datePlanComp\r\n .getDay(),\r\n datePlanComp\r\n .getMonth(),\r\n datePlanComp\r\n .getCentury()\r\n * 100\r\n + datePlanComp\r\n .getYear());\r\n gov.georgia.dhr.dfcs.sacwis.core.utility.Date nextReviewDueAsImpactUtilDate = new gov.georgia.dhr.dfcs.sacwis.core.utility.Date(\r\n nextEvalDue\r\n .getDay(),\r\n nextEvalDue\r\n .getMonth(),\r\n nextEvalDue\r\n .getCentury()\r\n * 100\r\n + nextEvalDue\r\n .getYear());\r\n int numOfMonthsInRange = DateUtility.getDatesInRange(datePlanCompAsImpactUtilDate,\r\n nextReviewDueAsImpactUtilDate, DateUtility.MONTH, 1)\r\n .size() - 1;\r\n\r\n if (numOfMonthsInRange > 3) {\r\n isValid = false;\r\n setErrorMessage(Messages.MSG_FP_REV_WITHIN_THREE_MONTHS);\r\n\r\n }\r\n } // end if ( familyPlanBean.getDatePlanPrepared() != null && familyPlanBean.getDateNextEvalDue() != null )\r\n } else {\r\n if (familyPlanBeanFromRequest.getDateCurrentEvalCompleted() != null\r\n && familyPlanBeanFromRequest.getDateNextEvalDue() != null) {\r\n org.exolab.castor.types.Date currEvalComp = familyPlanBeanFromRequest.getDateCurrentEvalCompleted();\r\n org.exolab.castor.types.Date nextEvalDue = familyPlanBeanFromRequest.getDateNextEvalDue();\r\n\r\n // Get the number of days/months between the 'Current Review\r\n // Completed' and 'Next Review Due' date. (The Vector returned by the\r\n // getDatesInRange() method includes the 'Current Review Completed'\r\n // date, so subtract 1 from the total size.)\r\n gov.georgia.dhr.dfcs.sacwis.core.utility.Date currEvalCompAsImpactUtilDate = new gov.georgia.dhr.dfcs.sacwis.core.utility.Date(\r\n currEvalComp\r\n .getDay(),\r\n currEvalComp\r\n .getMonth(),\r\n currEvalComp\r\n .getCentury()\r\n * 100\r\n + currEvalComp\r\n .getYear());\r\n gov.georgia.dhr.dfcs.sacwis.core.utility.Date nextReviewDueAsImpactUtilDate = new gov.georgia.dhr.dfcs.sacwis.core.utility.Date(\r\n nextEvalDue\r\n .getDay(),\r\n nextEvalDue\r\n .getMonth(),\r\n nextEvalDue\r\n .getCentury()\r\n * 100\r\n + nextEvalDue\r\n .getYear());\r\n int numOfMonthsInRange = DateUtility.getDatesInRange(currEvalCompAsImpactUtilDate,\r\n nextReviewDueAsImpactUtilDate, DateUtility.MONTH, 1)\r\n .size() - 1;\r\n\r\n if (numOfMonthsInRange > 3) {\r\n isValid = false;\r\n setErrorMessage(Messages.MSG_FP_REV_WITHIN_THREE_MONTHS);\r\n }\r\n\r\n } // end if ( familyPlanBean.getDatePlanPrepared() != null && familyPlanBean.getDateNextEvalDue() != null )\r\n } // end if ( familyPlanBean.getFamilyPlanEvent().getApprovalDate() == null )\r\n }\r\n\r\n // ***********************\r\n // *** SAVE AND SUBMIT ***\r\n // ***********************\r\n if (super.isButtonPressed(FamilyPlanConversation.SAVE_SUBMIT_BUTTON)) {\r\n // 'Date Plan Prepared' is required to save and submit.\r\n if (familyPlanBeanFromRequest.getDatePlanPrepared() == null) {\r\n isValid = false;\r\n setErrorMessage(Messages.MSG_SVC_CMPLTD_NOT_FLLD);\r\n }\r\n\r\n // 'Next Review Due' is required to save and submit.\r\n if (familyPlanBeanFromRequest.getDateNextEvalDue() == null) {\r\n isValid = false;\r\n setErrorMessage(Messages.MSG_SVC_NXT_REV_NOT_FLLD);\r\n }\r\n\r\n // 'Date Reviewed with Familiy' is required to save and submit.\r\n if (familyPlanBeanFromRequest.getDateCurrentEvalCompleted() == null) {\r\n isValid = false;\r\n setErrorMessage(Messages.MSG_SVC_FAM_REV_NOT_FLLD);\r\n }\r\n\r\n // 'Reason for CPS Involvement' is required to save and submit.\r\n if (familyPlanBeanFromRequest.getReasonForCPSInvolvement() == null) {\r\n isValid = false;\r\n setErrorMessage(\"txtReasonForInvolvement\", Messages.SSM_COMPLETE_REQUIRED_SAVE_SUBMIT);\r\n }\r\n\r\n // 'Description of Family Strengths and Resources' is required to save\r\n // and submit.\r\n if (familyPlanBeanFromRequest.getStrengthsAndResources() == null) {\r\n isValid = false;\r\n setErrorMessage(\"txtStrengthsResources\", Messages.SSM_COMPLETE_REQUIRED_SAVE_SUBMIT);\r\n }\r\n if (familyPlanBeanFromState.getRiskAssessmentEventId() > 0) {\r\n CaseUtility.Event riskAssmtEvent = CaseUtility.getEvent(familyPlanBeanFromState.getRiskAssessmentEventId());\r\n if (riskAssmtEvent != null\r\n && !(CodesTables.CEVTSTAT_APRV.equals(riskAssmtEvent.getCdEventStatus())\r\n || CodesTables.CEVTSTAT_COMP.equals(riskAssmtEvent.getCdEventStatus()))) {\r\n isValid = false;\r\n setErrorMessage(Messages.MSG_RISK_AS_REQ);\r\n }\r\n\r\n }\r\n\r\n // Item must have Current Level of Concern if it was imported from the\r\n // Risk Assessment.\r\n // (The family plan bean from state must be used for this validation\r\n // because the family plan bean created from the request does not contain\r\n // items data.)\r\n List familyPlanItemsVector = (List) familyPlanBeanFromState.getFamilyPlanItemList();\r\n Iterator itemsIter = familyPlanItemsVector.iterator();\r\n while (itemsIter.hasNext()) {\r\n FamilyPlanItemValueBean itemBean = (FamilyPlanItemValueBean) itemsIter.next();\r\n\r\n if (itemBean.isIdentifiedInRiskAssessment() && itemBean.getCurrentLevelOfConcernScale() == null) {\r\n isValid = false;\r\n setErrorMessage(Messages.MSG_FP_AREA_NEEDS_CURRENT_LOC);\r\n break;\r\n }\r\n } // end while ( itemsIter.hasNext() )\r\n\r\n // Item must have at least one task/service that is not completed if:\r\n // 1. Current Level of Concern is 'Somewhat' or greater, or\r\n // 2. Current Level of Concern is blank, and Initial Level of Concern\r\n // is 'Somewhat' or greater.\r\n // (The family plan bean from state must be used for this validation\r\n // because the family plan bean created from the request does not contain\r\n // items data.)\r\n itemsIter = familyPlanItemsVector.iterator();\r\n while (itemsIter.hasNext()) {\r\n FamilyPlanItemValueBean itemBean = (FamilyPlanItemValueBean) itemsIter.next();\r\n\r\n if (CodesTables.CRISKSOC_3.equals(itemBean.getCurrentLevelOfConcernScale())\r\n || CodesTables.CRISKSOC_4.equals(itemBean.getCurrentLevelOfConcernScale())\r\n || CodesTables.CRISKSOC_5.equals(itemBean.getCurrentLevelOfConcernScale())\r\n || (itemBean.getCurrentLevelOfConcernScale() == null && (CodesTables.CRISKSOC_3\r\n .equals(itemBean\r\n .getInitialLevelOfConcernScale())\r\n || CodesTables.CRISKSOC_4\r\n .equals(itemBean\r\n .getInitialLevelOfConcernScale()) || CodesTables.CRISKSOC_5\r\n .equals(itemBean\r\n .getInitialLevelOfConcernScale())))) {\r\n List tasksVector = (List) itemBean.getTasks();\r\n\r\n // If the tasksVector is empty, this item definitely has no\r\n // uncompleted tasks. Set the error message, and break out of the\r\n // while loop. Otherwise, loop through the tasks, and check for an\r\n // uncompleted one.\r\n if (tasksVector == null) {\r\n isValid = false;\r\n String errorMessage = \"<a href='#\" + itemBean.getAreaOfConcernCode() + \"'>\"\r\n + itemBean.getAreaOfConcernText() + \"</a> - \"\r\n + MessageLookup.getMessageByNumber(Messages.MSG_SVC_NEED_PGTS);\r\n setErrorMessage(errorMessage);\r\n } else {\r\n boolean hasUncompletedTask = false;\r\n Iterator tasksIter = tasksVector.iterator();\r\n while (tasksIter.hasNext()) {\r\n FamilyPlanTaskValueBean taskBean = (FamilyPlanTaskValueBean) tasksIter.next();\r\n if (taskBean.getDateTaskCompleted() == null) {\r\n hasUncompletedTask = true;\r\n break;\r\n }\r\n } // end while ( iter.hasNext() )\r\n\r\n // If this item has no uncompleted tasks, set the error message, and\r\n // break out of the while loop.\r\n if (!hasUncompletedTask) {\r\n isValid = false;\r\n String errorMessage = \"<a href='#\" + itemBean.getAreaOfConcernCode() + \"'>\"\r\n + itemBean.getAreaOfConcernText() + \"</a> - \"\r\n + MessageLookup.getMessageByNumber(Messages.MSG_SVC_NEED_PGTS);\r\n setErrorMessage(errorMessage);\r\n } // end if( !hasUncompletedTask )\r\n } // end if( tasksVector == null )\r\n } // end if( CodesTables.CRISKSOC_3.equals( itemBean.getCurrentLevelOfConcernScale() ) ||...\r\n } // end while ( itemsIter.hasNext() )\r\n\r\n // To save and submit an evaluation...\r\n String taskCode = GlobalData.getSzCdTask(request);\r\n if (taskCode.equals(FamilyPlanValueBean.CD_TASK_FPR_FAM_PLAN_EVAL)\r\n || taskCode.equals(FamilyPlanValueBean.CD_TASK_FRE_FAM_PLAN_EVAL)\r\n || taskCode.equals(FamilyPlanValueBean.CD_TASK_FSU_FAM_PLAN_EVAL)) {\r\n // 'Current Review Completed' is required.\r\n if (familyPlanBeanFromRequest.getDateCurrentEvalCompleted() == null) {\r\n isValid = false;\r\n setErrorMessage(\"txtDateReviewedWithFamily\", Messages.SSM_COMPLETE_REQUIRED_SAVE_SUBMIT);\r\n }\r\n\r\n // Each Area of Concern that was addressed prior to the most recent\r\n // approval date (meaning it has been reviewed and approved by a supervisor)\r\n // must have a Current Level of Concern. Also, if the Current Level of\r\n // Concern is 'Somewhat' or greater, it must have been evaluated during\r\n // this evaluation.\r\n Date mostRecentApprovalDate = FamilyPlanConversation.getMostRecentApprovalDate(familyPlanBeanFromState);\r\n itemsIter = familyPlanItemsVector.iterator();\r\n while (itemsIter.hasNext()) {\r\n FamilyPlanItemValueBean itemBean = (FamilyPlanItemValueBean) itemsIter.next();\r\n\r\n if (itemBean.getDateInitiallyAddressed() != null && mostRecentApprovalDate != null\r\n && itemBean.getDateInitiallyAddressed().before(mostRecentApprovalDate)) {\r\n if (itemBean.getCurrentLevelOfConcernScale() == null) {\r\n isValid = false;\r\n String errorMessage = \"<a href='#\" + itemBean.getAreaOfConcernCode() + \"'>\"\r\n + itemBean.getAreaOfConcernText()\r\n + \"</a> - Please enter a 'Current Level of Concern' for this Area of Concern.\";\r\n setErrorMessage(errorMessage);\r\n } else if (CodesTables.CRISKSOC_3.equals(itemBean.getCurrentLevelOfConcernScale())\r\n || CodesTables.CRISKSOC_4.equals(itemBean.getCurrentLevelOfConcernScale())\r\n || CodesTables.CRISKSOC_5.equals(itemBean.getCurrentLevelOfConcernScale())) {\r\n // If there are no eval items, obviously this Area of Concern has\r\n // not been evaluated for this evaluation. Set the error message for\r\n // this Area of Concern.\r\n if (itemBean.getEvalItems() == null) {\r\n isValid = false;\r\n String errorMessage = \"<a href='#\" + itemBean.getAreaOfConcernCode() + \"'>\"\r\n + itemBean.getAreaOfConcernText()\r\n + \"</a> - Please enter an evaluation for this Area of Concern.\";\r\n setErrorMessage(errorMessage);\r\n } else {\r\n // If the most recent eval item does not belong to the current\r\n // evaluation, then an eval item has not been entered for this\r\n // evaluation. Set the error message for this Area of Concern.\r\n FamilyPlanEvalItemValueBean mostRecentEvalItem = null;\r\n mostRecentEvalItem = (FamilyPlanEvalItemValueBean) itemBean.getEvalItems().iterator().next();\r\n if (mostRecentEvalItem.getFamilyPlanEvalEventId() != GlobalData.getUlIdEvent(request)) {\r\n isValid = false;\r\n String errorMessage = \"<a href='#\" + itemBean.getAreaOfConcernCode() + \"'>\"\r\n + itemBean.getAreaOfConcernText()\r\n + \"</a> - Please enter an evaluation for this Area of Concern.\";\r\n setErrorMessage(errorMessage);\r\n }\r\n } // end if( itemBean.getEvalItems() == null )\r\n } // end else if( CodesTables.CRISKSOC_3.equals( itemBean.getCurrentLevelOfConcernScale() ) ||...\r\n } // end if( itemBean.getDateInitiallyAddressed() != null &&...\r\n } // end while( itemsIter.hasNext() )\r\n } // end if ( taskCode.equals( FamilyPlanValueBean.CD_TASK_FPR_FAM_PLAN_EVAL ) ||...\r\n } // end if ( super.isButtonPressed( FamilyPlanConversation.SAVE_SUBMIT_BUTTON ) )\r\n\r\n // **********************************\r\n // *** SAVE (ON ITEM DETAIL PAGE) ***\r\n // **********************************\r\n if (super.isButtonPressed(FamilyPlanConversation.SAVE_BUTTON_ON_ITEM_PAGE)) {\r\n FamilyPlanItemValueBean familyPlanItemBean = FamilyPlanConversation.createFamilyPlanItemValueBean(request);\r\n List tasksVector = (List) familyPlanItemBean.getTasks();\r\n\r\n // 'Task Created' is required for each Task/Service that has a value.\r\n int loopCounter = 0;\r\n Iterator iter = tasksVector.iterator();\r\n while (iter.hasNext()) {\r\n FamilyPlanTaskValueBean taskBean = (FamilyPlanTaskValueBean) iter.next();\r\n if (taskBean.getTask() != null && taskBean.getDateTaskCreated() == null) {\r\n isValid = false;\r\n String fieldName = \"txtDateCreated\" + loopCounter;\r\n setErrorMessage(fieldName, Messages.SSM_COMPLETE_REQUIRED);\r\n }\r\n if(taskBean.getTask() != null && taskBean.isCourtMandatedClosure() && taskBean.getDateCourtAction()== null){\r\n isValid = false;\r\n String fieldName = \"cbxCourtOrdered\" + loopCounter;\r\n setErrorMessage(fieldName, Messages.MSG_DT_CRT_ACTION_REQ); \r\n }\r\n if(familyPlanItemBean.getDateGoalsCompleted()!=null && (taskBean.getDateTaskCompleted()==null && (taskBean.isCourtMandatedClosure() && taskBean.getDateCourtAction()!= null))){\r\n isValid = false;\r\n String fieldName = \"txtDateCompleted\" + loopCounter;\r\n setErrorMessage(\r\n fieldName,\r\n Messages.MSG_DT_TSK_COMP_REQ); \r\n }\r\n loopCounter++;\r\n } // end while ( iter.hasNext() )\r\n } // end if ( super.isButtonPressed( FamilyPlanConversation.SAVE_BUTTON_ON_ITEM_PAGE ) )\r\n\r\n // ********************************************\r\n // *** USED FOR 'FAMILY PLAN SELECTOR' PAGE ***\r\n // ********************************************\r\n // If the user selected a family plan to be evaluated, check that the family\r\n // plan has no unapproved evaluations.\r\n int selectedFamilyPlanEventId = ContextHelper.getIntSafe(request, \"selectedFamilyPlanEventId\");\r\n if (selectedFamilyPlanEventId > 0) {\r\n // Find the family plan the user selected.\r\n ArrayList approvedFamilyPlans = (ArrayList) state.getAttribute(\"approvedFamilyPlans\", request);\r\n Iterator iter = approvedFamilyPlans.iterator();\r\n while (iter.hasNext()) {\r\n FamilyPlanValueBean familyPlanBean = (FamilyPlanValueBean) iter.next();\r\n if (familyPlanBean.getFamilyPlanEvent().getEventId() == selectedFamilyPlanEventId) {\r\n // Now check the family plan for any unapproved evaluations.\r\n if (familyPlanBean.getFamilyPlanEvaluations() != null) {\r\n ArrayList familyPlanEvaluations = (ArrayList) familyPlanBean.getFamilyPlanEvaluations();\r\n Iterator iter2 = familyPlanEvaluations.iterator();\r\n while (iter2.hasNext()) {\r\n // If the evaluation is unapproved, notify the user that they cannot\r\n // create a new evaluation yet.\r\n FamilyPlanEvalValueBean familyPlanEval = (FamilyPlanEvalValueBean) iter2.next();\r\n if (!CodesTables.CEVTSTAT_APRV.equals(familyPlanEval.getEvalEvent().getEventStatusCode())) {\r\n isValid = false;\r\n setErrorMessage(Messages.MSG_FP_PLAN_HAS_PROC_EVAL);\r\n break;\r\n }\r\n } // end while( iter2.hasNext() )\r\n } // end if ( familyPlanBean.getFamilyPlanEvaluations() != null )\r\n } // end if( familyPlanBean.getFamilyPlanEvent().getEventId() == selectedFamilyPlanEventId )\r\n } // end while( iter.hasNext() )\r\n } // end if( selectedFamilyPlanEventId > 0 )\r\n\r\n performanceTrace.getTotalTime();\r\n performanceTrace.exitScope();\r\n\r\n return isValid;\r\n }", "@Override\n\tpublic void validate() {\n\t}", "private void checkValidation() {\n String getInstituteName = NameofInstitute.getText().toString();\n String getDegreename = SpinnerDegree.getSelectedItem().toString();\n\n\n // Check if all strings are null or not\n if (getInstituteName.equals(\"\") || getInstituteName.length() == 0 || getDegreename.equals(\"\") || getDegreename.length() == 0)\n new CustomToast().Show_Toast(getActivity(), getView(),\"All fields are required.\");\n // Else do signup or do your stuff\n else {\n //Toast.makeText(getActivity(), \"All Ok till Now\", Toast.LENGTH_SHORT).show();\n AddQualifications(getDegreename,getInstituteName);\n }\n\n }", "@Override\n protected Result validate() {\n return successful(this);\n }", "private boolean isInputValid() {\r\n String errorMessage = \"\";\r\n\r\n if (errorMessage.length() == 0) {\r\n return true;\r\n } else {\r\n// Show the error message.\r\n Dialogs.create()\r\n .title(\"Invalid Fields\")\r\n .masthead(\"Please correct invalid fields\")\r\n .message(errorMessage)\r\n .showError();\r\n return false;\r\n }\r\n }", "private void wizardChanged() {\r\n\t\t\r\n\t\tboolean valid = true;\r\n\t\t\r\n\t\t// The project name can't be empty\r\n\t\tif (nameText.getText().length() == 0) {\r\n\t\t\tupdateStatus(BundleInternationalization.getString(\"ErrorMessage.NameEmpty\"));\r\n\t\t\tvalid = false;\r\n\t\t}\r\n\t\t\t\t\r\n\t\t// The project description can't be empty\r\n\t\tif (valid && descriptionText.getText().length() == 0) {\r\n\t\t\tupdateStatus(BundleInternationalization.getString(\"ErrorMessage.DescriptionEmpty\"));\r\n\t\t\tvalid = false;\r\n\t\t}\r\n\t\t\r\n\t\t// TODO: validar que la fecha de inicio sea anterior a la de final\r\n\t\t\t\t\r\n\t\t// The project budget can't be empty\r\n\t\tif (valid && budgetText.getText().length() == 0) {\r\n\t\t\tupdateStatus(BundleInternationalization.getString(\"ErrorMessage.BudgetEmpty\"));\r\n\t\t\tvalid = false;\r\n\t\t}\r\n\t\t\r\n\t\t// The quantity of lines of the project can't be empty\r\n\t\tif (valid && quantityLinesText.getText().length() == 0) {\r\n\t\t\tupdateStatus(BundleInternationalization.getString(\"ErrorMessage.NumberCodeLinesEmpty\"));\r\n\t\t\tvalid = false;\r\n\t\t}\r\n\t\t\r\n\t\t// The project domain of the project can't be empty\r\n\t\tif (valid && domainText.getText().length() == 0) {\r\n\t\t\tupdateStatus(BundleInternationalization.getString(\"ErrorMessage.DomainEmpty\"));\r\n\t\t\tvalid = false;\r\n\t\t}\r\n\t\t\r\n\t\tif (valid && progLanguageCombo.getSelectionIndex()==-1) {\r\n\t\t\tupdateStatus(BundleInternationalization.getString(\"ErrorMessage.ProgrammingLanguageNotSelected\"));\r\n\t\t\tvalid = false;\r\n\t\t}\r\n\t\t\r\n\t\tif (valid && estimatedHoursText.getText().length() == 0) {\r\n\t\t\tupdateStatus(BundleInternationalization.getString(\"ErrorMessage.EstimatedHoursEmpty\"));\r\n\t\t\tvalid = false;\r\n\t\t}\r\n\t\t\r\n\t\tif (valid) \r\n\t\t\tupdateStatus(null);\r\n\t\t\r\n\t}", "@Override\r\n public void validate() {\r\n }", "private ValidationError() {\n }", "@Override\n public void customValidation() {\n }", "@Override\n public void customValidation() {\n }", "@Override\n public void customValidation() {\n }", "public void validateInputs(ActionEvent actionEvent) {\n //retrieve the inputs\n try {\n productNameInput = productNameField.getText();\n if (productNameInput.equals(\"\")) {\n throw new myExceptions(\"Product Name: Enter a string.\\n\");\n }\n }\n catch (myExceptions ex) {\n errorMessageContainer += ex.getMessage();\n isInputValid = false;\n }\n\n try {\n productPriceInput = Double.parseDouble(productPriceField.getText());\n if (productPriceField.getText().equals(\"\")) {\n throw new myExceptions(\"Price field: enter a value..\\n\");\n }\n if (productPriceInput <= 0) {\n throw new myExceptions(\"Price field: enter a value greater than 0.\\n\");\n }\n }\n catch (myExceptions priceValidation) {\n errorMessageContainer += priceValidation.getMessage();\n isInputValid = false;\n\n }\n catch (NumberFormatException ex) {\n errorMessageContainer += \"Price field: enter a positive number. Your input can contain decimals. \\n\";\n isInputValid = false;\n\n }\n\n try {\n maxInventoryLevelInput = Integer.parseInt(maxInventoryField.getText());\n minInventoryLevelInput = Integer.parseInt(minInventoryField.getText());\n if (maxInventoryField.getText().equals(\"\") || minInventoryField.getText().equals(\"\") || maxInventoryLevelInput <= 0 || minInventoryLevelInput <= 0) {\n throw new myExceptions(\"Min and Max fields: enter values for the minimum and maximum inventory fields.\\n\");\n }\n if (maxInventoryLevelInput < minInventoryLevelInput) {\n throw new myExceptions(\"Max inventory MUST be larger than the minimum inventory.\\n\");\n }\n\n }\n catch (NumberFormatException ex) {\n errorMessageContainer += \"Min and Max fields: enter a positive whole number.\\n\";\n isInputValid = false;\n\n }\n catch (myExceptions minMaxValidation) {\n errorMessageContainer += minMaxValidation.getMessage();\n isInputValid = false;\n\n }\n\n try {\n productInventoryLevel = Integer.parseInt(inventoryLevelField.getText());\n if (inventoryLevelField.getText().equals(\"\")) {\n throw new myExceptions(\"Inventory level: enter a number greater than 0.\\n\");\n }\n if (productInventoryLevel <= 0) {\n throw new myExceptions(\"Inventory level: enter a number greater than 0.\\n\");\n }\n if (productInventoryLevel > maxInventoryLevelInput || productInventoryLevel < minInventoryLevelInput) {\n throw new myExceptions(\"Inventory level: value must be between max and min.\\n\");\n }\n }\n catch (NumberFormatException ex) {\n errorMessageContainer += \"Inventory level: enter a positive whole number.\\n\";\n isInputValid = false;\n\n }\n catch (myExceptions stockValidation) {\n errorMessageContainer += stockValidation.getMessage();\n isInputValid = false;\n\n }\n\n errorMessageLabel.setText(errorMessageContainer);\n errorMessageContainer = \"\";\n\n }", "public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {\r\n ActionErrors actionErrors = new ActionErrors();\r\n try {\r\n UserDAO gObjUserDAO = new UserDAOImpl();\r\n if (userFirstName == null || userFirstName.length() < 1) {\r\n\r\n actionErrors.add(\"userFirstName\", new ActionMessage(\"error.userFirstName\"));\r\n // TODO: add 'error.name.required' key to your resources\r\n }\r\n if (getUserName() == null || getUserName().length() < 1) {\r\n\r\n actionErrors.add(\"userName\", new ActionMessage(\"error.userName\"));\r\n // TODO: add 'error.name.required' key to your resources\r\n }\r\n if (getUserPassword() == null || getUserPassword().length() < 1) {\r\n actionErrors.add(\"userPassword\", new ActionMessage(\"error.userPassword\"));\r\n // TODO: add 'error.name.required' key to your resources\r\n }\r\n if (getUserActivationCode() == null || getUserActivationCode().length() < 1) {\r\n actionErrors.add(\"userActivationCode\", new ActionMessage(\"error.userActivationCode\"));\r\n // TODO: add 'error.name.required' key to your resources\r\n }\r\n if (getUserName() != null && getUserName().length() > 0) {\r\n\r\n List<CmnUserMst> lLstCmnUserMst = new ArrayList<CmnUserMst>();\r\n lLstCmnUserMst = gObjUserDAO.validateUserName(getUserName().toUpperCase());\r\n if (!lLstCmnUserMst.isEmpty()) {\r\n actionErrors.add(\"userName\", new ActionMessage(\"error.duplicateUserName\"));\r\n\r\n }\r\n\r\n }\r\n if (getUserActivationCode() != null && getUserActivationCode().length() > 0) {\r\n\r\n System.out.println(\"userType.....\" + userType);\r\n logger.info(\"userType......\" + userType);\r\n if (userType != null && !\"\".equals(userType) && \"H\".equals(userType)) {\r\n roleActivationMpgList = gObjUserDAO.validateActivationCodeForHR(getUserActivationCode());\r\n if (roleActivationMpgList != null && !roleActivationMpgList.isEmpty()) {\r\n PcHrDtls lObjPcHrDtls = (PcHrDtls) roleActivationMpgList.get(0);\r\n universityId = lObjPcHrDtls.getUniversityId();\r\n }\r\n }\r\n else if (userType != null && !\"\".equals(userType) && (\"S\".equals(userType) || \"A\".equals(userType) || \"F\".equals(userType))) {\r\n roleActivationMpgList = gObjUserDAO.validateActnCodeForStudOrAlumniOfFaculty(userType,userActivationCode);\r\n if(roleActivationMpgList != null && !roleActivationMpgList.isEmpty())\r\n {\r\n List lLstResult = gObjUserDAO.validateActivationCodeWithExistingCode(userActivationCode);\r\n if(lLstResult != null && !lLstResult.isEmpty())\r\n {\r\n actionErrors.add(\"userActivationCode\", new ActionMessage(\"error.validateUserActivationCodeWithExistingCode\")); \r\n }\r\n else\r\n {\r\n TmpUserExcelData lObjTmpUserExcelData = (TmpUserExcelData) roleActivationMpgList.get(0);\r\n universityId = lObjTmpUserExcelData.getUniversityId();\r\n }\r\n }\r\n } \r\n else {\r\n roleActivationMpgList = gObjUserDAO.validateActivationCode(getUserActivationCode());\r\n if (roleActivationMpgList != null && !roleActivationMpgList.isEmpty()) {\r\n CmnRoleActivationMpg lObjCmnRoleActivationMpg = (CmnRoleActivationMpg) roleActivationMpgList.get(0);\r\n universityId = lObjCmnRoleActivationMpg.getUniversityId();\r\n }\r\n }\r\n\r\n if (roleActivationMpgList == null || roleActivationMpgList.isEmpty()) {\r\n actionErrors.add(\"userActivationCode\", new ActionMessage(\"error.validateUserActivationCode\"));\r\n\r\n }\r\n }\r\n request.setAttribute(\"fromFlag\", \"signUp\");\r\n } catch (Exception ex) {\r\n logger.error(\"Error while validating user data : \" + ex, ex);\r\n }\r\n return actionErrors;\r\n }", "@Override\n public void onClick(View view) {\n if(mobile_num.getText().toString().isEmpty()){\n mobile_num.setError(\"This Field Required\");\n showToast(\"Some fields are incomplete\");\n// }else if(org_ocupation.getText().toString().isEmpty()){\n// org_ocupation.setError(\"This Field Required\");\n// showToast(\"Some fields are incomplete\");\n }else if(fis_acres.getText().toString().isEmpty()){\n fis_acres.setError(\"This Field Required\");\n showToast(\"Some fields are incomplete\");\n } else if(fish_years.getText().toString().isEmpty()){\n fish_years.setError(\"This Field Required\");\n showToast(\"Some fields are incomplete\");\n }else if(mudcrab_acres.getText().toString().isEmpty()){\n mudcrab_acres.setError(\"This Field Required\");\n showToast(\"Some fields are incomplete\");\n }else if(mudcrab_years.getText().toString().isEmpty()){\n mudcrab_years.setError(\"This Field Required\");\n showToast(\"Some fields are incomplete\");\n }else if(shrimp_acres.getText().toString().isEmpty()){\n shrimp_acres.setError(\"This Field Required\");\n showToast(\"Some fields are incomplete\");\n }else if(shrimp_years.getText().toString().isEmpty()){\n shrimp_years.setError(\"This Field Required\");\n showToast(\"Some fields are incomplete\");\n }else if(total_farming_area.getText().toString().isEmpty()){\n total_farming_area.setError(\"This Field Required\");\n showToast(\"Some fields are incomplete\");\n }else if(ownd_in_acres.getText().toString().isEmpty()){\n ownd_in_acres.setError(\"This Field Required\");\n showToast(\"Some fields are incomplete\");\n }else if(leased_in_acres.getText().toString().isEmpty()){\n leased_in_acres.setError(\"This Field Required\");\n showToast(\"Some fields are incomplete\");\n }else if(total_farming_num.getText().toString().isEmpty()){\n total_farming_num.setError(\"This Field Required\");\n showToast(\"Some fields are incomplete\");\n }else if(owned_seed_num.getText().toString().isEmpty()){\n owned_seed_num.setError(\"This Field Required\");\n showToast(\"Some fields are incomplete\");\n } else if(sponcerd_seed_num.getText().toString().isEmpty()){\n sponcerd_seed_num.setError(\"This Field Required\");\n showToast(\"Some fields are incomplete\");\n } else if(village.getText().toString().isEmpty()){\n village.setError(\"This Field Required\");\n showToast(\"Some fields are incomplete\");\n }else if(mandal.getText().toString().isEmpty()){\n mandal.setError(\"This Field Required\");\n showToast(\"Some fields are incomplete\");\n }else if(district.getText().toString().isEmpty()){\n district.setError(\"This Field Required\");\n showToast(\"Some fields are incomplete\");\n }else if(pincode.getText().toString().isEmpty()){\n pincode.setError(\"This Field Required\");\n showToast(\"Some fields are incomplete\");\n }else if(min_salinity.getText().toString().isEmpty()){\n min_salinity.setError(\"This Field Required\");\n showToast(\"Some fields are incomplete\");\n }else if(max_salinity.getText().toString().isEmpty()) {\n max_salinity.setError(\"This Field Required\");\n showToast(\"Some fields are incomplete\");\n }else if(select_water_type.getSelectedItemPosition()==0) {\n showToast(\"Select water type\");\n }else if(select_moter_type.getSelectedItemPosition()==0) {\n showToast(\"Select moter type\");\n }else if(select_state.getItemAtPosition(0).toString().equals(\"Select Water Type\")) {\n showToast(\"Select water type\");\n// }else if(select_state.getItemAtPosition(0).toString().equals(\"Select Motor Type\")) {\n// showToast(\"Select moter type\");\n\n\n } else{\n\n\n try {\n obj.put(\"alt_mobile\",mobile_num.getText().toString());\n\n\n obj.put(\"occupation\",occupation.getText().toString());\n obj.put(\"farm_capacity\", capacity.getText().toString());\n obj.put(\"fish_acreas\",fis_acres.getText().toString());\n obj.put(\"fish_years\", fish_years.getText().toString());\n obj.put(\"mudcrab_acres\", mudcrab_acres.getText().toString());\n obj.put(\"mudcrab_years\" , mudcrab_years.getText().toString());\n obj.put(\"shr_acrs\", shrimp_acres.getText().toString());\n obj.put(\"shr_years\", shrimp_years.getText().toString());\n obj.put(\"total_farming_area\", total_farming_area.getText().toString());\n obj.put(\"own_acres\", ownd_in_acres.getText().toString());\n obj.put(\"leased_area\", leased_in_acres.getText().toString());\n obj.put(\"total_famrming_bags\", total_farming_num.getText().toString());\n obj.put(\"own_seed_num\", owned_seed_num.getText().toString());//add bags for above and beloew\n obj.put(\"sponsered_seed_num\" , sponcerd_seed_num.getText().toString());\n obj.put(\"village\", village.getText().toString());\n obj.put(\"mandal\",mandal.getText().toString());\n obj.put(\"district\",district.getText().toString());\n obj.put(\"state\", select_state.getSelectedItem().toString());\n obj.put(\"pincode\", pincode.getText().toString());\n obj.put(\"min_salinity\", min_salinity.getText().toString());\n obj.put(\"max_salinity\" ,max_salinity.getText().toString());\n obj.put(\"selected_water_type\",select_water_type.getSelectedItem().toString());\n obj.put(\"select_motor_type\", select_moter_type.getSelectedItem().toString());\n System.out.println(\"checking data\"+obj.toString());\n SharedPreferences.Editor editor = getSharedPreferences(\"collect\", MODE_PRIVATE).edit();\n editor.putString(\"farmer1\",obj.toString());\n editor.commit();\n SharedPreferences prefs = getSharedPreferences(\"collect\", MODE_PRIVATE);\n Boolean sup = prefs.getBoolean(\"supplier\",false);\n if(sup){\n Intent i=new Intent(farm.this,supplier.class);\n startActivity(i);\n }\n else\n {\n Intent i=new Intent(farm.this,declaration.class);\n startActivity(i);\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n\n\n\n\n }", "protected void validateForm() {\n for (Validator validator : validators) {\n validator.validate();\n }\n }", "private boolean isInputValid() {\n String errorMessage = \"\";\n\n if (commentField.getText() == null || commentField.getText().length() == 0) {\n errorMessage += \"Не введен комментарий!\\n\";\n }\n if (timeField.getText() == null || timeField.getText().length() == 0) {\n errorMessage += \"Не введено время выполнения задачи!\\n\";\n }\n if (errorMessage.length() == 0) {\n return true;\n } if (errorMessage.length() == 0) {\n return true;\n } else {\n // Show the error message.\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\n alert.setTitle(\"Не введены все данные!\");\n alert.setHeaderText(null);\n alert.setContentText(\"Пожалуйста, введите все данные!\");\n alert.showAndWait();\n return false;\n }\n }", "private boolean validateInputs() {\n if (KEY_EMPTY.equals(tenchuxe)) {\n etTenChuXe.setError(\"Vui lòng điền Tên chủ xe\");\n etTenChuXe.requestFocus();\n return false;\n\n }\n if (KEY_EMPTY.equals(sdt)) {\n etSDT.setError(\"Vui lòng điền Số điện thoại\");\n etSDT.requestFocus();\n return false;\n\n }\n if (KEY_EMPTY.equals(mota)) {\n edMoTa.setError(\"Vui lòng điền Mô tả xe\");\n edMoTa.requestFocus();\n return false;\n\n }\n if (KEY_EMPTY.equals(biensoxe)) {\n etBienSoXe.setError(\"Vui lòng điền Biển số xe\");\n etBienSoXe.requestFocus();\n return false;\n }\n if (KEY_EMPTY.equals(passwordtx)) {\n etPasswordtx.setError(\"Vui lòng điền Mật khẩu\");\n etPasswordtx.requestFocus();\n return false;\n }\n\n if (KEY_EMPTY.equals(confirmPassword)) {\n etConfirmPassword.setError(\"Vui lòng điền Xác nhận mật khẩu\");\n etConfirmPassword.requestFocus();\n return false;\n }\n if (!passwordtx.equals(confirmPassword)) {\n etConfirmPassword.setError(\"Xác nhận mật khẩu sai !\");\n etConfirmPassword.requestFocus();\n return false;\n }\n\n return true;\n }", "private void checkAndSave(){\n if (haveEmptyField()){\n JOptionPane.showMessageDialog(dialog,\n \"Some field are empty!\",\n \"Not valid\",\n JOptionPane.ERROR_MESSAGE);\n } else {\n saveStudent();\n }\n }", "public List<ValidationError> validate() {\n\n List<ValidationError> errors = new ArrayList<>();\n\n // isActive\n if (this.isActive != null && !this.isActive.equals(\"\") && this.getIsActiveAsBoolean() == null) {\n errors.add(new ValidationError(\"isActive\", \"isActive is not correctly formated, should be a true or false\"));\n }\n\n // actorTypeRefId\n if (this.actorTypeRefId != null && !this.actorTypeRefId.equals(\"\") && this.getActorType() == null) {\n errors.add(new ValidationError(\"actorTypeRefId\", String.format(\"ActorType %s does not exist\", this.actorTypeRefId)));\n }\n\n // login\n if (this.login != null && !this.login.equals(\"\")) {\n Actor testActor = ActorDao.getActorByUid(this.login);\n if (testActor != null) {\n Actor actor = ActorDao.getActorByRefId(this.refId);\n if (actor != null) { // edit\n if (!testActor.id.equals(actor.id)) {\n errors.add(new ValidationError(\"login\", \"The login \\\"\" + this.login + \"\\\" is already used by another actor\"));\n }\n } else { // create\n errors.add(new ValidationError(\"login\", \"The login \\\"\" + this.login + \"\\\" is already used by another actor\"));\n }\n }\n }\n\n return errors.isEmpty() ? null : errors;\n }", "@Override\n public void onClick(View v) {\n if (mFirstName.getText().toString().length() <= 2) {\n Toast.makeText(getApplicationContext(), \"Name field cannot be left Blank\",\n Toast.LENGTH_SHORT).show();\n mFirstName.setError(\"At least 3 Characters\");\n return;\n\n } else if (mLastName.getText().toString().length() == 0) {\n Toast.makeText(getApplicationContext(), \"Last Name field cannot be left Blank\",\n Toast.LENGTH_SHORT).show();\n mLastName.setError(\"At least 1 Character\");\n return;\n\n } else if (!android.util.Patterns.EMAIL_ADDRESS.matcher(mEmailAddress.getText().\n toString()).matches()) {\n Toast.makeText(getApplicationContext(), \"Invalid Email Address\",\n Toast.LENGTH_SHORT).show();\n mEmailAddress.setError(\"Enter a Valid Email Address\");\n return;\n\n } else if (mHomeAddress.getText().toString().length() <= 5) {\n Toast.makeText(getApplicationContext(), \"Home Address cannot be left Blank\",\n Toast.LENGTH_SHORT).show();\n mHomeAddress.setError(\"Enter your Home Address\");\n return;\n\n } else if (mHomeAddress1.getText().toString().length() <= 5) {\n Toast.makeText(getApplicationContext(), \"Street Address cannot be left Blank\",\n Toast.LENGTH_SHORT).show();\n mHomeAddress1.setError(\"Enter your Street Address\");\n return;\n\n } else if (mContactNumber.getText().toString().length() <= 7) {\n Toast.makeText(getApplicationContext(), \"Invalid Phone Number\",\n Toast.LENGTH_SHORT).show();\n mContactNumber.setError(\"At least 8 digits\");\n return;\n\n } else if (mEmergencyNumber.getText().toString().length() <= 7) {\n Toast.makeText(getApplicationContext(), \"Invalid Emergency Contact Number\",\n Toast.LENGTH_SHORT).show();\n mEmergencyNumber.setError(\"At least 8 digits\");\n return;\n\n } else if ((!(mCheckboxGame1.isChecked()))\n && (!(mCheckboxGame2.isChecked()))\n && (!(mCheckboxGame3.isChecked()))\n && (!(mCheckboxGame4.isChecked()))) {\n Toast.makeText(getBaseContext(), \"No games Selected\",\n Toast.LENGTH_SHORT).show();\n return;\n\n } else if (!(mTermsConditions.isChecked())) {\n Toast.makeText(getBaseContext(), \"Please Accept the terms \" +\n \"and Policies of the Tournament\",\n Toast.LENGTH_SHORT).show();\n return;\n }\n\n //Checkbox Selections\n String text = \"\";\n\n if (mCheckboxGame1.isChecked()) {\n text = text + mCheckboxGame1.getText() + \"\\n\";\n }\n\n if (mCheckboxGame2.isChecked()) {\n text = text + mCheckboxGame2.getText() + \"\\n\";\n }\n\n if (mCheckboxGame3.isChecked()) {\n text = text + mCheckboxGame3.getText() + \"\\n\";\n }\n\n if (mCheckboxGame4.isChecked()) {\n text = text + mCheckboxGame4.getText() + \"\\n\";\n }\n\n //EditText Intents\n Intent intent = new Intent(ApplicationActivity.this,\n ReviewActivity.class);\n\n intent.putExtra(\"emailAddress\", mEmailAddress.getText().toString().trim());\n intent.putExtra(\"firstName\", mFirstName.getText().toString().trim());\n intent.putExtra(\"lastName\", mLastName.getText().toString().trim());\n intent.putExtra(\"homeAddress1\", mHomeAddress.getText().toString().trim());\n intent.putExtra(\"homeAddress2\", mHomeAddress1.getText().toString().trim());\n intent.putExtra(\"contactNumber\", mContactNumber.getText().toString().trim());\n intent.putExtra(\"emergencyNumber\", mEmergencyNumber.getText().toString().trim());\n intent.putExtra(\"checkboxValue\", text);\n intent.putExtra(\"ageGroup\", sAgeGroup);\n\n int id = mRadioGenderGroup.getCheckedRadioButtonId();\n RadioButton radioButton = (RadioButton) findViewById(id);\n intent.putExtra(\"radioGender\", radioButton.getText().toString());\n\n //Profile picture to bytes\n ByteArrayOutputStream bytes = new ByteArrayOutputStream();\n //Certificate picture to bytes\n ByteArrayOutputStream bytes1 = new ByteArrayOutputStream();\n\n //Null ImageViews' Validation\n\n if (profileBitmap != null) {\n profileBitmap.compress(Bitmap.CompressFormat.JPEG, 65, bytes);\n byteArray = bytes.toByteArray();\n intent.putExtra(\"profilePicture\", byteArray);\n\n } else {\n Toast.makeText(getBaseContext(), \"Please Add your Profile Picture\",\n Toast.LENGTH_LONG).show();\n return;\n }\n\n if (certificateBitmap != null) {\n certificateBitmap.compress(Bitmap.CompressFormat.JPEG, 65, bytes1);\n byteArray1 = bytes1.toByteArray();\n intent.putExtra(\"certificatePicture\", byteArray1);\n\n } else {\n Toast.makeText(getBaseContext(), \"Please Add your Birth Certificate Image\",\n Toast.LENGTH_LONG).show();\n return;\n }\n\n startActivity(intent);\n }" ]
[ "0.7294829", "0.7278774", "0.69437015", "0.6890023", "0.6802563", "0.6780016", "0.6732316", "0.6701406", "0.6683618", "0.6670243", "0.65955734", "0.6590196", "0.657837", "0.65719426", "0.6495409", "0.6472526", "0.6434879", "0.64332306", "0.6420357", "0.63922465", "0.6371007", "0.6362955", "0.6362818", "0.6329997", "0.6318328", "0.63172585", "0.63063693", "0.62736493", "0.6268713", "0.6247641", "0.6239646", "0.62346405", "0.6224136", "0.6218997", "0.62013197", "0.6193464", "0.6187022", "0.6175843", "0.6166553", "0.6153363", "0.6150138", "0.61353004", "0.61096597", "0.60999185", "0.60983974", "0.60913724", "0.6090714", "0.60895985", "0.6087581", "0.6082389", "0.6068507", "0.6067718", "0.6048318", "0.6048092", "0.6040918", "0.6038658", "0.60306174", "0.6023701", "0.6019973", "0.6014498", "0.59942013", "0.599139", "0.59692144", "0.59425324", "0.5927296", "0.5924119", "0.5921873", "0.5917331", "0.5915621", "0.59146756", "0.5910095", "0.58971184", "0.58961385", "0.5888267", "0.58840555", "0.58816594", "0.58798444", "0.58758485", "0.5875643", "0.5873128", "0.5865695", "0.5855218", "0.5850242", "0.5839303", "0.5838756", "0.5837803", "0.5833422", "0.58303446", "0.5828105", "0.5828105", "0.5828105", "0.5826305", "0.5820969", "0.58147544", "0.58146024", "0.5813774", "0.5812751", "0.5812713", "0.5812671", "0.5804339" ]
0.59267795
65
Submit your form here. your form is valid Toast.makeText(this, "Registering...", Toast.LENGTH_LONG).show();
private void submitForm() { final Dialog dialog = new Dialog(context); dialog.setContentView(R.layout.dialogbox); dialog.setTitle("Sucess!"); dialog.setCancelable(false); dialog.setCanceledOnTouchOutside(false); TextView txt = (TextView) dialog.findViewById(R.id.errorlog); txt.setText("Registration Successfull."); Button dialogButton = (Button) dialog.findViewById(R.id.release); dialogButton.setOnClickListener(new OnClickListener() { public void onClick(View vd) { change.setEnabled(true); dialog.dismiss(); } }); dialog.show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void submitForm() {\n Toast.makeText(this, \"Registering...\", Toast.LENGTH_LONG).show();\n }", "private void registration() {\n\t\tif (ur_name.getText().length() > 0 && email.getText().length() > 0\r\n\t\t\t\t&& pass.getText().length() > 0\r\n\t\t\t\t&& re_pass.getText().length() > 0) {\r\n\t\t\tif (pass.getText().toString()\r\n\t\t\t\t\t.equalsIgnoreCase(re_pass.getText().toString())) {\r\n\t\t\t\tString postEntity = \"user_name=\" + ur_name.getText().toString()\r\n\t\t\t\t\t\t+ \"&email=\" + email.getText().toString() + \"&password=\"\r\n\t\t\t\t\t\t+ pass.getText().toString() + \"&gcm_id=\"\r\n\t\t\t\t\t\t+ GlobalDeclares.getGcmId();\r\n\t\t\t\tnew ServerUtilities(getApplicationContext(),\r\n\t\t\t\t\t\tGlobalDeclares.NEW_REGISTRATION, postEntity, delegate);\r\n\r\n\t\t\t} else {\r\n\t\t\t\tToast.makeText(getApplicationContext(),\r\n\t\t\t\t\t\t\"Password does not match!\", Toast.LENGTH_LONG).show();\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\tToast.makeText(getApplicationContext(),\r\n\t\t\t\t\t\"You need to fill all the fields!\", Toast.LENGTH_LONG)\r\n\t\t\t\t\t.show();\r\n\t\t}\r\n\r\n\t}", "@Override\r\n\t\r\n\tpublic void onClick(View v)\r\n\t{\n\t\t\r\n\t\tfirstname = fname.getText().toString();\r\n\t\tlastname = lname.getText().toString();\r\n\t\tmail = email.getText().toString();\r\n\t\tpassword = pass.getText().toString();\r\n\t\tif(firstname.toString().isEmpty() || lastname.isEmpty() || mail.toString().isEmpty()|| password.isEmpty())\r\n\t\t\tToast.makeText(this, \"Please enter the required Fields\", Toast.LENGTH_SHORT).show();\r\n\t\telse\r\n\t\t\tnew register().execute();\r\n\t\t\r\n\t\t\t\r\n\t\t\r\n\t}", "private void onClickSignIn(){\n if(checkValidation()){\n //if Validation is ok\n submitForm();\n }\n else{\n //Something went wrong...\n Toast.makeText(LauncherActivity.this, \"Form contains error!\", Toast.LENGTH_LONG).show();\n }\n }", "private void submitForm() {\n // Build list params\n List<NameValuePair> list = new ArrayList<>();\n list.add(new BasicNameValuePair(\"tag\", AppConfig.TAG_LOGIN));\n list.add(new BasicNameValuePair(\"username\", editTextLogin.getText().toString()));\n list.add(new BasicNameValuePair(\"password\", editTextPassword.getText().toString()));\n\n ConnectionTask connectionTask = new ConnectionTask(this, list);\n connectionTask.execute();\n }", "@Override\n public void onClick(View v) {\n name = txtName.getText().toString();\n username = txtUsername.getText().toString();\n password = txtPassword.getText().toString();\n try {\n if (username.trim().length() > 0 && password.trim().length() > 0 && name.trim().length() > 0) {\n dbHelper.open();\n dbHelper.Register(username, password, name);\n //jika tombol diklik akan muncul toast daftar berhasil dan langsung menuju ke halaman login\n Toast.makeText(RegisterActivity.this, \"Daftar berhasil\", Toast.LENGTH_LONG).show();\n finish();\n } else {\n //jika tombol diklik akan muncul toast daftar gagal, lengkapi form!\n Toast.makeText(RegisterActivity.this, \"Daftar gagal, lengkapi form!\", Toast.LENGTH_LONG).show();\n }\n } catch (Exception e) {\n Toast.makeText(RegisterActivity.this, e.getMessage(), Toast.LENGTH_LONG).show();\n }\n }", "private void submitForm() {\n if (!validateName()) {\n return;\n }\n\n if (!validateEmail()) {\n return;\n }\n\n if (!validatePassword()) {\n return;\n }\n\n// Toast.makeText(getApplicationContext(), \"Thank You!\", Toast.LENGTH_SHORT).show();\n}", "@Override\n\t\t\tpublic void onSuccess() {\n\t\t\t\tToast.makeText(MainActivity.this, \"submit success\", Toast.LENGTH_LONG).show();\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tEditText emailText = (EditText)findViewById(R.id.reg_email);\n\t\t\t\tEditText firstNameText = (EditText)findViewById(R.id.reg_first_name);\n\t\t\t\tEditText lastNameText = (EditText)findViewById(R.id.reg_last_name);\n\t\t\t\tEditText userNameText = (EditText)findViewById(R.id.reg_username);\n\t\t\t\tEditText passwordText = (EditText)findViewById(R.id.reg_password);\n\t\t\t\tEditText phoneNumberText = (EditText)findViewById(R.id.reg_phone);\n\t\t\t\t\n\t\t\t\tregister(firstNameText.getText().toString(), lastNameText.getText().toString(), userNameText.getText().toString(), passwordText.getText().toString(), emailText.getText().toString(), phoneNumberText.getText().toString());\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}", "public void submitForm(String text) {\n\n Toast.makeText(this, text, Toast.LENGTH_LONG).show();\n String expected = \" Successful Signup \";\n if(text.equalsIgnoreCase(expected))\n {\n Intent myIntent = new Intent(SignUp.this, NumberVerify.class).putExtra(\"PHONE\",PhoneNumber.getText().toString());\n startActivity(myIntent);\n }\n\n }", "public void onSignupSuccess(){\n Toast.makeText(this, \"YEPP\", Toast.LENGTH_SHORT).show();\r\n Intent changetomain = new Intent(RegisterActivity.this, MainAccount.class) ;\r\n startActivity(changetomain);\r\n }", "@Override\n\t\t\t\t\tpublic void onSuccess() {\n\t\t\t\t\t\tToast.makeText(RegisterActivity.this,\"Sign up successfully!\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\tstartActivity(new Intent(RegisterActivity.this, LoginActivity.class));\n\t\t\t\t\t}", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif (!(API.isInternetOn(Register.this))) {\r\n\t\t\t\t\tshowAlert(\"Internet not avialble.\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tprogressdialog.setMessage(\"Please wait...\");\r\n\t\t\t\t\tprogressdialog.show();\r\n\t\t\t\t\t// Force user to fill up the form\r\n\t\t\t\t\tif (username.getText().toString().equals(\"\")\r\n\t\t\t\t\t\t\t|| email.getText().toString().equals(\"\")\r\n\t\t\t\t\t\t\t|| password.getText().toString().equals(\"\")\r\n\t\t\t\t\t\t\t|| verifyPassword.getText().toString().equals(\"\")) {\r\n\t\t\t\t\t\tprogressdialog.dismiss();\r\n\t\t\t\t\t\tshowAlert(\"Please complete the sign up form.\");\r\n\t\t\t\t\t} else if (!(isValidEmail(email.getText().toString()))) {\r\n\t\t\t\t\t\tprogressdialog.dismiss();\r\n\t\t\t\t\t\tshowAlert(\"Please enter valid email id.\");\r\n\t\t\t\t\t} else if (!(password.getText().toString()\r\n\t\t\t\t\t\t\t.equals(verifyPassword.getText().toString()))) {\r\n\t\t\t\t\t\tprogressdialog.dismiss();\r\n\t\t\t\t\t\tshowAlert(\"Password did not matched\");\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// Save new user data into Parse.com Data Storage\r\n\t\t\t\t\t\tParseUser user = new ParseUser();\r\n\t\t\t\t\t\tuser.setUsername(username.getText().toString());\r\n\t\t\t\t\t\tuser.setPassword(password.getText().toString());\r\n\t\t\t\t\t\tuser.setEmail(email.getText().toString());\r\n\t\t\t\t\t\tuser.signUpInBackground(new SignUpCallback() {\r\n\t\t\t\t\t\t\tpublic void done(ParseException e) {\r\n\t\t\t\t\t\t\t\tif (e == null) {\r\n\t\t\t\t\t\t\t\t\tAllowUserToLogin(username.getText()\r\n\t\t\t\t\t\t\t\t\t\t\t.toString(), password.getText()\r\n\t\t\t\t\t\t\t\t\t\t\t.toString());\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tprogressdialog.dismiss();\r\n\t\t\t\t\t\t\t\t\tToast.makeText(getApplicationContext(),\r\n\t\t\t\t\t\t\t\t\t\t\t\"Sign up Error\", Toast.LENGTH_LONG)\r\n\t\t\t\t\t\t\t\t\t\t\t.show();\r\n\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});\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}", "public void displayRegisterForm(View v) {\n\n Intent intent = new Intent(getApplicationContext(), RegistrationScreenActivity.class);\n startActivityForResult(intent, NEW_USER_REGISTER);\n }", "public void register(View v) {\n password = password_handler.getText().toString().trim();\n email = email_handler.getText().toString().trim();\n Phone = inputPhone.getText().toString().trim();\n fullName = inputFullName.getText().toString().trim();\n\n citys = city.getText().toString().trim();\n streetS = street.getText().toString().trim();\n floorS = floor.getText().toString().trim();\n apparmentS = appartment.getText().toString().trim();\n housNums = houseNum.getText().toString().trim();\n\n //check that all the inputs are valid\n if (TextUtils.isEmpty(email)) {\n email_handler.setError(\"נא למלא Email\");\n return;\n }\n\n if (TextUtils.isEmpty(password)) {\n password_handler.setError(\"נא למלא סיסמא\");\n return;\n }\n\n if (password.length() < 6) {\n password_handler.setError(\"נא הכנס סיסמא בעלת 6 תווים מינימום\");\n return;\n }\n\n if (TextUtils.isEmpty(fullName)) {\n inputFullName.setError(\"זהו שדה חובה\");\n return;\n }\n\n if (TextUtils.isEmpty(Phone)) {\n inputPhone.setError(\"נא למלא מספר טלפון\");\n return;\n }\n if (TextUtils.isEmpty(citys)) {\n city.setError(\"נא למלא עיר מגורים\");\n return;\n }\n if (TextUtils.isEmpty(streetS)) {\n street.setError(\"נא למלא רחוב\");\n return;\n }\n if (TextUtils.isEmpty(housNums)) {\n houseNum.setError(\"נא למלא מספר בית\");\n return;\n }\n if (TextUtils.isEmpty(floorS)) {\n floor.setError(\"נא למלא מספר קומה\");\n return;\n }\n if (TextUtils.isEmpty(apparmentS)) {\n appartment.setError(\"נא למלא מספר דירה\");\n return;\n }\n\n if ((!inputadvertiser.isChecked()) && (!inputadopter.isChecked())) {\n inputadvertiser.setError(\"נא לבחור מפרסם/מאמץ\");\n return;\n }\n if (inputadvertiser.isChecked() && inputadopter.isChecked()) {\n inputadvertiser.setError(\"יש לבחור תפקיד אחד בלבד!\");\n return;\n }\n\n FireLog.createUserWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n progressBar2.setVisibility(View.VISIBLE);\n // Sign in success, update UI with the signed-in user's information\n Log.d(\"[INFO]\", \"createUserWithEmail:success\");\n FirebaseUser user = FireLog.getCurrentUser();\n Address adress = new Address(citys,streetS,housNums,floorS,apparmentS);\n userID = user.getUid();\n if (inputadvertiser.isChecked()) {\n Advertiser advertiser = new Advertiser(email, fullName, Phone, adress, userID);\n try {\n advertiserRef.child(userID).setValue(advertiser);\n Toast.makeText(Register.this, \"Advertiser added\", Toast.LENGTH_LONG).show();\n } catch (Exception e) {\n Log.d(TAG, \"onFailue\" + e.toString());\n }\n } else {\n ArrayList<Dog> b= new ArrayList<Dog>();\n Adopter adopter = new Adopter(email, fullName, Phone, adress, userID, b);\n try {\n adopterRef.child(userID).setValue(adopter);\n Toast.makeText(Register.this, \"Adopter added\", Toast.LENGTH_LONG).show();\n } catch (Exception e) {\n Log.d(TAG, \"onFailue\" + e.toString());\n }\n }\n moveToLogin();\n }\n else {\n progressBar2.setVisibility(View.GONE);\n // If sign in fails, display a message to the user.\n Log.w(\"[INFO]\", \"createUserWithEmail:failure\", task.getException());\n Toast.makeText(getApplicationContext(), \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n }\n\n }\n });\n }", "@OnClick(R.id.activity_register_button_register)\n public void onRegisterClick(View mView) {\n if (!isFinishing()) {\n mUtility.hideKeyboard(RegisterActivity.this);\n mStringUsername = mEditTextUsername.getText().toString().trim();\n mStringAccountName = mEditTextAccountName.getText().toString().trim();\n mStringEmail = mEditTextEmail.getText().toString().trim();\n mStringMobileNO = mEditTextMobileNO.getText().toString().trim();\n mStringPassword = mEditTextPassword.getText().toString().trim();\n mStringDevicesUIDFCMToken = FirebaseInstanceId.getInstance().getToken();\n mPreferenceHelper.setDeviceToken(mStringDevicesUIDFCMToken);\n if (mStringUsername.equalsIgnoreCase(\"\")) {\n showMessageRedAlert(mRelativeLayoutMain, getResources().getString(R.string.str_sign_up_enter_name), getResources().getString(R.string.str_ok));\n return;\n }\n if (mStringAccountName.equalsIgnoreCase(\"\")) {\n showMessageRedAlert(mRelativeLayoutMain, getResources().getString(R.string.str_sign_up_enter_account_name), getResources().getString(R.string.str_ok));\n return;\n }\n if (mStringCountryCode.equalsIgnoreCase(\"\")) {\n showMessageRedAlert(mRelativeLayoutMain, getResources().getString(R.string.str_select_country_code), getResources().getString(R.string.str_ok));\n return;\n }\n\n if (mStringMobileNO.equalsIgnoreCase(\"\")) {\n showMessageRedAlert(mRelativeLayoutMain, getResources().getString(R.string.str_sign_up_enter_mobile_no), getResources().getString(R.string.str_ok));\n return;\n }\n if (mStringMobileNO.length() < 10 || mStringMobileNO.length() > 15) {\n showMessageRedAlert(mRelativeLayoutMain, getResources().getString(R.string.str_sign_up_enter_valid_mobile_no), getResources().getString(R.string.str_ok));\n return;\n }\n if (!mStringEmail.equalsIgnoreCase(\"\")) {\n if (!mUtility.isValidEmail(mStringEmail)) {\n showMessageRedAlert(mRelativeLayoutMain, getResources().getString(R.string.str_sign_up_enter_valid_email_address), getResources().getString(R.string.str_ok));\n return;\n }\n }\n if (mStringPassword.equalsIgnoreCase(\"\")) {\n showMessageRedAlert(mRelativeLayoutMain, getResources().getString(R.string.str_sign_up_enter_password), getResources().getString(R.string.str_ok));\n return;\n }\n if (mStringPassword.length() < 6 || mStringPassword.length() > 15) {\n showMessageRedAlert(mRelativeLayoutMain, getResources().getString(R.string.str_sign_up_enter_valid_password), getResources().getString(R.string.str_ok));\n return;\n }\n if (!mCheckBoxTermNCondition.isChecked()) {\n showMessageRedAlert(mRelativeLayoutMain, getResources().getString(R.string.str_sign_up_agree_terms_condition), getResources().getString(R.string.str_ok));\n return;\n }\n if (mStringDevicesUIDFCMToken == null || mStringDevicesUIDFCMToken.equalsIgnoreCase(\"null\") || mStringDevicesUIDFCMToken.equalsIgnoreCase(\"\")) {\n mStringDevicesUIDFCMToken = FirebaseInstanceId.getInstance().getToken();\n }\n if (mStringDevicesUIDFCMToken == null || mStringDevicesUIDFCMToken.equalsIgnoreCase(\"null\") || mStringDevicesUIDFCMToken.equalsIgnoreCase(\"\")) {\n mStringDevicesUIDFCMToken = System.currentTimeMillis() + \"\";\n }\n\n console.log(\"asxasxasxasx_token\",mStringDevicesUIDFCMToken);\n\n if (!mUtility.haveInternet()) {\n showMessageRedAlert(mRelativeLayoutMain, getResources().getString(R.string.str_no_internet_connection), getResources().getString(R.string.str_ok));\n } else {\n checkUserRegister();\n }\n }\n }", "private void register() {\r\n if (mName.getText().length() == 0) {\r\n mName.setError(\"please fill this field\");\r\n return;\r\n }\r\n if (mEmail.getText().length() == 0) {\r\n mEmail.setError(\"please fill this field\");\r\n return;\r\n }\r\n if (mPassword.getText().length() == 0) {\r\n mPassword.setError(\"please fill this field\");\r\n return;\r\n }\r\n if (mPassword.getText().length() < 6) {\r\n mPassword.setError(\"password must have at least 6 characters\");\r\n return;\r\n }\r\n\r\n\r\n final String email = mEmail.getText().toString();\r\n final String password = mPassword.getText().toString();\r\n final String name = mName.getText().toString();\r\n\r\n FirebaseAuth.getInstance().createUserWithEmailAndPassword(email, password).addOnCompleteListener(getActivity(), new OnCompleteListener<AuthResult>() {\r\n @Override\r\n public void onComplete(@NonNull Task<AuthResult> task) {\r\n if (!task.isSuccessful()) {\r\n Snackbar.make(view.findViewById(R.id.layout), \"sign up error\", Snackbar.LENGTH_SHORT).show();\r\n } else {\r\n String uid = FirebaseAuth.getInstance().getCurrentUser().getUid();\r\n\r\n //Saves the user's info in the database\r\n Map<String, Object> mNewUserMap = new HashMap<>();\r\n mNewUserMap.put(\"email\", email);\r\n mNewUserMap.put(\"name\", name);\r\n\r\n FirebaseDatabase.getInstance().getReference().child(\"users\").child(uid).updateChildren(mNewUserMap);\r\n }\r\n }\r\n });\r\n\r\n }", "private void attemptRegister() {\n\n // Reinicia los errores de los EditText\n mEditEmail.setError(null);\n mEditFirstName.setError(null);\n mEditLastName.setError(null);\n mEditPassword.setError(null);\n mEditPasswordConfirm.setError(null);\n\n // Obtiene los valores ingresados por el usuario\n String email = Utils.checkEditTextForEmpty(getContext(),mEditEmail);\n String firstName = Utils.checkEditTextForEmpty(getContext(),mEditFirstName);\n String lastName = Utils.checkEditTextForEmpty(getContext(),mEditLastName);\n String password = Utils.checkEditTextForEmpty(getContext(),mEditPassword);\n String passwordConfirm = Utils.checkEditTextForEmpty(getContext(),mEditPasswordConfirm);\n\n //Revisa si hay valor vacío\n if (email == null || firstName == null || lastName == null || password == null || passwordConfirm == null) {\n return;\n }\n\n // Valida el correo\n if (!email.contains(\"@\")) {\n mEditEmail.setError(getString(R.string.error_invalid_email));\n mEditEmail.requestFocus();\n return;\n }\n\n // Valida la contraseña\n if (password.length() < 3) {\n mEditPassword.setError(getString(R.string.error_invalid_password));\n mEditPassword.requestFocus();\n return;\n }\n\n //Valida que las contraseñas hagan match\n if (!password.equals(passwordConfirm)) {\n mEditPasswordConfirm.setError(getString(R.string.error_invalid_password_confirmation));\n mEditPasswordConfirm.requestFocus();\n return;\n }\n\n // Intenta crear la cuenta\n Toast.makeText(getContext(), \"Bienvenido\", Toast.LENGTH_LONG).show();\n }", "@OnClick(R.id.register_email_register_button)\n void onClickRegister(){\n if(isInfoValidate()){\n //Call Register Http, first put the information into bundle\n// Bundle bundle = new Bundle();\n// bundle.putString(Constant.REGISTER_PHONE_NUM, mEmailAddress.getText().toString());\n// bundle.putString(Constant.REGISTER_PASSWORD, mPassword.getText().toString());\n// bundle.putInt(Constant.REGISTER_REGION, mRegionSpinner.getSelectedItemPosition());\n//\n// callRegisterHttp(mEmailAddress.getText().toString(),\n// mRegionSpinner.getSelectedItemPosition(),\n// bundle);\n\n //\n\n\n JSONObject jsonParams = new JSONObject();\n JSONObject outerJsonParams = new JSONObject();\n try {\n// jsonParams.put(\"username\", \"michael_firebasechat_1\");\n // String userNameString = mEmailAddress.getText().toString().split(\"@\")[0];\n jsonParams.put(\"username\", mUsername.getText().toString());\n jsonParams.put(\"email\", mEmailAddress.getText().toString());\n jsonParams.put(\"password\", mPassword.getText().toString());\n outerJsonParams.put(\"user\",jsonParams);\n StringEntity entity = new StringEntity(outerJsonParams.toString());\n callRegisterByEmailHttp(entity);\n } catch (JSONException e) {\n e.printStackTrace();\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n\n }\n else {\n //Show the warning text\n new SweetAlertDialog(getContext(), SweetAlertDialog.WARNING_TYPE)\n .setTitleText(getString(R.string.warning_title))\n .setContentText(errorText)\n .setConfirmText(getString(R.string.warning_confirm))\n .show();\n }\n }", "public void registerUser(View view) {\n if(!validateName() | !validatePassword() | !validatePhoneNo() | !validateEmail()){\n return;\n }\n String phoneNo = regPhoneNo.getEditText().getText().toString();\n String name = regName.getEditText().getText().toString();\n String email = regEmail.getEditText().getText().toString();\n String password = regPassword.getEditText().getText().toString();\n\n //Call the next activity and pass phone no with it\n Intent intent = new Intent(getApplicationContext(), otpVerify.class);\n intent.putExtra(\"phoneNo\", phoneNo);\n intent.putExtra(\"password\", password);\n intent.putExtra(\"email\", email);\n intent.putExtra(\"name\", name);\n startActivity(intent);\n }", "public void register(View v)\n {\n\n Intent loginPage = new Intent(RegisterPage.this, Login.class);\n loginPage.putExtra(\"username\",username.getText().toString());\n loginPage.putExtra(\"password\",password.getText().toString());\n loginPage.putExtra(\"firstname\",firstName.getText().toString());\n loginPage.putExtra(\"lastname\",lastName.getText().toString());\n startActivity(loginPage);\n }", "@Override\n public void onClick(View v) {\n if(checkEmptyFields()){\n //submit not successful\n }else {\n //add to database\n Toast.makeText(getApplicationContext(), \"Submit Successful\", Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n public void onClick(View v) {\n Toast.makeText(v.getContext(), \"Registration success\", Toast.LENGTH_LONG).show();\n finish();\n }", "private void submitForm() {\n this.setDisable(true);\n clearErrorMessage();\n if(validateForm()) {\n CharSequence chars = passwordField.getCharacters();\n String username = usernameField.getText();\n this.controller.validateLoginCredentials(username, chars);\n }\n this.setDisable(false);\n }", "@Override\n public void onClick(View v) {\n firstName = etFirstName.getText().toString().trim();\n lastName = etLastName.getText().toString().trim();\n username = etUsername.getText().toString().trim();\n password = etPassword.getText().toString().trim();\n confirmPassword = etConfirmPassword.getText().toString().trim();\n email = etEmail.getText().toString().trim();\n major=etMajor.getText().toString().trim();\n university=etUniversity.getText().toString().trim();\n isTutor = tutorCheckBox.isChecked();\n\n if (validateInputs()) {\n registerUser();\n }\n\n }", "private void registerUser(){\r\n String E = Email.getText().toString().trim();\r\n String P = Password.getText().toString().trim();\r\n\r\n //if email is empty then give error\r\n if(E.isEmpty()){\r\n Email.setError(\"Email is required\");\r\n Email.requestFocus();\r\n return;\r\n }\r\n\r\n //if email is not an email format give error\r\n if(!Patterns.EMAIL_ADDRESS.matcher(E).matches()){\r\n Email.setError(\"Please enter a valid email\");\r\n Email.requestFocus();\r\n return;\r\n }\r\n //if password is empty then give error\r\n if(P.isEmpty()){\r\n Password.setError(\"Password is required\");\r\n Password.requestFocus();\r\n return;\r\n }\r\n //if password is less then 6 characters, give error.\r\n if(P.length()< 6){\r\n Password.setError(\"Minimum Password length has to be 6 or more characters\");\r\n Password.requestFocus();\r\n return;\r\n }\r\n //Calls the firebase method to create a new user.\r\n mAuth.createUserWithEmailAndPassword(E, P).addOnCompleteListener(new OnCompleteListener<AuthResult>() {\r\n @Override\r\n public void onComplete(@NonNull Task<AuthResult> task) {\r\n if(task.isSuccessful()){\r\n Toast.makeText(getApplicationContext(),\"User register Sucessfully\",Toast.LENGTH_SHORT).show();\r\n }\r\n }\r\n });\r\n }", "void register() {\n if (registerView.getFirstName().length() == 0 || registerView.getLastName().length() == 0 || registerView.getUsername().length() == 0 || registerView.getPassword().length() == 0) {\n IDialog invalidRegistrationDialog\n = dialogFactory.createDialog(DialogFactoryOptions.dialogNames.MESSAGE, new HashMap<String, Object>() {\n {\n put(\"message\", \"Unable to register: Fields must be non-empty!\");\n put(\"title\", \"Authentication Error\");\n put(\"messageType\", DialogFactoryOptions.dialogType.ERROR);\n }\n });\n\n invalidRegistrationDialog.run();\n } else {\n if (userController.registerUser(registerView.getFirstName(), registerView.getLastName(), registerView.getUsername(), registerView.getPassword()) != null) {\n mainFrame.setPanel(panelFactory.createPanel(PanelFactoryOptions.panelNames.MAIN_MENU));\n } else {\n IDialog invalidRegistrationDialog = dialogFactory.createDialog(DialogFactoryOptions.dialogNames.MESSAGE, new HashMap<String, Object>() {\n {\n put(\"message\", \"Unable to register: Username is already taken\");\n put(\"title\", \"Authentication Error\");\n put(\"messageType\", DialogFactoryOptions.dialogType.ERROR);\n }\n });\n\n invalidRegistrationDialog.run();\n }\n }\n }", "public void RegisterClick(View view) {\n Intent intent = new Intent(this, RegisterActivity.class);\n startActivity(intent);\n Toast.makeText(getApplicationContext(), \"Register as a new user\", Toast.LENGTH_SHORT).show();\n }", "public void register(String form /* should be a Form from GUI */){\n String email = \"email\";\n String nome_completo = \"full_name\";\n Date data_nascimento = new Date(1996-10-21);\n String password = getMd5(\"password\");\n String nif = \"nif\";\n String morada = \"morada\";\n String telemovel = \"telemovel\";\n User user = new User(email);\n if (!user.exists()){\n user.setNome_completo(nome_completo);\n user.setData_nascimento(data_nascimento);\n user.setPassword(password);\n user.setNif(nif);\n user.setMorada(morada);\n user.setTelemovel(telemovel);\n user.setAdmin(FALSE);\n //System registers person\n //db.register(user)\n }\n }", "@Override\n public void onClick(View view) {\n if (validate()) {\n String user_email = create_email.getText().toString().trim();\n String user_password = create_password.getText().toString().trim();\n firebaseAuth.createUserWithEmailAndPassword(user_email, user_password).addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n\n if (task.isSuccessful()) {\n //sendEmailVerification();\n //sendUserData();\n firebaseAuth.signOut();\n Toast.makeText(CreateNewSurvey.this, \"Successfully Registered, Upload complete!\", Toast.LENGTH_SHORT).show();\n finish();\n startActivity(new Intent(CreateNewSurvey.this, Main2Activity.class));\n } else {\n Toast.makeText(CreateNewSurvey.this, \"Registration Failed\", Toast.LENGTH_SHORT).show();\n }\n\n }\n\n });\n }\n }", "private void Register()\n {\n Intent registerIntent = new Intent (LoginActivity.this, RegisterActivity.class);\n startActivity(registerIntent);\n finish();\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif (save()) {\r\n\t\t\t\t\tfirst_name_text = first_name.getText().toString();\r\n\t\t\t\t\tlast_name_text=last_name.getText().toString();\r\n\t\t\t\t\tpassword_text = password.getText().toString();\r\n\t\t\t\t\temail_text = email.getText().toString();\r\n\t\t\t\t\tusername_text = username.getText().toString();\r\n\t\t\t\t\t//Remove - between Numbers\r\n\t\t\t\t\tphonenumber_text=phonenumber.getText().toString().replaceAll(\"[^0-9]\", \"\");\r\n\t\t\t\t\t// Remove All spaces between Strings\r\n\t\t\t\t\tcollege_name_text = college_name.getSelectedItem()\r\n\t\t\t\t\t\t\t.toString().replaceAll(\"\\\\s+\", \"\");\r\n\t\t\t\t\t// Execute the AsyncTask to Register User\r\n\t\t\t\t\tnew ValidateRegister().execute();\r\n\t\t\t\t}\r\n\t\t\t}", "public void register(View view) {\n if(radioGroup.getCheckedRadioButtonId() == -1){\n Snackbar.make(getCurrentFocus(),\"Please select one of the Options: Student or Professor\",Snackbar.LENGTH_LONG).show();\n return;\n }\n if (usn.getText().toString().trim().equals(\"\")){\n usn.setError(\"This field cannot be empty\");\n return;\n } else if (password.getText().toString().trim().equals(\"\")){\n password.setError(\"This field cannot be empty\");\n return;\n } else if(password.getText().toString().trim().length() < 8){\n password.setError(\"Password too short.\");\n return;\n } else if(confirmPassword.getText().toString().trim().equals(\"\")){\n confirmPassword.setError(\"This field cannot be empty\");\n return;\n } else if(!(password.getText().toString().trim()\n .equals(confirmPassword.getText().toString().trim()))){\n password.setError(\"Passwords do not match\");\n confirmPassword.setError(\"Passwords do not match\");\n return;\n }\n progressBar.setVisibility(View.VISIBLE);\n mAuth.signInAnonymously().addOnSuccessListener(authResult -> myRef.child(usn.getText().toString().trim()).addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n try {\n String username = dataSnapshot.child(\"emailId\").getValue().toString();\n String password = confirmPassword.getText().toString().trim();\n System.out.println(username);\n mAuth.createUserWithEmailAndPassword(username,password)\n .addOnCompleteListener(RegisterActivity.this,task -> {\n Log.d(\"TAG\",\"Created User:\"+task.isSuccessful());\n if(!task.isSuccessful()){\n Toast.makeText(RegisterActivity.this, \"Error occurred.\" +\n \" Could not create user. Please \" +\n \"check your internet connection\", Toast.LENGTH_LONG).show();\n return;\n }\n else {\n startActivity(new Intent(RegisterActivity.this,LoginActivity.class));\n finish();\n }\n });\n\n }catch (NullPointerException e){\n usn.setError(\"Invalid USN. Please check your input or contact\" +\n \" your department for help\");\n progressBar.setVisibility(View.INVISIBLE);\n }\n }\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n }))\n .addOnFailureListener(e -> {\n progressBar.setVisibility(View.INVISIBLE);\n Snackbar.make(view,\"Something went wrong.Please check if you have an internet connection or that the details\" +\n \"entered are valid\",Snackbar.LENGTH_LONG).show();\n });\n }", "public void OnRegisterButtonClick(View view) {\n\n String error_fill_text = \"This field cannot be left blank\";\n\n\n /* InputValidation for the various textFields that is, tests to see if the\n * textInputEditTextFields are filled or not\n */\n\n if (textInputEditText_student_id.getText().toString().trim().equalsIgnoreCase(\"\"))\n {\n textInputEditText_student_id.setError(error_fill_text);\n Toast.makeText(RegistrationActivity.this, \"Student ID is a required field!...\", Toast.LENGTH_LONG).show();\n }\n\n else if (textInputEditText_pin.getText().toString().trim().equalsIgnoreCase(\"\"))\n {\n textInputEditText_pin.setError(error_fill_text);\n Toast.makeText(RegistrationActivity.this, \"Pin is a required field!...\", Toast.LENGTH_LONG).show();\n }\n\n else if (textInputEditText_confirm_pin.getText().toString().trim().equalsIgnoreCase(\"\") &&\n !textInputEditText_confirm_pin.getText().toString().trim().equals(textInputEditText_pin.getText().toString().trim()))\n {\n textInputEditText_confirm_pin.setError(\"Your Pin must match and must be at least 5 characters in length\"); //Displays a warning about password not matching\n Toast.makeText(RegistrationActivity.this, \"Password does not match!...\", Toast.LENGTH_LONG).show();\n }\n\n else if(textInputEditText_full_name.getText().toString().trim().equalsIgnoreCase(\"\")\n && textInputEditText_student_id.getText().toString().trim().equalsIgnoreCase(\"\")\n && textInputEditText_confirm_pin.getText().toString().trim().equalsIgnoreCase(\"\")\n && textInputEditText_pin.getText().toString().trim().equalsIgnoreCase(\"\"))\n {\n Toast.makeText(RegistrationActivity.this, \"All fields are required!...Please fill them to proceed\", Toast.LENGTH_LONG).show();\n }\n else\n {\n onRegisterVoter();\n }\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tString username = etUsername.getText().toString();\n\t\t\t\tString pwd = etPassword.getText().toString();\n\t\t\t\tString pwd1 = etPassword1.getText().toString();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif (TextUtils.isEmpty(etUsername.getText())) {\n\t\t\t\t\tToast.makeText(RegisterActivity.this, \"Username cannot be empty!\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(TextUtils.isEmpty(etPassword.getText()) || TextUtils.isEmpty(etPassword1.getText())){\n\t\t\t\t\tToast.makeText(RegisterActivity.this, \"Password cannot be empty!\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(!pwd.equals(pwd1)){\n\t\t\t\t\tToast.makeText(RegisterActivity.this, \"Password should be the same!\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tUser user = new User(username, pwd);\n\t\t\t\t\n\t\t\t\tnew Register(user, RegisterActivity.this, new Register.SuccessCallBack() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onSuccess() {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\tToast.makeText(RegisterActivity.this,\"Sign up successfully!\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\tstartActivity(new Intent(RegisterActivity.this, LoginActivity.class));\n\t\t\t\t\t}\n\t\t\t\t}, new Register.FailCallBack() {\n\t\t\t\t\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onFail() {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\tToast.makeText(RegisterActivity.this, \"Username already exists!\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}", "private void registerUser()\n {\n /*AuthService.createAccount takes a Consumer<Boolean> where the result will be true if the user successfully logged in, or false otherwise*/\n authService.createAccount(entryService.extractText(namedFields), result -> {\n if (result.isEmpty()) {\n startActivity(new Intent(this, DashboardActivity.class));\n } else {\n makeToast(result);\n formContainer.setAlpha(1f);\n progressContainer.setVisibility(View.GONE);\n progressContainer.setOnClickListener(null);\n }\n });\n }", "private void attemptRegistration() {\n emailView.setError(null);\n passwordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = emailView.getText().toString();\n String password = passwordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (TextUtils.isEmpty(password) || !isPasswordValid(password)) {\n passwordView.setError(getString(R.string.error_invalid_password));\n focusView = passwordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n emailView.setError(getString(R.string.error_field_required));\n focusView = emailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n emailView.setError(getString(R.string.error_invalid_email));\n focusView = emailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n createFirebaseUser();\n\n }\n }", "private void registerUser() {\n\n // Get register name\n EditText mRegisterNameField = (EditText) findViewById(R.id.register_name_field);\n String nickname = mRegisterNameField.getText().toString();\n\n // Get register email\n EditText mRegisterEmailField = (EditText) findViewById(R.id.register_email_field);\n String email = mRegisterEmailField.getText().toString();\n\n // Get register password\n EditText mRegisterPasswordField = (EditText) findViewById(R.id.register_password_field);\n String password = mRegisterPasswordField.getText().toString();\n\n AccountCredentials credentials = new AccountCredentials(email, password);\n credentials.setNickname(nickname);\n\n if (DataHolder.getInstance().isAnonymous()) {\n credentials.setOldUsername(DataHolder.getInstance().getUser().getUsername());\n }\n\n sendRegistrationRequest(credentials);\n }", "public void UserSignUp(View view)\n {\n // get the data from text fields\n inputName = ((EditText) findViewById(R.id.signUpEditTextName)).getText().toString();\n inputEmail = ((EditText) findViewById(R.id.signUpEditTextEmail)).getText().toString();\n inputPhoneNumber = ((EditText) findViewById(R.id.signUpEditTextPhoneNumber)).getText().toString();\n inputPassword = ((EditText) findViewById(R.id.signUpEditTextPassword)).getText().toString();\n inputRepeatPassword = ((EditText) (findViewById(R.id.signUpEditTextRepeatPassword))).getText().toString();\n\n // If some text fields are empty\n if(inputName.equals(\"\") || inputEmail.equals(\"\") || inputPhoneNumber.equals(\"\")\n || inputPassword.equals(\"\") || inputRepeatPassword.equals(\"\")) {\n Toast.makeText(SignUpActivity.this, \"All fields are required!\", Toast.LENGTH_LONG).show();\n finish();\n startActivity(getIntent());\n }\n // if password and repeat password are matched\n else if(inputPassword.compareTo(inputRepeatPassword) == 0) {\n // if there is internet connection\n if (CheckNetworkConnection.checknetwork(getApplicationContext()))\n new CreateNewUser().execute();\n else\n Toast.makeText(SignUpActivity.this, \"No Internet Connection!\", Toast.LENGTH_LONG).show();\n }\n // if password and repeat password do not matched\n else {\n Toast.makeText(SignUpActivity.this, \"Passwords do not match!\", Toast.LENGTH_LONG).show();\n finish();\n startActivity(getIntent());\n }\n\n }", "@Override\n public void onValidationSucceeded() {\n String email = mEmailField.getText().toString();\n String firstName = mFirstNameField.getText().toString();\n String lastName = mLastNameField.getText().toString();\n String password = mPasswordField.getText().toString();\n\n mSignUpInterface.onSignup(email, firstName, lastName, password);\n }", "public void onClickSignUp(View view) {\r\n\t\tcheckRegistationValidation();\r\n\t}", "public String createRegisterForm(Register reg)\n {\n DBConnect db = new DBConnect();\n Connection con;\n \n try\n {\n con = (Connection) db.establishConnection();\n String q = \"insert into registerUser (register_name, register_email, register_phone, register_pass)\"\n + \"values (?, ?, ?, ?)\";\n \n PreparedStatement prepareState = con.prepareStatement(q);\n \n prepareState.setString(1, reg.getRegisterName());\n prepareState.setString(2, reg.getRegisterEmail());\n prepareState.setString(3, reg.getRegisterPhone());\n prepareState.setString(4, reg.getRegisterPassword());\n \n prepareState.execute();\n con.close();\n \n return \"Successfully Registered..!!\";\n }\n \n catch(Exception ex)\n {\n System.err.println(\"Exception..!!\");\n System.err.println(\"Message: \" + ex.getMessage());\n \n return \"Data Not Registered..!!\";\n }\n \n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tString nameS = name.getText().toString();\n\t\t\t\tif (nameS.equals(\"\")) {\n\t\t\t\t\tToast.makeText(RegisterActivity.this, \"用户名不可为空\",\n\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tString passOne = password.getText().toString();\n\t\t\t\tString passTwo = surePassword.getText().toString();\n\t\t\t\tif (!passOne.equals(passTwo)) {\n\t\t\t\t\tToast.makeText(RegisterActivity.this, \"密码不一致\",\n\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tMap<String, String> xml = new HashMap<String, String>();\n\t\t\t\txml.put(\"head\", \"register\");\n\t\t\t\txml.put(\"username\", nameS);\n\t\t\t\txml.put(\"password\", passOne);\n\t\t\t\tUserRegister reg = new UserRegister(getApplicationContext(),\n\t\t\t\t\t\thandler);\n\t\t\t\treg.register(xml);\n\t\t\t}", "@Override\n public void onClick(View v) {\n firstNameText = capitalizeFirstLetter(firstNameET.getText().toString());\n lastNameText = capitalizeFirstLetter(lastNameET.getText().toString());\n emailText = (emailET.getText().toString()).toLowerCase();\n passwordText = passwordET.getText().toString();\n reEnterPasswordText = reEnterPasswordET.getText().toString();\n\n // Using the user-inputted information to register the user via this method\n registerUser(firstNameText, lastNameText, emailText, passwordText, reEnterPasswordText);\n }", "public void registerUser(RegisterForm form) throws DAOException;", "private void doRegister(){\n Map<String, String> mParams = new HashMap<>();\n mParams.put(\"account\", etPhone.getText().toString());\n mParams.put(\"password\", etPwd.getText().toString());\n mParams.put(\"code\", etValid.getText().toString());\n\n x.http().post(HttpUtils.getRequestParams(\"/teacher/v1/register\", mParams),\n\n new Callback.CommonCallback<String>() {\n @Override\n public void onSuccess(String result) {\n\n CustomProgress.hideDialog();\n LogUtil.d(\"\"+result);\n Response response = CommonUtil.checkResponse(result);\n if (response.isStatus()) {\n SharedPreferences shareAutoLogin = MyApplication.getInstance().getShareAutoLogin();\n SharedPreferences.Editor editor = shareAutoLogin.edit();\n editor.putBoolean(MyApplication.getInstance().AUTOLOGIN, true);\n editor.commit();\n MyApplication.getInstance().setShareApp(etPhone.getText().toString(), etPwd.getText().toString());\n User user = User.getUserFromJsonObj(response.getData().optJSONObject(\"data\"));\n User.setCurrentUser(user);\n MobclickAgent.onProfileSignIn(user.getNickName());\n\n // 登录环信\n if (!StringUtils.isEmpty(user.hxId) && !StringUtils.isEmpty(user.hxPwd))\n AppUtils.loginEmmobAndSaveInfo(user);\n\n // 极光推送设置别名\n JPushInterface.setAlias(RegisterActivity.this, user.getId() + \"\", new TagAliasCallback() {\n @Override\n public void gotResult(int i, String s, Set<String> set) {\n if (i == 0) {\n LogUtil.i(\"极光推送别名设置成功,别名:\" + s);\n }\n }\n });\n\n socketLogin(user.getToken());\n\n Intent intent = new Intent(RegisterActivity.this, CodeActivity.class);\n startActivity(intent);\n finish();\n } else {\n Toast.makeText(x.app(), response.getData().optString(\"message\"), Toast.LENGTH_SHORT).show();\n\n }\n }\n\n @Override\n public void onError(Throwable ex, boolean isOnCallback) {\n\n CustomProgress.hideDialog();\n\n if (ex instanceof HttpException) { // 网络错误\n HttpException httpEx = (HttpException) ex;\n int responseCode = httpEx.getCode();\n String responseMsg = httpEx.getMessage();\n String errorResult = httpEx.getResult();\n LogUtil.d(responseCode + \":\" + responseMsg);\n Toast.makeText(x.app(), x.app().getResources().getString(R.string.net_error), Toast.LENGTH_SHORT).show();\n } else { // 其他错误\n // ...\n }\n //Toast.makeText(x.app(), ex.getMessage(), Toast.LENGTH_LONG).show();\n }\n\n @Override\n public void onCancelled(CancelledException cex) {\n Toast.makeText(x.app(), \"cancelled\", Toast.LENGTH_LONG).show();\n }\n\n @Override\n public void onFinished() {\n\n }\n });\n\n }", "@Override\n public void onClick(View view) {\n EditText user = (EditText) findViewById(R.id.editTextName);\n EditText em = (EditText) findViewById(R.id.editTextEmail);\n EditText first = (EditText) findViewById(R.id.editTextFirstName);\n EditText last = (EditText) findViewById(R.id.editTextLastName);\n EditText pass = (EditText) findViewById(R.id.editTextPassword);\n EditText confirmpass = (EditText) findViewById(R.id.editTextConfirmPassword);\n\n // convert everything to string\n String username = user.getText().toString();\n String email = em.getText().toString();\n String firstname = first.getText().toString();\n String lastname = last.getText().toString();\n String password = pass.getText().toString();\n String confirmpassword = confirmpass.getText().toString();\n\n boolean check = checkfields(username,email,firstname,lastname,password,confirmpassword);\n\n if (check) {\n Log.i(\"success\", \"all info is correct\");\n\n createPost(username,firstname,lastname,email,password,confirmpassword);\n\n }\n else{\n Log.i(\"Fail\", \"something is not right\");\n }\n\n //Log.i(\"string\", \"name: \" +username);\n //Log.i(\"string generate\", \"email: \" +email);\n }", "UserRegistrationResponse registrationPost(RegistrationForm registrationForm);", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tnew Register().execute();\r\n\r\n\t\t\t}", "@Override\n public void onClick(View view) {\n\n\n\n if(globalClass.isNetworkAvailable()){\n if(!edt_name.getText().toString().isEmpty()) {\n if (!edt_phone.getText().toString().isEmpty()) {\n if (!edt_email.getText().toString().isEmpty()) {\n if (isValidEmail(edt_email.getText().toString())) {\n if (!edt_password.getText().toString().isEmpty()) {\n\n\n String name = edt_name.getText().toString();\n String phone = edt_phone.getText().toString();\n String email = edt_email.getText().toString();\n String password = edt_password.getText().toString();\n\n registration_url(name,phone,email,password,device_id,WebserviceUrl.fcm_token,globalClass.device_type);\n\n } else {\n Toasty.warning(Signup.this, \"Please enter password.\", Toast.LENGTH_SHORT, true).show();}\n } else {\n Toasty.warning(Signup.this, \"Please enter valid email.\", Toast.LENGTH_SHORT, true).show();}\n } else {\n Toasty.warning(Signup.this, \"Please enter email.\", Toast.LENGTH_SHORT, true).show();}\n } else {\n Toasty.warning(Signup.this, \"Please enter phone number.\", Toast.LENGTH_SHORT, true).show();}\n }else{\n Toasty.warning(Signup.this, \"Please enter name\", Toast.LENGTH_SHORT, true).show();}\n }else {\n Toasty.info(Signup.this, \"please check your internet connection\", Toast.LENGTH_SHORT, true).show();\n }\n\n }", "@Override\n public void onClick(View view) {\n startActivityForResult(new Intent(getContext(),RegistrarNotas.class),REGISTER_FORM_REQUEST);\n }", "private void callRegisterByEmailToGoogleFirebase(){\n mFirebaseAuth = FirebaseAuth.getInstance();\n\n String userEmail = mEmailAddress.getText().toString();\n String userPassword = mPassword.getText().toString();\n\n // create the user with email and password\n mFirebaseAuth.createUserWithEmailAndPassword(userEmail,userPassword).addOnCompleteListener(getActivity(), new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()){\n showBottomSnackBar(\"Corresponding Firebase User Created\");\n }else{\n showBottomSnackBar(\"Firebase User Creation Fails\");\n }\n\n replaceActivity(MainActivity.class, null);\n }\n });\n\n }", "private void register() {\n Intent intent = new Intent(LoginActivity.this, RegisterActivity.class);\n startActivity(intent);\n }", "@Override\n public void onClick(View v) {\n CheckEditTextIsEmptyOrNot();\n\n if (CheckEditText) {\n\n // If EditText is not empty and CheckEditText = True then this block will execute.\n\n\n token = FirebaseInstanceId.getInstance().getToken();\n\n if (!pass.getText().toString().equals(con_pass.getText().toString())) {\n Toast.makeText(Parent_Registration.this, \"Password you entered is not same\", Toast.LENGTH_SHORT).show();\n } else {\n\n\n try {\n ParentRegistration(van_route_holder, kid_nam_holdder, sch_nam_holder,\n sch_loc_holder, cls_holder, address_holder, mother_nam_holder, mother_no_holder,\n father_nam_holder, father_no_holder, pass_holder, imagetostr(pro_img_bitmap), van_no, token,\n String.valueOf(latitude), String.valueOf(longitude));\n submit.setEnabled(false);\n\n } catch (Exception ex) {\n Toast.makeText(Parent_Registration.this, \"Something Went Wrong!!\", Toast.LENGTH_SHORT).show();\n }\n\n\n }\n\n\n } else {\n\n // If EditText is empty then this block will execute .\n Toast.makeText(Parent_Registration.this, \"Please fill all Form fields.\", Toast.LENGTH_LONG).show();\n\n }\n\n }", "private void sign_up() {\n final String name = nameET.getText().toString().trim();\n final String cell = cellET.getText().toString().trim();\n final String division = divisionET.getText().toString().trim();\n final String address = addressEt.getText().toString().trim();\n final String password = passwordET.getText().toString().trim();\n final String account_type = accouttypeET.getText().toString().trim();\n final String status=\"Pending\";\n\n\n //Checking field/validation\n if (name.isEmpty()) {\n nameET.setError(\"Please enter name !\");\n requestFocus(nameET);\n }\n else if (cell.length()!=11) {\n\n cellET.setError(\"Please enter valid phone number !\");\n requestFocus(cellET);\n\n }\n\n else if (division.isEmpty()) {\n\n divisionET.setError(\"Please select division !\");\n requestFocus(divisionET);\n Toasty.error(this, \"Please select division !\", Toast.LENGTH_SHORT).show();\n }\n else if (address.isEmpty()) {\n\n addressEt.setError(\"Please enter full address !\");\n requestFocus(addressEt);\n }\n else if (account_type.isEmpty()) {\n\n accouttypeET.setError(\"Please select account type !\");\n requestFocus(accouttypeET);\n Toasty.error(this, \"Please select account type !\", Toast.LENGTH_SHORT).show();\n }\n else if (password.isEmpty()) {\n\n passwordET.setError(\"Please enter password !\");\n requestFocus(passwordET);\n }\n else if (password.length() < 4) {\n\n passwordET.setError(\"Password should be more than 3 characters!\");\n requestFocus(passwordET);\n }\n\n else\n {\n loading = new ProgressDialog(this);\n loading.setIcon(R.drawable.wait_icon);\n loading.setTitle(\"Sign up\");\n loading.setMessage(\"Please wait....\");\n loading.show();\n\n\n StringRequest stringRequest=new StringRequest(Request.Method.POST, Constant.SIGNUP_URL, new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n\n //for track response in logcat\n Log.d(\"RESPONSE\", response);\n\n if (response.equals(\"success\")) {\n loading.dismiss();\n Intent intent = new Intent(RegisterActivity.this, LoginActivity.class);\n Toasty.success(RegisterActivity.this, \"Registration successful\", Toast.LENGTH_SHORT).show();\n startActivity(intent);\n } else if (response.equals(\"exists\")) {\n\n Toasty.warning(RegisterActivity.this, \"User already exists!\", Toast.LENGTH_SHORT).show();\n loading.dismiss();\n\n }\n\n else if (response.equals(\"failure\")) {\n\n Toasty.error(RegisterActivity.this, \"Registration Failed!\", Toast.LENGTH_SHORT).show();\n loading.dismiss();\n\n }\n }\n },\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n\n Toasty.error(RegisterActivity.this, \"No Internet Connection or \\nThere is an error !!!\", Toast.LENGTH_SHORT).show();\n loading.dismiss();\n }\n }\n\n ){\n @Override\n protected Map<String, String> getParams() throws AuthFailureError {\n Map<String, String> params = new HashMap<>();\n //Adding parameters to request\n\n params.put(Constant.KEY_NAME, name);\n params.put(Constant.KEY_CELL, cell);\n params.put(Constant.KEY_DIV, division);\n params.put(Constant.KEY_ADDRESS, address);\n params.put(Constant.KEY_AC_TYPE, account_type);\n params.put(Constant.KEY_PASSWORD, password);\n params.put(Constant.KEY_STATUS, status);\n\n Log.d(\"url_info\",Constant.SIGNUP_URL);\n\n //returning parameter\n return params;\n }\n };\n\n //Adding the string request to the queue\n RequestQueue requestQueue = Volley.newRequestQueue(this);\n requestQueue.add(stringRequest);\n }\n }", "@Override\n public void onClick(View view) {\n if ( checkValidation () )\n submitForm();\n \n }", "public void attemptRegister() throws IOException, ClassNotFoundException {\n\t\t// Reset errors.\n\t\t//mEmailView.setError(null);\n\t\t//mPasswordView.setError(null);\n\n\t\t// Reset errors.\n\t\tmFullNameView.setError(null);\t\t\n\t\tmEmailView.setError(null);\n\t\tmPasswordView.setError(null);\n\t\tLog.d(\"Rafa\",\"En el register .... \");\n\t\t\n\t\t// Store values at the time of the login attempt.\n\t\tmFullName = mFullNameView.getText().toString();\n\t\tmEmail = mEmailView.getText().toString();\n\t\tmPassword = mPasswordView.getText().toString();\n\n\t\tboolean cancel = false;\n\t\tView focusView = null;\n\n\t\tLog.d(\"Rafa\",\"En el register ... FullName \");\t\t\n\t\t// Check for a valid password.\n\t\tif (TextUtils.isEmpty(mFullName)) {\n\t\t\tmFullNameView.setError(getString(R.string.error_field_required));\n\t\t\tfocusView = mFullNameView;\n\t\t\tcancel = true;\n\t\t} else if (mFullName.length() < 4) {\n\t\t\tmFullNameView.setError(getString(R.string.error_invalid_password));\n\t\t\tfocusView = mFullNameView;\n\t\t\tcancel = true;\n\t\t}\n\n\t\tLog.d(\"Rafa\",\"En el register ... Email \");\t\t\n\t\t// Check for a valid email address.\n\t\tif (TextUtils.isEmpty(mEmail)) {\n\t\t\tmEmailView.setError(getString(R.string.error_field_required));\n\t\t\tfocusView = mEmailView;\n\t\t\tcancel = true;\n/*\t\t} else if (!mEmail.contains(\"preventa\")) {\n\t\t\tmEmailView.setError(getString(R.string.error_invalid_email));\n\t\t\tfocusView = mEmailView;\n\t\t\tcancel = true;\n*/\t\t\t\n\t\t}\t\t\n\t\t\n\t\tLog.d(\"Rafa\",\"En el register ... Password \");\n\t\t// Check for a valid password.\n\t\tif (TextUtils.isEmpty(mPassword)) {\n\t\t\tmPasswordView.setError(getString(R.string.error_field_required));\n\t\t\tfocusView = mPasswordView;\n\t\t\tcancel = true;\n\t\t} else if (mPassword.length() < 4) {\n\t\t\tmPasswordView.setError(getString(R.string.error_invalid_password));\n\t\t\tfocusView = mPasswordView;\n\t\t\tcancel = true;\n\t\t}\n\n\t\t\n\t\tLog.d(\"Rafa\",\"pasa x aquí ... \" + mFullName + \"-\" + mEmail + \"-\" + mPassword);\n\t\t\n\t\tClass.forName(\"org.postgresql.Driver\");\n\t\tString url;\n\t\turl = \"jdbc:postgresql://192.168.4.20:5432/\" +\n\t\t\t\t\"curso\" +\n\t\t\t\t\"?sslfactory=org.postgresql.ssl.NonValidatingFactory\"; // +\n\t\t\t\t//\"&ssl=true\";\n\t\t\n\t\tConnection conn;\n\t\ttry {\n\t\t\tconn = DriverManager.getConnection(url,\"postgres\",\"\");\n\t\t\tPreparedStatement is = conn.prepareStatement(\n\t\t\t\t\t\"INSERT INTO registro (nombre_completo, ecorreo, password) VALUES (?, ?, ?);\");\n\t\t\t\n\t\t\tis.setString(1,mFullName);\n\t\t\tis.setString(2,mEmail);\n\t\t\tis.setString(3,mPassword);\n\t\t\t\n\t\t\tint rows = is.executeUpdate();\n\t\t\tis.close();\n\t\t\t\n\t\t\tLog.d(\"Rafa\",\"rows <\" + rows + \">\");\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\tLog.d(\"Rafa\",\"SQLException \" + e.getErrorCode() + \"-\" + e.getCause() + \"-\" + e.getLocalizedMessage() + \"-\" + e.getMessage() );\t\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t\n\t\t\n\t\tif (cancel) {\n\t\t\t// There was an error; don't attempt login and focus the first\n\t\t\t// form field with an error.\n\t\t\tfocusView.requestFocus();\n\t\t} else {\n\t\t\t// Show a progress spinner, and kick off a background task to\n\t\t\t// perform the user login attempt.\n\t\t\t//mLoginStatusMessageView.setText(R.string.login_progress_signing_in);\n\t\t\tToast.makeText(getApplicationContext(), \"Registrando:\" + mFullName + \"-\" + mEmail + \"-\" + mPassword , Toast.LENGTH_LONG).show();\t\t\t\n\t\t}\n\t}", "private void register() {\n RegisterModel registerModel = new RegisterModel(edtEmail.getText().toString(),\n edtPaswd.getText().toString(),\n edtDisplayName.getText().toString());\n\n Response.Listener<RegisterApiResponse> responseListener = new Response.Listener<RegisterApiResponse>() {\n @Override\n public void onResponse(RegisterApiResponse response) {\n if (response.isSuccess()) login();\n }\n };\n\n Response.ErrorListener errorListener = new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n progressDialog.cancel();\n if (error != null) {\n String errorMsg = \"An error occurred\";\n String err = (error.getMessage() == null) ? errorMsg : error.getMessage();\n Log.d(TAG, err);\n error.printStackTrace();\n\n if (err.matches(AppConstants.CONNECTION_ERROR) || err.matches(AppConstants.TIMEOUT_ERROR)) {\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(RegisterActivity.this);\n alertDialog.setTitle(getString(R.string.error_title_signup));\n alertDialog.setMessage(getString(R.string.error_message_network)).setCancelable(false)\n .setPositiveButton(getString(R.string.dialog_ok), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }\n });\n alertDialog.show();\n } else if (err.matches(\".*Duplicate entry .* for key 'name_UNIQUE'.*\")) {\n edtDisplayName.setError(\"username taken\");\n edtDisplayName.requestFocus();\n } else if (err.matches(\".*The email has already been taken.*\")) {\n edtEmail.setError(\"email taken\");\n edtEmail.requestFocus();\n } else {\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(RegisterActivity.this);\n alertDialog.setTitle(getString(R.string.error_title_signup));\n alertDialog.setMessage(getString(R.string.error_message_network)).setCancelable(false)\n .setPositiveButton(getString(R.string.dialog_ok), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }\n });\n alertDialog.show();\n }\n }\n }\n };\n\n\n progressDialog.setMessage(getString(R.string.progress_dialog_message_login));\n RegistrationRequests registerRequest =\n RegistrationRequests.register(this, registerModel, responseListener, errorListener);\n VolleyRequest.getInstance(this.getApplicationContext()).addToRequestQueue(registerRequest);\n progressDialog.show();\n }", "private void submit(){\n\t\tnew Thread(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tMyApp app = new MyApp();\n\t\t\t\tapp.user = mUser.getText().toString();\n\t\t\t\tapp.password = mPassword.getText().toString();\n\t\t\t\tMyDbHelper dbHelper = MyDbHelper.getInstance(getApplicationContext());\n\t\t\t\ttry {\n\t\t\t\t\tdbHelper.insert(MyDbHelper.TABLE_NAME, null, app.toContentValues());\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} finally{\n\t\t\t\t\tdbHelper.close();\n\t\t\t\t\tdbHelper = null;\n\t\t\t\t}\n\t\t\t}\n\t\t}).start();\n\t\t//finish self\n\t\tfinish();\n\t}", "public void signup(){\n\t\tboolean result = SignUpForm.display(\"Chocolate Chiptunes - Sign Up\", \"Sign-Up Form\");\n\t\tSystem.out.println(result);\n\t}", "public void signUp() {\n presenter.signup(username.getText().toString(), password.getText().toString());\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == REQUEST_CODE_REGISTER) {\n if (resultCode == RESULT_OK) {\n\n // TODO: Implement successful register logic here\n // If register is successfully, automatically doLogin and go to MainActivity\n this.finish();\n }\n }\n }", "public void onSignUpClick() {\n\t\tString uid = regview.getUsername();\n\t\tString pw = regview.getPassword();\n\t\tString na = regview.getName();\n\t\tString em = regview.getEmail();\n\t\tString text = \"\";\n\t\tif(uid.equals(\"\") || pw.equals(\"\") || na.equals(\"\")|| em.equals(\"\")){\n\t\t\ttext = \"Please fill out all fields!\";\n\t\t} else if(regview.findUser(uid)!=User.NULL_USER){\n\t\t\ttext = \"The username already exsit, please try another one!\";\n\t\t} else {\n\t\t\tregview.addUser(new User(uid,pw,na,em));\n\t\t\tregview.goLoginPage();\n\t\t}\n\t\tregview.setRegisterText(text);\n\t}", "public void RegisterUser() {\n try {\n reg = new Registration();\n reg.setFirstName(FName);\n reg.setLastName(LName);\n reg.setCompanyName(CompanyName);\n reg.setEmail(Email);\n reg.setMobile(mobile);\n ValidateRegistration validator = new ValidateRegistration();\n boolean legitmail = validator.validateEmail(reg);\n if ( legitmail == false ) {\n System.out.println(\"Not a legitimate Email\");\n FacesContext c = FacesContext.getCurrentInstance();\n FacesMessage m = new FacesMessage(\"Invalid Email\", \"The email provided is not correct\");\n c.addMessage(null, m);\n } else {\n FacesContext c = FacesContext.getCurrentInstance();\n c.getApplication().getNavigationHandler().handleNavigation(c, null, \"mainpage.xhtml\");\n }\n } catch (Exception ex) {\n System.out.println(ex.getMessage());\n }\n }", "@Override\n public void onClick(View v) {\n switch(v.getId()) {\n case R.id.register_btn:\n\n String user_name = user_name_et.getText().toString();\n String password = password_et.getText().toString();\n\n if (TextUtils.isEmpty(user_name)) {\n Toast.makeText(getApplicationContext(), getString(R.string.error_user_empty), Toast.LENGTH_LONG).show();\n return;\n }\n if (TextUtils.isEmpty(password)) {\n Toast.makeText(getApplicationContext(), getString(R.string.error_password_empty), Toast.LENGTH_LONG).show();\n return;\n }\n\n try {\n if (registerPro()) {\n Toast.makeText(RegisterActivity.this, \"注册成功\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(RegisterActivity.this, \"该用户名已经存在\", Toast.LENGTH_SHORT).show();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n// db.insert(user_name, phone, password);\n Intent intent = new Intent(RegisterActivity.this, DesktopActivity.class);\n intent.putExtra(\"loginState\",true);\n intent.putExtra(\"username\",user_name);\n startActivity(intent);\n finish();\n break;\n case R.id.return_btn:\n this.finish();\n break;\n }\n }", "private void submitForm(){\n String toast_message;\n\n int time = getValueOfField(R.id.at_editTextNumberSigned_timeValue);\n int easyNumber = getValueOfField(R.id.at_editTextNumberSigned_levelEasyValue);\n int mediumNumber = getValueOfField(R.id.at_editTextNumberSigned_levelMiddleValue);\n int highNumber = getValueOfField(R.id.at_editTextNumberSigned_levelHighValue);\n int hardcoreNumber = getValueOfField(R.id.at_editTextNumberSigned_levelExpertValue);\n\n // if time is between 0 and 1440 min\n if (time > 0){\n if(time < 24*60){\n // if numbers are positives\n if (easyNumber >= 0 && mediumNumber >= 0 && highNumber >= 0 && hardcoreNumber >= 0){\n\n // save data\n int id = this.controller.getLastIdTraining() + 1;\n\n ArrayList<Level> listLevel = new ArrayList<>();\n listLevel.add(new Level(\"EASY\", easyNumber));\n listLevel.add(new Level(\"MEDIUM\", mediumNumber));\n listLevel.add(new Level(\"HIGHT\", highNumber));\n listLevel.add(new Level(\"HARDCORE\", hardcoreNumber));\n\n Training training = new Training(id, inputCalendar.getTime(), time, listLevel);\n\n this.controller.AddTraining(training);\n\n // init values of Form\n initForm(null);\n\n // redirection to stats page\n Navigation.findNavController(getActivity(),\n R.id.nav_host_fragment).navigate(R.id.navigation_list_training);\n\n toast_message = \"L'entrainement a bien été ajouté !\";\n }else toast_message = \"Erreur:\\nToutes les valeurs de voies ne sont pas positive !\";\n }else toast_message = \"La durée ne doit pas exceder 1440 min.\";\n }else toast_message = \"La durée doit être supérieur à 0 min.\\n\";\n\n // Send alert\n Toast.makeText(getContext(), toast_message, Toast.LENGTH_LONG).show();\n }", "private void register() {\n\n //Displaying a progress dialog\n final ProgressDialog loading = ProgressDialog.show(this, \"Registering\",\n \"Please wait...\", false, false);\n\n\n //Getting user data\n// username = editTextUsername.getText().toString().trim();\n// password = editTextPassword.getText().toString().trim();\n// phone = editTextPhone.getText().toString().trim();\n\n\n Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n loading.dismiss();\n confirmOtp();\n }\n }, 3000);\n\n\n //Again creating the string request\n// StringRequest stringRequest = new StringRequest(Request.Method.POST, Config.REGISTER_URL,\n// new Response.Listener<String>() {\n// @Override\n// public void onResponse(String response) {\n// loading.dismiss();\n// try {\n// //Creating the json object from the response\n// JSONObject jsonResponse = new JSONObject(response);\n//\n// //If it is success\n// if(jsonResponse.getString(Config.TAG_RESPONSE).equalsIgnoreCase(\"Success\")){\n// //Asking user to confirm otp\n// confirmOtp();\n// }else{\n// //If not successful user may already have registered\n// Toast.makeText(BusinessRegistration.this, \"Username or Phone number already registered\", Toast.LENGTH_LONG).show();\n// }\n// } catch (JSONException e) {\n// e.printStackTrace();\n// }\n// }\n// },\n// new Response.ErrorListener() {\n// @Override\n// public void onErrorResponse(VolleyError error) {\n// loading.dismiss();\n// Toast.makeText(BusinessRegistration.this, error.getMessage(), Toast.LENGTH_LONG).show();\n// }\n// }) {\n// @Override\n// protected Map<String, String> getParams() throws AuthFailureError {\n// Map<String, String> params = new HashMap<>();\n// //Adding the parameters to the request\n// params.put(Config.KEY_USERNAME, username);\n// params.put(Config.KEY_PASSWORD, password);\n// params.put(Config.KEY_PHONE, phone);\n// return params;\n// }\n// };\n\n //Adding request the the queue\n// requestQueue.add(stringRequest);\n }", "private void attemptRegister() {\n if (mRegisterTask != null) {\n return;\n }\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n mRePasswordView.setError(null);\n mNameView.setError(null);\n mSurnameView.setError(null);\n mUsernameView.setError(null);\n\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n String rePassword = mRePasswordView.getText().toString();\n String name = mNameView.getText().toString();\n String surname = mSurnameView.getText().toString();\n String username = mUsernameView.getText().toString();\n\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) &&!isPasswordValid(password, rePassword)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n } else if (!TextUtils.isEmpty(rePassword) &&!isPasswordMatch(password, rePassword)) {\n mRePasswordView.setError(getString(R.string.error_incorrect_password));\n focusView = mRePasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (TextUtils.isEmpty(name)) {\n mNameView.setError(getString(R.string.error_field_required));\n focusView = mNameView;\n cancel = true;\n }\n\n if (TextUtils.isEmpty(surname)) {\n mSurnameView.setError(getString(R.string.error_field_required));\n focusView = mSurnameView;\n cancel = true;\n }\n\n if (TextUtils.isEmpty(username)) {\n mUsernameView.setError(getString(R.string.error_field_required));\n focusView = mUsernameView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n\n String deviceId = Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n\n if(deviceId == null)\n deviceId = \"oddDevice\";\n Log.d(\"Custom\" , deviceId);\n String gender = (String)mGender.getSelectedItem();\n String device = deviceId;\n mRegisterTask = new RegisterTask(email, password, name, surname, username, gender, device );\n\n mRegisterTask.execute((Void) null);\n }\n }", "@Override\n public void onClick(View view) {\n final String username = usernameInput.getText().toString();\n final String password = passwordInput.getText().toString();\n final String email = emailInput.getText().toString();\n final String handle = handleInput.getText().toString();\n signup(username, password, email, handle);\n }", "@Override\n public void onClick(View v) {\n if(!isEmpty(mUserRegBinding.editTextPrivEmail.getText().toString())\n && !isEmpty(mUserRegBinding.editTextPrivPassword.getText().toString())\n && !isEmpty(mUserRegBinding.editTextPrivConfirmPassword.getText().toString())){\n\n //check if passwords match\n if(doStringsMatch(mUserRegBinding.editTextPrivPassword.getText().toString(),\n mUserRegBinding.editTextPrivConfirmPassword.getText().toString())){\n\n //Initiate user registration task\n registerNewEmail(mUserRegBinding.editTextPrivEmail.getText().toString(),\n mUserRegBinding.editTextPrivPassword.getText().toString());\n }else{\n Snackbar.make(getCurrentFocus().getRootView(), \"Passwords do not Match\", Snackbar.LENGTH_SHORT).show();\n }\n\n }else{\n Snackbar.make(getCurrentFocus().getRootView(), \"You must fill out all the fields\", Snackbar.LENGTH_SHORT).show();\n }\n }", "public void registerNewUser(View v) {\n Intent intent = new Intent(this, com.mms.memorizationgame.RegisterActivity.class);\n\n finish();\n startActivity(intent);\n }", "public void onRegisterPressed(View v) {\n String username = ((EditText) findViewById(R.id.usernameNew)).getText().toString();\n String password = ((EditText) findViewById(R.id.passwordNew)).getText().toString();\n String checkPassword = ((EditText) findViewById(R.id.passwordNew2)).getText().toString();\n Register register = new Register(username, password, checkPassword);\n TextView passwordCheck = findViewById(R.id.passwordCheck);\n TextView errorUsername = findViewById(R.id.errorUsername);\n\n if(!register.assertPassword()) {\n passwordCheck.setVisibility(View.VISIBLE);\n } else {\n passwordCheck.setVisibility(View.GONE);\n }\n if (!register.assertUsername()) {\n errorUsername.setVisibility(View.VISIBLE);\n } else {\n errorUsername.setVisibility(View.GONE);\n }\n if(register.assertUsername() && register.assertPassword()) {\n User user = new User(username, password, (UserTypes)userTypeSpinner.getSelectedItem());\n\n Toast.makeText(this, \"Account Added\", Toast.LENGTH_SHORT).show();\n\n Persistence.getInstance().write(User.SAVE_FILE, getApplicationContext(), user);\n\n Intent mainIntent = new Intent(this, MainActivity.class);\n mainIntent.putExtra(\"EXTRA_USER_TYPE\", user.getAccountType());\n startActivity(mainIntent);\n\n finish();\n }\n }", "@Override\n public void onClick(View v) {\n Phone = RegisterPhone.getText().toString();\n Password = RegisterPassword.getText().toString();\n Name = RegisterName.getText().toString();\n\n\n CreateNewAccount(Phone,Password,Name);\n }", "public void registerClicked(View view) {\n mDatabase = FirebaseDatabase.getInstance().getReference();\n\n\n //Creates local variable for user input on each field\n String name = ((EditText) findViewById(R.id.first_name)).getText().toString().trim();\n String lName = ((EditText) findViewById(R.id.last_name)).getText().toString().trim();\n String mail = ((EditText) findViewById(R.id.email_address)).getText().toString().trim();\n String pass = ((EditText) findViewById(R.id.confirm_password)).getText().toString().trim();\n\n HashMap<String, String> dataMap = new HashMap<String, String>();\n dataMap.put(\"Name\", name);\n dataMap.put(\"Last Name\", lName);\n dataMap.put(\"Email\", mail);\n dataMap.put(\"Password\", pass);\n\n //Push Hash Object to root of Database\n //The on-complete listener makes sure the information was pushed\n //successfully to the database.\n mDatabase.push().setValue(dataMap).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if(task.isSuccessful()){\n Toast.makeText(LogIn.this, \"Registered!\", Toast.LENGTH_LONG).show();\n }else {\n Toast.makeText(LogIn.this, \"Try Again\", Toast.LENGTH_LONG).show();\n }\n }\n });\n setContentView(R.layout.activity_log_in);\n setTypeFace();\n }", "public void Register() {\n Url url = new Url();\n User user = new User(fname.getText().toString(), lname.getText().toString(), username.getText().toString(), password.getText().toString());\n Call<Void> registerUser = url.createInstanceofRetrofit().addNewUser(user);\n registerUser.enqueue(new Callback<Void>() {\n @Override\n public void onResponse(Call<Void> call, Response<Void> response) {\n Toast.makeText(getActivity(), \"User Registered successfully\", Toast.LENGTH_SHORT).show();\n }\n\n @Override\n public void onFailure(Call<Void> call, Throwable t) {\n Toast.makeText(getActivity(), \"Error\" + t, Toast.LENGTH_SHORT).show();\n }\n });\n }", "public void signUp(View v) {\n attemptRegistration();\n }", "@OnClick(R.id.fragment_register_sign_up_button)\n public void validateSignupInformation() {\n mValidator.validate();\n }", "private void signUp() {\n if (mAuthTask != null) {\n return;\n }\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n mAuthTask = new UserLoginTask(email, password, true);\n mAuthTask.execute((Void) null);\n }\n }", "public void register_func(View v) {\n Intent ii = new Intent(Main.this, Register.class);\n startActivity(ii);\n finish();\n }", "private void sendRegistrationRequestToServer() {\r\n\t\tnew ServerAsyncTask(ApplicationConstant.appurl\r\n\t\t\t\t+ ApplicationConstant.registrationRequestType + \"&userid=62\"\r\n\t\t\t\t+ \"&email=\" + emailAddress.getText().toString().trim()\r\n\t\t\t\t+ \"&firstname=\" + firstName.getText().toString().trim()\r\n\t\t\t\t+ \"&lastname=\" + lastName.getText().toString().trim()\r\n\t\t\t\t+ \"&password=\" + password.getText().toString().trim()\r\n\t\t\t\t+ \"&roles=1\" + \"access=20\", context, new ResponseCallback() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onSuccessRecieve(Object object) {\r\n\r\n\t\t\t\tloadingProgress.setVisibility(View.GONE);\r\n\t\t\t\tshowToastMessage(\"Successfully register on app\");\r\n\t\t\t\tfinish();\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onErrorRecieve(Object object) {\r\n\r\n\t\t\t\tloadingProgress.setVisibility(View.GONE);\r\n\t\t\t\tshowToastMessage((String) object);\r\n\t\t\t}\r\n\t\t}, ApplicationConstant.registrationRequestType).execute();\r\n\r\n\t}", "private void registerUser(){\n final String email = editTextEmail.getText().toString().trim();\n final String password = editTextPassword.getText().toString().trim();\n final String name = editTextName.getText().toString().trim();\n int selectedId = radioGroup.getCheckedRadioButtonId();\n genderradioButton = (RadioButton) findViewById(selectedId);\n final String cat=genderradioButton.getText().toString();\n //checking if email and passwords are empty\n if(TextUtils.isEmpty(email)){\n Toast.makeText(this,\"Please enter email\",Toast.LENGTH_LONG).show();\n return;\n }\n\n if(TextUtils.isEmpty(password)){\n Toast.makeText(this,\"Please enter password\",Toast.LENGTH_LONG).show();\n return;\n }\n\n\n progressDialog.setMessage(\"Registering Please Wait...\");\n progressDialog.show();\n\n\n //creating a new user\n mAuth.createUserWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n //checking if success\n if(task.isSuccessful()){\n mAuth.getCurrentUser().sendEmailVerification()\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()){\n\n\n\n no = mobile.getText().toString();\n validNo(no);\n String user_id = mAuth.getCurrentUser().getEmail();\n DatabaseReference current_user_db = mDatabase.child(user_id);\n current_user_db.child(\"Category\").setValue(cat);\n current_user_db.child(\"Email\").setValue(email);\n current_user_db.child(\"Password\").setValue(password);\n current_user_db.child(\"mobileno\").setValue(no);\n current_user_db.child(\"Name\").setValue(name);\n\n Toast.makeText(SignupActivity.this,\"Successfully registered.please check your email\",Toast.LENGTH_LONG).show();\n editTextEmail.setText(\" \");\n editTextPassword.setText(\" \");\n }else {\n Toast.makeText(SignupActivity.this,task.getException().getMessage(),Toast.LENGTH_LONG).show();\n }\n\n\n }\n });\n\n }else{\n\n Toast.makeText(SignupActivity.this,\"Registration Error\",Toast.LENGTH_LONG).show();\n }\n progressDialog.dismiss();\n }\n });\n\n\n\n\n }", "@PostMapping(\"/registration\")\n\t public String registration(@ModelAttribute(\"userForm\") User userForm, BindingResult bindingResult,Model model) {if (bindingResult.hasErrors()) {\n\t return \"registration\";\n\t }\n\t userService.save(userForm);\n\t localUsername=userForm.getUsername();\n\t boolean flag=userService.autoLogin(userForm.getUsername(), userForm.getPasswordConfirm());\n\t model.addAttribute(\"expense\", expenseService.getMonthAndYearAndAmount());\n\t model.addAttribute(\"username\",userForm.getUsername());\n\t return \"redirect:/dashboard\";\n\t }", "private void submitNewUser() {\n\t\tboolean validationFlag = true;\n\t\tArrayList<HashMap<String, String>> signUpFields = new ArrayList<HashMap<String, String>>();\n\t\tint size = lnr_form.getChildCount();\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tLinearLayout v = (LinearLayout) lnr_form.getChildAt(i);\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tHashMap<String, String> field = (HashMap<String, String>) v.getTag();\n\n\t\t\tIjoomerEditText edtValue = null;\n\t\t\tSpinner spnrValue = null;\n\n\t\t\tif (field != null) {\n\t\t\t\tif (field.get(TYPE).equals(TEXT)) {\n\t\t\t\t\tedtValue = (IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrEdit)).findViewById(R.id.txtValue);\n\t\t\t\t} else if (field.get(TYPE).equals(TEXTAREA)) {\n\t\t\t\t\tedtValue = (IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrEditArea)).findViewById(R.id.txtValue);\n\t\t\t\t} else if (field.get(TYPE).equals(PASSWORD)) {\n\t\t\t\t\tedtValue = (IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrPassword)).findViewById(R.id.txtValue);\n\t\t\t\t} else if (field.get(TYPE).equals(MAP)) {\n\t\t\t\t\tedtValue = (IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrEditMap)).findViewById(R.id.txtValue);\n\t\t\t\t} else if (field.get(\"type\").equals(LABEL)) {\n\t\t\t\t\tedtValue = (IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrLabel)).findViewById(R.id.txtValue);\n\t\t\t\t} else if (field.get(TYPE).equals(DATE)) {\n\t\t\t\t\tedtValue = (IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrEditClickable)).findViewById(R.id.txtValue);\n\n\t\t\t\t\tif (edtValue.getText().toString().trim().length() > 0) {\n\t\t\t\t\t\tif (!IjoomerUtilities.birthdateValidator(edtValue.getText().toString().trim())) {\n\t\t\t\t\t\t\tedtValue.setFocusable(true);\n\t\t\t\t\t\t\tedtValue.setError(getString(R.string.validation_invalid_birth_date));\n\t\t\t\t\t\t\tvalidationFlag = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (field.get(TYPE).equals(MULTIPLESELECT)) {\n\t\t\t\t\tedtValue = (IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrEditClickable)).findViewById(R.id.txtValue);\n\t\t\t\t}\n\t\t\t\tif (field.get(TYPE).equals(TIME)) {\n\t\t\t\t\tedtValue = (IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrEditClickable)).findViewById(R.id.txtValue);\n\t\t\t\t}\n\n\t\t\t\tif (field.get(TYPE).equals(SELECT)) {\n\t\t\t\t\tspnrValue = (Spinner) ((LinearLayout) v.findViewById(R.id.lnrSpin)).findViewById(R.id.txtValue);\n\t\t\t\t\tfield.put(VALUE, spnrValue.getSelectedItem().toString());\n\t\t\t\t\tsignUpFields.add(field);\n\t\t\t\t} else if (field.get(TYPE).equals(PASSWORD) && field.get(NAME).equals(\"Retype Password\")) {\n\t\t\t\t\tint len = lnr_form.getChildCount();\n\t\t\t\t\tfor (int j = 0; j < len; j++) {\n\t\t\t\t\t\tLinearLayout view = (LinearLayout) lnr_form.getChildAt(i);\n\t\t\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\t\t\tHashMap<String, String> row = (HashMap<String, String>) view.getTag();\n\t\t\t\t\t\tif (row.get(TYPE).equals(PASSWORD) && field.get(NAME).equals(\"Password\")) {\n\t\t\t\t\t\t\tString password = ((IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrPassword)).findViewById(R.id.txtValue)).getText().toString();\n\t\t\t\t\t\t\tif (password.equals(edtValue.getText().toString())) {\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tedtValue.setError(getString(R.string.validation_password_not_match));\n\t\t\t\t\t\t\t\tvalidationFlag = 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}\n\t\t\t\t} else if (edtValue != null && edtValue.getText().toString().trim().length() <= 0 && (field.get(REQUIRED).equals(\"1\"))) {\n\t\t\t\t\tedtValue.setError(getString(R.string.validation_value_required));\n\t\t\t\t\tvalidationFlag = false;\n\t\t\t\t} else {\n\t\t\t\t\tfield.put(VALUE, edtValue.getText().toString().trim());\n\t\t\t\t\tsignUpFields.add(field);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (validationFlag) {\n\t\t\tfinal SeekBar proSeekBar = IjoomerUtilities.getLoadingDialog(getString(R.string.dialog_loading_register_newuser));\n\t\t\tnew IjoomerRegistration(this).submitNewUser(signUpFields, new WebCallListener() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onProgressUpdate(int progressCount) {\n\t\t\t\t\tproSeekBar.setProgress(progressCount);\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onCallComplete(final int responseCode, String errorMessage, ArrayList<HashMap<String, String>> data1, Object data2) {\n\t\t\t\t\tif (responseCode == 200) {\n\t\t\t\t\t\tIjoomerUtilities.getCustomOkDialog(getString(R.string.dialog_loading_profile), getString(R.string.registration_successfully), getString(R.string.ok),\n\t\t\t\t\t\t\t\tR.layout.ijoomer_ok_dialog, new CustomAlertNeutral() {\n\n\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\tpublic void NeutralMethod() {\n\n\t\t\t\t\t\t\t\t\t\tIntent intent = new Intent(\"clearStackActivity\");\n\t\t\t\t\t\t\t\t\t\tintent.setType(\"text/plain\");\n\t\t\t\t\t\t\t\t\t\tsendBroadcast(intent);\n\t\t\t\t\t\t\t\t\t\tIjoomerWebService.cookies = null;\n\n\t\t\t\t\t\t\t\t\t\tloadNew(IjoomerLoginActivity.class, IPropertyRegistrationActivity.this, true);\n\t\t\t\t\t\t\t\t\t\tfinish();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tIjoomerUtilities.getCustomOkDialog(getString(R.string.dialog_loading_profile),\n\t\t\t\t\t\t\t\tgetString(getResources().getIdentifier(\"code\" + responseCode, \"string\", getPackageName())), getString(R.string.ok), R.layout.ijoomer_ok_dialog,\n\t\t\t\t\t\t\t\tnew CustomAlertNeutral() {\n\n\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\tpublic void NeutralMethod() {\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}", "public void signup() {\n Log.d(TAG, \"Signup\");\n\n if (!validate()) {\n onSignupFailed();\n return;\n }\n\n createProgressDialog(R.string.creating_account);\n\n final String name = _nameText.getText().toString();\n final String email = _emailText.getText().toString();\n final String password = _passwordText.getText().toString();\n\n mAuth.createUserWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Log.d(TAG, \"createUserWithEmail:onComplete:\" + task.isSuccessful());\n\n // If sign in fails, display a message to the user. If sign in succeeds\n // the auth state listener will be notified and logic to handle the\n // signed in user can be handled in the listener.\n if (!task.isSuccessful()) {\n createToast(R.string.authentication_failed, Toast.LENGTH_SHORT);\n } else {\n progressDialog.dismiss();\n final FirebaseUser user = mAuth.getCurrentUser();\n mDatabase.child(\"users\").child(user.getUid()).addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if (dataSnapshot.getValue() == null) {\n createUserInFirebase(name, email, user.getUid());\n }\n }\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n sendToTrivia();\n }\n\n }\n });\n\n\n new android.os.Handler().postDelayed(\n new Runnable() {\n public void run() {\n // On complete call either onSignupSuccess or onSignupFailed\n // depending on success\n progressDialog.dismiss();\n }\n }, 3000);\n }", "public void signup(View view){\r\n if(editText1.getText().toString().isEmpty()||editText2.getText().toString().isEmpty()||editText3.getText().toString().isEmpty()\r\n ||editText4.getText().toString().isEmpty()||editText5.getText().toString().isEmpty()){\r\n Toast.makeText(this, \"Παρακαλώ εισάγετε όλα τα απαραίτητα πεδία προκειμένου να εγγραφείτε.\", Toast.LENGTH_SHORT).show();\r\n }\r\n else{\r\n mAuth.createUserWithEmailAndPassword(editText1.getText().toString(), editText2.getText().toString())\r\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\r\n @Override\r\n public void onComplete(@NonNull Task<AuthResult> task) {\r\n\r\n if (task.isSuccessful()) {\r\n new_user = mAuth.getCurrentUser();\r\n create_users_list(new_user.getUid());\r\n String userid=new_user.getUid();\r\n String firstname=editText3.getText().toString();\r\n String lastname=editText4.getText().toString();\r\n String address=editText5.getText().toString();\r\n SharedPreferences.Editor editor=pref.edit();\r\n editor.putString(userid+\"firstname\",firstname);\r\n editor.putString(userid+\"lastname\",lastname);\r\n editor.putString(userid+\"address\",address);\r\n editor.apply();\r\n Intent intent = new Intent(getApplicationContext(), MainActivity3.class);\r\n intent.putExtra(\"userid\", new_user.getUid());\r\n\r\n startActivity(intent);\r\n\r\n\r\n } else {\r\n Toast.makeText(getApplicationContext(), task.getException().getMessage(),\r\n Toast.LENGTH_SHORT).show();\r\n\r\n }\r\n }\r\n }\r\n );}}", "@Override\n public void onClick(View v) {\n\n String name = fullname.getText().toString();\n String emailx = email.getText().toString();\n String password1 = password.getText().toString();\n String password2 = password_conf.getText().toString();\n progressDialog.setMessage(\"sign up your data\");\n showDialog();\n\n\n userdata = new UserData(name,emailx,password1,password2);\n Call<UserData> call = createUser.createUser(userdata);\n call.enqueue(new Callback<UserData>() {\n @Override\n public void onResponse(Call<UserData> call, Response<UserData> response) {\n if(response.isSuccessful()){\n Toast.makeText(RegisterActivity.this,\"Sign Up Success\",Toast.LENGTH_LONG).show();\n Intent intent = new Intent(getApplicationContext(), LoginActivity.class);\n startActivity(intent);\n finish();\n hideDialog();\n } else {\n Toast.makeText(getApplicationContext(),response.message(), Toast.LENGTH_LONG).show();\n hideDialog();\n }\n }\n\n @Override\n public void onFailure(Call<UserData> call, Throwable t) {\n Toast.makeText(getApplicationContext(), \"Error Connection\", Toast.LENGTH_LONG).show();\n hideDialog();\n }\n });\n }", "public void register(View view){\n Intent i = new Intent(this, RegisterActivity.class);\n startActivity(i);\n }", "@Override\n public void onClick(View view) {\n if (checkValidation()) {\n submitForm();\n house = ((RadioButton)findViewById(radioGroup.getCheckedRadioButtonId() )).getText().toString();\n\n\n SaveAsyncTask tsk = new SaveAsyncTask();\n Numbers number = new Numbers();\n number.Email = Signup_Activity.etEmailAddrss.getText().toString();\n number.Password = Signup_Activity.password.getText().toString();\n number.Phone = Signup_Activity.etPhoneNumber.getText().toString();\n number.House = house;\n tsk.execute(number);\n Register(view);\n } else\n Toast.makeText(SignUp_Activity2.this, \"Form contains error\", Toast.LENGTH_LONG).show();\n }", "@Override\r\n\t\tprotected String doInBackground(String... args) {\n\t\t\tString first = infirst.getText().toString();\r\n\t\t\tString second = insecond.getText().toString();\r\n\t\t\tString email = inemail.getText().toString();\r\n\t\t\tint mobile = Integer.parseInt(inmobile.getText().toString());\r\n\t\t\tString address = inaddress.getText().toString();\r\n\t\t\tString username = inusername.getText().toString();\r\n\t\t\tString password = inpassword.getText().toString();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tList<NameValuePair> param = new ArrayList<NameValuePair>();\r\n\t\t\tparam.add(new BasicNameValuePair(\"first\", first));\r\n\t\t\tparam.add(new BasicNameValuePair(\"second\", second));\r\n\t\t\tparam.add(new BasicNameValuePair(\"email\", email));\r\n\t\t\tparam.add(new BasicNameValuePair(\"address\",address));\r\n\t\t\tparam.add(new BasicNameValuePair(\"mobile\",Integer.toString(mobile)));\r\n\t\t\tparam.add(new BasicNameValuePair(\"username\", username));\r\n\t\t\tparam.add(new BasicNameValuePair(\"password\", password));\r\n\t\t\t\r\n\t\t\tJSONObject json = jparser.makeHttpRequest(url_registerUser, \"POST\", param);\r\n\t\t\t\r\n\t\t\tLog.d(\"Create Response\", json.toString());\r\n\t\t\t \r\n // check for success tag\r\n try {\r\n success = json.getInt(TAG_SUCCESS);\r\n \r\n if (success == 1) {\r\n \t\r\n code =(Integer) json.get(\"code\");\r\n \r\n // successfully created product\r\n \r\n\r\n \t\t//alertDialog.show();\r\n \t\r\n } else {\r\n // failed to create product\r\n }\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n\t\t\treturn null;\r\n\t\t}", "public void signUp(View view) {\n InputMethodManager imm = (InputMethodManager) view.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(view.getWindowToken(), 0);\n boolean emailValid = isValidEmail(edtEmail);\n boolean pwdValid = isValidPassword(edtPaswd);\n boolean unameValid = isValidUsername(edtDisplayName);\n\n if (!unameValid) {\n edtDisplayName.requestFocus();\n } else if (!emailValid) {\n edtEmail.requestFocus();\n } else if (!pwdValid) {\n edtPaswd.requestFocus();\n }\n\n if (emailValid && pwdValid) {\n register();\n }\n }", "@Override\n public void performRegister(final String name, final String email, final String gender, final String password){\n\n mAuth.createUserWithEmailAndPassword(email.toLowerCase(),password)\n .addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n User user = new User();\n user.setName(name);\n user.setEmail(email.toLowerCase());\n user.setGender(gender);\n user.setPassword(password);\n FirebaseDatabase.getInstance().getReference(\"Users\")\n .child(FirebaseAuth.getInstance().getCurrentUser().getUid())\n .setValue(user).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n Toast.makeText(context, \"Authentication Success.\",\n Toast.LENGTH_LONG).show();\n view.redirectToLogin();\n } else {\n Toast.makeText(context, \"Authentication Failed.\",\n Toast.LENGTH_LONG).show();\n }\n }\n });\n } else {\n Log.w(TAG, \"createUserWithEmail:failure\", task.getException());\n Toast.makeText(context, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n }\n }\n });\n\n }", "private void handleSubmit(){\n // Check if the fields are the properly inserted (no label displayed and no empty fields)\n if (!invalidBirthdayLabel.isVisible() && !invalidConfirmPasswordLabel.isVisible() &&\n !invalidEmailLabel.isVisible() && !invalidNameLabel.isVisible() && !invalidPasswordLabel.isVisible() &&\n !invalidSurnameLabel.isVisible() && !surnameTF.getText().equals(\"\") && !usernameTF.getText().equals(\"\") &&\n !passwordTF.getText().equals(\"\") && !nameTF.getText().equals(\"\") && !emailTF.getText().equals(\"\") &&\n !confirmPasswordTF.getText().equals(\"\") && !country.getValue().toString().equals(\"\")\n ) {\n InvalidFormEntryLabel resultLabel;\n // Get the Date\n LocalDate localDate = birthdayDP.getValue();\n Instant instant = Instant.from(localDate.atStartOfDay(ZoneId.systemDefault()));\n Date date = Date.from(instant);\n\n User user = new User(\n false,\n surnameTF.getText(),\n nameTF.getText(),\n usernameTF.getText(),\n passwordTF.getText(),\n emailTF.getText(),\n date,\n country.getValue().toString());\n\n // Create a connection to MongoDB and insert the user\n UserManager userManager = UserManagerFactory.buildManager();\n\n resultLabel = new InvalidFormEntryLabel(\"\", 800, 600, false);\n try {\n if(userManager.register(user)) {\n resultLabel.setText(\"Sign up successfully done\");\n resultLabel.setVisible(true);\n resultLabel.setStyle(\"-fx-background-color: green;\");\n\n // ADD IT ALSO IN NEO4J\n UserNetworkManager userNetworkManager = UserNetworkManagerFactory.buildManager();\n userNetworkManager.addUser(user);\n }\n } catch (Exception e) {\n resultLabel.setText(\"Username already exists\");\n resultLabel.setVisible(true);\n }\n\n\n sceneNodes.getChildren().add(resultLabel);\n }\n\n }", "@Override\n public void onClick(View v) {\n if (isEmailValid(inputEmail.getText().toString())) {\n if(inputPass.getText().toString().equals(inputPassConfirm.getText().toString())) {\n // Open next page of registration\n try {\n Intent i = new Intent(mContext, RegisterFinalActivity.class);\n i.putExtra(\"email\", inputEmail.getText().toString());\n i.putExtra(\"pass\", inputPass.getText().toString());\n mContext.startActivity(i);\n } catch (Exception e) {\n Log.i(\"Not found\", Arrays.toString(e.getStackTrace()));\n }\n } else {\n runOnUiThread(() -> {\n Toast toast = Toast.makeText(getApplicationContext(), \"Parolele introduse nu coincid!\", Toast.LENGTH_LONG);\n toast.show();\n });\n }\n } else {\n runOnUiThread(() -> {\n Toast toast = Toast.makeText(getApplicationContext(), \"Email-ul introdus nu este corespunzător!\", Toast.LENGTH_LONG);\n toast.show();\n });\n }\n }", "@Override\n public void onClick(View v) {\n alertDialog.dismiss();\n\n //Displaying a progressbar\n //pDialog.show();\n\n //Getting the user entered otp from edittext\n final String code = edCode.getText().toString().trim();\n\n // RequestQueue requestQueue = Volley.newRequestQueue(Register.this);\n\n //Creating an string request\n StringRequest stringRequest = new StringRequest(Request.Method.POST,Config.registeracustomer,\n new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n //if the server response is success\n if (response.equalsIgnoreCase(\"success\")) {\n //dismissing the progressbar\n //pDialog.dismiss();\n //Starting a new activity\n startActivity(new Intent(SignUpNewActivity.this, LoginActivity.class));\n\n } if (response.equalsIgnoreCase(\"failed\")){\n //Displaying a toast if the otp entered is wrong\n Toast.makeText(SignUpNewActivity.this, \"Wrong Code Please Try Again\", Toast.LENGTH_LONG).show();\n\n }\n }\n },\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n alertDialog.dismiss();\n Toast.makeText(SignUpNewActivity.this, error.getMessage(), Toast.LENGTH_LONG).show();\n }\n }) {\n @Override\n protected Map<String, String> getParams() throws AuthFailureError {\n Map<String, String> params = new HashMap<>();\n //Adding the parameters otp and username\n params.put(\"code\", code);\n params.put(\"full_name\", name);\n params.put(\"mobile_number\", number);\n params.put(\"password\", password);\n return params;\n\n }\n };\n //Adding the request to the queue\n MySingleton.getInstance(getApplicationContext()).addToRequestQueue(stringRequest);\n }", "private void signup(final String email, String password) {\n firebaseAuth.createUserWithEmailAndPassword(email, password).addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()) {\n databaseRef.child(firebaseAuth.getCurrentUser().getUid()).child(\"email\").setValue(email);\n startActivity(new Intent(getBaseContext(), ShoppingActivity.class));\n setResult(1);\n finish();\n } else {\n alert(task.getException().getMessage());\n }\n }\n });\n }", "@Override\n\t\t\tprotected String doInBackground(String... params) {\n\t\t\t\tHashMap<String,String> data=new HashMap<String,String>();\n\n\t\t\t\tdata.put(\"email\",params[0]);\n\t\t\t\n\t\t\t\t\n\t\t\t\tString result=ruc.sendPostRequest(REGISTER_URL, data);\n\t\t\t\t\n\t\t\t\tif(isNetworkAvailable()==false)\n\t\t\t\t{\n\t\t\t\t\tresult=\"Maaf, anda sedang tidak terhubung ke jaringan.\";\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t}", "@Override\n public void onClick(View view) {\n if (isValid(Email.getText().toString())){\n //checks is passwords match\n if (Password.getText().toString().matches(PasswordValidation.getText().toString())){\n createnewuser(Email.getText().toString(), Password.getText().toString());\n } else {\n Toast.makeText(SignUp.this,\"Passwords do not match! :(\",Toast.LENGTH_LONG).show();\n }\n } else {\n Toast.makeText(SignUp.this,\"E-Mail isn't valid! :(\",Toast.LENGTH_LONG).show();\n }\n\n }", "@Override\n\t\tprotected Boolean doInBackground(Void... params) {\n\t\t\tString handleInserUrl = getResources().getString(\n\t\t\t\t\tR.string.users_json_url)\n\t\t\t\t\t+ \"register\";\n\t\t\ttry {\n\t\t\t\tHttpClient client = new DefaultHttpClient();\n\t\t\t\tHttpPost post = new HttpPost(handleInserUrl);\n\t\t\t\tMultipartEntity reqEntity = new MultipartEntity();\n\t\t\t\treqEntity.addPart(\"code\", new StringBody(code + \"\"));\n\t\t\t\treqEntity.addPart(\"email\", new StringBody(email));\n\t\t\t\tpost.setEntity(reqEntity);\n\t\t\t\tHttpResponse response = client.execute(post);\n\t\t\t\tHttpEntity resEntity = response.getEntity();\n\t\t\t\tfinal String response_str = EntityUtils.toString(resEntity);\n\t\t\t\tif (resEntity != null) {\n\t\t\t\t\tLog.i(\"RESPONSE\", response_str);\n\t\t\t\t\trunOnUiThread(new Runnable() {\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t\t\tJSONObject jsonObj = new JSONObject(\n\t\t\t\t\t\t\t\t\t\tresponse_str);\n\t\t\t\t\t\t\t\tString ok = jsonObj.getString(\"ok\");\n\t\t\t\t\t\t\t\tif (ok.equalsIgnoreCase(\"1\")) {\n\t\t\t\t\t\t\t\t\tshowCorrectDialog(getResources().getString(\n\t\t\t\t\t\t\t\t\t\t\tR.string.verified_code_success));\n\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (ok.equalsIgnoreCase(\"0\")) {\n\t\t\t\t\t\t\t\t\tshowDialog(getResources().getString(\n\t\t\t\t\t\t\t\t\t\t\tR.string.verified_code_failed));\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} catch (Exception ex) {\n\t\t\t\tLog.e(\"Debug\", \"error: \" + ex.getMessage(), ex);\n\t\t\t}\n\t\t\treturn null;\n\t\t}", "@Override\n public void onClick(View v) {\n if (edtUsername.getText().toString().isEmpty() || edtEmail.getText().toString().isEmpty()\n || edtPass.getText().toString().isEmpty() || edtConfirmPW.getText().toString().isEmpty() || (!radioDr.isChecked() && !radioUser.isChecked())) {\n if (radioDr.isChecked()) {\n if (edtLisence.getText().toString().isEmpty() || edtWork_place.getText().toString().isEmpty()) {\n Toast.makeText(RegisterActivity.this, \"All fields are required\", Toast.LENGTH_SHORT).show();\n }\n }\n Toast.makeText(RegisterActivity.this, \"All fields are required\", Toast.LENGTH_SHORT).show();\n } else if (edtPass.getText().toString().length() < 6) {\n Toast.makeText(RegisterActivity.this, \"Password must be least 6 characters\", Toast.LENGTH_SHORT).show();\n } else {\n String rl = checkRole(role);\n if (edtAllergy.getText().toString().isEmpty()) {\n String allergy = DEFAULT;\n registerNewUser(edtUsername.getText().toString(), edtEmail.getText().toString(), edtPass.getText().toString(), rl,\n edtWork_place.getText().toString(), edtLisence.getText().toString(), specialist, status, allergy);\n }\n }\n }", "@Override\n public void onClick(View v) {\n limpiarCampos();\n if (validacion()) {//ejecuta la funcion validacion\n guardar_login();\n\n } else {\n Snackbar.make(findViewById(android.R.id.content), \"Faltan completar campos \",\n Snackbar.LENGTH_LONG)\n .setDuration(3000)\n .show();\n\n\n }\n }" ]
[ "0.9254906", "0.74238396", "0.73249286", "0.73176754", "0.7244194", "0.7224126", "0.71993023", "0.71088004", "0.69922984", "0.69154876", "0.6849908", "0.68218046", "0.68144095", "0.6796135", "0.6768154", "0.67516196", "0.67454183", "0.67172015", "0.6691107", "0.66908926", "0.66877896", "0.6687168", "0.66651046", "0.6644786", "0.66241544", "0.6615565", "0.6604888", "0.6594793", "0.6584948", "0.6583419", "0.6554565", "0.65425503", "0.6507373", "0.6504318", "0.6499167", "0.64939654", "0.6486761", "0.64772713", "0.64708394", "0.6463508", "0.6457107", "0.6423394", "0.6420962", "0.64079547", "0.6389568", "0.638361", "0.63835967", "0.63819456", "0.63729113", "0.6370155", "0.63617504", "0.63550097", "0.6350565", "0.63483435", "0.6347263", "0.63351613", "0.63349444", "0.6317831", "0.63084275", "0.6286773", "0.6284607", "0.62680113", "0.6265932", "0.6262599", "0.62619275", "0.62613684", "0.62609714", "0.6255453", "0.6241757", "0.6233556", "0.6233273", "0.62266505", "0.622335", "0.6220132", "0.62193906", "0.62136644", "0.620123", "0.6188666", "0.6187644", "0.61840993", "0.6170037", "0.6167867", "0.6153349", "0.6146169", "0.614266", "0.61420614", "0.6140892", "0.61219215", "0.6116107", "0.611482", "0.6114453", "0.61132616", "0.6105416", "0.6103597", "0.60988843", "0.60985386", "0.60981584", "0.6090083", "0.60890967", "0.60862947" ]
0.74479675
1
TODO Autogenerated method stub
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doPost(request,response); }
{ "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: mit in getDataByMode implementieren?
public String[] getDataArray(String name){ String[] string = new String[5]; SQLiteDatabase db = this.getReadableDatabase(); Cursor cursor = db.rawQuery("SELECT * FROM gericht WHERE name='"+name+"';", null); if(cursor.moveToFirst()){ do{ for(int i=0; i<5; i++){ string[i]=cursor.getString(i); } }while(cursor.moveToNext()); } cursor.close(); db.close(); return string; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Object getData();", "Object getData();", "public abstract Object getData();", "public Object getData();", "Object getCurrentData();", "java.lang.String getData();", "public Data getData(HelperDataType type);", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "String getData();", "protected abstract Object[] getData();", "@Override\n\tpublic void getData() {\n\t\t\n\t}", "Object getData() { /* package access */\n\t\treturn data;\n\t}", "T getData();", "DataFactory getDataFactory();", "public void getData(String dataName){\r\n this.mData.get(dataName);\r\n }", "Collection getData();", "public Object getData() { return funcData; }", "@Override\r\n\tprotected Object getData() {\n\t\treturn null;\r\n\t}", "DataHandler getDataHandler();", "public abstract Object getCustomData();", "@Override\r\n\t\tpublic Meta_data getData() {\n\t\t\treturn this.data;\r\n\t\t}", "public Object getData() \n {\n return data;\n }", "int getDatenvolumen();", "public boolean isData();", "@Override\n\tprotected void getDataFromUCF() {\n\n\t}", "public E getData() { return data; }", "final void getData() {\n\t\t//The final method can't be overriden\n\t}", "@DataProvider()\n\tpublic Object[][] getData() {\n\t\t\n\t\treturn ConstantsArray.getArrayData();\n\t}", "public Object getData()\r\n\t\t{\r\n\t\t\treturn data;\r\n\t\t}", "public IData getData() {\n return data;\n }", "java.lang.String getDataId();", "java.lang.String getDataId();", "DataTypeInstance getDataInstance();", "public Object getData() {\r\n\t\t\treturn data;\r\n\t\t}", "public Object getData(){\n\t\treturn this.data;\n\t}", "@Override\n\tpublic void queryData() {\n\t\t\n\t}", "@Override\n public boolean getDataResult() {\n return true;\n }", "@Override\n public boolean getDataResult() {\n return true;\n }", "@Override\n public boolean getDataResult() {\n return true;\n }", "public T getData() {\n return mData;\n }", "public int getDataType();", "DataModel getDataModel ();", "public int getData(){\r\n return data;\r\n }", "@Override\n\tprotected void getDataRefresh() {\n\t\t\n\t}", "T getData() {\n\t\treturn data;\n\t}", "protected abstract void retrievedata();", "int getData2();", "int getData2();", "public abstract Class getDataClass();", "public E getData(){\n\t\t\treturn data;\n\t\t}", "@DataProvider(name=\"BookData\")\n public Object[][] getData()\n {\n\n return new Object[][] {{\"once\", \"1111\"},{\"twice\",\"2222\"},{\"thrice\",\"3333\"}};\n }", "public boolean isData() {return true; }", "public A getData()\n\t{\n\t\treturn data;\n\t}", "public D getData(){\n\t\treturn data;\n\t}", "public Object getData() {\n\t\treturn data;\n\t}", "public DataStorage getDataStorage();", "Datty getDatty();", "@Override\n\tpublic HashMap<String, String> getData() {\n\t\treturn dataSourceApi.getData();\n\t}", "@Override\r\n\tpublic E getData() {\n\t\treturn data;\r\n\t}", "public T getData()\n\t{ \treturn this.data; }", "int getDataType();", "String getDataSet();", "public String getData() {\r\n return Data;\r\n }", "public String getData() {\r\n return Data;\r\n }", "public Data getData() {\n return data;\n }", "public Data getData() {\n return data;\n }", "@Override\r\n\tpublic String[] getData(String[] sql) {\n\t\treturn null;\r\n\t}", "public IData getStoreddata();", "public T getData() {\r\n return data;\r\n }", "public int getUnknownDataValueMode() {\r\n return dataBinder.getUnknownDataValueMode();\r\n }", "public BaseData[] getData()\n {\n return Cdata;\n }", "PersistentDataHolder getDataHolder();", "public Table<Integer, Integer, String> getData();", "public String getDataType() ;", "public String getData() {\n return coreValue();\n }", "@Override\n public String getData()\n {\n return null;\n }", "@Override\n public void getData(int a, int b) {\n\n }", "public E getData() {\r\n\t\treturn data;\r\n\t}", "public T getData(){\n return this.data;\n }", "T getData() {\n return this.data;\n }", "abstract public Object getUserData();", "String[] getData();", "protected String getDataFormat() {\n return this.dataFormat;\n }", "@Override\n\tpublic List<Map<String, String>> getData() throws Exception{\n\t\tqueryForList(\"\", null);\n\t\treturn null;\n\t}", "public D getData() {\n return data;\n }", "public D getData() {\n return data;\n }", "E getData(int index);", "int getData1();", "int getData1();", "public Object getData() {\n return dataArray;\n }", "public String getDataOwner();", "String getDataNascimento();", "public E getData()\n {\n return data;\n }", "public E getData()\n {\n return data;\n }", "java.lang.String getDataType();", "public abstract int getMode();", "@Override\n public byte getType() {\n return TYPE_DATA;\n }", "public String getData() {\n\treturn data;\n }", "public int getDataParam() {\n return dataParam;\n }", "public int getData()\n\t{\n\t\treturn data;\n\t}", "@Override\n public Object getData() {\n return outputData;\n }" ]
[ "0.68094575", "0.68094575", "0.67982984", "0.6660376", "0.6504651", "0.64806175", "0.6454144", "0.64157856", "0.6314685", "0.6257617", "0.62356746", "0.6132241", "0.61049926", "0.6084013", "0.60732746", "0.6062363", "0.6040942", "0.6024691", "0.60176593", "0.5999994", "0.5985422", "0.5972306", "0.59485495", "0.5943764", "0.59324914", "0.5930668", "0.59205836", "0.5919829", "0.5919716", "0.5911975", "0.5880902", "0.5880902", "0.58792186", "0.5846283", "0.58403575", "0.5833435", "0.58125824", "0.58125824", "0.58125824", "0.5798052", "0.57925487", "0.57877684", "0.57723576", "0.57713085", "0.5769679", "0.57605755", "0.57600105", "0.57600105", "0.5745236", "0.57385826", "0.5730127", "0.57301146", "0.5724324", "0.5716791", "0.57136387", "0.5705612", "0.5703046", "0.5699123", "0.5697399", "0.5692979", "0.56890243", "0.56831235", "0.56792194", "0.56792194", "0.56775516", "0.56775516", "0.5667762", "0.5666766", "0.56637794", "0.565975", "0.56582767", "0.5658063", "0.5609308", "0.5605103", "0.56010413", "0.55927956", "0.5590895", "0.55801076", "0.5578402", "0.5576077", "0.5562427", "0.55604064", "0.5555458", "0.5547418", "0.5546591", "0.5546591", "0.55437326", "0.5543351", "0.5543351", "0.5542882", "0.55416983", "0.5541113", "0.5540362", "0.5540362", "0.5538966", "0.55375314", "0.553413", "0.5529322", "0.55280167", "0.5520475", "0.5514211" ]
0.0
-1
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jLabel1 = new javax.swing.JLabel(); txtName = new javax.swing.JTextField(); jLabel2 = new javax.swing.JLabel(); jScrollPane2 = new javax.swing.JScrollPane(); txtDes = new javax.swing.JTextArea(); btnCreate = new javax.swing.JButton(); btnUpdate = new javax.swing.JButton(); btnDelete = new javax.swing.JButton(); spnFunction = new javax.swing.JScrollPane(); tblFunction = new javax.swing.JTable(); jButton6 = new javax.swing.JButton(); jButton1 = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jLabel1.setText("Name"); jLabel2.setText("Description"); txtDes.setColumns(20); txtDes.setRows(5); jScrollPane2.setViewportView(txtDes); btnCreate.setIcon(new javax.swing.ImageIcon(getClass().getResource("/view/icon/hospital-symbol.png"))); // NOI18N btnCreate.setText("Create"); btnCreate.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnCreateActionPerformed(evt); } }); btnUpdate.setIcon(new javax.swing.ImageIcon(getClass().getResource("/view/icon/tick-mark.png"))); // NOI18N btnUpdate.setText("Update"); btnUpdate.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnUpdateActionPerformed(evt); } }); btnDelete.setIcon(new javax.swing.ImageIcon(getClass().getResource("/view/icon/delete-cross.png"))); // NOI18N btnDelete.setText("Delete"); btnDelete.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnDeleteActionPerformed(evt); } }); tblFunction.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {null, null, null, null}, {null, null, null, null}, {null, null, null, null}, {null, null, null, null} }, new String [] { "Title 1", "Title 2", "Title 3", "Title 4" } )); tblFunction.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { tblFunctionMouseClicked(evt); } }); spnFunction.setViewportView(tblFunction); jButton6.setText("Close"); jButton6.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton6ActionPerformed(evt); } }); jButton1.setText("Back"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(spnFunction, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 496, Short.MAX_VALUE) .addGroup(layout.createSequentialGroup() .addGap(73, 73, 73) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jLabel2) .addComponent(jLabel1)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(layout.createSequentialGroup() .addComponent(btnCreate) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btnUpdate) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btnDelete)) .addComponent(jScrollPane2) .addComponent(txtName, javax.swing.GroupLayout.PREFERRED_SIZE, 207, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButton1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButton6) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(spnFunction, javax.swing.GroupLayout.DEFAULT_SIZE, 157, Short.MAX_VALUE) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel1) .addComponent(txtName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel2) .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(btnCreate) .addComponent(btnUpdate) .addComponent(btnDelete)) .addGap(24, 24, 24) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButton6) .addComponent(jButton1)) .addGap(6, 6, 6)) ); pack(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n initComponents();\n }", "public AdjointForm() {\n initComponents();\n setDefaultCloseOperation(HIDE_ON_CLOSE);\n }", "public FormListRemarking() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n \n }", "public FormPemilihan() {\n initComponents();\n }", "public GUIForm() { \n initComponents();\n }", "public FrameForm() {\n initComponents();\n }", "public TorneoForm() {\n initComponents();\n }", "public FormCompra() {\n initComponents();\n }", "public muveletek() {\n initComponents();\n }", "public Interfax_D() {\n initComponents();\n }", "public quanlixe_form() {\n initComponents();\n }", "public SettingsForm() {\n initComponents();\n }", "public RegistrationForm() {\n initComponents();\n this.setLocationRelativeTo(null);\n }", "public Soru1() {\n initComponents();\n }", "public FMainForm() {\n initComponents();\n this.setResizable(false);\n setLocationRelativeTo(null);\n }", "public soal2GUI() {\n initComponents();\n }", "public EindopdrachtGUI() {\n initComponents();\n }", "public MechanicForm() {\n initComponents();\n }", "public AddDocumentLineForm(java.awt.Frame parent) {\n super(parent);\n initComponents();\n myInit();\n }", "public BloodDonationGUI() {\n initComponents();\n }", "public quotaGUI() {\n initComponents();\n }", "public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }", "public PatientUI() {\n initComponents();\n }", "public myForm() {\n\t\t\tinitComponents();\n\t\t}", "public Oddeven() {\n initComponents();\n }", "public intrebarea() {\n initComponents();\n }", "public Magasin() {\n initComponents();\n }", "public RadioUI()\n {\n initComponents();\n }", "public NewCustomerGUI() {\n initComponents();\n }", "public ZobrazUdalost() {\n initComponents();\n }", "public FormUtama() {\n initComponents();\n }", "public p0() {\n initComponents();\n }", "public INFORMACION() {\n initComponents();\n this.setLocationRelativeTo(null); \n }", "public ProgramForm() {\n setLookAndFeel();\n initComponents();\n }", "public AmountReleasedCommentsForm() {\r\n initComponents();\r\n }", "public form2() {\n initComponents();\n }", "public MainForm() {\n\t\tsuper(\"Hospital\", List.IMPLICIT);\n\n\t\tstartComponents();\n\t}", "public kunde() {\n initComponents();\n }", "public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n setRequestFocusEnabled(false);\n setVerifyInputWhenFocusTarget(false);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 465, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 357, Short.MAX_VALUE)\n );\n }", "public MusteriEkle() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public DESHBORDPANAL() {\n initComponents();\n }", "public frmVenda() {\n initComponents();\n }", "public GUIForm() {\n initComponents();\n inputField.setText(NO_FILE_SELECTED);\n outputField.setText(NO_FILE_SELECTED);\n progressLabel.setBackground(INFO);\n progressLabel.setText(SELECT_FILE);\n }", "public Botonera() {\n initComponents();\n }", "public FrmMenu() {\n initComponents();\n }", "public OffertoryGUI() {\n initComponents();\n setTypes();\n }", "public JFFornecedores() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(255, 255, 255));\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 .addGap(0, 983, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 769, Short.MAX_VALUE)\n );\n\n pack();\n }", "public EnterDetailsGUI() {\n initComponents();\n }", "public vpemesanan1() {\n initComponents();\n }", "public Kost() {\n initComponents();\n }", "public FormHorarioSSE() {\n initComponents();\n }", "public frmacceso() {\n initComponents();\n }", "public UploadForm() {\n initComponents();\n }", "public HW3() {\n initComponents();\n }", "public Managing_Staff_Main_Form() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }", "public sinavlar2() {\n initComponents();\n }", "public P0405() {\n initComponents();\n }", "public IssueBookForm() {\n initComponents();\n }", "public MiFrame2() {\n initComponents();\n }", "public Choose1() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n\n String oldAuthor = prefs.get(\"AUTHOR\", \"\");\n if(oldAuthor != null) {\n this.authorTextField.setText(oldAuthor);\n }\n String oldBook = prefs.get(\"BOOK\", \"\");\n if(oldBook != null) {\n this.bookTextField.setText(oldBook);\n }\n String oldDisc = prefs.get(\"DISC\", \"\");\n if(oldDisc != null) {\n try {\n int oldDiscNum = Integer.parseInt(oldDisc);\n oldDiscNum++;\n this.discNumberTextField.setText(Integer.toString(oldDiscNum));\n } catch (Exception ex) {\n this.discNumberTextField.setText(oldDisc);\n }\n this.bookTextField.setText(oldBook);\n }\n\n\n }", "public GUI_StudentInfo() {\n initComponents();\n }", "public JFrmPrincipal() {\n initComponents();\n }", "public Lihat_Dokter_Keseluruhan() {\n initComponents();\n }", "public bt526() {\n initComponents();\n }", "public Pemilihan_Dokter() {\n initComponents();\n }", "public Ablak() {\n initComponents();\n }", "@Override\n\tprotected void initUi() {\n\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\n\t// <editor-fold defaultstate=\"collapsed\" desc=\"Generated\n\t// Code\">//GEN-BEGIN:initComponents\n\tprivate void initComponents() {\n\n\t\tlabel1 = new java.awt.Label();\n\t\tlabel2 = new java.awt.Label();\n\t\tlabel3 = new java.awt.Label();\n\t\tlabel4 = new java.awt.Label();\n\t\tlabel5 = new java.awt.Label();\n\t\tlabel6 = new java.awt.Label();\n\t\tlabel7 = new java.awt.Label();\n\t\tlabel8 = new java.awt.Label();\n\t\tlabel9 = new java.awt.Label();\n\t\tlabel10 = new java.awt.Label();\n\t\ttextField1 = new java.awt.TextField();\n\t\ttextField2 = new java.awt.TextField();\n\t\tlabel14 = new java.awt.Label();\n\t\tlabel15 = new java.awt.Label();\n\t\tlabel16 = new java.awt.Label();\n\t\ttextField3 = new java.awt.TextField();\n\t\ttextField4 = new java.awt.TextField();\n\t\ttextField5 = new java.awt.TextField();\n\t\tlabel17 = new java.awt.Label();\n\t\tlabel18 = new java.awt.Label();\n\t\tlabel19 = new java.awt.Label();\n\t\tlabel20 = new java.awt.Label();\n\t\tlabel21 = new java.awt.Label();\n\t\tlabel22 = new java.awt.Label();\n\t\ttextField6 = new java.awt.TextField();\n\t\ttextField7 = new java.awt.TextField();\n\t\ttextField8 = new java.awt.TextField();\n\t\tlabel23 = new java.awt.Label();\n\t\ttextField9 = new java.awt.TextField();\n\t\ttextField10 = new java.awt.TextField();\n\t\ttextField11 = new java.awt.TextField();\n\t\ttextField12 = new java.awt.TextField();\n\t\tlabel24 = new java.awt.Label();\n\t\tlabel25 = new java.awt.Label();\n\t\tlabel26 = new java.awt.Label();\n\t\tlabel27 = new java.awt.Label();\n\t\tlabel28 = new java.awt.Label();\n\t\tlabel30 = new java.awt.Label();\n\t\tlabel31 = new java.awt.Label();\n\t\tlabel32 = new java.awt.Label();\n\t\tjButton1 = new javax.swing.JButton();\n\n\t\tlabel1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel1.setText(\"It seems that some of the buttons on the ATM machine are not working!\");\n\n\t\tlabel2.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel2.setText(\"Unfortunately these numbers are exactly what Professor has to use to type in his password.\");\n\n\t\tlabel3.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel3.setText(\n\t\t\t\t\"If you want to eat tonight, you have to help him out and construct the numbers of the password with the working buttons and math operators.\");\n\n\t\tlabel4.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tlabel4.setText(\"Denver's Password: 2792\");\n\n\t\tlabel5.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel5.setText(\"import java.util.Scanner;\\n\");\n\n\t\tlabel6.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel6.setText(\"public class ATM{\");\n\n\t\tlabel7.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel7.setText(\"public static void main(String[] args){\");\n\n\t\tlabel8.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel8.setText(\"System.out.print(\");\n\n\t\tlabel9.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel9.setText(\" -\");\n\n\t\tlabel10.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel10.setText(\");\");\n\n\t\ttextField1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\ttextField1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tlabel14.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel14.setText(\"System.out.print( (\");\n\n\t\tlabel15.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel15.setText(\"System.out.print(\");\n\n\t\tlabel16.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel16.setText(\"System.out.print( ( (\");\n\n\t\tlabel17.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel17.setText(\")\");\n\n\t\tlabel18.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel18.setText(\" +\");\n\n\t\tlabel19.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel19.setText(\");\");\n\n\t\tlabel20.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel20.setText(\" /\");\n\n\t\tlabel21.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel21.setText(\" %\");\n\n\t\tlabel22.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel22.setText(\" +\");\n\n\t\tlabel23.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel23.setText(\");\");\n\n\t\tlabel24.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel24.setText(\" +\");\n\n\t\tlabel25.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel25.setText(\" /\");\n\n\t\tlabel26.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel26.setText(\" *\");\n\n\t\tlabel27.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\t\tlabel27.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel27.setText(\")\");\n\n\t\tlabel28.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel28.setText(\")\");\n\n\t\tlabel30.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel30.setText(\"}\");\n\n\t\tlabel31.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel31.setText(\"}\");\n\n\t\tlabel32.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel32.setText(\");\");\n\n\t\tjButton1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tjButton1.setText(\"Check\");\n\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tjButton1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(28).addGroup(layout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING).addComponent(getDoneButton()).addComponent(jButton1)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, 774, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addGap(92).addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15, GroupLayout.PREFERRED_SIZE, 145,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(37))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(174)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(7)))\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label23, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20).addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(23).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16, GroupLayout.PREFERRED_SIZE, 177,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));\n\t\tlayout.setVerticalGroup(\n\t\t\t\tlayout.createParallelGroup(Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup().addGroup(layout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(19)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(78)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(76)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(75)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(27))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel23,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(29)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))))\n\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t.addGap(30)\n\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(25)\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(26).addComponent(jButton1).addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(getDoneButton()).addContainerGap(23, Short.MAX_VALUE)));\n\t\tthis.setLayout(layout);\n\n\t\tlabel16.getAccessibleContext().setAccessibleName(\"System.out.print( ( (\");\n\t\tlabel17.getAccessibleContext().setAccessibleName(\"\");\n\t\tlabel18.getAccessibleContext().setAccessibleName(\" +\");\n\t}", "public Pregunta23() {\n initComponents();\n }", "public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }", "public AvtekOkno() {\n initComponents();\n }", "public busdet() {\n initComponents();\n }", "public ViewPrescriptionForm() {\n initComponents();\n }", "public Ventaform() {\n initComponents();\n }", "public Kuis2() {\n initComponents();\n }", "public CreateAccount_GUI() {\n initComponents();\n }", "public Carrera() {\n initComponents();\n }", "public POS1() {\n initComponents();\n }", "public EqGUI() {\n initComponents();\n }", "public JFriau() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setTitle(\"BuNus - Budaya Nusantara\");\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setBackground(new java.awt.Color(204, 204, 204));\n setMinimumSize(new java.awt.Dimension(1, 1));\n setPreferredSize(new java.awt.Dimension(760, 402));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 750, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n }", "public nokno() {\n initComponents();\n }", "public dokter() {\n initComponents();\n }", "public ConverterGUI() {\n initComponents();\n }", "public hitungan() {\n initComponents();\n }", "public Modify() {\n initComponents();\n }", "public frmAddIncidencias() {\n initComponents();\n }", "public FP_Calculator_GUI() {\n initComponents();\n \n setVisible(true);\n }" ]
[ "0.731952", "0.72909003", "0.72909003", "0.72909003", "0.72862417", "0.7248404", "0.7213685", "0.72086793", "0.7195972", "0.71903807", "0.71843296", "0.7158833", "0.71475875", "0.70933676", "0.7081167", "0.7056787", "0.69876975", "0.6977383", "0.6955115", "0.6953839", "0.69452274", "0.6942602", "0.6935845", "0.6931919", "0.6928187", "0.6925288", "0.69251484", "0.69117147", "0.6911646", "0.6892842", "0.68927234", "0.6891408", "0.68907607", "0.68894386", "0.68836755", "0.688209", "0.6881168", "0.68787616", "0.68757504", "0.68741524", "0.68721044", "0.685922", "0.68570775", "0.6855737", "0.6855207", "0.68546575", "0.6853559", "0.6852262", "0.6852262", "0.68443567", "0.6837038", "0.6836797", "0.68291426", "0.6828922", "0.68269444", "0.6824652", "0.682331", "0.68175536", "0.68167555", "0.6810103", "0.6809546", "0.68085015", "0.68083894", "0.6807979", "0.68027437", "0.67950374", "0.67937446", "0.67921823", "0.67911226", "0.67900467", "0.6788873", "0.67881", "0.6781613", "0.67669237", "0.67660683", "0.6765841", "0.6756988", "0.675558", "0.6752552", "0.6752146", "0.6742482", "0.67395985", "0.673791", "0.6736197", "0.6733452", "0.67277217", "0.6726687", "0.67204696", "0.67168", "0.6714824", "0.6714823", "0.6708782", "0.67071444", "0.670462", "0.67010295", "0.67004406", "0.6699407", "0.6698219", "0.669522", "0.66916007", "0.6689694" ]
0.0
-1
End of variables declaration//GENEND:variables
private void loadTable(List<Functions> readAll) { Vector cols = new Vector(); cols.add("Name"); cols.add("Description"); Vector rows = new Vector(); for (Functions f : readAll) { Vector row = new Vector(); row.add(f.getName()); row.add(f.getDes()); rows.add(row); } tblFunction.setModel(new DefaultTableModel(rows, cols)); tblFunction.updateUI(); spnFunction.setViewportView(this.tblFunction); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void lavar() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "public void mo38117a() {\n }", "@Override\r\n\tpublic void initVariables() {\n\t\t\r\n\t}", "private void assignment() {\n\n\t\t\t}", "private void kk12() {\n\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "public void mo21779D() {\n }", "public final void mo51373a() {\n }", "protected boolean func_70041_e_() { return false; }", "public void mo4359a() {\n }", "public void mo21782G() {\n }", "private void m50366E() {\n }", "public void mo12930a() {\n }", "public void mo115190b() {\n }", "public void method_4270() {}", "public void mo1403c() {\n }", "public void mo3376r() {\n }", "public void mo3749d() {\n }", "public void mo21793R() {\n }", "protected boolean func_70814_o() { return true; }", "public void mo21787L() {\n }", "public void mo21780E() {\n }", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo21792Q() {\n }", "public void mo21791P() {\n }", "public void mo12628c() {\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public void mo97908d() {\n }", "public void mo21878t() {\n }", "public void mo9848a() {\n }", "public void mo21825b() {\n }", "public void mo23813b() {\n }", "public void mo3370l() {\n }", "public void mo21879u() {\n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "public void mo21785J() {\n }", "public void mo21795T() {\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 }", "public void m23075a() {\n }", "public void mo21789N() {\n }", "@Override\n\tpublic void einkaufen() {\n\t}", "public void mo21794S() {\n }", "public final void mo12688e_() {\n }", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "private Rekenhulp()\n\t{\n\t}", "public void mo6944a() {\n }", "public static void listing5_14() {\n }", "public void mo1405e() {\n }", "public final void mo91715d() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "public void mo9137b() {\n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "public void func_70295_k_() {}", "void mo57277b();", "public void mo21877s() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "public void Tyre() {\n\t\t\r\n\t}", "void berechneFlaeche() {\n\t}", "public void mo115188a() {\n }", "public void mo21880v() {\n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "private stendhal() {\n\t}", "public void mo21784I() {\n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "public void mo56167c() {\n }", "public void mo44053a() {\n }", "public void mo21781F() {\n }", "public void mo2740a() {\n }", "public void mo21783H() {\n }", "public void mo1531a() {\n }", "double defendre();", "private zzfl$zzg$zzc() {\n void var3_1;\n void var2_-1;\n void var1_-1;\n this.value = var3_1;\n }", "public void stg() {\n\n\t}", "void m1864a() {\r\n }", "private void poetries() {\n\n\t}", "public void skystonePos4() {\n }", "public void mo2471e() {\n }", "@Override\n\tprotected void getExras() {\n\n\t}", "@AnyLogicInternalCodegenAPI\n private void setupPlainVariables_Main_xjal() {\n }", "private void yy() {\n\n\t}", "@Override\n\tpublic void verkaufen() {\n\t}", "static void feladat4() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "public void init() { \r\n\t\t// TODO Auto-generated method\r\n\t }", "public void furyo ()\t{\n }", "public void verliesLeven() {\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "protected void mo6255a() {\n }" ]
[ "0.6359672", "0.62805766", "0.6188898", "0.6094004", "0.60918343", "0.6070505", "0.6051442", "0.6051194", "0.60025513", "0.59884185", "0.59703076", "0.5967403", "0.59663707", "0.5965261", "0.5961392", "0.5940802", "0.59082854", "0.5895613", "0.58904797", "0.5881886", "0.5880823", "0.58534294", "0.58502686", "0.58496666", "0.5840965", "0.58385414", "0.583449", "0.58218235", "0.58079493", "0.58018047", "0.57935876", "0.578543", "0.5783205", "0.5783174", "0.5781325", "0.5775662", "0.5761857", "0.57585585", "0.57443714", "0.57420063", "0.5732892", "0.5732892", "0.5732892", "0.5732892", "0.5732892", "0.5732892", "0.5732892", "0.5731803", "0.57291883", "0.572534", "0.5722311", "0.571708", "0.5703955", "0.569821", "0.5696928", "0.5689797", "0.5687844", "0.5685648", "0.56735766", "0.56602216", "0.5650933", "0.56443083", "0.56430477", "0.56423676", "0.56423056", "0.5639591", "0.5629768", "0.5628625", "0.56270933", "0.56214654", "0.5617528", "0.56125104", "0.56110257", "0.56107056", "0.5605189", "0.5603459", "0.5601501", "0.5599838", "0.5590909", "0.5585222", "0.5575921", "0.55701774", "0.55679137", "0.55561125", "0.5552967", "0.55501926", "0.555003", "0.554813", "0.5546087", "0.55459976", "0.5545057", "0.55448854", "0.55425835", "0.554148", "0.5539141", "0.5536231", "0.5527287", "0.55222327", "0.55167496", "0.5502402", "0.5502082" ]
0.0
-1
ArrayList lista= new ArrayList ();
public FormPanel(){ Dimension dim = getPreferredSize(); dim.width=250; setPreferredSize(dim); nameLabel=new JLabel("Nombre: "); nameField =new JTextField(10); ocupattionLabel=new JLabel("Ocupattion: "); occupationField=new JTextField(10); okBtn=new JButton("OK"); okBtn.addActionListener(new ActionListener(){ @Override public void actionPerformed(ActionEvent e){ //TODO Auto-generated method stub String name=nameField.getText(); String occupation=occupationField.getText(); FormEvent eve= new FormEvent(this,name,occupation); //lista.add(eve); //if(formListener!=null){ //formListener.formEventOcurred(eve); //} if(formListener!=null){ formListener.formEventOcurred(eve); } } }); //BOrder Border innerBorder=BorderFactory.createTitledBorder("Agregar Personas"); Border outerBorder=BorderFactory.createEmptyBorder(5, 5, 5, 5); setBorder(BorderFactory.createCompoundBorder(outerBorder,innerBorder)); setLayout(new GridBagLayout()); GridBagConstraints gc= new GridBagConstraints(); ////////////////FIRST NOW/////////////////////// gc.weightx=1; gc.weighty=0.1; gc.gridx=0; gc.gridy=0; gc.fill=GridBagConstraints.NONE; gc.anchor=GridBagConstraints.LINE_END; gc.insets=new Insets(0,0,0,5); add(nameLabel,gc); gc.gridx=1; gc.gridy=0; gc.insets=new Insets(0,0,0,0); gc.anchor=GridBagConstraints.LINE_START; add(nameField, gc); ///////////////SECON NOW/////////////////////////////// gc.weightx=1; gc.weighty=0.1; gc.gridy=1; gc.gridx=0; gc.insets=new Insets(0,0,0,5); gc.anchor=GridBagConstraints.LINE_END; add(ocupattionLabel,gc); gc.gridy=1; gc.gridx=1; gc.insets=new Insets(0,0,0,0); gc.anchor=GridBagConstraints.LINE_START; add(occupationField,gc); //////////////tercer////////////////////////////////////////////// gc.weightx=1; gc.weighty=2.0; gc.gridy=2; gc.gridx=1; gc.insets=new Insets(0,0,0,5); gc.anchor=GridBagConstraints.LINE_START; add(okBtn,gc); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ArrayListOfStrings () {\n list = new ArrayList<String>();\n }", "public MyArrayList ()\r\n {\r\n \tlist = new Object[100];\r\n \tnumElements = 0;\r\n }", "static void q2(){\n\t\tArrayList<Integer>myList=new ArrayList<>();\n\t\t\n\t}", "public ArrayList() {\n elements = new Object[DEFAULT_CAPACITY];\n }", "testarray() {\r\n \tarrayList = new Arraylist();\t\r\n\t}", "public ArrayList() {\n\t\tthis.elements = new Object[5];\n\t\tthis.last = -1;\n\t}", "public ArrayList()\n {\n list = new int[SIZE];\n length = 0;\n }", "public MyArrayList() {\r\n\t\tthis.list=new Object[this.capacity];\r\n\t}", "public void clear(){\n\n \tlist = new ArrayList();\n\n }", "myArrayList() {\n\t\thead = null;\n\t\ttail = null;\n\t}", "public ComandosJuego() //constructor\n\t{\n\t\tlista = new ArrayList<String>();\n\t}", "public OrderedArrayList()\n {\n\t_data = new ArrayList<Comparable>();\n }", "public ArrayList getList() {\n \t\treturn list;\n \t}", "public ArrayListBag() {\n\t\tlist = new ArrayList<T>();\n\t}", "public static <T> ArrayList<T> createArrayList() {\n \t\treturn new ArrayList<T>();\n \t}", "@SuppressWarnings(\"unchecked\")\n\tpublic ArrayList() {\n\t\tsize = 0;\n\t\tlist = (E[]) new Object[INIT_SIZE];\n\t}", "public List()\n {\n list = new Object [10];\n }", "public OrderedArrayList()\n {\n _data = new ArrayList<Comparable>();\n }", "public LlistaPistes() {\n _llistaPistes = new ArrayList();\n }", "public TempList() {\n list = new ArrayList<T>();\n }", "public MyArrayList() {\n elements = new Object[DEFAULT_CAPACITY];\n }", "private void CreateStudentList() {\r\n\t\tStudentList=new ArrayList<Student>();\t\r\n}", "public ContactList()\n {\n myList = new ArrayList<>();\n }", "public ListDA() {\n elements = new Object[CAPACITY];\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 MyArrayList() {\n data = new Object[10];\n }", "public Lista() {\r\n }", "public void listar() {\n\t\t\n\t}", "public static ArrayList getList() {\r\n return ListeElem;\r\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic ArrayList () {\n\t\tcapacity = 10;\n\t\tsize = 0;\n\t\tlist = (E[]) new Object[capacity];\n\t}", "public ArrayList() {\n arr = (T[]) new Object[10];\n size = 0;\n }", "public ArrayList() {\n _size = 0;\n _store = (E[]) new Object[32];\n }", "a(ArrayList arrayList) {\n super(1);\n this.$result = arrayList;\n }", "@SuppressWarnings(\"unchecked\")\n public ArrayList() {\n list = (E[])new Object[DEFAULT_CAP];\n capacity = 10;\n size = 0;\n }", "public ArrayList() {\n //sets an array with no length\n this.array = (E[]) new Object[0];\n }", "public IHM() {\n initComponents();\n da = new ArrayList<String>();\n ba = new ArrayList<String>();\n //a.lerArraylist();\n }", "public ListaEtiquetas() {\n this.listaEtiquetas = new ArrayList<>();\n }", "public static ArrayList<String> getTodoListInstance(){\n\t\tif (todoList==null){\n\t\t\ttodoList=new ArrayList<String>();\n\t\t}\n\t\treturn todoList;\n\t}", "public Lista()\n {\n empty=true;\n next = null;\n }", "public ListPolygone() {\n this.list = new ArrayList();\n }", "public Lista(){\n inicio=null;\n fin=null;\n }", "public ArreiList() {\n koko = 0;\n }", "public void ouvrirListe(){\n\t\n}", "public List<New> list();", "public ArrayList() {\n\t\tthis(10, 75);\n\t}", "public AList() {\n size = 0;\n items = (Item[]) new Object[100];\n }", "public AList() {\n size = 0;\n items = (Item[]) new Object[100];\n }", "public static void main(String[] args)\n\t{\n\t\tArrayList ar=new ArrayList();\n\t\tSystem.out.println(ar.size());\n\t\tar.add(23);\n\t\tar.add(30);\n\t\tar.add(40);\n\t\tSystem.out.println(ar.size());\n\t\t// We can add duplicates values also.\n\t\tar.add(23);\n\t\tar.get(1);\n\t\tSystem.out.println(\"whats the output\"+ar.get(1));\n\t\tSystem.out.println(ar);\n\t\t\n\t\t\n\t\t\n\n\t}", "public Molt(){\n molt=new ArrayList<>();\n }", "public ListaDuplamenteEncadeada(){\r\n\t\t\r\n\t}", "public void create() {\n String[] arrays = new String[100];\n ArrayList<String> list1 = new ArrayList(); //Object[10]\n list1.size(); //0\n list1.add(\"Vivek\"); //object[0] = \"Vivek\"\n list1.size(); //1\n list1.get(0);//\"Vivek\"\n\n list1.remove(1);\n\n list1.add(0, \"Vivek\");\n\n\n ArrayList<String> list3 = new ArrayList<String>(list1);\n\n ArrayList<Student> list = new ArrayList<Student>();\n\n\n\n }", "private MyAlbumList() {\n albums = new ArrayList<Album>();\n }", "ArrayList<Product> ListOfProducts();", "ListOfBooks(){\n \tlist = new LinkedList<Book>();\n }", "public AList() {\n items = (TypeHere[]) new Object[100];\n size = 0;\n }", "@SuppressWarnings(\"unchecked\") // <.>\n static void wordList(){\n ArrayList wordList = new ArrayList<>(); // <.>\n wordList.add(\"cat\");\n wordList.add(\"dog\");\n\n System.out.println(\"Word list => \" + wordList);\n }", "public void listar(){\r\n // Verifica si la lista contiene elementoa.\r\n if (!esVacia()) {\r\n // Crea una copia de la lista.\r\n Nodo aux = inicio;\r\n // Posicion de los elementos de la lista.\r\n int i = 0;\r\n // Recorre la lista hasta el final.\r\n while(aux != null){\r\n // Imprime en pantalla el valor del nodo.\r\n System.out.print(i + \".[ \" + aux.getValor() + \" ]\" + \" -> \");\r\n // Avanza al siguiente nodo.\r\n aux = aux.getSiguiente();\r\n // Incrementa el contador de la posión.\r\n i++;\r\n }\r\n }\r\n }", "private JList getAnalyzaList() {\n\t\tif (analyzaList == null) {\n\t\t\tanalyzaList = new JList();\n\t\t\tanalyzaList.setBounds(new Rectangle(400, 100, 39, 27));\n\t\t}\n\t\treturn analyzaList;\n\t}", "public static void main(String[] args) {\nArrayList<String>mylist =new ArrayList<String>();\r\nmylist.add(\"anu\");\r\nmylist.add(\"ammu\");\r\nmylist.add(\"renu\");\r\nSystem.out.println(mylist);\r\nfor(int i=0;i<3;i++)\r\n{\r\n\tSystem.out.println(i+\"=\" + mylist.get(i));\r\n}\r\n\t}", "public static void addList() {\n\t}", "public ArrayListStack() {\n\t\telements = new ArrayList<>();\n\t}", "private void initList() {\n\n }", "public void definirObjetos(ObservableList<ListaCompras> lista){\n this.data=lista;\n }", "public SimpleArrayList() {\n this.values = new Object[SimpleArrayList.DEFAULT_SIZE];\n }", "public MusicScore ()\n {\n score = new ArrayList<Note>();\n }", "@SuppressWarnings(\"unchecked\")\r\n public void createList() {\r\n items = new int[MAX_LIST];\r\n NumItems = 0;\r\n }", "public MutiList() {\n\t\tsuper();\n\t\tthis.myList = new ArrayList<>();\n\t}", "public MyStack() {\n \tlist = new ArrayList<Integer>();\n }", "public ArrayList() { // constructs list with default capacity\n this(CAPACITY);\n }", "Sharks() {\n sharks = new ArrayList<Shark>(); // Initialize the ArrayList\n }", "public NumericObjectArrayList() {\r\n list = new Copiable[10];\r\n count = 0;\r\n }", "public list() {\r\n }", "public FpLista() {\r\n\t\t\r\n\t}", "public Liste(){\n\t\tsuper();\n\t\tthis.liste = new int[this.BASE_LENGTH];\n\t\tthis.nb = 0;\n\t}", "public void testingArrayList() {\r\n\t\tSystem.err\r\n\t\t\t\t.println(\"Class NewFeatures, method testingArrayList called!\");\r\n\t\t// we don't need to write data type two times\r\n\t\t// ArrayList<String> list = new ArrayList<String>();\r\n\t\tArrayList<String> list = new ArrayList<>();\r\n\t\tlist.add(\"hey\");\r\n\t\tlist.add(\"kello\");\r\n\t\tlist.add(\"labas\");\r\n\t\tSystem.out.println(\"\\nValue in list:\" + list.get(0));\r\n\t\tSystem.out.println(\"Printing out the ArrayList: \" + list);\r\n\t\tSystem.out.println(\"Class NewFeatures, method testingArrayList done!\");\r\n\t}", "public MyArrayList()\n\t{\n\t\tmyArray = new Object[StartSize];\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic ArrayList1() {\n\t\telements = (E[]) new Object[CAPACITY];\n\t\tsize = 0;\n\t}", "List() {\n this.length = 0;\n }", "public Jahresrangliste() {\r\n\t\tLaeufe = new ArrayList<Lauf>();\r\n\t\tRennfahrer = new ArrayList<Fahrer>();\r\n\t}", "public static void main(String[] args) {\n ArrayList<Object> ar = new ArrayList<Object>();\n ar.add(100);\n ar.add(100);\n ar.add(\"testing\");\n ar.add('c');\n ar.add(12.36);\n ar.add(true);\n\n System.out.println(ar);\n System.out.println(ar.get(4));\n System.out.println(ar.size());\n System.out.println(\"LI = \"+ 0);\n System.out.println(\"HI = \" + (ar.size()-1));\n\n ar.add(500);\n ar.add(400);\n System.out.println(ar.size());\n\n }", "public ArrayList<Articulo> dameArticulo(){\n\t\t\n\t\t\n\t\treturn null;\n\t}", "public AdaptadorRecycler(ArrayList<String> lista) {\n this.lista = lista;\n }", "public TaskList (ArrayList<Task> tasks){ this.tasks = tasks;}", "public ArrayList<User> getArrayList(){\n return userlist;\n }", "public ArrayList<T> getAsList(){\r\n return arrayList;\r\n }", "public MyArrayList() {\n\t\tthis(EXTRA_SPACE);\n\t}", "public DynArrayList() {\n data =(E[]) new Object[CAPACITY];\n }", "List<Vehiculo>listar();", "a(List list) {\n super(1);\n this.$sortedList = list;\n }", "public ArrayListStack(){\r\n theData = new ArrayList<E>();\r\n }", "public TiraList() {\n this.list = new Object[8];\n this.nextindex = 0;\n this.startIndex = 0;\n }", "public PersonalityList()\n {\n pList= new ArrayList<Personality>();\n }", "private List getList() {\n if(itemsList == null) {\n itemsList = new ArrayList<>();\n }\n return itemsList;\n }", "public Lista listar() {\n Lista listaAux = new Lista();\r\n if (this.raiz != null) {\r\n listaAux = listarAux(this.raiz, listaAux);\r\n }\r\n return listaAux;\r\n }", "public List() {\n this.list = new Object[MIN_CAPACITY];\n this.n = 0;\n }", "public Listas_simplemente_enlazada(){\r\n inicio=null; // este constructor me va servir para apuntar el elemento\r\n fin=null;\r\n }", "public static <T> void genericMethod() {\n ArrayList<T> tList = new ArrayList<>();\r\n }", "public ListStack() {\n\t\tlist = new ArrayList<>();\n\t}", "public static void main(String[] args)\r\n\t{\nArrayList al = new ArrayList<>();\r\nal.add(10);\r\nal.add(\"manu\");\r\nal.add('m');\r\nObject [] ob=al.toArray();\r\nfor (int i = 0; i < ob.length; i++)\r\n{\r\n\tSystem.out.println(ob[i]);\r\n\t\r\n}\r\n\t}", "@Override\n\tpublic ArrayList<Lista> listaListeElettorali() {\n\t\t\t\n\t\t\t\n\t\t\tDB db = getDB();\n\t\t\tMap<Integer, Lista> map = db.getTreeMap(\"liste\");\n\t\t\tArrayList<Lista> liste = new ArrayList<Lista>();\n\t\t\tSet<Integer> keys = map.keySet();\n\t\t\tfor (int key : keys) {\n\t\t\t\tliste.add(map.get(key));\n\t\t\t}\n\t\n\t\t\treturn liste;\n\t\t\t\n\t\t}", "private ArrayList<Alimento> initLista() {\n try {\n File file = new File(\"C:\\\\Users\\\\Gabri\\\\OneDrive\\\\Ambiente de Trabalho\\\\Calorie\\\\src\\\\Assets\\\\alimentos.txt\");\n FileReader fr = new FileReader(file);\n BufferedReader br = new BufferedReader(fr);\n\n ArrayList<Alimento> lista = new ArrayList<>();\n\n int noLines = Integer.parseInt(br.readLine());\n for(int l=0; l<noLines; l++) {\n String[] alimTks = (br.readLine()).split(\",\");\n\n Alimento alimento = new Alimento(idAlimCounter++,alimTks[0],100,Integer.parseInt(alimTks[1]),Float.parseFloat(alimTks[2]),Float.parseFloat(alimTks[3]),Float.parseFloat(alimTks[4]));\n lista.add(alimento);\n }\n\n return lista;\n }catch (Exception e) {\n System.out.println(\"Sistema - getLista() : \"+e.toString());\n }\n return null;\n }" ]
[ "0.7106502", "0.70779365", "0.7004358", "0.6947322", "0.6937652", "0.69297254", "0.6891035", "0.6864453", "0.6833558", "0.6819097", "0.6812969", "0.6768781", "0.6755329", "0.671992", "0.6639669", "0.6626324", "0.66221553", "0.66129357", "0.66019773", "0.66013366", "0.65817106", "0.6555369", "0.65031743", "0.65011346", "0.6495094", "0.6490581", "0.648517", "0.64807296", "0.6454909", "0.64493746", "0.6399601", "0.6395017", "0.6377513", "0.63700724", "0.6365447", "0.6315436", "0.62913287", "0.62805194", "0.62773955", "0.62736887", "0.6271553", "0.62452537", "0.62420887", "0.6236613", "0.6232437", "0.6225813", "0.6225813", "0.62069815", "0.62048715", "0.6204409", "0.6202509", "0.6201788", "0.62011105", "0.61986095", "0.6196463", "0.6195874", "0.6173862", "0.6157105", "0.61540496", "0.6148102", "0.61475176", "0.6142904", "0.61393034", "0.6123216", "0.61226434", "0.61170405", "0.6108665", "0.6108319", "0.609655", "0.6091063", "0.60893893", "0.60860497", "0.6084365", "0.60818696", "0.6054845", "0.60493124", "0.6047701", "0.6043168", "0.6035972", "0.60343313", "0.6034236", "0.60308963", "0.60245156", "0.6020416", "0.60178936", "0.60152584", "0.60145813", "0.6009345", "0.6007962", "0.6001562", "0.5996913", "0.59904855", "0.59878415", "0.5967053", "0.59637433", "0.5962376", "0.5961173", "0.5961076", "0.5952852", "0.5952688", "0.59424126" ]
0.0
-1
TODO Autogenerated method stub
@Override public void actionPerformed(ActionEvent e){ String name=nameField.getText(); String occupation=occupationField.getText(); FormEvent eve= new FormEvent(this,name,occupation); //lista.add(eve); //if(formListener!=null){ //formListener.formEventOcurred(eve); //} if(formListener!=null){ formListener.formEventOcurred(eve); } }
{ "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
Created by lenovo on 20160309.
public interface TieNoticeTimeService { /** * 从系公告时间表中查询是否存在该时间 * * @param time xxxx年xx月 * @return */ List<TieNoticeTime> findByTime(String time); /** * 若时间组表中不存在该时间则插入该时间并获取id * * @param tieNoticeTime * @return id */ int save(TieNoticeTime tieNoticeTime); /** * 通过id查询 * * @param id * @return */ TieNoticeTime findById(int id); /** * 系公告分组查询 * * @param bigTitle * @param tieId * @return */ Result<Record2<Integer, String>> findByBigTitleAndTieIdAndTimeDistinctId(String bigTitle, int tieId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\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 entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n public void init() {\n\n }", "@Override\n protected void initialize() {\n\n \n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\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}", "public final void mo51373a() {\n }", "public void gored() {\n\t\t\n\t}", "private void init() {\n\n\t}", "private void poetries() {\n\n\t}", "public void mo38117a() {\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n public void init() {\n }", "@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 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 }", "@Override\n void init() {\n }", "@Override\n public int describeContents() { return 0; }", "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 }", "public void mo4359a() {\n }", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "private void strin() {\n\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@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}", "@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 public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n public void init() {}", "@Override\n\tprotected void initialize() {\n\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\n protected void init() {\n }", "@Override\r\n\tpublic void init() {}", "private void kk12() {\n\n\t}", "public void mo6081a() {\n }", "@Override\n protected void getExras() {\n }", "private void init() {\n\n\n\n }", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "Petunia() {\r\n\t\t}", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n\tpublic void afterInit() {\n\t\t\n\t}", "@Override\n\tpublic void afterInit() {\n\t\t\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "public void mo55254a() {\n }", "@Override\n public void initialize() { \n }", "@Override\n\tpublic void init() {\n\t}", "private Rekenhulp()\n\t{\n\t}", "private void m50366E() {\n }", "@Override\n\tpublic void einkaufen() {\n\t}", "private void getStatus() {\n\t\t\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}" ]
[ "0.59535336", "0.58447766", "0.58069956", "0.5743041", "0.56861293", "0.56644094", "0.5632041", "0.561802", "0.561802", "0.55861264", "0.55612385", "0.55489224", "0.5543659", "0.55358136", "0.55310416", "0.5531039", "0.5523022", "0.5520061", "0.551992", "0.55152726", "0.5492896", "0.547454", "0.54744476", "0.54744476", "0.54744476", "0.54744476", "0.54744476", "0.54737085", "0.5461973", "0.5460187", "0.5447614", "0.5443426", "0.54220724", "0.5420157", "0.5420157", "0.5407163", "0.53963107", "0.53963107", "0.53892976", "0.53892976", "0.53892976", "0.53892976", "0.53892976", "0.53892976", "0.53871673", "0.5385223", "0.53786564", "0.53786564", "0.53786564", "0.53786564", "0.53786564", "0.53786564", "0.53786564", "0.53778833", "0.5375095", "0.53746766", "0.5367771", "0.53675735", "0.5367341", "0.53624946", "0.5362398", "0.53555244", "0.53555244", "0.53555244", "0.534627", "0.534627", "0.534627", "0.53449434", "0.53449434", "0.5340635", "0.5340635", "0.5340635", "0.53354055", "0.5330765", "0.5329701", "0.5328822", "0.53194296", "0.5318335", "0.531379", "0.5312713", "0.5312145", "0.5309706", "0.52991205", "0.5275118", "0.5264141", "0.52584225", "0.52580774", "0.52568996", "0.5254036", "0.5254036", "0.5252444", "0.5251416", "0.5251034", "0.5244903", "0.52348447", "0.5231817", "0.52309185", "0.52163494", "0.521585", "0.52097523", "0.5200174" ]
0.0
-1
Created by ljp on 2017/3/7.
@Mapper public interface DeliveryMapper { @Select("SELECT * FROM delivery WHERE indent_id = #{indentId}") Delivery findByIndentId(@Param("indentId") Long indentId); @Select("SELECT * FROM delivery WHERE id = #{id}") Delivery findById(@Param("id") Long id); @Insert("INSERT INTO delivery(indent_id, sender, receiver, amount) VALUES(#{indentId}, #{sender}, #{receiver}, #{amount})") int insert(Delivery delivery); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\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}", "private static void cajas() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "private void poetries() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void anular() {\n\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\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "public void mo38117a() {\n }", "@Override\n void init() {\n }", "@Override\n public void init() {\n }", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "private void m50366E() {\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "private void init() {\n\n\t}", "@Override\n protected void initialize() {\n\n \n }", "private void kk12() {\n\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n public int describeContents() { return 0; }", "public void mo4359a() {\n }", "protected boolean func_70814_o() { return true; }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "public void gored() {\n\t\t\n\t}", "@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 }", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\n public void init() {}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "private void strin() {\n\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 anularFact() {\n\t\t\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\r\n\tpublic void init() {}", "@Override\n protected void initialize() \n {\n \n }", "@Override\n protected void init() {\n }", "@Override\n\tpublic void one() {\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}", "@Override\n\tpublic void einkaufen() {\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\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n public int retroceder() {\n return 0;\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 }", "public void mo6081a() {\n }", "@Override\n\tpublic void init() {\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "private void init() {\n\n\n\n }", "@Override\n public void initialize() { \n }", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "private MetallicityUtils() {\n\t\t\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "private final zzgy zzgb() {\n }", "private void init() {\n }", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}" ]
[ "0.5998803", "0.5887881", "0.5726993", "0.5697968", "0.56932306", "0.56932306", "0.5685947", "0.56771135", "0.56313473", "0.56288564", "0.5592593", "0.55807", "0.5535703", "0.552984", "0.55144656", "0.55099386", "0.55081755", "0.55066854", "0.54875994", "0.548528", "0.547006", "0.54637367", "0.5459805", "0.54557717", "0.5448801", "0.54430604", "0.54430604", "0.54430604", "0.54430604", "0.54430604", "0.5440326", "0.5433448", "0.54254544", "0.5417776", "0.5408877", "0.5404112", "0.53852576", "0.5380059", "0.53717613", "0.5367047", "0.53521276", "0.5347604", "0.5347034", "0.53454024", "0.53453296", "0.53453296", "0.53453296", "0.53453296", "0.53453296", "0.53453296", "0.5345051", "0.5345051", "0.5343864", "0.53421044", "0.53421044", "0.53421044", "0.53389275", "0.53348446", "0.53348446", "0.5327466", "0.5325027", "0.5318868", "0.5314304", "0.53110856", "0.53088385", "0.53083366", "0.53083366", "0.53083366", "0.5308302", "0.530172", "0.530172", "0.530172", "0.5280309", "0.5280309", "0.5270747", "0.5262611", "0.5261432", "0.5261432", "0.5261432", "0.5261432", "0.5261432", "0.5261432", "0.5261432", "0.5255752", "0.525546", "0.52389824", "0.5236291", "0.5230186", "0.5229707", "0.52154285", "0.5211573", "0.5206781", "0.52032155", "0.51766294", "0.5176302", "0.517522", "0.5170703", "0.51652265", "0.5155091", "0.5152123", "0.51517487" ]
0.0
-1
/ serverLabelAdapter = new ServerLabelAdapter(R.layout.server_label_item,serverLabelEntityArrayList); label_recycler.setLayoutManager(new GridLayoutManager(getContext(),4)); label_recycler.setAdapter(serverLabelAdapter);
private void initLabelRecycler() { id_flowlayout.setAdapter(new TagAdapter<ServerLabelEntity>(serverLabelEntityArrayList) { @Override public View getView(FlowLayout parent, int position, ServerLabelEntity serverLabelEntity) { TextView server_label_name_tv = (TextView) LayoutInflater.from(getContext()).inflate(R.layout.server_details_label_item, id_flowlayout, false); server_label_name_tv.setText(serverLabelEntity.getName()); return server_label_name_tv; } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setRecycler(){\n GridLayoutManager manager=new GridLayoutManager(context,2,LinearLayoutManager.HORIZONTAL,\n false);\n\n recyclerView.setLayoutManager(manager);\n recyclerView.setHasFixedSize(true);\n MainMenuAdapter mainMenuAdapter=new MainMenuAdapter(menuRows,context,true);\n recyclerView.setAdapter(mainMenuAdapter);\n }", "private void prepareRecyclerView() {\n equipmentInventoryListAdapter = new EquipmentInventoryListAdapter_v2(equipmentInventoryAvailableCallback, equipmentInventoryMissingCallback);\n GridLayoutManager layoutManager = new GridLayoutManager(getContext(), 2);\n binding.equipmentInventoryList.setLayoutManager(layoutManager);\n binding.equipmentInventoryList.setAdapter(equipmentInventoryListAdapter);\n //binding.equipmentInventoryList.addItemDecoration(new DividerItemDecoration(binding.equipmentInventoryList.getContext(), DividerItemDecoration.HORIZONTAL));\n }", "@Override\n public void onGlobalLayout() {\n\n if (!isFirstLayout) {\n isFirstLayout = true;\n ListAdapter adapter=new MeAdapter(getActivity(),gv.getHeight()/2,resIds,names);\n gv.setAdapter(adapter);\n\n }\n }", "@Override\n public void onResponse(JSONArray response) {\n\n for (int i =0; i < response.length();i++){\n\n try {\n arrayList.add(new cardData(response.getJSONObject(i).getString(\"category\"), imageEndpoint+response.getJSONObject(i).getString(\"image\")));\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n\n recyclerView = findViewById(R.id.recyclerView2);\n\n GridLayoutManager layoutManager = new GridLayoutManager(SecondActivity.this, 2);\n recyclerView.setLayoutManager(layoutManager);\n\n RecyclerView.Adapter adapter = new SecondRecyclerAdapter(SecondActivity.this, arrayList);\n\n recyclerView.setAdapter(adapter);\n\n }", "private void initAdapter() {\n GridLayoutManager layoutManager = new GridLayoutManager(this, 3);\n //设置布局管理器\n rv.setLayoutManager(layoutManager);\n //设置为垂直布局,这也是默认的\n layoutManager.setOrientation(OrientationHelper.VERTICAL);\n\n adapter1 = new CommomRecyclerAdapter(ChoiceCityActivity.this, stringList, R.layout.recy_country, new CommomRecyclerAdapter.OnItemClickListener() {\n @Override\n public void onItemClick(CommonRecyclerViewHolder holder, int postion) {\n //热门城市点击\n Map map = new HashMap();\n map.put(\"p1\",stringList.get(postion).getHotCity() );\n StatisticsManager.getInstance(mContext).addEventAidl(1812,map);\n\n Intent intent = new Intent(ChoiceCityActivity.this, MainActivity.class);\n intent.putExtra(\"country\", stringList.get(postion).getHotCountry());\n intent.putExtra(\"city\", stringList.get(postion).getHotCity());\n Constans.CITY = stringList.get(postion).getHotCity();\n Constans.COUNTRY = stringList.get(postion).getHotCountry();\n if (isFirst == 1) {\n isFirst=0;\n startActivity(intent);\n } else {\n setResult(RESULT_OK, intent);\n }\n finish();\n }\n }, null) {\n @Override\n public void convert(CommonRecyclerViewHolder holder, Object o, int position) {\n TextView tv_country_name = holder.getView(R.id.tv);\n tv_country_name.setText(stringList.get(position).getHotCity());\n }\n };\n rv.setAdapter(adapter1);\n\n\n }", "@Override\n public listAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n\n\n\n View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.listitemamentitylayout, parent, false);\n\n listAdapter.ViewHolder vh = new listAdapter.ViewHolder(v);\n\n\n\n return vh;\n\n\n\n }", "private void renderer(int rv, ArrayList<ItemBox> list){\n recyclerView = findViewById(rv);\r\n recyclerView.setHasFixedSize(true);\r\n RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false);\r\n RecyclerView.Adapter adapter = new Itembox_Adapter(list, this, 1);\r\n recyclerView.setLayoutManager(layoutManager);\r\n recyclerView.setAdapter(adapter);\r\n }", "@Override\n public void onBindViewHolder(final TextViewHolder holder, final int position) {\n if (mNumColumns == -1) {\n\n// Log.d(\"Lustig\", \"setting adapter numColumns\");\n\n mNumColumns = mRecyclerView.getNumColumns();\n\n// Log.d(\"Lustig\", \"mNumColumns now = \" + mNumColumns);\n }\n\n final String label = labels.get(position);\n holder.textView.setText(label);\n }", "private void setupRecyclerView() {\n recyclerView.setRecycledViewPool(recycledViewPool);\n\n // We are using a multi span grid to allow two columns of buttons. To set this up we need\n // to set our span count on the controller and then get the span size lookup object from\n // the controller. This look up object will delegate span size lookups to each model.\n controller.setSpanCount(SPAN_COUNT);\n// GridLayoutManager gridLayoutManager = new GridLayoutManager(this.getContext(),SPAN_COUNT);\n StaggeredGridLayoutManager gridLayoutManager = new StaggeredGridLayoutManager(SPAN_COUNT, StaggeredGridLayoutManager.VERTICAL);\n// gridLayoutManager.setSpanSizeLookup(controller.getSpanSizeLookup());\n recyclerView.setLayoutManager(gridLayoutManager);\n\n recyclerView.setHasFixedSize(true);\n// recyclerView.addItemDecoration(new VerticalGridCardSpacingDecoration());\n recyclerView.setItemAnimator(new SampleItemAnimator());\n recyclerView.setAdapter(controller.getAdapter());\n }", "private void setRecycleView(){\n\n RecyclerView recyclerView = findViewById(R.id.recycler_view);\n RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(getApplicationContext());\n recyclerView.setLayoutManager(mLayoutManager);\n recyclerView.setItemAnimator(new DefaultItemAnimator());\n recyclerView.setAdapter(multiViewAdapter);\n }", "public void initRecyclerView() {\n\r\n\r\n recyclerView.setHasFixedSize(true);\r\n recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));\r\n\r\n\r\n adapter = new LokerAdapter(getContext(), itemList);\r\n recyclerView.setAdapter(adapter);\r\n\r\n }", "private void generateResponseList(ArrayList<Response> responseList) {\n mRecyclerView = (RecyclerView) findViewById(R.id.recycler_view);\n mResponseAdapter = new ResponseDataAdapter(responseList, this);\n RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(MainActivity.this);\n mRecyclerView.setLayoutManager(layoutManager);\n mRecyclerView.setAdapter(mResponseAdapter);\n }", "public void cargarAdaptador(){\n gridLayoutManager = new GridLayoutManager(getContext(), 2);\n recyclerView.setLayoutManager(gridLayoutManager);\n adapterRecetas = new AdapterRecetas(getContext());\n recyclerView.setAdapter(adapterRecetas);\n }", "@Override\n public ViewHolder onCreateViewHolder(ViewGroup arg0, int arg1) {\n\n return new ViewHolder(new TextView(RecyclerViewActivity.this)) {\n\n };\n }", "private void buildRecyclerView() {\n\n movieRecyclerView = findViewById(R.id.movieRecyclerView);\n\n customAdapter = new CustomAdapter(MovieActivity.this,movieLists);\n movieRecyclerView.setAdapter(customAdapter);\n layoutManager = new GridLayoutManager(this,1);\n movieRecyclerView.setLayoutManager(layoutManager);\n\n }", "private void setAdapter() {\n adapter = new MessageAdapter(messages);\n RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(getApplicationContext());\n recyclerView.setLayoutManager(mLayoutManager);\n recyclerView.setItemAnimator(new DefaultItemAnimator());\n recyclerView.setAdapter(adapter);\n }", "private void setUpAdapter(){\n customMovieAdapter= new CustomMovieAdapter(getActivity(),R.layout.list_movie_forecast,movieRowItemsList);\n gridView.setAdapter(customMovieAdapter);\n }", "protected void init_adapter()\n {\n manager = new GridLayoutManager(this, 2);\n recycler_view.setLayoutManager(manager);\n //recycler_view.setit\n\n adapter = new NasaApodAdapter();\n\n adapter.setOnItemClickListener(new NasaApodAdapter.OnItemClickListener()\n {\n @Override\n public void onItemClick(Photo photo)\n {\n Log.d(\"APOD\", photo.getImgSrc());\n\n intent = new Intent(getApplicationContext(), DetailActivity.class);\n intent.putExtra(\"photo\", photo);\n\n startActivity(intent);\n }\n });\n }", "@Override\n public void run() {\n\n\n RecyclerView.Adapter adapter = new RecyclerViewAdapter(aa,aa1,aa4,aa5,aa6,aa7,aa8,aa9);\n\n recyclerview.setAdapter(adapter);\n\n\n\n }", "private void initViews() {\n\n myOnClickListener = new MyOnClickListener(getContext());\n recyclerView = (RecyclerView)view.findViewById(R.id.recyclerView_ID);\n recyclerView.setHasFixedSize(true);\n layoutManager = new GridLayoutManager(getActivity(), 2);\n recyclerView.setLayoutManager(layoutManager);\n// adapter = new HomeAdapter(al,al2);\n// recyclerView.setAdapter(adapter);\n\n Log.e(\"adapter value : \",\"\"+this.al +this.al2);\n }", "private void configRecyclerView() {\n if(getActivity().getResources().getConfiguration().orientation==1) {\n GridLayoutManager gridLayoutManager = new GridLayoutManager(getActivity(),2);\n gridLayoutManager.setSpanSizeLookup(adapter.obtainGridSpanSizeLookUp(2));\n recyclerView.setLayoutManager(gridLayoutManager);\n } else{\n GridLayoutManager gridLayoutManager = new GridLayoutManager(getActivity(),3);\n gridLayoutManager.setSpanSizeLookup(adapter.obtainGridSpanSizeLookUp(3));\n recyclerView.setLayoutManager(gridLayoutManager);\n }\n //设置没有网络的状态\n recyclerView.setEmptyView(R.layout.view_empty);\n recyclerView.setProgressView(R.layout.view_complete);\n //写刷新事件\n recyclerView.setRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {\n @Override\n public void onRefresh() {\n recyclerView.postDelayed(new Runnable() {\n @Override\n public void run() {\n adapter.clear();\n currentPage = 1;\n page = 1;\n //getData();\n getLocalData();\n }\n }, 1000);\n }\n });\n }", "private void setUpBookingRecycler() {\n LinearLayoutManager linearLayoutManager1 = new LinearLayoutManager(mThis);\n linearLayoutManager1.setOrientation(LinearLayoutManager.VERTICAL);\n mBinding.requestRv.setLayoutManager(linearLayoutManager1);\n\n }", "public ModelRecyclerAdapter(Context context, ArrayList<Model> myDataset) {\n mDataset = myDataset;\n mContext = context.getApplicationContext();\n mInflater = LayoutInflater.from(context);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n\n super.onCreate(savedInstanceState);\n final View view = inflater.inflate(R.layout.wishlist_layout, container, false);\n layoutManager = new GridLayoutManager(getContext(), 2);\n Log.d(\"wishlist\",MainActivity.wishListItems.toString());\n JSONObject x=MainActivity.wishListItems;\n Iterator keys = x.keys();\n while (keys.hasNext()) {\n Object key = keys.next();\n JSONObject value = null;\n try {\n value = x.getJSONObject((String) key);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n Allresults.put(value);\n }\n\n\n if(Allresults!=null){\n View nodata = view.findViewById(R.id.nodata);\n nodata.setVisibility(View.GONE);\n View data = view.findViewById(R.id.data);\n data.setVisibility(View.VISIBLE);\n recyclerView = view.findViewById(R.id.recyclerView);\n recyclerView.setHasFixedSize(true);\n recyclerView.setLayoutManager(layoutManager);\n adapter = new SearchResultAdapter(Allresults);\n //adapter1 = new SearchResultAdapter(Allresults);\n recyclerView.setAdapter(adapter);\n }\n else{\n View nodata = view.findViewById(R.id.nodata);\n nodata.setVisibility(View.VISIBLE);\n View data = view.findViewById(R.id.data);\n data.setVisibility(View.GONE);\n }\n\n return view;\n }", "MyRecyclerViewAdapter(Context context, List<String> data,List<String> giorno,List<String> primo,List<String> secondo,List<String> contorno,List<String> dolce) {\n this.mInflater = LayoutInflater.from(context);\n this.mdata = data;\n this.mgiorno = giorno;\n this.mprimo = primo;\n this.msecondo = secondo;\n this.mcontorno = contorno;\n this.mdolce = dolce;\n\n\n\n }", "private void setRecyclerView(ArrayList<NotificationResponse.NotificationList> myArrayList) {\n OnItemClickListener onItemClickListener = new OnItemClickListener() {\n @Override\n public void onClick(int position, Object obj) {\n /* FavoriteOfferListResponse.Category category = (FavoriteOfferListResponse.Category) obj;\n Intent intent = new Intent(PushNotificationActivity.this, StoreDetailsActivity.class);\n intent.putExtra(StoreDetailsActivity.STORE_ID, category.getStoreId());\n intent.putExtra(StoreDetailsActivity.STORE_NAME, category.getStoreName());\n intent.putExtra(StoreDetailsActivity.CATEGORY_ID, \"\");\n intent.putExtra(StoreDetailsActivity.PRODUCT_TYPE, \"\");\n startActivity(intent);*/\n }\n };\n activityBinding.recyclerView.setLayoutManager(new GridLayoutManager(PushNotificationActivity.this, 1));\n activityBinding.recyclerView.setAdapter(new NotificationAdapter(PushNotificationActivity.this, myArrayList,\n onItemClickListener));\n }", "@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n View grid;\n final CompanyItem companydetail = company_itemlist.get(position);\n LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\n if (convertView == null) {\n\n\n grid = new View(mContext);\n grid = inflater.inflate(R.layout.grid_item, null);\n TextView textView = (TextView) grid.findViewById(R.id.txt_gridItem);\n ImageView imageView = (ImageView) grid.findViewById(R.id.img_gridIcon);\n imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);\n imageView.setScaleX(1.0f);\n imageView.setScaleY(1.0f);\n ImageLoader imageLoader = ImageLoader.getInstance();\n DisplayImageOptions options = new DisplayImageOptions.Builder().cacheInMemory(true)\n .cacheOnDisc(true).resetViewBeforeLoading(true)\n .showImageForEmptyUri(R.mipmap.ic_launcher)\n .showImageOnFail(R.mipmap.ic_launcher)\n .showImageOnLoading(R.mipmap.ic_launcher).build();\n\n\n textView.setText(companydetail.getCompany_name());\n\n// Bitmap bit = imageLoader.loadImageSync(companydetail.getCompany_logo());\n\n imageLoader.displayImage(companydetail.getCompany_logo(), imageView, options);\n\n } else {\n grid = (View) convertView;\n }\n\n\n return grid;\n }", "private void updateAdapter() {\n iga = new IngredientGridAdapter(getApplicationContext(), ingredientList);\n gridView.setAdapter(iga);\n iga.notifyDataSetChanged();\n }", "@Override\n public void onBindViewHolder(ViewHolder holder, int position) {\n\n }", "@Override\r\n public void onDataSetChanged() {\n }", "public void load_grid(){\n RecyclerView moduleRecycler = (RecyclerView) findViewById(R.id.semestre_recycler);\n EtudiantSemestreRecycler adapter = new EtudiantSemestreRecycler(this, semestres);\n moduleRecycler.setAdapter(adapter);\n\n LinearLayoutManager manager = new LinearLayoutManager(this);\n manager.setOrientation(RecyclerView.VERTICAL);\n moduleRecycler.setLayoutManager(manager);\n }", "private void initRecyclerView(){\n facility_RCV_result.setHasFixedSize(true);\n layoutManager = new LinearLayoutManager(this.getContext());\n facility_RCV_result.setLayoutManager(layoutManager);\n mAdapter = new FacilityRecyclerViewAdapter(facilityArrayList);\n facility_RCV_result.setAdapter(mAdapter);\n }", "@Override\n public void onBindViewHolder(RecyclerView.ViewHolder holder, final int position) {\n // - get element from your dataset at this position\n // - replace the contents of the view with that element\n if(holder instanceof EntityViewHolder){\n EntityViewHolder entityViewHolder = ((EntityViewHolder) holder);\n entityViewHolder.getNumeroColumnas().setText(\"\");\n entityViewHolder.getNumeroRegistros().setText(\"\");\n entityViewHolder.getNumeroEntity().setText(\"\");\n entityViewHolder.getNumeroEntity().setText(\"\");\n AbstractDao dao = daoApp.getEntityByName(entityList.get(position));\n entityViewHolder.getNombreEntity().setText(entityList.get(position));\n entityViewHolder.getNumeroEntity().setText(\"\"+position);\n entityViewHolder.getLinearLayout().setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n mOnItemClickLister.onItemClicked(entityList.get(position),position);\n }\n });\n entityViewHolder.getNumeroColumnas().setText(\"\"+dao.getAllColumns().length);\n entityViewHolder.getNumeroRegistros().setText(\"\"+dao.count());\n entityViewHolder.getLinearLayout().setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n mOnItemClickLister.onItemClicked(entityList.get(position),position);\n\n }\n });\n\n }\n\n\n\n }", "private void setAdapter(){\n ArrayList<Veranstaltung>ver = new ArrayList<>(studium.getLVS());\n recyclerView = findViewById(R.id.rc);\n LinearLayoutManager manager = new LinearLayoutManager(this);\n recyclerView.setLayoutManager(manager);\n recyclerView.setHasFixedSize(true);\n adapter = new StudiumDetailsRecylerAdapter(ver);\n recyclerView.setAdapter(adapter);\n }", "private void setRecyclerViewAdapter(List<Task> tasks){\n adapter = new DataAdapter(ViewTaskActivity.this, tasks);\n recyclerView.setAdapter(adapter);\n recyclerView.setLayoutManager(layoutManager);\n }", "private void generateDataList(List<Game> gameList) {\n recyclerView = findViewById(R.id.customRecyclerView);\n adapter = new CustomAdapter(this, gameList);\n RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(MainActivity.this);\n recyclerView.setLayoutManager(layoutManager);\n recyclerView.setAdapter(adapter);\n }", "protected void setUpListOfImageRecyclerView() {\n try {\n\n content_layout.removeAllViews();\n RecyclerView recyclerView = new RecyclerView(getApplicationContext());\n recyclerView.setLayoutParams(\n new ViewGroup.LayoutParams(\n // or ViewGroup.LayoutParams.WRAP_CONTENT\n ViewGroup.LayoutParams.MATCH_PARENT,\n // or ViewGroup.LayoutParams.WRAP_CONTENT,\n ViewGroup.LayoutParams.MATCH_PARENT));\n\n LinearLayoutManager layoutManager\n = new LinearLayoutManager(getApplicationContext(), LinearLayoutManager.HORIZONTAL, false);\n\n // set main_logo LinearLayoutManager with HORIZONTAL orientation\n recyclerView.setLayoutManager(layoutManager);\n\n // call the constructor of CustomAdapter to send the reference and data to Adapter\n recyclerView.setAdapter(mSelectedImageAdapter); // set the Adapter to RecyclerView\n\n\n content_layout.addView(recyclerView);\n\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }", "@Override\n public void onResponse(Call call, retrofit2.Response response) {\n String stringRequest=new Gson().toJson(response.body());\n\n try {\n JSONArray array = new JSONArray(stringRequest);\n for (int n = 0; n < array.length(); n++) {\n CategoryModel categoryModel=new CategoryModel();\n JSONObject obj = array.getJSONObject(n);\n categoryModel.setId(Integer.parseInt(obj.get(\"id\").toString().replace(\".0\",\"\")));\n categoryModel.setName_category(obj.get(\"name_category\").toString());\n categoryModel.setStatus_category(Integer.parseInt(obj.get(\"status_category\").toString().replace(\".0\",\"\")));\n categoryModels.add(n,categoryModel);\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n adapter_ = new CategoryAdapter(categoryModels,getApplicationContext());\n LinearLayoutManager layoutManager\n = new LinearLayoutManager(getApplicationContext(), LinearLayoutManager.HORIZONTAL, false);\n\n category_recyclerview.setLayoutManager(layoutManager);\n category_recyclerview.setItemAnimator(new DefaultItemAnimator());\n category_recyclerview.setAdapter(adapter_);\n\n\n }", "public ViewHolder(View itemView) {\n super(itemView);\n\n tvMessageLeft = (TextView) itemView.findViewById(R.id.tvMessageLeft);\n tvMessageRight = (TextView) itemView.findViewById(R.id.tvMessageRight);\n ivUserIcon = (ImageView) itemView.findViewById(R.id.ivProfPicMessageList);\n // tvTime_stamp = (TextView) itemView.findViewById(R.id.tvTime);\n\n\n //llItemListTop = (LinearLayout) itemView.findViewById(R.id.llListItemTop);\n //llItemListMiddle = (LinearLayout) itemView.findViewById(R.id.llListItemMiddle);\n //llItemListBottom = (LinearLayout) itemView.findViewById(R.id.llListItemTop);\n\n\n }", "public void initialiseRecycler(ArrayList<String> deviceID, ArrayList<String>deviceNames){\r\n\r\n\r\n RecyclerView recyclerView = findViewById(R.id.recyclerView);\r\n\r\n\r\n adapterDevices= new MyDevicesAdapterView(this, deviceID, deviceNames);\r\n\r\n recyclerView.setAdapter(adapterDevices);\r\n\r\n recyclerView.setLayoutManager(new LinearLayoutManager(this));\r\n\r\n\r\n }", "MyRecyclerViewAdapter(Context context, ArrayList<Answer> answers) {\n this.mInflater = LayoutInflater.from(context);\n this.answers=answers;\n }", "@Override\n protected void onPostExecute(ArrayList<News> newsArrayList) {\n super.onPostExecute(newsArrayList);\n newsList=new ArrayList<>();\n if(textQuery.equals(\"\")){\n newsAdapter=new NewsAdapter(getContext(),newsArrayList);\n } else {\n for(int i=0;i<newsArrayList.size();i++){\n if(newsArrayList.get(i).getTitle().contains(textQuery)){\n News news=newsArrayList.get(i);\n newsList.add(new News(news.getTitle(),news.getDescription(),news.getTime(),news.getImage(),news.getLink()));\n }\n }\n newsAdapter=new NewsAdapter(getContext(),newsList);\n }\n\n LinearLayoutManager linearLayoutManager=new LinearLayoutManager(getActivity());\n rcvListNews.setHasFixedSize(true);\n rcvListNews.setLayoutManager(linearLayoutManager);\n rcvListNews.setAdapter(newsAdapter);\n\n\n\n\n }", "@Override\n public ChatViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n View view = LayoutInflater.from(parent.getContext())\n .inflate(R.layout.chat_row, parent, false);\n ctx=view.getContext();\n\n\n ChatViewHolder myViewHolder = new ChatViewHolder(view);\n return myViewHolder;\n }", "@Override\n public int getCount()\n {\n return 1;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_channel, container, false);\n recyclerView = (RecyclerView)v.findViewById(R.id.recyclerView);\n mAdapter = new ChannelAdapter();\n recyclerView.setAdapter(mAdapter);\n\n GridLayoutManager layoutManager = new GridLayoutManager(getContext(),2);\n layoutManager.setSpanSizeLookup(new GridLayoutManager.SpanSizeLookup() {\n @Override\n public int getSpanSize(int position) {\n if(mAdapter.getItemViewType(position) == ChannelAdapter.VIEW_TYPE_GROUP){\n return 2;\n }\n return 1;\n }\n });\n\n recyclerView.setLayoutManager(layoutManager);\n\n initData();\n\n return v;\n }", "private void InitializeAdapter() {\n arrayAdapter = new PlanListRVArrayAdapter(mPlanList);\n recyclerView.setAdapter(arrayAdapter);\n /* arrayAdapter.registerAdapterDataObserver(new RecyclerView.AdapterDataObserver() {\n @Override\n public void onChanged() {\n super.onChanged();\n //arrayAdapter.notifyDataSetChanged();\n }\n\n @Override\n public void onItemRangeChanged(int positionStart, int itemCount) {\n // arrayAdapter.notifyItemRangeChanged(positionStart,itemCount);\n }\n\n @Override\n public void onItemRangeInserted(int positionStart, int itemCount) {\n // arrayAdapter.notifyItemRangeRemoved(positionStart,itemCount);\n }\n\n @Override\n public void onItemRangeRemoved(int positionStart, int itemCount) {\n // arrayAdapter.notifyItemRangeRemoved(positionStart,itemCount);\n }\n\n @Override\n public void onItemRangeMoved(int fromPosition, int toPosition, int itemCount) {\n // arrayAdapter.notifyItemMoved(fromPosition,toPosition);\n // TODO itemcount가 1일 경우이므로 1보다 크면 제대로 동작하지 않는다.\n }\n });\n*/\n\n }", "@Override\n public void onResponse(ArrayList<WeatherForeCastModel> weatherForeCastModel) {\n ArrayAdapter arrayAdapter = new ArrayAdapter(MainActivity.this, android.R.layout.simple_list_item_1, weatherForeCastModel);\n lv.setAdapter(arrayAdapter);\n }", "@Override\n public void onResponse(ArrayList<WeatherForeCastModel> weatherForeCastModel) {\n ArrayAdapter arrayAdapter = new ArrayAdapter(MainActivity.this, android.R.layout.simple_list_item_1, weatherForeCastModel);\n lv.setAdapter(arrayAdapter);\n }", "private void configureRecyclerView(){\n this.postAdapter = new PostAdapter(generateOptionsForAdapter(PostHelper.getAllMyPosts(BaseActivity.getUid())),\n Glide.with(this), this,false, false);\n\n\n recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));\n recyclerView.setAdapter(this.postAdapter);\n }", "public void AddItemsToRecyclerView()\n {\n source = new Vector();\n source.add(\"排班\");\n source.add(\"加班\");\n source.add(\"打卡\");\n source.add(\"請假\");\n source.add(\"文件\");\n source.add(\"訂餐\");\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_server_managment, container, false);\n RecyclerView serverListRV = v.findViewById(R.id.serverListRV);\n serverListRV.setAdapter(new ServerListReducedAdapter(ServerListFragment.serverList, ServerListFragment.selectedServer, this));\n LinearLayoutManager linearLayoutManager= new LinearLayoutManager(getContext(), LinearLayoutManager.HORIZONTAL,false);\n serverListRV.setLayoutManager(linearLayoutManager);\n return v;\n }", "private void setUpRecyclerview(){\r\n mRecyclerview = (RecyclerView) findViewById(R.id.roomRecView);\r\n LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false);\r\n mRecyclerview.setLayoutManager(linearLayoutManager);\r\n mRecyclerview.setHasFixedSize(true);\r\n mRoomRecyclerview = new RoomRecyclerview(this,mQuery,mAdapterItems,mAdapterKeys);\r\n mRecyclerview.setAdapter(mRoomRecyclerview);\r\n RecyclerView.ItemAnimator itemAnimator = new DefaultItemAnimator();\r\n itemAnimator.setAddDuration(1000);\r\n itemAnimator.setRemoveDuration(1000);\r\n itemAnimator.setChangeDuration(1000);\r\n itemAnimator.setMoveDuration(1000);\r\n mRecyclerview.setItemAnimator(itemAnimator);\r\n\r\n }", "private void initView() {\n linearLayoutManager = new LinearLayoutManager(getContext(),LinearLayoutManager.HORIZONTAL,true);\n hotNews_adapter = new HotNews_Adapter(getContext(),getPosts());\n recyclerViewHotNews.setLayoutManager(linearLayoutManager);\n recyclerViewHotNews.setAdapter(hotNews_adapter);\n\n //RecyclerView summary\n recyclerViewSummary.setLayoutManager(new LinearLayoutManager(getContext()));\n summary_adapter = new Summary_Adapter(getContext(),getPosts());\n\n //RecyclerView suummary category\n summary_category_adapter = new Summary_Category_Adapter(getContext(),getPosts());\n\n // Create a new merge adapter.\n RecyclerViewMergeAdapter mergeAdapter = new RecyclerViewMergeAdapter();\n // Add any number of subadapters to the merge adapter.\n mergeAdapter.addView(viewHeader);\n mergeAdapter.addAdapter(summary_adapter);\n mergeAdapter.addAdapter(summary_category_adapter);\n // Set the merge adapter on the RecyclerView.\n recyclerViewSummary.setAdapter(mergeAdapter);\n\n }", "private void setDataInRecyclerView() {\n LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getActivity());\n recyclerView.setLayoutManager(linearLayoutManager);\n // call the constructor of UsersAdapter to send the reference and data to Adapter\n UsersAdapter usersAdapter = new UsersAdapter(getActivity(), userListResponseData);\n recyclerView.setAdapter(usersAdapter); // set the Adapter to RecyclerView\n }", "@Override\n public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.departmentnames, parent, false);\n context = parent.getContext();\n// set the view's size, margins, paddings and layout parameters\n MyViewHolder vh = new MyViewHolder(v); // pass the view to View Holder\n return vh;\n }", "public news_adapter(Context context,ArrayList<data> dataset) {\n mData=dataset;\n mInflater = LayoutInflater.from(context);\n }", "public View getView(int position, View convertView, ViewGroup parent) {\n View view = super.getView(position,convertView,parent);\n\n // Convert the view as a TextView widget\n TextView tv = (TextView) view;\n\n //tv.setTextColor(Color.DKGRAY);\n\n // Set the layout parameters for TextView widget\n RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(\n RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT\n );\n tv.setLayoutParams(lp);\n\n // Get the TextView LayoutParams\n RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams)tv.getLayoutParams();\n\n // Set the width of TextView widget (item of GridView)\n /*\n IMPORTANT\n Adjust the TextView widget width depending\n on GridView width and number of columns.\n\n GridView width / Number of columns = TextView width.\n\n Also calculate the GridView padding, margins, vertical spacing\n and horizontal spacing.\n */\n\n\n Resources r = reports2.this.getResources();\n int px = (int) (TypedValue.applyDimension(\n TypedValue.COMPLEX_UNIT_DIP, 100, r.getDisplayMetrics()));\n // tv.setLayoutParams(new GridView.LayoutParams((width/10)*6, 50));\n\n // if (position==0 || position==5) {\n // params.width = px/2; // getPixelsFromDPs(EpiloghEid.this,168);\n // tv.setLayoutParams(new GridView.LayoutParams((px*6), 100));\n // }else{\n params.width = px; // getPixelsFromDPs(EpiloghEid.this,168);\n // }\n\n\n // Set the TextView layout parameters\n tv.setLayoutParams(params);\n\n // Display TextView text in center position\n tv.setGravity(Gravity.CENTER);\n\n // Set the TextView text font family and text size\n tv.setTypeface(Typeface.SANS_SERIF, Typeface.NORMAL);\n tv.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 12);\n\n // Set the TextView text (GridView item text)\n tv.setText(values.get(position));\n\n // Set the TextView background color\n tv.setBackgroundColor(Color.parseColor(\"#d9d5dc\"));\n\n // Return the TextView widget as GridView item\n return tv;\n }", "public View getView(int position, View convertView, ViewGroup parent) {\n View view = super.getView(position,convertView,parent);\n\n // Convert the view as a TextView widget\n TextView tv = (TextView) view;\n\n //tv.setTextColor(Color.DKGRAY);\n\n // Set the layout parameters for TextView widget\n RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(\n RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT\n );\n tv.setLayoutParams(lp);\n\n // Get the TextView LayoutParams\n RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams)tv.getLayoutParams();\n\n // Set the width of TextView widget (item of GridView)\n /*\n IMPORTANT\n Adjust the TextView widget width depending\n on GridView width and number of columns.\n\n GridView width / Number of columns = TextView width.\n\n Also calculate the GridView padding, margins, vertical spacing\n and horizontal spacing.\n */\n\n\n Resources r = reports2.this.getResources();\n int px = (int) (TypedValue.applyDimension(\n TypedValue.COMPLEX_UNIT_DIP, 100, r.getDisplayMetrics()));\n // tv.setLayoutParams(new GridView.LayoutParams((width/10)*6, 50));\n\n // if (position==0 || position==5) {\n // params.width = px/2; // getPixelsFromDPs(EpiloghEid.this,168);\n // tv.setLayoutParams(new GridView.LayoutParams((px*6), 100));\n // }else{\n params.width = px; // getPixelsFromDPs(EpiloghEid.this,168);\n // }\n\n\n // Set the TextView layout parameters\n tv.setLayoutParams(params);\n\n // Display TextView text in center position\n tv.setGravity(Gravity.CENTER);\n\n // Set the TextView text font family and text size\n tv.setTypeface(Typeface.SANS_SERIF, Typeface.NORMAL);\n tv.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 12);\n\n // Set the TextView text (GridView item text)\n tv.setText(values.get(position));\n\n // Set the TextView background color\n tv.setBackgroundColor(Color.parseColor(\"#d9d5dc\"));\n\n // Return the TextView widget as GridView item\n return tv;\n }", "public View getView(int position, View convertView, ViewGroup parent) {\n View view = super.getView(position,convertView,parent);\n\n // Convert the view as a TextView widget\n TextView tv = (TextView) view;\n\n //tv.setTextColor(Color.DKGRAY);\n\n // Set the layout parameters for TextView widget\n RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(\n RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT\n );\n tv.setLayoutParams(lp);\n\n // Get the TextView LayoutParams\n RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams)tv.getLayoutParams();\n\n // Set the width of TextView widget (item of GridView)\n /*\n IMPORTANT\n Adjust the TextView widget width depending\n on GridView width and number of columns.\n\n GridView width / Number of columns = TextView width.\n\n Also calculate the GridView padding, margins, vertical spacing\n and horizontal spacing.\n */\n\n\n Resources r = reports2.this.getResources();\n int px = (int) (TypedValue.applyDimension(\n TypedValue.COMPLEX_UNIT_DIP, 100, r.getDisplayMetrics()));\n // tv.setLayoutParams(new GridView.LayoutParams((width/10)*6, 50));\n\n // if (position==0 || position==5) {\n // params.width = px/2; // getPixelsFromDPs(EpiloghEid.this,168);\n // tv.setLayoutParams(new GridView.LayoutParams((px*6), 100));\n // }else{\n params.width = px; // getPixelsFromDPs(EpiloghEid.this,168);\n // }\n\n\n // Set the TextView layout parameters\n tv.setLayoutParams(params);\n\n // Display TextView text in center position\n tv.setGravity(Gravity.CENTER);\n\n // Set the TextView text font family and text size\n tv.setTypeface(Typeface.SANS_SERIF, Typeface.NORMAL);\n tv.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 12);\n\n // Set the TextView text (GridView item text)\n tv.setText(values.get(position));\n\n // Set the TextView background color\n tv.setBackgroundColor(Color.parseColor(\"#d9d5dc\"));\n\n // Return the TextView widget as GridView item\n return tv;\n }", "private void initRecyclerview() {\n RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(this);\n recyclerView.setLayoutManager(layoutManager);\n\n mAdapter = new MovieAdapter(this);\n recyclerView.setAdapter(mAdapter);\n }", "private void initDashboardListRecyclerView() {\n GridLayoutManager gridLayoutManager;\n if (AppUtils.isTablet()) {\n gridLayoutManager = new GridLayoutManager(this, 3);\n } else {\n gridLayoutManager = new GridLayoutManager(this, 1);\n\n }\n /* setLayoutManager associates the gridLayoutManager with our RecyclerView */\n mDashboardList.setLayoutManager(gridLayoutManager);\n\n mDashboardList.setItemAnimator(new DefaultItemAnimator());\n\n /*\n * Use this setting to improve performance if you know that changes in content do not\n * change the child layout size in the RecyclerView\n */\n mDashboardList.setHasFixedSize(true);\n\n /*\n * The RecipesListAdapter is responsible for linking our recipes' data with the Views that\n * will end up displaying our recipe data.\n */\n mDashboardListAdapter = new DashboardListAdapter(this);\n\n /* Setting the adapter attaches it to the RecyclerView in our layout. */\n mDashboardList.setAdapter(mDashboardListAdapter);\n\n }", "private void initCategoryListAdapter() {\n\n LinearLayoutManager horizontalLayoutManager = new LinearLayoutManager(getActivity(), LinearLayoutManager.HORIZONTAL, false);\n topicRecyclerView.setLayoutManager(horizontalLayoutManager);\n // topicRecyclerView.setAdapter(adapter);\n }", "@Override\n public void onLayoutChildren(RecyclerView.Recycler recycler, RecyclerView.State state) {\n try{\n super.onLayoutChildren(recycler, state);\n }catch (IndexOutOfBoundsException e){\n }\n\n }", "@Override\n public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {\n GridLayoutManager glm = new GridLayoutManager(getContext(), 2);\n mRecyclerView.setLayoutManager(glm);\n mRecyclerView.setHasFixedSize(true);\n\n // TODO: Create the adapter\n\n // TODO: Set the adapter to the adapter view\n }", "public RecyclerViewAdapter(List<String> arrayList)\n {\n this.arraylist = arrayList;\n\n }", "@Nullable\n @Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.bottom_sheet_product_view, container, false);\n // view = inflater.inflate(R.layout.bottom_sheet_product_view, null);\n\n recycle_view_size = view.findViewById(R.id.recycle_view_size);\n recycle_view_color = view.findViewById(R.id.recycle_view_color);\n\n for (int i =0;i < 5;i++){\n arrayList.add(\"\");\n }\n sizeAdapter = new SizeAdapter(getContext(),arrayList);\n colorAdapter = new ColorAdapter(getContext(),arrayList);\n\n LinearLayoutManager HorizontalLayout112\n = new LinearLayoutManager(\n getActivity(),\n LinearLayoutManager.HORIZONTAL,\n false);\n //RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(getActivity(), LinearLayout.HORIZONTAL,false);/\n recycle_view_size.setLayoutManager(HorizontalLayout112);\n recycle_view_size.setItemAnimator(new DefaultItemAnimator());\n sizeAdapter.notifyDataSetChanged();\n recycle_view_size.setAdapter(sizeAdapter);\n\n LinearLayoutManager HorizontalLayout1121\n = new LinearLayoutManager(\n getActivity(),\n LinearLayoutManager.HORIZONTAL,\n false);\n //RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(getActivity(), LinearLayout.HORIZONTAL,false);/\n recycle_view_color.setLayoutManager(HorizontalLayout1121);\n recycle_view_color.setItemAnimator(new DefaultItemAnimator());\n colorAdapter.notifyDataSetChanged();\n recycle_view_color.setAdapter(colorAdapter);\n\n\n return view;\n }", "private void setAdapter() {\n resultsRv.setLayoutManager(new LinearLayoutManager(getActivity()));\n resultsRv.setHasFixedSize(true);\n resultsRv.setItemAnimator(new DefaultItemAnimator());\n resultsRv.setAdapter(resultsListAdapter);\n }", "@Override\n public void onBindViewHolder(MyHolder holder, int position) {\n\n }", "public ItemsAdapter() {\n\n\n }", "@Override\n public int getCount() {\n return 1;\n }", "@Override\n public int getCount() {\n return 1;\n }", "@Override\r\n public int getCount() {\n return 2;\r\n }", "private void initRecyclerView() {\n RecyclerView recyclerview = findViewById(R.id.projectList);\n RecyclerViewAdapter adapter = new RecyclerViewAdapter(projectNames, this);\n recyclerview.setAdapter(adapter);\n final LinearLayoutManager layoutManager = new LinearLayoutManager(this);\n layoutManager.setOrientation(LinearLayoutManager.VERTICAL);\n recyclerview.setLayoutManager(layoutManager);\n }", "SingleCardViewHolder(View itemView) {\n super(itemView);\n cv = (CardView)itemView.findViewById(R.id.cvteam);\n teamName = (TextView)itemView.findViewById(R.id.team_name);\n slogan = (TextView)itemView.findViewById(R.id.slogan);\n goToTeam = (Button)itemView.findViewById(R.id.goToTeam);\n deleteTeam = (ImageView)itemView.findViewById(R.id.deleteTeam);\n numUser = (TextView) itemView.findViewById(R.id.numUser);\n\n //teamLayout = (LinearLayout) itemView.findViewById(R.id.team_layout);\n //addUser = (Button) itemView.findViewById(R.id.addUser);\n\n //TextView playerView;\n //teamPlayer = new ArrayList<TextView>();\n /*Log.v(\"\",\"\"+singleTeam.getCountPlayer());\n Log.v(\"playercount\",\"\"+singleTeam.getCountPlayer());\n for(int i=0; i<singleTeam.getCountPlayer(); i++){\n playerView = new TextView(context);\n teamLayout.addView(playerView);\n //teamPlayer.add(playerView);\n }*/\n\n }", "private void bindView() {\n mToolbar = (Toolbar) findViewById(R.id.tb_main);\n mMainLayout = (CoordinatorLayout) findViewById(R.id.crdl_main);\n mProgressDialog = (AVLoadingIndicatorView) findViewById(R.id.avi_progress_dialog);\n mPersonsView = (RecyclerView) findViewById(R.id.rv_persons);\n mPersonsView.setLayoutManager(new LinearLayoutManager(context));\n }", "@Override\n public void onBindViewHolder(ViewHolder itemViewHolder, int position) {\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_seven, container, false);\n recyclerView = v.findViewById(R.id.recyclerId);\n\n\n // intent();\n\n\n // recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));\n GridLayoutManager grid = new GridLayoutManager(getActivity(), 3, GridLayoutManager.VERTICAL, false);\n // recyclerView.setLayoutManager(new LinearLayoutManager(this));\n recyclerView.setAdapter(adapter);\n recyclerView.setHasFixedSize(true);\n recyclerView.setLayoutManager(grid);\n\n // myAdapter.setOnItemClickListener((Adapter.OnItemClickListener) getActivity().getApplicationContext());\n\n\n\n adapter = new Adapter7(this, list);\n\n adapter.setOnItemClickListener(new Adapter7.ClickListener() {\n @Override\n public void onItemClick(int position, View v) {\n\n // Toast.makeText(getApplicationContext(), \"onclick:\" + position, Toast.LENGTH_LONG).show();\n\n if (position == 0) {\n Intent intent = new Intent(getActivity(), Adorama.class);\n startActivity(intent);\n\n }\n\n if (position == 1) {\n Intent intent = new Intent(getActivity(), Apple.class);\n startActivity(intent);\n\n }\n\n if (position == 2) {\n Intent intent = new Intent(getActivity(), Craig.class);\n startActivity(intent);\n\n }\n\n if (position == 3) {\n Intent intent = new Intent(getActivity(), Frys.class);\n startActivity(intent);\n\n }\n\n if (position == 4) {\n Intent intent = new Intent(getActivity(), Rakuten.class);\n startActivity(intent);\n\n }\n\n if (position == 5) {\n Intent intent = new Intent(getActivity(), Sears.class);\n startActivity(intent);\n\n }\n\n if (position == 6) {\n Intent intent = new Intent(getActivity(), Tiger.class);\n startActivity(intent);\n\n }\n\n if (position == 7) {\n Intent intent = new Intent(getActivity(), Woot.class);\n startActivity(intent);\n\n }\n\n\n if (position == 8) {\n Intent intent = new Intent(getActivity(), Sony.class);\n startActivity(intent);\n\n }\n\n\n\n }\n });\n\n\n try{\n Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(\"https://api.npoint.io/\")\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n\n ApiInterface7 apiInterface = retrofit.create(ApiInterface7.class);\n Call<List<PojoClass7>> call=apiInterface.getName();\n call.enqueue(new Callback<List<PojoClass7>>() {\n @Override\n public void onResponse(Call<List<PojoClass7>> call, Response<List<PojoClass7>> response) {\n showIt(response.body());\n\n\n }\n\n @Override\n public void onFailure(Call<List<PojoClass7>> call, Throwable t) {\n\n }\n });\n\n\n\n }catch (Exception e){\n\n\n }\n\n\n return v;\n\n\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n rootView = (ViewGroup) inflater\n .inflate(R.layout.recycler_view, container, false);\n ButterKnife.bind(this, rootView);\n RecyclerView recyclerView = (RecyclerView) rootView.findViewById(R.id.myrecyclerview);\n int numberOfColumns = 1;\n recyclerView.setLayoutManager(new GridLayoutManager(getActivity(), numberOfColumns));\n adapter = new directorfragmentadapter(data, getContext());\n recyclerView.setAdapter(adapter);\n\n\n data = new ArrayList<CoursesModel>();\n for (int i = 0; i < 5; i++) {\n data.add(new CoursesModel(\n coursename[i]\n ));\n }\n Context mcontext = getContext();\n adapter = new directorfragmentadapter(data, mcontext);\n recyclerView.setAdapter(adapter);\n return rootView;\n }", "protected void initViews() {\n mViewList.setLayoutManager(initLayoutManager());\n\n\n mAdapter = initAdapter();\n mAdapter.init(mViewList, isPageEnabled());\n mViewList.setItemAnimator(new DefaultItemAnimator());\n mViewList.addItemDecoration(new DividerItemDecoration(mViewList.getContext(), LinearLayoutManager.VERTICAL));\n // mEmptyTips = (TextView) findViewById(R.id.empty_propt);\n mEmptyTips.setOnClickListener(new View.OnClickListener() {\n\n @Override\n public void onClick(View v) {\n\n if (CUtil.isNetworkConnected(mViewList.getContext())) {\n mSwipeRefreshLayout.setRefreshing(true);\n requestData(0, false);\n } else {\n// Toast.makeText(mTitleView.getContext(), R.string.network_not_connection, Toast.LENGTH_SHORT).show();\n showToast(getResources().getString(R.string.network_not_connection));\n }\n\n }\n });\n\n mAdapter.setPagingableListener(new BasePageAdapter.Pagingable() {\n\n @Override\n public void onLoadMoreItems() {\n // TODO Auto-generated method stub\n if (mAdapter.hasMoreItems()) {\n requestData(mAdapter.getItems() == null ? 0 : mAdapter.getItems().size(), false);\n } else {\n mAdapter.onFinishLoading(false);\n }\n }\n });\n\n // TitleBarMovableTouchListener touchListener = new\n // TitleBarMovableTouchListener(this.getActivity().findViewById(R.id.activity_title));\n // mViewList.setOnTouchListener(touchListener);\n mSwipeRefreshLayout = (SwipeRefreshLayout) findViewById(R.id.swipe_refresh_widget);\n mSwipeRefreshLayout.setOnRefreshListener(this);\n mSwipeRefreshLayout.setEnabled(isSwipeRefreshLayoutEnabled());\n mSwipeRefreshLayout.setColorSchemeResources(R.color.swipe_refrsh_color1, R.color.swipe_refrsh_color2,\n R.color.swipe_refrsh_color3, R.color.swipe_refrsh_color4);\n mViewList.setAdapter(mAdapter);\n mHandler.sendEmptyMessageDelayed(MSG_REQUEST_DATA, FIRST_INIT_DELAY);\n\n }", "@Override\n public int getCount() {\n return 2;\n }", "@Override\n public int getCount() {\n return 2;\n }", "@Override\n public int getCount() {\n return 2;\n }", "@Override\n public int getCount() {\n return 2;\n }", "@Override\n public int getCount() {\n return 2;\n }", "@Override\n public int getCount() {\n return 2;\n }", "@Override\n public int getCount() {\n return 2;\n }", "@Override\n public int getCount() {\n return 2;\n }", "@Override\n public int getCount() {\n return 2;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n v = inflater.inflate(R.layout.fragment_maintab1, container, false);\n myrecyclerview = (RecyclerView) v.findViewById(R.id.memeTemplate_recyclerView);\n RecyclerViewAdapter__memeTemp recyclerViewAdapter = new RecyclerViewAdapter__memeTemp(getContext(), lstMemeMemeTemplate);\n StaggeredGridLayoutManager staggeredGridLayoutManager = new StaggeredGridLayoutManager(2,LinearLayoutManager.VERTICAL);\n myrecyclerview.setLayoutManager(staggeredGridLayoutManager);\n myrecyclerview.setAdapter(recyclerViewAdapter);\n return v;\n }", "private void iniRecyclerView() {\n// RecyclerView recyclerView = (RecyclerView) findViewById(R.id.recycler_view);\n// recyclerView.setHasFixedSize(true);\n recyclerView.setLayoutManager(new LinearLayoutManager(this));\n recyclerView.setAdapter(presAdapter);\n }", "private void setUpRecycler(int itemSize) {\n ArrayList<Seat> seats = new ArrayList<>();\n for (int i = 0; i < 40; i++) seats.add(new Seat());\n SeatListAdapter adapter = new SeatListAdapter(itemSize, seats, this);\n seatStatusListView.setLayoutManager(new GridLayoutManager(this, 4));\n seatStatusListView.setAdapter(adapter);\n }", "@Override\n public int getCount() {\n return 12;\n }", "RecyclerViewAdapter(Context context, List<RunPaceEffort> runs) {\n this.inflater = LayoutInflater.from(context);\n this.runs = runs;\n }", "@Override\n public void onBindViewHolder(OpenNotifyDataViewHolder holder, int position) {\n\n if(position==0){\n\n // Giving tiles for the Open Notify API Network Response\n holder.time.setText(\"Time and Date\");\n\n holder.duration.setText(\"Duration\");\n\n }else {\n position-=1;\n Log.e(\"###\", \"size \" + responseList.get(position).getDuration() + \"/n\" + responseList.get(position).getRisetime() +\n new Date(responseList.get(position).getRisetime()));\n\n\n\n\n holder.time.setText(getFormattedDate(responseList.get(position).getRisetime()));\n\n holder.duration.setText(responseList.get(position).getDuration().toString());\n\n\n }\n\n }", "public void updateList(){\r\n preyFragmentAdapter=new PreyFragmentAdapter(CPreyArrayList,this);\r\n recyclerView.setAdapter(preyFragmentAdapter);\r\n LinearLayoutManager a=new LinearLayoutManager(this.getContext());\r\n recyclerView.setLayoutManager(a);\r\n\r\n\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_reviews, container, false);\n\n RecyclerView recyclerView = view.findViewById(R.id.reviewrecycler);\n\n LinearLayoutManager layoutManager = new LinearLayoutManager(getActivity());// RecyclerView.LayoutManager layoutManager;\n recyclerView.setLayoutManager(layoutManager);\n\n //passing image array and assiging adapter ,,, adapter is object of recyler_adapter class\n ReviewAdapter reviewAdapter= new ReviewAdapter();\n recyclerView.setAdapter(reviewAdapter);\n\nreturn view;\n }", "@Override\n public int getCount() {\n return 1;\n }", "@Override\n public int getCount() {\n return 1;\n }", "@Override\n public int getCount() {\n return 1;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_my_orders, container, false);\n\n order_recyclerView = view.findViewById(R.id.order_recycler_view);\n orderList = new ArrayList<>();\n orderAdapter = new OrderAdapter(getContext(), orderList);\n\n\n\n RecyclerView.LayoutManager mLayoutManager = new GridLayoutManager(getContext(), 1);\n order_recyclerView.setLayoutManager(mLayoutManager);\n //order_recyclerView.addItemDecoration(new OrderActivity().GridSpacingItemDecoration(2, dpToPx(10), true));\n order_recyclerView.setItemAnimator(new DefaultItemAnimator());\n order_recyclerView.setAdapter(orderAdapter);\n\n orderAlbums();\n\n return view;\n }" ]
[ "0.6834748", "0.66973156", "0.6490029", "0.6411272", "0.63748217", "0.63578403", "0.63386345", "0.6327274", "0.6305233", "0.6282494", "0.6264025", "0.6232588", "0.62205493", "0.6200533", "0.6183963", "0.6167442", "0.6152967", "0.6136575", "0.6131083", "0.61300504", "0.6123362", "0.61168844", "0.61057425", "0.60957026", "0.60855716", "0.6066893", "0.60626835", "0.6056809", "0.60372066", "0.6023654", "0.60193247", "0.6001199", "0.59979993", "0.5983703", "0.5959861", "0.59434867", "0.5931631", "0.59305805", "0.5921573", "0.59192216", "0.5912523", "0.59121734", "0.59029967", "0.58984756", "0.588218", "0.58801335", "0.5877302", "0.5877302", "0.5876608", "0.5870428", "0.5867643", "0.58642125", "0.586036", "0.58428085", "0.58388525", "0.5834969", "0.5829046", "0.5829046", "0.5829046", "0.5828328", "0.58268654", "0.5821203", "0.5819788", "0.58071965", "0.5804431", "0.5804255", "0.5804178", "0.5798867", "0.5792796", "0.578761", "0.578761", "0.57818764", "0.5774261", "0.5767456", "0.57653815", "0.5765271", "0.57574296", "0.5752167", "0.57496077", "0.573737", "0.573737", "0.573737", "0.573737", "0.573737", "0.573737", "0.573737", "0.573737", "0.573737", "0.5736898", "0.5735361", "0.5733677", "0.57319427", "0.5731717", "0.57316643", "0.5730394", "0.57261026", "0.5723895", "0.5723895", "0.5723895", "0.572318" ]
0.7990123
0
Text word = new Text(); IntWritable value = new IntWritable();
protected void cleanup(OutputCollector<Text, IntWritable> output) throws IOException, InterruptedException { for (String key : countMap.keySet()) { //word.set(key); //value.set(countMap.get(key)); output.collect(new Text(key), new IntWritable(countMap.get(key))); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {\n String[] array = value.toString().split(DELIMITER);\n Text year = new Text();\n year.set(array[1].trim());\n String word = array[0].trim();\n int number_of_syllables = Syllable.syllable(word);\n context.write(year, new IntWritable(number_of_syllables));\n }", "@Override\n\tprotected void map(LongWritable key, Text value,Context context) throws IOException, \n\tInterruptedException {\n\t\t\n\t\tfinal String inputValue=value.toString();\n\t\t\n\t\tfinal IntWritable ONE = new IntWritable(1);\n\t\t\n\t\tif(!StringUtils.isEmpty(inputValue))\n\t\t{\n\t\t\tfinal String[] words = StringUtils.splitPreserveAllTokens(inputValue, \n\t\t\t\t\tMRConstants.EMPTY.getValue());\n\t\t\tfor (String word : words) {\n\t\t\t\tcontext.write(new Text(word), ONE);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t}", "@Override\n public void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {\n String[] words = value.toString().replaceAll(\" \", \"\").split(\",\");\n\n // Valid input\n if (words.length == 3) {\n // Get words\n String w1 = words[0];\n String w2 = words[1];\n String w3 = words[2];\n\n // Get word lengths\n int first = words[0].length();\n int second = words[1].length();\n int third = words[2].length();\n String lineNum = key.toString();\n\n // Conditions 1,2,4\n\n // One longest word\n // Longest word at front\n if (first > second && first > third) {\n context.write(new Text(w2), new Text(lineNum + \",\" + w1));\n context.write(new Text(w3), new Text(lineNum + \",\" + w1));\n }\n // Longest word in middle\n else if (second > first && second > third) {\n context.write(new Text(w1), new Text(lineNum + \",\" + w2));\n context.write(new Text(w3), new Text(lineNum + \",\" + w2));\n }\n // Longest word at end\n else if (third > first && third > second) {\n context.write(new Text(w1), new Text(lineNum + \",\" + w3));\n context.write(new Text(w2), new Text(lineNum + \",\" + w3));\n }\n\n // Two longest words\n // 1st and 2nd are the same length and longest\n if (first == second && first > third) {\n context.write(new Text(w3), new Text(lineNum + \",\" + w1));\n context.write(new Text(w3), new Text(lineNum + \",\" + w2));\n }\n // 1st and 3rd are the same length and longest\n else if (first == third && first > second) {\n context.write(new Text(w2), new Text(lineNum + \",\" + w1));\n context.write(new Text(w2), new Text(lineNum + \",\" + w3));\n }\n // 2nd and 3rd are same length and longest\n else if (second == third && second > first) {\n context.write(new Text(w1), new Text(lineNum + \",\" + w2));\n context.write(new Text(w1), new Text(lineNum + \",\" + w3));\n }\n } \n }", "public void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException\n {\n String line = value.toString().toLowerCase();\n\n // Splitting into doc number and its text\n String document_split[] = line.split(\"\\t\",2);\n Text document_number = new Text(document_split[0]);\n\n // Replace all non alphabetic characters and non spaces with a space\n String document_content=document_split[1].replaceAll(\"[^ a-z]+\", \" \");\n\n String bigram_word_1=null;\n String bigram_word_2=null;\n // Tokenize into words\n StringTokenizer tokenizer = new StringTokenizer(document_content);\n int x=0;\n while(tokenizer.hasMoreTokens())\n {\n x+=1;\n if(x==1)\n {\n bigram_word_1=tokenizer.nextToken();\n }\n else\n {\n bigram_word_2=tokenizer.nextToken();\n String bigram_pair_string=bigram_word_1+\" \"+bigram_word_2;\n bigram_pair.set(bigram_pair_string);\n context.write(bigram_pair, document_number);\n break;\n }\n }\n while(tokenizer.hasMoreTokens())\n {\n bigram_word_1=bigram_word_2;\n bigram_word_2=tokenizer.nextToken();\n String bigram_pair_string=bigram_word_1+\" \"+bigram_word_2;\n bigram_pair.set(bigram_pair_string);\n context.write(bigram_pair, document_number);\n }\n }", "@Override\n public void map(LongWritable key, Text value, Context context)\n throws IOException, InterruptedException {\n \tString filename = ((FileSplit) context.getInputSplit())\n\t\t\t\t.getPath().getName();\n\n if (!value.toString().isEmpty()) {\n \tString line = value.toString().toLowerCase().replaceAll(\"[\\\\p{Punct}&&[^']&&[^-]]|(?<![a-zA-Z])'|'(?![a-zA-Z])|--|(?<![a-zA-Z])-|-(?![a-zA-Z])|\\\\d+\",\" \"); \t\n \tfor (String token : line.split(\"\\\\s+\")) {\n \t\tif (!token.isEmpty()) { \n \t\t\tcontext.write(new Text(token+\"#\"),new Text(\"1\")); // write # words and 1\n \t\tcontext.write(new Text(token + \",\" + filename),new Text(\"1\"));\t// write key and id\t\n \t\tcontext.write(new Text(token+\"%\"),new Text(filename));\t// write key and id\t\n \t\tcontext.write(new Text(\":\"+filename),new Text(\"1\"));\n \t\t\n \t\t//if (frequencyDoc.containsKey(filename)) {\n \t\t\t//frequencyDoc.put(filename, frequencyDoc.get(filename) + 1);\n \t\t//}\n \t//else {\n \t\t//frequencyDoc.put(filename, 1);\n \t\t//}\n \t\t}\n \t}\n \t}\n }", "@Override\n\tprotected void map(LongWritable key, Text value,\n\t\t\tContext context)\n\t\t\tthrows IOException, InterruptedException {\n\t\t\n\t\tString line = value.toString();\n\t\tStringTokenizer st = new StringTokenizer(line,\" \");\n\t\t\n\t\twhile(st.hasMoreTokens()){\n\t\t\tSystem.out.println(\"in\");\n\t\t\tword.set(st.nextToken().toString());\n\t\t\tcontext.write(new Text(\"kk\"),word);\n\t\t\t \n\t\t\t//System.out.println(\"mapper\"+st.nextToken());\n\t\t}\n\t\t\n\t}", "@Override\n\t protected void map(Object key, Text value, \n\t Context context) throws IOException, InterruptedException {\n\t String[] strs = value.toString().split(\"\\\\s\");\n\t String label = strs[1];\n\t int id = Integer.parseInt(strs[0]);\n\t if(\"u\".equals(label)) {\n\t \tcontext.write(new VIntWritable(id), new Text(\"u\\t\"+strs[2]));\n\t } else if(\"d\".equals(label)) {\n\t \tcontext.write(new VIntWritable(id), new Text(\"d\\t\"+strs[2]));\n\t } else if(\"c\".equals(label)) {\n\t \tcontext.write(new VIntWritable(id), new Text(\"c\\t\"+strs[2]));\n\t } else {//±ß±í\n\t \tcontext.write(new VIntWritable(id), new Text(\"e\\t\"+strs[1]));\n\t }\n\t }", "@Override\n protected void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {\n StringTokenizer tokenizer = new StringTokenizer(value.toString());\n while (tokenizer.hasMoreTokens()) {\n String word = tokenizer.nextToken();\n if (buffer.containsKey(word)) {\n buffer.put(word, buffer.get(word) + 1);\n } else {\n buffer.put(word, 1);\n }\n }\n }", "@Override\n\tprotected void map(LongWritable key, Text value,Context context)\n\t\t\tthrows IOException, InterruptedException {\n\t\tString line=value.toString();\n\t\t//String[] words=line.split(\" \");\n\t\tStringTokenizer tokenizer=new StringTokenizer(line); //another way better datastructure\n\t\twhile(tokenizer.hasMoreTokens()){\n\t\t\tString word = tokenizer.nextToken();\n\t\t\t\n\t\t\toutkey.set(word); //outkey value reset\n\t\t\tcontext.write(outkey,outvalue);\n\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}", "@Override\n protected void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {\n\t\tString[] raw = value.toString().split(\"\\t\");\n\t\tcontext.write(new Text(raw[0]), new Text(raw[1]));\n\t}", "@Override\n\tprotected void reduce(Text key, // Input key type\n\t\t\tIterable<NullWritable> values, // Input value type\n\t\t\tContext context) throws IOException, InterruptedException {\n\t\twordId = wordId + 1;\n\t\tcontext.write(key, new IntWritable(wordId));\n\t}", "public void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {\n // Get the current line\n \n String line = value.toString();\n String[] linevalues = line.split(\"\\t\");\n IntWritable movieId = new IntWritable(Integer.parseInt(linevalues[1]));\n Text userId = new Text(linevalues[0]);\n context.write(movieId, userId);\n // for (String v : linevalues) {\n // System.out.println(\"Value: \" + v);\n // }\n // context.write(new IntWritable(Integer.parseInt(linevalues[0])), new Text(linevalues[1] + \",\" + linevalues[2]));\n }", "public void map(Object key, Text value, Context context) throws IOException, InterruptedException {\n word.set(value);\n String line = word.toString();\n String[] col_vals = line.split(\",\");\n\n Text total_Passenger_key = new Text(\"_Passenger\");\n Text total_Trip_key = new Text(\"_Trip\");\n\n if (!col_vals[0].trim().isEmpty()) {\n DateTimeFormatter format = DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm:ss\");\n\n try {\n \n // changing the type of first column to date value\n LocalDateTime date = LocalDateTime.parse(col_vals[1], format);\n\n // getting week days\n DayOfWeek days_of_week = date.getDayOfWeek();\n\n // For weekend - mention weekend\n if (days_of_week.toString() == \"SATURDAY\" || days_of_week.toString() == \"SUNDAY\") {\n\n context.write(new Text(date.getHour() + \"Weekend_\" + total_Passenger_key),\n new IntWritable(Integer.parseInt(col_vals[3])));\n context.write(new Text(date.getHour() + \"Weekend_\" + total_Trip_key), one);\n }\n // For weekday - mention weekday\n else {\n\n context.write(new Text(date.getHour() + \"Weekday_\" + total_Passenger_key),\n new IntWritable(Integer.parseInt(col_vals[3])));\n context.write(new Text(date.getHour() + \"Weekday_\" + total_Trip_key), one);\n\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }", "public void reduce(Text word, Iterable<Text> value,\n Context context) throws IOException, InterruptedException\n {String sum=\"\";\n for (Text count : value) {\n if(sum.equals(\"\")){\n sum=count.toString();\n }\n else\n sum =sum+\",\"+ count.toString();\n }//System.out.println(sum);\n context.write(word, new Text(sum));\n }", "@Override\n\tprotected void map(Text key, Text value,\n\t\t\torg.apache.hadoop.mapreduce.Mapper.Context context)\n\t\t\tthrows IOException, InterruptedException {\n\t\tString[] values=value.toString().split(\" \");\n\t\tIntWritable mapkey=new IntWritable();\n\t\tText mapvalue=new Text();\n\t\tStringBuilder sb=new StringBuilder();\n\t\tfor(int i=0;i<values.length;i++)\n\t\t{\n\t\t\tmapkey.set(i);\n\t\t\tsb.append(key.toString());\n\t\t\tsb.append(\",\");\n\t\t\tsb.append(values[i]);\n\t\t\tmapvalue.set(sb.toString());\n\t\t//\tsb=null;\n\t\t\tsb=new StringBuilder();\n\t\t\tcontext.write(mapkey, mapvalue);\n\t\t}\n\t}", "@Override\n\t\tpublic void map(Object key, Text value, Context context) throws IOException, InterruptedException {\n\t\t\tString elems[] = value.toString().split(\",\");\n\t\t\tint custID = Integer.parseInt(elems[0]);\n\t\t\tText result = new Text(filetag+elems[1]+\",\"+elems[4]);\n\t\t\tcontext.write(new IntWritable(custID), result); \n\t\t}", "@Override\n protected void map(\n \t\tLongWritable key, // input key type\n Text value, // input value type\n Context context) throws IOException, InterruptedException {\n\n \t\t//Create array with the words from input, splitted by space character\n String[] words = value.toString().split(\"\\\\s+\");\n \n for (String string : words) {\n \t//Remove not alphabetic characters\n \tString cleanWord = string.replaceAll(\"[^\\\\p{Alpha}]\", \"\");\n \t//Export lowercased word along with the name of the file the word comes from \n \tif (!cleanWord.isEmpty()) {\n\t\t\t\t\tcontext.write(new Text(cleanWord.toLowerCase()),new Text(((FileSplit)context.getInputSplit()).getPath().getName()));\n\t\t\t\t}\n\t\t\t}\n }", "@Override\n\t\tprotected void map(Text key, Text value, Context context)throws IOException, InterruptedException {\n\t\t\tString val = value.toString();\n\t\t\t//String word = line.split(\",\")[0];\n\t\t\t//String docname = line.split(\",\")[1];\n\t\t\tdouble n = Double.parseDouble(val.split(\",\")[0]);\n\t\t\tdouble max = Double.parseDouble(val.split(\",\")[1]);\n\t\t\tdouble N = Double.parseDouble(val.split(\",\")[2]);\n\t\t\tdouble m = Double.parseDouble(val.split(\",\")[3]);\n\t\t\t//System.out.println(\"n is:\"+n+\"max is:\"+max+\" N is:\"+N+\" m is:\"+m+\" D is:\"+D);\n\t\t\tdouble tf = n/max;\n\t\t\t//System.out.println(\"TF is:\"+tf);\n\t\t\t//String TF = \"tf: \"+tf;\n\t\t\tdouble idf = (Math.log(D/m)/Math.log(2));\n\t\t\tdouble tfidf = tf*idf;\n\t\t\t//System.out.println(\"IDF is:\"+idf);\n\t\t\t//String IDF = \"idf: \"+idf;\n\t\t\tString word = key.toString().split(\",\")[0];\n\t\t\tString article = key.toString().split(\",\")[1];\n\t\t\tString new_val = word+\",\"+tf+\",\"+idf+\",\"+tfidf;\n\t\t\tcontext.write(new Text(article),new Text(new_val));\n\t\t}", "public void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {\n String[] token = value.toString().split(\"\\t\");\n String[] pair = new String[2];\n if(token.length < 2) return;\n String[] data = token[1].split(\",\");\n\n for (String d : data) {\n pair[0] = token[0];\n pair[1] = d;\n if(Integer.parseInt(pair[0])<Integer.parseInt(pair[1]))\n keyPair.set(\"<\"+pair[0]+\",\"+pair[1]+\">\");\n else\n keyPair.set(\"<\"+pair[1]+\",\"+pair[0]+\">\");\n\n friend.set(token[1]); // set word as each input keyword\n context.write(keyPair, friend); // create a pair <keyword, 1>\n }\n }", "@Override\n\t\tpublic void map(Object key, Text value, Context context) throws IOException, InterruptedException {\n\t\t\tString elems[] = value.toString().split(\",\");\n\t\t\tint custID = Integer.parseInt(elems[1]);\n\t\t\tText result = new Text(filetag+elems[2]+\",\"+elems[3]);\n\t\t\tcontext.write(new IntWritable(custID), result);\n\t\t}", "@Override\n\tprotected void map(LongWritable key, Text text, Context context) throws IOException, InterruptedException {\n\n\t\t// Set log-level to debugging\n\t\tLOG.setLevel(Level.DEBUG);\n\t\tLOG.debug(\"The mapper task of Nischay Bikram Thapa, s3819491\");\n\t\tText word = new Text();\n\t\tStringTokenizer itr = new StringTokenizer(text.toString());\n\t\ttry {\n\t\t\t// Log every line\n\t\t\tLOG.debug(text);\n\t\t\t\n\t\t\twhile (itr.hasMoreTokens()) {\n\t\t\t\t\n\t\t\t\tString token = itr.nextToken();\n\t\t\t\t\n\t\t\t\tif(token.length() > 10 ) {\n\n\t\t\t\t\tword.set(\"Extra Long\"); \n\n\t\t\t\t} else if (token.length() >= 8 && token.length() <= 10) {\n\n\t\t\t\t\tword.set(\"Long\");\n\n\t\t\t\t} else if (token.length() >= 5 && token.length() <= 7) {\n\n\t\t\t\t\tword.set(\"Medium\");\n\n\t\t\t\t} else if (token.length() >= 1 && token.length() <= 4) {\n\n\t\t\t\t\tword.set(\"Short\");\n\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\tword.set(\"UnKnown\");\n\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\tcontext.write(word, new LongWritable(1));\n\n\t\t\t}\n\t\t}\n\t\tcatch (Exception ex) {\n\t\t\tLOG.error(\"Caught Exception\", ex);\n\t\t}\n\t}", "public void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {\n String line = value.toString();\r\n\r\n double minPmi = Double.parseDouble(context.getConfiguration().get(\"minPmi\", \"-1\"));\r\n double relMinPmi = Double.parseDouble(context.getConfiguration().get(\"relMinPmi\",\r\n \"-1\"));\r\n\r\n String[] split = line.split(\"\\\\s+\");\r\n double npmi = Double.parseDouble(split[3]);\r\n double relnpmi = Double.parseDouble(split[4]);\r\n\r\n if (isCollocation(npmi, relnpmi, minPmi, relMinPmi)) {\r\n // key: [decade] [npmi]; value: [w1] [w2]\r\n context.write(new Text(split[0] + \" \" + split[3]), new Text(split[1] + \" \" + split[2]));\r\n }\r\n }", "@Override\n\tprotected void map(LongWritable key, Text value, Mapper<LongWritable, Text, Text, LongWritable>.Context context)\n\t\t\tthrows IOException, InterruptedException {\n\t\t\n\t\tif(value !=null && StringUtils.isNotEmpty(value.toString())){\n\t\t\tString line = value.toString();\n\t\t\tcontext.write(new Text(line.split(\"\\\\s+\")[2]), ONE);\n\t\t}\t\t\n\t}", "@Override \n public void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException \n {\n\t String[] line2 = value.toString().split(\";\");\n String ISBN_Rating = trimQuotes(line2[1].trim()); \n\t String Rating = trimQuotes(line2[2].trim()); \n \n \n if (!ISBN_Rating.equals(\"ISBN\") && !Rating.equals(\"Book-Rating\")) \n { \t \n \t\n \t int RTNG_CD = Integer.parseInt(Rating);\n \t System.out.println(\"output from b mapper:\"+ISBN_Rating+\"\\t\"+RTNG_CD);\n \t context.write(new TextPair(new Text(ISBN_Rating), new Text(\"b\")), new IntWritable(RTNG_CD));\n } \n \n }", "public void map(LongWritable key, Text string, Context context\n ) throws IOException, InterruptedException {\n\t\t\t\n\t\t\tSystem.out.println(string.toString());\n\t\t\t\n\t\t\tString[] value = string.toString().split(\",\");\n\n\t\t\tString value1 =value[1].replaceAll(\"[\\\\n\\\\t]\", \"\");\n\t\t\toutputkey.setKeyword(value[0]);\n\t\t\toutputkey.setSum(Integer.parseInt(value1));\n\t\t\tcontext.write(outputkey, new IntWritable(outputkey.getSum()));\n\t\t}", "public void map(LongWritable key, Text value, Context context)\n\t\t\tthrows InterruptedException, IOException {\n\t\tString line = value.toString();\n\n\t\tHashMap<String, String> fields = parseXml.getXmlTags(line);\n \n String fileName = ((FileSplit) context.getInputSplit()).getPath().getName();\n String shortName = fileName.substring(fileName.length()-7, fileName.length()-4);\n \n\t\thKey.set(shortName.getBytes());\n\n\t\tSet set = fields.entrySet();\n\t \n\t Iterator i = set.iterator();\n\t \n\t while(i.hasNext()) {\n\t Map.Entry me = (Map.Entry)i.next();\n\t \n\t\t if (me.getKey().equals(\"0\")) {\n\t\t\t kv = new KeyValue(hKey.get(), COL_FAMILY,\n\t\t\t\t\t HColumnEnum.COL_JAN.getColumnName(),\n\t\t\t\t\t me.getValue().toString().getBytes());\n\t\t\t context.write(hKey, kv);\n\t\t }\n\n\t\t if (me.getKey().equals(\"1\")) {\n\t\t\t kv = new KeyValue(hKey.get(), COL_FAMILY,\n\t\t\t\t\t HColumnEnum.COL_FEB.getColumnName(),\n\t\t\t\t\t me.getValue().toString().getBytes());\n\t\t\t context.write(hKey, kv);\n\t\t }\n\n\t\t if (me.getKey().equals(\"2\")) {\n\t\t \tkv = new KeyValue(hKey.get(), COL_FAMILY,\n\t\t\t\t\t HColumnEnum.COL_MAR.getColumnName(),\n\t\t\t\t\t me.getValue().toString().getBytes());\n\t\t\t context.write(hKey, kv);\n\t\t }\n\n\t \tif (me.getKey().equals(\"3\")) {\n\t\t\t kv = new KeyValue(hKey.get(), COL_FAMILY,\n\t\t\t\t\t HColumnEnum.COL_APR.getColumnName(),\n\t\t\t\t\t me.getValue().toString().getBytes());\n\t\t\t context.write(hKey, kv);\n\t\t }\n\n\t\t if (me.getKey().equals(\"4\")) {\n\t\t\t kv = new KeyValue(hKey.get(), COL_FAMILY,\n\t\t\t\t\t HColumnEnum.COL_MAY.getColumnName(),\n\t\t\t\t\t me.getValue().toString().getBytes());\n\t\t\t context.write(hKey, kv);\n\t\t }\n\n\t\t if (me.getKey().equals(\"5\")) {\n\t\t\t kv = new KeyValue(hKey.get(), COL_FAMILY,\n\t\t\t\t\t HColumnEnum.COL_JUN.getColumnName(),\n\t\t\t\t\t me.getValue().toString().getBytes());\n\t\t\t context.write(hKey, kv);\n\t\t }\n\n\t\t if (me.getKey().equals(\"6\")) {\n\t\t\t kv = new KeyValue(hKey.get(), COL_FAMILY,\n\t\t\t\t\t HColumnEnum.COL_JUL.getColumnName(), \n\t\t\t\t\t me.getValue().toString().getBytes());\n\t\t\t context.write(hKey, kv);\n\t\t }\n\n\t\t if (me.getKey().equals(\"7\")) {\n\t\t\t kv = new KeyValue(hKey.get(), COL_FAMILY,\n\t\t\t\t\t HColumnEnum.COL_AUG.getColumnName(), \n\t\t\t\t\t me.getValue().toString().getBytes());\n\t\t\t context.write(hKey, kv);\n\t\t }\n\t\t if (me.getKey().equals(\"8\")) {\n\t\t\t kv = new KeyValue(hKey.get(), COL_FAMILY,\n\t\t\t\t\t HColumnEnum.COL_SEP.getColumnName(), \n\t\t\t\t\t me.getValue().toString().getBytes());\n\t\t\t context.write(hKey, kv);\n\t\t }\n\t\t if (me.getKey().equals(\"9\")) {\n\t\t\t kv = new KeyValue(hKey.get(), COL_FAMILY,\n\t\t\t\t\t HColumnEnum.COL_OCT.getColumnName(),\n\t\t\t\t\t me.getValue().toString().getBytes());\n\t\t\t context.write(hKey, kv);\n\t\t }\n\t\t if (me.getKey().equals(\"10\")) {\n\t\t\t kv = new KeyValue(hKey.get(), COL_FAMILY,\n\t\t\t\t\t HColumnEnum.COL_NOV.getColumnName(),\n\t\t\t\t\t me.getValue().toString().getBytes());\n\t\t\t context.write(hKey, kv);\n\t\t }\n\t\t if (me.getKey().equals(\"11\")) {\n\t\t\t kv = new KeyValue(hKey.get(), COL_FAMILY,\n\t\t\t\t\t HColumnEnum.COL_DEC.getColumnName(),\n\t\t\t\t\t me.getValue().toString().getBytes());\n\t\t\t context.write(hKey, kv);\n }\n\t }\n\t}", "@Override\n protected void map(Object key, Text value, Context context) throws IOException, InterruptedException {\n \n String[] inputArray = value.toString().split(\"::\");\n inputKey.set(Integer.parseInt(inputArray[1]));\n intValue.set(Integer.parseInt(inputArray[2]));\n SortedMapWritable inputValue = new SortedMapWritable();\n inputValue.put(intValue, count);\n context.write(inputKey, inputValue);\n }", "public void map(LongWritable key, Text value,\n\t\t\tOutputCollector<Text, IntWritable> output, Reporter reporter)\n\t\t\tthrows IOException {\n\t\t// taking one line at a time from input file and tokenizing the same\n\t\tString line = value.toString();\n\t\tStringTokenizer tokenizer = new StringTokenizer(line);\n\n\t\t// combiner part\n\t\t// iterating through all the words available in that line and forming\n\t\t// the key value pair\n\t\twords.clear();\n\t\twhile (tokenizer.hasMoreTokens()) {\n\t\t\tString match = tokenizer.nextToken();\n\t\t\tif (match.equals(WordSearch.find)) {\n\t\t\t\tif (words.containsKey(match)) {\n\t\t\t\t\tcount = (int) words.get(match);\n\t\t\t\t\twords.put(match, count + 1);\n\t\t\t\t} else {\n\t\t\t\t\twords.put(match, 1);\n\t\t\t\t\tcount = 1;\n\t\t\t\t}\n\n\t\t\t\tString fileName = ((FileSplit) reporter.getInputSplit())\n\t\t\t\t\t\t.getPath().getName();\n\t\t\t\tSystem.out.println(fileName);\n\n\t\t\t\tfile.set(fileName);\n\t\t\t\toutput.collect(file, fileDetector);\n\t\t\t}\n\t\t}\n\t\tfor(String keys: words.keySet())\n\t\t{\n\t\t\tcount = words.get(keys);\n\t\t\tSystem.out.println(\"Total :\"+count);\n\t\t\tfinal IntWritable values = new IntWritable(count);\n\t\t\tword.set(keys);\n\t\t\toutput.collect(word, values);\n\t\t}\n\t}", "@Override\n\tprotected void reduce(IntWritable arg0, Iterable<Text> arg1,Context arg2)\n\t\t\tthrows IOException, InterruptedException {\n\t\tString fenzi=null;\n\t\tdouble fenmu=0;\n\t\tText reducevalue=new Text();\n\t\tfor(Text value:arg1)\n\t\t{\n\t\t\tString[] array=value.toString().split(\",\");\n\t\t\tdouble m=Double.parseDouble(array[1]);\n\t\t\tfenmu=fenmu+m;\n\t\t\tString[] points=array[0].split(\" \");\n\t\t\tString[] temps=null;\n\t\t\tStringBuilder sb=new StringBuilder();\n\t\t\tif(fenzi==null)\n\t\t\t{\n\t\t\t\t temps=new String[points.length];\n\t\t\t\t for(int i=0;i<temps.length;i++)\n\t\t\t\t {\n\t\t\t\t\t temps[i]=\"0\";\n\t\t\t\t }\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ttemps=fenzi.split(\" \");\n\t\t\t}\n\t\t\tfor(int i=0;i<points.length;i++)\n\t\t\t{\n\t\t\t\tpoints[i]=(Double.parseDouble(temps[i])+Double.parseDouble(points[i]) * m)+\"\";\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i=0;i<points.length;i++)\n\t\t\t{\n\t\t\t\tsb.append(points[i]+\" \");\n\t\t\t}\n\t\t\tfenzi=sb.toString().substring(0,sb.length()-1);\n\t\t\tsb=null;\n\t\t//\tSystem.out.println(value.toString());\n\t\t}\n\t\tString[] res=fenzi.split(\" \");\n\t//\tSystem.out.println(\"fenmu=\"+fenmu);\n\t\tfor(int i=0;i<res.length;i++)\n\t\t{\n\t\t//\tSystem.out.println(\"res=\"+res[i]);\n\t\t\tres[i]=Double.parseDouble(res[i])/fenmu+\"\";\n\t\t}\n\t\tStringBuilder sb=new StringBuilder();\n\t\tfor(int i=0;i<res.length;i++)\n\t\t{\n\t\t//\tSystem.out.println(\"res=\"+res[i]);\n\t\t\tsb.append(res[i]+\" \");\n\t\t}\n\t\tfenzi=sb.toString().substring(0,sb.length()-1);\n\t\treducevalue.set(fenzi);\n\t\targ2.write(arg0, reducevalue);\n\t}", "public void map(LongWritable docID, Text value, OutputCollector<Text, Text> output, Reporter reporter) throws IOException {\n FileSplit fileSplit = (FileSplit) reporter.getInputSplit();\n String filename = \"\" + fileSplit.getPath().getName();\n\n int argc = Integer.parseInt(conf.get(\"argc\"));\n java.util.Map<String, Integer> keywords = new HashMap<String, Integer>();\n\n for (int i = 0; i < argc; i++) {\n String inputString = conf.get(\"keyword\" + i);\n\n keywords.put(inputString, 0);\n\n\n }\n\n String line = value.toString();\n StringTokenizer tokenizer = new StringTokenizer(line);\n while (tokenizer.hasMoreTokens()) {\n\n String token = tokenizer.nextToken();\n for (java.util.Map.Entry<String, Integer> me : keywords.entrySet()) {\n if (token.equalsIgnoreCase(me.getKey())) {\n\n keywords.put(me.getKey(), me.getValue() + 1);\n\n }\n }\n }\n\n for (java.util.Map.Entry<String, Integer> me : keywords.entrySet()) {\n\n keyword.set(me.getKey());\n filenameCount.set(filename + \"_\" + me.getValue());\n\n output.collect(keyword, filenameCount);\n }\n }", "public static void main(String[] args) throws IllegalArgumentException, IOException, ClassNotFoundException, InterruptedException {\n Configuration conf=new Configuration();\n FileSystem hdfs=FileSystem.get(conf);\n System.out.println(conf.get(\"fs.defaultFS\"));\n //conf.set(\"fs.defaultFS\",\"http//:localhost:9000\");\n Job job=new Job(conf,\"word cout\");\n job.setJarByClass(MyWordCount.class);\n job.setMapperClass(MyMapper.class);\n job.setReducerClass(MyReduce.class);\n job.setCombinerClass(MyReduce.class);\n job.setOutputKeyClass(Text.class);\n job.setOutputValueClass(IntWritable.class);\n// job.setInputFormatClass(TextInputFormat.class);\n// job.setOutputFormatClass(TextOutputFormat.class);\n FileInputFormat.addInputPath(job, new Path(\"file:///usr/local/hadoop-2.6.1/input\"));\n FileOutputFormat.setOutputPath(job, new Path(\"hdfs:///user/output\"));\n System.exit(job.waitForCompletion(true) ? 0 : 1);\n }", "public void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {\n String[] splitLine = value.toString().replace(\"\\\"\", \"\").split(\",\");\n //header data and bad data will throw an exception\n try {\n String year = splitLine[11].substring(0, 4);\n //SO2 quality\n double quality = Double.parseDouble(splitLine[13]);\n\n //System.out.printf(\"Year: %s, quality: %f%n\", year, quality);\n //organize by year, list of quality values for that year\n context.write(new Text(year), new DoubleWritable(quality));\n\n } catch (NumberFormatException ignored) {\n //System.out.println(\"FOUND EXCEPTION: \" + splitLine[12]);\n //System.out.println(\"IGNORING: \" + splitLine[13] + \", \" + splitLine[0]);\n }\n }", "@Override\n\t\tprotected void map(Object key, Text value, Context context)\n\t\t\t\tthrows IOException, InterruptedException {\n\t\t\tStringTokenizer str=new StringTokenizer(value.toString());\n//\t\t\tString[]str=new String(value.toString()).split(\"a\");\n\t\t\twhile(str.hasMoreTokens()){\n\t\t\t\tword.set(str.nextToken());\n\t\t\t\tcontext.write(word, one);\n\t\t\t\t}\n//\t\t\tfor(String b:str){\n//\t\t\t\tword.set(b);\n//\t\t\t\tcontext.write(word, one);\n//\t\t\t\t\n//\t\t\t}\n\t\t\t\n\t\t}", "@Override\n public void reduce(Text key, Iterable<IntWritable> values, Context context) throws InterruptedException,\n IOException {\n\n long pY = 0;\n long pYW = 0;\n for (IntWritable value : values) {\n // Increment the global counter total docs.\n // context.getCounter(Main.NB_COUNTERS.TOTAL_DOCS).increment(1);\n\n // Increment the number of documents with this label.\n pY++;\n\n // Increment the number of words under this label. (including\n // duplicates)\n pYW += value.get();\n }\n\n // <label Y> {<# of documents with label Y>:<# of words under label Y>}\n context.write(key, new Text(String.format(\"%s:%s\", pY, pYW)));\n // (0, 12:500)\n // (neg,docs:words)\n }", "public void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException \n {\n \t\n \tStringTokenizer st_11;\n \tStringBuilder str_build;\n \tConfiguration conf1=context.getConfiguration();\n \tinput1=conf1.get(\"input1\").toString();\n \tinput2=conf1.get(\"input2\").toString();\n \t\n \tint a1=Integer.parseInt(input1);\n \tint b1=Integer.parseInt(input2);\n \t \t\n \tString[] mydata = value.toString().split(\"\\t\");\n \t\n \tif(mydata.length==2)\n \t{\n \t\tif((Integer.parseInt(mydata[0])==a1)||(Integer.parseInt(mydata[0])==b1))\n \t\t{\n \t\t\t str_build = new StringBuilder();\n \t\t\t st_11= new StringTokenizer(mydata[1].toString(),\",\");\n \t\t\t \n \t\t\t while(st_11.hasMoreElements())\n \t\t {\n \t\t\t\tString temporary=st_11.nextElement().toString();\n \t\t\t\tstr_build.append(temporary);\n \t\t\t\tstr_build.append(\"-\");\n \t\t\t\tstr_build.append(usersMap.get(temporary));\n \t\t\t\tstr_build.append(\",\");\n \t\t }\n \t\t\t str_build.deleteCharAt(str_build.length()-1);\n \t\t\t context.write(new Text(\"1\"),new Text(str_build.toString()));\n \t\t}\n \t}\n \tif(mydata.length==1)\n \t{\n \t\tif((Integer.parseInt(mydata[0])==a1)||(Integer.parseInt(mydata[0])==b1))\n \t\t{\n \t\t\tcontext.write(new Text(\"1\"),new Text(\"NULL\"));\n \t\t}\n \t\t\n \t}\n \t\n }", "@Override\r\n\t\tprotected void map(LongWritable key, Text value,\r\n\t\t\t\tMapper<LongWritable, Text, PageCount_myself, NullWritable>.Context context)\r\n\t\t\t\tthrows IOException, InterruptedException {\n\t\t\tString line = value.toString();\r\n\t\t\tString[] split = line.split(\"\\t\");\r\n\t\t\t\r\n\t\t\tcontext.write(new PageCount_myself(split[0], Integer.parseInt(split[1])), NullWritable.get());\r\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void map(Object key, Text value, Context context)\n\tthrows IOException, InterruptedException {\n\tString[] words = value.toString().split(\"[ \\t]+\");\n\tfor(String originalWord:words)\n\t{\n\t\t//Remove all alphanumeric characters\n\t\toriginalWord = originalWord.replaceAll(\"[^a-zA-Z0-9]\",\"\");\n\t\t\n\t\t//Convert the words to lower case\n\t\t//word = word.toLowerCase();\n\t\n\t\tchar[] chars = originalWord.toCharArray();\n\t\tArrays.sort(chars);\n\t\tString sortedWord= new String(chars);\n\t\tcontext.write(new Text(sortedWord), new Text(originalWord));\n\t\tSystem.err.println(\"RKUMLOG:This is a mapper.\");\n\t}\n\t}", "public void map(Object key, Text value, Context context) throws IOException, InterruptedException{\n val = value.toString();\n\t\tarr = val.split(\"\\\\s+\");\n\t\tprova.set(Long.parseLong(arr[1]));\n\t\tcontext.write(prova,one);\n\t\t\n }", "public void map(Object key, Text value, Context context) throws IOException, InterruptedException {\n StringTokenizer itr = new StringTokenizer(value.toString());\n while (itr.hasMoreTokens()) {\n word = itr.nextToken().toLowerCase();\n for(String word2 : WordMap){\n\n Double similarity = calculateJaccardSimilarity(word, word2);\n\n // which have Jaccard similarity not 0 and no larger than 0.15?\n if ((similarity > 0.0) && (similarity <= 0.15)) {\n DoubleWritable result = new DoubleWritable(similarity);\n context.write(new Text(word+\"\\t\"+word2), result);\n }\n }\n }\n }", "@Override\n\tpublic boolean next(IntWritable key, Text value) throws IOException\n\t{\n\t\tString string;\n\t\twhile (true)\n\t\t{\n\t\t\tstring = bufferedReader.readLine();\n\t\t\tif (string == null)\n\t\t\t\treturn false;\n\t\t\tif (string.isEmpty())\n\t\t\t\tcontinue;\n\t\t\telse\n\t\t\t\tbreak;\n\t\t}\n\t\tcurrentByteRead = fsDataInputStream.getPos();\n\t\tkey.set(pointtype);\n\t\tvalue.set(string);\n\t\treturn true;\n\t}", "@Override\n protected void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {\n\n String[] split = value.toString().split(\"\\t\");\n int length = split.length;\n\n String dateTime = split[0];\n String userId = split[1];\n String searchkwd = split[2];\n String retorder = split[3];\n String cliorder = split[4];\n String cliurl = split[5];\n\n\n logBean.setDateTime(Long.parseLong(dateTime));\n logBean.setUserId(userId);\n logBean.setSearchkwd(searchkwd);\n logBean.setRetorder(Integer.parseInt(retorder));\n logBean.setCliorder(Integer.parseInt(cliorder));\n logBean.setCliurl(cliurl);\n\n context.write(logBean, NullWritable.get());\n }", "@Override\n\t\tpublic void map(LongWritable key, Text value, Context context) \n\t\t\t\tthrows IOException, InterruptedException \n\t\t{\n\t\t\tString[] lines = value.toString().split(\"\\\\r?\\\\n\"); /* Split input block on new line*/\n\t\t\tfor (String line : lines) /*For each line, search article.*/\n\t\t\t{\n\t\t\t\tif (line == null || line.trim().equals(\"\")) {continue;} //Skip over bank or null lines\n\t\t\t\tString[] elements = line.split(\"\\\\t\"); /*Split line over tabs*/\n\t\t\t\t\n\t\t\t\tif (elements[1].contains(Searchword) || elements[3].contains(Searchword))\n\t\t\t\t{\n\t\t\t\t\t// If the keyword is found in the string write the output the articleID and 1\n\t\t\t\t\tcontext.write(new Text(elements[0].toString()), one); \n\t\t\t\t}\n\t\t\t}\n\t\t}", "public void reduce(Text key, Iterable<Text> values, Context context) throws IOException, InterruptedException {\n HashMap<Text, IntWritable> indexTracker = new HashMap<Text, IntWritable>(); //this holds the file + number of instances for a word in that file\n int total = 0;\n for(Text file : values){\n if(indexTracker != null && indexTracker.get(file) != null){\n int wordAmount = indexTracker.get(file).get();\n indexTracker.put(file, new IntWritable(wordAmount + 1));\n total++;\n }\n else{\n indexTracker.put(file, new IntWritable(1));\n total++;\n }\n }\n context.write(key, new Text(indexTracker.toString())); \n }", "@Override\r\n\t//Mapper Method\r\n\tpublic void map(LongWritable key, Text value, Context c) throws IOException, InterruptedException\r\n\t{\n\tString line = value.toString();\r\n\t//Split them into tokens \r\n\tString [] tokens = line.split(\"\\\\;\");\r\n\t//Store the year of the movie title\r\n\tString year = tokens[3];\r\n\t//Check if the data is present or not(\\N)\r\n\t//If it is present then check if it is a movie after 2000\r\n\tif(year.startsWith(\"2\"))\r\n\t{\r\n\t//Take the various genres of the movie \r\n\t\tString genre=tokens[4];\r\n\t\t//Split and store each genre seperately\r\n\t\tString [] tokens_genre=genre.split(\"\\\\,\");\r\n\t\t//For each genre in the genre list of the movie run the loop\r\n\t\tfor(int i=0;i<tokens_genre.length;i++)\r\n\t\t{\t\r\n\t\t//Check if the data is provided in the genre list(not \\N)\r\n\tif(!tokens_genre[i].startsWith(\"\\\\N\"))\r\n\t{\r\n\t//For each genre set the mapper key\r\n\t//Here each key is the year of the movie and its genre connected with a '_'\r\n\t\tmapperKey.set(new Text(year) + \"_\" + new Text(tokens_genre[i]));\r\n\t\t//Create the key value pair\r\n\t\tc.write(mapperKey, new Text(\"1\"));\r\n\t}\r\n\t\t}\r\n\t\r\n\t}\r\n\t\r\n\t}", "public void reduce(IntWritable key, Iterable<Text> values,\n Context context\n ) throws IOException, InterruptedException {\n// now we will get the sorted output\nfor (Text val : values) {\n IntWritable key1 = new IntWritable(-1*key.get());\n\n\tif(count < 10)\n\t{ // we only want Top 10 value for this we need to set counter\n\t\tcontext.write(key1, new Text (val));\n\t}\n\tcount++;\n\n}\n\n}", "public void map(LongWritable key, Text value, OutputCollector <Text, Text> output, Reporter reporter) throws IOException {\n\n\t\tString valueString1 = value.toString();\n\t\tString valueString=valueString1.replaceAll(\"[\\\\n]\",\" \");\n\t\tString[] Data_raw = valueString.split(\"\\t\");\n\t\tif(Data_raw.length > 4)\n\t\t{\n\t\t\n\t\tString[] Data = Data_raw[4].split(\" |\\\\,|\\\\.|!|\\\\?|\\\\:|\\\\;|\\\\\\\"|\\\\(|\\\\)|\\\\<|\\\\>|\\\\[|\\\\]|\\\\#|\\\\$|\\\\=|\\\\-|\\\\/\");\n\t\tfor(String s: Data)\n\t\t{\n\t\t\toutput.collect(new Text(s.toString().toLowerCase()), new Text(Data_raw[0].toString()));\n\t\t}\n\t\t}\n\t}", "@Override\n public void map(LongWritable key, Text value, Context context)\n throws IOException, InterruptedException {\n String[] words = value.toString().split(Utils.delim);\n String decade = words[0],\n w1 = words[1],\n w2 = words[2],\n cW1 = words[3],\n cW2 = words[4],\n cW1W2 = words[5],\n cDecade = cDecades[Integer.parseInt(decade) - Utils.minDecade],\n pmi;\n\n if (cDecade.equals(\"-1\")) {\n logger.severe(\"Unsupported decade: \" + decade);\n return;\n }\n\n pmi = calculatePMI(\n Double.parseDouble(cW1),\n Double.parseDouble(cW2),\n Double.parseDouble(cW1W2),\n Double.parseDouble(cDecade));\n\n decadePmi.set(decade, pmi);\n newValue.set(w1 + Utils.delim + w2);\n context.write(decadePmi, newValue);\n }", "public void map(Object key, Text value, Context context\n ) throws IOException, InterruptedException {\n\n String pointID = value.toString().split(\",\")[0];\n double xCord = Double.parseDouble(value.toString().split(\",\")[1]);\n double yCord = Double.parseDouble(value.toString().split(\",\")[2]);\n double distance;\n //compute distance\n distance=Math.sqrt(Math.pow((xCord-xVal),2)+Math.pow((yCord-yVal),2));\n\n outKey=new DoubleWritable(distance);\n outVal=new Text(String.valueOf(pointID));\n //emit key and values\n context.write(outKey,outVal);\n\n }", "@Override\n public void map(Object key, Text value, Context context\n ) throws IOException, InterruptedException {\n String line = value.toString();\n\n String[] data = line.split(\"\\t\");\n // label \"0\" stands for matrix M\n // label \"1\" stands for matrix N\n Text commonKey = new Text();\n Text diffValue = new Text();\n if (data[3].equals(\"0\")){\n // commonKey is <j>\n commonKey.set(data[1]);\n // diffValue is <i><,><mij><,><0>\n diffValue.set(data[0]+\",\"+data[2]+\",\"+data[3]);\n }else if(data[3].equals(\"1\")){\n // commonKey is <j>\n commonKey.set(data[0]);\n // diffValue is <k><,><njk><,><1>\n diffValue.set(data[1]+\",\"+data[2]+\",\"+data[3]);\n }\n context.write(commonKey,diffValue);\n }", "@Override\r\n protected void map(LongWritable key, Text value, Context context)\r\n throws IOException, InterruptedException {\n\r\n String line = value.toString();\r\n String[] fields = line.split(\"\\t\");\r\n if (fields.length > BrowserComRunEnum.STRATERY.ordinal()) {\r\n StringBuilder valueSB = new StringBuilder();\r\n String timeStampStr = fields[BrowserComRunEnum.TIME.ordinal()];\r\n String versionInfo = fields[BrowserComRunEnum.VERSION.ordinal()];\r\n String categoryInfo = fields[BrowserComRunEnum.CATEGORY\r\n .ordinal()];\r\n String sucInfo = fields[BrowserComRunEnum.SUC.ordinal()];\r\n String typeInfo = fields[BrowserComRunEnum.TYPE.ordinal()];\r\n String macInfo = MACFormatUtil\r\n .macFormatToCorrectStr(fields[BrowserComRunEnum.MAC\r\n .ordinal()]);\r\n String stratery = fields[BrowserComRunEnum.STRATERY.ordinal()];\r\n this.pattern.matcher(categoryInfo);\r\n\r\n if (this.pattern.matcher(categoryInfo).matches()\r\n && this.pattern.matcher(sucInfo).matches()\r\n && this.pattern.matcher(typeInfo).matches()) {\r\n // 日期id\r\n String dateIdStr = TimestampFormatUtil.formatTimestamp(\r\n timeStampStr).get(ConstantEnum.DATE_ID);\r\n valueSB.append(categoryInfo);\r\n valueSB.append(\"\\t\");\r\n // versionId\r\n long versionId = -0l;\r\n versionId = IPFormatUtil.ip2long(versionInfo);\r\n valueSB.append(versionId);\r\n valueSB.append(\"\\t\");\r\n valueSB.append(macInfo);\r\n valueSB.append(\"\\t\");\r\n valueSB.append(sucInfo);\r\n valueSB.append(\"\\t\");\r\n valueSB.append(typeInfo);\r\n valueSB.append(\"\\t\");\r\n valueSB.append(stratery);\r\n context.write(new Text(dateIdStr),\r\n new Text(valueSB.toString()));\r\n }\r\n\r\n }\r\n }", "public void map(Object key, Text value, Context context\n ) throws IOException, InterruptedException {\n StringTokenizer itr = new StringTokenizer(value.toString(), \"\\n\");\n\n // Loop through all lines\n while (itr.hasMoreTokens()) {\n String filteredSentence;\n String sentence = itr.nextToken().toLowerCase(Locale.ROOT);\n\n // Remove all special characters from the word and replace them with *\n filteredSentence = sentence.replaceAll(\"[^a-zA-Z ]\", \"*\");\n // Add a space at the end of every line to also represent the end of the last word in the sentence in the bigrams\n filteredSentence += \" \";\n\n // Write every lineCount + a map of the bigram and frequency of 1 to the context\n for(int i = 0; i < filteredSentence.length() - 1; i++){\n String pair = filteredSentence.substring(i, i + 2);\n context.write(new IntWritable(lineCount), new StringDoubleWritable(pair, 1.0));\n }\n lineCount++;\n }\n }", "@Override\n protected void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {\n String test = value.toString();\n test = test.replaceAll(\"\\t\", \" \").replaceFirst(\" \", \"\\t\");\n\n double basePageRank = 0;\n boolean hasPageRank = false;\n double pageRank = 0;\n /**\n * Pattern to distinguish our inserted numbers from numbers in titles\n * is: _!(numbers.numbers)\n */\n Pattern pt = Pattern.compile(\"(_!\\\\d+.\\\\S+)\");\n Matcher mt = pt.matcher(test);\n if (mt.find()) {\n pageRank = Double.parseDouble(mt.group(1).substring(2));\n hasPageRank = true;\n }\n /**\n * If it's the first iteration, distribute 1/N among outLinks\n */\n if (!hasPageRank) {\n try {\n pageRank = 1d / (context.getConfiguration().getInt(\"N\", 0));\n } catch (ArithmeticException ae) {\n /**\n * Catch division by zero (if 'N' was not set)\n */\n Logger.getLogger(PageRankMapper.class.getName()).log(Level.SEVERE, ae.getMessage(), ae);\n }\n }\n /**\n * Split input line into key,value\n */\n String[] split = test.split(\"\\t\");\n /**\n * Emit this node's (1-d)/N and it's adjacency outGraph if not empty\n */\n // d = 0.85\n basePageRank = (1 - 0.85) / (context.getConfiguration().getInt(\"N\", 0));\n String output = \"\";\n output += \"_!\" + basePageRank;\n if (split.length > 1) {\n //split[1] => outlinks string \n String[] outlinks = split[1].split(\" \");\n for (int i = hasPageRank ? 1 : 0; i < outlinks.length; i++) {\n output += \" \" + outlinks[i];\n }\n }\n context.write(new Text(split[0]), new Text(output.trim()));\n /**\n * Emit pageRank/|outLinks| to all outLinks if not empty: Split on \\t to\n * get separate key(index 0) from values(index 1), Split values on space\n * to separate out links(ignore the first(index 0),the pageRank, unless\n * hasPageRank=false)\n */\n if (split.length > 1) {\n String[] outlinks = split[1].split(\" \");\n /**\n * Input has no outLinks, only has basePageRank, already taken care\n * of in previous emit, return\n */\n if (hasPageRank && outlinks.length == 1) {\n return;\n }\n /**\n * d = 0.85\n */\n pageRank *= 0.85;\n /**\n * Divide pageRank over number of outLinks\n */\n pageRank /= hasPageRank ? (outlinks.length - 1) : outlinks.length;\n for (int i = hasPageRank ? 1 : 0; i < outlinks.length; i++) {\n context.write(new Text(outlinks[i]), new Text(\"_!\" + pageRank));\n }\n }\n }", "public void map(LongWritable key, Text value, OutputCollector<Text, IntWritable> output, Reporter reporter) throws IOException {\n\n\t\tString line = value.toString();\n\n\t\t// 1. Get The Values From The Input File\n\t\tString year = line.substring(15, 19);\n\t\t\n\t\tint airTemperature;\n\t\tif (line.charAt(87) == '+') {\n\t\t\tairTemperature = Integer.parseInt(line.substring(88, 92));\n\t\t} else {\n\t\t\tairTemperature = Integer.parseInt(line.substring(87, 92));\n\t\t}\n\n\t\t// 2. Output To the <key,value> pair\n\t\tString quality = line.substring(92, 93);\n\t\tif (airTemperature != MISSING && quality.matches(\"[01459]\")) {\n\t\t\toutput.collect(new Text(year), new IntWritable(airTemperature));\n\t\t}\n\t}", "@Override\r\n\tprotected void map(LongWritable key, Text value, Context context)\r\n\t\t\tthrows IOException, InterruptedException {\n\r\n\t\tString[] userUserAndCount = value.toString().split(\r\n\t\t\t\tProtocols.USER_USER_COUNT_SEPARATOR);\r\n\t\tString[] users = userUserAndCount[0]\r\n\t\t\t\t.split(Protocols.USER_USER_SEPARATOR);\r\n\r\n\t\tcontext.write(new IntWritable(Integer.parseInt(users[0])), new Text(\r\n\t\t\t\tusers[1] + Protocols.USER_WEIGHT + userUserAndCount[1]));\r\n\t\tcontext.write(new IntWritable(Integer.parseInt(users[1])), new Text(\r\n\t\t\t\tusers[0] + Protocols.USER_WEIGHT + userUserAndCount[1]));\r\n\r\n\t}", "@Override\n protected void reduce(Text key, Iterable<IntWritable> values,\n Context context) throws IOException, InterruptedException {\n int sum = 0;\n for(IntWritable value : values){\n sum += value.get();\n }\n outputValue.set(sum);\n context.write(key, outputValue);\n }", "@Override\n public void map(LongWritable kin, Text datin, Context context) throws IOException, InterruptedException {\n this.map(datin.toString()).forEach((k, v) -> {\n try {\n context.write(new IntWritable(k), new LongWritable(v));\n }catch (Exception e){\n throw new RuntimeException(e);\n }\n });\n }", "protected void map(Object key, Text value, Context context) throws IOException, InterruptedException {\n String[] line_author = value.toString().split(\"\\t\");\n id_author.set(Integer.parseInt(line_author[1]));\n context.write(id_author, new IntWritable(1));\n }", "@Override\n protected void map(Object key, Text value, Context context) throws IOException, InterruptedException {\n String[] pageRank = value.toString().trim().split(\"\\t\");\n context.write(new Text(pageRank[0]), new Text(pageRank[1]));\n }", "public void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {\n\t\t\tText gxy = new Text();\n\t\t\tText ij = new Text();\n\t\t\tgxy.clear();\n\t\t\tij.clear();\n\t\t\tString line = value.toString();\n\t\t\tString[] w = line.split(\":\");\n\t\t\tString[] IJ = w[0].split(\",\");\n\t\t\tint i = Integer.parseInt(IJ[0]);\n\t\t\tint j = Integer.parseInt(IJ[1]);\n\t\t\tint k = Integer.parseInt(w[1]);\n\t\t\t//int d = Integer.parseInt(w[2]);\n\t\t\tif (i==k || j==k){\n\t\t\t\tfor (int l=1; l<=4; l++){\n\t\t\t\t\tif (j==k){\n\t\t\t\t\t\tij.set(IJtoString(i, l));\n\t\t\t\t\t\tgxy.set(GXYtoString(i, j, k, w[2]));\n\t\t\t\t\t System.out.println(\"Mapper emitting\"+\" \"+ij+\" \"+gxy);\n\t\t\t\t\t\tcontext.write(ij, gxy);\n\t\t\t\t\t}\n\t\t\t\t\tif (i==k){\n\t\t\t\t\t\tij.set(IJtoString(l, j));\n\t\t\t\t\t\tgxy.set(GXYtoString(i, j, k, w[2]));\n\t\t\t\t\t\tSystem.out.println(\"Mapper emitting\"+\" \"+ij+\" \"+gxy);\n\t\t\t\t\t\tcontext.write(ij, gxy);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tij.set(IJtoString(i, j));\n\t\t\t\tgxy.set(GXYtoString(i, j, k, w[2]));\n\t\t\t\tSystem.out.println(\"Mapper emitting\"+\" \"+ij+\" \"+gxy);\n\t\t\t\tcontext.write(ij, gxy);\n\t\t\t}\n\n\t\t}", "@Override\n public void reduce(Text key, Iterable<StringWritable> values, Context context) throws\n IOException, InterruptedException {\n MapWritable map = new <Text, IntWritable>MapWritable();\n for (StringWritable sw : values) {\n map.put(new Text(sw.getKey()), new DoubleWritable(Double.parseDouble(sw.getVal())));\n }\n\n context.write(key, map);\n }", "@Override\n\tpublic void map(LongWritable key, Text value, OutputCollector<Text, Text> output, Reporter reporter)\n\t\t\tthrows IOException {\n\t\tString val = value.toString();\n\t\tString[] Data = val.split(\", \");\n\t\toutput.collect(new Text(Data[1]), new Text(val));\n\t}", "public static void main(String args[])throws Exception{ \n //首先定义两个临时文件夹,这里可以使用随机函数+文件名,这样重名的几率就很小。 \n String dstFile = \"temp_src\"; \n String srcFile = \"temp_dst\"; \n \n Configuration conf = new Configuration(); \n \n System.out.println(\"fs:\" + conf.get(\"fs.default.name\"));\n // must!!! config the fs.default.name be the same to the value in core-site.xml \n \n// conf.set(\"fs.default.name\",\"hdfs://hadoop1-node1:9000\"); \n// \n// conf.set(\"mapred.job.tracker\",\"hadoop1-node1:9001\"); \n \n conf.set(\"mapred.jar\", \"E:/work_space_trade/howbuy-hadoop_20150209/target/test-classes/wordcount.jar\");\n \n// conf.set(\"hadoop.native.lib\", \"false\");\n \n /* //这里生成文件操作对象。 \n HDFS_File file = new HDFS_File(); \n \n \n //从本地上传文件到HDFS,可以是文件也可以是目录 \n file.PutFile(conf, args[0], dstFile); \n \n System.out.println(\"up ok\"); */\n \n \n \n Job job = new Job(conf, \"mywordcount1\"); \n job.setJarByClass(Mywordcount.class); \n \n job.setInputFormatClass(TextInputFormat.class); \n \n job.setOutputKeyClass(Text.class); \n job.setOutputValueClass(IntWritable.class); \n \n job.setMapperClass(WordcountMapper.class); \n job.setReducerClass(WordcountReducer.class); \n job.setCombinerClass(WordcountReducer.class); \n //注意这里的输入输出都应该是在HDFS下的文件或目录 \n FileInputFormat.setInputPaths(job, new Path(\"/wordcount\")); \n FileOutputFormat.setOutputPath(job, new Path(\"/wordoutput\"));\n //开始运行 \n job.waitForCompletion(true); \n \n /*//从HDFS取回文件保存至本地 \n file.GetFile(conf, srcFile, args[1]); \n System.out.println(\"down the result ok!\"); \n //删除临时文件或目录 \n file.DelFile(conf, dstFile, true); \n file.DelFile(conf, srcFile, true); */\n \n System.out.println(\"delete file on hdfs ok!\"); \n }", "public void map(Object key, Text value, Context context\n ) throws IOException, InterruptedException {\n String[] data = value.toString().split(\";\");\n\n // The gender is in the second part of the data set\n String gender = data[1];\n\n // Let's determine if the gender corresponds to a male and/or a female\n boolean isMale = gender.equals(\"m\") || gender.equals(\"m,f\") || gender.equals(\"f,m\");\n boolean isFemale = gender.equals(\"f\") || gender.equals(\"m,f\") || gender.equals(\"f,m\");\n\n // Let's write on both keys (male and female) the \"boolean-to-IntWritable conversion\" of the booleans\n context.write(new Text(\"male\"), isMale ? one : zero);\n context.write(new Text(\"female\"), isFemale ? one : zero);\n }", "@Override\n\t\tpublic void reduce(Text key, Iterator<Text> value,\n\t\t\t\tOutputCollector<Text, Text> output, Reporter reporter)\n\t\t\t\tthrows IOException {\n\t\t\tint i = 0;\n\t\t\tStringBuffer outval = new StringBuffer();\n\t\t\twhile (value.hasNext()) {\n\t\t\t\toutval.append(\"\\n\\t\" + value.next().toString());\n\t\t\t\ti++;\n\t\t\t}\n\t\t\tif (i == words.length) {\n\t\t\t\toutput.collect(key, new Text(outval.toString()));\n\t\t\t}\n\t\t}", "@Override\n\tpublic void reduce(TwoWords key, Iterable<Text> values, Context context)\n\t\t\tthrows IOException, InterruptedException {\n\n\t\tString prev = null;\n\t\tint runningCount = 0;\n\t\tPriorityQueue<WCTuple> pq = new PriorityQueue<WCTuple>();\n\t\tfor(Text t: values)\n\t\t{\n\t\t\tString word = t.toString();\n//\t\t\tSystem.out.println(\"Val: \" + word);\n\t\t\tif(prev == null)\n\t\t\t{\n\t\t\t\tprev = word;\n\t\t\t\trunningCount = 1;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif(prev.equals(word))\n\t\t\t{\n\t\t\t\trunningCount += 1;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tWCTuple wc = new WCTuple(word, runningCount);\n\t\t\twc.addToList(pq);\n\t\t\tprev = word;\n\t\t\trunningCount = 1;\n\t\t}\n\t\tif(prev != null)\n\t\t{\n\t\t\tWCTuple wc = new WCTuple(prev, runningCount);\n\t\t\twc.addToList(pq);\n\t\t}\n\n\t\tString output = \"\";\n\n\t\twhile(!pq.isEmpty())\n\t\t{\n\t\t\tWCTuple wc = pq.remove();\n\t\t\toutput = wc.getWord() + \",\" + output;\n//\t\t\tSystem.out.println(\"output: \" + output);\n\t\t}\n\n\t\tcontext.write(new Text(key.getPK()), new Text(output));\n\t}", "@Override\n\t\tprotected void reduce(Text key, Iterable<IntWritable> values,\n\t\t\tContext context)\n\t\t\t\tthrows IOException, InterruptedException {\n\t\t\tint sum=0;\n\t\t\tfor(IntWritable a:values){\n\t\t\t\tsum+=a.get();\n\t\t\t\t}\n\t\t\tresult.set(sum);\n\t\t\tcontext.write(key, result);\n\t\t}", "public static void main(String[] args) {\n\t\tConfiguration conf = new Configuration();\n\t\t//conf.set(\"mapreduce.input.fileinputformat.split.maxsize\", ONE_MB * 32);\n \ttry {\n\t\t\tJob job = Job.getInstance(conf, \"Word Count Example\");\n\t\t\tjob.setJarByClass(App.class);\n\t\t\t\n\t\t\t//Set Mapper classes\n\t\t\tjob.setMapperClass(KeyValueMapper.class);\n//\t\t\tjob.setMapperClass(SqMapper.class);\n\t\t\tjob.setMapperClass(FixedLenMapper.class);\n\n\t\t\t\n\t\t\t//Set reduce class\n//\t\t\tjob.setReducerClass(0);\n\t\t\t\n\t\t\t/*Set InputFormat */\n\t\t\t\n\t\t\t/*use KeyValueTextInputFormat */\n\t\t\tjob.setInputFormatClass(KeyValueTextInputFormat.class);\n\t\t\t\n\t\t\t/*use NLineInputFormat */\n\t\t\t//job.setInputFormatClass(NLineInputFormat.class);\n//\t\t\tjob.getConfiguration().setInt(\n//\t\t\t\t\t\"mapreduce.input.lineinputformat.linespermap\", 3);\n\t\t\t\n\t\t\t/*use SequenceFileInputFormat */\n//\t\t\tjob.setInputFormatClass(SequenceFileInputFormat.class);\n\t\t\t\n\t\t\t/*use TextInputFormat */\n//\t\t\tjob.setInputFormatClass(TextInputFormat.class);\n\t\t\t\n\t\t\t/*use CombineSequenceFileInputFormat */\n//\t\t\tjob.setInputFormatClass(CombineTextInputFormat.class);\n\t\t\t\n\t\t\t/*use FixedLengthInputFormat */\n//\t\t\tjob.setInputFormatClass(FixedLengthInputFormat.class);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//set OutputFormat class \n\t\t\tjob.setOutputFormatClass(TextOutputFormat.class);\n//\t\t\tjob.setOutputFormatClass(SequenceFileOutputFormat.class);\n//\t\t\t//从下面的模式中选择一种,并将其余的注释掉\n//\t\t\t// 组合方式1:不压缩模式\n//\t\t\tSequenceFileOutputFormat.setOutputCompressionType(job,CompressionType.NONE);\n\t\t\t\n\t\t\t//Set the output key and value types\n//\t\t\tjob.setOutputKeyClass(LongWritable.class);\n//\t\t\tjob.setOutputValueClass(Text.class);\n\t\t\t\n\t\t\t\n\t\t\t//Set the input and output paths\n\t\t\tFileInputFormat.addInputPath(job, new Path(args[0]));\n\t\t\tFileOutputFormat.setOutputPath(job, new Path(args[1]));\n\t\t\t\n\t\t\t//Set the number of reducers\n\t\t\tjob.setNumReduceTasks(0);\n\t\t\t\n\t\t\ttry {\n\t\t\t\tSystem.exit(job.waitForCompletion(true) ? 0 : 1);\n\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n \t\n System.out.println( \"Hello World!\" );\n\n\t}", "public void map(Object key, Text value, Context context\n\t\t ) throws IOException, InterruptedException {\n\n\t\t\t\n\t\t\t\n\t\t\t \n\t\t\t String curr_string=value.toString();\n\t\t\t /// splitting based on \"*\" as a delimiter...\n\t\t\t String [] parts=curr_string.split(\"\\\\*\");\n\t\t\t String curr_key=parts[0];\n\t\t\t // Removing spaces from both left and right part of the string..\n\t\t\t String curr_value=parts[1].trim();\n\t\t\t String [] small_parts=curr_value.split(\",\");\n\t\t\t // Taking the count of unique files which are present in the input given to tfidf\n\t\t\t int no_of_unique_files=Integer.parseInt(small_parts[small_parts.length-1]);\n\t\t\t /// The formula to compute idf is log((1+no_of_files)/no_of_unique_files))....\n\t\t\t Configuration conf=context.getConfiguration();\n\t\t\t String value_count=conf.get(\"test\");\n\t\t\t if(!value_count.isEmpty())\n\t\t\t {\n\t\t\t int total_no_files=Integer.parseInt(value_count);\n\t\t\t double x=(total_no_files/no_of_unique_files);\n\t\t\t // Formula fo rcomputing the idf value....\n\t\t\t double idf_value=Math.log10(1+x);\n\t\t\t for(int i=0;i<small_parts.length-1;i++)\n\t\t\t {\n\t\t\t\t String [] waste=small_parts[i].split(\"=\");\n\t\t\t\t String file_name=waste[0];\n\t\t\t\t // Computing the tfidf on the fly...\n\t\t\t\t double tf_idf=idf_value*Double.parseDouble(waste[1]);\n\t\t\t\t Text word3 = new Text();\n\t\t\t\t Text word4 = new Text();\n\t\t\t\t word3.set(curr_key+\"#####\"+file_name+\",\");\n\t\t\t\t word4.set(tf_idf+\"\");\n\t\t\t\t context.write(word3,word4);\n\t\t\t\t \n\t\t\t }\n\t\t\t //word1.set(curr_key);\n\t\t\t //word2.set(idf_value+\"\");\n\t\t\t //context.write(word1,word2); \n\t\t\t} \n\t\t}", "@Override\n public void output(Word value){ \n Integer integerValue = value.getUnsignedValue();\n int intValue = (int)integerValue; \n guiDisplay.append(String.valueOf((char)intValue)); \n guiDisplay.setCaretPosition(guiDisplay.getDocument().getLength());\n }", "public void map(LongWritable key, Text value, Context context)\tthrows IOException, InterruptedException {\n\t\t\tcontext.write(NullWritable.get(), value);\n\t\t}", "public void reduce(IntWritable key, Text values, \n Context context\n ) throws IOException, InterruptedException {\n \t\tcontext.write(values, key);\n \t}", "abstract int read(TextInput ti) throws IOException;", "public void map(LongWritable key, Text value, OutputCollector<Text, Text> output, Reporter reporter) throws IOException\n {\n \t // get filename to send it as key for sorting.\n \t FileSplit fileSplit = (FileSplit)reporter.getInputSplit();\n String k = fileSplit.getPath().getName();\n\n //taking one line at a time \n String line = value.toString();\n // get the position of the meaningful character\n int pos = lineno % 40;\n // get the character from the string\n String character = Character.toString(line.charAt(pos));\n // convert pipe symbol to next line \n if(character.charAt(0) == '|')\n \tcharacter = \"\\n\";\n // sending to output collector which in turn passes the same to reducer\n output.collect(new Text(k), new Text(character)); \n lineno++;\n }", "public ArrayListOfIntsWritable()\n {\n super();\n }", "@Override\r\n\t\tprotected void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {\r\n\r\n\t\t\tString[] split = value.toString().split(\",\");\r\n\r\n\t\t\toutKey.set(split);\r\n\r\n\t\t\tcontext.write(outKey, NullWritable.get());\r\n\t\t}", "public void reduce(IntWritable key, Iterable<Text> values, Context context) throws IOException, InterruptedException {\n HashMap<String, ArrayList<String>> hm = new HashMap<String, ArrayList<String>>();\n\n //ArrayList<String> tableS = new ArrayList<String>(); Trying to reduce memory\n ArrayList<String> tableT = new ArrayList<String>();\n\n //group the records in the iterator into table S and table T\n for(Text val : values){\n String record = val.toString();\n int i = record.indexOf(\" \");\n String tag = record.substring(0,i);\n String value = record.substring(i+1);\n\n if (tag.contentEquals(\"S\")) {\n //get the key-value information\n int j = value.indexOf(\" \");\n String tagKey = value.substring(0,j);\n String mapValue = value.substring(j+1);\n\n //if the key doesn't exist\n if (!hm.containsKey(tagKey)) {\n ArrayList<String> list = new ArrayList<String>();\n list.add(mapValue);\n hm.put(tagKey, list);\n } else {\n //same key exists, then add it to the array list\n hm.get(tagKey).add(mapValue);\n }\n } else if(tag.contentEquals(\"T\")) {\n tableT.add(value);\n }\n }\n\n// for (String s : tableS){\n// int i = s.indexOf(\" \");\n// String keyValue = s.substring(0, i);\n// //if the key doesn't exist\n// if (!hm.containsKey(keyValue)) {\n// ArrayList<String> list = new ArrayList<String>();\n// list.add(s.substring(i+1));\n// hm.put(keyValue, list);\n// } else {\n// //same key exists, then add it to the array list\n// hm.get(keyValue).add(s.substring(i+1));\n// }\n// }\n\n //then iterate through the other table to produce the result\n for (String t : tableT) {\n //check to see if there's a match\n int i = t.indexOf(\" \");\n String hashKey = t.substring(0, i);\n if (!hm.containsKey(hashKey)) {\n //no match and don't do anything\n } else {\n //match\n for (String s : hm.get(hashKey)) {\n String result = s + \" \" + hashKey + \":\" + t;\n context.write(key, new Text(result));\n }\n }\n }\n }", "public void map(Object key, Text value, Context context) throws IOException, InterruptedException {\n String line = value.toString().toLowerCase();\n line = line.replaceAll(regex, \" \");\n\n StringTokenizer itr = new StringTokenizer(line);\n while (itr.hasMoreTokens()) {\n word.set(itr.nextToken());\n context.write(word, one);\n }\n }", "@Test\n\tpublic void testMapReduce() {\n\n\t\t/*\n\t\t * For this test, the mapper's input will be \"1 cat cat dog\" \n\t\t */\n\t\tmapReduceDriver.withInput(new LongWritable(1), new Text(swedenHealth));\n\n\t\t/*\n\t\t * The expected output (from the reducer) is \"cat 2\", \"dog 1\". \n\t\t */\n\t\tmapReduceDriver.addOutput(new Text(\"(Sweden)\"), new Text(\"| in 2011$ values PPP, 1995 health cost: 1745.1| 2014 health cost: 5218.86| cost increase (%): 199.06%\\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\"));\n\n\t\t/*\n\t\t * Run the test.\n\t\t */\n\t\tmapReduceDriver.runTest();\n\t}", "@Override\r\n\t\t\t\tpublic Tuple2<String, Integer> call(WordCount t) throws Exception {\n\t\t\t\t\treturn new Tuple2<>(t.getWord() , new Integer(t.getCount()));\r\n\t\t\t\t\t\r\n\t\t\t\t}", "WordCounter(String inputText){\r\n \r\n wordSource = inputText;\r\n }", "Text getValue() throws IOException;", "@Override\n\t\tprotected void map(Object key, Text value,\n\t\t\t\tMapper<Object, Text, MyKey, Text>.Context context)\n\t\t\t\tthrows IOException, InterruptedException {\n\t\t\tString line[] = value.toString().split(\"\\t\");\n\t\t\tif(line.length<2)return;\n\t\t\tk.setK(new Text(line[0]));\n\t\t\tk.setV(new Text(line[1]));\n\t\t\tcontext.write(k,new Text(line[1]));\n\t\t}", "@Override\n\tprotected void map(LongWritable key, LogWritable value, Context context)\n\t\t\tthrows IOException, InterruptedException {\n\t\t \n\t\t context.write(value, mapValue);\n\t\t\n\t}", "@Override\n\t\tpublic void reduce(Text key, Iterable<IntWritable> values, Context context)\n\t\t\t\tthrows IOException, InterruptedException\n\t\t{\n\t\t\tint total = 0;\n\t\t\tIterator<IntWritable> vals = values.iterator();\n\t\t\twhile (vals.hasNext()) {\n\t\t\t\tvals.next();\n\t\t\t\ttotal++;\n\t\t\t}\n\t\t\tIntWritable finalCount = new IntWritable(total);\n\t\t\tcontext.write(key, finalCount);\n\t\t}", "@Override\n public void reduce(Text key, Iterable<LongWritable> values,\n Context context\n ) throws IOException, InterruptedException { \n \n for (LongWritable val : values) { \n if( max.compareTo(val) < 0) {\n max.set(new Long(val.toString()));\n } \n }\n context.write(key, max);\n }", "public void reduce(IntWritable key, Iterable<Text> values, Context context) throws IOException, InterruptedException {\n // Vars to hold the highest values\n String[] linevalues; //hold values\n float rating;\n\n // Iterate through each value\n System.out.println(\"Movie Id\" + key.toString());\n for (Text value: values) {\n System.out.println(\"User Id: \" + value.toString());\n // linevalues = value.toString().split(\",\");\n // rating = Float.parseFloat(linevalues[1]); \n \n // Check if the current rating is more than max_rating\n // if (rating >= 3.0) {\n // context.write(key, new IntWritable(Integer.parseInt(linevalues[0])));\n // } \n }\n // context.write(key, new IntWritable(Integer.parseInt(movie)));\n }", "public void reduce(Text key, Iterable<IntWritable> values,\n Context context\n ) throws IOException, InterruptedException {\n float sum = 0;\n float total = 0;\n\n // Let's browse the given values list\n for (IntWritable val : values) {\n // The current value is added to the final sum\n sum += val.get();\n\n // The total number of elements is incremented\n ++total;\n }\n\n // The result is calculated as a percentage\n result.set(sum / total * 100);\n\n // The key is the given word, and the value is the percentage\n context.write(key, result);\n }", "public WeekSAWritable() {\n this.count = new IntWritable(0);\n this.week = new IntWritable(0);\n this.hashTagList = new ArrayList<>();\n }", "public void map(Object key, Text value, Context context) throws IOException, InterruptedException {\n\t\t\tStringTokenizer tok = new StringTokenizer(value.toString(), \",\"); \n\t\t\t\n\t\t\ttry{\n\t\t\t\tif(tok.hasMoreTokens())\n\t\t\t\t\ttok.nextToken();\n\t\t\t\tif(tok.hasMoreTokens())\n\t\t\t\t\tlocation.set(tok.nextToken());\n\t\t\t\tif(tok.hasMoreTokens())\n\t\t\t\t\tnew_cases.set(Long.parseLong(tok.nextToken()));\n\n\t\t\t\tcontext.write(location, new_cases);\n\t\t\t\n\t\t\t}catch(Exception e){\n\t\t\t\t\n\t\t\t}\n\t\t}", "public void map(LongWritable key, Text value, OutputCollector<Text, IntWritable> output, Reporter reporter) throws IOException \n\t{\n\t\tString line = value.toString();\n\t\tStringTokenizer tokenizer = new StringTokenizer(line, \",\");\t\t\t\n\t\tif (tokenizer.hasMoreTokens() && tokenizer.nextToken().equals(\"2012\")) \n\t\t{\n\t\t\tcaller.set(tokenizer.nextToken());\n\t\t\toutput.collect(caller, one);\n\t\t}\n\t}", "public String getWord(int value) {\n String nextWord = \"\";\n boolean found = false;\n\n for (MainNode n = mainList; n != null && !found; n = n.mainNext) {\n //System.out.println(\"wordCount: \" + n.wordCount);\n if (n.wordCount >= value) {\n nextWord = n.input;\n }\n }\n\n return nextWord;\n }", "public void reduce(Text key, Iterable<Text> docPaths, Context context) throws IOException, InterruptedException {\n HashMap<Text, Integer> map = new HashMap<Text, Integer>();\n for (Text docPath : docPaths) {\n String[] tokens = docPath.toString().split(\"/\");\n String path = tokens[tokens.length - 1];\n if (map.containsKey(new Text(key.toString() + \"\\t\" + path))) {\n Integer frequency = map.get(new Text(key.toString() + \"\\t\" + path));\n map.put(new Text(key.toString() + \"\\t\" + path), frequency + 1);\n } else {\n map.put(new Text(key.toString() + \"\\t\" + path), 1);\n }\n }\n\n // Iterate through and write the results to the context (docId, wordcount)\n map.forEach((Text k, Integer v) -> {\n try {\n context.write(k, new IntWritable(v));\n } catch (Exception e) {\n System.out.println(\"Error: Reducer write failed\");\n }\n });\n }", "@Override\n\t\tpublic void flatMap(String value, Collector<Tuple2<Cell, Integer>> out) {\n\t\t\tString[] tokens = value.split(\"\\\\s+\");\n//\t\t\tSystem.out.println(\"token0 \" + tokens[0]);\n//\t\t\tSystem.out.println(\"token1 \" + tokens[1]);\n\t\t\tout.collect(new Tuple2<Cell, Integer>( new Cell(Long.parseLong(tokens[0]),Long.parseLong(tokens[1])), 0));\n\t\t}", "public void reduce(IntWritable key, Iterable<Text> values, Context output)\n throws IOException, InterruptedException {\n \tdouble min=999;double max=0;\n for(Text value:values)\n {\n\tString s[]=value.toString().split(\"\\t\");\n\tdouble n=Double.parseDouble(s[1]);\n\tif(min>n)min=n;\n\tif(max<n)max=n;\n\tver[key.get()][0]=min;\n\tver[key.get()][1]=max;\n\toutput.write(key, value);\n }\n // vertices++;\n }", "public Word (String word){\n this.word = word;\n count = 0;\n }", "@Test\n\tpublic void testReducer() {\n\n\t\tList<Text> values = new ArrayList<Text>();\n\t\tvalues.add(new Text(\"1745.09564282 5218.86073424\"));\n\n\t\t/*\n\t\t * For this test, the reducer's input will be \"cat 1 1\".\n\t\t */\n\t\treduceDriver.withInput(new Text(\"Sweden\"), values);\n\n\t\t/*\n\t\t * The expected output is \"cat 2\"\n\t\t */\n\t\treduceDriver.withOutput(new Text(\"(Sweden)\"), new Text(\"| in 2011$ values PPP, 1995 health cost: 1745.1| 2014 health cost: 5218.86| cost increase (%): 199.06%\\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\"));\n\n\t\t/*\n\t\t * Run the test.\n\t\t */\n\t\treduceDriver.runTest();\n\t}", "int writerIndex();", "public void map(Object key, Text value, Context context) throws IOException, InterruptedException {\n\t\tMap<String, Integer> map = getMap();\r\n\r\n\t\t/*\r\n\t\t * The string tokenizer class allows an application to break a string into\r\n\t\t * tokens A token is nothing but a line in file\r\n\t\t */\r\n\t\tStringTokenizer split = new StringTokenizer(value.toString());\r\n\r\n\t\t/*\r\n\t\t * Tests if there are more tokens available from this tokenizer's string. If\r\n\t\t * this method returns true, then a subsequent call to nextToken with no\r\n\t\t * argument will successfully return a token.\r\n\t\t */\r\n\ttry {\r\n\t\twhile (split.hasMoreTokens())\r\n\r\n\t\t{\r\n\t\t\t// gives the next token from this string tokenizer\r\n\t\t\t//String token = itr.nextToken();\r\n\t\t\tString ntoken = split.nextToken();\r\n\t\t\tif (map.containsKey(ntoken))// true if this map has a mapping for the specified key\r\n\t\t\t{\r\n\t\t\t\tint sum = map.get(ntoken) + 1;\r\n\t\t\t\tmap.put(ntoken, sum);\r\n\t\t\t} else {\r\n\t\t\t\tmap.put(ntoken, 1);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tcatch(Exception e)\r\n\t{\r\n\t\t\r\n\t}\r\n\t}", "public void map(Long key, Text value, MapContext<LongWritable, Text, Text, Text> context) throws IOException, InterruptedException{\n//\t\t String line = value.toString();\n//\t\t String[] tokens = line.split(\" \");\n//\t\t ip.set(tokens[0]);\n\t\t context.write(new Text(String.valueOf(key)), value);\t\n\t }", "@Override\n protected void reduce(IntWritable key, Iterable<Text> values, Context context)\n throws IOException, InterruptedException {\n\n ArrayList<Double> allX = new ArrayList<Double>();\n ArrayList<Double> allY = new ArrayList<Double>();\n\n int cnt = 0;\n double sumX = 0;\n double sumY = 0;\n for (Text value : values) {\n cnt += 1;\n\n String[] splitted = value.toString().trim().split(\"\\t\");\n double x = Double.parseDouble(splitted[0]);\n double y = Double.parseDouble(splitted[1]);\n\n allX.add(x);\n allY.add(y);\n\n sumX += x;\n sumY += y;\n }\n\n double averageX = sumX / cnt;\n String averageStrX = String.format(\"%10.2f\", averageX);\n double averageY = sumY / cnt;\n String averageStrY = String.format(\"%10.2f\", averageY);\n\n double dX = calculateDisp(allX, averageX, cnt);\n String dStrX = String.format(\"%10.2f\", dX);\n\n double dY = calculateDisp(allY, averageY, cnt);\n String dStrY = String.format(\"%10.2f\", dY);\n\n context.write(key, new Text(averageStrX + \"\\t\" + averageStrY + \"\\t\" + dStrX + \"\\t\" + dStrY));\n }", "@Override\n protected void map(Text key, Text value, Context context) throws IOException, InterruptedException {\n int runCount = context.getConfiguration().getInt(\"runCount\", 1);\n\n String page = key.toString();\n\n Node node = null;\n if (runCount == 1) {\n node = Node.formatNode(\"1.0\" , value.toString());\n } else {\n node = Node.formatNode(value.toString());\n }\n context.write(new Text(page), new Text(node.toString()));\n if(node.constainsAdjances()){\n double outValue = node.getPageRank() / node.getAdjacentNodeNames().length;\n\n for (String adjacentNodeName : node.getAdjacentNodeNames()) {\n// System.out.println(\"--------------------\"+ adjacentNodeName +\"------\" +outValue);\n\n context.write(new Text(adjacentNodeName),new Text(outValue + \"\"));\n }\n }\n }" ]
[ "0.6917199", "0.6596081", "0.6511764", "0.64990205", "0.6446177", "0.6332021", "0.6265991", "0.620342", "0.61492807", "0.61456865", "0.61210394", "0.6028836", "0.5917623", "0.58879375", "0.5871385", "0.58608073", "0.5822438", "0.5813997", "0.58063525", "0.5797397", "0.5795086", "0.5761284", "0.57545733", "0.566358", "0.565848", "0.56568474", "0.5653067", "0.5652263", "0.5642533", "0.5592755", "0.55745554", "0.5573404", "0.5568093", "0.5566022", "0.55643964", "0.5531407", "0.5500171", "0.5498888", "0.54747856", "0.5427827", "0.5405662", "0.54042417", "0.5390777", "0.5379769", "0.5373568", "0.53703445", "0.53680027", "0.5362494", "0.5353967", "0.5337812", "0.53263885", "0.5275359", "0.52744913", "0.5270444", "0.52628344", "0.5253109", "0.52402306", "0.5227462", "0.5227084", "0.5215073", "0.52034974", "0.52005416", "0.5198395", "0.51772964", "0.5159204", "0.5148945", "0.5118916", "0.51065654", "0.50917923", "0.505899", "0.5044494", "0.5039067", "0.50184774", "0.5005271", "0.49943548", "0.4993418", "0.49927652", "0.49920595", "0.4990486", "0.4988707", "0.4977054", "0.49463603", "0.49402347", "0.4936983", "0.49323124", "0.492405", "0.492007", "0.48965156", "0.48931155", "0.48676443", "0.48642623", "0.4858874", "0.48577863", "0.48308095", "0.4828407", "0.48252258", "0.48178098", "0.4804214", "0.4798539", "0.4796971", "0.47938135" ]
0.0
-1
Constructs a mult by given expressions.
public Mult(Expression left, Expression right) { super(left, right); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Expression multExpression() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tExpression e0 = powerExpression();\r\n\t\twhile(isKind(OP_TIMES, OP_DIV, OP_MOD)) {\r\n\t\t\tToken op = consume();\r\n\t\t\tExpression e1 = powerExpression();\r\n\t\t\te0 = new ExpressionBinary(first,e0,op,e1);\r\n\t\t}\r\n\t\treturn e0;\r\n\t}", "private Expr mult(Expr x) throws Err {\n if (x instanceof ExprUnary) {\n ExprUnary y=(ExprUnary)x;\n if (y.op==ExprUnary.Op.SOME) return ExprUnary.Op.SOMEOF.make(y.pos, y.sub);\n if (y.op==ExprUnary.Op.LONE) return ExprUnary.Op.LONEOF.make(y.pos, y.sub);\n if (y.op==ExprUnary.Op.ONE) return ExprUnary.Op.ONEOF.make(y.pos, y.sub);\n }\n return x;\n }", "Multiply createMultiply();", "public final VecMathParser.expr_return expr() throws RecognitionException {\n VecMathParser.expr_return retval = new VecMathParser.expr_return();\n retval.start = input.LT(1);\n\n Object root_0 = null;\n\n Token char_literal8=null;\n VecMathParser.multExpr_return multExpr7 = null;\n\n VecMathParser.multExpr_return multExpr9 = null;\n\n\n Object char_literal8_tree=null;\n\n try {\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:15:5: ( multExpr ( '+' multExpr )* )\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:15:7: multExpr ( '+' multExpr )*\n {\n root_0 = (Object)adaptor.nil();\n\n pushFollow(FOLLOW_multExpr_in_expr117);\n multExpr7=multExpr();\n\n state._fsp--;\n\n adaptor.addChild(root_0, multExpr7.getTree());\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:15:16: ( '+' multExpr )*\n loop3:\n do {\n int alt3=2;\n int LA3_0 = input.LA(1);\n\n if ( (LA3_0==10) ) {\n alt3=1;\n }\n\n\n switch (alt3) {\n \tcase 1 :\n \t // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:15:17: '+' multExpr\n \t {\n \t char_literal8=(Token)match(input,10,FOLLOW_10_in_expr120); \n \t char_literal8_tree = (Object)adaptor.create(char_literal8);\n \t root_0 = (Object)adaptor.becomeRoot(char_literal8_tree, root_0);\n\n \t pushFollow(FOLLOW_multExpr_in_expr123);\n \t multExpr9=multExpr();\n\n \t state._fsp--;\n\n \t adaptor.addChild(root_0, multExpr9.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop3;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (Object)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "public Mult(String left, Expression right) {\n super(left, right);\n }", "public Mult(Expression left, double right) {\n super(left, right);\n }", "public Mult(double left, Expression right) {\n super(left, right);\n }", "public Mult(Expression left, String right) {\n super(left, right);\n }", "void visit(MultiplicationExpression expression);", "public BinMltLinExpr multiply(BinLinExpr expr) {\n\t\t\n\t\tBinMltLinExpr result = new BinMltLinExpr();\n\t\t\n\t\t// Multiply variables together\n\t\tfor (int i = 0; i < expr.vars.size(); i++) {\n\t\t\tfor (int j = 0; j < termVars.size(); j++) {\n\t\t\t\t\n\t\t\t\tdouble newCoeff = expr.coefficients.get(i) * coefficients.get(j);\n\t\t\t\tList<BinVar> newVars = new ArrayList<BinVar>();\n\t\t\t\tnewVars.add(expr.vars.get(i));\n\t\t\t\tnewVars.addAll(termVars.get(j));\n\t\t\t\t\n\t\t\t\tresult.addTerm(newCoeff, newVars);\n\t\t\t}\n\t\t}\n\n\t\t// Multiply variables with constants\n\t\tfor (int i = 0; i < termVars.size(); i++) {\n\t\t\tdouble newCoeff = coefficients.get(i) * expr.constant;\n\t\t\tresult.addTerm(newCoeff, termVars.get(i));\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < expr.vars.size(); i++) {\n\t\t\tdouble newCoeff = expr.coefficients.get(i) * constant;\n\t\t\tresult.addTerm(newCoeff, expr.vars.get(i));\n\t\t}\n\t\t\n\t\tresult.addConstant(constant*expr.constant);\n\t\t\n\t\treturn result;\n\t}", "public void enfoncerMult() {\n\t\ttry {\n\t\t\tthis.op = new Mult();\n\t\t\tif (!raz) {\n\t\t\t\tthis.pile.push(valC);\n\t\t\t}\n\t\t\tint a = this.pile.pop(); int b = this.pile.pop();\n\t\t\tthis.valC = this.op.eval(b,a);\n\t\t\tthis.pile.push(this.valC);\n\t\t\tthis.raz = true;\n\t\t}\n\t\tcatch (EmptyStackException e) {\n\t\t\tSystem.out.println(\"Erreur de syntaxe : Saisir deux operandes avant de saisir un operateur\");\n\t\t}\n\t}", "public Transformation mult(Transformation a) {\n\t\tTransformation result = new Transformation();\n\t\tsuper.mult(a, result);\n\t\treturn result;\n\t}", "@Override\n public Expression assign(String var, Expression expression) {\n Expression left = super.getLeft();\n Expression right = super.getRight();\n return new Mult(left.assign(var, expression), right.assign(var, expression));\n }", "private void mul() {\n\n\t}", "public void multiply() {\n\t\t\n\t}", "public static double multi() {\n System.out.println(\"Enter multiplier\");\n double a = getNumber();\n System.out.println(\"Enter multiplicand\");\n double b = getNumber();\n\n return a * b;\n }", "@SuppressWarnings(\"unchecked\")\n @Override\n public Expression asExpression(Rule rule, Deque<Value<Expression>> args) {\n if (args.size() == 1) {\n // a single term is not a product\n return args.pollFirst().getTarget();\n } else {\n // assume x to be *x, because the product will start by 1*x\n Term<Multiplicative> factor = new Term<>(Multiplicative.MULT, args.removeFirst().getTarget());\n List<Term<Multiplicative>> arguments = new LinkedList<>();\n arguments.add(factor);\n args.stream()\n // next arguments are all Term<Multiplicative>\n .map(v -> (Term<Multiplicative>) v.getTarget())\n .forEachOrdered(arguments::add);\n return new Product(arguments);\n }\n }", "public static void main(String[] args) throws Exception {\r\n Expression e = new Plus(new Mult(2, \"x\"), new Plus(new Sin(new Mult(4, \"y\")), new Pow(\"e\", \"x\")));\r\n System.out.println(e);\r\n Map<String, Double> assignment = new TreeMap<String, Double>();\r\n assignment.put(\"x\", 2.0);\r\n assignment.put(\"y\", 0.25);\r\n assignment.put(\"e\", 2.71);\r\n System.out.println(e.evaluate(assignment));\r\n e = e.differentiate(\"x\");\r\n System.out.println(e);\r\n System.out.println(e.evaluate(assignment));\r\n System.out.println(e.simplify());\r\n System.out.println(e);\r\n }", "public BinMltLinExpr multiply(BinMltLinExpr expr) {\n\t\t\n\t\tBinMltLinExpr result = new BinMltLinExpr();\n\t\t\n\t\t// Multiply variables together\n\t\tfor (int i = 0; i < expr.termVars.size(); i++) {\n\t\t\tfor (int j = 0; j < termVars.size(); j++) {\n\t\t\t\t\n\t\t\t\tdouble newCoeff = expr.coefficients.get(i) * coefficients.get(j);\n\t\t\t\tList<BinVar> newVars = new ArrayList<BinVar>();\n\t\t\t\tnewVars.addAll(expr.termVars.get(i));\n\t\t\t\tnewVars.addAll(termVars.get(j));\n\t\t\t\t\n\t\t\t\tresult.addTerm(newCoeff, newVars);\n\t\t\t}\n\t\t}\n\n\t\t// Multiply variables with constants\n\t\tfor (int i = 0; i < termVars.size(); i++) {\n\t\t\tdouble newCoeff = coefficients.get(i) * expr.constant;\n\t\t\tresult.addTerm(newCoeff, termVars.get(i));\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < expr.termVars.size(); i++) {\n\t\t\tdouble newCoeff = expr.coefficients.get(i) * constant;\n\t\t\tresult.addTerm(newCoeff, expr.termVars.get(i));\n\t\t}\n\t\t\n\t\tresult.addConstant(constant*expr.constant);\n\t\t\n\t\treturn result;\n\t}", "public final VecMathParser.multExpr_return multExpr() throws RecognitionException {\n VecMathParser.multExpr_return retval = new VecMathParser.multExpr_return();\n retval.start = input.LT(1);\n\n Object root_0 = null;\n\n Token char_literal11=null;\n Token char_literal12=null;\n VecMathParser.primary_return primary10 = null;\n\n VecMathParser.primary_return primary13 = null;\n\n\n Object char_literal11_tree=null;\n Object char_literal12_tree=null;\n\n try {\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:5: ( primary ( ( '*' | '.' ) primary )* )\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:9: primary ( ( '*' | '.' ) primary )*\n {\n root_0 = (Object)adaptor.nil();\n\n pushFollow(FOLLOW_primary_in_multExpr145);\n primary10=primary();\n\n state._fsp--;\n\n adaptor.addChild(root_0, primary10.getTree());\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:17: ( ( '*' | '.' ) primary )*\n loop5:\n do {\n int alt5=2;\n int LA5_0 = input.LA(1);\n\n if ( ((LA5_0>=11 && LA5_0<=12)) ) {\n alt5=1;\n }\n\n\n switch (alt5) {\n \tcase 1 :\n \t // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:18: ( '*' | '.' ) primary\n \t {\n \t // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:18: ( '*' | '.' )\n \t int alt4=2;\n \t int LA4_0 = input.LA(1);\n\n \t if ( (LA4_0==11) ) {\n \t alt4=1;\n \t }\n \t else if ( (LA4_0==12) ) {\n \t alt4=2;\n \t }\n \t else {\n \t NoViableAltException nvae =\n \t new NoViableAltException(\"\", 4, 0, input);\n\n \t throw nvae;\n \t }\n \t switch (alt4) {\n \t case 1 :\n \t // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:19: '*'\n \t {\n \t char_literal11=(Token)match(input,11,FOLLOW_11_in_multExpr149); \n \t char_literal11_tree = (Object)adaptor.create(char_literal11);\n \t root_0 = (Object)adaptor.becomeRoot(char_literal11_tree, root_0);\n\n\n \t }\n \t break;\n \t case 2 :\n \t // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:24: '.'\n \t {\n \t char_literal12=(Token)match(input,12,FOLLOW_12_in_multExpr152); \n \t char_literal12_tree = (Object)adaptor.create(char_literal12);\n \t root_0 = (Object)adaptor.becomeRoot(char_literal12_tree, root_0);\n\n\n \t }\n \t break;\n\n \t }\n\n \t pushFollow(FOLLOW_primary_in_multExpr156);\n \t primary13=primary();\n\n \t state._fsp--;\n\n \t adaptor.addChild(root_0, primary13.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop5;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (Object)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "@Override\n\tpublic void visit(MultiplyNode node) {\n\t\tif (Evaluator.checkScope(node) == false) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (Evaluator.checkAssert(node) == false) {\n\t\t\treturn;\n\t\t}\n\n\t\t/**\n\t\t * evaluam cei doi fii\n\t\t */\n\t\tEvaluator.evaluate(node.getChild(0));\n\t\tEvaluator.evaluate(node.getChild(1));\n\n\t\tInteger i, j;\n\t\t/**\n\t\t * salvam si inmultim valorile rezulate in urma evaluarii celor 2 fii si\n\t\t * setam valoarea corespunzatoare in nodul curent\n\t\t */\n\t\tif (node.getChild(1) instanceof Variable) {\n\t\t\ti = Integer.parseInt(Evaluator.variables.get(node.getChild(1).getName()));\n\n\t\t} else {\n\t\t\ti = Integer.parseInt(node.getChild(1).getName());\n\t\t}\n\n\t\tif (node.getChild(0) instanceof Variable) {\n\t\t\tj = Integer.parseInt(Evaluator.variables.get(node.getChild(0).getName()));\n\n\t\t} else {\n\t\t\tj = Integer.parseInt(node.getChild(0).getName());\n\t\t}\n\n\t\tInteger n = i * j;\n\n\t\tnode.setName(n.toString());\n\t}", "static Double executeMultiplication(List<Double> operands) {\n Double result = null;\n for (Double operand : operands) {\n if (Objects.isNull(result)) {\n result = operand;\n }\n else {\n result = result * operand;\n }\n }\n return result;\n }", "public Polynomial visit(ProductExpression expression) {\n return Polynomial.multiply(\n expression.getLeft().accept(this),\n expression.getRight().accept(this));\n }", "BaseNumber multiply(BaseNumber operand);", "public final Expr multExpr() throws RecognitionException {\n\t\tExpr e = null;\n\n\n\t\tToken STAR15=null;\n\t\tExpr e1 =null;\n\t\tExpr e2 =null;\n\n\n\t\t\t\tExpr it = null;\n\t\t\t\n\t\ttry {\n\t\t\t// ul.g:189:3: (e1= atom ( STAR e2= atom )* )\n\t\t\t// ul.g:190:2: e1= atom ( STAR e2= atom )*\n\t\t\t{\n\t\t\tpushFollow(FOLLOW_atom_in_multExpr768);\n\t\t\te1=atom();\n\t\t\tstate._fsp--;\n\t\t\tif (state.failed) return e;\n\t\t\tif ( state.backtracking==0 ) {it = e1;}\n\t\t\t// ul.g:191:2: ( STAR e2= atom )*\n\t\t\tloop15:\n\t\t\twhile (true) {\n\t\t\t\tint alt15=2;\n\t\t\t\tint LA15_0 = input.LA(1);\n\t\t\t\tif ( (LA15_0==STAR) ) {\n\t\t\t\t\talt15=1;\n\t\t\t\t}\n\n\t\t\t\tswitch (alt15) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// ul.g:191:4: STAR e2= atom\n\t\t\t\t\t{\n\t\t\t\t\tSTAR15=(Token)match(input,STAR,FOLLOW_STAR_in_multExpr775); if (state.failed) return e;\n\t\t\t\t\tpushFollow(FOLLOW_atom_in_multExpr781);\n\t\t\t\t\te2=atom();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return e;\n\t\t\t\t\tif ( state.backtracking==0 ) {it = new MultExpr(it, e2, (STAR15!=null?STAR15.getLine():0), STAR15.getCharPositionInLine());}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault :\n\t\t\t\t\tbreak loop15;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( state.backtracking==0 ) {\n\t\t\t\t\te = it;\n\t\t\t\t}\n\t\t}\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\trecover(input,re);\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn e;\n\t}", "public T mul(T first, T second);", "public final double expr() throws RecognitionException {\n double value = 0.0;\n\n\n double e =0.0;\n\n\n try {\n // ExprInterp.g:24:5: (e= multExpr ( '+' e= multExpr | '-' e= multExpr )* |e= maxF )\n int alt4=2;\n int LA4_0 = input.LA(1);\n\n if ( ((LA4_0 >= ID && LA4_0 <= LEFTP)||LA4_0==REL) ) {\n alt4=1;\n }\n else if ( (LA4_0==MAXI) ) {\n alt4=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 4, 0, input);\n\n throw nvae;\n\n }\n switch (alt4) {\n case 1 :\n // ExprInterp.g:24:9: e= multExpr ( '+' e= multExpr | '-' e= multExpr )*\n {\n pushFollow(FOLLOW_multExpr_in_expr155);\n e=multExpr();\n\n state._fsp--;\n\n\n value = e;\n\n // ExprInterp.g:25:9: ( '+' e= multExpr | '-' e= multExpr )*\n loop3:\n do {\n int alt3=3;\n int LA3_0 = input.LA(1);\n\n if ( (LA3_0==13) ) {\n alt3=1;\n }\n else if ( (LA3_0==15) ) {\n alt3=2;\n }\n\n\n switch (alt3) {\n \tcase 1 :\n \t // ExprInterp.g:25:13: '+' e= multExpr\n \t {\n \t match(input,13,FOLLOW_13_in_expr171); \n\n \t pushFollow(FOLLOW_multExpr_in_expr175);\n \t e=multExpr();\n\n \t state._fsp--;\n\n\n \t value += e;\n\n \t }\n \t break;\n \tcase 2 :\n \t // ExprInterp.g:26:13: '-' e= multExpr\n \t {\n \t match(input,15,FOLLOW_15_in_expr191); \n\n \t pushFollow(FOLLOW_multExpr_in_expr195);\n \t e=multExpr();\n\n \t state._fsp--;\n\n\n \t value -= e;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop3;\n }\n } while (true);\n\n\n }\n break;\n case 2 :\n // ExprInterp.g:28:8: e= maxF\n {\n pushFollow(FOLLOW_maxF_in_expr221);\n e=maxF();\n\n state._fsp--;\n\n\n value = e;\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n\n finally {\n \t// do for sure before leaving\n }\n return value;\n }", "public final void mul() {\n\t\tif (size > 1) {\n\n\t\t\tdouble topMostValue = pop();\n\t\t\tdouble secondTopMostValue = pop();\n\t\t\tpush(secondTopMostValue * topMostValue);\n\t\t}\n\t}", "public Mult(String left, double right) {\n super(left, right);\n }", "public static Transform mult(Transform t1, Transform t2) {\n\t\treturn transpose(t1.a * t2.a + t1.c * t2.b, t1.a * t2.c + t1.c * t2.d, t1.a * t2.tx + t1.c * t2.ty + t1.tx,\n\t\t\t\t\t\t t1.b * t2.a + t1.d * t2.b, t1.b * t2.c + t1.d * t2.d, t1.b * t2.tx + t1.d * t2.ty + t1.ty);\n\t}", "private void multiplication()\n\t{\n\t\tFun = Function.MULTIPLY; //Function set to determine what action should be taken later.\n\t\t\n\t\t\tsetLeftValue();\n\t\t\tentry.grabFocus();\n\t\t\n\t}", "public int mult()\r\n\t{\r\n\t\tint a=10;\r\n\t\tint b=20;\r\n\t\tint c = a*b;\r\n\t\treturn(c);\r\n\t}", "public Object visitMultiplicativeExpression(GNode n) {\n Object a, b, result;\n String op;\n \n nonboolean = true;\n \n dostring = true;\n \n a = dispatch(n.getGeneric(0));\n b = dispatch(n.getGeneric(2));\n op = n.getString(1);\n \n dostring = false;\n \n if (a instanceof Long && b instanceof Long) {\n if ((op.equals(\"/\")\n || op.equals(\"%\")) && ((Long) b).equals(new Long(0))) {\n System.err.println(\"division by zero in #if\");\n result = new Long(0);\n }\n if (op.equals(\"*\")) {\n result = (Long) a * (Long) b;\n }\n else if (op.equals(\"/\")) {\n result = (Long) a / (Long) b;\n }\n else if (op.equals(\"%\")) {\n result = (Long) a % (Long) b;\n }\n else {\n result = \"\";\n }\n }\n else {\n result = parens(a) + \" \" + op + \" \" + parens(b);\n }\n \n return result;\n }", "public static BinaryExpression multiply(Expression expression0, Expression expression1) {\n return makeBinary(ExpressionType.Multiply, expression0, expression1);\n }", "public T elementMult( T b ) {\n convertType.specify(this, b);\n T A = convertType.convert(this);\n b = convertType.convert(b);\n\n T c = A.createLike();\n A.ops.elementMult(A.mat, b.mat, c.mat);\n return c;\n }", "public final expressionParser.add_return add() throws RecognitionException {\n expressionParser.add_return retval = new expressionParser.add_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n Token char_literal38=null;\n Token char_literal39=null;\n expressionParser.mult_return mult37 = null;\n\n expressionParser.mult_return mult40 = null;\n\n\n CommonTree char_literal38_tree=null;\n CommonTree char_literal39_tree=null;\n\n try {\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:3: ( mult ( ( '+' | '-' ) mult )* )\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:5: mult ( ( '+' | '-' ) mult )*\n {\n root_0 = (CommonTree)adaptor.nil();\n\n pushFollow(FOLLOW_mult_in_add424);\n mult37=mult();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, mult37.getTree());\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:10: ( ( '+' | '-' ) mult )*\n loop17:\n do {\n int alt17=2;\n alt17 = dfa17.predict(input);\n switch (alt17) {\n \tcase 1 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:11: ( '+' | '-' ) mult\n \t {\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:11: ( '+' | '-' )\n \t int alt16=2;\n \t int LA16_0 = input.LA(1);\n\n \t if ( (LA16_0==46) ) {\n \t alt16=1;\n \t }\n \t else if ( (LA16_0==47) ) {\n \t alt16=2;\n \t }\n \t else {\n \t if (state.backtracking>0) {state.failed=true; return retval;}\n \t NoViableAltException nvae =\n \t new NoViableAltException(\"\", 16, 0, input);\n\n \t throw nvae;\n \t }\n \t switch (alt16) {\n \t case 1 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:12: '+'\n \t {\n \t char_literal38=(Token)match(input,46,FOLLOW_46_in_add428); if (state.failed) return retval;\n \t if ( state.backtracking==0 ) {\n \t char_literal38_tree = (CommonTree)adaptor.create(char_literal38);\n \t root_0 = (CommonTree)adaptor.becomeRoot(char_literal38_tree, root_0);\n \t }\n\n \t }\n \t break;\n \t case 2 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:19: '-'\n \t {\n \t char_literal39=(Token)match(input,47,FOLLOW_47_in_add433); if (state.failed) return retval;\n \t if ( state.backtracking==0 ) {\n \t char_literal39_tree = (CommonTree)adaptor.create(char_literal39);\n \t root_0 = (CommonTree)adaptor.becomeRoot(char_literal39_tree, root_0);\n \t }\n\n \t }\n \t break;\n\n \t }\n\n \t pushFollow(FOLLOW_mult_in_add437);\n \t mult40=mult();\n\n \t state._fsp--;\n \t if (state.failed) return retval;\n \t if ( state.backtracking==0 ) adaptor.addChild(root_0, mult40.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop17;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "public Double eval(Double... operands);", "public Mult(double left, String right) {\n super(left, right);\n }", "public <V extends Number> FluentExp<V> times (SQLExpression<V> expr)\n {\n return new Mul<V>(this, expr);\n }", "public static MathNode create(List<MathNode> nodes) {\n return new PowerNode(nodes);\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"MULT\";\n\t}", "NumericExpression createNumericExpression();", "abstract void mulS();", "public final expressionParser.mult_return mult() throws RecognitionException {\n expressionParser.mult_return retval = new expressionParser.mult_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n Token char_literal42=null;\n Token char_literal43=null;\n expressionParser.unary_return unary41 = null;\n\n expressionParser.unary_return unary44 = null;\n\n\n CommonTree char_literal42_tree=null;\n CommonTree char_literal43_tree=null;\n\n try {\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:3: ( unary ( ( '*' | '/' ) unary )* )\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:5: unary ( ( '*' | '/' ) unary )*\n {\n root_0 = (CommonTree)adaptor.nil();\n\n pushFollow(FOLLOW_unary_in_mult454);\n unary41=unary();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, unary41.getTree());\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:11: ( ( '*' | '/' ) unary )*\n loop19:\n do {\n int alt19=2;\n int LA19_0 = input.LA(1);\n\n if ( ((LA19_0>=48 && LA19_0<=49)) ) {\n alt19=1;\n }\n\n\n switch (alt19) {\n \tcase 1 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:12: ( '*' | '/' ) unary\n \t {\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:12: ( '*' | '/' )\n \t int alt18=2;\n \t int LA18_0 = input.LA(1);\n\n \t if ( (LA18_0==48) ) {\n \t alt18=1;\n \t }\n \t else if ( (LA18_0==49) ) {\n \t alt18=2;\n \t }\n \t else {\n \t if (state.backtracking>0) {state.failed=true; return retval;}\n \t NoViableAltException nvae =\n \t new NoViableAltException(\"\", 18, 0, input);\n\n \t throw nvae;\n \t }\n \t switch (alt18) {\n \t case 1 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:13: '*'\n \t {\n \t char_literal42=(Token)match(input,48,FOLLOW_48_in_mult458); if (state.failed) return retval;\n \t if ( state.backtracking==0 ) {\n \t char_literal42_tree = (CommonTree)adaptor.create(char_literal42);\n \t root_0 = (CommonTree)adaptor.becomeRoot(char_literal42_tree, root_0);\n \t }\n\n \t }\n \t break;\n \t case 2 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:20: '/'\n \t {\n \t char_literal43=(Token)match(input,49,FOLLOW_49_in_mult463); if (state.failed) return retval;\n \t if ( state.backtracking==0 ) {\n \t char_literal43_tree = (CommonTree)adaptor.create(char_literal43);\n \t root_0 = (CommonTree)adaptor.becomeRoot(char_literal43_tree, root_0);\n \t }\n\n \t }\n \t break;\n\n \t }\n\n \t pushFollow(FOLLOW_unary_in_mult467);\n \t unary44=unary();\n\n \t state._fsp--;\n \t if (state.failed) return retval;\n \t if ( state.backtracking==0 ) adaptor.addChild(root_0, unary44.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop19;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "public final Expr addExpr() throws RecognitionException {\r\n Expr result = null;\r\n\r\n int addExpr_StartIndex = input.index();\r\n\r\n Token op=null;\r\n Expr lhs =null;\r\n\r\n Expr rhs =null;\r\n\r\n\r\n try {\r\n if ( state.backtracking>0 && alreadyParsedRule(input, 15) ) { return result; }\r\n\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:121:5: (lhs= mulExpr (op= ( '+' | '-' ) rhs= mulExpr )* )\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:121:9: lhs= mulExpr (op= ( '+' | '-' ) rhs= mulExpr )*\r\n {\r\n pushFollow(FOLLOW_mulExpr_in_addExpr674);\r\n lhs=mulExpr();\r\n\r\n state._fsp--;\r\n if (state.failed) return result;\r\n\r\n if ( state.backtracking==0 ) { result =lhs; }\r\n\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:121:46: (op= ( '+' | '-' ) rhs= mulExpr )*\r\n loop10:\r\n do {\r\n int alt10=2;\r\n int LA10_0 = input.LA(1);\r\n\r\n if ( ((LA10_0 >= 24 && LA10_0 <= 25)) ) {\r\n alt10=1;\r\n }\r\n\r\n\r\n switch (alt10) {\r\n \tcase 1 :\r\n \t // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:121:48: op= ( '+' | '-' ) rhs= mulExpr\r\n \t {\r\n \t op=(Token)input.LT(1);\r\n\r\n \t if ( (input.LA(1) >= 24 && input.LA(1) <= 25) ) {\r\n \t input.consume();\r\n \t state.errorRecovery=false;\r\n \t state.failed=false;\r\n \t }\r\n \t else {\r\n \t if (state.backtracking>0) {state.failed=true; return result;}\r\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\r\n \t throw mse;\r\n \t }\r\n\r\n\r\n \t pushFollow(FOLLOW_mulExpr_in_addExpr692);\r\n \t rhs=mulExpr();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return result;\r\n\r\n \t if ( state.backtracking==0 ) { \r\n \t if ((op!=null?op.getText():null).equals(\"+\")) {\r\n \t result = new Add(result, rhs);\r\n \t }\r\n \t if ((op!=null?op.getText():null).equals(\"-\")) {\r\n \t result = new Sub(result, rhs); \r\n \t }\r\n \t }\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop10;\r\n }\r\n } while (true);\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n if ( state.backtracking>0 ) { memoize(input, 15, addExpr_StartIndex); }\r\n\r\n }\r\n return result;\r\n }", "public static double multi(double a, double b) {\n return a * b;\n }", "@Test\n public void testParseMul() {\n System.out.println(\"testParseMul\");\n byte[] expected = {\n Instruction.LV.getId(), 0, 0, 32,\n Instruction.LV.getId(), 0, 0, 36,\n Instruction.MUL.getId(),\n Instruction.LV.getId(), 0, 0, 40,\n Instruction.MUL.getId()\n };\n\n TermParser p = TermParserTestSetup.getMulTermSetup();\n assertEquals(\"Parse\", true, p.parse());\n AssemblerCodeChecker.assertCodeEquals(\"Code \", expected, TermParserTestSetup.getByteCode());\n }", "@Override\n public Expression simplifyMore() {\n Expression left = super.getLeft();\n Expression right = super.getRight();\n\n // x * x -> x^2\n if (left.toString().equals(right.toString())) {\n return new Pow(left, 2);\n }\n\n // ((2.0 * x) * (x * 3.0)) -> 6x^2\n if (left instanceof Mult && right instanceof Mult) {\n if (((Mult) left).getRight().toString().equals(((Mult) right).getLeft().toString())) {\n Expression exp = new Mult(new Mult(((Mult) left).getLeft(), ((Mult) right).getRight()),\n new Mult(((Mult) left).getRight(), ((Mult) right).getLeft()));\n exp.turnBonusOn();\n return exp.simplify();\n }\n }\n\n // 2x * 2x -> 4x^2\n if (left instanceof Mult && right instanceof Mult) {\n if (((Mult) left).getRight().toString().equals(((Mult) right).getRight().toString())) {\n return new Mult(new Mult(((Mult) left).getLeft(), ((Mult) right).getLeft()).simplify(),\n new Pow(((Mult) left).getRight(), 2)).simplify();\n }\n }\n\n // 2x * 2y -> 4xy\n if (left instanceof Mult && right instanceof Mult) {\n return new Mult(new Mult(((Mult) left).getLeft(), ((Mult) right).getLeft()).simplify(),\n new Mult(((Mult) left).getRight(), ((Mult) right).getRight())).simplify();\n }\n\n // sin(x) * cos(x) -> 0.5 * sin(2x)\n if (right instanceof Sin && left instanceof Cos) {\n Expression exp = new Mult(0.5, new Sin(new Mult(2, ((Sin) right).getExpression())));\n exp.turnBonusOn();\n return exp.simplify();\n }\n\n // cos(x) * sin(x) -> 0.5 * sin(2x)\n if (right instanceof Cos && left instanceof Sin) {\n Expression exp = new Sin(new Mult(2, ((Cos) right).getExpression()));\n exp.turnBonusOn();\n return exp.simplify();\n }\n\n // log(x, y) * 2 -> 2 * log(x, y)\n if (left instanceof Sin || left instanceof Cos || left instanceof Log) {\n Expression exp = new Mult(right, left);\n exp.turnBonusOn();\n return exp.simplify();\n }\n\n // x^2 * x^3 -> x^5\n if (left instanceof Pow && right instanceof Pow) {\n if (((Pow) left).getLeft().toString().equals(((Pow) right).getLeft().toString())) {\n Expression exp = new Pow(((Pow) left).getLeft(),\n new Plus(((Pow) left).getRight(), ((Pow) right).getRight()));\n exp.turnBonusOn();\n return exp.simplify();\n }\n }\n\n // x^2 * x -> x^3\n if (left instanceof Pow) {\n if (((Pow) left).getLeft().toString().equals(right.toString())) {\n Expression exp = new Pow(((Pow) left).getLeft(), new Plus(((Pow) left).getRight(), 1));\n exp.turnBonusOn();\n return exp.simplify();\n }\n }\n\n return this;\n }", "IVec3 mult(IVec3 v);", "private Term parseMul(final boolean required) throws ParseException {\n Term t1 = parseUnary(required);\n while (t1 != null) {\n int tt = _tokenizer.next();\n if (tt == '*') {\n Term t2 = parseUnary(true);\n if (t1.isD() && t2.isN() || t1.isN() && t2.isD()) {\n t1 = new Term.Mul(Term.TYPE_D, t1, t2);\n } else if (t1.isI() && t2.isI()) {\n t1 = new Term.Mul(Term.TYPE_I, t1, t2);\n } else if (!isTypeChecking()) {\n t1 = new Term.Mul(t1.isD() || t2.isD() ? Term.TYPE_D : Term.TYPE_I, t1, t2);\n } else {\n reportTypeErrorN2(\"'*'\");\n }\n } else if (tt == '/') {\n Term t2 = parseUnary(true);\n if (t1.isD() && t2.isN() || t1.isN() && t2.isD()) {\n t1 = new Term.Div(Term.TYPE_D, t1, t2);\n } else if (t1.isI() && t2.isI()) {\n t1 = new Term.Div(Term.TYPE_I, t1, t2);\n } else if (!isTypeChecking()) {\n t1 = new Term.Div(t1.isD() || t2.isD() ? Term.TYPE_D : Term.TYPE_I, t1, t2);\n } else {\n reportTypeErrorN2(\"'/'\");\n }\n } else if (tt == '%') {\n Term t2 = parseUnary(true);\n if (t1.isD() && t2.isN() || t1.isN() && t2.isD()) {\n t1 = new Term.Mod(Term.TYPE_D, t1, t2);\n } else if (t1.isI() && t2.isI()) {\n t1 = new Term.Mod(Term.TYPE_I, t1, t2);\n } else if (!isTypeChecking()) {\n t1 = new Term.Mod(t1.isD() || t2.isD() ? Term.TYPE_D : Term.TYPE_I, t1, t2);\n } else {\n reportTypeErrorN2(\"'%'\");\n }\n } else {\n _tokenizer.pushBack();\n break;\n }\n }\n return t1;\n }", "public void multiply()\r\n {\r\n resultDoubles = Operations.multiply(leftOperand, rightOperand);\r\n resultResetHelper();\r\n }", "public Mult(String left, String right) {\n super(left, right);\n }", "public Mult(double left, double right) {\n super(left, right);\n }", "public Multiplication(Expression l, Expression r) {\n\tleft = l;\n\tright = r;\n }", "public AncientEgyptianMultiplication( ) {\r\n }", "abstract int multiplication(int num1, int num2);", "public void testMultiply() {\r\n System.out.println(\"Multiply\");\r\n Double [][] n = new Double[][]{{-3., -2.5, -1., 0., 1., 2., 3.4, 3.5, 1.1E100, -1.1E100}, \r\n {-3., 2.5, 0., 0., 1., -2., 3., 3.7, 1.1E100, 1.1E100}, \r\n {9., -6.25, 0., 0., 1., -4., 10.2, 12.95, 1.21E200, -1.21E200}};\r\n for(int i = 0; i < 10; i++){\r\n Double x = n[0][i];\r\n Double y = n[1][i];\r\n double expResult = n[2][i];\r\n double result = MathOp.Multiply(x, y);\r\n assertEquals(expResult, result, 0.001);\r\n }\r\n }", "public final Expr addExpr() throws RecognitionException {\n\t\tExpr e = null;\n\n\n\t\tToken PLUS13=null;\n\t\tToken MINUS14=null;\n\t\tExpr e1 =null;\n\t\tExpr e2 =null;\n\n\n\t\t\t\tExpr it = null;\n\t\t\t\tBoolean bool = false;\n\t\t\t\tint line = -1;\n\t\t\t\tint offset = -1;\n\t\t\t\n\t\ttry {\n\t\t\t// ul.g:173:2: (e1= multExpr ( ( PLUS | MINUS ) e2= multExpr )* )\n\t\t\t// ul.g:174:3: e1= multExpr ( ( PLUS | MINUS ) e2= multExpr )*\n\t\t\t{\n\t\t\tpushFollow(FOLLOW_multExpr_in_addExpr710);\n\t\t\te1=multExpr();\n\t\t\tstate._fsp--;\n\t\t\tif (state.failed) return e;\n\t\t\tif ( state.backtracking==0 ) {it = e1;}\n\t\t\t// ul.g:175:3: ( ( PLUS | MINUS ) e2= multExpr )*\n\t\t\tloop14:\n\t\t\twhile (true) {\n\t\t\t\tint alt14=2;\n\t\t\t\tint LA14_0 = input.LA(1);\n\t\t\t\tif ( (LA14_0==MINUS||LA14_0==PLUS) ) {\n\t\t\t\t\talt14=1;\n\t\t\t\t}\n\n\t\t\t\tswitch (alt14) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// ul.g:175:4: ( PLUS | MINUS ) e2= multExpr\n\t\t\t\t\t{\n\t\t\t\t\t// ul.g:175:4: ( PLUS | MINUS )\n\t\t\t\t\tint alt13=2;\n\t\t\t\t\tint LA13_0 = input.LA(1);\n\t\t\t\t\tif ( (LA13_0==PLUS) ) {\n\t\t\t\t\t\talt13=1;\n\t\t\t\t\t}\n\t\t\t\t\telse if ( (LA13_0==MINUS) ) {\n\t\t\t\t\t\talt13=2;\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (state.backtracking>0) {state.failed=true; return e;}\n\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\tnew NoViableAltException(\"\", 13, 0, input);\n\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t}\n\n\t\t\t\t\tswitch (alt13) {\n\t\t\t\t\t\tcase 1 :\n\t\t\t\t\t\t\t// ul.g:175:5: PLUS\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tPLUS13=(Token)match(input,PLUS,FOLLOW_PLUS_in_addExpr718); if (state.failed) return e;\n\t\t\t\t\t\t\tif ( state.backtracking==0 ) {line = (PLUS13!=null?PLUS13.getLine():0); offset = PLUS13.getCharPositionInLine();}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2 :\n\t\t\t\t\t\t\t// ul.g:175:70: MINUS\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tMINUS14=(Token)match(input,MINUS,FOLLOW_MINUS_in_addExpr721); if (state.failed) return e;\n\t\t\t\t\t\t\tif ( state.backtracking==0 ) {line = (MINUS14!=null?MINUS14.getLine():0); offset = MINUS14.getCharPositionInLine();}\n\t\t\t\t\t\t\tif ( state.backtracking==0 ) {bool = true;}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tpushFollow(FOLLOW_multExpr_in_addExpr730);\n\t\t\t\t\te2=multExpr();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return e;\n\t\t\t\t\tif ( state.backtracking==0 ) {it = new AddExpr(it, e2, bool, line, offset);}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault :\n\t\t\t\t\tbreak loop14;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( state.backtracking==0 ) {\n\t\t\t\t\te = it;\n\t\t\t\t}\n\t\t}\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\trecover(input,re);\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn e;\n\t}", "@Override\n public Expression differentiate(String var) {\n Expression left = super.getLeft();\n Expression right = super.getRight();\n return new Plus(new Mult(left.differentiate(var), right), new Mult(left, right.differentiate(var)));\n }", "public static void main(String[] args) {\n NumberFact a, b;\n a = new NumberFact(1_000);\n b = new NumberFact(999);\n\n ArithmeticOperator x, y;\n x = new ArithmeticOperator('*', a, b);\n y = new ArithmeticOperator('+', x, b);\n\n System.out.println(y);\n System.out.println(y.eval());\n }", "private void createMul(Code32 code, int op, int cond, int Rd, int Rn, int Rm) {\r\n\t\tcode.instructions[code.iCount] = (cond << 28) | op | (Rd << 16) | (Rm << 8) | (0x9 << 4) | Rn;\r\n\t\tcode.incInstructionNum();\r\n\t}", "public static BinaryExpression multiplyAssign(Expression expression0, Expression expression1) {\n return makeBinary(ExpressionType.MultiplyAssign, expression0, expression1);\n }", "LengthScalarMultiply createLengthScalarMultiply();", "public final CQLParser.multiplicativeExpression_return multiplicativeExpression() throws RecognitionException {\n CQLParser.multiplicativeExpression_return retval = new CQLParser.multiplicativeExpression_return();\n retval.start = input.LT(1);\n\n Object root_0 = null;\n\n Token set100=null;\n CQLParser.powerExpression_return powerExpression99 = null;\n\n CQLParser.powerExpression_return powerExpression101 = null;\n\n\n Object set100_tree=null;\n\n try {\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:404:2: ( powerExpression ( ( MULT | DIV ) powerExpression )* )\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:404:4: powerExpression ( ( MULT | DIV ) powerExpression )*\n {\n root_0 = (Object)adaptor.nil();\n\n pushFollow(FOLLOW_powerExpression_in_multiplicativeExpression1886);\n powerExpression99=powerExpression();\n\n state._fsp--;\n\n adaptor.addChild(root_0, powerExpression99.getTree());\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:404:20: ( ( MULT | DIV ) powerExpression )*\n loop27:\n do {\n int alt27=2;\n int LA27_0 = input.LA(1);\n\n if ( ((LA27_0>=MULT && LA27_0<=DIV)) ) {\n alt27=1;\n }\n\n\n switch (alt27) {\n \tcase 1 :\n \t // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:404:21: ( MULT | DIV ) powerExpression\n \t {\n \t set100=(Token)input.LT(1);\n \t set100=(Token)input.LT(1);\n \t if ( (input.LA(1)>=MULT && input.LA(1)<=DIV) ) {\n \t input.consume();\n \t root_0 = (Object)adaptor.becomeRoot((Object)adaptor.create(set100), root_0);\n \t state.errorRecovery=false;\n \t }\n \t else {\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t throw mse;\n \t }\n\n \t pushFollow(FOLLOW_powerExpression_in_multiplicativeExpression1896);\n \t powerExpression101=powerExpression();\n\n \t state._fsp--;\n\n \t adaptor.addChild(root_0, powerExpression101.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop27;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (Object)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n \t\n \tcatch(RecognitionException re)\n \t{\t\n \t\treportError(re);\n \t\tthrow re;\n \t}\n finally {\n }\n return retval;\n }", "Sum getMultiplier();", "public MathEval() {\r\n super();\r\n\r\n constants=new TreeMap<String,Double>(String.CASE_INSENSITIVE_ORDER);\r\n setConstant(\"E\" ,Math.E);\r\n setConstant(\"Euler\" ,0.577215664901533D);\r\n setConstant(\"LN2\" ,0.693147180559945D);\r\n setConstant(\"LN10\" ,2.302585092994046D);\r\n setConstant(\"LOG2E\" ,1.442695040888963D);\r\n setConstant(\"LOG10E\",0.434294481903252D);\r\n setConstant(\"PHI\" ,1.618033988749895D);\r\n setConstant(\"PI\" ,Math.PI);\r\n\r\n variables=new TreeMap<String,Double>(String.CASE_INSENSITIVE_ORDER);\r\n\r\n functions=new TreeMap<String,FunctionHandler>(String.CASE_INSENSITIVE_ORDER);\r\n\r\n offset=0;\r\n isConstant=false;\r\n }", "private ASTNode binaryMultiplyRules(ASTNode left, ASTNode right) throws Exception {\n Token leftToken = left.getToken();\n Token rightToken = right.getToken();\n\n TokenType leftType = leftToken.getType();\n TokenType rightType = rightToken.getType();\n\n Token tempToken;\n TokenType numType = TokenType.NUMBER;\n TokenType minusType = TokenType.MINUS;\n TokenType mulType = TokenType.MUL;\n\n if (rightToken.getIdentifier().equals(\"0\")){\n //left is anything and right is 0\n tempToken = new Token(numType, \"0\");\n return new Num(tempToken);\n }\n else if (rightToken.getIdentifier().equals(\"1\")){\n //left is anything and right is 1\n return left;\n }\n else if (leftToken.getIdentifier().equals(\"0\")){\n //left is 0 and right is anything\n tempToken = new Token(numType, \"0\");\n return new Num(tempToken);\n }\n else if (leftToken.getIdentifier().equals(\"1\")){\n //left is 1 and right is anything\n return right;\n }\n else if(patternMatcher(leftType, rightType, numType, numType)){\n Double leftVal = Double.parseDouble(leftToken.getIdentifier());\n Double rightVal = Double.parseDouble(rightToken.getIdentifier());\n\n String prod = String.valueOf(leftVal * rightVal);\n tempToken = new Token(numType, prod);\n return new Num(tempToken);\n }\n else if (patternMatcher(leftType, rightType, minusType, minusType)){\n if (left instanceof UnaryOP && right instanceof UnaryOP){\n tempToken = new Token(mulType);\n ASTNode leftOP = ((UnaryOP) left).getOperand();\n ASTNode rightOp = ((UnaryOP) right).getOperand();\n return new BinaryOp(tempToken, leftOP, rightOp);\n }\n }\n tempToken = new Token(mulType);\n return new BinaryOp(tempToken ,left, right);\n }", "public static Rational multiply(Rational num1, Rational num2){\r\n Rational product = new Rational();\r\n \r\n // multiply throughout\r\n product.denominator = num1.getDenominator() * num2.getDenominator();\r\n product.numerator = num1.getNumerator() * num2.getNumerator();\r\n \r\n product.reduce();\r\n return product;\r\n }", "Matrix scalarMult(double x){\n int newMatrixSize = this.getSize();\n Matrix newM = new Matrix(newMatrixSize);\n for(int i = 1; i <= newMatrixSize; i++){\n List itRow = rows[i - 1];\n itRow.moveFront();\n while(itRow.index() != -1){\n Entry c = (Entry)itRow.get();\n newM.changeEntry(i, c.column, (x*c.value));\n itRow.moveNext();\n }\n }\n\n return newM;\n }", "@Override\n\tpublic Instruction parse(String[] s) throws WrongInstructionFormatException {\n\t\tif (s.length==1 && s[0].equalsIgnoreCase(\"mult\")) \n\t\t\treturn new Mult();\n\t\telse throw new WrongInstructionFormatException();\n\t}", "public final Expr mulExpr() throws RecognitionException {\r\n Expr result = null;\r\n\r\n int mulExpr_StartIndex = input.index();\r\n\r\n Token op=null;\r\n Expr lhs =null;\r\n\r\n Expr rhs =null;\r\n\r\n\r\n try {\r\n if ( state.backtracking>0 && alreadyParsedRule(input, 14) ) { return result; }\r\n\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:108:5: (lhs= unExpr (op= ( '*' | '/' ) rhs= unExpr )* )\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:108:9: lhs= unExpr (op= ( '*' | '/' ) rhs= unExpr )*\r\n {\r\n pushFollow(FOLLOW_unExpr_in_mulExpr613);\r\n lhs=unExpr();\r\n\r\n state._fsp--;\r\n if (state.failed) return result;\r\n\r\n if ( state.backtracking==0 ) { result =lhs; }\r\n\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:108:45: (op= ( '*' | '/' ) rhs= unExpr )*\r\n loop9:\r\n do {\r\n int alt9=2;\r\n int LA9_0 = input.LA(1);\r\n\r\n if ( (LA9_0==23||LA9_0==26) ) {\r\n alt9=1;\r\n }\r\n\r\n\r\n switch (alt9) {\r\n \tcase 1 :\r\n \t // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:108:47: op= ( '*' | '/' ) rhs= unExpr\r\n \t {\r\n \t op=(Token)input.LT(1);\r\n\r\n \t if ( input.LA(1)==23||input.LA(1)==26 ) {\r\n \t input.consume();\r\n \t state.errorRecovery=false;\r\n \t state.failed=false;\r\n \t }\r\n \t else {\r\n \t if (state.backtracking>0) {state.failed=true; return result;}\r\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\r\n \t throw mse;\r\n \t }\r\n\r\n\r\n \t pushFollow(FOLLOW_unExpr_in_mulExpr633);\r\n \t rhs=unExpr();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return result;\r\n\r\n \t if ( state.backtracking==0 ) { \r\n \t if ((op!=null?op.getText():null).equals(\"*\")) {\r\n \t result = new Mul(result, rhs);\r\n \t }\r\n \t if ((op!=null?op.getText():null).equals(\"/\")) {\r\n \t result = new Div(result, rhs); \r\n \t }\r\n \t }\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop9;\r\n }\r\n } while (true);\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n if ( state.backtracking>0 ) { memoize(input, 14, mulExpr_StartIndex); }\r\n\r\n }\r\n return result;\r\n }", "@Override\n public InterpreterValue mul(InterpreterValue v) {\n\n // If the given value is a IntegerValue create a new DoubleValue from\n // the multiplication-result\n if(v instanceof IntegerValue) return new DoubleValue(getValue() * ((IntegerValue) v).getValue());\n\n // If the given value is a DoubleValue create a new DoubleValue from\n // the multiplication-result\n if(v instanceof DoubleValue) return new DoubleValue(getValue() * ((DoubleValue) v).getValue());\n\n // In other case just throw an error\n throw new Error(\"Operator '*' is not defined for type double and \" + v.getName());\n\n }", "public static EquationExpression timesRaw(EquationExpression... args) {\n\t\tswitch (args.length) {\n\t\tcase 0:\n\t\t\treturn EquationNumericValue.from(1);\n\t\tcase 1:\n\t\t\treturn args[0];\n\t\tcase 2:\n\t\t\treturn new EquationProductOperator(args[0], args[1]);\n\t\tdefault:\n\t\t\tEquationExpression[] args2 = new EquationExpression[args.length\n\t\t\t\t\t- 1];\n\t\t\tSystem.arraycopy(args, 1, args2, 0, args.length - 1);\n\t\t\treturn new EquationProductOperator(args[0], sumRaw(args2));\n\t\t}\n\t}", "public final void entryRuleMultExp() throws RecognitionException {\n try {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1377:1: ( ruleMultExp EOF )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1378:1: ruleMultExp EOF\n {\n before(grammarAccess.getMultExpRule()); \n pushFollow(FOLLOW_ruleMultExp_in_entryRuleMultExp2881);\n ruleMultExp();\n\n state._fsp--;\n\n after(grammarAccess.getMultExpRule()); \n match(input,EOF,FOLLOW_EOF_in_entryRuleMultExp2888); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }", "public static EquationExpression timesRaw(EquationExpression... args) {\n switch(args.length) {\n case 0:\n return EquationNumericValue.from(1);\n case 1:\n return args[0];\n case 2:\n return new EquationProductOperator(args[0], args[1]);\n default:\n EquationExpression[] args2 = new EquationExpression[args.length-1];\n System.arraycopy(args, 1, args2, 0, args.length-1);\n return new EquationProductOperator(args[0], sumRaw(args2));\n }\n }", "public final Expr addExpr() throws RecognitionException {\n Expr result = null;\n\n int addExpr_StartIndex = input.index();\n\n Token op=null;\n Expr lhs =null;\n\n Expr rhs =null;\n\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 11) ) { return result; }\n\n // /home/jahn/workspace1/QLAndroid/src/org/uva/sea/ql/parser/antlr/QL.g:124:5: (lhs= mulExpr (op= ( '+' | '-' ) rhs= mulExpr )* )\n // /home/jahn/workspace1/QLAndroid/src/org/uva/sea/ql/parser/antlr/QL.g:124:9: lhs= mulExpr (op= ( '+' | '-' ) rhs= mulExpr )*\n {\n pushFollow(FOLLOW_mulExpr_in_addExpr547);\n lhs=mulExpr();\n\n state._fsp--;\n if (state.failed) return result;\n\n if ( state.backtracking==0 ) { result =lhs; }\n\n // /home/jahn/workspace1/QLAndroid/src/org/uva/sea/ql/parser/antlr/QL.g:124:46: (op= ( '+' | '-' ) rhs= mulExpr )*\n loop8:\n do {\n int alt8=2;\n int LA8_0 = input.LA(1);\n\n if ( ((LA8_0 >= 21 && LA8_0 <= 22)) ) {\n alt8=1;\n }\n\n\n switch (alt8) {\n \tcase 1 :\n \t // /home/jahn/workspace1/QLAndroid/src/org/uva/sea/ql/parser/antlr/QL.g:124:48: op= ( '+' | '-' ) rhs= mulExpr\n \t {\n \t op=(Token)input.LT(1);\n\n \t if ( (input.LA(1) >= 21 && input.LA(1) <= 22) ) {\n \t input.consume();\n \t state.errorRecovery=false;\n \t state.failed=false;\n \t }\n \t else {\n \t if (state.backtracking>0) {state.failed=true; return result;}\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t throw mse;\n \t }\n\n\n \t pushFollow(FOLLOW_mulExpr_in_addExpr565);\n \t rhs=mulExpr();\n\n \t state._fsp--;\n \t if (state.failed) return result;\n\n \t if ( state.backtracking==0 ) { \n \t if ((op!=null?op.getText():null).equals(\"+\")) {\n \t result = new Add(result, rhs);\n \t }\n \t if ((op!=null?op.getText():null).equals(\"-\")) {\n \t result = new Sub(result, rhs); \n \t }\n \t }\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop8;\n }\n } while (true);\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n\n finally {\n \t// do for sure before leaving\n if ( state.backtracking>0 ) { memoize(input, 11, addExpr_StartIndex); }\n\n }\n return result;\n }", "public final void mult (Unit unit) throws ArithmeticException {\n\t\tlong u = mksa ; double r = factor; double v = value; double o = offset;\n\t\t/* dump(\"mult:this \"); unit.dump(\"mult:unit\"); */\n\t\tif (((mksa&_abs)!=0) && (unit.factor != 1)) throw\t// On a date\n\t\tnew ArithmeticException(\"****Unit.mult on a date!\");\n\t\tif (((mksa|unit.mksa)&_log) != 0) {\n\t\t\tif ((mksa == underScore) && (factor == 1.)) ;\n\t\t\telse if ((unit.mksa == underScore) && (unit.factor == 1.)) ;\n\t\t\telse throw new ArithmeticException\n\t\t\t(\"****Unit: can't multiply logs: \" + symbol + \" x \" + unit.symbol);\n\t\t}\n\t\t/* As soon as there is an operation, the offset is ignored \n\t\t * except if one of the factors is unity.\n\t\t */\n\t\tif ((offset!=0) || (unit.offset!=0)) {\n\t\t\tif (mksa == underScore) offset = unit.offset;\n\t\t\telse if (unit.mksa == underScore) ;\n\t\t\telse offset = 0;\n\t\t}\n\t\tv *= unit.value; \n\t\tr *= unit.factor;\n\t\tu += unit.mksa; u -= underScore;\n\t\tif ((u&0x0c80808080808080L) != 0) throw new ArithmeticException\n\t\t(\"****too large powers in: \" + symbol + \" x \" + unit.symbol);\n\t\tmksa = u;\n\t\tfactor = r;\n\t\tvalue = v;\n\t\t/* Decision for the new symbol */\n\t\tif ((symbol != null) && (unit.symbol != null)) {\n\t\t\tif ((unit.mksa == underScore) && (unit.factor == 1)) return;\t// No unit ...\n\t\t\tif (( mksa == underScore) && ( factor == 1)) symbol = unit.symbol;\n\t\t\telse if ((symbol.equals(unit.symbol)) && (factor == unit.factor))\n\t\t\t\tsymbol = toExpr(symbol) + \"2\" ;\n\t\t\telse symbol = toExpr(symbol) + \".\" + toExpr(unit.symbol) ;\n\t\t}\n\t}", "Point mult (double s, Point result);", "@Override\r\n\tpublic void mul(int x, int y) {\n\t\t\r\n\t}", "@Override\r\n\tpublic int multi(int x, int y) {\n\t\treturn x * y;\r\n\t}", "CalcEvaluator(boolean mult) {\r\n this.mult = mult;\r\n }", "@Override\r\n\tpublic int mul() {\n\t\treturn 0;\r\n\t}", "public double multiplica(double a, double b) {\n\t\treturn a*b;\n\t}", "public final void mMUL() throws RecognitionException\n\t{\n\t\ttry\n\t\t{\n\t\t\tfinal int _type = AshvmLexer.MUL;\n\t\t\tfinal int _channel = BaseRecognizer.DEFAULT_TOKEN_CHANNEL;\n\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:708:5: ( 'mul' )\n\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:708:7: 'mul'\n\t\t\t{\n\t\t\t\tthis.match(\"mul\");\n\n\t\t\t}\n\n\t\t\tthis.state.type = _type;\n\t\t\tthis.state.channel = _channel;\n\t\t}\n\t\tfinally\n\t\t{\n\t\t}\n\t}", "public R3Mult(int rdIndex, int rsIndex, int id) {\n\n }", "@Override\n\tpublic int mult(int val1, int val2) {\n\t\treturn val1 * val2;\n\t}", "public final void rule__AddExp__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:8253:1: ( ( ruleMultExp ) )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:8254:1: ( ruleMultExp )\n {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:8254:1: ( ruleMultExp )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:8255:1: ruleMultExp\n {\n before(grammarAccess.getAddExpAccess().getMultExpParserRuleCall_0()); \n pushFollow(FOLLOW_ruleMultExp_in_rule__AddExp__Group__0__Impl16577);\n ruleMultExp();\n\n state._fsp--;\n\n after(grammarAccess.getAddExpAccess().getMultExpParserRuleCall_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "<C, PM> VariableExp<C, PM> createVariableExp();", "private Complex eval(Complex[] ca, Complex x) {\n\t\tComplex result = ca[0];\n\t\tfor (int i = 1; i < ca.length; i++) {\n\t\t\tresult = result.mul(x).add(ca[i]);\n\t\t}\n\t\treturn result;\n\t}", "public final double multExpr() throws RecognitionException {\n double value = 0.0;\n\n\n double e =0.0;\n\n\n try {\n // ExprInterp.g:32:5: (e= atom ( '*' e= atom )* )\n // ExprInterp.g:32:9: e= atom ( '*' e= atom )*\n {\n pushFollow(FOLLOW_atom_in_multExpr248);\n e=atom();\n\n state._fsp--;\n\n\n value = e;\n\n // ExprInterp.g:32:37: ( '*' e= atom )*\n loop5:\n do {\n int alt5=2;\n int LA5_0 = input.LA(1);\n\n if ( (LA5_0==12) ) {\n alt5=1;\n }\n\n\n switch (alt5) {\n \tcase 1 :\n \t // ExprInterp.g:32:38: '*' e= atom\n \t {\n \t match(input,12,FOLLOW_12_in_multExpr253); \n\n \t pushFollow(FOLLOW_atom_in_multExpr257);\n \t e=atom();\n\n \t state._fsp--;\n\n\n \t value *= e;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop5;\n }\n } while (true);\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n\n finally {\n \t// do for sure before leaving\n }\n return value;\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 }", "private String compute(String equ,String op)\n {\n String equation = equ;\n Pattern mdPattern = Pattern.compile(\"(\\\\d+([.]\\\\d+)*)(([\"+op+\"]))(\\\\d+([.]\\\\d+)*)\");\n Matcher matcher\t\t= mdPattern.matcher(equation);\n while(matcher.find())\n {\n String[] arr = null;\n double ans = 0;\n String eq = matcher.group(0);//get form x*y\n if(eq.contains(op))\n {\n arr = eq.split(\"\\\\\"+op);//make arr\n if(op.equals(\"*\"))\n ans = Double.valueOf(arr[0])*Double.valueOf(arr[1]);//compute\n if(op.equals(\"/\"))\n ans = Double.valueOf(arr[0])/Double.valueOf(arr[1]);//compute\n if(op.equals(\"+\"))\n ans = Double.valueOf(arr[0])+Double.valueOf(arr[1]);//compute\n if(op.equals(\"-\"))\n ans = Double.valueOf(arr[0])-Double.valueOf(arr[1]);//compute\n }\n\n equation = matcher.replaceFirst(String.valueOf(ans));//replace in equation\n matcher = mdPattern.matcher(equation);//look for more matches\n }\n return equation;\n }", "private static native double mul(int n);", "public void multiply(Object mulValue) {\r\n\r\n\t\tNumberOperation operator = new NumberOperation(this.value, mulValue) {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic Number doAnOperation() {\r\n\t\t\t\tTypeEnum typeOfResult = getFinalType();\r\n\t\t\t\tif(typeOfResult == TypeEnum.TYPE_INTEGER) {\r\n\t\t\t\t\treturn getO1().intValue() * getO2().intValue();\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\treturn getO1().doubleValue() * getO2().doubleValue();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t\tthis.value = operator.doAnOperation();\r\n\t}", "public static void main(String args[]) {\n\tExpr e3 = new Minus(new Num(100),new Num(99));\n\tSystem.out.println(\"e3 is \" + e3.exprToString());\n\t// outputs \"e4 is (4*5-(100-99))\"\n\tExpr e4 = new Minus(new Times(new Num(4),new Num(5)),e3);\n\tSystem.out.println(\"e4 is \" + e4.exprToString());\n }", "public void mul(String a, String b, int i, String reg) {\r\n registerName.add(reg);\r\n int posa = registerRegister.indexOf(a);\r\n int posb = registerRegister.indexOf(b);\r\n int element = Integer.parseInt(registerValues.get(posa));\r\n int element1 = Integer.parseInt(registerValues.get(posb));\r\n int mul = element * element1;\r\n registerValues.add(Integer.toString(mul));\r\n }", "public void multiply(double multiplier) {\n x *= multiplier;\n y *= multiplier;\n }", "public final void synpred27_expression_fragment() throws RecognitionException { \n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:11: ( ( '+' | '-' ) mult )\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:11: ( '+' | '-' ) mult\n {\n if ( (input.LA(1)>=46 && input.LA(1)<=47) ) {\n input.consume();\n state.errorRecovery=false;state.failed=false;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n MismatchedSetException mse = new MismatchedSetException(null,input);\n throw mse;\n }\n\n pushFollow(FOLLOW_mult_in_synpred27_expression437);\n mult();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n }", "Rational multiply(Rational p){\n Rational firstarg=new Rational();\n firstarg.numerator=numerator;\n firstarg.denominator=denominator;\n\n firstarg.numerator=p.numerator*firstarg.numerator;\n firstarg.denominator=p.denominator*firstarg.denominator;\n return firstarg;\n }" ]
[ "0.7181152", "0.68491536", "0.67149585", "0.6623054", "0.652561", "0.6453798", "0.64244205", "0.64144564", "0.6233412", "0.6114878", "0.61100984", "0.60608727", "0.6032277", "0.6031518", "0.6002539", "0.5990347", "0.59711415", "0.5951944", "0.59271264", "0.5920275", "0.59158635", "0.5885907", "0.58620405", "0.58206624", "0.57921934", "0.5785963", "0.57347864", "0.5727767", "0.5700363", "0.56825036", "0.5663695", "0.5655955", "0.56242114", "0.5620611", "0.5609072", "0.5607046", "0.5606481", "0.5606336", "0.5577917", "0.55633867", "0.5550771", "0.5550763", "0.553459", "0.5533022", "0.55234444", "0.55103403", "0.5508319", "0.5507825", "0.5496564", "0.54955685", "0.5473765", "0.54655725", "0.5462785", "0.5457463", "0.545408", "0.5448749", "0.5442949", "0.5434475", "0.5434318", "0.5426579", "0.54076874", "0.5386324", "0.5378135", "0.5370538", "0.5366461", "0.53664094", "0.53385276", "0.5331747", "0.5317382", "0.5311504", "0.53061557", "0.53054595", "0.5295753", "0.529064", "0.5280395", "0.5274558", "0.52712065", "0.5261208", "0.52601016", "0.5256051", "0.52550113", "0.5244864", "0.52418745", "0.5241819", "0.5238788", "0.5232773", "0.52323204", "0.52314246", "0.52282906", "0.52271503", "0.52090436", "0.52053475", "0.52039117", "0.519788", "0.5196789", "0.5194174", "0.51914495", "0.51805", "0.51750404" ]
0.67898893
3
Constructs a mult by given expressions.
public Mult(double left, double right) { super(left, right); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Expression multExpression() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tExpression e0 = powerExpression();\r\n\t\twhile(isKind(OP_TIMES, OP_DIV, OP_MOD)) {\r\n\t\t\tToken op = consume();\r\n\t\t\tExpression e1 = powerExpression();\r\n\t\t\te0 = new ExpressionBinary(first,e0,op,e1);\r\n\t\t}\r\n\t\treturn e0;\r\n\t}", "private Expr mult(Expr x) throws Err {\n if (x instanceof ExprUnary) {\n ExprUnary y=(ExprUnary)x;\n if (y.op==ExprUnary.Op.SOME) return ExprUnary.Op.SOMEOF.make(y.pos, y.sub);\n if (y.op==ExprUnary.Op.LONE) return ExprUnary.Op.LONEOF.make(y.pos, y.sub);\n if (y.op==ExprUnary.Op.ONE) return ExprUnary.Op.ONEOF.make(y.pos, y.sub);\n }\n return x;\n }", "public Mult(Expression left, Expression right) {\n super(left, right);\n }", "public Mult(Expression left, Expression right) {\n super(left, right);\n }", "Multiply createMultiply();", "public final VecMathParser.expr_return expr() throws RecognitionException {\n VecMathParser.expr_return retval = new VecMathParser.expr_return();\n retval.start = input.LT(1);\n\n Object root_0 = null;\n\n Token char_literal8=null;\n VecMathParser.multExpr_return multExpr7 = null;\n\n VecMathParser.multExpr_return multExpr9 = null;\n\n\n Object char_literal8_tree=null;\n\n try {\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:15:5: ( multExpr ( '+' multExpr )* )\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:15:7: multExpr ( '+' multExpr )*\n {\n root_0 = (Object)adaptor.nil();\n\n pushFollow(FOLLOW_multExpr_in_expr117);\n multExpr7=multExpr();\n\n state._fsp--;\n\n adaptor.addChild(root_0, multExpr7.getTree());\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:15:16: ( '+' multExpr )*\n loop3:\n do {\n int alt3=2;\n int LA3_0 = input.LA(1);\n\n if ( (LA3_0==10) ) {\n alt3=1;\n }\n\n\n switch (alt3) {\n \tcase 1 :\n \t // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:15:17: '+' multExpr\n \t {\n \t char_literal8=(Token)match(input,10,FOLLOW_10_in_expr120); \n \t char_literal8_tree = (Object)adaptor.create(char_literal8);\n \t root_0 = (Object)adaptor.becomeRoot(char_literal8_tree, root_0);\n\n \t pushFollow(FOLLOW_multExpr_in_expr123);\n \t multExpr9=multExpr();\n\n \t state._fsp--;\n\n \t adaptor.addChild(root_0, multExpr9.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop3;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (Object)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "public Mult(String left, Expression right) {\n super(left, right);\n }", "public Mult(Expression left, double right) {\n super(left, right);\n }", "public Mult(double left, Expression right) {\n super(left, right);\n }", "public Mult(Expression left, String right) {\n super(left, right);\n }", "void visit(MultiplicationExpression expression);", "public BinMltLinExpr multiply(BinLinExpr expr) {\n\t\t\n\t\tBinMltLinExpr result = new BinMltLinExpr();\n\t\t\n\t\t// Multiply variables together\n\t\tfor (int i = 0; i < expr.vars.size(); i++) {\n\t\t\tfor (int j = 0; j < termVars.size(); j++) {\n\t\t\t\t\n\t\t\t\tdouble newCoeff = expr.coefficients.get(i) * coefficients.get(j);\n\t\t\t\tList<BinVar> newVars = new ArrayList<BinVar>();\n\t\t\t\tnewVars.add(expr.vars.get(i));\n\t\t\t\tnewVars.addAll(termVars.get(j));\n\t\t\t\t\n\t\t\t\tresult.addTerm(newCoeff, newVars);\n\t\t\t}\n\t\t}\n\n\t\t// Multiply variables with constants\n\t\tfor (int i = 0; i < termVars.size(); i++) {\n\t\t\tdouble newCoeff = coefficients.get(i) * expr.constant;\n\t\t\tresult.addTerm(newCoeff, termVars.get(i));\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < expr.vars.size(); i++) {\n\t\t\tdouble newCoeff = expr.coefficients.get(i) * constant;\n\t\t\tresult.addTerm(newCoeff, expr.vars.get(i));\n\t\t}\n\t\t\n\t\tresult.addConstant(constant*expr.constant);\n\t\t\n\t\treturn result;\n\t}", "public void enfoncerMult() {\n\t\ttry {\n\t\t\tthis.op = new Mult();\n\t\t\tif (!raz) {\n\t\t\t\tthis.pile.push(valC);\n\t\t\t}\n\t\t\tint a = this.pile.pop(); int b = this.pile.pop();\n\t\t\tthis.valC = this.op.eval(b,a);\n\t\t\tthis.pile.push(this.valC);\n\t\t\tthis.raz = true;\n\t\t}\n\t\tcatch (EmptyStackException e) {\n\t\t\tSystem.out.println(\"Erreur de syntaxe : Saisir deux operandes avant de saisir un operateur\");\n\t\t}\n\t}", "public Transformation mult(Transformation a) {\n\t\tTransformation result = new Transformation();\n\t\tsuper.mult(a, result);\n\t\treturn result;\n\t}", "private void mul() {\n\n\t}", "@Override\n public Expression assign(String var, Expression expression) {\n Expression left = super.getLeft();\n Expression right = super.getRight();\n return new Mult(left.assign(var, expression), right.assign(var, expression));\n }", "public void multiply() {\n\t\t\n\t}", "public static double multi() {\n System.out.println(\"Enter multiplier\");\n double a = getNumber();\n System.out.println(\"Enter multiplicand\");\n double b = getNumber();\n\n return a * b;\n }", "@SuppressWarnings(\"unchecked\")\n @Override\n public Expression asExpression(Rule rule, Deque<Value<Expression>> args) {\n if (args.size() == 1) {\n // a single term is not a product\n return args.pollFirst().getTarget();\n } else {\n // assume x to be *x, because the product will start by 1*x\n Term<Multiplicative> factor = new Term<>(Multiplicative.MULT, args.removeFirst().getTarget());\n List<Term<Multiplicative>> arguments = new LinkedList<>();\n arguments.add(factor);\n args.stream()\n // next arguments are all Term<Multiplicative>\n .map(v -> (Term<Multiplicative>) v.getTarget())\n .forEachOrdered(arguments::add);\n return new Product(arguments);\n }\n }", "public static void main(String[] args) throws Exception {\r\n Expression e = new Plus(new Mult(2, \"x\"), new Plus(new Sin(new Mult(4, \"y\")), new Pow(\"e\", \"x\")));\r\n System.out.println(e);\r\n Map<String, Double> assignment = new TreeMap<String, Double>();\r\n assignment.put(\"x\", 2.0);\r\n assignment.put(\"y\", 0.25);\r\n assignment.put(\"e\", 2.71);\r\n System.out.println(e.evaluate(assignment));\r\n e = e.differentiate(\"x\");\r\n System.out.println(e);\r\n System.out.println(e.evaluate(assignment));\r\n System.out.println(e.simplify());\r\n System.out.println(e);\r\n }", "public BinMltLinExpr multiply(BinMltLinExpr expr) {\n\t\t\n\t\tBinMltLinExpr result = new BinMltLinExpr();\n\t\t\n\t\t// Multiply variables together\n\t\tfor (int i = 0; i < expr.termVars.size(); i++) {\n\t\t\tfor (int j = 0; j < termVars.size(); j++) {\n\t\t\t\t\n\t\t\t\tdouble newCoeff = expr.coefficients.get(i) * coefficients.get(j);\n\t\t\t\tList<BinVar> newVars = new ArrayList<BinVar>();\n\t\t\t\tnewVars.addAll(expr.termVars.get(i));\n\t\t\t\tnewVars.addAll(termVars.get(j));\n\t\t\t\t\n\t\t\t\tresult.addTerm(newCoeff, newVars);\n\t\t\t}\n\t\t}\n\n\t\t// Multiply variables with constants\n\t\tfor (int i = 0; i < termVars.size(); i++) {\n\t\t\tdouble newCoeff = coefficients.get(i) * expr.constant;\n\t\t\tresult.addTerm(newCoeff, termVars.get(i));\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < expr.termVars.size(); i++) {\n\t\t\tdouble newCoeff = expr.coefficients.get(i) * constant;\n\t\t\tresult.addTerm(newCoeff, expr.termVars.get(i));\n\t\t}\n\t\t\n\t\tresult.addConstant(constant*expr.constant);\n\t\t\n\t\treturn result;\n\t}", "public final VecMathParser.multExpr_return multExpr() throws RecognitionException {\n VecMathParser.multExpr_return retval = new VecMathParser.multExpr_return();\n retval.start = input.LT(1);\n\n Object root_0 = null;\n\n Token char_literal11=null;\n Token char_literal12=null;\n VecMathParser.primary_return primary10 = null;\n\n VecMathParser.primary_return primary13 = null;\n\n\n Object char_literal11_tree=null;\n Object char_literal12_tree=null;\n\n try {\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:5: ( primary ( ( '*' | '.' ) primary )* )\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:9: primary ( ( '*' | '.' ) primary )*\n {\n root_0 = (Object)adaptor.nil();\n\n pushFollow(FOLLOW_primary_in_multExpr145);\n primary10=primary();\n\n state._fsp--;\n\n adaptor.addChild(root_0, primary10.getTree());\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:17: ( ( '*' | '.' ) primary )*\n loop5:\n do {\n int alt5=2;\n int LA5_0 = input.LA(1);\n\n if ( ((LA5_0>=11 && LA5_0<=12)) ) {\n alt5=1;\n }\n\n\n switch (alt5) {\n \tcase 1 :\n \t // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:18: ( '*' | '.' ) primary\n \t {\n \t // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:18: ( '*' | '.' )\n \t int alt4=2;\n \t int LA4_0 = input.LA(1);\n\n \t if ( (LA4_0==11) ) {\n \t alt4=1;\n \t }\n \t else if ( (LA4_0==12) ) {\n \t alt4=2;\n \t }\n \t else {\n \t NoViableAltException nvae =\n \t new NoViableAltException(\"\", 4, 0, input);\n\n \t throw nvae;\n \t }\n \t switch (alt4) {\n \t case 1 :\n \t // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:19: '*'\n \t {\n \t char_literal11=(Token)match(input,11,FOLLOW_11_in_multExpr149); \n \t char_literal11_tree = (Object)adaptor.create(char_literal11);\n \t root_0 = (Object)adaptor.becomeRoot(char_literal11_tree, root_0);\n\n\n \t }\n \t break;\n \t case 2 :\n \t // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:24: '.'\n \t {\n \t char_literal12=(Token)match(input,12,FOLLOW_12_in_multExpr152); \n \t char_literal12_tree = (Object)adaptor.create(char_literal12);\n \t root_0 = (Object)adaptor.becomeRoot(char_literal12_tree, root_0);\n\n\n \t }\n \t break;\n\n \t }\n\n \t pushFollow(FOLLOW_primary_in_multExpr156);\n \t primary13=primary();\n\n \t state._fsp--;\n\n \t adaptor.addChild(root_0, primary13.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop5;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (Object)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "@Override\n\tpublic void visit(MultiplyNode node) {\n\t\tif (Evaluator.checkScope(node) == false) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (Evaluator.checkAssert(node) == false) {\n\t\t\treturn;\n\t\t}\n\n\t\t/**\n\t\t * evaluam cei doi fii\n\t\t */\n\t\tEvaluator.evaluate(node.getChild(0));\n\t\tEvaluator.evaluate(node.getChild(1));\n\n\t\tInteger i, j;\n\t\t/**\n\t\t * salvam si inmultim valorile rezulate in urma evaluarii celor 2 fii si\n\t\t * setam valoarea corespunzatoare in nodul curent\n\t\t */\n\t\tif (node.getChild(1) instanceof Variable) {\n\t\t\ti = Integer.parseInt(Evaluator.variables.get(node.getChild(1).getName()));\n\n\t\t} else {\n\t\t\ti = Integer.parseInt(node.getChild(1).getName());\n\t\t}\n\n\t\tif (node.getChild(0) instanceof Variable) {\n\t\t\tj = Integer.parseInt(Evaluator.variables.get(node.getChild(0).getName()));\n\n\t\t} else {\n\t\t\tj = Integer.parseInt(node.getChild(0).getName());\n\t\t}\n\n\t\tInteger n = i * j;\n\n\t\tnode.setName(n.toString());\n\t}", "static Double executeMultiplication(List<Double> operands) {\n Double result = null;\n for (Double operand : operands) {\n if (Objects.isNull(result)) {\n result = operand;\n }\n else {\n result = result * operand;\n }\n }\n return result;\n }", "public Polynomial visit(ProductExpression expression) {\n return Polynomial.multiply(\n expression.getLeft().accept(this),\n expression.getRight().accept(this));\n }", "BaseNumber multiply(BaseNumber operand);", "public final Expr multExpr() throws RecognitionException {\n\t\tExpr e = null;\n\n\n\t\tToken STAR15=null;\n\t\tExpr e1 =null;\n\t\tExpr e2 =null;\n\n\n\t\t\t\tExpr it = null;\n\t\t\t\n\t\ttry {\n\t\t\t// ul.g:189:3: (e1= atom ( STAR e2= atom )* )\n\t\t\t// ul.g:190:2: e1= atom ( STAR e2= atom )*\n\t\t\t{\n\t\t\tpushFollow(FOLLOW_atom_in_multExpr768);\n\t\t\te1=atom();\n\t\t\tstate._fsp--;\n\t\t\tif (state.failed) return e;\n\t\t\tif ( state.backtracking==0 ) {it = e1;}\n\t\t\t// ul.g:191:2: ( STAR e2= atom )*\n\t\t\tloop15:\n\t\t\twhile (true) {\n\t\t\t\tint alt15=2;\n\t\t\t\tint LA15_0 = input.LA(1);\n\t\t\t\tif ( (LA15_0==STAR) ) {\n\t\t\t\t\talt15=1;\n\t\t\t\t}\n\n\t\t\t\tswitch (alt15) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// ul.g:191:4: STAR e2= atom\n\t\t\t\t\t{\n\t\t\t\t\tSTAR15=(Token)match(input,STAR,FOLLOW_STAR_in_multExpr775); if (state.failed) return e;\n\t\t\t\t\tpushFollow(FOLLOW_atom_in_multExpr781);\n\t\t\t\t\te2=atom();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return e;\n\t\t\t\t\tif ( state.backtracking==0 ) {it = new MultExpr(it, e2, (STAR15!=null?STAR15.getLine():0), STAR15.getCharPositionInLine());}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault :\n\t\t\t\t\tbreak loop15;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( state.backtracking==0 ) {\n\t\t\t\t\te = it;\n\t\t\t\t}\n\t\t}\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\trecover(input,re);\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn e;\n\t}", "public T mul(T first, T second);", "public final double expr() throws RecognitionException {\n double value = 0.0;\n\n\n double e =0.0;\n\n\n try {\n // ExprInterp.g:24:5: (e= multExpr ( '+' e= multExpr | '-' e= multExpr )* |e= maxF )\n int alt4=2;\n int LA4_0 = input.LA(1);\n\n if ( ((LA4_0 >= ID && LA4_0 <= LEFTP)||LA4_0==REL) ) {\n alt4=1;\n }\n else if ( (LA4_0==MAXI) ) {\n alt4=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 4, 0, input);\n\n throw nvae;\n\n }\n switch (alt4) {\n case 1 :\n // ExprInterp.g:24:9: e= multExpr ( '+' e= multExpr | '-' e= multExpr )*\n {\n pushFollow(FOLLOW_multExpr_in_expr155);\n e=multExpr();\n\n state._fsp--;\n\n\n value = e;\n\n // ExprInterp.g:25:9: ( '+' e= multExpr | '-' e= multExpr )*\n loop3:\n do {\n int alt3=3;\n int LA3_0 = input.LA(1);\n\n if ( (LA3_0==13) ) {\n alt3=1;\n }\n else if ( (LA3_0==15) ) {\n alt3=2;\n }\n\n\n switch (alt3) {\n \tcase 1 :\n \t // ExprInterp.g:25:13: '+' e= multExpr\n \t {\n \t match(input,13,FOLLOW_13_in_expr171); \n\n \t pushFollow(FOLLOW_multExpr_in_expr175);\n \t e=multExpr();\n\n \t state._fsp--;\n\n\n \t value += e;\n\n \t }\n \t break;\n \tcase 2 :\n \t // ExprInterp.g:26:13: '-' e= multExpr\n \t {\n \t match(input,15,FOLLOW_15_in_expr191); \n\n \t pushFollow(FOLLOW_multExpr_in_expr195);\n \t e=multExpr();\n\n \t state._fsp--;\n\n\n \t value -= e;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop3;\n }\n } while (true);\n\n\n }\n break;\n case 2 :\n // ExprInterp.g:28:8: e= maxF\n {\n pushFollow(FOLLOW_maxF_in_expr221);\n e=maxF();\n\n state._fsp--;\n\n\n value = e;\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n\n finally {\n \t// do for sure before leaving\n }\n return value;\n }", "public final void mul() {\n\t\tif (size > 1) {\n\n\t\t\tdouble topMostValue = pop();\n\t\t\tdouble secondTopMostValue = pop();\n\t\t\tpush(secondTopMostValue * topMostValue);\n\t\t}\n\t}", "public Mult(String left, double right) {\n super(left, right);\n }", "public static Transform mult(Transform t1, Transform t2) {\n\t\treturn transpose(t1.a * t2.a + t1.c * t2.b, t1.a * t2.c + t1.c * t2.d, t1.a * t2.tx + t1.c * t2.ty + t1.tx,\n\t\t\t\t\t\t t1.b * t2.a + t1.d * t2.b, t1.b * t2.c + t1.d * t2.d, t1.b * t2.tx + t1.d * t2.ty + t1.ty);\n\t}", "private void multiplication()\n\t{\n\t\tFun = Function.MULTIPLY; //Function set to determine what action should be taken later.\n\t\t\n\t\t\tsetLeftValue();\n\t\t\tentry.grabFocus();\n\t\t\n\t}", "public int mult()\r\n\t{\r\n\t\tint a=10;\r\n\t\tint b=20;\r\n\t\tint c = a*b;\r\n\t\treturn(c);\r\n\t}", "public Object visitMultiplicativeExpression(GNode n) {\n Object a, b, result;\n String op;\n \n nonboolean = true;\n \n dostring = true;\n \n a = dispatch(n.getGeneric(0));\n b = dispatch(n.getGeneric(2));\n op = n.getString(1);\n \n dostring = false;\n \n if (a instanceof Long && b instanceof Long) {\n if ((op.equals(\"/\")\n || op.equals(\"%\")) && ((Long) b).equals(new Long(0))) {\n System.err.println(\"division by zero in #if\");\n result = new Long(0);\n }\n if (op.equals(\"*\")) {\n result = (Long) a * (Long) b;\n }\n else if (op.equals(\"/\")) {\n result = (Long) a / (Long) b;\n }\n else if (op.equals(\"%\")) {\n result = (Long) a % (Long) b;\n }\n else {\n result = \"\";\n }\n }\n else {\n result = parens(a) + \" \" + op + \" \" + parens(b);\n }\n \n return result;\n }", "public static BinaryExpression multiply(Expression expression0, Expression expression1) {\n return makeBinary(ExpressionType.Multiply, expression0, expression1);\n }", "public T elementMult( T b ) {\n convertType.specify(this, b);\n T A = convertType.convert(this);\n b = convertType.convert(b);\n\n T c = A.createLike();\n A.ops.elementMult(A.mat, b.mat, c.mat);\n return c;\n }", "public Mult(double left, String right) {\n super(left, right);\n }", "public final expressionParser.add_return add() throws RecognitionException {\n expressionParser.add_return retval = new expressionParser.add_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n Token char_literal38=null;\n Token char_literal39=null;\n expressionParser.mult_return mult37 = null;\n\n expressionParser.mult_return mult40 = null;\n\n\n CommonTree char_literal38_tree=null;\n CommonTree char_literal39_tree=null;\n\n try {\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:3: ( mult ( ( '+' | '-' ) mult )* )\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:5: mult ( ( '+' | '-' ) mult )*\n {\n root_0 = (CommonTree)adaptor.nil();\n\n pushFollow(FOLLOW_mult_in_add424);\n mult37=mult();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, mult37.getTree());\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:10: ( ( '+' | '-' ) mult )*\n loop17:\n do {\n int alt17=2;\n alt17 = dfa17.predict(input);\n switch (alt17) {\n \tcase 1 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:11: ( '+' | '-' ) mult\n \t {\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:11: ( '+' | '-' )\n \t int alt16=2;\n \t int LA16_0 = input.LA(1);\n\n \t if ( (LA16_0==46) ) {\n \t alt16=1;\n \t }\n \t else if ( (LA16_0==47) ) {\n \t alt16=2;\n \t }\n \t else {\n \t if (state.backtracking>0) {state.failed=true; return retval;}\n \t NoViableAltException nvae =\n \t new NoViableAltException(\"\", 16, 0, input);\n\n \t throw nvae;\n \t }\n \t switch (alt16) {\n \t case 1 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:12: '+'\n \t {\n \t char_literal38=(Token)match(input,46,FOLLOW_46_in_add428); if (state.failed) return retval;\n \t if ( state.backtracking==0 ) {\n \t char_literal38_tree = (CommonTree)adaptor.create(char_literal38);\n \t root_0 = (CommonTree)adaptor.becomeRoot(char_literal38_tree, root_0);\n \t }\n\n \t }\n \t break;\n \t case 2 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:19: '-'\n \t {\n \t char_literal39=(Token)match(input,47,FOLLOW_47_in_add433); if (state.failed) return retval;\n \t if ( state.backtracking==0 ) {\n \t char_literal39_tree = (CommonTree)adaptor.create(char_literal39);\n \t root_0 = (CommonTree)adaptor.becomeRoot(char_literal39_tree, root_0);\n \t }\n\n \t }\n \t break;\n\n \t }\n\n \t pushFollow(FOLLOW_mult_in_add437);\n \t mult40=mult();\n\n \t state._fsp--;\n \t if (state.failed) return retval;\n \t if ( state.backtracking==0 ) adaptor.addChild(root_0, mult40.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop17;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "public Double eval(Double... operands);", "public <V extends Number> FluentExp<V> times (SQLExpression<V> expr)\n {\n return new Mul<V>(this, expr);\n }", "public static MathNode create(List<MathNode> nodes) {\n return new PowerNode(nodes);\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"MULT\";\n\t}", "NumericExpression createNumericExpression();", "abstract void mulS();", "public final expressionParser.mult_return mult() throws RecognitionException {\n expressionParser.mult_return retval = new expressionParser.mult_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n Token char_literal42=null;\n Token char_literal43=null;\n expressionParser.unary_return unary41 = null;\n\n expressionParser.unary_return unary44 = null;\n\n\n CommonTree char_literal42_tree=null;\n CommonTree char_literal43_tree=null;\n\n try {\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:3: ( unary ( ( '*' | '/' ) unary )* )\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:5: unary ( ( '*' | '/' ) unary )*\n {\n root_0 = (CommonTree)adaptor.nil();\n\n pushFollow(FOLLOW_unary_in_mult454);\n unary41=unary();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, unary41.getTree());\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:11: ( ( '*' | '/' ) unary )*\n loop19:\n do {\n int alt19=2;\n int LA19_0 = input.LA(1);\n\n if ( ((LA19_0>=48 && LA19_0<=49)) ) {\n alt19=1;\n }\n\n\n switch (alt19) {\n \tcase 1 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:12: ( '*' | '/' ) unary\n \t {\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:12: ( '*' | '/' )\n \t int alt18=2;\n \t int LA18_0 = input.LA(1);\n\n \t if ( (LA18_0==48) ) {\n \t alt18=1;\n \t }\n \t else if ( (LA18_0==49) ) {\n \t alt18=2;\n \t }\n \t else {\n \t if (state.backtracking>0) {state.failed=true; return retval;}\n \t NoViableAltException nvae =\n \t new NoViableAltException(\"\", 18, 0, input);\n\n \t throw nvae;\n \t }\n \t switch (alt18) {\n \t case 1 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:13: '*'\n \t {\n \t char_literal42=(Token)match(input,48,FOLLOW_48_in_mult458); if (state.failed) return retval;\n \t if ( state.backtracking==0 ) {\n \t char_literal42_tree = (CommonTree)adaptor.create(char_literal42);\n \t root_0 = (CommonTree)adaptor.becomeRoot(char_literal42_tree, root_0);\n \t }\n\n \t }\n \t break;\n \t case 2 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:20: '/'\n \t {\n \t char_literal43=(Token)match(input,49,FOLLOW_49_in_mult463); if (state.failed) return retval;\n \t if ( state.backtracking==0 ) {\n \t char_literal43_tree = (CommonTree)adaptor.create(char_literal43);\n \t root_0 = (CommonTree)adaptor.becomeRoot(char_literal43_tree, root_0);\n \t }\n\n \t }\n \t break;\n\n \t }\n\n \t pushFollow(FOLLOW_unary_in_mult467);\n \t unary44=unary();\n\n \t state._fsp--;\n \t if (state.failed) return retval;\n \t if ( state.backtracking==0 ) adaptor.addChild(root_0, unary44.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop19;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "public final Expr addExpr() throws RecognitionException {\r\n Expr result = null;\r\n\r\n int addExpr_StartIndex = input.index();\r\n\r\n Token op=null;\r\n Expr lhs =null;\r\n\r\n Expr rhs =null;\r\n\r\n\r\n try {\r\n if ( state.backtracking>0 && alreadyParsedRule(input, 15) ) { return result; }\r\n\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:121:5: (lhs= mulExpr (op= ( '+' | '-' ) rhs= mulExpr )* )\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:121:9: lhs= mulExpr (op= ( '+' | '-' ) rhs= mulExpr )*\r\n {\r\n pushFollow(FOLLOW_mulExpr_in_addExpr674);\r\n lhs=mulExpr();\r\n\r\n state._fsp--;\r\n if (state.failed) return result;\r\n\r\n if ( state.backtracking==0 ) { result =lhs; }\r\n\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:121:46: (op= ( '+' | '-' ) rhs= mulExpr )*\r\n loop10:\r\n do {\r\n int alt10=2;\r\n int LA10_0 = input.LA(1);\r\n\r\n if ( ((LA10_0 >= 24 && LA10_0 <= 25)) ) {\r\n alt10=1;\r\n }\r\n\r\n\r\n switch (alt10) {\r\n \tcase 1 :\r\n \t // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:121:48: op= ( '+' | '-' ) rhs= mulExpr\r\n \t {\r\n \t op=(Token)input.LT(1);\r\n\r\n \t if ( (input.LA(1) >= 24 && input.LA(1) <= 25) ) {\r\n \t input.consume();\r\n \t state.errorRecovery=false;\r\n \t state.failed=false;\r\n \t }\r\n \t else {\r\n \t if (state.backtracking>0) {state.failed=true; return result;}\r\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\r\n \t throw mse;\r\n \t }\r\n\r\n\r\n \t pushFollow(FOLLOW_mulExpr_in_addExpr692);\r\n \t rhs=mulExpr();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return result;\r\n\r\n \t if ( state.backtracking==0 ) { \r\n \t if ((op!=null?op.getText():null).equals(\"+\")) {\r\n \t result = new Add(result, rhs);\r\n \t }\r\n \t if ((op!=null?op.getText():null).equals(\"-\")) {\r\n \t result = new Sub(result, rhs); \r\n \t }\r\n \t }\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop10;\r\n }\r\n } while (true);\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n if ( state.backtracking>0 ) { memoize(input, 15, addExpr_StartIndex); }\r\n\r\n }\r\n return result;\r\n }", "public static double multi(double a, double b) {\n return a * b;\n }", "@Test\n public void testParseMul() {\n System.out.println(\"testParseMul\");\n byte[] expected = {\n Instruction.LV.getId(), 0, 0, 32,\n Instruction.LV.getId(), 0, 0, 36,\n Instruction.MUL.getId(),\n Instruction.LV.getId(), 0, 0, 40,\n Instruction.MUL.getId()\n };\n\n TermParser p = TermParserTestSetup.getMulTermSetup();\n assertEquals(\"Parse\", true, p.parse());\n AssemblerCodeChecker.assertCodeEquals(\"Code \", expected, TermParserTestSetup.getByteCode());\n }", "@Override\n public Expression simplifyMore() {\n Expression left = super.getLeft();\n Expression right = super.getRight();\n\n // x * x -> x^2\n if (left.toString().equals(right.toString())) {\n return new Pow(left, 2);\n }\n\n // ((2.0 * x) * (x * 3.0)) -> 6x^2\n if (left instanceof Mult && right instanceof Mult) {\n if (((Mult) left).getRight().toString().equals(((Mult) right).getLeft().toString())) {\n Expression exp = new Mult(new Mult(((Mult) left).getLeft(), ((Mult) right).getRight()),\n new Mult(((Mult) left).getRight(), ((Mult) right).getLeft()));\n exp.turnBonusOn();\n return exp.simplify();\n }\n }\n\n // 2x * 2x -> 4x^2\n if (left instanceof Mult && right instanceof Mult) {\n if (((Mult) left).getRight().toString().equals(((Mult) right).getRight().toString())) {\n return new Mult(new Mult(((Mult) left).getLeft(), ((Mult) right).getLeft()).simplify(),\n new Pow(((Mult) left).getRight(), 2)).simplify();\n }\n }\n\n // 2x * 2y -> 4xy\n if (left instanceof Mult && right instanceof Mult) {\n return new Mult(new Mult(((Mult) left).getLeft(), ((Mult) right).getLeft()).simplify(),\n new Mult(((Mult) left).getRight(), ((Mult) right).getRight())).simplify();\n }\n\n // sin(x) * cos(x) -> 0.5 * sin(2x)\n if (right instanceof Sin && left instanceof Cos) {\n Expression exp = new Mult(0.5, new Sin(new Mult(2, ((Sin) right).getExpression())));\n exp.turnBonusOn();\n return exp.simplify();\n }\n\n // cos(x) * sin(x) -> 0.5 * sin(2x)\n if (right instanceof Cos && left instanceof Sin) {\n Expression exp = new Sin(new Mult(2, ((Cos) right).getExpression()));\n exp.turnBonusOn();\n return exp.simplify();\n }\n\n // log(x, y) * 2 -> 2 * log(x, y)\n if (left instanceof Sin || left instanceof Cos || left instanceof Log) {\n Expression exp = new Mult(right, left);\n exp.turnBonusOn();\n return exp.simplify();\n }\n\n // x^2 * x^3 -> x^5\n if (left instanceof Pow && right instanceof Pow) {\n if (((Pow) left).getLeft().toString().equals(((Pow) right).getLeft().toString())) {\n Expression exp = new Pow(((Pow) left).getLeft(),\n new Plus(((Pow) left).getRight(), ((Pow) right).getRight()));\n exp.turnBonusOn();\n return exp.simplify();\n }\n }\n\n // x^2 * x -> x^3\n if (left instanceof Pow) {\n if (((Pow) left).getLeft().toString().equals(right.toString())) {\n Expression exp = new Pow(((Pow) left).getLeft(), new Plus(((Pow) left).getRight(), 1));\n exp.turnBonusOn();\n return exp.simplify();\n }\n }\n\n return this;\n }", "IVec3 mult(IVec3 v);", "private Term parseMul(final boolean required) throws ParseException {\n Term t1 = parseUnary(required);\n while (t1 != null) {\n int tt = _tokenizer.next();\n if (tt == '*') {\n Term t2 = parseUnary(true);\n if (t1.isD() && t2.isN() || t1.isN() && t2.isD()) {\n t1 = new Term.Mul(Term.TYPE_D, t1, t2);\n } else if (t1.isI() && t2.isI()) {\n t1 = new Term.Mul(Term.TYPE_I, t1, t2);\n } else if (!isTypeChecking()) {\n t1 = new Term.Mul(t1.isD() || t2.isD() ? Term.TYPE_D : Term.TYPE_I, t1, t2);\n } else {\n reportTypeErrorN2(\"'*'\");\n }\n } else if (tt == '/') {\n Term t2 = parseUnary(true);\n if (t1.isD() && t2.isN() || t1.isN() && t2.isD()) {\n t1 = new Term.Div(Term.TYPE_D, t1, t2);\n } else if (t1.isI() && t2.isI()) {\n t1 = new Term.Div(Term.TYPE_I, t1, t2);\n } else if (!isTypeChecking()) {\n t1 = new Term.Div(t1.isD() || t2.isD() ? Term.TYPE_D : Term.TYPE_I, t1, t2);\n } else {\n reportTypeErrorN2(\"'/'\");\n }\n } else if (tt == '%') {\n Term t2 = parseUnary(true);\n if (t1.isD() && t2.isN() || t1.isN() && t2.isD()) {\n t1 = new Term.Mod(Term.TYPE_D, t1, t2);\n } else if (t1.isI() && t2.isI()) {\n t1 = new Term.Mod(Term.TYPE_I, t1, t2);\n } else if (!isTypeChecking()) {\n t1 = new Term.Mod(t1.isD() || t2.isD() ? Term.TYPE_D : Term.TYPE_I, t1, t2);\n } else {\n reportTypeErrorN2(\"'%'\");\n }\n } else {\n _tokenizer.pushBack();\n break;\n }\n }\n return t1;\n }", "public void multiply()\r\n {\r\n resultDoubles = Operations.multiply(leftOperand, rightOperand);\r\n resultResetHelper();\r\n }", "public Mult(String left, String right) {\n super(left, right);\n }", "public Multiplication(Expression l, Expression r) {\n\tleft = l;\n\tright = r;\n }", "public AncientEgyptianMultiplication( ) {\r\n }", "abstract int multiplication(int num1, int num2);", "public void testMultiply() {\r\n System.out.println(\"Multiply\");\r\n Double [][] n = new Double[][]{{-3., -2.5, -1., 0., 1., 2., 3.4, 3.5, 1.1E100, -1.1E100}, \r\n {-3., 2.5, 0., 0., 1., -2., 3., 3.7, 1.1E100, 1.1E100}, \r\n {9., -6.25, 0., 0., 1., -4., 10.2, 12.95, 1.21E200, -1.21E200}};\r\n for(int i = 0; i < 10; i++){\r\n Double x = n[0][i];\r\n Double y = n[1][i];\r\n double expResult = n[2][i];\r\n double result = MathOp.Multiply(x, y);\r\n assertEquals(expResult, result, 0.001);\r\n }\r\n }", "@Override\n public Expression differentiate(String var) {\n Expression left = super.getLeft();\n Expression right = super.getRight();\n return new Plus(new Mult(left.differentiate(var), right), new Mult(left, right.differentiate(var)));\n }", "public final Expr addExpr() throws RecognitionException {\n\t\tExpr e = null;\n\n\n\t\tToken PLUS13=null;\n\t\tToken MINUS14=null;\n\t\tExpr e1 =null;\n\t\tExpr e2 =null;\n\n\n\t\t\t\tExpr it = null;\n\t\t\t\tBoolean bool = false;\n\t\t\t\tint line = -1;\n\t\t\t\tint offset = -1;\n\t\t\t\n\t\ttry {\n\t\t\t// ul.g:173:2: (e1= multExpr ( ( PLUS | MINUS ) e2= multExpr )* )\n\t\t\t// ul.g:174:3: e1= multExpr ( ( PLUS | MINUS ) e2= multExpr )*\n\t\t\t{\n\t\t\tpushFollow(FOLLOW_multExpr_in_addExpr710);\n\t\t\te1=multExpr();\n\t\t\tstate._fsp--;\n\t\t\tif (state.failed) return e;\n\t\t\tif ( state.backtracking==0 ) {it = e1;}\n\t\t\t// ul.g:175:3: ( ( PLUS | MINUS ) e2= multExpr )*\n\t\t\tloop14:\n\t\t\twhile (true) {\n\t\t\t\tint alt14=2;\n\t\t\t\tint LA14_0 = input.LA(1);\n\t\t\t\tif ( (LA14_0==MINUS||LA14_0==PLUS) ) {\n\t\t\t\t\talt14=1;\n\t\t\t\t}\n\n\t\t\t\tswitch (alt14) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// ul.g:175:4: ( PLUS | MINUS ) e2= multExpr\n\t\t\t\t\t{\n\t\t\t\t\t// ul.g:175:4: ( PLUS | MINUS )\n\t\t\t\t\tint alt13=2;\n\t\t\t\t\tint LA13_0 = input.LA(1);\n\t\t\t\t\tif ( (LA13_0==PLUS) ) {\n\t\t\t\t\t\talt13=1;\n\t\t\t\t\t}\n\t\t\t\t\telse if ( (LA13_0==MINUS) ) {\n\t\t\t\t\t\talt13=2;\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (state.backtracking>0) {state.failed=true; return e;}\n\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\tnew NoViableAltException(\"\", 13, 0, input);\n\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t}\n\n\t\t\t\t\tswitch (alt13) {\n\t\t\t\t\t\tcase 1 :\n\t\t\t\t\t\t\t// ul.g:175:5: PLUS\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tPLUS13=(Token)match(input,PLUS,FOLLOW_PLUS_in_addExpr718); if (state.failed) return e;\n\t\t\t\t\t\t\tif ( state.backtracking==0 ) {line = (PLUS13!=null?PLUS13.getLine():0); offset = PLUS13.getCharPositionInLine();}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2 :\n\t\t\t\t\t\t\t// ul.g:175:70: MINUS\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tMINUS14=(Token)match(input,MINUS,FOLLOW_MINUS_in_addExpr721); if (state.failed) return e;\n\t\t\t\t\t\t\tif ( state.backtracking==0 ) {line = (MINUS14!=null?MINUS14.getLine():0); offset = MINUS14.getCharPositionInLine();}\n\t\t\t\t\t\t\tif ( state.backtracking==0 ) {bool = true;}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tpushFollow(FOLLOW_multExpr_in_addExpr730);\n\t\t\t\t\te2=multExpr();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return e;\n\t\t\t\t\tif ( state.backtracking==0 ) {it = new AddExpr(it, e2, bool, line, offset);}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault :\n\t\t\t\t\tbreak loop14;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( state.backtracking==0 ) {\n\t\t\t\t\te = it;\n\t\t\t\t}\n\t\t}\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\trecover(input,re);\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn e;\n\t}", "public static void main(String[] args) {\n NumberFact a, b;\n a = new NumberFact(1_000);\n b = new NumberFact(999);\n\n ArithmeticOperator x, y;\n x = new ArithmeticOperator('*', a, b);\n y = new ArithmeticOperator('+', x, b);\n\n System.out.println(y);\n System.out.println(y.eval());\n }", "private void createMul(Code32 code, int op, int cond, int Rd, int Rn, int Rm) {\r\n\t\tcode.instructions[code.iCount] = (cond << 28) | op | (Rd << 16) | (Rm << 8) | (0x9 << 4) | Rn;\r\n\t\tcode.incInstructionNum();\r\n\t}", "public static BinaryExpression multiplyAssign(Expression expression0, Expression expression1) {\n return makeBinary(ExpressionType.MultiplyAssign, expression0, expression1);\n }", "LengthScalarMultiply createLengthScalarMultiply();", "public final CQLParser.multiplicativeExpression_return multiplicativeExpression() throws RecognitionException {\n CQLParser.multiplicativeExpression_return retval = new CQLParser.multiplicativeExpression_return();\n retval.start = input.LT(1);\n\n Object root_0 = null;\n\n Token set100=null;\n CQLParser.powerExpression_return powerExpression99 = null;\n\n CQLParser.powerExpression_return powerExpression101 = null;\n\n\n Object set100_tree=null;\n\n try {\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:404:2: ( powerExpression ( ( MULT | DIV ) powerExpression )* )\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:404:4: powerExpression ( ( MULT | DIV ) powerExpression )*\n {\n root_0 = (Object)adaptor.nil();\n\n pushFollow(FOLLOW_powerExpression_in_multiplicativeExpression1886);\n powerExpression99=powerExpression();\n\n state._fsp--;\n\n adaptor.addChild(root_0, powerExpression99.getTree());\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:404:20: ( ( MULT | DIV ) powerExpression )*\n loop27:\n do {\n int alt27=2;\n int LA27_0 = input.LA(1);\n\n if ( ((LA27_0>=MULT && LA27_0<=DIV)) ) {\n alt27=1;\n }\n\n\n switch (alt27) {\n \tcase 1 :\n \t // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:404:21: ( MULT | DIV ) powerExpression\n \t {\n \t set100=(Token)input.LT(1);\n \t set100=(Token)input.LT(1);\n \t if ( (input.LA(1)>=MULT && input.LA(1)<=DIV) ) {\n \t input.consume();\n \t root_0 = (Object)adaptor.becomeRoot((Object)adaptor.create(set100), root_0);\n \t state.errorRecovery=false;\n \t }\n \t else {\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t throw mse;\n \t }\n\n \t pushFollow(FOLLOW_powerExpression_in_multiplicativeExpression1896);\n \t powerExpression101=powerExpression();\n\n \t state._fsp--;\n\n \t adaptor.addChild(root_0, powerExpression101.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop27;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (Object)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n \t\n \tcatch(RecognitionException re)\n \t{\t\n \t\treportError(re);\n \t\tthrow re;\n \t}\n finally {\n }\n return retval;\n }", "Sum getMultiplier();", "public MathEval() {\r\n super();\r\n\r\n constants=new TreeMap<String,Double>(String.CASE_INSENSITIVE_ORDER);\r\n setConstant(\"E\" ,Math.E);\r\n setConstant(\"Euler\" ,0.577215664901533D);\r\n setConstant(\"LN2\" ,0.693147180559945D);\r\n setConstant(\"LN10\" ,2.302585092994046D);\r\n setConstant(\"LOG2E\" ,1.442695040888963D);\r\n setConstant(\"LOG10E\",0.434294481903252D);\r\n setConstant(\"PHI\" ,1.618033988749895D);\r\n setConstant(\"PI\" ,Math.PI);\r\n\r\n variables=new TreeMap<String,Double>(String.CASE_INSENSITIVE_ORDER);\r\n\r\n functions=new TreeMap<String,FunctionHandler>(String.CASE_INSENSITIVE_ORDER);\r\n\r\n offset=0;\r\n isConstant=false;\r\n }", "private ASTNode binaryMultiplyRules(ASTNode left, ASTNode right) throws Exception {\n Token leftToken = left.getToken();\n Token rightToken = right.getToken();\n\n TokenType leftType = leftToken.getType();\n TokenType rightType = rightToken.getType();\n\n Token tempToken;\n TokenType numType = TokenType.NUMBER;\n TokenType minusType = TokenType.MINUS;\n TokenType mulType = TokenType.MUL;\n\n if (rightToken.getIdentifier().equals(\"0\")){\n //left is anything and right is 0\n tempToken = new Token(numType, \"0\");\n return new Num(tempToken);\n }\n else if (rightToken.getIdentifier().equals(\"1\")){\n //left is anything and right is 1\n return left;\n }\n else if (leftToken.getIdentifier().equals(\"0\")){\n //left is 0 and right is anything\n tempToken = new Token(numType, \"0\");\n return new Num(tempToken);\n }\n else if (leftToken.getIdentifier().equals(\"1\")){\n //left is 1 and right is anything\n return right;\n }\n else if(patternMatcher(leftType, rightType, numType, numType)){\n Double leftVal = Double.parseDouble(leftToken.getIdentifier());\n Double rightVal = Double.parseDouble(rightToken.getIdentifier());\n\n String prod = String.valueOf(leftVal * rightVal);\n tempToken = new Token(numType, prod);\n return new Num(tempToken);\n }\n else if (patternMatcher(leftType, rightType, minusType, minusType)){\n if (left instanceof UnaryOP && right instanceof UnaryOP){\n tempToken = new Token(mulType);\n ASTNode leftOP = ((UnaryOP) left).getOperand();\n ASTNode rightOp = ((UnaryOP) right).getOperand();\n return new BinaryOp(tempToken, leftOP, rightOp);\n }\n }\n tempToken = new Token(mulType);\n return new BinaryOp(tempToken ,left, right);\n }", "public static Rational multiply(Rational num1, Rational num2){\r\n Rational product = new Rational();\r\n \r\n // multiply throughout\r\n product.denominator = num1.getDenominator() * num2.getDenominator();\r\n product.numerator = num1.getNumerator() * num2.getNumerator();\r\n \r\n product.reduce();\r\n return product;\r\n }", "Matrix scalarMult(double x){\n int newMatrixSize = this.getSize();\n Matrix newM = new Matrix(newMatrixSize);\n for(int i = 1; i <= newMatrixSize; i++){\n List itRow = rows[i - 1];\n itRow.moveFront();\n while(itRow.index() != -1){\n Entry c = (Entry)itRow.get();\n newM.changeEntry(i, c.column, (x*c.value));\n itRow.moveNext();\n }\n }\n\n return newM;\n }", "@Override\n\tpublic Instruction parse(String[] s) throws WrongInstructionFormatException {\n\t\tif (s.length==1 && s[0].equalsIgnoreCase(\"mult\")) \n\t\t\treturn new Mult();\n\t\telse throw new WrongInstructionFormatException();\n\t}", "@Override\n public InterpreterValue mul(InterpreterValue v) {\n\n // If the given value is a IntegerValue create a new DoubleValue from\n // the multiplication-result\n if(v instanceof IntegerValue) return new DoubleValue(getValue() * ((IntegerValue) v).getValue());\n\n // If the given value is a DoubleValue create a new DoubleValue from\n // the multiplication-result\n if(v instanceof DoubleValue) return new DoubleValue(getValue() * ((DoubleValue) v).getValue());\n\n // In other case just throw an error\n throw new Error(\"Operator '*' is not defined for type double and \" + v.getName());\n\n }", "public final Expr mulExpr() throws RecognitionException {\r\n Expr result = null;\r\n\r\n int mulExpr_StartIndex = input.index();\r\n\r\n Token op=null;\r\n Expr lhs =null;\r\n\r\n Expr rhs =null;\r\n\r\n\r\n try {\r\n if ( state.backtracking>0 && alreadyParsedRule(input, 14) ) { return result; }\r\n\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:108:5: (lhs= unExpr (op= ( '*' | '/' ) rhs= unExpr )* )\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:108:9: lhs= unExpr (op= ( '*' | '/' ) rhs= unExpr )*\r\n {\r\n pushFollow(FOLLOW_unExpr_in_mulExpr613);\r\n lhs=unExpr();\r\n\r\n state._fsp--;\r\n if (state.failed) return result;\r\n\r\n if ( state.backtracking==0 ) { result =lhs; }\r\n\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:108:45: (op= ( '*' | '/' ) rhs= unExpr )*\r\n loop9:\r\n do {\r\n int alt9=2;\r\n int LA9_0 = input.LA(1);\r\n\r\n if ( (LA9_0==23||LA9_0==26) ) {\r\n alt9=1;\r\n }\r\n\r\n\r\n switch (alt9) {\r\n \tcase 1 :\r\n \t // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:108:47: op= ( '*' | '/' ) rhs= unExpr\r\n \t {\r\n \t op=(Token)input.LT(1);\r\n\r\n \t if ( input.LA(1)==23||input.LA(1)==26 ) {\r\n \t input.consume();\r\n \t state.errorRecovery=false;\r\n \t state.failed=false;\r\n \t }\r\n \t else {\r\n \t if (state.backtracking>0) {state.failed=true; return result;}\r\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\r\n \t throw mse;\r\n \t }\r\n\r\n\r\n \t pushFollow(FOLLOW_unExpr_in_mulExpr633);\r\n \t rhs=unExpr();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return result;\r\n\r\n \t if ( state.backtracking==0 ) { \r\n \t if ((op!=null?op.getText():null).equals(\"*\")) {\r\n \t result = new Mul(result, rhs);\r\n \t }\r\n \t if ((op!=null?op.getText():null).equals(\"/\")) {\r\n \t result = new Div(result, rhs); \r\n \t }\r\n \t }\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop9;\r\n }\r\n } while (true);\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n if ( state.backtracking>0 ) { memoize(input, 14, mulExpr_StartIndex); }\r\n\r\n }\r\n return result;\r\n }", "public static EquationExpression timesRaw(EquationExpression... args) {\n\t\tswitch (args.length) {\n\t\tcase 0:\n\t\t\treturn EquationNumericValue.from(1);\n\t\tcase 1:\n\t\t\treturn args[0];\n\t\tcase 2:\n\t\t\treturn new EquationProductOperator(args[0], args[1]);\n\t\tdefault:\n\t\t\tEquationExpression[] args2 = new EquationExpression[args.length\n\t\t\t\t\t- 1];\n\t\t\tSystem.arraycopy(args, 1, args2, 0, args.length - 1);\n\t\t\treturn new EquationProductOperator(args[0], sumRaw(args2));\n\t\t}\n\t}", "public final void entryRuleMultExp() throws RecognitionException {\n try {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1377:1: ( ruleMultExp EOF )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1378:1: ruleMultExp EOF\n {\n before(grammarAccess.getMultExpRule()); \n pushFollow(FOLLOW_ruleMultExp_in_entryRuleMultExp2881);\n ruleMultExp();\n\n state._fsp--;\n\n after(grammarAccess.getMultExpRule()); \n match(input,EOF,FOLLOW_EOF_in_entryRuleMultExp2888); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }", "public static EquationExpression timesRaw(EquationExpression... args) {\n switch(args.length) {\n case 0:\n return EquationNumericValue.from(1);\n case 1:\n return args[0];\n case 2:\n return new EquationProductOperator(args[0], args[1]);\n default:\n EquationExpression[] args2 = new EquationExpression[args.length-1];\n System.arraycopy(args, 1, args2, 0, args.length-1);\n return new EquationProductOperator(args[0], sumRaw(args2));\n }\n }", "public final void mult (Unit unit) throws ArithmeticException {\n\t\tlong u = mksa ; double r = factor; double v = value; double o = offset;\n\t\t/* dump(\"mult:this \"); unit.dump(\"mult:unit\"); */\n\t\tif (((mksa&_abs)!=0) && (unit.factor != 1)) throw\t// On a date\n\t\tnew ArithmeticException(\"****Unit.mult on a date!\");\n\t\tif (((mksa|unit.mksa)&_log) != 0) {\n\t\t\tif ((mksa == underScore) && (factor == 1.)) ;\n\t\t\telse if ((unit.mksa == underScore) && (unit.factor == 1.)) ;\n\t\t\telse throw new ArithmeticException\n\t\t\t(\"****Unit: can't multiply logs: \" + symbol + \" x \" + unit.symbol);\n\t\t}\n\t\t/* As soon as there is an operation, the offset is ignored \n\t\t * except if one of the factors is unity.\n\t\t */\n\t\tif ((offset!=0) || (unit.offset!=0)) {\n\t\t\tif (mksa == underScore) offset = unit.offset;\n\t\t\telse if (unit.mksa == underScore) ;\n\t\t\telse offset = 0;\n\t\t}\n\t\tv *= unit.value; \n\t\tr *= unit.factor;\n\t\tu += unit.mksa; u -= underScore;\n\t\tif ((u&0x0c80808080808080L) != 0) throw new ArithmeticException\n\t\t(\"****too large powers in: \" + symbol + \" x \" + unit.symbol);\n\t\tmksa = u;\n\t\tfactor = r;\n\t\tvalue = v;\n\t\t/* Decision for the new symbol */\n\t\tif ((symbol != null) && (unit.symbol != null)) {\n\t\t\tif ((unit.mksa == underScore) && (unit.factor == 1)) return;\t// No unit ...\n\t\t\tif (( mksa == underScore) && ( factor == 1)) symbol = unit.symbol;\n\t\t\telse if ((symbol.equals(unit.symbol)) && (factor == unit.factor))\n\t\t\t\tsymbol = toExpr(symbol) + \"2\" ;\n\t\t\telse symbol = toExpr(symbol) + \".\" + toExpr(unit.symbol) ;\n\t\t}\n\t}", "public final Expr addExpr() throws RecognitionException {\n Expr result = null;\n\n int addExpr_StartIndex = input.index();\n\n Token op=null;\n Expr lhs =null;\n\n Expr rhs =null;\n\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 11) ) { return result; }\n\n // /home/jahn/workspace1/QLAndroid/src/org/uva/sea/ql/parser/antlr/QL.g:124:5: (lhs= mulExpr (op= ( '+' | '-' ) rhs= mulExpr )* )\n // /home/jahn/workspace1/QLAndroid/src/org/uva/sea/ql/parser/antlr/QL.g:124:9: lhs= mulExpr (op= ( '+' | '-' ) rhs= mulExpr )*\n {\n pushFollow(FOLLOW_mulExpr_in_addExpr547);\n lhs=mulExpr();\n\n state._fsp--;\n if (state.failed) return result;\n\n if ( state.backtracking==0 ) { result =lhs; }\n\n // /home/jahn/workspace1/QLAndroid/src/org/uva/sea/ql/parser/antlr/QL.g:124:46: (op= ( '+' | '-' ) rhs= mulExpr )*\n loop8:\n do {\n int alt8=2;\n int LA8_0 = input.LA(1);\n\n if ( ((LA8_0 >= 21 && LA8_0 <= 22)) ) {\n alt8=1;\n }\n\n\n switch (alt8) {\n \tcase 1 :\n \t // /home/jahn/workspace1/QLAndroid/src/org/uva/sea/ql/parser/antlr/QL.g:124:48: op= ( '+' | '-' ) rhs= mulExpr\n \t {\n \t op=(Token)input.LT(1);\n\n \t if ( (input.LA(1) >= 21 && input.LA(1) <= 22) ) {\n \t input.consume();\n \t state.errorRecovery=false;\n \t state.failed=false;\n \t }\n \t else {\n \t if (state.backtracking>0) {state.failed=true; return result;}\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t throw mse;\n \t }\n\n\n \t pushFollow(FOLLOW_mulExpr_in_addExpr565);\n \t rhs=mulExpr();\n\n \t state._fsp--;\n \t if (state.failed) return result;\n\n \t if ( state.backtracking==0 ) { \n \t if ((op!=null?op.getText():null).equals(\"+\")) {\n \t result = new Add(result, rhs);\n \t }\n \t if ((op!=null?op.getText():null).equals(\"-\")) {\n \t result = new Sub(result, rhs); \n \t }\n \t }\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop8;\n }\n } while (true);\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n\n finally {\n \t// do for sure before leaving\n if ( state.backtracking>0 ) { memoize(input, 11, addExpr_StartIndex); }\n\n }\n return result;\n }", "Point mult (double s, Point result);", "@Override\r\n\tpublic void mul(int x, int y) {\n\t\t\r\n\t}", "@Override\r\n\tpublic int multi(int x, int y) {\n\t\treturn x * y;\r\n\t}", "CalcEvaluator(boolean mult) {\r\n this.mult = mult;\r\n }", "@Override\r\n\tpublic int mul() {\n\t\treturn 0;\r\n\t}", "public final void mMUL() throws RecognitionException\n\t{\n\t\ttry\n\t\t{\n\t\t\tfinal int _type = AshvmLexer.MUL;\n\t\t\tfinal int _channel = BaseRecognizer.DEFAULT_TOKEN_CHANNEL;\n\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:708:5: ( 'mul' )\n\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:708:7: 'mul'\n\t\t\t{\n\t\t\t\tthis.match(\"mul\");\n\n\t\t\t}\n\n\t\t\tthis.state.type = _type;\n\t\t\tthis.state.channel = _channel;\n\t\t}\n\t\tfinally\n\t\t{\n\t\t}\n\t}", "public double multiplica(double a, double b) {\n\t\treturn a*b;\n\t}", "public R3Mult(int rdIndex, int rsIndex, int id) {\n\n }", "@Override\n\tpublic int mult(int val1, int val2) {\n\t\treturn val1 * val2;\n\t}", "public final void rule__AddExp__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:8253:1: ( ( ruleMultExp ) )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:8254:1: ( ruleMultExp )\n {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:8254:1: ( ruleMultExp )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:8255:1: ruleMultExp\n {\n before(grammarAccess.getAddExpAccess().getMultExpParserRuleCall_0()); \n pushFollow(FOLLOW_ruleMultExp_in_rule__AddExp__Group__0__Impl16577);\n ruleMultExp();\n\n state._fsp--;\n\n after(grammarAccess.getAddExpAccess().getMultExpParserRuleCall_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "<C, PM> VariableExp<C, PM> createVariableExp();", "public final double multExpr() throws RecognitionException {\n double value = 0.0;\n\n\n double e =0.0;\n\n\n try {\n // ExprInterp.g:32:5: (e= atom ( '*' e= atom )* )\n // ExprInterp.g:32:9: e= atom ( '*' e= atom )*\n {\n pushFollow(FOLLOW_atom_in_multExpr248);\n e=atom();\n\n state._fsp--;\n\n\n value = e;\n\n // ExprInterp.g:32:37: ( '*' e= atom )*\n loop5:\n do {\n int alt5=2;\n int LA5_0 = input.LA(1);\n\n if ( (LA5_0==12) ) {\n alt5=1;\n }\n\n\n switch (alt5) {\n \tcase 1 :\n \t // ExprInterp.g:32:38: '*' e= atom\n \t {\n \t match(input,12,FOLLOW_12_in_multExpr253); \n\n \t pushFollow(FOLLOW_atom_in_multExpr257);\n \t e=atom();\n\n \t state._fsp--;\n\n\n \t value *= e;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop5;\n }\n } while (true);\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n\n finally {\n \t// do for sure before leaving\n }\n return value;\n }", "private Complex eval(Complex[] ca, Complex x) {\n\t\tComplex result = ca[0];\n\t\tfor (int i = 1; i < ca.length; i++) {\n\t\t\tresult = result.mul(x).add(ca[i]);\n\t\t}\n\t\treturn result;\n\t}", "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 }", "private static native double mul(int n);", "private String compute(String equ,String op)\n {\n String equation = equ;\n Pattern mdPattern = Pattern.compile(\"(\\\\d+([.]\\\\d+)*)(([\"+op+\"]))(\\\\d+([.]\\\\d+)*)\");\n Matcher matcher\t\t= mdPattern.matcher(equation);\n while(matcher.find())\n {\n String[] arr = null;\n double ans = 0;\n String eq = matcher.group(0);//get form x*y\n if(eq.contains(op))\n {\n arr = eq.split(\"\\\\\"+op);//make arr\n if(op.equals(\"*\"))\n ans = Double.valueOf(arr[0])*Double.valueOf(arr[1]);//compute\n if(op.equals(\"/\"))\n ans = Double.valueOf(arr[0])/Double.valueOf(arr[1]);//compute\n if(op.equals(\"+\"))\n ans = Double.valueOf(arr[0])+Double.valueOf(arr[1]);//compute\n if(op.equals(\"-\"))\n ans = Double.valueOf(arr[0])-Double.valueOf(arr[1]);//compute\n }\n\n equation = matcher.replaceFirst(String.valueOf(ans));//replace in equation\n matcher = mdPattern.matcher(equation);//look for more matches\n }\n return equation;\n }", "public void multiply(Object mulValue) {\r\n\r\n\t\tNumberOperation operator = new NumberOperation(this.value, mulValue) {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic Number doAnOperation() {\r\n\t\t\t\tTypeEnum typeOfResult = getFinalType();\r\n\t\t\t\tif(typeOfResult == TypeEnum.TYPE_INTEGER) {\r\n\t\t\t\t\treturn getO1().intValue() * getO2().intValue();\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\treturn getO1().doubleValue() * getO2().doubleValue();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t\tthis.value = operator.doAnOperation();\r\n\t}", "public void mul(String a, String b, int i, String reg) {\r\n registerName.add(reg);\r\n int posa = registerRegister.indexOf(a);\r\n int posb = registerRegister.indexOf(b);\r\n int element = Integer.parseInt(registerValues.get(posa));\r\n int element1 = Integer.parseInt(registerValues.get(posb));\r\n int mul = element * element1;\r\n registerValues.add(Integer.toString(mul));\r\n }", "public static void main(String args[]) {\n\tExpr e3 = new Minus(new Num(100),new Num(99));\n\tSystem.out.println(\"e3 is \" + e3.exprToString());\n\t// outputs \"e4 is (4*5-(100-99))\"\n\tExpr e4 = new Minus(new Times(new Num(4),new Num(5)),e3);\n\tSystem.out.println(\"e4 is \" + e4.exprToString());\n }", "public void multiply(double multiplier) {\n x *= multiplier;\n y *= multiplier;\n }", "public final void synpred27_expression_fragment() throws RecognitionException { \n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:11: ( ( '+' | '-' ) mult )\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:11: ( '+' | '-' ) mult\n {\n if ( (input.LA(1)>=46 && input.LA(1)<=47) ) {\n input.consume();\n state.errorRecovery=false;state.failed=false;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n MismatchedSetException mse = new MismatchedSetException(null,input);\n throw mse;\n }\n\n pushFollow(FOLLOW_mult_in_synpred27_expression437);\n mult();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n }", "Rational multiply(Rational p){\n Rational firstarg=new Rational();\n firstarg.numerator=numerator;\n firstarg.denominator=denominator;\n\n firstarg.numerator=p.numerator*firstarg.numerator;\n firstarg.denominator=p.denominator*firstarg.denominator;\n return firstarg;\n }" ]
[ "0.7181631", "0.68503803", "0.6790717", "0.6790717", "0.6718155", "0.66223747", "0.652588", "0.6455302", "0.64260405", "0.64144236", "0.6232391", "0.6115367", "0.6111778", "0.60639083", "0.6034308", "0.6033243", "0.60050446", "0.59940916", "0.59714967", "0.5948733", "0.59275883", "0.5921516", "0.5917229", "0.5885147", "0.586182", "0.5822785", "0.57923794", "0.57901585", "0.5735209", "0.57311654", "0.5702553", "0.5684613", "0.5664936", "0.5660687", "0.56234497", "0.56182367", "0.561346", "0.56086016", "0.56073177", "0.56045586", "0.55791", "0.55628836", "0.55539525", "0.5548122", "0.55374306", "0.5534907", "0.55216366", "0.55140185", "0.55081743", "0.5506326", "0.550098", "0.54962754", "0.5475454", "0.5467444", "0.54569995", "0.54563373", "0.545157", "0.5443804", "0.54349643", "0.5432829", "0.5425125", "0.54076123", "0.53838795", "0.53804964", "0.5371134", "0.5369893", "0.536355", "0.53377384", "0.53327096", "0.5320211", "0.5312281", "0.53076506", "0.5305729", "0.5295618", "0.5291171", "0.5280109", "0.5274615", "0.5272919", "0.52650696", "0.5262574", "0.525891", "0.52562183", "0.52480155", "0.524484", "0.5244491", "0.5242352", "0.5237318", "0.52316725", "0.52311546", "0.5228757", "0.5227981", "0.52118284", "0.5206945", "0.52025", "0.52004564", "0.5195726", "0.5194222", "0.51936", "0.51799154", "0.51777357" ]
0.5466194
54
Constructs a mult by given expressions.
public Mult(String left, String right) { super(left, right); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Expression multExpression() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tExpression e0 = powerExpression();\r\n\t\twhile(isKind(OP_TIMES, OP_DIV, OP_MOD)) {\r\n\t\t\tToken op = consume();\r\n\t\t\tExpression e1 = powerExpression();\r\n\t\t\te0 = new ExpressionBinary(first,e0,op,e1);\r\n\t\t}\r\n\t\treturn e0;\r\n\t}", "private Expr mult(Expr x) throws Err {\n if (x instanceof ExprUnary) {\n ExprUnary y=(ExprUnary)x;\n if (y.op==ExprUnary.Op.SOME) return ExprUnary.Op.SOMEOF.make(y.pos, y.sub);\n if (y.op==ExprUnary.Op.LONE) return ExprUnary.Op.LONEOF.make(y.pos, y.sub);\n if (y.op==ExprUnary.Op.ONE) return ExprUnary.Op.ONEOF.make(y.pos, y.sub);\n }\n return x;\n }", "public Mult(Expression left, Expression right) {\n super(left, right);\n }", "public Mult(Expression left, Expression right) {\n super(left, right);\n }", "Multiply createMultiply();", "public final VecMathParser.expr_return expr() throws RecognitionException {\n VecMathParser.expr_return retval = new VecMathParser.expr_return();\n retval.start = input.LT(1);\n\n Object root_0 = null;\n\n Token char_literal8=null;\n VecMathParser.multExpr_return multExpr7 = null;\n\n VecMathParser.multExpr_return multExpr9 = null;\n\n\n Object char_literal8_tree=null;\n\n try {\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:15:5: ( multExpr ( '+' multExpr )* )\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:15:7: multExpr ( '+' multExpr )*\n {\n root_0 = (Object)adaptor.nil();\n\n pushFollow(FOLLOW_multExpr_in_expr117);\n multExpr7=multExpr();\n\n state._fsp--;\n\n adaptor.addChild(root_0, multExpr7.getTree());\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:15:16: ( '+' multExpr )*\n loop3:\n do {\n int alt3=2;\n int LA3_0 = input.LA(1);\n\n if ( (LA3_0==10) ) {\n alt3=1;\n }\n\n\n switch (alt3) {\n \tcase 1 :\n \t // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:15:17: '+' multExpr\n \t {\n \t char_literal8=(Token)match(input,10,FOLLOW_10_in_expr120); \n \t char_literal8_tree = (Object)adaptor.create(char_literal8);\n \t root_0 = (Object)adaptor.becomeRoot(char_literal8_tree, root_0);\n\n \t pushFollow(FOLLOW_multExpr_in_expr123);\n \t multExpr9=multExpr();\n\n \t state._fsp--;\n\n \t adaptor.addChild(root_0, multExpr9.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop3;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (Object)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "public Mult(String left, Expression right) {\n super(left, right);\n }", "public Mult(Expression left, double right) {\n super(left, right);\n }", "public Mult(double left, Expression right) {\n super(left, right);\n }", "public Mult(Expression left, String right) {\n super(left, right);\n }", "void visit(MultiplicationExpression expression);", "public BinMltLinExpr multiply(BinLinExpr expr) {\n\t\t\n\t\tBinMltLinExpr result = new BinMltLinExpr();\n\t\t\n\t\t// Multiply variables together\n\t\tfor (int i = 0; i < expr.vars.size(); i++) {\n\t\t\tfor (int j = 0; j < termVars.size(); j++) {\n\t\t\t\t\n\t\t\t\tdouble newCoeff = expr.coefficients.get(i) * coefficients.get(j);\n\t\t\t\tList<BinVar> newVars = new ArrayList<BinVar>();\n\t\t\t\tnewVars.add(expr.vars.get(i));\n\t\t\t\tnewVars.addAll(termVars.get(j));\n\t\t\t\t\n\t\t\t\tresult.addTerm(newCoeff, newVars);\n\t\t\t}\n\t\t}\n\n\t\t// Multiply variables with constants\n\t\tfor (int i = 0; i < termVars.size(); i++) {\n\t\t\tdouble newCoeff = coefficients.get(i) * expr.constant;\n\t\t\tresult.addTerm(newCoeff, termVars.get(i));\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < expr.vars.size(); i++) {\n\t\t\tdouble newCoeff = expr.coefficients.get(i) * constant;\n\t\t\tresult.addTerm(newCoeff, expr.vars.get(i));\n\t\t}\n\t\t\n\t\tresult.addConstant(constant*expr.constant);\n\t\t\n\t\treturn result;\n\t}", "public void enfoncerMult() {\n\t\ttry {\n\t\t\tthis.op = new Mult();\n\t\t\tif (!raz) {\n\t\t\t\tthis.pile.push(valC);\n\t\t\t}\n\t\t\tint a = this.pile.pop(); int b = this.pile.pop();\n\t\t\tthis.valC = this.op.eval(b,a);\n\t\t\tthis.pile.push(this.valC);\n\t\t\tthis.raz = true;\n\t\t}\n\t\tcatch (EmptyStackException e) {\n\t\t\tSystem.out.println(\"Erreur de syntaxe : Saisir deux operandes avant de saisir un operateur\");\n\t\t}\n\t}", "public Transformation mult(Transformation a) {\n\t\tTransformation result = new Transformation();\n\t\tsuper.mult(a, result);\n\t\treturn result;\n\t}", "private void mul() {\n\n\t}", "@Override\n public Expression assign(String var, Expression expression) {\n Expression left = super.getLeft();\n Expression right = super.getRight();\n return new Mult(left.assign(var, expression), right.assign(var, expression));\n }", "public void multiply() {\n\t\t\n\t}", "public static double multi() {\n System.out.println(\"Enter multiplier\");\n double a = getNumber();\n System.out.println(\"Enter multiplicand\");\n double b = getNumber();\n\n return a * b;\n }", "@SuppressWarnings(\"unchecked\")\n @Override\n public Expression asExpression(Rule rule, Deque<Value<Expression>> args) {\n if (args.size() == 1) {\n // a single term is not a product\n return args.pollFirst().getTarget();\n } else {\n // assume x to be *x, because the product will start by 1*x\n Term<Multiplicative> factor = new Term<>(Multiplicative.MULT, args.removeFirst().getTarget());\n List<Term<Multiplicative>> arguments = new LinkedList<>();\n arguments.add(factor);\n args.stream()\n // next arguments are all Term<Multiplicative>\n .map(v -> (Term<Multiplicative>) v.getTarget())\n .forEachOrdered(arguments::add);\n return new Product(arguments);\n }\n }", "public static void main(String[] args) throws Exception {\r\n Expression e = new Plus(new Mult(2, \"x\"), new Plus(new Sin(new Mult(4, \"y\")), new Pow(\"e\", \"x\")));\r\n System.out.println(e);\r\n Map<String, Double> assignment = new TreeMap<String, Double>();\r\n assignment.put(\"x\", 2.0);\r\n assignment.put(\"y\", 0.25);\r\n assignment.put(\"e\", 2.71);\r\n System.out.println(e.evaluate(assignment));\r\n e = e.differentiate(\"x\");\r\n System.out.println(e);\r\n System.out.println(e.evaluate(assignment));\r\n System.out.println(e.simplify());\r\n System.out.println(e);\r\n }", "public BinMltLinExpr multiply(BinMltLinExpr expr) {\n\t\t\n\t\tBinMltLinExpr result = new BinMltLinExpr();\n\t\t\n\t\t// Multiply variables together\n\t\tfor (int i = 0; i < expr.termVars.size(); i++) {\n\t\t\tfor (int j = 0; j < termVars.size(); j++) {\n\t\t\t\t\n\t\t\t\tdouble newCoeff = expr.coefficients.get(i) * coefficients.get(j);\n\t\t\t\tList<BinVar> newVars = new ArrayList<BinVar>();\n\t\t\t\tnewVars.addAll(expr.termVars.get(i));\n\t\t\t\tnewVars.addAll(termVars.get(j));\n\t\t\t\t\n\t\t\t\tresult.addTerm(newCoeff, newVars);\n\t\t\t}\n\t\t}\n\n\t\t// Multiply variables with constants\n\t\tfor (int i = 0; i < termVars.size(); i++) {\n\t\t\tdouble newCoeff = coefficients.get(i) * expr.constant;\n\t\t\tresult.addTerm(newCoeff, termVars.get(i));\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < expr.termVars.size(); i++) {\n\t\t\tdouble newCoeff = expr.coefficients.get(i) * constant;\n\t\t\tresult.addTerm(newCoeff, expr.termVars.get(i));\n\t\t}\n\t\t\n\t\tresult.addConstant(constant*expr.constant);\n\t\t\n\t\treturn result;\n\t}", "public final VecMathParser.multExpr_return multExpr() throws RecognitionException {\n VecMathParser.multExpr_return retval = new VecMathParser.multExpr_return();\n retval.start = input.LT(1);\n\n Object root_0 = null;\n\n Token char_literal11=null;\n Token char_literal12=null;\n VecMathParser.primary_return primary10 = null;\n\n VecMathParser.primary_return primary13 = null;\n\n\n Object char_literal11_tree=null;\n Object char_literal12_tree=null;\n\n try {\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:5: ( primary ( ( '*' | '.' ) primary )* )\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:9: primary ( ( '*' | '.' ) primary )*\n {\n root_0 = (Object)adaptor.nil();\n\n pushFollow(FOLLOW_primary_in_multExpr145);\n primary10=primary();\n\n state._fsp--;\n\n adaptor.addChild(root_0, primary10.getTree());\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:17: ( ( '*' | '.' ) primary )*\n loop5:\n do {\n int alt5=2;\n int LA5_0 = input.LA(1);\n\n if ( ((LA5_0>=11 && LA5_0<=12)) ) {\n alt5=1;\n }\n\n\n switch (alt5) {\n \tcase 1 :\n \t // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:18: ( '*' | '.' ) primary\n \t {\n \t // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:18: ( '*' | '.' )\n \t int alt4=2;\n \t int LA4_0 = input.LA(1);\n\n \t if ( (LA4_0==11) ) {\n \t alt4=1;\n \t }\n \t else if ( (LA4_0==12) ) {\n \t alt4=2;\n \t }\n \t else {\n \t NoViableAltException nvae =\n \t new NoViableAltException(\"\", 4, 0, input);\n\n \t throw nvae;\n \t }\n \t switch (alt4) {\n \t case 1 :\n \t // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:19: '*'\n \t {\n \t char_literal11=(Token)match(input,11,FOLLOW_11_in_multExpr149); \n \t char_literal11_tree = (Object)adaptor.create(char_literal11);\n \t root_0 = (Object)adaptor.becomeRoot(char_literal11_tree, root_0);\n\n\n \t }\n \t break;\n \t case 2 :\n \t // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:24: '.'\n \t {\n \t char_literal12=(Token)match(input,12,FOLLOW_12_in_multExpr152); \n \t char_literal12_tree = (Object)adaptor.create(char_literal12);\n \t root_0 = (Object)adaptor.becomeRoot(char_literal12_tree, root_0);\n\n\n \t }\n \t break;\n\n \t }\n\n \t pushFollow(FOLLOW_primary_in_multExpr156);\n \t primary13=primary();\n\n \t state._fsp--;\n\n \t adaptor.addChild(root_0, primary13.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop5;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (Object)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "@Override\n\tpublic void visit(MultiplyNode node) {\n\t\tif (Evaluator.checkScope(node) == false) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (Evaluator.checkAssert(node) == false) {\n\t\t\treturn;\n\t\t}\n\n\t\t/**\n\t\t * evaluam cei doi fii\n\t\t */\n\t\tEvaluator.evaluate(node.getChild(0));\n\t\tEvaluator.evaluate(node.getChild(1));\n\n\t\tInteger i, j;\n\t\t/**\n\t\t * salvam si inmultim valorile rezulate in urma evaluarii celor 2 fii si\n\t\t * setam valoarea corespunzatoare in nodul curent\n\t\t */\n\t\tif (node.getChild(1) instanceof Variable) {\n\t\t\ti = Integer.parseInt(Evaluator.variables.get(node.getChild(1).getName()));\n\n\t\t} else {\n\t\t\ti = Integer.parseInt(node.getChild(1).getName());\n\t\t}\n\n\t\tif (node.getChild(0) instanceof Variable) {\n\t\t\tj = Integer.parseInt(Evaluator.variables.get(node.getChild(0).getName()));\n\n\t\t} else {\n\t\t\tj = Integer.parseInt(node.getChild(0).getName());\n\t\t}\n\n\t\tInteger n = i * j;\n\n\t\tnode.setName(n.toString());\n\t}", "static Double executeMultiplication(List<Double> operands) {\n Double result = null;\n for (Double operand : operands) {\n if (Objects.isNull(result)) {\n result = operand;\n }\n else {\n result = result * operand;\n }\n }\n return result;\n }", "public Polynomial visit(ProductExpression expression) {\n return Polynomial.multiply(\n expression.getLeft().accept(this),\n expression.getRight().accept(this));\n }", "BaseNumber multiply(BaseNumber operand);", "public final Expr multExpr() throws RecognitionException {\n\t\tExpr e = null;\n\n\n\t\tToken STAR15=null;\n\t\tExpr e1 =null;\n\t\tExpr e2 =null;\n\n\n\t\t\t\tExpr it = null;\n\t\t\t\n\t\ttry {\n\t\t\t// ul.g:189:3: (e1= atom ( STAR e2= atom )* )\n\t\t\t// ul.g:190:2: e1= atom ( STAR e2= atom )*\n\t\t\t{\n\t\t\tpushFollow(FOLLOW_atom_in_multExpr768);\n\t\t\te1=atom();\n\t\t\tstate._fsp--;\n\t\t\tif (state.failed) return e;\n\t\t\tif ( state.backtracking==0 ) {it = e1;}\n\t\t\t// ul.g:191:2: ( STAR e2= atom )*\n\t\t\tloop15:\n\t\t\twhile (true) {\n\t\t\t\tint alt15=2;\n\t\t\t\tint LA15_0 = input.LA(1);\n\t\t\t\tif ( (LA15_0==STAR) ) {\n\t\t\t\t\talt15=1;\n\t\t\t\t}\n\n\t\t\t\tswitch (alt15) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// ul.g:191:4: STAR e2= atom\n\t\t\t\t\t{\n\t\t\t\t\tSTAR15=(Token)match(input,STAR,FOLLOW_STAR_in_multExpr775); if (state.failed) return e;\n\t\t\t\t\tpushFollow(FOLLOW_atom_in_multExpr781);\n\t\t\t\t\te2=atom();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return e;\n\t\t\t\t\tif ( state.backtracking==0 ) {it = new MultExpr(it, e2, (STAR15!=null?STAR15.getLine():0), STAR15.getCharPositionInLine());}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault :\n\t\t\t\t\tbreak loop15;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( state.backtracking==0 ) {\n\t\t\t\t\te = it;\n\t\t\t\t}\n\t\t}\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\trecover(input,re);\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn e;\n\t}", "public T mul(T first, T second);", "public final double expr() throws RecognitionException {\n double value = 0.0;\n\n\n double e =0.0;\n\n\n try {\n // ExprInterp.g:24:5: (e= multExpr ( '+' e= multExpr | '-' e= multExpr )* |e= maxF )\n int alt4=2;\n int LA4_0 = input.LA(1);\n\n if ( ((LA4_0 >= ID && LA4_0 <= LEFTP)||LA4_0==REL) ) {\n alt4=1;\n }\n else if ( (LA4_0==MAXI) ) {\n alt4=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 4, 0, input);\n\n throw nvae;\n\n }\n switch (alt4) {\n case 1 :\n // ExprInterp.g:24:9: e= multExpr ( '+' e= multExpr | '-' e= multExpr )*\n {\n pushFollow(FOLLOW_multExpr_in_expr155);\n e=multExpr();\n\n state._fsp--;\n\n\n value = e;\n\n // ExprInterp.g:25:9: ( '+' e= multExpr | '-' e= multExpr )*\n loop3:\n do {\n int alt3=3;\n int LA3_0 = input.LA(1);\n\n if ( (LA3_0==13) ) {\n alt3=1;\n }\n else if ( (LA3_0==15) ) {\n alt3=2;\n }\n\n\n switch (alt3) {\n \tcase 1 :\n \t // ExprInterp.g:25:13: '+' e= multExpr\n \t {\n \t match(input,13,FOLLOW_13_in_expr171); \n\n \t pushFollow(FOLLOW_multExpr_in_expr175);\n \t e=multExpr();\n\n \t state._fsp--;\n\n\n \t value += e;\n\n \t }\n \t break;\n \tcase 2 :\n \t // ExprInterp.g:26:13: '-' e= multExpr\n \t {\n \t match(input,15,FOLLOW_15_in_expr191); \n\n \t pushFollow(FOLLOW_multExpr_in_expr195);\n \t e=multExpr();\n\n \t state._fsp--;\n\n\n \t value -= e;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop3;\n }\n } while (true);\n\n\n }\n break;\n case 2 :\n // ExprInterp.g:28:8: e= maxF\n {\n pushFollow(FOLLOW_maxF_in_expr221);\n e=maxF();\n\n state._fsp--;\n\n\n value = e;\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n\n finally {\n \t// do for sure before leaving\n }\n return value;\n }", "public final void mul() {\n\t\tif (size > 1) {\n\n\t\t\tdouble topMostValue = pop();\n\t\t\tdouble secondTopMostValue = pop();\n\t\t\tpush(secondTopMostValue * topMostValue);\n\t\t}\n\t}", "public Mult(String left, double right) {\n super(left, right);\n }", "public static Transform mult(Transform t1, Transform t2) {\n\t\treturn transpose(t1.a * t2.a + t1.c * t2.b, t1.a * t2.c + t1.c * t2.d, t1.a * t2.tx + t1.c * t2.ty + t1.tx,\n\t\t\t\t\t\t t1.b * t2.a + t1.d * t2.b, t1.b * t2.c + t1.d * t2.d, t1.b * t2.tx + t1.d * t2.ty + t1.ty);\n\t}", "private void multiplication()\n\t{\n\t\tFun = Function.MULTIPLY; //Function set to determine what action should be taken later.\n\t\t\n\t\t\tsetLeftValue();\n\t\t\tentry.grabFocus();\n\t\t\n\t}", "public int mult()\r\n\t{\r\n\t\tint a=10;\r\n\t\tint b=20;\r\n\t\tint c = a*b;\r\n\t\treturn(c);\r\n\t}", "public Object visitMultiplicativeExpression(GNode n) {\n Object a, b, result;\n String op;\n \n nonboolean = true;\n \n dostring = true;\n \n a = dispatch(n.getGeneric(0));\n b = dispatch(n.getGeneric(2));\n op = n.getString(1);\n \n dostring = false;\n \n if (a instanceof Long && b instanceof Long) {\n if ((op.equals(\"/\")\n || op.equals(\"%\")) && ((Long) b).equals(new Long(0))) {\n System.err.println(\"division by zero in #if\");\n result = new Long(0);\n }\n if (op.equals(\"*\")) {\n result = (Long) a * (Long) b;\n }\n else if (op.equals(\"/\")) {\n result = (Long) a / (Long) b;\n }\n else if (op.equals(\"%\")) {\n result = (Long) a % (Long) b;\n }\n else {\n result = \"\";\n }\n }\n else {\n result = parens(a) + \" \" + op + \" \" + parens(b);\n }\n \n return result;\n }", "public static BinaryExpression multiply(Expression expression0, Expression expression1) {\n return makeBinary(ExpressionType.Multiply, expression0, expression1);\n }", "public T elementMult( T b ) {\n convertType.specify(this, b);\n T A = convertType.convert(this);\n b = convertType.convert(b);\n\n T c = A.createLike();\n A.ops.elementMult(A.mat, b.mat, c.mat);\n return c;\n }", "public Mult(double left, String right) {\n super(left, right);\n }", "public final expressionParser.add_return add() throws RecognitionException {\n expressionParser.add_return retval = new expressionParser.add_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n Token char_literal38=null;\n Token char_literal39=null;\n expressionParser.mult_return mult37 = null;\n\n expressionParser.mult_return mult40 = null;\n\n\n CommonTree char_literal38_tree=null;\n CommonTree char_literal39_tree=null;\n\n try {\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:3: ( mult ( ( '+' | '-' ) mult )* )\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:5: mult ( ( '+' | '-' ) mult )*\n {\n root_0 = (CommonTree)adaptor.nil();\n\n pushFollow(FOLLOW_mult_in_add424);\n mult37=mult();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, mult37.getTree());\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:10: ( ( '+' | '-' ) mult )*\n loop17:\n do {\n int alt17=2;\n alt17 = dfa17.predict(input);\n switch (alt17) {\n \tcase 1 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:11: ( '+' | '-' ) mult\n \t {\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:11: ( '+' | '-' )\n \t int alt16=2;\n \t int LA16_0 = input.LA(1);\n\n \t if ( (LA16_0==46) ) {\n \t alt16=1;\n \t }\n \t else if ( (LA16_0==47) ) {\n \t alt16=2;\n \t }\n \t else {\n \t if (state.backtracking>0) {state.failed=true; return retval;}\n \t NoViableAltException nvae =\n \t new NoViableAltException(\"\", 16, 0, input);\n\n \t throw nvae;\n \t }\n \t switch (alt16) {\n \t case 1 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:12: '+'\n \t {\n \t char_literal38=(Token)match(input,46,FOLLOW_46_in_add428); if (state.failed) return retval;\n \t if ( state.backtracking==0 ) {\n \t char_literal38_tree = (CommonTree)adaptor.create(char_literal38);\n \t root_0 = (CommonTree)adaptor.becomeRoot(char_literal38_tree, root_0);\n \t }\n\n \t }\n \t break;\n \t case 2 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:19: '-'\n \t {\n \t char_literal39=(Token)match(input,47,FOLLOW_47_in_add433); if (state.failed) return retval;\n \t if ( state.backtracking==0 ) {\n \t char_literal39_tree = (CommonTree)adaptor.create(char_literal39);\n \t root_0 = (CommonTree)adaptor.becomeRoot(char_literal39_tree, root_0);\n \t }\n\n \t }\n \t break;\n\n \t }\n\n \t pushFollow(FOLLOW_mult_in_add437);\n \t mult40=mult();\n\n \t state._fsp--;\n \t if (state.failed) return retval;\n \t if ( state.backtracking==0 ) adaptor.addChild(root_0, mult40.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop17;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "public Double eval(Double... operands);", "public <V extends Number> FluentExp<V> times (SQLExpression<V> expr)\n {\n return new Mul<V>(this, expr);\n }", "public static MathNode create(List<MathNode> nodes) {\n return new PowerNode(nodes);\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"MULT\";\n\t}", "NumericExpression createNumericExpression();", "abstract void mulS();", "public final expressionParser.mult_return mult() throws RecognitionException {\n expressionParser.mult_return retval = new expressionParser.mult_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n Token char_literal42=null;\n Token char_literal43=null;\n expressionParser.unary_return unary41 = null;\n\n expressionParser.unary_return unary44 = null;\n\n\n CommonTree char_literal42_tree=null;\n CommonTree char_literal43_tree=null;\n\n try {\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:3: ( unary ( ( '*' | '/' ) unary )* )\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:5: unary ( ( '*' | '/' ) unary )*\n {\n root_0 = (CommonTree)adaptor.nil();\n\n pushFollow(FOLLOW_unary_in_mult454);\n unary41=unary();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, unary41.getTree());\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:11: ( ( '*' | '/' ) unary )*\n loop19:\n do {\n int alt19=2;\n int LA19_0 = input.LA(1);\n\n if ( ((LA19_0>=48 && LA19_0<=49)) ) {\n alt19=1;\n }\n\n\n switch (alt19) {\n \tcase 1 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:12: ( '*' | '/' ) unary\n \t {\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:12: ( '*' | '/' )\n \t int alt18=2;\n \t int LA18_0 = input.LA(1);\n\n \t if ( (LA18_0==48) ) {\n \t alt18=1;\n \t }\n \t else if ( (LA18_0==49) ) {\n \t alt18=2;\n \t }\n \t else {\n \t if (state.backtracking>0) {state.failed=true; return retval;}\n \t NoViableAltException nvae =\n \t new NoViableAltException(\"\", 18, 0, input);\n\n \t throw nvae;\n \t }\n \t switch (alt18) {\n \t case 1 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:13: '*'\n \t {\n \t char_literal42=(Token)match(input,48,FOLLOW_48_in_mult458); if (state.failed) return retval;\n \t if ( state.backtracking==0 ) {\n \t char_literal42_tree = (CommonTree)adaptor.create(char_literal42);\n \t root_0 = (CommonTree)adaptor.becomeRoot(char_literal42_tree, root_0);\n \t }\n\n \t }\n \t break;\n \t case 2 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:20: '/'\n \t {\n \t char_literal43=(Token)match(input,49,FOLLOW_49_in_mult463); if (state.failed) return retval;\n \t if ( state.backtracking==0 ) {\n \t char_literal43_tree = (CommonTree)adaptor.create(char_literal43);\n \t root_0 = (CommonTree)adaptor.becomeRoot(char_literal43_tree, root_0);\n \t }\n\n \t }\n \t break;\n\n \t }\n\n \t pushFollow(FOLLOW_unary_in_mult467);\n \t unary44=unary();\n\n \t state._fsp--;\n \t if (state.failed) return retval;\n \t if ( state.backtracking==0 ) adaptor.addChild(root_0, unary44.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop19;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "public final Expr addExpr() throws RecognitionException {\r\n Expr result = null;\r\n\r\n int addExpr_StartIndex = input.index();\r\n\r\n Token op=null;\r\n Expr lhs =null;\r\n\r\n Expr rhs =null;\r\n\r\n\r\n try {\r\n if ( state.backtracking>0 && alreadyParsedRule(input, 15) ) { return result; }\r\n\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:121:5: (lhs= mulExpr (op= ( '+' | '-' ) rhs= mulExpr )* )\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:121:9: lhs= mulExpr (op= ( '+' | '-' ) rhs= mulExpr )*\r\n {\r\n pushFollow(FOLLOW_mulExpr_in_addExpr674);\r\n lhs=mulExpr();\r\n\r\n state._fsp--;\r\n if (state.failed) return result;\r\n\r\n if ( state.backtracking==0 ) { result =lhs; }\r\n\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:121:46: (op= ( '+' | '-' ) rhs= mulExpr )*\r\n loop10:\r\n do {\r\n int alt10=2;\r\n int LA10_0 = input.LA(1);\r\n\r\n if ( ((LA10_0 >= 24 && LA10_0 <= 25)) ) {\r\n alt10=1;\r\n }\r\n\r\n\r\n switch (alt10) {\r\n \tcase 1 :\r\n \t // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:121:48: op= ( '+' | '-' ) rhs= mulExpr\r\n \t {\r\n \t op=(Token)input.LT(1);\r\n\r\n \t if ( (input.LA(1) >= 24 && input.LA(1) <= 25) ) {\r\n \t input.consume();\r\n \t state.errorRecovery=false;\r\n \t state.failed=false;\r\n \t }\r\n \t else {\r\n \t if (state.backtracking>0) {state.failed=true; return result;}\r\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\r\n \t throw mse;\r\n \t }\r\n\r\n\r\n \t pushFollow(FOLLOW_mulExpr_in_addExpr692);\r\n \t rhs=mulExpr();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return result;\r\n\r\n \t if ( state.backtracking==0 ) { \r\n \t if ((op!=null?op.getText():null).equals(\"+\")) {\r\n \t result = new Add(result, rhs);\r\n \t }\r\n \t if ((op!=null?op.getText():null).equals(\"-\")) {\r\n \t result = new Sub(result, rhs); \r\n \t }\r\n \t }\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop10;\r\n }\r\n } while (true);\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n if ( state.backtracking>0 ) { memoize(input, 15, addExpr_StartIndex); }\r\n\r\n }\r\n return result;\r\n }", "public static double multi(double a, double b) {\n return a * b;\n }", "@Test\n public void testParseMul() {\n System.out.println(\"testParseMul\");\n byte[] expected = {\n Instruction.LV.getId(), 0, 0, 32,\n Instruction.LV.getId(), 0, 0, 36,\n Instruction.MUL.getId(),\n Instruction.LV.getId(), 0, 0, 40,\n Instruction.MUL.getId()\n };\n\n TermParser p = TermParserTestSetup.getMulTermSetup();\n assertEquals(\"Parse\", true, p.parse());\n AssemblerCodeChecker.assertCodeEquals(\"Code \", expected, TermParserTestSetup.getByteCode());\n }", "@Override\n public Expression simplifyMore() {\n Expression left = super.getLeft();\n Expression right = super.getRight();\n\n // x * x -> x^2\n if (left.toString().equals(right.toString())) {\n return new Pow(left, 2);\n }\n\n // ((2.0 * x) * (x * 3.0)) -> 6x^2\n if (left instanceof Mult && right instanceof Mult) {\n if (((Mult) left).getRight().toString().equals(((Mult) right).getLeft().toString())) {\n Expression exp = new Mult(new Mult(((Mult) left).getLeft(), ((Mult) right).getRight()),\n new Mult(((Mult) left).getRight(), ((Mult) right).getLeft()));\n exp.turnBonusOn();\n return exp.simplify();\n }\n }\n\n // 2x * 2x -> 4x^2\n if (left instanceof Mult && right instanceof Mult) {\n if (((Mult) left).getRight().toString().equals(((Mult) right).getRight().toString())) {\n return new Mult(new Mult(((Mult) left).getLeft(), ((Mult) right).getLeft()).simplify(),\n new Pow(((Mult) left).getRight(), 2)).simplify();\n }\n }\n\n // 2x * 2y -> 4xy\n if (left instanceof Mult && right instanceof Mult) {\n return new Mult(new Mult(((Mult) left).getLeft(), ((Mult) right).getLeft()).simplify(),\n new Mult(((Mult) left).getRight(), ((Mult) right).getRight())).simplify();\n }\n\n // sin(x) * cos(x) -> 0.5 * sin(2x)\n if (right instanceof Sin && left instanceof Cos) {\n Expression exp = new Mult(0.5, new Sin(new Mult(2, ((Sin) right).getExpression())));\n exp.turnBonusOn();\n return exp.simplify();\n }\n\n // cos(x) * sin(x) -> 0.5 * sin(2x)\n if (right instanceof Cos && left instanceof Sin) {\n Expression exp = new Sin(new Mult(2, ((Cos) right).getExpression()));\n exp.turnBonusOn();\n return exp.simplify();\n }\n\n // log(x, y) * 2 -> 2 * log(x, y)\n if (left instanceof Sin || left instanceof Cos || left instanceof Log) {\n Expression exp = new Mult(right, left);\n exp.turnBonusOn();\n return exp.simplify();\n }\n\n // x^2 * x^3 -> x^5\n if (left instanceof Pow && right instanceof Pow) {\n if (((Pow) left).getLeft().toString().equals(((Pow) right).getLeft().toString())) {\n Expression exp = new Pow(((Pow) left).getLeft(),\n new Plus(((Pow) left).getRight(), ((Pow) right).getRight()));\n exp.turnBonusOn();\n return exp.simplify();\n }\n }\n\n // x^2 * x -> x^3\n if (left instanceof Pow) {\n if (((Pow) left).getLeft().toString().equals(right.toString())) {\n Expression exp = new Pow(((Pow) left).getLeft(), new Plus(((Pow) left).getRight(), 1));\n exp.turnBonusOn();\n return exp.simplify();\n }\n }\n\n return this;\n }", "IVec3 mult(IVec3 v);", "private Term parseMul(final boolean required) throws ParseException {\n Term t1 = parseUnary(required);\n while (t1 != null) {\n int tt = _tokenizer.next();\n if (tt == '*') {\n Term t2 = parseUnary(true);\n if (t1.isD() && t2.isN() || t1.isN() && t2.isD()) {\n t1 = new Term.Mul(Term.TYPE_D, t1, t2);\n } else if (t1.isI() && t2.isI()) {\n t1 = new Term.Mul(Term.TYPE_I, t1, t2);\n } else if (!isTypeChecking()) {\n t1 = new Term.Mul(t1.isD() || t2.isD() ? Term.TYPE_D : Term.TYPE_I, t1, t2);\n } else {\n reportTypeErrorN2(\"'*'\");\n }\n } else if (tt == '/') {\n Term t2 = parseUnary(true);\n if (t1.isD() && t2.isN() || t1.isN() && t2.isD()) {\n t1 = new Term.Div(Term.TYPE_D, t1, t2);\n } else if (t1.isI() && t2.isI()) {\n t1 = new Term.Div(Term.TYPE_I, t1, t2);\n } else if (!isTypeChecking()) {\n t1 = new Term.Div(t1.isD() || t2.isD() ? Term.TYPE_D : Term.TYPE_I, t1, t2);\n } else {\n reportTypeErrorN2(\"'/'\");\n }\n } else if (tt == '%') {\n Term t2 = parseUnary(true);\n if (t1.isD() && t2.isN() || t1.isN() && t2.isD()) {\n t1 = new Term.Mod(Term.TYPE_D, t1, t2);\n } else if (t1.isI() && t2.isI()) {\n t1 = new Term.Mod(Term.TYPE_I, t1, t2);\n } else if (!isTypeChecking()) {\n t1 = new Term.Mod(t1.isD() || t2.isD() ? Term.TYPE_D : Term.TYPE_I, t1, t2);\n } else {\n reportTypeErrorN2(\"'%'\");\n }\n } else {\n _tokenizer.pushBack();\n break;\n }\n }\n return t1;\n }", "public void multiply()\r\n {\r\n resultDoubles = Operations.multiply(leftOperand, rightOperand);\r\n resultResetHelper();\r\n }", "public Mult(double left, double right) {\n super(left, right);\n }", "public Multiplication(Expression l, Expression r) {\n\tleft = l;\n\tright = r;\n }", "public AncientEgyptianMultiplication( ) {\r\n }", "abstract int multiplication(int num1, int num2);", "public void testMultiply() {\r\n System.out.println(\"Multiply\");\r\n Double [][] n = new Double[][]{{-3., -2.5, -1., 0., 1., 2., 3.4, 3.5, 1.1E100, -1.1E100}, \r\n {-3., 2.5, 0., 0., 1., -2., 3., 3.7, 1.1E100, 1.1E100}, \r\n {9., -6.25, 0., 0., 1., -4., 10.2, 12.95, 1.21E200, -1.21E200}};\r\n for(int i = 0; i < 10; i++){\r\n Double x = n[0][i];\r\n Double y = n[1][i];\r\n double expResult = n[2][i];\r\n double result = MathOp.Multiply(x, y);\r\n assertEquals(expResult, result, 0.001);\r\n }\r\n }", "@Override\n public Expression differentiate(String var) {\n Expression left = super.getLeft();\n Expression right = super.getRight();\n return new Plus(new Mult(left.differentiate(var), right), new Mult(left, right.differentiate(var)));\n }", "public final Expr addExpr() throws RecognitionException {\n\t\tExpr e = null;\n\n\n\t\tToken PLUS13=null;\n\t\tToken MINUS14=null;\n\t\tExpr e1 =null;\n\t\tExpr e2 =null;\n\n\n\t\t\t\tExpr it = null;\n\t\t\t\tBoolean bool = false;\n\t\t\t\tint line = -1;\n\t\t\t\tint offset = -1;\n\t\t\t\n\t\ttry {\n\t\t\t// ul.g:173:2: (e1= multExpr ( ( PLUS | MINUS ) e2= multExpr )* )\n\t\t\t// ul.g:174:3: e1= multExpr ( ( PLUS | MINUS ) e2= multExpr )*\n\t\t\t{\n\t\t\tpushFollow(FOLLOW_multExpr_in_addExpr710);\n\t\t\te1=multExpr();\n\t\t\tstate._fsp--;\n\t\t\tif (state.failed) return e;\n\t\t\tif ( state.backtracking==0 ) {it = e1;}\n\t\t\t// ul.g:175:3: ( ( PLUS | MINUS ) e2= multExpr )*\n\t\t\tloop14:\n\t\t\twhile (true) {\n\t\t\t\tint alt14=2;\n\t\t\t\tint LA14_0 = input.LA(1);\n\t\t\t\tif ( (LA14_0==MINUS||LA14_0==PLUS) ) {\n\t\t\t\t\talt14=1;\n\t\t\t\t}\n\n\t\t\t\tswitch (alt14) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// ul.g:175:4: ( PLUS | MINUS ) e2= multExpr\n\t\t\t\t\t{\n\t\t\t\t\t// ul.g:175:4: ( PLUS | MINUS )\n\t\t\t\t\tint alt13=2;\n\t\t\t\t\tint LA13_0 = input.LA(1);\n\t\t\t\t\tif ( (LA13_0==PLUS) ) {\n\t\t\t\t\t\talt13=1;\n\t\t\t\t\t}\n\t\t\t\t\telse if ( (LA13_0==MINUS) ) {\n\t\t\t\t\t\talt13=2;\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (state.backtracking>0) {state.failed=true; return e;}\n\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\tnew NoViableAltException(\"\", 13, 0, input);\n\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t}\n\n\t\t\t\t\tswitch (alt13) {\n\t\t\t\t\t\tcase 1 :\n\t\t\t\t\t\t\t// ul.g:175:5: PLUS\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tPLUS13=(Token)match(input,PLUS,FOLLOW_PLUS_in_addExpr718); if (state.failed) return e;\n\t\t\t\t\t\t\tif ( state.backtracking==0 ) {line = (PLUS13!=null?PLUS13.getLine():0); offset = PLUS13.getCharPositionInLine();}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2 :\n\t\t\t\t\t\t\t// ul.g:175:70: MINUS\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tMINUS14=(Token)match(input,MINUS,FOLLOW_MINUS_in_addExpr721); if (state.failed) return e;\n\t\t\t\t\t\t\tif ( state.backtracking==0 ) {line = (MINUS14!=null?MINUS14.getLine():0); offset = MINUS14.getCharPositionInLine();}\n\t\t\t\t\t\t\tif ( state.backtracking==0 ) {bool = true;}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tpushFollow(FOLLOW_multExpr_in_addExpr730);\n\t\t\t\t\te2=multExpr();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return e;\n\t\t\t\t\tif ( state.backtracking==0 ) {it = new AddExpr(it, e2, bool, line, offset);}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault :\n\t\t\t\t\tbreak loop14;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( state.backtracking==0 ) {\n\t\t\t\t\te = it;\n\t\t\t\t}\n\t\t}\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\trecover(input,re);\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn e;\n\t}", "public static void main(String[] args) {\n NumberFact a, b;\n a = new NumberFact(1_000);\n b = new NumberFact(999);\n\n ArithmeticOperator x, y;\n x = new ArithmeticOperator('*', a, b);\n y = new ArithmeticOperator('+', x, b);\n\n System.out.println(y);\n System.out.println(y.eval());\n }", "private void createMul(Code32 code, int op, int cond, int Rd, int Rn, int Rm) {\r\n\t\tcode.instructions[code.iCount] = (cond << 28) | op | (Rd << 16) | (Rm << 8) | (0x9 << 4) | Rn;\r\n\t\tcode.incInstructionNum();\r\n\t}", "public static BinaryExpression multiplyAssign(Expression expression0, Expression expression1) {\n return makeBinary(ExpressionType.MultiplyAssign, expression0, expression1);\n }", "LengthScalarMultiply createLengthScalarMultiply();", "public final CQLParser.multiplicativeExpression_return multiplicativeExpression() throws RecognitionException {\n CQLParser.multiplicativeExpression_return retval = new CQLParser.multiplicativeExpression_return();\n retval.start = input.LT(1);\n\n Object root_0 = null;\n\n Token set100=null;\n CQLParser.powerExpression_return powerExpression99 = null;\n\n CQLParser.powerExpression_return powerExpression101 = null;\n\n\n Object set100_tree=null;\n\n try {\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:404:2: ( powerExpression ( ( MULT | DIV ) powerExpression )* )\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:404:4: powerExpression ( ( MULT | DIV ) powerExpression )*\n {\n root_0 = (Object)adaptor.nil();\n\n pushFollow(FOLLOW_powerExpression_in_multiplicativeExpression1886);\n powerExpression99=powerExpression();\n\n state._fsp--;\n\n adaptor.addChild(root_0, powerExpression99.getTree());\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:404:20: ( ( MULT | DIV ) powerExpression )*\n loop27:\n do {\n int alt27=2;\n int LA27_0 = input.LA(1);\n\n if ( ((LA27_0>=MULT && LA27_0<=DIV)) ) {\n alt27=1;\n }\n\n\n switch (alt27) {\n \tcase 1 :\n \t // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:404:21: ( MULT | DIV ) powerExpression\n \t {\n \t set100=(Token)input.LT(1);\n \t set100=(Token)input.LT(1);\n \t if ( (input.LA(1)>=MULT && input.LA(1)<=DIV) ) {\n \t input.consume();\n \t root_0 = (Object)adaptor.becomeRoot((Object)adaptor.create(set100), root_0);\n \t state.errorRecovery=false;\n \t }\n \t else {\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t throw mse;\n \t }\n\n \t pushFollow(FOLLOW_powerExpression_in_multiplicativeExpression1896);\n \t powerExpression101=powerExpression();\n\n \t state._fsp--;\n\n \t adaptor.addChild(root_0, powerExpression101.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop27;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (Object)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n \t\n \tcatch(RecognitionException re)\n \t{\t\n \t\treportError(re);\n \t\tthrow re;\n \t}\n finally {\n }\n return retval;\n }", "Sum getMultiplier();", "public MathEval() {\r\n super();\r\n\r\n constants=new TreeMap<String,Double>(String.CASE_INSENSITIVE_ORDER);\r\n setConstant(\"E\" ,Math.E);\r\n setConstant(\"Euler\" ,0.577215664901533D);\r\n setConstant(\"LN2\" ,0.693147180559945D);\r\n setConstant(\"LN10\" ,2.302585092994046D);\r\n setConstant(\"LOG2E\" ,1.442695040888963D);\r\n setConstant(\"LOG10E\",0.434294481903252D);\r\n setConstant(\"PHI\" ,1.618033988749895D);\r\n setConstant(\"PI\" ,Math.PI);\r\n\r\n variables=new TreeMap<String,Double>(String.CASE_INSENSITIVE_ORDER);\r\n\r\n functions=new TreeMap<String,FunctionHandler>(String.CASE_INSENSITIVE_ORDER);\r\n\r\n offset=0;\r\n isConstant=false;\r\n }", "private ASTNode binaryMultiplyRules(ASTNode left, ASTNode right) throws Exception {\n Token leftToken = left.getToken();\n Token rightToken = right.getToken();\n\n TokenType leftType = leftToken.getType();\n TokenType rightType = rightToken.getType();\n\n Token tempToken;\n TokenType numType = TokenType.NUMBER;\n TokenType minusType = TokenType.MINUS;\n TokenType mulType = TokenType.MUL;\n\n if (rightToken.getIdentifier().equals(\"0\")){\n //left is anything and right is 0\n tempToken = new Token(numType, \"0\");\n return new Num(tempToken);\n }\n else if (rightToken.getIdentifier().equals(\"1\")){\n //left is anything and right is 1\n return left;\n }\n else if (leftToken.getIdentifier().equals(\"0\")){\n //left is 0 and right is anything\n tempToken = new Token(numType, \"0\");\n return new Num(tempToken);\n }\n else if (leftToken.getIdentifier().equals(\"1\")){\n //left is 1 and right is anything\n return right;\n }\n else if(patternMatcher(leftType, rightType, numType, numType)){\n Double leftVal = Double.parseDouble(leftToken.getIdentifier());\n Double rightVal = Double.parseDouble(rightToken.getIdentifier());\n\n String prod = String.valueOf(leftVal * rightVal);\n tempToken = new Token(numType, prod);\n return new Num(tempToken);\n }\n else if (patternMatcher(leftType, rightType, minusType, minusType)){\n if (left instanceof UnaryOP && right instanceof UnaryOP){\n tempToken = new Token(mulType);\n ASTNode leftOP = ((UnaryOP) left).getOperand();\n ASTNode rightOp = ((UnaryOP) right).getOperand();\n return new BinaryOp(tempToken, leftOP, rightOp);\n }\n }\n tempToken = new Token(mulType);\n return new BinaryOp(tempToken ,left, right);\n }", "public static Rational multiply(Rational num1, Rational num2){\r\n Rational product = new Rational();\r\n \r\n // multiply throughout\r\n product.denominator = num1.getDenominator() * num2.getDenominator();\r\n product.numerator = num1.getNumerator() * num2.getNumerator();\r\n \r\n product.reduce();\r\n return product;\r\n }", "Matrix scalarMult(double x){\n int newMatrixSize = this.getSize();\n Matrix newM = new Matrix(newMatrixSize);\n for(int i = 1; i <= newMatrixSize; i++){\n List itRow = rows[i - 1];\n itRow.moveFront();\n while(itRow.index() != -1){\n Entry c = (Entry)itRow.get();\n newM.changeEntry(i, c.column, (x*c.value));\n itRow.moveNext();\n }\n }\n\n return newM;\n }", "@Override\n\tpublic Instruction parse(String[] s) throws WrongInstructionFormatException {\n\t\tif (s.length==1 && s[0].equalsIgnoreCase(\"mult\")) \n\t\t\treturn new Mult();\n\t\telse throw new WrongInstructionFormatException();\n\t}", "@Override\n public InterpreterValue mul(InterpreterValue v) {\n\n // If the given value is a IntegerValue create a new DoubleValue from\n // the multiplication-result\n if(v instanceof IntegerValue) return new DoubleValue(getValue() * ((IntegerValue) v).getValue());\n\n // If the given value is a DoubleValue create a new DoubleValue from\n // the multiplication-result\n if(v instanceof DoubleValue) return new DoubleValue(getValue() * ((DoubleValue) v).getValue());\n\n // In other case just throw an error\n throw new Error(\"Operator '*' is not defined for type double and \" + v.getName());\n\n }", "public final Expr mulExpr() throws RecognitionException {\r\n Expr result = null;\r\n\r\n int mulExpr_StartIndex = input.index();\r\n\r\n Token op=null;\r\n Expr lhs =null;\r\n\r\n Expr rhs =null;\r\n\r\n\r\n try {\r\n if ( state.backtracking>0 && alreadyParsedRule(input, 14) ) { return result; }\r\n\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:108:5: (lhs= unExpr (op= ( '*' | '/' ) rhs= unExpr )* )\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:108:9: lhs= unExpr (op= ( '*' | '/' ) rhs= unExpr )*\r\n {\r\n pushFollow(FOLLOW_unExpr_in_mulExpr613);\r\n lhs=unExpr();\r\n\r\n state._fsp--;\r\n if (state.failed) return result;\r\n\r\n if ( state.backtracking==0 ) { result =lhs; }\r\n\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:108:45: (op= ( '*' | '/' ) rhs= unExpr )*\r\n loop9:\r\n do {\r\n int alt9=2;\r\n int LA9_0 = input.LA(1);\r\n\r\n if ( (LA9_0==23||LA9_0==26) ) {\r\n alt9=1;\r\n }\r\n\r\n\r\n switch (alt9) {\r\n \tcase 1 :\r\n \t // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:108:47: op= ( '*' | '/' ) rhs= unExpr\r\n \t {\r\n \t op=(Token)input.LT(1);\r\n\r\n \t if ( input.LA(1)==23||input.LA(1)==26 ) {\r\n \t input.consume();\r\n \t state.errorRecovery=false;\r\n \t state.failed=false;\r\n \t }\r\n \t else {\r\n \t if (state.backtracking>0) {state.failed=true; return result;}\r\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\r\n \t throw mse;\r\n \t }\r\n\r\n\r\n \t pushFollow(FOLLOW_unExpr_in_mulExpr633);\r\n \t rhs=unExpr();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return result;\r\n\r\n \t if ( state.backtracking==0 ) { \r\n \t if ((op!=null?op.getText():null).equals(\"*\")) {\r\n \t result = new Mul(result, rhs);\r\n \t }\r\n \t if ((op!=null?op.getText():null).equals(\"/\")) {\r\n \t result = new Div(result, rhs); \r\n \t }\r\n \t }\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop9;\r\n }\r\n } while (true);\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n if ( state.backtracking>0 ) { memoize(input, 14, mulExpr_StartIndex); }\r\n\r\n }\r\n return result;\r\n }", "public static EquationExpression timesRaw(EquationExpression... args) {\n\t\tswitch (args.length) {\n\t\tcase 0:\n\t\t\treturn EquationNumericValue.from(1);\n\t\tcase 1:\n\t\t\treturn args[0];\n\t\tcase 2:\n\t\t\treturn new EquationProductOperator(args[0], args[1]);\n\t\tdefault:\n\t\t\tEquationExpression[] args2 = new EquationExpression[args.length\n\t\t\t\t\t- 1];\n\t\t\tSystem.arraycopy(args, 1, args2, 0, args.length - 1);\n\t\t\treturn new EquationProductOperator(args[0], sumRaw(args2));\n\t\t}\n\t}", "public final void entryRuleMultExp() throws RecognitionException {\n try {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1377:1: ( ruleMultExp EOF )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1378:1: ruleMultExp EOF\n {\n before(grammarAccess.getMultExpRule()); \n pushFollow(FOLLOW_ruleMultExp_in_entryRuleMultExp2881);\n ruleMultExp();\n\n state._fsp--;\n\n after(grammarAccess.getMultExpRule()); \n match(input,EOF,FOLLOW_EOF_in_entryRuleMultExp2888); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }", "public static EquationExpression timesRaw(EquationExpression... args) {\n switch(args.length) {\n case 0:\n return EquationNumericValue.from(1);\n case 1:\n return args[0];\n case 2:\n return new EquationProductOperator(args[0], args[1]);\n default:\n EquationExpression[] args2 = new EquationExpression[args.length-1];\n System.arraycopy(args, 1, args2, 0, args.length-1);\n return new EquationProductOperator(args[0], sumRaw(args2));\n }\n }", "public final void mult (Unit unit) throws ArithmeticException {\n\t\tlong u = mksa ; double r = factor; double v = value; double o = offset;\n\t\t/* dump(\"mult:this \"); unit.dump(\"mult:unit\"); */\n\t\tif (((mksa&_abs)!=0) && (unit.factor != 1)) throw\t// On a date\n\t\tnew ArithmeticException(\"****Unit.mult on a date!\");\n\t\tif (((mksa|unit.mksa)&_log) != 0) {\n\t\t\tif ((mksa == underScore) && (factor == 1.)) ;\n\t\t\telse if ((unit.mksa == underScore) && (unit.factor == 1.)) ;\n\t\t\telse throw new ArithmeticException\n\t\t\t(\"****Unit: can't multiply logs: \" + symbol + \" x \" + unit.symbol);\n\t\t}\n\t\t/* As soon as there is an operation, the offset is ignored \n\t\t * except if one of the factors is unity.\n\t\t */\n\t\tif ((offset!=0) || (unit.offset!=0)) {\n\t\t\tif (mksa == underScore) offset = unit.offset;\n\t\t\telse if (unit.mksa == underScore) ;\n\t\t\telse offset = 0;\n\t\t}\n\t\tv *= unit.value; \n\t\tr *= unit.factor;\n\t\tu += unit.mksa; u -= underScore;\n\t\tif ((u&0x0c80808080808080L) != 0) throw new ArithmeticException\n\t\t(\"****too large powers in: \" + symbol + \" x \" + unit.symbol);\n\t\tmksa = u;\n\t\tfactor = r;\n\t\tvalue = v;\n\t\t/* Decision for the new symbol */\n\t\tif ((symbol != null) && (unit.symbol != null)) {\n\t\t\tif ((unit.mksa == underScore) && (unit.factor == 1)) return;\t// No unit ...\n\t\t\tif (( mksa == underScore) && ( factor == 1)) symbol = unit.symbol;\n\t\t\telse if ((symbol.equals(unit.symbol)) && (factor == unit.factor))\n\t\t\t\tsymbol = toExpr(symbol) + \"2\" ;\n\t\t\telse symbol = toExpr(symbol) + \".\" + toExpr(unit.symbol) ;\n\t\t}\n\t}", "public final Expr addExpr() throws RecognitionException {\n Expr result = null;\n\n int addExpr_StartIndex = input.index();\n\n Token op=null;\n Expr lhs =null;\n\n Expr rhs =null;\n\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 11) ) { return result; }\n\n // /home/jahn/workspace1/QLAndroid/src/org/uva/sea/ql/parser/antlr/QL.g:124:5: (lhs= mulExpr (op= ( '+' | '-' ) rhs= mulExpr )* )\n // /home/jahn/workspace1/QLAndroid/src/org/uva/sea/ql/parser/antlr/QL.g:124:9: lhs= mulExpr (op= ( '+' | '-' ) rhs= mulExpr )*\n {\n pushFollow(FOLLOW_mulExpr_in_addExpr547);\n lhs=mulExpr();\n\n state._fsp--;\n if (state.failed) return result;\n\n if ( state.backtracking==0 ) { result =lhs; }\n\n // /home/jahn/workspace1/QLAndroid/src/org/uva/sea/ql/parser/antlr/QL.g:124:46: (op= ( '+' | '-' ) rhs= mulExpr )*\n loop8:\n do {\n int alt8=2;\n int LA8_0 = input.LA(1);\n\n if ( ((LA8_0 >= 21 && LA8_0 <= 22)) ) {\n alt8=1;\n }\n\n\n switch (alt8) {\n \tcase 1 :\n \t // /home/jahn/workspace1/QLAndroid/src/org/uva/sea/ql/parser/antlr/QL.g:124:48: op= ( '+' | '-' ) rhs= mulExpr\n \t {\n \t op=(Token)input.LT(1);\n\n \t if ( (input.LA(1) >= 21 && input.LA(1) <= 22) ) {\n \t input.consume();\n \t state.errorRecovery=false;\n \t state.failed=false;\n \t }\n \t else {\n \t if (state.backtracking>0) {state.failed=true; return result;}\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t throw mse;\n \t }\n\n\n \t pushFollow(FOLLOW_mulExpr_in_addExpr565);\n \t rhs=mulExpr();\n\n \t state._fsp--;\n \t if (state.failed) return result;\n\n \t if ( state.backtracking==0 ) { \n \t if ((op!=null?op.getText():null).equals(\"+\")) {\n \t result = new Add(result, rhs);\n \t }\n \t if ((op!=null?op.getText():null).equals(\"-\")) {\n \t result = new Sub(result, rhs); \n \t }\n \t }\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop8;\n }\n } while (true);\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n\n finally {\n \t// do for sure before leaving\n if ( state.backtracking>0 ) { memoize(input, 11, addExpr_StartIndex); }\n\n }\n return result;\n }", "Point mult (double s, Point result);", "@Override\r\n\tpublic void mul(int x, int y) {\n\t\t\r\n\t}", "@Override\r\n\tpublic int multi(int x, int y) {\n\t\treturn x * y;\r\n\t}", "CalcEvaluator(boolean mult) {\r\n this.mult = mult;\r\n }", "@Override\r\n\tpublic int mul() {\n\t\treturn 0;\r\n\t}", "public double multiplica(double a, double b) {\n\t\treturn a*b;\n\t}", "public final void mMUL() throws RecognitionException\n\t{\n\t\ttry\n\t\t{\n\t\t\tfinal int _type = AshvmLexer.MUL;\n\t\t\tfinal int _channel = BaseRecognizer.DEFAULT_TOKEN_CHANNEL;\n\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:708:5: ( 'mul' )\n\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:708:7: 'mul'\n\t\t\t{\n\t\t\t\tthis.match(\"mul\");\n\n\t\t\t}\n\n\t\t\tthis.state.type = _type;\n\t\t\tthis.state.channel = _channel;\n\t\t}\n\t\tfinally\n\t\t{\n\t\t}\n\t}", "public R3Mult(int rdIndex, int rsIndex, int id) {\n\n }", "@Override\n\tpublic int mult(int val1, int val2) {\n\t\treturn val1 * val2;\n\t}", "public final void rule__AddExp__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:8253:1: ( ( ruleMultExp ) )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:8254:1: ( ruleMultExp )\n {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:8254:1: ( ruleMultExp )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:8255:1: ruleMultExp\n {\n before(grammarAccess.getAddExpAccess().getMultExpParserRuleCall_0()); \n pushFollow(FOLLOW_ruleMultExp_in_rule__AddExp__Group__0__Impl16577);\n ruleMultExp();\n\n state._fsp--;\n\n after(grammarAccess.getAddExpAccess().getMultExpParserRuleCall_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "<C, PM> VariableExp<C, PM> createVariableExp();", "private Complex eval(Complex[] ca, Complex x) {\n\t\tComplex result = ca[0];\n\t\tfor (int i = 1; i < ca.length; i++) {\n\t\t\tresult = result.mul(x).add(ca[i]);\n\t\t}\n\t\treturn result;\n\t}", "public final double multExpr() throws RecognitionException {\n double value = 0.0;\n\n\n double e =0.0;\n\n\n try {\n // ExprInterp.g:32:5: (e= atom ( '*' e= atom )* )\n // ExprInterp.g:32:9: e= atom ( '*' e= atom )*\n {\n pushFollow(FOLLOW_atom_in_multExpr248);\n e=atom();\n\n state._fsp--;\n\n\n value = e;\n\n // ExprInterp.g:32:37: ( '*' e= atom )*\n loop5:\n do {\n int alt5=2;\n int LA5_0 = input.LA(1);\n\n if ( (LA5_0==12) ) {\n alt5=1;\n }\n\n\n switch (alt5) {\n \tcase 1 :\n \t // ExprInterp.g:32:38: '*' e= atom\n \t {\n \t match(input,12,FOLLOW_12_in_multExpr253); \n\n \t pushFollow(FOLLOW_atom_in_multExpr257);\n \t e=atom();\n\n \t state._fsp--;\n\n\n \t value *= e;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop5;\n }\n } while (true);\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n\n finally {\n \t// do for sure before leaving\n }\n return value;\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 }", "private static native double mul(int n);", "private String compute(String equ,String op)\n {\n String equation = equ;\n Pattern mdPattern = Pattern.compile(\"(\\\\d+([.]\\\\d+)*)(([\"+op+\"]))(\\\\d+([.]\\\\d+)*)\");\n Matcher matcher\t\t= mdPattern.matcher(equation);\n while(matcher.find())\n {\n String[] arr = null;\n double ans = 0;\n String eq = matcher.group(0);//get form x*y\n if(eq.contains(op))\n {\n arr = eq.split(\"\\\\\"+op);//make arr\n if(op.equals(\"*\"))\n ans = Double.valueOf(arr[0])*Double.valueOf(arr[1]);//compute\n if(op.equals(\"/\"))\n ans = Double.valueOf(arr[0])/Double.valueOf(arr[1]);//compute\n if(op.equals(\"+\"))\n ans = Double.valueOf(arr[0])+Double.valueOf(arr[1]);//compute\n if(op.equals(\"-\"))\n ans = Double.valueOf(arr[0])-Double.valueOf(arr[1]);//compute\n }\n\n equation = matcher.replaceFirst(String.valueOf(ans));//replace in equation\n matcher = mdPattern.matcher(equation);//look for more matches\n }\n return equation;\n }", "public void multiply(Object mulValue) {\r\n\r\n\t\tNumberOperation operator = new NumberOperation(this.value, mulValue) {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic Number doAnOperation() {\r\n\t\t\t\tTypeEnum typeOfResult = getFinalType();\r\n\t\t\t\tif(typeOfResult == TypeEnum.TYPE_INTEGER) {\r\n\t\t\t\t\treturn getO1().intValue() * getO2().intValue();\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\treturn getO1().doubleValue() * getO2().doubleValue();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t\tthis.value = operator.doAnOperation();\r\n\t}", "public void mul(String a, String b, int i, String reg) {\r\n registerName.add(reg);\r\n int posa = registerRegister.indexOf(a);\r\n int posb = registerRegister.indexOf(b);\r\n int element = Integer.parseInt(registerValues.get(posa));\r\n int element1 = Integer.parseInt(registerValues.get(posb));\r\n int mul = element * element1;\r\n registerValues.add(Integer.toString(mul));\r\n }", "public static void main(String args[]) {\n\tExpr e3 = new Minus(new Num(100),new Num(99));\n\tSystem.out.println(\"e3 is \" + e3.exprToString());\n\t// outputs \"e4 is (4*5-(100-99))\"\n\tExpr e4 = new Minus(new Times(new Num(4),new Num(5)),e3);\n\tSystem.out.println(\"e4 is \" + e4.exprToString());\n }", "public void multiply(double multiplier) {\n x *= multiplier;\n y *= multiplier;\n }", "Rational multiply(Rational p){\n Rational firstarg=new Rational();\n firstarg.numerator=numerator;\n firstarg.denominator=denominator;\n\n firstarg.numerator=p.numerator*firstarg.numerator;\n firstarg.denominator=p.denominator*firstarg.denominator;\n return firstarg;\n }", "public final void synpred27_expression_fragment() throws RecognitionException { \n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:11: ( ( '+' | '-' ) mult )\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:11: ( '+' | '-' ) mult\n {\n if ( (input.LA(1)>=46 && input.LA(1)<=47) ) {\n input.consume();\n state.errorRecovery=false;state.failed=false;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n MismatchedSetException mse = new MismatchedSetException(null,input);\n throw mse;\n }\n\n pushFollow(FOLLOW_mult_in_synpred27_expression437);\n mult();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n }" ]
[ "0.71816504", "0.68509716", "0.6790061", "0.6790061", "0.6719847", "0.662252", "0.6524968", "0.6454907", "0.6425489", "0.64137614", "0.6231617", "0.6115805", "0.6112296", "0.6065207", "0.60344887", "0.6033878", "0.600525", "0.59952325", "0.5972148", "0.594838", "0.59280413", "0.5922113", "0.5917301", "0.5884391", "0.58605164", "0.5824194", "0.5792324", "0.57897234", "0.5735053", "0.57310444", "0.5702243", "0.5685638", "0.566538", "0.56604946", "0.5624147", "0.56180614", "0.5613636", "0.5608406", "0.5608072", "0.56037015", "0.5579075", "0.5563172", "0.55553854", "0.55489737", "0.5538042", "0.5535295", "0.55218285", "0.5514709", "0.55080235", "0.5507662", "0.55014133", "0.5496578", "0.54754764", "0.54659885", "0.5457093", "0.54570585", "0.5451691", "0.5443317", "0.54366785", "0.54326445", "0.5425212", "0.540909", "0.53834087", "0.53812927", "0.53713524", "0.53704965", "0.5364532", "0.5336682", "0.5333563", "0.53205645", "0.53128475", "0.53083515", "0.5305448", "0.52945733", "0.52901757", "0.5278995", "0.52752465", "0.5273296", "0.52655876", "0.52618086", "0.52584034", "0.5256669", "0.5248384", "0.52452195", "0.5244816", "0.52433026", "0.5236883", "0.52323365", "0.52319634", "0.52287084", "0.52283555", "0.52114177", "0.520705", "0.52025074", "0.5201104", "0.5196095", "0.5193989", "0.5193367", "0.5179163", "0.5177159" ]
0.54668754
53
Constructs a mult by given expressions.
public Mult(Expression left, double right) { super(left, right); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Expression multExpression() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tExpression e0 = powerExpression();\r\n\t\twhile(isKind(OP_TIMES, OP_DIV, OP_MOD)) {\r\n\t\t\tToken op = consume();\r\n\t\t\tExpression e1 = powerExpression();\r\n\t\t\te0 = new ExpressionBinary(first,e0,op,e1);\r\n\t\t}\r\n\t\treturn e0;\r\n\t}", "private Expr mult(Expr x) throws Err {\n if (x instanceof ExprUnary) {\n ExprUnary y=(ExprUnary)x;\n if (y.op==ExprUnary.Op.SOME) return ExprUnary.Op.SOMEOF.make(y.pos, y.sub);\n if (y.op==ExprUnary.Op.LONE) return ExprUnary.Op.LONEOF.make(y.pos, y.sub);\n if (y.op==ExprUnary.Op.ONE) return ExprUnary.Op.ONEOF.make(y.pos, y.sub);\n }\n return x;\n }", "public Mult(Expression left, Expression right) {\n super(left, right);\n }", "public Mult(Expression left, Expression right) {\n super(left, right);\n }", "Multiply createMultiply();", "public final VecMathParser.expr_return expr() throws RecognitionException {\n VecMathParser.expr_return retval = new VecMathParser.expr_return();\n retval.start = input.LT(1);\n\n Object root_0 = null;\n\n Token char_literal8=null;\n VecMathParser.multExpr_return multExpr7 = null;\n\n VecMathParser.multExpr_return multExpr9 = null;\n\n\n Object char_literal8_tree=null;\n\n try {\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:15:5: ( multExpr ( '+' multExpr )* )\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:15:7: multExpr ( '+' multExpr )*\n {\n root_0 = (Object)adaptor.nil();\n\n pushFollow(FOLLOW_multExpr_in_expr117);\n multExpr7=multExpr();\n\n state._fsp--;\n\n adaptor.addChild(root_0, multExpr7.getTree());\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:15:16: ( '+' multExpr )*\n loop3:\n do {\n int alt3=2;\n int LA3_0 = input.LA(1);\n\n if ( (LA3_0==10) ) {\n alt3=1;\n }\n\n\n switch (alt3) {\n \tcase 1 :\n \t // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:15:17: '+' multExpr\n \t {\n \t char_literal8=(Token)match(input,10,FOLLOW_10_in_expr120); \n \t char_literal8_tree = (Object)adaptor.create(char_literal8);\n \t root_0 = (Object)adaptor.becomeRoot(char_literal8_tree, root_0);\n\n \t pushFollow(FOLLOW_multExpr_in_expr123);\n \t multExpr9=multExpr();\n\n \t state._fsp--;\n\n \t adaptor.addChild(root_0, multExpr9.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop3;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (Object)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "public Mult(String left, Expression right) {\n super(left, right);\n }", "public Mult(double left, Expression right) {\n super(left, right);\n }", "public Mult(Expression left, String right) {\n super(left, right);\n }", "void visit(MultiplicationExpression expression);", "public BinMltLinExpr multiply(BinLinExpr expr) {\n\t\t\n\t\tBinMltLinExpr result = new BinMltLinExpr();\n\t\t\n\t\t// Multiply variables together\n\t\tfor (int i = 0; i < expr.vars.size(); i++) {\n\t\t\tfor (int j = 0; j < termVars.size(); j++) {\n\t\t\t\t\n\t\t\t\tdouble newCoeff = expr.coefficients.get(i) * coefficients.get(j);\n\t\t\t\tList<BinVar> newVars = new ArrayList<BinVar>();\n\t\t\t\tnewVars.add(expr.vars.get(i));\n\t\t\t\tnewVars.addAll(termVars.get(j));\n\t\t\t\t\n\t\t\t\tresult.addTerm(newCoeff, newVars);\n\t\t\t}\n\t\t}\n\n\t\t// Multiply variables with constants\n\t\tfor (int i = 0; i < termVars.size(); i++) {\n\t\t\tdouble newCoeff = coefficients.get(i) * expr.constant;\n\t\t\tresult.addTerm(newCoeff, termVars.get(i));\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < expr.vars.size(); i++) {\n\t\t\tdouble newCoeff = expr.coefficients.get(i) * constant;\n\t\t\tresult.addTerm(newCoeff, expr.vars.get(i));\n\t\t}\n\t\t\n\t\tresult.addConstant(constant*expr.constant);\n\t\t\n\t\treturn result;\n\t}", "public void enfoncerMult() {\n\t\ttry {\n\t\t\tthis.op = new Mult();\n\t\t\tif (!raz) {\n\t\t\t\tthis.pile.push(valC);\n\t\t\t}\n\t\t\tint a = this.pile.pop(); int b = this.pile.pop();\n\t\t\tthis.valC = this.op.eval(b,a);\n\t\t\tthis.pile.push(this.valC);\n\t\t\tthis.raz = true;\n\t\t}\n\t\tcatch (EmptyStackException e) {\n\t\t\tSystem.out.println(\"Erreur de syntaxe : Saisir deux operandes avant de saisir un operateur\");\n\t\t}\n\t}", "public Transformation mult(Transformation a) {\n\t\tTransformation result = new Transformation();\n\t\tsuper.mult(a, result);\n\t\treturn result;\n\t}", "private void mul() {\n\n\t}", "@Override\n public Expression assign(String var, Expression expression) {\n Expression left = super.getLeft();\n Expression right = super.getRight();\n return new Mult(left.assign(var, expression), right.assign(var, expression));\n }", "public void multiply() {\n\t\t\n\t}", "public static double multi() {\n System.out.println(\"Enter multiplier\");\n double a = getNumber();\n System.out.println(\"Enter multiplicand\");\n double b = getNumber();\n\n return a * b;\n }", "@SuppressWarnings(\"unchecked\")\n @Override\n public Expression asExpression(Rule rule, Deque<Value<Expression>> args) {\n if (args.size() == 1) {\n // a single term is not a product\n return args.pollFirst().getTarget();\n } else {\n // assume x to be *x, because the product will start by 1*x\n Term<Multiplicative> factor = new Term<>(Multiplicative.MULT, args.removeFirst().getTarget());\n List<Term<Multiplicative>> arguments = new LinkedList<>();\n arguments.add(factor);\n args.stream()\n // next arguments are all Term<Multiplicative>\n .map(v -> (Term<Multiplicative>) v.getTarget())\n .forEachOrdered(arguments::add);\n return new Product(arguments);\n }\n }", "public static void main(String[] args) throws Exception {\r\n Expression e = new Plus(new Mult(2, \"x\"), new Plus(new Sin(new Mult(4, \"y\")), new Pow(\"e\", \"x\")));\r\n System.out.println(e);\r\n Map<String, Double> assignment = new TreeMap<String, Double>();\r\n assignment.put(\"x\", 2.0);\r\n assignment.put(\"y\", 0.25);\r\n assignment.put(\"e\", 2.71);\r\n System.out.println(e.evaluate(assignment));\r\n e = e.differentiate(\"x\");\r\n System.out.println(e);\r\n System.out.println(e.evaluate(assignment));\r\n System.out.println(e.simplify());\r\n System.out.println(e);\r\n }", "public BinMltLinExpr multiply(BinMltLinExpr expr) {\n\t\t\n\t\tBinMltLinExpr result = new BinMltLinExpr();\n\t\t\n\t\t// Multiply variables together\n\t\tfor (int i = 0; i < expr.termVars.size(); i++) {\n\t\t\tfor (int j = 0; j < termVars.size(); j++) {\n\t\t\t\t\n\t\t\t\tdouble newCoeff = expr.coefficients.get(i) * coefficients.get(j);\n\t\t\t\tList<BinVar> newVars = new ArrayList<BinVar>();\n\t\t\t\tnewVars.addAll(expr.termVars.get(i));\n\t\t\t\tnewVars.addAll(termVars.get(j));\n\t\t\t\t\n\t\t\t\tresult.addTerm(newCoeff, newVars);\n\t\t\t}\n\t\t}\n\n\t\t// Multiply variables with constants\n\t\tfor (int i = 0; i < termVars.size(); i++) {\n\t\t\tdouble newCoeff = coefficients.get(i) * expr.constant;\n\t\t\tresult.addTerm(newCoeff, termVars.get(i));\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < expr.termVars.size(); i++) {\n\t\t\tdouble newCoeff = expr.coefficients.get(i) * constant;\n\t\t\tresult.addTerm(newCoeff, expr.termVars.get(i));\n\t\t}\n\t\t\n\t\tresult.addConstant(constant*expr.constant);\n\t\t\n\t\treturn result;\n\t}", "public final VecMathParser.multExpr_return multExpr() throws RecognitionException {\n VecMathParser.multExpr_return retval = new VecMathParser.multExpr_return();\n retval.start = input.LT(1);\n\n Object root_0 = null;\n\n Token char_literal11=null;\n Token char_literal12=null;\n VecMathParser.primary_return primary10 = null;\n\n VecMathParser.primary_return primary13 = null;\n\n\n Object char_literal11_tree=null;\n Object char_literal12_tree=null;\n\n try {\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:5: ( primary ( ( '*' | '.' ) primary )* )\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:9: primary ( ( '*' | '.' ) primary )*\n {\n root_0 = (Object)adaptor.nil();\n\n pushFollow(FOLLOW_primary_in_multExpr145);\n primary10=primary();\n\n state._fsp--;\n\n adaptor.addChild(root_0, primary10.getTree());\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:17: ( ( '*' | '.' ) primary )*\n loop5:\n do {\n int alt5=2;\n int LA5_0 = input.LA(1);\n\n if ( ((LA5_0>=11 && LA5_0<=12)) ) {\n alt5=1;\n }\n\n\n switch (alt5) {\n \tcase 1 :\n \t // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:18: ( '*' | '.' ) primary\n \t {\n \t // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:18: ( '*' | '.' )\n \t int alt4=2;\n \t int LA4_0 = input.LA(1);\n\n \t if ( (LA4_0==11) ) {\n \t alt4=1;\n \t }\n \t else if ( (LA4_0==12) ) {\n \t alt4=2;\n \t }\n \t else {\n \t NoViableAltException nvae =\n \t new NoViableAltException(\"\", 4, 0, input);\n\n \t throw nvae;\n \t }\n \t switch (alt4) {\n \t case 1 :\n \t // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:19: '*'\n \t {\n \t char_literal11=(Token)match(input,11,FOLLOW_11_in_multExpr149); \n \t char_literal11_tree = (Object)adaptor.create(char_literal11);\n \t root_0 = (Object)adaptor.becomeRoot(char_literal11_tree, root_0);\n\n\n \t }\n \t break;\n \t case 2 :\n \t // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:24: '.'\n \t {\n \t char_literal12=(Token)match(input,12,FOLLOW_12_in_multExpr152); \n \t char_literal12_tree = (Object)adaptor.create(char_literal12);\n \t root_0 = (Object)adaptor.becomeRoot(char_literal12_tree, root_0);\n\n\n \t }\n \t break;\n\n \t }\n\n \t pushFollow(FOLLOW_primary_in_multExpr156);\n \t primary13=primary();\n\n \t state._fsp--;\n\n \t adaptor.addChild(root_0, primary13.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop5;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (Object)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "@Override\n\tpublic void visit(MultiplyNode node) {\n\t\tif (Evaluator.checkScope(node) == false) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (Evaluator.checkAssert(node) == false) {\n\t\t\treturn;\n\t\t}\n\n\t\t/**\n\t\t * evaluam cei doi fii\n\t\t */\n\t\tEvaluator.evaluate(node.getChild(0));\n\t\tEvaluator.evaluate(node.getChild(1));\n\n\t\tInteger i, j;\n\t\t/**\n\t\t * salvam si inmultim valorile rezulate in urma evaluarii celor 2 fii si\n\t\t * setam valoarea corespunzatoare in nodul curent\n\t\t */\n\t\tif (node.getChild(1) instanceof Variable) {\n\t\t\ti = Integer.parseInt(Evaluator.variables.get(node.getChild(1).getName()));\n\n\t\t} else {\n\t\t\ti = Integer.parseInt(node.getChild(1).getName());\n\t\t}\n\n\t\tif (node.getChild(0) instanceof Variable) {\n\t\t\tj = Integer.parseInt(Evaluator.variables.get(node.getChild(0).getName()));\n\n\t\t} else {\n\t\t\tj = Integer.parseInt(node.getChild(0).getName());\n\t\t}\n\n\t\tInteger n = i * j;\n\n\t\tnode.setName(n.toString());\n\t}", "static Double executeMultiplication(List<Double> operands) {\n Double result = null;\n for (Double operand : operands) {\n if (Objects.isNull(result)) {\n result = operand;\n }\n else {\n result = result * operand;\n }\n }\n return result;\n }", "public Polynomial visit(ProductExpression expression) {\n return Polynomial.multiply(\n expression.getLeft().accept(this),\n expression.getRight().accept(this));\n }", "BaseNumber multiply(BaseNumber operand);", "public final Expr multExpr() throws RecognitionException {\n\t\tExpr e = null;\n\n\n\t\tToken STAR15=null;\n\t\tExpr e1 =null;\n\t\tExpr e2 =null;\n\n\n\t\t\t\tExpr it = null;\n\t\t\t\n\t\ttry {\n\t\t\t// ul.g:189:3: (e1= atom ( STAR e2= atom )* )\n\t\t\t// ul.g:190:2: e1= atom ( STAR e2= atom )*\n\t\t\t{\n\t\t\tpushFollow(FOLLOW_atom_in_multExpr768);\n\t\t\te1=atom();\n\t\t\tstate._fsp--;\n\t\t\tif (state.failed) return e;\n\t\t\tif ( state.backtracking==0 ) {it = e1;}\n\t\t\t// ul.g:191:2: ( STAR e2= atom )*\n\t\t\tloop15:\n\t\t\twhile (true) {\n\t\t\t\tint alt15=2;\n\t\t\t\tint LA15_0 = input.LA(1);\n\t\t\t\tif ( (LA15_0==STAR) ) {\n\t\t\t\t\talt15=1;\n\t\t\t\t}\n\n\t\t\t\tswitch (alt15) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// ul.g:191:4: STAR e2= atom\n\t\t\t\t\t{\n\t\t\t\t\tSTAR15=(Token)match(input,STAR,FOLLOW_STAR_in_multExpr775); if (state.failed) return e;\n\t\t\t\t\tpushFollow(FOLLOW_atom_in_multExpr781);\n\t\t\t\t\te2=atom();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return e;\n\t\t\t\t\tif ( state.backtracking==0 ) {it = new MultExpr(it, e2, (STAR15!=null?STAR15.getLine():0), STAR15.getCharPositionInLine());}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault :\n\t\t\t\t\tbreak loop15;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( state.backtracking==0 ) {\n\t\t\t\t\te = it;\n\t\t\t\t}\n\t\t}\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\trecover(input,re);\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn e;\n\t}", "public T mul(T first, T second);", "public final double expr() throws RecognitionException {\n double value = 0.0;\n\n\n double e =0.0;\n\n\n try {\n // ExprInterp.g:24:5: (e= multExpr ( '+' e= multExpr | '-' e= multExpr )* |e= maxF )\n int alt4=2;\n int LA4_0 = input.LA(1);\n\n if ( ((LA4_0 >= ID && LA4_0 <= LEFTP)||LA4_0==REL) ) {\n alt4=1;\n }\n else if ( (LA4_0==MAXI) ) {\n alt4=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 4, 0, input);\n\n throw nvae;\n\n }\n switch (alt4) {\n case 1 :\n // ExprInterp.g:24:9: e= multExpr ( '+' e= multExpr | '-' e= multExpr )*\n {\n pushFollow(FOLLOW_multExpr_in_expr155);\n e=multExpr();\n\n state._fsp--;\n\n\n value = e;\n\n // ExprInterp.g:25:9: ( '+' e= multExpr | '-' e= multExpr )*\n loop3:\n do {\n int alt3=3;\n int LA3_0 = input.LA(1);\n\n if ( (LA3_0==13) ) {\n alt3=1;\n }\n else if ( (LA3_0==15) ) {\n alt3=2;\n }\n\n\n switch (alt3) {\n \tcase 1 :\n \t // ExprInterp.g:25:13: '+' e= multExpr\n \t {\n \t match(input,13,FOLLOW_13_in_expr171); \n\n \t pushFollow(FOLLOW_multExpr_in_expr175);\n \t e=multExpr();\n\n \t state._fsp--;\n\n\n \t value += e;\n\n \t }\n \t break;\n \tcase 2 :\n \t // ExprInterp.g:26:13: '-' e= multExpr\n \t {\n \t match(input,15,FOLLOW_15_in_expr191); \n\n \t pushFollow(FOLLOW_multExpr_in_expr195);\n \t e=multExpr();\n\n \t state._fsp--;\n\n\n \t value -= e;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop3;\n }\n } while (true);\n\n\n }\n break;\n case 2 :\n // ExprInterp.g:28:8: e= maxF\n {\n pushFollow(FOLLOW_maxF_in_expr221);\n e=maxF();\n\n state._fsp--;\n\n\n value = e;\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n\n finally {\n \t// do for sure before leaving\n }\n return value;\n }", "public final void mul() {\n\t\tif (size > 1) {\n\n\t\t\tdouble topMostValue = pop();\n\t\t\tdouble secondTopMostValue = pop();\n\t\t\tpush(secondTopMostValue * topMostValue);\n\t\t}\n\t}", "public Mult(String left, double right) {\n super(left, right);\n }", "public static Transform mult(Transform t1, Transform t2) {\n\t\treturn transpose(t1.a * t2.a + t1.c * t2.b, t1.a * t2.c + t1.c * t2.d, t1.a * t2.tx + t1.c * t2.ty + t1.tx,\n\t\t\t\t\t\t t1.b * t2.a + t1.d * t2.b, t1.b * t2.c + t1.d * t2.d, t1.b * t2.tx + t1.d * t2.ty + t1.ty);\n\t}", "private void multiplication()\n\t{\n\t\tFun = Function.MULTIPLY; //Function set to determine what action should be taken later.\n\t\t\n\t\t\tsetLeftValue();\n\t\t\tentry.grabFocus();\n\t\t\n\t}", "public int mult()\r\n\t{\r\n\t\tint a=10;\r\n\t\tint b=20;\r\n\t\tint c = a*b;\r\n\t\treturn(c);\r\n\t}", "public Object visitMultiplicativeExpression(GNode n) {\n Object a, b, result;\n String op;\n \n nonboolean = true;\n \n dostring = true;\n \n a = dispatch(n.getGeneric(0));\n b = dispatch(n.getGeneric(2));\n op = n.getString(1);\n \n dostring = false;\n \n if (a instanceof Long && b instanceof Long) {\n if ((op.equals(\"/\")\n || op.equals(\"%\")) && ((Long) b).equals(new Long(0))) {\n System.err.println(\"division by zero in #if\");\n result = new Long(0);\n }\n if (op.equals(\"*\")) {\n result = (Long) a * (Long) b;\n }\n else if (op.equals(\"/\")) {\n result = (Long) a / (Long) b;\n }\n else if (op.equals(\"%\")) {\n result = (Long) a % (Long) b;\n }\n else {\n result = \"\";\n }\n }\n else {\n result = parens(a) + \" \" + op + \" \" + parens(b);\n }\n \n return result;\n }", "public static BinaryExpression multiply(Expression expression0, Expression expression1) {\n return makeBinary(ExpressionType.Multiply, expression0, expression1);\n }", "public T elementMult( T b ) {\n convertType.specify(this, b);\n T A = convertType.convert(this);\n b = convertType.convert(b);\n\n T c = A.createLike();\n A.ops.elementMult(A.mat, b.mat, c.mat);\n return c;\n }", "public Mult(double left, String right) {\n super(left, right);\n }", "public final expressionParser.add_return add() throws RecognitionException {\n expressionParser.add_return retval = new expressionParser.add_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n Token char_literal38=null;\n Token char_literal39=null;\n expressionParser.mult_return mult37 = null;\n\n expressionParser.mult_return mult40 = null;\n\n\n CommonTree char_literal38_tree=null;\n CommonTree char_literal39_tree=null;\n\n try {\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:3: ( mult ( ( '+' | '-' ) mult )* )\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:5: mult ( ( '+' | '-' ) mult )*\n {\n root_0 = (CommonTree)adaptor.nil();\n\n pushFollow(FOLLOW_mult_in_add424);\n mult37=mult();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, mult37.getTree());\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:10: ( ( '+' | '-' ) mult )*\n loop17:\n do {\n int alt17=2;\n alt17 = dfa17.predict(input);\n switch (alt17) {\n \tcase 1 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:11: ( '+' | '-' ) mult\n \t {\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:11: ( '+' | '-' )\n \t int alt16=2;\n \t int LA16_0 = input.LA(1);\n\n \t if ( (LA16_0==46) ) {\n \t alt16=1;\n \t }\n \t else if ( (LA16_0==47) ) {\n \t alt16=2;\n \t }\n \t else {\n \t if (state.backtracking>0) {state.failed=true; return retval;}\n \t NoViableAltException nvae =\n \t new NoViableAltException(\"\", 16, 0, input);\n\n \t throw nvae;\n \t }\n \t switch (alt16) {\n \t case 1 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:12: '+'\n \t {\n \t char_literal38=(Token)match(input,46,FOLLOW_46_in_add428); if (state.failed) return retval;\n \t if ( state.backtracking==0 ) {\n \t char_literal38_tree = (CommonTree)adaptor.create(char_literal38);\n \t root_0 = (CommonTree)adaptor.becomeRoot(char_literal38_tree, root_0);\n \t }\n\n \t }\n \t break;\n \t case 2 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:19: '-'\n \t {\n \t char_literal39=(Token)match(input,47,FOLLOW_47_in_add433); if (state.failed) return retval;\n \t if ( state.backtracking==0 ) {\n \t char_literal39_tree = (CommonTree)adaptor.create(char_literal39);\n \t root_0 = (CommonTree)adaptor.becomeRoot(char_literal39_tree, root_0);\n \t }\n\n \t }\n \t break;\n\n \t }\n\n \t pushFollow(FOLLOW_mult_in_add437);\n \t mult40=mult();\n\n \t state._fsp--;\n \t if (state.failed) return retval;\n \t if ( state.backtracking==0 ) adaptor.addChild(root_0, mult40.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop17;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "public Double eval(Double... operands);", "public <V extends Number> FluentExp<V> times (SQLExpression<V> expr)\n {\n return new Mul<V>(this, expr);\n }", "public static MathNode create(List<MathNode> nodes) {\n return new PowerNode(nodes);\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"MULT\";\n\t}", "NumericExpression createNumericExpression();", "abstract void mulS();", "public final expressionParser.mult_return mult() throws RecognitionException {\n expressionParser.mult_return retval = new expressionParser.mult_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n Token char_literal42=null;\n Token char_literal43=null;\n expressionParser.unary_return unary41 = null;\n\n expressionParser.unary_return unary44 = null;\n\n\n CommonTree char_literal42_tree=null;\n CommonTree char_literal43_tree=null;\n\n try {\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:3: ( unary ( ( '*' | '/' ) unary )* )\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:5: unary ( ( '*' | '/' ) unary )*\n {\n root_0 = (CommonTree)adaptor.nil();\n\n pushFollow(FOLLOW_unary_in_mult454);\n unary41=unary();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, unary41.getTree());\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:11: ( ( '*' | '/' ) unary )*\n loop19:\n do {\n int alt19=2;\n int LA19_0 = input.LA(1);\n\n if ( ((LA19_0>=48 && LA19_0<=49)) ) {\n alt19=1;\n }\n\n\n switch (alt19) {\n \tcase 1 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:12: ( '*' | '/' ) unary\n \t {\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:12: ( '*' | '/' )\n \t int alt18=2;\n \t int LA18_0 = input.LA(1);\n\n \t if ( (LA18_0==48) ) {\n \t alt18=1;\n \t }\n \t else if ( (LA18_0==49) ) {\n \t alt18=2;\n \t }\n \t else {\n \t if (state.backtracking>0) {state.failed=true; return retval;}\n \t NoViableAltException nvae =\n \t new NoViableAltException(\"\", 18, 0, input);\n\n \t throw nvae;\n \t }\n \t switch (alt18) {\n \t case 1 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:13: '*'\n \t {\n \t char_literal42=(Token)match(input,48,FOLLOW_48_in_mult458); if (state.failed) return retval;\n \t if ( state.backtracking==0 ) {\n \t char_literal42_tree = (CommonTree)adaptor.create(char_literal42);\n \t root_0 = (CommonTree)adaptor.becomeRoot(char_literal42_tree, root_0);\n \t }\n\n \t }\n \t break;\n \t case 2 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:20: '/'\n \t {\n \t char_literal43=(Token)match(input,49,FOLLOW_49_in_mult463); if (state.failed) return retval;\n \t if ( state.backtracking==0 ) {\n \t char_literal43_tree = (CommonTree)adaptor.create(char_literal43);\n \t root_0 = (CommonTree)adaptor.becomeRoot(char_literal43_tree, root_0);\n \t }\n\n \t }\n \t break;\n\n \t }\n\n \t pushFollow(FOLLOW_unary_in_mult467);\n \t unary44=unary();\n\n \t state._fsp--;\n \t if (state.failed) return retval;\n \t if ( state.backtracking==0 ) adaptor.addChild(root_0, unary44.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop19;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "public final Expr addExpr() throws RecognitionException {\r\n Expr result = null;\r\n\r\n int addExpr_StartIndex = input.index();\r\n\r\n Token op=null;\r\n Expr lhs =null;\r\n\r\n Expr rhs =null;\r\n\r\n\r\n try {\r\n if ( state.backtracking>0 && alreadyParsedRule(input, 15) ) { return result; }\r\n\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:121:5: (lhs= mulExpr (op= ( '+' | '-' ) rhs= mulExpr )* )\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:121:9: lhs= mulExpr (op= ( '+' | '-' ) rhs= mulExpr )*\r\n {\r\n pushFollow(FOLLOW_mulExpr_in_addExpr674);\r\n lhs=mulExpr();\r\n\r\n state._fsp--;\r\n if (state.failed) return result;\r\n\r\n if ( state.backtracking==0 ) { result =lhs; }\r\n\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:121:46: (op= ( '+' | '-' ) rhs= mulExpr )*\r\n loop10:\r\n do {\r\n int alt10=2;\r\n int LA10_0 = input.LA(1);\r\n\r\n if ( ((LA10_0 >= 24 && LA10_0 <= 25)) ) {\r\n alt10=1;\r\n }\r\n\r\n\r\n switch (alt10) {\r\n \tcase 1 :\r\n \t // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:121:48: op= ( '+' | '-' ) rhs= mulExpr\r\n \t {\r\n \t op=(Token)input.LT(1);\r\n\r\n \t if ( (input.LA(1) >= 24 && input.LA(1) <= 25) ) {\r\n \t input.consume();\r\n \t state.errorRecovery=false;\r\n \t state.failed=false;\r\n \t }\r\n \t else {\r\n \t if (state.backtracking>0) {state.failed=true; return result;}\r\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\r\n \t throw mse;\r\n \t }\r\n\r\n\r\n \t pushFollow(FOLLOW_mulExpr_in_addExpr692);\r\n \t rhs=mulExpr();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return result;\r\n\r\n \t if ( state.backtracking==0 ) { \r\n \t if ((op!=null?op.getText():null).equals(\"+\")) {\r\n \t result = new Add(result, rhs);\r\n \t }\r\n \t if ((op!=null?op.getText():null).equals(\"-\")) {\r\n \t result = new Sub(result, rhs); \r\n \t }\r\n \t }\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop10;\r\n }\r\n } while (true);\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n if ( state.backtracking>0 ) { memoize(input, 15, addExpr_StartIndex); }\r\n\r\n }\r\n return result;\r\n }", "public static double multi(double a, double b) {\n return a * b;\n }", "@Test\n public void testParseMul() {\n System.out.println(\"testParseMul\");\n byte[] expected = {\n Instruction.LV.getId(), 0, 0, 32,\n Instruction.LV.getId(), 0, 0, 36,\n Instruction.MUL.getId(),\n Instruction.LV.getId(), 0, 0, 40,\n Instruction.MUL.getId()\n };\n\n TermParser p = TermParserTestSetup.getMulTermSetup();\n assertEquals(\"Parse\", true, p.parse());\n AssemblerCodeChecker.assertCodeEquals(\"Code \", expected, TermParserTestSetup.getByteCode());\n }", "@Override\n public Expression simplifyMore() {\n Expression left = super.getLeft();\n Expression right = super.getRight();\n\n // x * x -> x^2\n if (left.toString().equals(right.toString())) {\n return new Pow(left, 2);\n }\n\n // ((2.0 * x) * (x * 3.0)) -> 6x^2\n if (left instanceof Mult && right instanceof Mult) {\n if (((Mult) left).getRight().toString().equals(((Mult) right).getLeft().toString())) {\n Expression exp = new Mult(new Mult(((Mult) left).getLeft(), ((Mult) right).getRight()),\n new Mult(((Mult) left).getRight(), ((Mult) right).getLeft()));\n exp.turnBonusOn();\n return exp.simplify();\n }\n }\n\n // 2x * 2x -> 4x^2\n if (left instanceof Mult && right instanceof Mult) {\n if (((Mult) left).getRight().toString().equals(((Mult) right).getRight().toString())) {\n return new Mult(new Mult(((Mult) left).getLeft(), ((Mult) right).getLeft()).simplify(),\n new Pow(((Mult) left).getRight(), 2)).simplify();\n }\n }\n\n // 2x * 2y -> 4xy\n if (left instanceof Mult && right instanceof Mult) {\n return new Mult(new Mult(((Mult) left).getLeft(), ((Mult) right).getLeft()).simplify(),\n new Mult(((Mult) left).getRight(), ((Mult) right).getRight())).simplify();\n }\n\n // sin(x) * cos(x) -> 0.5 * sin(2x)\n if (right instanceof Sin && left instanceof Cos) {\n Expression exp = new Mult(0.5, new Sin(new Mult(2, ((Sin) right).getExpression())));\n exp.turnBonusOn();\n return exp.simplify();\n }\n\n // cos(x) * sin(x) -> 0.5 * sin(2x)\n if (right instanceof Cos && left instanceof Sin) {\n Expression exp = new Sin(new Mult(2, ((Cos) right).getExpression()));\n exp.turnBonusOn();\n return exp.simplify();\n }\n\n // log(x, y) * 2 -> 2 * log(x, y)\n if (left instanceof Sin || left instanceof Cos || left instanceof Log) {\n Expression exp = new Mult(right, left);\n exp.turnBonusOn();\n return exp.simplify();\n }\n\n // x^2 * x^3 -> x^5\n if (left instanceof Pow && right instanceof Pow) {\n if (((Pow) left).getLeft().toString().equals(((Pow) right).getLeft().toString())) {\n Expression exp = new Pow(((Pow) left).getLeft(),\n new Plus(((Pow) left).getRight(), ((Pow) right).getRight()));\n exp.turnBonusOn();\n return exp.simplify();\n }\n }\n\n // x^2 * x -> x^3\n if (left instanceof Pow) {\n if (((Pow) left).getLeft().toString().equals(right.toString())) {\n Expression exp = new Pow(((Pow) left).getLeft(), new Plus(((Pow) left).getRight(), 1));\n exp.turnBonusOn();\n return exp.simplify();\n }\n }\n\n return this;\n }", "IVec3 mult(IVec3 v);", "private Term parseMul(final boolean required) throws ParseException {\n Term t1 = parseUnary(required);\n while (t1 != null) {\n int tt = _tokenizer.next();\n if (tt == '*') {\n Term t2 = parseUnary(true);\n if (t1.isD() && t2.isN() || t1.isN() && t2.isD()) {\n t1 = new Term.Mul(Term.TYPE_D, t1, t2);\n } else if (t1.isI() && t2.isI()) {\n t1 = new Term.Mul(Term.TYPE_I, t1, t2);\n } else if (!isTypeChecking()) {\n t1 = new Term.Mul(t1.isD() || t2.isD() ? Term.TYPE_D : Term.TYPE_I, t1, t2);\n } else {\n reportTypeErrorN2(\"'*'\");\n }\n } else if (tt == '/') {\n Term t2 = parseUnary(true);\n if (t1.isD() && t2.isN() || t1.isN() && t2.isD()) {\n t1 = new Term.Div(Term.TYPE_D, t1, t2);\n } else if (t1.isI() && t2.isI()) {\n t1 = new Term.Div(Term.TYPE_I, t1, t2);\n } else if (!isTypeChecking()) {\n t1 = new Term.Div(t1.isD() || t2.isD() ? Term.TYPE_D : Term.TYPE_I, t1, t2);\n } else {\n reportTypeErrorN2(\"'/'\");\n }\n } else if (tt == '%') {\n Term t2 = parseUnary(true);\n if (t1.isD() && t2.isN() || t1.isN() && t2.isD()) {\n t1 = new Term.Mod(Term.TYPE_D, t1, t2);\n } else if (t1.isI() && t2.isI()) {\n t1 = new Term.Mod(Term.TYPE_I, t1, t2);\n } else if (!isTypeChecking()) {\n t1 = new Term.Mod(t1.isD() || t2.isD() ? Term.TYPE_D : Term.TYPE_I, t1, t2);\n } else {\n reportTypeErrorN2(\"'%'\");\n }\n } else {\n _tokenizer.pushBack();\n break;\n }\n }\n return t1;\n }", "public void multiply()\r\n {\r\n resultDoubles = Operations.multiply(leftOperand, rightOperand);\r\n resultResetHelper();\r\n }", "public Mult(String left, String right) {\n super(left, right);\n }", "public Mult(double left, double right) {\n super(left, right);\n }", "public Multiplication(Expression l, Expression r) {\n\tleft = l;\n\tright = r;\n }", "public AncientEgyptianMultiplication( ) {\r\n }", "abstract int multiplication(int num1, int num2);", "public void testMultiply() {\r\n System.out.println(\"Multiply\");\r\n Double [][] n = new Double[][]{{-3., -2.5, -1., 0., 1., 2., 3.4, 3.5, 1.1E100, -1.1E100}, \r\n {-3., 2.5, 0., 0., 1., -2., 3., 3.7, 1.1E100, 1.1E100}, \r\n {9., -6.25, 0., 0., 1., -4., 10.2, 12.95, 1.21E200, -1.21E200}};\r\n for(int i = 0; i < 10; i++){\r\n Double x = n[0][i];\r\n Double y = n[1][i];\r\n double expResult = n[2][i];\r\n double result = MathOp.Multiply(x, y);\r\n assertEquals(expResult, result, 0.001);\r\n }\r\n }", "@Override\n public Expression differentiate(String var) {\n Expression left = super.getLeft();\n Expression right = super.getRight();\n return new Plus(new Mult(left.differentiate(var), right), new Mult(left, right.differentiate(var)));\n }", "public final Expr addExpr() throws RecognitionException {\n\t\tExpr e = null;\n\n\n\t\tToken PLUS13=null;\n\t\tToken MINUS14=null;\n\t\tExpr e1 =null;\n\t\tExpr e2 =null;\n\n\n\t\t\t\tExpr it = null;\n\t\t\t\tBoolean bool = false;\n\t\t\t\tint line = -1;\n\t\t\t\tint offset = -1;\n\t\t\t\n\t\ttry {\n\t\t\t// ul.g:173:2: (e1= multExpr ( ( PLUS | MINUS ) e2= multExpr )* )\n\t\t\t// ul.g:174:3: e1= multExpr ( ( PLUS | MINUS ) e2= multExpr )*\n\t\t\t{\n\t\t\tpushFollow(FOLLOW_multExpr_in_addExpr710);\n\t\t\te1=multExpr();\n\t\t\tstate._fsp--;\n\t\t\tif (state.failed) return e;\n\t\t\tif ( state.backtracking==0 ) {it = e1;}\n\t\t\t// ul.g:175:3: ( ( PLUS | MINUS ) e2= multExpr )*\n\t\t\tloop14:\n\t\t\twhile (true) {\n\t\t\t\tint alt14=2;\n\t\t\t\tint LA14_0 = input.LA(1);\n\t\t\t\tif ( (LA14_0==MINUS||LA14_0==PLUS) ) {\n\t\t\t\t\talt14=1;\n\t\t\t\t}\n\n\t\t\t\tswitch (alt14) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// ul.g:175:4: ( PLUS | MINUS ) e2= multExpr\n\t\t\t\t\t{\n\t\t\t\t\t// ul.g:175:4: ( PLUS | MINUS )\n\t\t\t\t\tint alt13=2;\n\t\t\t\t\tint LA13_0 = input.LA(1);\n\t\t\t\t\tif ( (LA13_0==PLUS) ) {\n\t\t\t\t\t\talt13=1;\n\t\t\t\t\t}\n\t\t\t\t\telse if ( (LA13_0==MINUS) ) {\n\t\t\t\t\t\talt13=2;\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (state.backtracking>0) {state.failed=true; return e;}\n\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\tnew NoViableAltException(\"\", 13, 0, input);\n\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t}\n\n\t\t\t\t\tswitch (alt13) {\n\t\t\t\t\t\tcase 1 :\n\t\t\t\t\t\t\t// ul.g:175:5: PLUS\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tPLUS13=(Token)match(input,PLUS,FOLLOW_PLUS_in_addExpr718); if (state.failed) return e;\n\t\t\t\t\t\t\tif ( state.backtracking==0 ) {line = (PLUS13!=null?PLUS13.getLine():0); offset = PLUS13.getCharPositionInLine();}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2 :\n\t\t\t\t\t\t\t// ul.g:175:70: MINUS\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tMINUS14=(Token)match(input,MINUS,FOLLOW_MINUS_in_addExpr721); if (state.failed) return e;\n\t\t\t\t\t\t\tif ( state.backtracking==0 ) {line = (MINUS14!=null?MINUS14.getLine():0); offset = MINUS14.getCharPositionInLine();}\n\t\t\t\t\t\t\tif ( state.backtracking==0 ) {bool = true;}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tpushFollow(FOLLOW_multExpr_in_addExpr730);\n\t\t\t\t\te2=multExpr();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return e;\n\t\t\t\t\tif ( state.backtracking==0 ) {it = new AddExpr(it, e2, bool, line, offset);}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault :\n\t\t\t\t\tbreak loop14;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( state.backtracking==0 ) {\n\t\t\t\t\te = it;\n\t\t\t\t}\n\t\t}\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\trecover(input,re);\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn e;\n\t}", "public static void main(String[] args) {\n NumberFact a, b;\n a = new NumberFact(1_000);\n b = new NumberFact(999);\n\n ArithmeticOperator x, y;\n x = new ArithmeticOperator('*', a, b);\n y = new ArithmeticOperator('+', x, b);\n\n System.out.println(y);\n System.out.println(y.eval());\n }", "private void createMul(Code32 code, int op, int cond, int Rd, int Rn, int Rm) {\r\n\t\tcode.instructions[code.iCount] = (cond << 28) | op | (Rd << 16) | (Rm << 8) | (0x9 << 4) | Rn;\r\n\t\tcode.incInstructionNum();\r\n\t}", "public static BinaryExpression multiplyAssign(Expression expression0, Expression expression1) {\n return makeBinary(ExpressionType.MultiplyAssign, expression0, expression1);\n }", "LengthScalarMultiply createLengthScalarMultiply();", "public final CQLParser.multiplicativeExpression_return multiplicativeExpression() throws RecognitionException {\n CQLParser.multiplicativeExpression_return retval = new CQLParser.multiplicativeExpression_return();\n retval.start = input.LT(1);\n\n Object root_0 = null;\n\n Token set100=null;\n CQLParser.powerExpression_return powerExpression99 = null;\n\n CQLParser.powerExpression_return powerExpression101 = null;\n\n\n Object set100_tree=null;\n\n try {\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:404:2: ( powerExpression ( ( MULT | DIV ) powerExpression )* )\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:404:4: powerExpression ( ( MULT | DIV ) powerExpression )*\n {\n root_0 = (Object)adaptor.nil();\n\n pushFollow(FOLLOW_powerExpression_in_multiplicativeExpression1886);\n powerExpression99=powerExpression();\n\n state._fsp--;\n\n adaptor.addChild(root_0, powerExpression99.getTree());\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:404:20: ( ( MULT | DIV ) powerExpression )*\n loop27:\n do {\n int alt27=2;\n int LA27_0 = input.LA(1);\n\n if ( ((LA27_0>=MULT && LA27_0<=DIV)) ) {\n alt27=1;\n }\n\n\n switch (alt27) {\n \tcase 1 :\n \t // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:404:21: ( MULT | DIV ) powerExpression\n \t {\n \t set100=(Token)input.LT(1);\n \t set100=(Token)input.LT(1);\n \t if ( (input.LA(1)>=MULT && input.LA(1)<=DIV) ) {\n \t input.consume();\n \t root_0 = (Object)adaptor.becomeRoot((Object)adaptor.create(set100), root_0);\n \t state.errorRecovery=false;\n \t }\n \t else {\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t throw mse;\n \t }\n\n \t pushFollow(FOLLOW_powerExpression_in_multiplicativeExpression1896);\n \t powerExpression101=powerExpression();\n\n \t state._fsp--;\n\n \t adaptor.addChild(root_0, powerExpression101.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop27;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (Object)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n \t\n \tcatch(RecognitionException re)\n \t{\t\n \t\treportError(re);\n \t\tthrow re;\n \t}\n finally {\n }\n return retval;\n }", "Sum getMultiplier();", "public MathEval() {\r\n super();\r\n\r\n constants=new TreeMap<String,Double>(String.CASE_INSENSITIVE_ORDER);\r\n setConstant(\"E\" ,Math.E);\r\n setConstant(\"Euler\" ,0.577215664901533D);\r\n setConstant(\"LN2\" ,0.693147180559945D);\r\n setConstant(\"LN10\" ,2.302585092994046D);\r\n setConstant(\"LOG2E\" ,1.442695040888963D);\r\n setConstant(\"LOG10E\",0.434294481903252D);\r\n setConstant(\"PHI\" ,1.618033988749895D);\r\n setConstant(\"PI\" ,Math.PI);\r\n\r\n variables=new TreeMap<String,Double>(String.CASE_INSENSITIVE_ORDER);\r\n\r\n functions=new TreeMap<String,FunctionHandler>(String.CASE_INSENSITIVE_ORDER);\r\n\r\n offset=0;\r\n isConstant=false;\r\n }", "private ASTNode binaryMultiplyRules(ASTNode left, ASTNode right) throws Exception {\n Token leftToken = left.getToken();\n Token rightToken = right.getToken();\n\n TokenType leftType = leftToken.getType();\n TokenType rightType = rightToken.getType();\n\n Token tempToken;\n TokenType numType = TokenType.NUMBER;\n TokenType minusType = TokenType.MINUS;\n TokenType mulType = TokenType.MUL;\n\n if (rightToken.getIdentifier().equals(\"0\")){\n //left is anything and right is 0\n tempToken = new Token(numType, \"0\");\n return new Num(tempToken);\n }\n else if (rightToken.getIdentifier().equals(\"1\")){\n //left is anything and right is 1\n return left;\n }\n else if (leftToken.getIdentifier().equals(\"0\")){\n //left is 0 and right is anything\n tempToken = new Token(numType, \"0\");\n return new Num(tempToken);\n }\n else if (leftToken.getIdentifier().equals(\"1\")){\n //left is 1 and right is anything\n return right;\n }\n else if(patternMatcher(leftType, rightType, numType, numType)){\n Double leftVal = Double.parseDouble(leftToken.getIdentifier());\n Double rightVal = Double.parseDouble(rightToken.getIdentifier());\n\n String prod = String.valueOf(leftVal * rightVal);\n tempToken = new Token(numType, prod);\n return new Num(tempToken);\n }\n else if (patternMatcher(leftType, rightType, minusType, minusType)){\n if (left instanceof UnaryOP && right instanceof UnaryOP){\n tempToken = new Token(mulType);\n ASTNode leftOP = ((UnaryOP) left).getOperand();\n ASTNode rightOp = ((UnaryOP) right).getOperand();\n return new BinaryOp(tempToken, leftOP, rightOp);\n }\n }\n tempToken = new Token(mulType);\n return new BinaryOp(tempToken ,left, right);\n }", "public static Rational multiply(Rational num1, Rational num2){\r\n Rational product = new Rational();\r\n \r\n // multiply throughout\r\n product.denominator = num1.getDenominator() * num2.getDenominator();\r\n product.numerator = num1.getNumerator() * num2.getNumerator();\r\n \r\n product.reduce();\r\n return product;\r\n }", "Matrix scalarMult(double x){\n int newMatrixSize = this.getSize();\n Matrix newM = new Matrix(newMatrixSize);\n for(int i = 1; i <= newMatrixSize; i++){\n List itRow = rows[i - 1];\n itRow.moveFront();\n while(itRow.index() != -1){\n Entry c = (Entry)itRow.get();\n newM.changeEntry(i, c.column, (x*c.value));\n itRow.moveNext();\n }\n }\n\n return newM;\n }", "@Override\n\tpublic Instruction parse(String[] s) throws WrongInstructionFormatException {\n\t\tif (s.length==1 && s[0].equalsIgnoreCase(\"mult\")) \n\t\t\treturn new Mult();\n\t\telse throw new WrongInstructionFormatException();\n\t}", "@Override\n public InterpreterValue mul(InterpreterValue v) {\n\n // If the given value is a IntegerValue create a new DoubleValue from\n // the multiplication-result\n if(v instanceof IntegerValue) return new DoubleValue(getValue() * ((IntegerValue) v).getValue());\n\n // If the given value is a DoubleValue create a new DoubleValue from\n // the multiplication-result\n if(v instanceof DoubleValue) return new DoubleValue(getValue() * ((DoubleValue) v).getValue());\n\n // In other case just throw an error\n throw new Error(\"Operator '*' is not defined for type double and \" + v.getName());\n\n }", "public final Expr mulExpr() throws RecognitionException {\r\n Expr result = null;\r\n\r\n int mulExpr_StartIndex = input.index();\r\n\r\n Token op=null;\r\n Expr lhs =null;\r\n\r\n Expr rhs =null;\r\n\r\n\r\n try {\r\n if ( state.backtracking>0 && alreadyParsedRule(input, 14) ) { return result; }\r\n\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:108:5: (lhs= unExpr (op= ( '*' | '/' ) rhs= unExpr )* )\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:108:9: lhs= unExpr (op= ( '*' | '/' ) rhs= unExpr )*\r\n {\r\n pushFollow(FOLLOW_unExpr_in_mulExpr613);\r\n lhs=unExpr();\r\n\r\n state._fsp--;\r\n if (state.failed) return result;\r\n\r\n if ( state.backtracking==0 ) { result =lhs; }\r\n\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:108:45: (op= ( '*' | '/' ) rhs= unExpr )*\r\n loop9:\r\n do {\r\n int alt9=2;\r\n int LA9_0 = input.LA(1);\r\n\r\n if ( (LA9_0==23||LA9_0==26) ) {\r\n alt9=1;\r\n }\r\n\r\n\r\n switch (alt9) {\r\n \tcase 1 :\r\n \t // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:108:47: op= ( '*' | '/' ) rhs= unExpr\r\n \t {\r\n \t op=(Token)input.LT(1);\r\n\r\n \t if ( input.LA(1)==23||input.LA(1)==26 ) {\r\n \t input.consume();\r\n \t state.errorRecovery=false;\r\n \t state.failed=false;\r\n \t }\r\n \t else {\r\n \t if (state.backtracking>0) {state.failed=true; return result;}\r\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\r\n \t throw mse;\r\n \t }\r\n\r\n\r\n \t pushFollow(FOLLOW_unExpr_in_mulExpr633);\r\n \t rhs=unExpr();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return result;\r\n\r\n \t if ( state.backtracking==0 ) { \r\n \t if ((op!=null?op.getText():null).equals(\"*\")) {\r\n \t result = new Mul(result, rhs);\r\n \t }\r\n \t if ((op!=null?op.getText():null).equals(\"/\")) {\r\n \t result = new Div(result, rhs); \r\n \t }\r\n \t }\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop9;\r\n }\r\n } while (true);\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n if ( state.backtracking>0 ) { memoize(input, 14, mulExpr_StartIndex); }\r\n\r\n }\r\n return result;\r\n }", "public static EquationExpression timesRaw(EquationExpression... args) {\n\t\tswitch (args.length) {\n\t\tcase 0:\n\t\t\treturn EquationNumericValue.from(1);\n\t\tcase 1:\n\t\t\treturn args[0];\n\t\tcase 2:\n\t\t\treturn new EquationProductOperator(args[0], args[1]);\n\t\tdefault:\n\t\t\tEquationExpression[] args2 = new EquationExpression[args.length\n\t\t\t\t\t- 1];\n\t\t\tSystem.arraycopy(args, 1, args2, 0, args.length - 1);\n\t\t\treturn new EquationProductOperator(args[0], sumRaw(args2));\n\t\t}\n\t}", "public final void entryRuleMultExp() throws RecognitionException {\n try {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1377:1: ( ruleMultExp EOF )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1378:1: ruleMultExp EOF\n {\n before(grammarAccess.getMultExpRule()); \n pushFollow(FOLLOW_ruleMultExp_in_entryRuleMultExp2881);\n ruleMultExp();\n\n state._fsp--;\n\n after(grammarAccess.getMultExpRule()); \n match(input,EOF,FOLLOW_EOF_in_entryRuleMultExp2888); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }", "public static EquationExpression timesRaw(EquationExpression... args) {\n switch(args.length) {\n case 0:\n return EquationNumericValue.from(1);\n case 1:\n return args[0];\n case 2:\n return new EquationProductOperator(args[0], args[1]);\n default:\n EquationExpression[] args2 = new EquationExpression[args.length-1];\n System.arraycopy(args, 1, args2, 0, args.length-1);\n return new EquationProductOperator(args[0], sumRaw(args2));\n }\n }", "public final void mult (Unit unit) throws ArithmeticException {\n\t\tlong u = mksa ; double r = factor; double v = value; double o = offset;\n\t\t/* dump(\"mult:this \"); unit.dump(\"mult:unit\"); */\n\t\tif (((mksa&_abs)!=0) && (unit.factor != 1)) throw\t// On a date\n\t\tnew ArithmeticException(\"****Unit.mult on a date!\");\n\t\tif (((mksa|unit.mksa)&_log) != 0) {\n\t\t\tif ((mksa == underScore) && (factor == 1.)) ;\n\t\t\telse if ((unit.mksa == underScore) && (unit.factor == 1.)) ;\n\t\t\telse throw new ArithmeticException\n\t\t\t(\"****Unit: can't multiply logs: \" + symbol + \" x \" + unit.symbol);\n\t\t}\n\t\t/* As soon as there is an operation, the offset is ignored \n\t\t * except if one of the factors is unity.\n\t\t */\n\t\tif ((offset!=0) || (unit.offset!=0)) {\n\t\t\tif (mksa == underScore) offset = unit.offset;\n\t\t\telse if (unit.mksa == underScore) ;\n\t\t\telse offset = 0;\n\t\t}\n\t\tv *= unit.value; \n\t\tr *= unit.factor;\n\t\tu += unit.mksa; u -= underScore;\n\t\tif ((u&0x0c80808080808080L) != 0) throw new ArithmeticException\n\t\t(\"****too large powers in: \" + symbol + \" x \" + unit.symbol);\n\t\tmksa = u;\n\t\tfactor = r;\n\t\tvalue = v;\n\t\t/* Decision for the new symbol */\n\t\tif ((symbol != null) && (unit.symbol != null)) {\n\t\t\tif ((unit.mksa == underScore) && (unit.factor == 1)) return;\t// No unit ...\n\t\t\tif (( mksa == underScore) && ( factor == 1)) symbol = unit.symbol;\n\t\t\telse if ((symbol.equals(unit.symbol)) && (factor == unit.factor))\n\t\t\t\tsymbol = toExpr(symbol) + \"2\" ;\n\t\t\telse symbol = toExpr(symbol) + \".\" + toExpr(unit.symbol) ;\n\t\t}\n\t}", "public final Expr addExpr() throws RecognitionException {\n Expr result = null;\n\n int addExpr_StartIndex = input.index();\n\n Token op=null;\n Expr lhs =null;\n\n Expr rhs =null;\n\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 11) ) { return result; }\n\n // /home/jahn/workspace1/QLAndroid/src/org/uva/sea/ql/parser/antlr/QL.g:124:5: (lhs= mulExpr (op= ( '+' | '-' ) rhs= mulExpr )* )\n // /home/jahn/workspace1/QLAndroid/src/org/uva/sea/ql/parser/antlr/QL.g:124:9: lhs= mulExpr (op= ( '+' | '-' ) rhs= mulExpr )*\n {\n pushFollow(FOLLOW_mulExpr_in_addExpr547);\n lhs=mulExpr();\n\n state._fsp--;\n if (state.failed) return result;\n\n if ( state.backtracking==0 ) { result =lhs; }\n\n // /home/jahn/workspace1/QLAndroid/src/org/uva/sea/ql/parser/antlr/QL.g:124:46: (op= ( '+' | '-' ) rhs= mulExpr )*\n loop8:\n do {\n int alt8=2;\n int LA8_0 = input.LA(1);\n\n if ( ((LA8_0 >= 21 && LA8_0 <= 22)) ) {\n alt8=1;\n }\n\n\n switch (alt8) {\n \tcase 1 :\n \t // /home/jahn/workspace1/QLAndroid/src/org/uva/sea/ql/parser/antlr/QL.g:124:48: op= ( '+' | '-' ) rhs= mulExpr\n \t {\n \t op=(Token)input.LT(1);\n\n \t if ( (input.LA(1) >= 21 && input.LA(1) <= 22) ) {\n \t input.consume();\n \t state.errorRecovery=false;\n \t state.failed=false;\n \t }\n \t else {\n \t if (state.backtracking>0) {state.failed=true; return result;}\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t throw mse;\n \t }\n\n\n \t pushFollow(FOLLOW_mulExpr_in_addExpr565);\n \t rhs=mulExpr();\n\n \t state._fsp--;\n \t if (state.failed) return result;\n\n \t if ( state.backtracking==0 ) { \n \t if ((op!=null?op.getText():null).equals(\"+\")) {\n \t result = new Add(result, rhs);\n \t }\n \t if ((op!=null?op.getText():null).equals(\"-\")) {\n \t result = new Sub(result, rhs); \n \t }\n \t }\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop8;\n }\n } while (true);\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n\n finally {\n \t// do for sure before leaving\n if ( state.backtracking>0 ) { memoize(input, 11, addExpr_StartIndex); }\n\n }\n return result;\n }", "Point mult (double s, Point result);", "@Override\r\n\tpublic void mul(int x, int y) {\n\t\t\r\n\t}", "@Override\r\n\tpublic int multi(int x, int y) {\n\t\treturn x * y;\r\n\t}", "CalcEvaluator(boolean mult) {\r\n this.mult = mult;\r\n }", "@Override\r\n\tpublic int mul() {\n\t\treturn 0;\r\n\t}", "public double multiplica(double a, double b) {\n\t\treturn a*b;\n\t}", "public final void mMUL() throws RecognitionException\n\t{\n\t\ttry\n\t\t{\n\t\t\tfinal int _type = AshvmLexer.MUL;\n\t\t\tfinal int _channel = BaseRecognizer.DEFAULT_TOKEN_CHANNEL;\n\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:708:5: ( 'mul' )\n\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:708:7: 'mul'\n\t\t\t{\n\t\t\t\tthis.match(\"mul\");\n\n\t\t\t}\n\n\t\t\tthis.state.type = _type;\n\t\t\tthis.state.channel = _channel;\n\t\t}\n\t\tfinally\n\t\t{\n\t\t}\n\t}", "public R3Mult(int rdIndex, int rsIndex, int id) {\n\n }", "@Override\n\tpublic int mult(int val1, int val2) {\n\t\treturn val1 * val2;\n\t}", "public final void rule__AddExp__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:8253:1: ( ( ruleMultExp ) )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:8254:1: ( ruleMultExp )\n {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:8254:1: ( ruleMultExp )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:8255:1: ruleMultExp\n {\n before(grammarAccess.getAddExpAccess().getMultExpParserRuleCall_0()); \n pushFollow(FOLLOW_ruleMultExp_in_rule__AddExp__Group__0__Impl16577);\n ruleMultExp();\n\n state._fsp--;\n\n after(grammarAccess.getAddExpAccess().getMultExpParserRuleCall_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "<C, PM> VariableExp<C, PM> createVariableExp();", "private Complex eval(Complex[] ca, Complex x) {\n\t\tComplex result = ca[0];\n\t\tfor (int i = 1; i < ca.length; i++) {\n\t\t\tresult = result.mul(x).add(ca[i]);\n\t\t}\n\t\treturn result;\n\t}", "public final double multExpr() throws RecognitionException {\n double value = 0.0;\n\n\n double e =0.0;\n\n\n try {\n // ExprInterp.g:32:5: (e= atom ( '*' e= atom )* )\n // ExprInterp.g:32:9: e= atom ( '*' e= atom )*\n {\n pushFollow(FOLLOW_atom_in_multExpr248);\n e=atom();\n\n state._fsp--;\n\n\n value = e;\n\n // ExprInterp.g:32:37: ( '*' e= atom )*\n loop5:\n do {\n int alt5=2;\n int LA5_0 = input.LA(1);\n\n if ( (LA5_0==12) ) {\n alt5=1;\n }\n\n\n switch (alt5) {\n \tcase 1 :\n \t // ExprInterp.g:32:38: '*' e= atom\n \t {\n \t match(input,12,FOLLOW_12_in_multExpr253); \n\n \t pushFollow(FOLLOW_atom_in_multExpr257);\n \t e=atom();\n\n \t state._fsp--;\n\n\n \t value *= e;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop5;\n }\n } while (true);\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n\n finally {\n \t// do for sure before leaving\n }\n return value;\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 }", "private static native double mul(int n);", "private String compute(String equ,String op)\n {\n String equation = equ;\n Pattern mdPattern = Pattern.compile(\"(\\\\d+([.]\\\\d+)*)(([\"+op+\"]))(\\\\d+([.]\\\\d+)*)\");\n Matcher matcher\t\t= mdPattern.matcher(equation);\n while(matcher.find())\n {\n String[] arr = null;\n double ans = 0;\n String eq = matcher.group(0);//get form x*y\n if(eq.contains(op))\n {\n arr = eq.split(\"\\\\\"+op);//make arr\n if(op.equals(\"*\"))\n ans = Double.valueOf(arr[0])*Double.valueOf(arr[1]);//compute\n if(op.equals(\"/\"))\n ans = Double.valueOf(arr[0])/Double.valueOf(arr[1]);//compute\n if(op.equals(\"+\"))\n ans = Double.valueOf(arr[0])+Double.valueOf(arr[1]);//compute\n if(op.equals(\"-\"))\n ans = Double.valueOf(arr[0])-Double.valueOf(arr[1]);//compute\n }\n\n equation = matcher.replaceFirst(String.valueOf(ans));//replace in equation\n matcher = mdPattern.matcher(equation);//look for more matches\n }\n return equation;\n }", "public void multiply(Object mulValue) {\r\n\r\n\t\tNumberOperation operator = new NumberOperation(this.value, mulValue) {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic Number doAnOperation() {\r\n\t\t\t\tTypeEnum typeOfResult = getFinalType();\r\n\t\t\t\tif(typeOfResult == TypeEnum.TYPE_INTEGER) {\r\n\t\t\t\t\treturn getO1().intValue() * getO2().intValue();\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\treturn getO1().doubleValue() * getO2().doubleValue();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t\tthis.value = operator.doAnOperation();\r\n\t}", "public void mul(String a, String b, int i, String reg) {\r\n registerName.add(reg);\r\n int posa = registerRegister.indexOf(a);\r\n int posb = registerRegister.indexOf(b);\r\n int element = Integer.parseInt(registerValues.get(posa));\r\n int element1 = Integer.parseInt(registerValues.get(posb));\r\n int mul = element * element1;\r\n registerValues.add(Integer.toString(mul));\r\n }", "public static void main(String args[]) {\n\tExpr e3 = new Minus(new Num(100),new Num(99));\n\tSystem.out.println(\"e3 is \" + e3.exprToString());\n\t// outputs \"e4 is (4*5-(100-99))\"\n\tExpr e4 = new Minus(new Times(new Num(4),new Num(5)),e3);\n\tSystem.out.println(\"e4 is \" + e4.exprToString());\n }", "public void multiply(double multiplier) {\n x *= multiplier;\n y *= multiplier;\n }", "Rational multiply(Rational p){\n Rational firstarg=new Rational();\n firstarg.numerator=numerator;\n firstarg.denominator=denominator;\n\n firstarg.numerator=p.numerator*firstarg.numerator;\n firstarg.denominator=p.denominator*firstarg.denominator;\n return firstarg;\n }", "public final void synpred27_expression_fragment() throws RecognitionException { \n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:11: ( ( '+' | '-' ) mult )\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:11: ( '+' | '-' ) mult\n {\n if ( (input.LA(1)>=46 && input.LA(1)<=47) ) {\n input.consume();\n state.errorRecovery=false;state.failed=false;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n MismatchedSetException mse = new MismatchedSetException(null,input);\n throw mse;\n }\n\n pushFollow(FOLLOW_mult_in_synpred27_expression437);\n mult();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n }" ]
[ "0.71816504", "0.68509716", "0.6790061", "0.6790061", "0.6719847", "0.662252", "0.6524968", "0.6425489", "0.64137614", "0.6231617", "0.6115805", "0.6112296", "0.6065207", "0.60344887", "0.6033878", "0.600525", "0.59952325", "0.5972148", "0.594838", "0.59280413", "0.5922113", "0.5917301", "0.5884391", "0.58605164", "0.5824194", "0.5792324", "0.57897234", "0.5735053", "0.57310444", "0.5702243", "0.5685638", "0.566538", "0.56604946", "0.5624147", "0.56180614", "0.5613636", "0.5608406", "0.5608072", "0.56037015", "0.5579075", "0.5563172", "0.55553854", "0.55489737", "0.5538042", "0.5535295", "0.55218285", "0.5514709", "0.55080235", "0.5507662", "0.55014133", "0.5496578", "0.54754764", "0.54668754", "0.54659885", "0.5457093", "0.54570585", "0.5451691", "0.5443317", "0.54366785", "0.54326445", "0.5425212", "0.540909", "0.53834087", "0.53812927", "0.53713524", "0.53704965", "0.5364532", "0.5336682", "0.5333563", "0.53205645", "0.53128475", "0.53083515", "0.5305448", "0.52945733", "0.52901757", "0.5278995", "0.52752465", "0.5273296", "0.52655876", "0.52618086", "0.52584034", "0.5256669", "0.5248384", "0.52452195", "0.5244816", "0.52433026", "0.5236883", "0.52323365", "0.52319634", "0.52287084", "0.52283555", "0.52114177", "0.520705", "0.52025074", "0.5201104", "0.5196095", "0.5193989", "0.5193367", "0.5179163", "0.5177159" ]
0.6454907
7
Constructs a mult by given expressions.
public Mult(Expression left, String right) { super(left, right); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Expression multExpression() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tExpression e0 = powerExpression();\r\n\t\twhile(isKind(OP_TIMES, OP_DIV, OP_MOD)) {\r\n\t\t\tToken op = consume();\r\n\t\t\tExpression e1 = powerExpression();\r\n\t\t\te0 = new ExpressionBinary(first,e0,op,e1);\r\n\t\t}\r\n\t\treturn e0;\r\n\t}", "private Expr mult(Expr x) throws Err {\n if (x instanceof ExprUnary) {\n ExprUnary y=(ExprUnary)x;\n if (y.op==ExprUnary.Op.SOME) return ExprUnary.Op.SOMEOF.make(y.pos, y.sub);\n if (y.op==ExprUnary.Op.LONE) return ExprUnary.Op.LONEOF.make(y.pos, y.sub);\n if (y.op==ExprUnary.Op.ONE) return ExprUnary.Op.ONEOF.make(y.pos, y.sub);\n }\n return x;\n }", "public Mult(Expression left, Expression right) {\n super(left, right);\n }", "public Mult(Expression left, Expression right) {\n super(left, right);\n }", "Multiply createMultiply();", "public final VecMathParser.expr_return expr() throws RecognitionException {\n VecMathParser.expr_return retval = new VecMathParser.expr_return();\n retval.start = input.LT(1);\n\n Object root_0 = null;\n\n Token char_literal8=null;\n VecMathParser.multExpr_return multExpr7 = null;\n\n VecMathParser.multExpr_return multExpr9 = null;\n\n\n Object char_literal8_tree=null;\n\n try {\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:15:5: ( multExpr ( '+' multExpr )* )\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:15:7: multExpr ( '+' multExpr )*\n {\n root_0 = (Object)adaptor.nil();\n\n pushFollow(FOLLOW_multExpr_in_expr117);\n multExpr7=multExpr();\n\n state._fsp--;\n\n adaptor.addChild(root_0, multExpr7.getTree());\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:15:16: ( '+' multExpr )*\n loop3:\n do {\n int alt3=2;\n int LA3_0 = input.LA(1);\n\n if ( (LA3_0==10) ) {\n alt3=1;\n }\n\n\n switch (alt3) {\n \tcase 1 :\n \t // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:15:17: '+' multExpr\n \t {\n \t char_literal8=(Token)match(input,10,FOLLOW_10_in_expr120); \n \t char_literal8_tree = (Object)adaptor.create(char_literal8);\n \t root_0 = (Object)adaptor.becomeRoot(char_literal8_tree, root_0);\n\n \t pushFollow(FOLLOW_multExpr_in_expr123);\n \t multExpr9=multExpr();\n\n \t state._fsp--;\n\n \t adaptor.addChild(root_0, multExpr9.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop3;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (Object)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "public Mult(String left, Expression right) {\n super(left, right);\n }", "public Mult(Expression left, double right) {\n super(left, right);\n }", "public Mult(double left, Expression right) {\n super(left, right);\n }", "void visit(MultiplicationExpression expression);", "public BinMltLinExpr multiply(BinLinExpr expr) {\n\t\t\n\t\tBinMltLinExpr result = new BinMltLinExpr();\n\t\t\n\t\t// Multiply variables together\n\t\tfor (int i = 0; i < expr.vars.size(); i++) {\n\t\t\tfor (int j = 0; j < termVars.size(); j++) {\n\t\t\t\t\n\t\t\t\tdouble newCoeff = expr.coefficients.get(i) * coefficients.get(j);\n\t\t\t\tList<BinVar> newVars = new ArrayList<BinVar>();\n\t\t\t\tnewVars.add(expr.vars.get(i));\n\t\t\t\tnewVars.addAll(termVars.get(j));\n\t\t\t\t\n\t\t\t\tresult.addTerm(newCoeff, newVars);\n\t\t\t}\n\t\t}\n\n\t\t// Multiply variables with constants\n\t\tfor (int i = 0; i < termVars.size(); i++) {\n\t\t\tdouble newCoeff = coefficients.get(i) * expr.constant;\n\t\t\tresult.addTerm(newCoeff, termVars.get(i));\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < expr.vars.size(); i++) {\n\t\t\tdouble newCoeff = expr.coefficients.get(i) * constant;\n\t\t\tresult.addTerm(newCoeff, expr.vars.get(i));\n\t\t}\n\t\t\n\t\tresult.addConstant(constant*expr.constant);\n\t\t\n\t\treturn result;\n\t}", "public void enfoncerMult() {\n\t\ttry {\n\t\t\tthis.op = new Mult();\n\t\t\tif (!raz) {\n\t\t\t\tthis.pile.push(valC);\n\t\t\t}\n\t\t\tint a = this.pile.pop(); int b = this.pile.pop();\n\t\t\tthis.valC = this.op.eval(b,a);\n\t\t\tthis.pile.push(this.valC);\n\t\t\tthis.raz = true;\n\t\t}\n\t\tcatch (EmptyStackException e) {\n\t\t\tSystem.out.println(\"Erreur de syntaxe : Saisir deux operandes avant de saisir un operateur\");\n\t\t}\n\t}", "public Transformation mult(Transformation a) {\n\t\tTransformation result = new Transformation();\n\t\tsuper.mult(a, result);\n\t\treturn result;\n\t}", "@Override\n public Expression assign(String var, Expression expression) {\n Expression left = super.getLeft();\n Expression right = super.getRight();\n return new Mult(left.assign(var, expression), right.assign(var, expression));\n }", "private void mul() {\n\n\t}", "public void multiply() {\n\t\t\n\t}", "public static double multi() {\n System.out.println(\"Enter multiplier\");\n double a = getNumber();\n System.out.println(\"Enter multiplicand\");\n double b = getNumber();\n\n return a * b;\n }", "@SuppressWarnings(\"unchecked\")\n @Override\n public Expression asExpression(Rule rule, Deque<Value<Expression>> args) {\n if (args.size() == 1) {\n // a single term is not a product\n return args.pollFirst().getTarget();\n } else {\n // assume x to be *x, because the product will start by 1*x\n Term<Multiplicative> factor = new Term<>(Multiplicative.MULT, args.removeFirst().getTarget());\n List<Term<Multiplicative>> arguments = new LinkedList<>();\n arguments.add(factor);\n args.stream()\n // next arguments are all Term<Multiplicative>\n .map(v -> (Term<Multiplicative>) v.getTarget())\n .forEachOrdered(arguments::add);\n return new Product(arguments);\n }\n }", "public static void main(String[] args) throws Exception {\r\n Expression e = new Plus(new Mult(2, \"x\"), new Plus(new Sin(new Mult(4, \"y\")), new Pow(\"e\", \"x\")));\r\n System.out.println(e);\r\n Map<String, Double> assignment = new TreeMap<String, Double>();\r\n assignment.put(\"x\", 2.0);\r\n assignment.put(\"y\", 0.25);\r\n assignment.put(\"e\", 2.71);\r\n System.out.println(e.evaluate(assignment));\r\n e = e.differentiate(\"x\");\r\n System.out.println(e);\r\n System.out.println(e.evaluate(assignment));\r\n System.out.println(e.simplify());\r\n System.out.println(e);\r\n }", "public BinMltLinExpr multiply(BinMltLinExpr expr) {\n\t\t\n\t\tBinMltLinExpr result = new BinMltLinExpr();\n\t\t\n\t\t// Multiply variables together\n\t\tfor (int i = 0; i < expr.termVars.size(); i++) {\n\t\t\tfor (int j = 0; j < termVars.size(); j++) {\n\t\t\t\t\n\t\t\t\tdouble newCoeff = expr.coefficients.get(i) * coefficients.get(j);\n\t\t\t\tList<BinVar> newVars = new ArrayList<BinVar>();\n\t\t\t\tnewVars.addAll(expr.termVars.get(i));\n\t\t\t\tnewVars.addAll(termVars.get(j));\n\t\t\t\t\n\t\t\t\tresult.addTerm(newCoeff, newVars);\n\t\t\t}\n\t\t}\n\n\t\t// Multiply variables with constants\n\t\tfor (int i = 0; i < termVars.size(); i++) {\n\t\t\tdouble newCoeff = coefficients.get(i) * expr.constant;\n\t\t\tresult.addTerm(newCoeff, termVars.get(i));\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < expr.termVars.size(); i++) {\n\t\t\tdouble newCoeff = expr.coefficients.get(i) * constant;\n\t\t\tresult.addTerm(newCoeff, expr.termVars.get(i));\n\t\t}\n\t\t\n\t\tresult.addConstant(constant*expr.constant);\n\t\t\n\t\treturn result;\n\t}", "public final VecMathParser.multExpr_return multExpr() throws RecognitionException {\n VecMathParser.multExpr_return retval = new VecMathParser.multExpr_return();\n retval.start = input.LT(1);\n\n Object root_0 = null;\n\n Token char_literal11=null;\n Token char_literal12=null;\n VecMathParser.primary_return primary10 = null;\n\n VecMathParser.primary_return primary13 = null;\n\n\n Object char_literal11_tree=null;\n Object char_literal12_tree=null;\n\n try {\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:5: ( primary ( ( '*' | '.' ) primary )* )\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:9: primary ( ( '*' | '.' ) primary )*\n {\n root_0 = (Object)adaptor.nil();\n\n pushFollow(FOLLOW_primary_in_multExpr145);\n primary10=primary();\n\n state._fsp--;\n\n adaptor.addChild(root_0, primary10.getTree());\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:17: ( ( '*' | '.' ) primary )*\n loop5:\n do {\n int alt5=2;\n int LA5_0 = input.LA(1);\n\n if ( ((LA5_0>=11 && LA5_0<=12)) ) {\n alt5=1;\n }\n\n\n switch (alt5) {\n \tcase 1 :\n \t // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:18: ( '*' | '.' ) primary\n \t {\n \t // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:18: ( '*' | '.' )\n \t int alt4=2;\n \t int LA4_0 = input.LA(1);\n\n \t if ( (LA4_0==11) ) {\n \t alt4=1;\n \t }\n \t else if ( (LA4_0==12) ) {\n \t alt4=2;\n \t }\n \t else {\n \t NoViableAltException nvae =\n \t new NoViableAltException(\"\", 4, 0, input);\n\n \t throw nvae;\n \t }\n \t switch (alt4) {\n \t case 1 :\n \t // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:19: '*'\n \t {\n \t char_literal11=(Token)match(input,11,FOLLOW_11_in_multExpr149); \n \t char_literal11_tree = (Object)adaptor.create(char_literal11);\n \t root_0 = (Object)adaptor.becomeRoot(char_literal11_tree, root_0);\n\n\n \t }\n \t break;\n \t case 2 :\n \t // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:24: '.'\n \t {\n \t char_literal12=(Token)match(input,12,FOLLOW_12_in_multExpr152); \n \t char_literal12_tree = (Object)adaptor.create(char_literal12);\n \t root_0 = (Object)adaptor.becomeRoot(char_literal12_tree, root_0);\n\n\n \t }\n \t break;\n\n \t }\n\n \t pushFollow(FOLLOW_primary_in_multExpr156);\n \t primary13=primary();\n\n \t state._fsp--;\n\n \t adaptor.addChild(root_0, primary13.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop5;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (Object)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "@Override\n\tpublic void visit(MultiplyNode node) {\n\t\tif (Evaluator.checkScope(node) == false) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (Evaluator.checkAssert(node) == false) {\n\t\t\treturn;\n\t\t}\n\n\t\t/**\n\t\t * evaluam cei doi fii\n\t\t */\n\t\tEvaluator.evaluate(node.getChild(0));\n\t\tEvaluator.evaluate(node.getChild(1));\n\n\t\tInteger i, j;\n\t\t/**\n\t\t * salvam si inmultim valorile rezulate in urma evaluarii celor 2 fii si\n\t\t * setam valoarea corespunzatoare in nodul curent\n\t\t */\n\t\tif (node.getChild(1) instanceof Variable) {\n\t\t\ti = Integer.parseInt(Evaluator.variables.get(node.getChild(1).getName()));\n\n\t\t} else {\n\t\t\ti = Integer.parseInt(node.getChild(1).getName());\n\t\t}\n\n\t\tif (node.getChild(0) instanceof Variable) {\n\t\t\tj = Integer.parseInt(Evaluator.variables.get(node.getChild(0).getName()));\n\n\t\t} else {\n\t\t\tj = Integer.parseInt(node.getChild(0).getName());\n\t\t}\n\n\t\tInteger n = i * j;\n\n\t\tnode.setName(n.toString());\n\t}", "static Double executeMultiplication(List<Double> operands) {\n Double result = null;\n for (Double operand : operands) {\n if (Objects.isNull(result)) {\n result = operand;\n }\n else {\n result = result * operand;\n }\n }\n return result;\n }", "public Polynomial visit(ProductExpression expression) {\n return Polynomial.multiply(\n expression.getLeft().accept(this),\n expression.getRight().accept(this));\n }", "BaseNumber multiply(BaseNumber operand);", "public final Expr multExpr() throws RecognitionException {\n\t\tExpr e = null;\n\n\n\t\tToken STAR15=null;\n\t\tExpr e1 =null;\n\t\tExpr e2 =null;\n\n\n\t\t\t\tExpr it = null;\n\t\t\t\n\t\ttry {\n\t\t\t// ul.g:189:3: (e1= atom ( STAR e2= atom )* )\n\t\t\t// ul.g:190:2: e1= atom ( STAR e2= atom )*\n\t\t\t{\n\t\t\tpushFollow(FOLLOW_atom_in_multExpr768);\n\t\t\te1=atom();\n\t\t\tstate._fsp--;\n\t\t\tif (state.failed) return e;\n\t\t\tif ( state.backtracking==0 ) {it = e1;}\n\t\t\t// ul.g:191:2: ( STAR e2= atom )*\n\t\t\tloop15:\n\t\t\twhile (true) {\n\t\t\t\tint alt15=2;\n\t\t\t\tint LA15_0 = input.LA(1);\n\t\t\t\tif ( (LA15_0==STAR) ) {\n\t\t\t\t\talt15=1;\n\t\t\t\t}\n\n\t\t\t\tswitch (alt15) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// ul.g:191:4: STAR e2= atom\n\t\t\t\t\t{\n\t\t\t\t\tSTAR15=(Token)match(input,STAR,FOLLOW_STAR_in_multExpr775); if (state.failed) return e;\n\t\t\t\t\tpushFollow(FOLLOW_atom_in_multExpr781);\n\t\t\t\t\te2=atom();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return e;\n\t\t\t\t\tif ( state.backtracking==0 ) {it = new MultExpr(it, e2, (STAR15!=null?STAR15.getLine():0), STAR15.getCharPositionInLine());}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault :\n\t\t\t\t\tbreak loop15;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( state.backtracking==0 ) {\n\t\t\t\t\te = it;\n\t\t\t\t}\n\t\t}\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\trecover(input,re);\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn e;\n\t}", "public T mul(T first, T second);", "public final double expr() throws RecognitionException {\n double value = 0.0;\n\n\n double e =0.0;\n\n\n try {\n // ExprInterp.g:24:5: (e= multExpr ( '+' e= multExpr | '-' e= multExpr )* |e= maxF )\n int alt4=2;\n int LA4_0 = input.LA(1);\n\n if ( ((LA4_0 >= ID && LA4_0 <= LEFTP)||LA4_0==REL) ) {\n alt4=1;\n }\n else if ( (LA4_0==MAXI) ) {\n alt4=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 4, 0, input);\n\n throw nvae;\n\n }\n switch (alt4) {\n case 1 :\n // ExprInterp.g:24:9: e= multExpr ( '+' e= multExpr | '-' e= multExpr )*\n {\n pushFollow(FOLLOW_multExpr_in_expr155);\n e=multExpr();\n\n state._fsp--;\n\n\n value = e;\n\n // ExprInterp.g:25:9: ( '+' e= multExpr | '-' e= multExpr )*\n loop3:\n do {\n int alt3=3;\n int LA3_0 = input.LA(1);\n\n if ( (LA3_0==13) ) {\n alt3=1;\n }\n else if ( (LA3_0==15) ) {\n alt3=2;\n }\n\n\n switch (alt3) {\n \tcase 1 :\n \t // ExprInterp.g:25:13: '+' e= multExpr\n \t {\n \t match(input,13,FOLLOW_13_in_expr171); \n\n \t pushFollow(FOLLOW_multExpr_in_expr175);\n \t e=multExpr();\n\n \t state._fsp--;\n\n\n \t value += e;\n\n \t }\n \t break;\n \tcase 2 :\n \t // ExprInterp.g:26:13: '-' e= multExpr\n \t {\n \t match(input,15,FOLLOW_15_in_expr191); \n\n \t pushFollow(FOLLOW_multExpr_in_expr195);\n \t e=multExpr();\n\n \t state._fsp--;\n\n\n \t value -= e;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop3;\n }\n } while (true);\n\n\n }\n break;\n case 2 :\n // ExprInterp.g:28:8: e= maxF\n {\n pushFollow(FOLLOW_maxF_in_expr221);\n e=maxF();\n\n state._fsp--;\n\n\n value = e;\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n\n finally {\n \t// do for sure before leaving\n }\n return value;\n }", "public final void mul() {\n\t\tif (size > 1) {\n\n\t\t\tdouble topMostValue = pop();\n\t\t\tdouble secondTopMostValue = pop();\n\t\t\tpush(secondTopMostValue * topMostValue);\n\t\t}\n\t}", "public Mult(String left, double right) {\n super(left, right);\n }", "public static Transform mult(Transform t1, Transform t2) {\n\t\treturn transpose(t1.a * t2.a + t1.c * t2.b, t1.a * t2.c + t1.c * t2.d, t1.a * t2.tx + t1.c * t2.ty + t1.tx,\n\t\t\t\t\t\t t1.b * t2.a + t1.d * t2.b, t1.b * t2.c + t1.d * t2.d, t1.b * t2.tx + t1.d * t2.ty + t1.ty);\n\t}", "private void multiplication()\n\t{\n\t\tFun = Function.MULTIPLY; //Function set to determine what action should be taken later.\n\t\t\n\t\t\tsetLeftValue();\n\t\t\tentry.grabFocus();\n\t\t\n\t}", "public int mult()\r\n\t{\r\n\t\tint a=10;\r\n\t\tint b=20;\r\n\t\tint c = a*b;\r\n\t\treturn(c);\r\n\t}", "public Object visitMultiplicativeExpression(GNode n) {\n Object a, b, result;\n String op;\n \n nonboolean = true;\n \n dostring = true;\n \n a = dispatch(n.getGeneric(0));\n b = dispatch(n.getGeneric(2));\n op = n.getString(1);\n \n dostring = false;\n \n if (a instanceof Long && b instanceof Long) {\n if ((op.equals(\"/\")\n || op.equals(\"%\")) && ((Long) b).equals(new Long(0))) {\n System.err.println(\"division by zero in #if\");\n result = new Long(0);\n }\n if (op.equals(\"*\")) {\n result = (Long) a * (Long) b;\n }\n else if (op.equals(\"/\")) {\n result = (Long) a / (Long) b;\n }\n else if (op.equals(\"%\")) {\n result = (Long) a % (Long) b;\n }\n else {\n result = \"\";\n }\n }\n else {\n result = parens(a) + \" \" + op + \" \" + parens(b);\n }\n \n return result;\n }", "public static BinaryExpression multiply(Expression expression0, Expression expression1) {\n return makeBinary(ExpressionType.Multiply, expression0, expression1);\n }", "public T elementMult( T b ) {\n convertType.specify(this, b);\n T A = convertType.convert(this);\n b = convertType.convert(b);\n\n T c = A.createLike();\n A.ops.elementMult(A.mat, b.mat, c.mat);\n return c;\n }", "public final expressionParser.add_return add() throws RecognitionException {\n expressionParser.add_return retval = new expressionParser.add_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n Token char_literal38=null;\n Token char_literal39=null;\n expressionParser.mult_return mult37 = null;\n\n expressionParser.mult_return mult40 = null;\n\n\n CommonTree char_literal38_tree=null;\n CommonTree char_literal39_tree=null;\n\n try {\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:3: ( mult ( ( '+' | '-' ) mult )* )\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:5: mult ( ( '+' | '-' ) mult )*\n {\n root_0 = (CommonTree)adaptor.nil();\n\n pushFollow(FOLLOW_mult_in_add424);\n mult37=mult();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, mult37.getTree());\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:10: ( ( '+' | '-' ) mult )*\n loop17:\n do {\n int alt17=2;\n alt17 = dfa17.predict(input);\n switch (alt17) {\n \tcase 1 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:11: ( '+' | '-' ) mult\n \t {\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:11: ( '+' | '-' )\n \t int alt16=2;\n \t int LA16_0 = input.LA(1);\n\n \t if ( (LA16_0==46) ) {\n \t alt16=1;\n \t }\n \t else if ( (LA16_0==47) ) {\n \t alt16=2;\n \t }\n \t else {\n \t if (state.backtracking>0) {state.failed=true; return retval;}\n \t NoViableAltException nvae =\n \t new NoViableAltException(\"\", 16, 0, input);\n\n \t throw nvae;\n \t }\n \t switch (alt16) {\n \t case 1 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:12: '+'\n \t {\n \t char_literal38=(Token)match(input,46,FOLLOW_46_in_add428); if (state.failed) return retval;\n \t if ( state.backtracking==0 ) {\n \t char_literal38_tree = (CommonTree)adaptor.create(char_literal38);\n \t root_0 = (CommonTree)adaptor.becomeRoot(char_literal38_tree, root_0);\n \t }\n\n \t }\n \t break;\n \t case 2 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:19: '-'\n \t {\n \t char_literal39=(Token)match(input,47,FOLLOW_47_in_add433); if (state.failed) return retval;\n \t if ( state.backtracking==0 ) {\n \t char_literal39_tree = (CommonTree)adaptor.create(char_literal39);\n \t root_0 = (CommonTree)adaptor.becomeRoot(char_literal39_tree, root_0);\n \t }\n\n \t }\n \t break;\n\n \t }\n\n \t pushFollow(FOLLOW_mult_in_add437);\n \t mult40=mult();\n\n \t state._fsp--;\n \t if (state.failed) return retval;\n \t if ( state.backtracking==0 ) adaptor.addChild(root_0, mult40.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop17;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "public Double eval(Double... operands);", "public Mult(double left, String right) {\n super(left, right);\n }", "public <V extends Number> FluentExp<V> times (SQLExpression<V> expr)\n {\n return new Mul<V>(this, expr);\n }", "public static MathNode create(List<MathNode> nodes) {\n return new PowerNode(nodes);\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"MULT\";\n\t}", "NumericExpression createNumericExpression();", "abstract void mulS();", "public final expressionParser.mult_return mult() throws RecognitionException {\n expressionParser.mult_return retval = new expressionParser.mult_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n Token char_literal42=null;\n Token char_literal43=null;\n expressionParser.unary_return unary41 = null;\n\n expressionParser.unary_return unary44 = null;\n\n\n CommonTree char_literal42_tree=null;\n CommonTree char_literal43_tree=null;\n\n try {\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:3: ( unary ( ( '*' | '/' ) unary )* )\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:5: unary ( ( '*' | '/' ) unary )*\n {\n root_0 = (CommonTree)adaptor.nil();\n\n pushFollow(FOLLOW_unary_in_mult454);\n unary41=unary();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, unary41.getTree());\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:11: ( ( '*' | '/' ) unary )*\n loop19:\n do {\n int alt19=2;\n int LA19_0 = input.LA(1);\n\n if ( ((LA19_0>=48 && LA19_0<=49)) ) {\n alt19=1;\n }\n\n\n switch (alt19) {\n \tcase 1 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:12: ( '*' | '/' ) unary\n \t {\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:12: ( '*' | '/' )\n \t int alt18=2;\n \t int LA18_0 = input.LA(1);\n\n \t if ( (LA18_0==48) ) {\n \t alt18=1;\n \t }\n \t else if ( (LA18_0==49) ) {\n \t alt18=2;\n \t }\n \t else {\n \t if (state.backtracking>0) {state.failed=true; return retval;}\n \t NoViableAltException nvae =\n \t new NoViableAltException(\"\", 18, 0, input);\n\n \t throw nvae;\n \t }\n \t switch (alt18) {\n \t case 1 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:13: '*'\n \t {\n \t char_literal42=(Token)match(input,48,FOLLOW_48_in_mult458); if (state.failed) return retval;\n \t if ( state.backtracking==0 ) {\n \t char_literal42_tree = (CommonTree)adaptor.create(char_literal42);\n \t root_0 = (CommonTree)adaptor.becomeRoot(char_literal42_tree, root_0);\n \t }\n\n \t }\n \t break;\n \t case 2 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:20: '/'\n \t {\n \t char_literal43=(Token)match(input,49,FOLLOW_49_in_mult463); if (state.failed) return retval;\n \t if ( state.backtracking==0 ) {\n \t char_literal43_tree = (CommonTree)adaptor.create(char_literal43);\n \t root_0 = (CommonTree)adaptor.becomeRoot(char_literal43_tree, root_0);\n \t }\n\n \t }\n \t break;\n\n \t }\n\n \t pushFollow(FOLLOW_unary_in_mult467);\n \t unary44=unary();\n\n \t state._fsp--;\n \t if (state.failed) return retval;\n \t if ( state.backtracking==0 ) adaptor.addChild(root_0, unary44.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop19;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "public final Expr addExpr() throws RecognitionException {\r\n Expr result = null;\r\n\r\n int addExpr_StartIndex = input.index();\r\n\r\n Token op=null;\r\n Expr lhs =null;\r\n\r\n Expr rhs =null;\r\n\r\n\r\n try {\r\n if ( state.backtracking>0 && alreadyParsedRule(input, 15) ) { return result; }\r\n\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:121:5: (lhs= mulExpr (op= ( '+' | '-' ) rhs= mulExpr )* )\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:121:9: lhs= mulExpr (op= ( '+' | '-' ) rhs= mulExpr )*\r\n {\r\n pushFollow(FOLLOW_mulExpr_in_addExpr674);\r\n lhs=mulExpr();\r\n\r\n state._fsp--;\r\n if (state.failed) return result;\r\n\r\n if ( state.backtracking==0 ) { result =lhs; }\r\n\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:121:46: (op= ( '+' | '-' ) rhs= mulExpr )*\r\n loop10:\r\n do {\r\n int alt10=2;\r\n int LA10_0 = input.LA(1);\r\n\r\n if ( ((LA10_0 >= 24 && LA10_0 <= 25)) ) {\r\n alt10=1;\r\n }\r\n\r\n\r\n switch (alt10) {\r\n \tcase 1 :\r\n \t // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:121:48: op= ( '+' | '-' ) rhs= mulExpr\r\n \t {\r\n \t op=(Token)input.LT(1);\r\n\r\n \t if ( (input.LA(1) >= 24 && input.LA(1) <= 25) ) {\r\n \t input.consume();\r\n \t state.errorRecovery=false;\r\n \t state.failed=false;\r\n \t }\r\n \t else {\r\n \t if (state.backtracking>0) {state.failed=true; return result;}\r\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\r\n \t throw mse;\r\n \t }\r\n\r\n\r\n \t pushFollow(FOLLOW_mulExpr_in_addExpr692);\r\n \t rhs=mulExpr();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return result;\r\n\r\n \t if ( state.backtracking==0 ) { \r\n \t if ((op!=null?op.getText():null).equals(\"+\")) {\r\n \t result = new Add(result, rhs);\r\n \t }\r\n \t if ((op!=null?op.getText():null).equals(\"-\")) {\r\n \t result = new Sub(result, rhs); \r\n \t }\r\n \t }\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop10;\r\n }\r\n } while (true);\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n if ( state.backtracking>0 ) { memoize(input, 15, addExpr_StartIndex); }\r\n\r\n }\r\n return result;\r\n }", "public static double multi(double a, double b) {\n return a * b;\n }", "@Test\n public void testParseMul() {\n System.out.println(\"testParseMul\");\n byte[] expected = {\n Instruction.LV.getId(), 0, 0, 32,\n Instruction.LV.getId(), 0, 0, 36,\n Instruction.MUL.getId(),\n Instruction.LV.getId(), 0, 0, 40,\n Instruction.MUL.getId()\n };\n\n TermParser p = TermParserTestSetup.getMulTermSetup();\n assertEquals(\"Parse\", true, p.parse());\n AssemblerCodeChecker.assertCodeEquals(\"Code \", expected, TermParserTestSetup.getByteCode());\n }", "@Override\n public Expression simplifyMore() {\n Expression left = super.getLeft();\n Expression right = super.getRight();\n\n // x * x -> x^2\n if (left.toString().equals(right.toString())) {\n return new Pow(left, 2);\n }\n\n // ((2.0 * x) * (x * 3.0)) -> 6x^2\n if (left instanceof Mult && right instanceof Mult) {\n if (((Mult) left).getRight().toString().equals(((Mult) right).getLeft().toString())) {\n Expression exp = new Mult(new Mult(((Mult) left).getLeft(), ((Mult) right).getRight()),\n new Mult(((Mult) left).getRight(), ((Mult) right).getLeft()));\n exp.turnBonusOn();\n return exp.simplify();\n }\n }\n\n // 2x * 2x -> 4x^2\n if (left instanceof Mult && right instanceof Mult) {\n if (((Mult) left).getRight().toString().equals(((Mult) right).getRight().toString())) {\n return new Mult(new Mult(((Mult) left).getLeft(), ((Mult) right).getLeft()).simplify(),\n new Pow(((Mult) left).getRight(), 2)).simplify();\n }\n }\n\n // 2x * 2y -> 4xy\n if (left instanceof Mult && right instanceof Mult) {\n return new Mult(new Mult(((Mult) left).getLeft(), ((Mult) right).getLeft()).simplify(),\n new Mult(((Mult) left).getRight(), ((Mult) right).getRight())).simplify();\n }\n\n // sin(x) * cos(x) -> 0.5 * sin(2x)\n if (right instanceof Sin && left instanceof Cos) {\n Expression exp = new Mult(0.5, new Sin(new Mult(2, ((Sin) right).getExpression())));\n exp.turnBonusOn();\n return exp.simplify();\n }\n\n // cos(x) * sin(x) -> 0.5 * sin(2x)\n if (right instanceof Cos && left instanceof Sin) {\n Expression exp = new Sin(new Mult(2, ((Cos) right).getExpression()));\n exp.turnBonusOn();\n return exp.simplify();\n }\n\n // log(x, y) * 2 -> 2 * log(x, y)\n if (left instanceof Sin || left instanceof Cos || left instanceof Log) {\n Expression exp = new Mult(right, left);\n exp.turnBonusOn();\n return exp.simplify();\n }\n\n // x^2 * x^3 -> x^5\n if (left instanceof Pow && right instanceof Pow) {\n if (((Pow) left).getLeft().toString().equals(((Pow) right).getLeft().toString())) {\n Expression exp = new Pow(((Pow) left).getLeft(),\n new Plus(((Pow) left).getRight(), ((Pow) right).getRight()));\n exp.turnBonusOn();\n return exp.simplify();\n }\n }\n\n // x^2 * x -> x^3\n if (left instanceof Pow) {\n if (((Pow) left).getLeft().toString().equals(right.toString())) {\n Expression exp = new Pow(((Pow) left).getLeft(), new Plus(((Pow) left).getRight(), 1));\n exp.turnBonusOn();\n return exp.simplify();\n }\n }\n\n return this;\n }", "IVec3 mult(IVec3 v);", "private Term parseMul(final boolean required) throws ParseException {\n Term t1 = parseUnary(required);\n while (t1 != null) {\n int tt = _tokenizer.next();\n if (tt == '*') {\n Term t2 = parseUnary(true);\n if (t1.isD() && t2.isN() || t1.isN() && t2.isD()) {\n t1 = new Term.Mul(Term.TYPE_D, t1, t2);\n } else if (t1.isI() && t2.isI()) {\n t1 = new Term.Mul(Term.TYPE_I, t1, t2);\n } else if (!isTypeChecking()) {\n t1 = new Term.Mul(t1.isD() || t2.isD() ? Term.TYPE_D : Term.TYPE_I, t1, t2);\n } else {\n reportTypeErrorN2(\"'*'\");\n }\n } else if (tt == '/') {\n Term t2 = parseUnary(true);\n if (t1.isD() && t2.isN() || t1.isN() && t2.isD()) {\n t1 = new Term.Div(Term.TYPE_D, t1, t2);\n } else if (t1.isI() && t2.isI()) {\n t1 = new Term.Div(Term.TYPE_I, t1, t2);\n } else if (!isTypeChecking()) {\n t1 = new Term.Div(t1.isD() || t2.isD() ? Term.TYPE_D : Term.TYPE_I, t1, t2);\n } else {\n reportTypeErrorN2(\"'/'\");\n }\n } else if (tt == '%') {\n Term t2 = parseUnary(true);\n if (t1.isD() && t2.isN() || t1.isN() && t2.isD()) {\n t1 = new Term.Mod(Term.TYPE_D, t1, t2);\n } else if (t1.isI() && t2.isI()) {\n t1 = new Term.Mod(Term.TYPE_I, t1, t2);\n } else if (!isTypeChecking()) {\n t1 = new Term.Mod(t1.isD() || t2.isD() ? Term.TYPE_D : Term.TYPE_I, t1, t2);\n } else {\n reportTypeErrorN2(\"'%'\");\n }\n } else {\n _tokenizer.pushBack();\n break;\n }\n }\n return t1;\n }", "public void multiply()\r\n {\r\n resultDoubles = Operations.multiply(leftOperand, rightOperand);\r\n resultResetHelper();\r\n }", "public Mult(String left, String right) {\n super(left, right);\n }", "public Mult(double left, double right) {\n super(left, right);\n }", "public Multiplication(Expression l, Expression r) {\n\tleft = l;\n\tright = r;\n }", "public AncientEgyptianMultiplication( ) {\r\n }", "abstract int multiplication(int num1, int num2);", "public void testMultiply() {\r\n System.out.println(\"Multiply\");\r\n Double [][] n = new Double[][]{{-3., -2.5, -1., 0., 1., 2., 3.4, 3.5, 1.1E100, -1.1E100}, \r\n {-3., 2.5, 0., 0., 1., -2., 3., 3.7, 1.1E100, 1.1E100}, \r\n {9., -6.25, 0., 0., 1., -4., 10.2, 12.95, 1.21E200, -1.21E200}};\r\n for(int i = 0; i < 10; i++){\r\n Double x = n[0][i];\r\n Double y = n[1][i];\r\n double expResult = n[2][i];\r\n double result = MathOp.Multiply(x, y);\r\n assertEquals(expResult, result, 0.001);\r\n }\r\n }", "public final Expr addExpr() throws RecognitionException {\n\t\tExpr e = null;\n\n\n\t\tToken PLUS13=null;\n\t\tToken MINUS14=null;\n\t\tExpr e1 =null;\n\t\tExpr e2 =null;\n\n\n\t\t\t\tExpr it = null;\n\t\t\t\tBoolean bool = false;\n\t\t\t\tint line = -1;\n\t\t\t\tint offset = -1;\n\t\t\t\n\t\ttry {\n\t\t\t// ul.g:173:2: (e1= multExpr ( ( PLUS | MINUS ) e2= multExpr )* )\n\t\t\t// ul.g:174:3: e1= multExpr ( ( PLUS | MINUS ) e2= multExpr )*\n\t\t\t{\n\t\t\tpushFollow(FOLLOW_multExpr_in_addExpr710);\n\t\t\te1=multExpr();\n\t\t\tstate._fsp--;\n\t\t\tif (state.failed) return e;\n\t\t\tif ( state.backtracking==0 ) {it = e1;}\n\t\t\t// ul.g:175:3: ( ( PLUS | MINUS ) e2= multExpr )*\n\t\t\tloop14:\n\t\t\twhile (true) {\n\t\t\t\tint alt14=2;\n\t\t\t\tint LA14_0 = input.LA(1);\n\t\t\t\tif ( (LA14_0==MINUS||LA14_0==PLUS) ) {\n\t\t\t\t\talt14=1;\n\t\t\t\t}\n\n\t\t\t\tswitch (alt14) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// ul.g:175:4: ( PLUS | MINUS ) e2= multExpr\n\t\t\t\t\t{\n\t\t\t\t\t// ul.g:175:4: ( PLUS | MINUS )\n\t\t\t\t\tint alt13=2;\n\t\t\t\t\tint LA13_0 = input.LA(1);\n\t\t\t\t\tif ( (LA13_0==PLUS) ) {\n\t\t\t\t\t\talt13=1;\n\t\t\t\t\t}\n\t\t\t\t\telse if ( (LA13_0==MINUS) ) {\n\t\t\t\t\t\talt13=2;\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (state.backtracking>0) {state.failed=true; return e;}\n\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\tnew NoViableAltException(\"\", 13, 0, input);\n\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t}\n\n\t\t\t\t\tswitch (alt13) {\n\t\t\t\t\t\tcase 1 :\n\t\t\t\t\t\t\t// ul.g:175:5: PLUS\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tPLUS13=(Token)match(input,PLUS,FOLLOW_PLUS_in_addExpr718); if (state.failed) return e;\n\t\t\t\t\t\t\tif ( state.backtracking==0 ) {line = (PLUS13!=null?PLUS13.getLine():0); offset = PLUS13.getCharPositionInLine();}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2 :\n\t\t\t\t\t\t\t// ul.g:175:70: MINUS\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tMINUS14=(Token)match(input,MINUS,FOLLOW_MINUS_in_addExpr721); if (state.failed) return e;\n\t\t\t\t\t\t\tif ( state.backtracking==0 ) {line = (MINUS14!=null?MINUS14.getLine():0); offset = MINUS14.getCharPositionInLine();}\n\t\t\t\t\t\t\tif ( state.backtracking==0 ) {bool = true;}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tpushFollow(FOLLOW_multExpr_in_addExpr730);\n\t\t\t\t\te2=multExpr();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return e;\n\t\t\t\t\tif ( state.backtracking==0 ) {it = new AddExpr(it, e2, bool, line, offset);}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault :\n\t\t\t\t\tbreak loop14;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( state.backtracking==0 ) {\n\t\t\t\t\te = it;\n\t\t\t\t}\n\t\t}\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\trecover(input,re);\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn e;\n\t}", "@Override\n public Expression differentiate(String var) {\n Expression left = super.getLeft();\n Expression right = super.getRight();\n return new Plus(new Mult(left.differentiate(var), right), new Mult(left, right.differentiate(var)));\n }", "public static void main(String[] args) {\n NumberFact a, b;\n a = new NumberFact(1_000);\n b = new NumberFact(999);\n\n ArithmeticOperator x, y;\n x = new ArithmeticOperator('*', a, b);\n y = new ArithmeticOperator('+', x, b);\n\n System.out.println(y);\n System.out.println(y.eval());\n }", "private void createMul(Code32 code, int op, int cond, int Rd, int Rn, int Rm) {\r\n\t\tcode.instructions[code.iCount] = (cond << 28) | op | (Rd << 16) | (Rm << 8) | (0x9 << 4) | Rn;\r\n\t\tcode.incInstructionNum();\r\n\t}", "public static BinaryExpression multiplyAssign(Expression expression0, Expression expression1) {\n return makeBinary(ExpressionType.MultiplyAssign, expression0, expression1);\n }", "LengthScalarMultiply createLengthScalarMultiply();", "public final CQLParser.multiplicativeExpression_return multiplicativeExpression() throws RecognitionException {\n CQLParser.multiplicativeExpression_return retval = new CQLParser.multiplicativeExpression_return();\n retval.start = input.LT(1);\n\n Object root_0 = null;\n\n Token set100=null;\n CQLParser.powerExpression_return powerExpression99 = null;\n\n CQLParser.powerExpression_return powerExpression101 = null;\n\n\n Object set100_tree=null;\n\n try {\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:404:2: ( powerExpression ( ( MULT | DIV ) powerExpression )* )\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:404:4: powerExpression ( ( MULT | DIV ) powerExpression )*\n {\n root_0 = (Object)adaptor.nil();\n\n pushFollow(FOLLOW_powerExpression_in_multiplicativeExpression1886);\n powerExpression99=powerExpression();\n\n state._fsp--;\n\n adaptor.addChild(root_0, powerExpression99.getTree());\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:404:20: ( ( MULT | DIV ) powerExpression )*\n loop27:\n do {\n int alt27=2;\n int LA27_0 = input.LA(1);\n\n if ( ((LA27_0>=MULT && LA27_0<=DIV)) ) {\n alt27=1;\n }\n\n\n switch (alt27) {\n \tcase 1 :\n \t // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:404:21: ( MULT | DIV ) powerExpression\n \t {\n \t set100=(Token)input.LT(1);\n \t set100=(Token)input.LT(1);\n \t if ( (input.LA(1)>=MULT && input.LA(1)<=DIV) ) {\n \t input.consume();\n \t root_0 = (Object)adaptor.becomeRoot((Object)adaptor.create(set100), root_0);\n \t state.errorRecovery=false;\n \t }\n \t else {\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t throw mse;\n \t }\n\n \t pushFollow(FOLLOW_powerExpression_in_multiplicativeExpression1896);\n \t powerExpression101=powerExpression();\n\n \t state._fsp--;\n\n \t adaptor.addChild(root_0, powerExpression101.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop27;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (Object)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n \t\n \tcatch(RecognitionException re)\n \t{\t\n \t\treportError(re);\n \t\tthrow re;\n \t}\n finally {\n }\n return retval;\n }", "Sum getMultiplier();", "public MathEval() {\r\n super();\r\n\r\n constants=new TreeMap<String,Double>(String.CASE_INSENSITIVE_ORDER);\r\n setConstant(\"E\" ,Math.E);\r\n setConstant(\"Euler\" ,0.577215664901533D);\r\n setConstant(\"LN2\" ,0.693147180559945D);\r\n setConstant(\"LN10\" ,2.302585092994046D);\r\n setConstant(\"LOG2E\" ,1.442695040888963D);\r\n setConstant(\"LOG10E\",0.434294481903252D);\r\n setConstant(\"PHI\" ,1.618033988749895D);\r\n setConstant(\"PI\" ,Math.PI);\r\n\r\n variables=new TreeMap<String,Double>(String.CASE_INSENSITIVE_ORDER);\r\n\r\n functions=new TreeMap<String,FunctionHandler>(String.CASE_INSENSITIVE_ORDER);\r\n\r\n offset=0;\r\n isConstant=false;\r\n }", "private ASTNode binaryMultiplyRules(ASTNode left, ASTNode right) throws Exception {\n Token leftToken = left.getToken();\n Token rightToken = right.getToken();\n\n TokenType leftType = leftToken.getType();\n TokenType rightType = rightToken.getType();\n\n Token tempToken;\n TokenType numType = TokenType.NUMBER;\n TokenType minusType = TokenType.MINUS;\n TokenType mulType = TokenType.MUL;\n\n if (rightToken.getIdentifier().equals(\"0\")){\n //left is anything and right is 0\n tempToken = new Token(numType, \"0\");\n return new Num(tempToken);\n }\n else if (rightToken.getIdentifier().equals(\"1\")){\n //left is anything and right is 1\n return left;\n }\n else if (leftToken.getIdentifier().equals(\"0\")){\n //left is 0 and right is anything\n tempToken = new Token(numType, \"0\");\n return new Num(tempToken);\n }\n else if (leftToken.getIdentifier().equals(\"1\")){\n //left is 1 and right is anything\n return right;\n }\n else if(patternMatcher(leftType, rightType, numType, numType)){\n Double leftVal = Double.parseDouble(leftToken.getIdentifier());\n Double rightVal = Double.parseDouble(rightToken.getIdentifier());\n\n String prod = String.valueOf(leftVal * rightVal);\n tempToken = new Token(numType, prod);\n return new Num(tempToken);\n }\n else if (patternMatcher(leftType, rightType, minusType, minusType)){\n if (left instanceof UnaryOP && right instanceof UnaryOP){\n tempToken = new Token(mulType);\n ASTNode leftOP = ((UnaryOP) left).getOperand();\n ASTNode rightOp = ((UnaryOP) right).getOperand();\n return new BinaryOp(tempToken, leftOP, rightOp);\n }\n }\n tempToken = new Token(mulType);\n return new BinaryOp(tempToken ,left, right);\n }", "public static Rational multiply(Rational num1, Rational num2){\r\n Rational product = new Rational();\r\n \r\n // multiply throughout\r\n product.denominator = num1.getDenominator() * num2.getDenominator();\r\n product.numerator = num1.getNumerator() * num2.getNumerator();\r\n \r\n product.reduce();\r\n return product;\r\n }", "Matrix scalarMult(double x){\n int newMatrixSize = this.getSize();\n Matrix newM = new Matrix(newMatrixSize);\n for(int i = 1; i <= newMatrixSize; i++){\n List itRow = rows[i - 1];\n itRow.moveFront();\n while(itRow.index() != -1){\n Entry c = (Entry)itRow.get();\n newM.changeEntry(i, c.column, (x*c.value));\n itRow.moveNext();\n }\n }\n\n return newM;\n }", "@Override\n\tpublic Instruction parse(String[] s) throws WrongInstructionFormatException {\n\t\tif (s.length==1 && s[0].equalsIgnoreCase(\"mult\")) \n\t\t\treturn new Mult();\n\t\telse throw new WrongInstructionFormatException();\n\t}", "public final Expr mulExpr() throws RecognitionException {\r\n Expr result = null;\r\n\r\n int mulExpr_StartIndex = input.index();\r\n\r\n Token op=null;\r\n Expr lhs =null;\r\n\r\n Expr rhs =null;\r\n\r\n\r\n try {\r\n if ( state.backtracking>0 && alreadyParsedRule(input, 14) ) { return result; }\r\n\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:108:5: (lhs= unExpr (op= ( '*' | '/' ) rhs= unExpr )* )\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:108:9: lhs= unExpr (op= ( '*' | '/' ) rhs= unExpr )*\r\n {\r\n pushFollow(FOLLOW_unExpr_in_mulExpr613);\r\n lhs=unExpr();\r\n\r\n state._fsp--;\r\n if (state.failed) return result;\r\n\r\n if ( state.backtracking==0 ) { result =lhs; }\r\n\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:108:45: (op= ( '*' | '/' ) rhs= unExpr )*\r\n loop9:\r\n do {\r\n int alt9=2;\r\n int LA9_0 = input.LA(1);\r\n\r\n if ( (LA9_0==23||LA9_0==26) ) {\r\n alt9=1;\r\n }\r\n\r\n\r\n switch (alt9) {\r\n \tcase 1 :\r\n \t // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:108:47: op= ( '*' | '/' ) rhs= unExpr\r\n \t {\r\n \t op=(Token)input.LT(1);\r\n\r\n \t if ( input.LA(1)==23||input.LA(1)==26 ) {\r\n \t input.consume();\r\n \t state.errorRecovery=false;\r\n \t state.failed=false;\r\n \t }\r\n \t else {\r\n \t if (state.backtracking>0) {state.failed=true; return result;}\r\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\r\n \t throw mse;\r\n \t }\r\n\r\n\r\n \t pushFollow(FOLLOW_unExpr_in_mulExpr633);\r\n \t rhs=unExpr();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return result;\r\n\r\n \t if ( state.backtracking==0 ) { \r\n \t if ((op!=null?op.getText():null).equals(\"*\")) {\r\n \t result = new Mul(result, rhs);\r\n \t }\r\n \t if ((op!=null?op.getText():null).equals(\"/\")) {\r\n \t result = new Div(result, rhs); \r\n \t }\r\n \t }\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop9;\r\n }\r\n } while (true);\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n if ( state.backtracking>0 ) { memoize(input, 14, mulExpr_StartIndex); }\r\n\r\n }\r\n return result;\r\n }", "@Override\n public InterpreterValue mul(InterpreterValue v) {\n\n // If the given value is a IntegerValue create a new DoubleValue from\n // the multiplication-result\n if(v instanceof IntegerValue) return new DoubleValue(getValue() * ((IntegerValue) v).getValue());\n\n // If the given value is a DoubleValue create a new DoubleValue from\n // the multiplication-result\n if(v instanceof DoubleValue) return new DoubleValue(getValue() * ((DoubleValue) v).getValue());\n\n // In other case just throw an error\n throw new Error(\"Operator '*' is not defined for type double and \" + v.getName());\n\n }", "public static EquationExpression timesRaw(EquationExpression... args) {\n\t\tswitch (args.length) {\n\t\tcase 0:\n\t\t\treturn EquationNumericValue.from(1);\n\t\tcase 1:\n\t\t\treturn args[0];\n\t\tcase 2:\n\t\t\treturn new EquationProductOperator(args[0], args[1]);\n\t\tdefault:\n\t\t\tEquationExpression[] args2 = new EquationExpression[args.length\n\t\t\t\t\t- 1];\n\t\t\tSystem.arraycopy(args, 1, args2, 0, args.length - 1);\n\t\t\treturn new EquationProductOperator(args[0], sumRaw(args2));\n\t\t}\n\t}", "public final void entryRuleMultExp() throws RecognitionException {\n try {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1377:1: ( ruleMultExp EOF )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1378:1: ruleMultExp EOF\n {\n before(grammarAccess.getMultExpRule()); \n pushFollow(FOLLOW_ruleMultExp_in_entryRuleMultExp2881);\n ruleMultExp();\n\n state._fsp--;\n\n after(grammarAccess.getMultExpRule()); \n match(input,EOF,FOLLOW_EOF_in_entryRuleMultExp2888); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }", "public static EquationExpression timesRaw(EquationExpression... args) {\n switch(args.length) {\n case 0:\n return EquationNumericValue.from(1);\n case 1:\n return args[0];\n case 2:\n return new EquationProductOperator(args[0], args[1]);\n default:\n EquationExpression[] args2 = new EquationExpression[args.length-1];\n System.arraycopy(args, 1, args2, 0, args.length-1);\n return new EquationProductOperator(args[0], sumRaw(args2));\n }\n }", "public final Expr addExpr() throws RecognitionException {\n Expr result = null;\n\n int addExpr_StartIndex = input.index();\n\n Token op=null;\n Expr lhs =null;\n\n Expr rhs =null;\n\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 11) ) { return result; }\n\n // /home/jahn/workspace1/QLAndroid/src/org/uva/sea/ql/parser/antlr/QL.g:124:5: (lhs= mulExpr (op= ( '+' | '-' ) rhs= mulExpr )* )\n // /home/jahn/workspace1/QLAndroid/src/org/uva/sea/ql/parser/antlr/QL.g:124:9: lhs= mulExpr (op= ( '+' | '-' ) rhs= mulExpr )*\n {\n pushFollow(FOLLOW_mulExpr_in_addExpr547);\n lhs=mulExpr();\n\n state._fsp--;\n if (state.failed) return result;\n\n if ( state.backtracking==0 ) { result =lhs; }\n\n // /home/jahn/workspace1/QLAndroid/src/org/uva/sea/ql/parser/antlr/QL.g:124:46: (op= ( '+' | '-' ) rhs= mulExpr )*\n loop8:\n do {\n int alt8=2;\n int LA8_0 = input.LA(1);\n\n if ( ((LA8_0 >= 21 && LA8_0 <= 22)) ) {\n alt8=1;\n }\n\n\n switch (alt8) {\n \tcase 1 :\n \t // /home/jahn/workspace1/QLAndroid/src/org/uva/sea/ql/parser/antlr/QL.g:124:48: op= ( '+' | '-' ) rhs= mulExpr\n \t {\n \t op=(Token)input.LT(1);\n\n \t if ( (input.LA(1) >= 21 && input.LA(1) <= 22) ) {\n \t input.consume();\n \t state.errorRecovery=false;\n \t state.failed=false;\n \t }\n \t else {\n \t if (state.backtracking>0) {state.failed=true; return result;}\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t throw mse;\n \t }\n\n\n \t pushFollow(FOLLOW_mulExpr_in_addExpr565);\n \t rhs=mulExpr();\n\n \t state._fsp--;\n \t if (state.failed) return result;\n\n \t if ( state.backtracking==0 ) { \n \t if ((op!=null?op.getText():null).equals(\"+\")) {\n \t result = new Add(result, rhs);\n \t }\n \t if ((op!=null?op.getText():null).equals(\"-\")) {\n \t result = new Sub(result, rhs); \n \t }\n \t }\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop8;\n }\n } while (true);\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n\n finally {\n \t// do for sure before leaving\n if ( state.backtracking>0 ) { memoize(input, 11, addExpr_StartIndex); }\n\n }\n return result;\n }", "public final void mult (Unit unit) throws ArithmeticException {\n\t\tlong u = mksa ; double r = factor; double v = value; double o = offset;\n\t\t/* dump(\"mult:this \"); unit.dump(\"mult:unit\"); */\n\t\tif (((mksa&_abs)!=0) && (unit.factor != 1)) throw\t// On a date\n\t\tnew ArithmeticException(\"****Unit.mult on a date!\");\n\t\tif (((mksa|unit.mksa)&_log) != 0) {\n\t\t\tif ((mksa == underScore) && (factor == 1.)) ;\n\t\t\telse if ((unit.mksa == underScore) && (unit.factor == 1.)) ;\n\t\t\telse throw new ArithmeticException\n\t\t\t(\"****Unit: can't multiply logs: \" + symbol + \" x \" + unit.symbol);\n\t\t}\n\t\t/* As soon as there is an operation, the offset is ignored \n\t\t * except if one of the factors is unity.\n\t\t */\n\t\tif ((offset!=0) || (unit.offset!=0)) {\n\t\t\tif (mksa == underScore) offset = unit.offset;\n\t\t\telse if (unit.mksa == underScore) ;\n\t\t\telse offset = 0;\n\t\t}\n\t\tv *= unit.value; \n\t\tr *= unit.factor;\n\t\tu += unit.mksa; u -= underScore;\n\t\tif ((u&0x0c80808080808080L) != 0) throw new ArithmeticException\n\t\t(\"****too large powers in: \" + symbol + \" x \" + unit.symbol);\n\t\tmksa = u;\n\t\tfactor = r;\n\t\tvalue = v;\n\t\t/* Decision for the new symbol */\n\t\tif ((symbol != null) && (unit.symbol != null)) {\n\t\t\tif ((unit.mksa == underScore) && (unit.factor == 1)) return;\t// No unit ...\n\t\t\tif (( mksa == underScore) && ( factor == 1)) symbol = unit.symbol;\n\t\t\telse if ((symbol.equals(unit.symbol)) && (factor == unit.factor))\n\t\t\t\tsymbol = toExpr(symbol) + \"2\" ;\n\t\t\telse symbol = toExpr(symbol) + \".\" + toExpr(unit.symbol) ;\n\t\t}\n\t}", "Point mult (double s, Point result);", "@Override\r\n\tpublic void mul(int x, int y) {\n\t\t\r\n\t}", "@Override\r\n\tpublic int multi(int x, int y) {\n\t\treturn x * y;\r\n\t}", "CalcEvaluator(boolean mult) {\r\n this.mult = mult;\r\n }", "@Override\r\n\tpublic int mul() {\n\t\treturn 0;\r\n\t}", "public double multiplica(double a, double b) {\n\t\treturn a*b;\n\t}", "public final void mMUL() throws RecognitionException\n\t{\n\t\ttry\n\t\t{\n\t\t\tfinal int _type = AshvmLexer.MUL;\n\t\t\tfinal int _channel = BaseRecognizer.DEFAULT_TOKEN_CHANNEL;\n\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:708:5: ( 'mul' )\n\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:708:7: 'mul'\n\t\t\t{\n\t\t\t\tthis.match(\"mul\");\n\n\t\t\t}\n\n\t\t\tthis.state.type = _type;\n\t\t\tthis.state.channel = _channel;\n\t\t}\n\t\tfinally\n\t\t{\n\t\t}\n\t}", "public R3Mult(int rdIndex, int rsIndex, int id) {\n\n }", "@Override\n\tpublic int mult(int val1, int val2) {\n\t\treturn val1 * val2;\n\t}", "public final void rule__AddExp__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:8253:1: ( ( ruleMultExp ) )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:8254:1: ( ruleMultExp )\n {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:8254:1: ( ruleMultExp )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:8255:1: ruleMultExp\n {\n before(grammarAccess.getAddExpAccess().getMultExpParserRuleCall_0()); \n pushFollow(FOLLOW_ruleMultExp_in_rule__AddExp__Group__0__Impl16577);\n ruleMultExp();\n\n state._fsp--;\n\n after(grammarAccess.getAddExpAccess().getMultExpParserRuleCall_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "<C, PM> VariableExp<C, PM> createVariableExp();", "private Complex eval(Complex[] ca, Complex x) {\n\t\tComplex result = ca[0];\n\t\tfor (int i = 1; i < ca.length; i++) {\n\t\t\tresult = result.mul(x).add(ca[i]);\n\t\t}\n\t\treturn result;\n\t}", "public final double multExpr() throws RecognitionException {\n double value = 0.0;\n\n\n double e =0.0;\n\n\n try {\n // ExprInterp.g:32:5: (e= atom ( '*' e= atom )* )\n // ExprInterp.g:32:9: e= atom ( '*' e= atom )*\n {\n pushFollow(FOLLOW_atom_in_multExpr248);\n e=atom();\n\n state._fsp--;\n\n\n value = e;\n\n // ExprInterp.g:32:37: ( '*' e= atom )*\n loop5:\n do {\n int alt5=2;\n int LA5_0 = input.LA(1);\n\n if ( (LA5_0==12) ) {\n alt5=1;\n }\n\n\n switch (alt5) {\n \tcase 1 :\n \t // ExprInterp.g:32:38: '*' e= atom\n \t {\n \t match(input,12,FOLLOW_12_in_multExpr253); \n\n \t pushFollow(FOLLOW_atom_in_multExpr257);\n \t e=atom();\n\n \t state._fsp--;\n\n\n \t value *= e;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop5;\n }\n } while (true);\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n\n finally {\n \t// do for sure before leaving\n }\n return value;\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 }", "private String compute(String equ,String op)\n {\n String equation = equ;\n Pattern mdPattern = Pattern.compile(\"(\\\\d+([.]\\\\d+)*)(([\"+op+\"]))(\\\\d+([.]\\\\d+)*)\");\n Matcher matcher\t\t= mdPattern.matcher(equation);\n while(matcher.find())\n {\n String[] arr = null;\n double ans = 0;\n String eq = matcher.group(0);//get form x*y\n if(eq.contains(op))\n {\n arr = eq.split(\"\\\\\"+op);//make arr\n if(op.equals(\"*\"))\n ans = Double.valueOf(arr[0])*Double.valueOf(arr[1]);//compute\n if(op.equals(\"/\"))\n ans = Double.valueOf(arr[0])/Double.valueOf(arr[1]);//compute\n if(op.equals(\"+\"))\n ans = Double.valueOf(arr[0])+Double.valueOf(arr[1]);//compute\n if(op.equals(\"-\"))\n ans = Double.valueOf(arr[0])-Double.valueOf(arr[1]);//compute\n }\n\n equation = matcher.replaceFirst(String.valueOf(ans));//replace in equation\n matcher = mdPattern.matcher(equation);//look for more matches\n }\n return equation;\n }", "private static native double mul(int n);", "public void multiply(Object mulValue) {\r\n\r\n\t\tNumberOperation operator = new NumberOperation(this.value, mulValue) {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic Number doAnOperation() {\r\n\t\t\t\tTypeEnum typeOfResult = getFinalType();\r\n\t\t\t\tif(typeOfResult == TypeEnum.TYPE_INTEGER) {\r\n\t\t\t\t\treturn getO1().intValue() * getO2().intValue();\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\treturn getO1().doubleValue() * getO2().doubleValue();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t\tthis.value = operator.doAnOperation();\r\n\t}", "public static void main(String args[]) {\n\tExpr e3 = new Minus(new Num(100),new Num(99));\n\tSystem.out.println(\"e3 is \" + e3.exprToString());\n\t// outputs \"e4 is (4*5-(100-99))\"\n\tExpr e4 = new Minus(new Times(new Num(4),new Num(5)),e3);\n\tSystem.out.println(\"e4 is \" + e4.exprToString());\n }", "public void mul(String a, String b, int i, String reg) {\r\n registerName.add(reg);\r\n int posa = registerRegister.indexOf(a);\r\n int posb = registerRegister.indexOf(b);\r\n int element = Integer.parseInt(registerValues.get(posa));\r\n int element1 = Integer.parseInt(registerValues.get(posb));\r\n int mul = element * element1;\r\n registerValues.add(Integer.toString(mul));\r\n }", "public void multiply(double multiplier) {\n x *= multiplier;\n y *= multiplier;\n }", "public final void synpred27_expression_fragment() throws RecognitionException { \n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:11: ( ( '+' | '-' ) mult )\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:11: ( '+' | '-' ) mult\n {\n if ( (input.LA(1)>=46 && input.LA(1)<=47) ) {\n input.consume();\n state.errorRecovery=false;state.failed=false;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n MismatchedSetException mse = new MismatchedSetException(null,input);\n throw mse;\n }\n\n pushFollow(FOLLOW_mult_in_synpred27_expression437);\n mult();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n }", "Rational multiply(Rational p){\n Rational firstarg=new Rational();\n firstarg.numerator=numerator;\n firstarg.denominator=denominator;\n\n firstarg.numerator=p.numerator*firstarg.numerator;\n firstarg.denominator=p.denominator*firstarg.denominator;\n return firstarg;\n }" ]
[ "0.7181152", "0.68491536", "0.67898893", "0.67898893", "0.67149585", "0.6623054", "0.652561", "0.6453798", "0.64244205", "0.6233412", "0.6114878", "0.61100984", "0.60608727", "0.6032277", "0.6031518", "0.6002539", "0.5990347", "0.59711415", "0.5951944", "0.59271264", "0.5920275", "0.59158635", "0.5885907", "0.58620405", "0.58206624", "0.57921934", "0.5785963", "0.57347864", "0.5727767", "0.5700363", "0.56825036", "0.5663695", "0.5655955", "0.56242114", "0.5620611", "0.5609072", "0.5607046", "0.5606481", "0.5606336", "0.5577917", "0.55633867", "0.5550771", "0.5550763", "0.553459", "0.5533022", "0.55234444", "0.55103403", "0.5508319", "0.5507825", "0.5496564", "0.54955685", "0.5473765", "0.54655725", "0.5462785", "0.5457463", "0.545408", "0.5448749", "0.5442949", "0.5434475", "0.5434318", "0.5426579", "0.54076874", "0.5386324", "0.5378135", "0.5370538", "0.5366461", "0.53664094", "0.53385276", "0.5331747", "0.5317382", "0.5311504", "0.53061557", "0.53054595", "0.5295753", "0.529064", "0.5280395", "0.5274558", "0.52712065", "0.5261208", "0.52601016", "0.5256051", "0.52550113", "0.5244864", "0.52418745", "0.5241819", "0.5238788", "0.5232773", "0.52323204", "0.52314246", "0.52282906", "0.52271503", "0.52090436", "0.52053475", "0.52039117", "0.519788", "0.5196789", "0.5194174", "0.51914495", "0.51805", "0.51750404" ]
0.64144564
9
Constructs a mult by given expressions.
public Mult(double left, Expression right) { super(left, right); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Expression multExpression() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tExpression e0 = powerExpression();\r\n\t\twhile(isKind(OP_TIMES, OP_DIV, OP_MOD)) {\r\n\t\t\tToken op = consume();\r\n\t\t\tExpression e1 = powerExpression();\r\n\t\t\te0 = new ExpressionBinary(first,e0,op,e1);\r\n\t\t}\r\n\t\treturn e0;\r\n\t}", "private Expr mult(Expr x) throws Err {\n if (x instanceof ExprUnary) {\n ExprUnary y=(ExprUnary)x;\n if (y.op==ExprUnary.Op.SOME) return ExprUnary.Op.SOMEOF.make(y.pos, y.sub);\n if (y.op==ExprUnary.Op.LONE) return ExprUnary.Op.LONEOF.make(y.pos, y.sub);\n if (y.op==ExprUnary.Op.ONE) return ExprUnary.Op.ONEOF.make(y.pos, y.sub);\n }\n return x;\n }", "public Mult(Expression left, Expression right) {\n super(left, right);\n }", "public Mult(Expression left, Expression right) {\n super(left, right);\n }", "Multiply createMultiply();", "public final VecMathParser.expr_return expr() throws RecognitionException {\n VecMathParser.expr_return retval = new VecMathParser.expr_return();\n retval.start = input.LT(1);\n\n Object root_0 = null;\n\n Token char_literal8=null;\n VecMathParser.multExpr_return multExpr7 = null;\n\n VecMathParser.multExpr_return multExpr9 = null;\n\n\n Object char_literal8_tree=null;\n\n try {\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:15:5: ( multExpr ( '+' multExpr )* )\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:15:7: multExpr ( '+' multExpr )*\n {\n root_0 = (Object)adaptor.nil();\n\n pushFollow(FOLLOW_multExpr_in_expr117);\n multExpr7=multExpr();\n\n state._fsp--;\n\n adaptor.addChild(root_0, multExpr7.getTree());\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:15:16: ( '+' multExpr )*\n loop3:\n do {\n int alt3=2;\n int LA3_0 = input.LA(1);\n\n if ( (LA3_0==10) ) {\n alt3=1;\n }\n\n\n switch (alt3) {\n \tcase 1 :\n \t // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:15:17: '+' multExpr\n \t {\n \t char_literal8=(Token)match(input,10,FOLLOW_10_in_expr120); \n \t char_literal8_tree = (Object)adaptor.create(char_literal8);\n \t root_0 = (Object)adaptor.becomeRoot(char_literal8_tree, root_0);\n\n \t pushFollow(FOLLOW_multExpr_in_expr123);\n \t multExpr9=multExpr();\n\n \t state._fsp--;\n\n \t adaptor.addChild(root_0, multExpr9.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop3;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (Object)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "public Mult(String left, Expression right) {\n super(left, right);\n }", "public Mult(Expression left, double right) {\n super(left, right);\n }", "public Mult(Expression left, String right) {\n super(left, right);\n }", "void visit(MultiplicationExpression expression);", "public BinMltLinExpr multiply(BinLinExpr expr) {\n\t\t\n\t\tBinMltLinExpr result = new BinMltLinExpr();\n\t\t\n\t\t// Multiply variables together\n\t\tfor (int i = 0; i < expr.vars.size(); i++) {\n\t\t\tfor (int j = 0; j < termVars.size(); j++) {\n\t\t\t\t\n\t\t\t\tdouble newCoeff = expr.coefficients.get(i) * coefficients.get(j);\n\t\t\t\tList<BinVar> newVars = new ArrayList<BinVar>();\n\t\t\t\tnewVars.add(expr.vars.get(i));\n\t\t\t\tnewVars.addAll(termVars.get(j));\n\t\t\t\t\n\t\t\t\tresult.addTerm(newCoeff, newVars);\n\t\t\t}\n\t\t}\n\n\t\t// Multiply variables with constants\n\t\tfor (int i = 0; i < termVars.size(); i++) {\n\t\t\tdouble newCoeff = coefficients.get(i) * expr.constant;\n\t\t\tresult.addTerm(newCoeff, termVars.get(i));\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < expr.vars.size(); i++) {\n\t\t\tdouble newCoeff = expr.coefficients.get(i) * constant;\n\t\t\tresult.addTerm(newCoeff, expr.vars.get(i));\n\t\t}\n\t\t\n\t\tresult.addConstant(constant*expr.constant);\n\t\t\n\t\treturn result;\n\t}", "public void enfoncerMult() {\n\t\ttry {\n\t\t\tthis.op = new Mult();\n\t\t\tif (!raz) {\n\t\t\t\tthis.pile.push(valC);\n\t\t\t}\n\t\t\tint a = this.pile.pop(); int b = this.pile.pop();\n\t\t\tthis.valC = this.op.eval(b,a);\n\t\t\tthis.pile.push(this.valC);\n\t\t\tthis.raz = true;\n\t\t}\n\t\tcatch (EmptyStackException e) {\n\t\t\tSystem.out.println(\"Erreur de syntaxe : Saisir deux operandes avant de saisir un operateur\");\n\t\t}\n\t}", "public Transformation mult(Transformation a) {\n\t\tTransformation result = new Transformation();\n\t\tsuper.mult(a, result);\n\t\treturn result;\n\t}", "private void mul() {\n\n\t}", "@Override\n public Expression assign(String var, Expression expression) {\n Expression left = super.getLeft();\n Expression right = super.getRight();\n return new Mult(left.assign(var, expression), right.assign(var, expression));\n }", "public void multiply() {\n\t\t\n\t}", "public static double multi() {\n System.out.println(\"Enter multiplier\");\n double a = getNumber();\n System.out.println(\"Enter multiplicand\");\n double b = getNumber();\n\n return a * b;\n }", "@SuppressWarnings(\"unchecked\")\n @Override\n public Expression asExpression(Rule rule, Deque<Value<Expression>> args) {\n if (args.size() == 1) {\n // a single term is not a product\n return args.pollFirst().getTarget();\n } else {\n // assume x to be *x, because the product will start by 1*x\n Term<Multiplicative> factor = new Term<>(Multiplicative.MULT, args.removeFirst().getTarget());\n List<Term<Multiplicative>> arguments = new LinkedList<>();\n arguments.add(factor);\n args.stream()\n // next arguments are all Term<Multiplicative>\n .map(v -> (Term<Multiplicative>) v.getTarget())\n .forEachOrdered(arguments::add);\n return new Product(arguments);\n }\n }", "public static void main(String[] args) throws Exception {\r\n Expression e = new Plus(new Mult(2, \"x\"), new Plus(new Sin(new Mult(4, \"y\")), new Pow(\"e\", \"x\")));\r\n System.out.println(e);\r\n Map<String, Double> assignment = new TreeMap<String, Double>();\r\n assignment.put(\"x\", 2.0);\r\n assignment.put(\"y\", 0.25);\r\n assignment.put(\"e\", 2.71);\r\n System.out.println(e.evaluate(assignment));\r\n e = e.differentiate(\"x\");\r\n System.out.println(e);\r\n System.out.println(e.evaluate(assignment));\r\n System.out.println(e.simplify());\r\n System.out.println(e);\r\n }", "public BinMltLinExpr multiply(BinMltLinExpr expr) {\n\t\t\n\t\tBinMltLinExpr result = new BinMltLinExpr();\n\t\t\n\t\t// Multiply variables together\n\t\tfor (int i = 0; i < expr.termVars.size(); i++) {\n\t\t\tfor (int j = 0; j < termVars.size(); j++) {\n\t\t\t\t\n\t\t\t\tdouble newCoeff = expr.coefficients.get(i) * coefficients.get(j);\n\t\t\t\tList<BinVar> newVars = new ArrayList<BinVar>();\n\t\t\t\tnewVars.addAll(expr.termVars.get(i));\n\t\t\t\tnewVars.addAll(termVars.get(j));\n\t\t\t\t\n\t\t\t\tresult.addTerm(newCoeff, newVars);\n\t\t\t}\n\t\t}\n\n\t\t// Multiply variables with constants\n\t\tfor (int i = 0; i < termVars.size(); i++) {\n\t\t\tdouble newCoeff = coefficients.get(i) * expr.constant;\n\t\t\tresult.addTerm(newCoeff, termVars.get(i));\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < expr.termVars.size(); i++) {\n\t\t\tdouble newCoeff = expr.coefficients.get(i) * constant;\n\t\t\tresult.addTerm(newCoeff, expr.termVars.get(i));\n\t\t}\n\t\t\n\t\tresult.addConstant(constant*expr.constant);\n\t\t\n\t\treturn result;\n\t}", "public final VecMathParser.multExpr_return multExpr() throws RecognitionException {\n VecMathParser.multExpr_return retval = new VecMathParser.multExpr_return();\n retval.start = input.LT(1);\n\n Object root_0 = null;\n\n Token char_literal11=null;\n Token char_literal12=null;\n VecMathParser.primary_return primary10 = null;\n\n VecMathParser.primary_return primary13 = null;\n\n\n Object char_literal11_tree=null;\n Object char_literal12_tree=null;\n\n try {\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:5: ( primary ( ( '*' | '.' ) primary )* )\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:9: primary ( ( '*' | '.' ) primary )*\n {\n root_0 = (Object)adaptor.nil();\n\n pushFollow(FOLLOW_primary_in_multExpr145);\n primary10=primary();\n\n state._fsp--;\n\n adaptor.addChild(root_0, primary10.getTree());\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:17: ( ( '*' | '.' ) primary )*\n loop5:\n do {\n int alt5=2;\n int LA5_0 = input.LA(1);\n\n if ( ((LA5_0>=11 && LA5_0<=12)) ) {\n alt5=1;\n }\n\n\n switch (alt5) {\n \tcase 1 :\n \t // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:18: ( '*' | '.' ) primary\n \t {\n \t // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:18: ( '*' | '.' )\n \t int alt4=2;\n \t int LA4_0 = input.LA(1);\n\n \t if ( (LA4_0==11) ) {\n \t alt4=1;\n \t }\n \t else if ( (LA4_0==12) ) {\n \t alt4=2;\n \t }\n \t else {\n \t NoViableAltException nvae =\n \t new NoViableAltException(\"\", 4, 0, input);\n\n \t throw nvae;\n \t }\n \t switch (alt4) {\n \t case 1 :\n \t // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:19: '*'\n \t {\n \t char_literal11=(Token)match(input,11,FOLLOW_11_in_multExpr149); \n \t char_literal11_tree = (Object)adaptor.create(char_literal11);\n \t root_0 = (Object)adaptor.becomeRoot(char_literal11_tree, root_0);\n\n\n \t }\n \t break;\n \t case 2 :\n \t // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:24: '.'\n \t {\n \t char_literal12=(Token)match(input,12,FOLLOW_12_in_multExpr152); \n \t char_literal12_tree = (Object)adaptor.create(char_literal12);\n \t root_0 = (Object)adaptor.becomeRoot(char_literal12_tree, root_0);\n\n\n \t }\n \t break;\n\n \t }\n\n \t pushFollow(FOLLOW_primary_in_multExpr156);\n \t primary13=primary();\n\n \t state._fsp--;\n\n \t adaptor.addChild(root_0, primary13.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop5;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (Object)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "@Override\n\tpublic void visit(MultiplyNode node) {\n\t\tif (Evaluator.checkScope(node) == false) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (Evaluator.checkAssert(node) == false) {\n\t\t\treturn;\n\t\t}\n\n\t\t/**\n\t\t * evaluam cei doi fii\n\t\t */\n\t\tEvaluator.evaluate(node.getChild(0));\n\t\tEvaluator.evaluate(node.getChild(1));\n\n\t\tInteger i, j;\n\t\t/**\n\t\t * salvam si inmultim valorile rezulate in urma evaluarii celor 2 fii si\n\t\t * setam valoarea corespunzatoare in nodul curent\n\t\t */\n\t\tif (node.getChild(1) instanceof Variable) {\n\t\t\ti = Integer.parseInt(Evaluator.variables.get(node.getChild(1).getName()));\n\n\t\t} else {\n\t\t\ti = Integer.parseInt(node.getChild(1).getName());\n\t\t}\n\n\t\tif (node.getChild(0) instanceof Variable) {\n\t\t\tj = Integer.parseInt(Evaluator.variables.get(node.getChild(0).getName()));\n\n\t\t} else {\n\t\t\tj = Integer.parseInt(node.getChild(0).getName());\n\t\t}\n\n\t\tInteger n = i * j;\n\n\t\tnode.setName(n.toString());\n\t}", "static Double executeMultiplication(List<Double> operands) {\n Double result = null;\n for (Double operand : operands) {\n if (Objects.isNull(result)) {\n result = operand;\n }\n else {\n result = result * operand;\n }\n }\n return result;\n }", "public Polynomial visit(ProductExpression expression) {\n return Polynomial.multiply(\n expression.getLeft().accept(this),\n expression.getRight().accept(this));\n }", "BaseNumber multiply(BaseNumber operand);", "public final Expr multExpr() throws RecognitionException {\n\t\tExpr e = null;\n\n\n\t\tToken STAR15=null;\n\t\tExpr e1 =null;\n\t\tExpr e2 =null;\n\n\n\t\t\t\tExpr it = null;\n\t\t\t\n\t\ttry {\n\t\t\t// ul.g:189:3: (e1= atom ( STAR e2= atom )* )\n\t\t\t// ul.g:190:2: e1= atom ( STAR e2= atom )*\n\t\t\t{\n\t\t\tpushFollow(FOLLOW_atom_in_multExpr768);\n\t\t\te1=atom();\n\t\t\tstate._fsp--;\n\t\t\tif (state.failed) return e;\n\t\t\tif ( state.backtracking==0 ) {it = e1;}\n\t\t\t// ul.g:191:2: ( STAR e2= atom )*\n\t\t\tloop15:\n\t\t\twhile (true) {\n\t\t\t\tint alt15=2;\n\t\t\t\tint LA15_0 = input.LA(1);\n\t\t\t\tif ( (LA15_0==STAR) ) {\n\t\t\t\t\talt15=1;\n\t\t\t\t}\n\n\t\t\t\tswitch (alt15) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// ul.g:191:4: STAR e2= atom\n\t\t\t\t\t{\n\t\t\t\t\tSTAR15=(Token)match(input,STAR,FOLLOW_STAR_in_multExpr775); if (state.failed) return e;\n\t\t\t\t\tpushFollow(FOLLOW_atom_in_multExpr781);\n\t\t\t\t\te2=atom();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return e;\n\t\t\t\t\tif ( state.backtracking==0 ) {it = new MultExpr(it, e2, (STAR15!=null?STAR15.getLine():0), STAR15.getCharPositionInLine());}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault :\n\t\t\t\t\tbreak loop15;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( state.backtracking==0 ) {\n\t\t\t\t\te = it;\n\t\t\t\t}\n\t\t}\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\trecover(input,re);\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn e;\n\t}", "public T mul(T first, T second);", "public final double expr() throws RecognitionException {\n double value = 0.0;\n\n\n double e =0.0;\n\n\n try {\n // ExprInterp.g:24:5: (e= multExpr ( '+' e= multExpr | '-' e= multExpr )* |e= maxF )\n int alt4=2;\n int LA4_0 = input.LA(1);\n\n if ( ((LA4_0 >= ID && LA4_0 <= LEFTP)||LA4_0==REL) ) {\n alt4=1;\n }\n else if ( (LA4_0==MAXI) ) {\n alt4=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 4, 0, input);\n\n throw nvae;\n\n }\n switch (alt4) {\n case 1 :\n // ExprInterp.g:24:9: e= multExpr ( '+' e= multExpr | '-' e= multExpr )*\n {\n pushFollow(FOLLOW_multExpr_in_expr155);\n e=multExpr();\n\n state._fsp--;\n\n\n value = e;\n\n // ExprInterp.g:25:9: ( '+' e= multExpr | '-' e= multExpr )*\n loop3:\n do {\n int alt3=3;\n int LA3_0 = input.LA(1);\n\n if ( (LA3_0==13) ) {\n alt3=1;\n }\n else if ( (LA3_0==15) ) {\n alt3=2;\n }\n\n\n switch (alt3) {\n \tcase 1 :\n \t // ExprInterp.g:25:13: '+' e= multExpr\n \t {\n \t match(input,13,FOLLOW_13_in_expr171); \n\n \t pushFollow(FOLLOW_multExpr_in_expr175);\n \t e=multExpr();\n\n \t state._fsp--;\n\n\n \t value += e;\n\n \t }\n \t break;\n \tcase 2 :\n \t // ExprInterp.g:26:13: '-' e= multExpr\n \t {\n \t match(input,15,FOLLOW_15_in_expr191); \n\n \t pushFollow(FOLLOW_multExpr_in_expr195);\n \t e=multExpr();\n\n \t state._fsp--;\n\n\n \t value -= e;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop3;\n }\n } while (true);\n\n\n }\n break;\n case 2 :\n // ExprInterp.g:28:8: e= maxF\n {\n pushFollow(FOLLOW_maxF_in_expr221);\n e=maxF();\n\n state._fsp--;\n\n\n value = e;\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n\n finally {\n \t// do for sure before leaving\n }\n return value;\n }", "public final void mul() {\n\t\tif (size > 1) {\n\n\t\t\tdouble topMostValue = pop();\n\t\t\tdouble secondTopMostValue = pop();\n\t\t\tpush(secondTopMostValue * topMostValue);\n\t\t}\n\t}", "public Mult(String left, double right) {\n super(left, right);\n }", "public static Transform mult(Transform t1, Transform t2) {\n\t\treturn transpose(t1.a * t2.a + t1.c * t2.b, t1.a * t2.c + t1.c * t2.d, t1.a * t2.tx + t1.c * t2.ty + t1.tx,\n\t\t\t\t\t\t t1.b * t2.a + t1.d * t2.b, t1.b * t2.c + t1.d * t2.d, t1.b * t2.tx + t1.d * t2.ty + t1.ty);\n\t}", "private void multiplication()\n\t{\n\t\tFun = Function.MULTIPLY; //Function set to determine what action should be taken later.\n\t\t\n\t\t\tsetLeftValue();\n\t\t\tentry.grabFocus();\n\t\t\n\t}", "public int mult()\r\n\t{\r\n\t\tint a=10;\r\n\t\tint b=20;\r\n\t\tint c = a*b;\r\n\t\treturn(c);\r\n\t}", "public Object visitMultiplicativeExpression(GNode n) {\n Object a, b, result;\n String op;\n \n nonboolean = true;\n \n dostring = true;\n \n a = dispatch(n.getGeneric(0));\n b = dispatch(n.getGeneric(2));\n op = n.getString(1);\n \n dostring = false;\n \n if (a instanceof Long && b instanceof Long) {\n if ((op.equals(\"/\")\n || op.equals(\"%\")) && ((Long) b).equals(new Long(0))) {\n System.err.println(\"division by zero in #if\");\n result = new Long(0);\n }\n if (op.equals(\"*\")) {\n result = (Long) a * (Long) b;\n }\n else if (op.equals(\"/\")) {\n result = (Long) a / (Long) b;\n }\n else if (op.equals(\"%\")) {\n result = (Long) a % (Long) b;\n }\n else {\n result = \"\";\n }\n }\n else {\n result = parens(a) + \" \" + op + \" \" + parens(b);\n }\n \n return result;\n }", "public static BinaryExpression multiply(Expression expression0, Expression expression1) {\n return makeBinary(ExpressionType.Multiply, expression0, expression1);\n }", "public T elementMult( T b ) {\n convertType.specify(this, b);\n T A = convertType.convert(this);\n b = convertType.convert(b);\n\n T c = A.createLike();\n A.ops.elementMult(A.mat, b.mat, c.mat);\n return c;\n }", "public Mult(double left, String right) {\n super(left, right);\n }", "public final expressionParser.add_return add() throws RecognitionException {\n expressionParser.add_return retval = new expressionParser.add_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n Token char_literal38=null;\n Token char_literal39=null;\n expressionParser.mult_return mult37 = null;\n\n expressionParser.mult_return mult40 = null;\n\n\n CommonTree char_literal38_tree=null;\n CommonTree char_literal39_tree=null;\n\n try {\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:3: ( mult ( ( '+' | '-' ) mult )* )\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:5: mult ( ( '+' | '-' ) mult )*\n {\n root_0 = (CommonTree)adaptor.nil();\n\n pushFollow(FOLLOW_mult_in_add424);\n mult37=mult();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, mult37.getTree());\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:10: ( ( '+' | '-' ) mult )*\n loop17:\n do {\n int alt17=2;\n alt17 = dfa17.predict(input);\n switch (alt17) {\n \tcase 1 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:11: ( '+' | '-' ) mult\n \t {\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:11: ( '+' | '-' )\n \t int alt16=2;\n \t int LA16_0 = input.LA(1);\n\n \t if ( (LA16_0==46) ) {\n \t alt16=1;\n \t }\n \t else if ( (LA16_0==47) ) {\n \t alt16=2;\n \t }\n \t else {\n \t if (state.backtracking>0) {state.failed=true; return retval;}\n \t NoViableAltException nvae =\n \t new NoViableAltException(\"\", 16, 0, input);\n\n \t throw nvae;\n \t }\n \t switch (alt16) {\n \t case 1 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:12: '+'\n \t {\n \t char_literal38=(Token)match(input,46,FOLLOW_46_in_add428); if (state.failed) return retval;\n \t if ( state.backtracking==0 ) {\n \t char_literal38_tree = (CommonTree)adaptor.create(char_literal38);\n \t root_0 = (CommonTree)adaptor.becomeRoot(char_literal38_tree, root_0);\n \t }\n\n \t }\n \t break;\n \t case 2 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:19: '-'\n \t {\n \t char_literal39=(Token)match(input,47,FOLLOW_47_in_add433); if (state.failed) return retval;\n \t if ( state.backtracking==0 ) {\n \t char_literal39_tree = (CommonTree)adaptor.create(char_literal39);\n \t root_0 = (CommonTree)adaptor.becomeRoot(char_literal39_tree, root_0);\n \t }\n\n \t }\n \t break;\n\n \t }\n\n \t pushFollow(FOLLOW_mult_in_add437);\n \t mult40=mult();\n\n \t state._fsp--;\n \t if (state.failed) return retval;\n \t if ( state.backtracking==0 ) adaptor.addChild(root_0, mult40.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop17;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "public Double eval(Double... operands);", "public <V extends Number> FluentExp<V> times (SQLExpression<V> expr)\n {\n return new Mul<V>(this, expr);\n }", "public static MathNode create(List<MathNode> nodes) {\n return new PowerNode(nodes);\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"MULT\";\n\t}", "NumericExpression createNumericExpression();", "abstract void mulS();", "public final expressionParser.mult_return mult() throws RecognitionException {\n expressionParser.mult_return retval = new expressionParser.mult_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n Token char_literal42=null;\n Token char_literal43=null;\n expressionParser.unary_return unary41 = null;\n\n expressionParser.unary_return unary44 = null;\n\n\n CommonTree char_literal42_tree=null;\n CommonTree char_literal43_tree=null;\n\n try {\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:3: ( unary ( ( '*' | '/' ) unary )* )\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:5: unary ( ( '*' | '/' ) unary )*\n {\n root_0 = (CommonTree)adaptor.nil();\n\n pushFollow(FOLLOW_unary_in_mult454);\n unary41=unary();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, unary41.getTree());\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:11: ( ( '*' | '/' ) unary )*\n loop19:\n do {\n int alt19=2;\n int LA19_0 = input.LA(1);\n\n if ( ((LA19_0>=48 && LA19_0<=49)) ) {\n alt19=1;\n }\n\n\n switch (alt19) {\n \tcase 1 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:12: ( '*' | '/' ) unary\n \t {\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:12: ( '*' | '/' )\n \t int alt18=2;\n \t int LA18_0 = input.LA(1);\n\n \t if ( (LA18_0==48) ) {\n \t alt18=1;\n \t }\n \t else if ( (LA18_0==49) ) {\n \t alt18=2;\n \t }\n \t else {\n \t if (state.backtracking>0) {state.failed=true; return retval;}\n \t NoViableAltException nvae =\n \t new NoViableAltException(\"\", 18, 0, input);\n\n \t throw nvae;\n \t }\n \t switch (alt18) {\n \t case 1 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:13: '*'\n \t {\n \t char_literal42=(Token)match(input,48,FOLLOW_48_in_mult458); if (state.failed) return retval;\n \t if ( state.backtracking==0 ) {\n \t char_literal42_tree = (CommonTree)adaptor.create(char_literal42);\n \t root_0 = (CommonTree)adaptor.becomeRoot(char_literal42_tree, root_0);\n \t }\n\n \t }\n \t break;\n \t case 2 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:20: '/'\n \t {\n \t char_literal43=(Token)match(input,49,FOLLOW_49_in_mult463); if (state.failed) return retval;\n \t if ( state.backtracking==0 ) {\n \t char_literal43_tree = (CommonTree)adaptor.create(char_literal43);\n \t root_0 = (CommonTree)adaptor.becomeRoot(char_literal43_tree, root_0);\n \t }\n\n \t }\n \t break;\n\n \t }\n\n \t pushFollow(FOLLOW_unary_in_mult467);\n \t unary44=unary();\n\n \t state._fsp--;\n \t if (state.failed) return retval;\n \t if ( state.backtracking==0 ) adaptor.addChild(root_0, unary44.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop19;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "public final Expr addExpr() throws RecognitionException {\r\n Expr result = null;\r\n\r\n int addExpr_StartIndex = input.index();\r\n\r\n Token op=null;\r\n Expr lhs =null;\r\n\r\n Expr rhs =null;\r\n\r\n\r\n try {\r\n if ( state.backtracking>0 && alreadyParsedRule(input, 15) ) { return result; }\r\n\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:121:5: (lhs= mulExpr (op= ( '+' | '-' ) rhs= mulExpr )* )\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:121:9: lhs= mulExpr (op= ( '+' | '-' ) rhs= mulExpr )*\r\n {\r\n pushFollow(FOLLOW_mulExpr_in_addExpr674);\r\n lhs=mulExpr();\r\n\r\n state._fsp--;\r\n if (state.failed) return result;\r\n\r\n if ( state.backtracking==0 ) { result =lhs; }\r\n\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:121:46: (op= ( '+' | '-' ) rhs= mulExpr )*\r\n loop10:\r\n do {\r\n int alt10=2;\r\n int LA10_0 = input.LA(1);\r\n\r\n if ( ((LA10_0 >= 24 && LA10_0 <= 25)) ) {\r\n alt10=1;\r\n }\r\n\r\n\r\n switch (alt10) {\r\n \tcase 1 :\r\n \t // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:121:48: op= ( '+' | '-' ) rhs= mulExpr\r\n \t {\r\n \t op=(Token)input.LT(1);\r\n\r\n \t if ( (input.LA(1) >= 24 && input.LA(1) <= 25) ) {\r\n \t input.consume();\r\n \t state.errorRecovery=false;\r\n \t state.failed=false;\r\n \t }\r\n \t else {\r\n \t if (state.backtracking>0) {state.failed=true; return result;}\r\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\r\n \t throw mse;\r\n \t }\r\n\r\n\r\n \t pushFollow(FOLLOW_mulExpr_in_addExpr692);\r\n \t rhs=mulExpr();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return result;\r\n\r\n \t if ( state.backtracking==0 ) { \r\n \t if ((op!=null?op.getText():null).equals(\"+\")) {\r\n \t result = new Add(result, rhs);\r\n \t }\r\n \t if ((op!=null?op.getText():null).equals(\"-\")) {\r\n \t result = new Sub(result, rhs); \r\n \t }\r\n \t }\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop10;\r\n }\r\n } while (true);\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n if ( state.backtracking>0 ) { memoize(input, 15, addExpr_StartIndex); }\r\n\r\n }\r\n return result;\r\n }", "public static double multi(double a, double b) {\n return a * b;\n }", "@Test\n public void testParseMul() {\n System.out.println(\"testParseMul\");\n byte[] expected = {\n Instruction.LV.getId(), 0, 0, 32,\n Instruction.LV.getId(), 0, 0, 36,\n Instruction.MUL.getId(),\n Instruction.LV.getId(), 0, 0, 40,\n Instruction.MUL.getId()\n };\n\n TermParser p = TermParserTestSetup.getMulTermSetup();\n assertEquals(\"Parse\", true, p.parse());\n AssemblerCodeChecker.assertCodeEquals(\"Code \", expected, TermParserTestSetup.getByteCode());\n }", "@Override\n public Expression simplifyMore() {\n Expression left = super.getLeft();\n Expression right = super.getRight();\n\n // x * x -> x^2\n if (left.toString().equals(right.toString())) {\n return new Pow(left, 2);\n }\n\n // ((2.0 * x) * (x * 3.0)) -> 6x^2\n if (left instanceof Mult && right instanceof Mult) {\n if (((Mult) left).getRight().toString().equals(((Mult) right).getLeft().toString())) {\n Expression exp = new Mult(new Mult(((Mult) left).getLeft(), ((Mult) right).getRight()),\n new Mult(((Mult) left).getRight(), ((Mult) right).getLeft()));\n exp.turnBonusOn();\n return exp.simplify();\n }\n }\n\n // 2x * 2x -> 4x^2\n if (left instanceof Mult && right instanceof Mult) {\n if (((Mult) left).getRight().toString().equals(((Mult) right).getRight().toString())) {\n return new Mult(new Mult(((Mult) left).getLeft(), ((Mult) right).getLeft()).simplify(),\n new Pow(((Mult) left).getRight(), 2)).simplify();\n }\n }\n\n // 2x * 2y -> 4xy\n if (left instanceof Mult && right instanceof Mult) {\n return new Mult(new Mult(((Mult) left).getLeft(), ((Mult) right).getLeft()).simplify(),\n new Mult(((Mult) left).getRight(), ((Mult) right).getRight())).simplify();\n }\n\n // sin(x) * cos(x) -> 0.5 * sin(2x)\n if (right instanceof Sin && left instanceof Cos) {\n Expression exp = new Mult(0.5, new Sin(new Mult(2, ((Sin) right).getExpression())));\n exp.turnBonusOn();\n return exp.simplify();\n }\n\n // cos(x) * sin(x) -> 0.5 * sin(2x)\n if (right instanceof Cos && left instanceof Sin) {\n Expression exp = new Sin(new Mult(2, ((Cos) right).getExpression()));\n exp.turnBonusOn();\n return exp.simplify();\n }\n\n // log(x, y) * 2 -> 2 * log(x, y)\n if (left instanceof Sin || left instanceof Cos || left instanceof Log) {\n Expression exp = new Mult(right, left);\n exp.turnBonusOn();\n return exp.simplify();\n }\n\n // x^2 * x^3 -> x^5\n if (left instanceof Pow && right instanceof Pow) {\n if (((Pow) left).getLeft().toString().equals(((Pow) right).getLeft().toString())) {\n Expression exp = new Pow(((Pow) left).getLeft(),\n new Plus(((Pow) left).getRight(), ((Pow) right).getRight()));\n exp.turnBonusOn();\n return exp.simplify();\n }\n }\n\n // x^2 * x -> x^3\n if (left instanceof Pow) {\n if (((Pow) left).getLeft().toString().equals(right.toString())) {\n Expression exp = new Pow(((Pow) left).getLeft(), new Plus(((Pow) left).getRight(), 1));\n exp.turnBonusOn();\n return exp.simplify();\n }\n }\n\n return this;\n }", "IVec3 mult(IVec3 v);", "private Term parseMul(final boolean required) throws ParseException {\n Term t1 = parseUnary(required);\n while (t1 != null) {\n int tt = _tokenizer.next();\n if (tt == '*') {\n Term t2 = parseUnary(true);\n if (t1.isD() && t2.isN() || t1.isN() && t2.isD()) {\n t1 = new Term.Mul(Term.TYPE_D, t1, t2);\n } else if (t1.isI() && t2.isI()) {\n t1 = new Term.Mul(Term.TYPE_I, t1, t2);\n } else if (!isTypeChecking()) {\n t1 = new Term.Mul(t1.isD() || t2.isD() ? Term.TYPE_D : Term.TYPE_I, t1, t2);\n } else {\n reportTypeErrorN2(\"'*'\");\n }\n } else if (tt == '/') {\n Term t2 = parseUnary(true);\n if (t1.isD() && t2.isN() || t1.isN() && t2.isD()) {\n t1 = new Term.Div(Term.TYPE_D, t1, t2);\n } else if (t1.isI() && t2.isI()) {\n t1 = new Term.Div(Term.TYPE_I, t1, t2);\n } else if (!isTypeChecking()) {\n t1 = new Term.Div(t1.isD() || t2.isD() ? Term.TYPE_D : Term.TYPE_I, t1, t2);\n } else {\n reportTypeErrorN2(\"'/'\");\n }\n } else if (tt == '%') {\n Term t2 = parseUnary(true);\n if (t1.isD() && t2.isN() || t1.isN() && t2.isD()) {\n t1 = new Term.Mod(Term.TYPE_D, t1, t2);\n } else if (t1.isI() && t2.isI()) {\n t1 = new Term.Mod(Term.TYPE_I, t1, t2);\n } else if (!isTypeChecking()) {\n t1 = new Term.Mod(t1.isD() || t2.isD() ? Term.TYPE_D : Term.TYPE_I, t1, t2);\n } else {\n reportTypeErrorN2(\"'%'\");\n }\n } else {\n _tokenizer.pushBack();\n break;\n }\n }\n return t1;\n }", "public void multiply()\r\n {\r\n resultDoubles = Operations.multiply(leftOperand, rightOperand);\r\n resultResetHelper();\r\n }", "public Mult(String left, String right) {\n super(left, right);\n }", "public Mult(double left, double right) {\n super(left, right);\n }", "public Multiplication(Expression l, Expression r) {\n\tleft = l;\n\tright = r;\n }", "public AncientEgyptianMultiplication( ) {\r\n }", "abstract int multiplication(int num1, int num2);", "public void testMultiply() {\r\n System.out.println(\"Multiply\");\r\n Double [][] n = new Double[][]{{-3., -2.5, -1., 0., 1., 2., 3.4, 3.5, 1.1E100, -1.1E100}, \r\n {-3., 2.5, 0., 0., 1., -2., 3., 3.7, 1.1E100, 1.1E100}, \r\n {9., -6.25, 0., 0., 1., -4., 10.2, 12.95, 1.21E200, -1.21E200}};\r\n for(int i = 0; i < 10; i++){\r\n Double x = n[0][i];\r\n Double y = n[1][i];\r\n double expResult = n[2][i];\r\n double result = MathOp.Multiply(x, y);\r\n assertEquals(expResult, result, 0.001);\r\n }\r\n }", "@Override\n public Expression differentiate(String var) {\n Expression left = super.getLeft();\n Expression right = super.getRight();\n return new Plus(new Mult(left.differentiate(var), right), new Mult(left, right.differentiate(var)));\n }", "public final Expr addExpr() throws RecognitionException {\n\t\tExpr e = null;\n\n\n\t\tToken PLUS13=null;\n\t\tToken MINUS14=null;\n\t\tExpr e1 =null;\n\t\tExpr e2 =null;\n\n\n\t\t\t\tExpr it = null;\n\t\t\t\tBoolean bool = false;\n\t\t\t\tint line = -1;\n\t\t\t\tint offset = -1;\n\t\t\t\n\t\ttry {\n\t\t\t// ul.g:173:2: (e1= multExpr ( ( PLUS | MINUS ) e2= multExpr )* )\n\t\t\t// ul.g:174:3: e1= multExpr ( ( PLUS | MINUS ) e2= multExpr )*\n\t\t\t{\n\t\t\tpushFollow(FOLLOW_multExpr_in_addExpr710);\n\t\t\te1=multExpr();\n\t\t\tstate._fsp--;\n\t\t\tif (state.failed) return e;\n\t\t\tif ( state.backtracking==0 ) {it = e1;}\n\t\t\t// ul.g:175:3: ( ( PLUS | MINUS ) e2= multExpr )*\n\t\t\tloop14:\n\t\t\twhile (true) {\n\t\t\t\tint alt14=2;\n\t\t\t\tint LA14_0 = input.LA(1);\n\t\t\t\tif ( (LA14_0==MINUS||LA14_0==PLUS) ) {\n\t\t\t\t\talt14=1;\n\t\t\t\t}\n\n\t\t\t\tswitch (alt14) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// ul.g:175:4: ( PLUS | MINUS ) e2= multExpr\n\t\t\t\t\t{\n\t\t\t\t\t// ul.g:175:4: ( PLUS | MINUS )\n\t\t\t\t\tint alt13=2;\n\t\t\t\t\tint LA13_0 = input.LA(1);\n\t\t\t\t\tif ( (LA13_0==PLUS) ) {\n\t\t\t\t\t\talt13=1;\n\t\t\t\t\t}\n\t\t\t\t\telse if ( (LA13_0==MINUS) ) {\n\t\t\t\t\t\talt13=2;\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (state.backtracking>0) {state.failed=true; return e;}\n\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\tnew NoViableAltException(\"\", 13, 0, input);\n\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t}\n\n\t\t\t\t\tswitch (alt13) {\n\t\t\t\t\t\tcase 1 :\n\t\t\t\t\t\t\t// ul.g:175:5: PLUS\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tPLUS13=(Token)match(input,PLUS,FOLLOW_PLUS_in_addExpr718); if (state.failed) return e;\n\t\t\t\t\t\t\tif ( state.backtracking==0 ) {line = (PLUS13!=null?PLUS13.getLine():0); offset = PLUS13.getCharPositionInLine();}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2 :\n\t\t\t\t\t\t\t// ul.g:175:70: MINUS\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tMINUS14=(Token)match(input,MINUS,FOLLOW_MINUS_in_addExpr721); if (state.failed) return e;\n\t\t\t\t\t\t\tif ( state.backtracking==0 ) {line = (MINUS14!=null?MINUS14.getLine():0); offset = MINUS14.getCharPositionInLine();}\n\t\t\t\t\t\t\tif ( state.backtracking==0 ) {bool = true;}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tpushFollow(FOLLOW_multExpr_in_addExpr730);\n\t\t\t\t\te2=multExpr();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return e;\n\t\t\t\t\tif ( state.backtracking==0 ) {it = new AddExpr(it, e2, bool, line, offset);}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault :\n\t\t\t\t\tbreak loop14;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( state.backtracking==0 ) {\n\t\t\t\t\te = it;\n\t\t\t\t}\n\t\t}\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\trecover(input,re);\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn e;\n\t}", "public static void main(String[] args) {\n NumberFact a, b;\n a = new NumberFact(1_000);\n b = new NumberFact(999);\n\n ArithmeticOperator x, y;\n x = new ArithmeticOperator('*', a, b);\n y = new ArithmeticOperator('+', x, b);\n\n System.out.println(y);\n System.out.println(y.eval());\n }", "private void createMul(Code32 code, int op, int cond, int Rd, int Rn, int Rm) {\r\n\t\tcode.instructions[code.iCount] = (cond << 28) | op | (Rd << 16) | (Rm << 8) | (0x9 << 4) | Rn;\r\n\t\tcode.incInstructionNum();\r\n\t}", "public static BinaryExpression multiplyAssign(Expression expression0, Expression expression1) {\n return makeBinary(ExpressionType.MultiplyAssign, expression0, expression1);\n }", "LengthScalarMultiply createLengthScalarMultiply();", "public final CQLParser.multiplicativeExpression_return multiplicativeExpression() throws RecognitionException {\n CQLParser.multiplicativeExpression_return retval = new CQLParser.multiplicativeExpression_return();\n retval.start = input.LT(1);\n\n Object root_0 = null;\n\n Token set100=null;\n CQLParser.powerExpression_return powerExpression99 = null;\n\n CQLParser.powerExpression_return powerExpression101 = null;\n\n\n Object set100_tree=null;\n\n try {\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:404:2: ( powerExpression ( ( MULT | DIV ) powerExpression )* )\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:404:4: powerExpression ( ( MULT | DIV ) powerExpression )*\n {\n root_0 = (Object)adaptor.nil();\n\n pushFollow(FOLLOW_powerExpression_in_multiplicativeExpression1886);\n powerExpression99=powerExpression();\n\n state._fsp--;\n\n adaptor.addChild(root_0, powerExpression99.getTree());\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:404:20: ( ( MULT | DIV ) powerExpression )*\n loop27:\n do {\n int alt27=2;\n int LA27_0 = input.LA(1);\n\n if ( ((LA27_0>=MULT && LA27_0<=DIV)) ) {\n alt27=1;\n }\n\n\n switch (alt27) {\n \tcase 1 :\n \t // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:404:21: ( MULT | DIV ) powerExpression\n \t {\n \t set100=(Token)input.LT(1);\n \t set100=(Token)input.LT(1);\n \t if ( (input.LA(1)>=MULT && input.LA(1)<=DIV) ) {\n \t input.consume();\n \t root_0 = (Object)adaptor.becomeRoot((Object)adaptor.create(set100), root_0);\n \t state.errorRecovery=false;\n \t }\n \t else {\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t throw mse;\n \t }\n\n \t pushFollow(FOLLOW_powerExpression_in_multiplicativeExpression1896);\n \t powerExpression101=powerExpression();\n\n \t state._fsp--;\n\n \t adaptor.addChild(root_0, powerExpression101.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop27;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (Object)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n \t\n \tcatch(RecognitionException re)\n \t{\t\n \t\treportError(re);\n \t\tthrow re;\n \t}\n finally {\n }\n return retval;\n }", "Sum getMultiplier();", "public MathEval() {\r\n super();\r\n\r\n constants=new TreeMap<String,Double>(String.CASE_INSENSITIVE_ORDER);\r\n setConstant(\"E\" ,Math.E);\r\n setConstant(\"Euler\" ,0.577215664901533D);\r\n setConstant(\"LN2\" ,0.693147180559945D);\r\n setConstant(\"LN10\" ,2.302585092994046D);\r\n setConstant(\"LOG2E\" ,1.442695040888963D);\r\n setConstant(\"LOG10E\",0.434294481903252D);\r\n setConstant(\"PHI\" ,1.618033988749895D);\r\n setConstant(\"PI\" ,Math.PI);\r\n\r\n variables=new TreeMap<String,Double>(String.CASE_INSENSITIVE_ORDER);\r\n\r\n functions=new TreeMap<String,FunctionHandler>(String.CASE_INSENSITIVE_ORDER);\r\n\r\n offset=0;\r\n isConstant=false;\r\n }", "private ASTNode binaryMultiplyRules(ASTNode left, ASTNode right) throws Exception {\n Token leftToken = left.getToken();\n Token rightToken = right.getToken();\n\n TokenType leftType = leftToken.getType();\n TokenType rightType = rightToken.getType();\n\n Token tempToken;\n TokenType numType = TokenType.NUMBER;\n TokenType minusType = TokenType.MINUS;\n TokenType mulType = TokenType.MUL;\n\n if (rightToken.getIdentifier().equals(\"0\")){\n //left is anything and right is 0\n tempToken = new Token(numType, \"0\");\n return new Num(tempToken);\n }\n else if (rightToken.getIdentifier().equals(\"1\")){\n //left is anything and right is 1\n return left;\n }\n else if (leftToken.getIdentifier().equals(\"0\")){\n //left is 0 and right is anything\n tempToken = new Token(numType, \"0\");\n return new Num(tempToken);\n }\n else if (leftToken.getIdentifier().equals(\"1\")){\n //left is 1 and right is anything\n return right;\n }\n else if(patternMatcher(leftType, rightType, numType, numType)){\n Double leftVal = Double.parseDouble(leftToken.getIdentifier());\n Double rightVal = Double.parseDouble(rightToken.getIdentifier());\n\n String prod = String.valueOf(leftVal * rightVal);\n tempToken = new Token(numType, prod);\n return new Num(tempToken);\n }\n else if (patternMatcher(leftType, rightType, minusType, minusType)){\n if (left instanceof UnaryOP && right instanceof UnaryOP){\n tempToken = new Token(mulType);\n ASTNode leftOP = ((UnaryOP) left).getOperand();\n ASTNode rightOp = ((UnaryOP) right).getOperand();\n return new BinaryOp(tempToken, leftOP, rightOp);\n }\n }\n tempToken = new Token(mulType);\n return new BinaryOp(tempToken ,left, right);\n }", "public static Rational multiply(Rational num1, Rational num2){\r\n Rational product = new Rational();\r\n \r\n // multiply throughout\r\n product.denominator = num1.getDenominator() * num2.getDenominator();\r\n product.numerator = num1.getNumerator() * num2.getNumerator();\r\n \r\n product.reduce();\r\n return product;\r\n }", "Matrix scalarMult(double x){\n int newMatrixSize = this.getSize();\n Matrix newM = new Matrix(newMatrixSize);\n for(int i = 1; i <= newMatrixSize; i++){\n List itRow = rows[i - 1];\n itRow.moveFront();\n while(itRow.index() != -1){\n Entry c = (Entry)itRow.get();\n newM.changeEntry(i, c.column, (x*c.value));\n itRow.moveNext();\n }\n }\n\n return newM;\n }", "@Override\n\tpublic Instruction parse(String[] s) throws WrongInstructionFormatException {\n\t\tif (s.length==1 && s[0].equalsIgnoreCase(\"mult\")) \n\t\t\treturn new Mult();\n\t\telse throw new WrongInstructionFormatException();\n\t}", "@Override\n public InterpreterValue mul(InterpreterValue v) {\n\n // If the given value is a IntegerValue create a new DoubleValue from\n // the multiplication-result\n if(v instanceof IntegerValue) return new DoubleValue(getValue() * ((IntegerValue) v).getValue());\n\n // If the given value is a DoubleValue create a new DoubleValue from\n // the multiplication-result\n if(v instanceof DoubleValue) return new DoubleValue(getValue() * ((DoubleValue) v).getValue());\n\n // In other case just throw an error\n throw new Error(\"Operator '*' is not defined for type double and \" + v.getName());\n\n }", "public final Expr mulExpr() throws RecognitionException {\r\n Expr result = null;\r\n\r\n int mulExpr_StartIndex = input.index();\r\n\r\n Token op=null;\r\n Expr lhs =null;\r\n\r\n Expr rhs =null;\r\n\r\n\r\n try {\r\n if ( state.backtracking>0 && alreadyParsedRule(input, 14) ) { return result; }\r\n\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:108:5: (lhs= unExpr (op= ( '*' | '/' ) rhs= unExpr )* )\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:108:9: lhs= unExpr (op= ( '*' | '/' ) rhs= unExpr )*\r\n {\r\n pushFollow(FOLLOW_unExpr_in_mulExpr613);\r\n lhs=unExpr();\r\n\r\n state._fsp--;\r\n if (state.failed) return result;\r\n\r\n if ( state.backtracking==0 ) { result =lhs; }\r\n\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:108:45: (op= ( '*' | '/' ) rhs= unExpr )*\r\n loop9:\r\n do {\r\n int alt9=2;\r\n int LA9_0 = input.LA(1);\r\n\r\n if ( (LA9_0==23||LA9_0==26) ) {\r\n alt9=1;\r\n }\r\n\r\n\r\n switch (alt9) {\r\n \tcase 1 :\r\n \t // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:108:47: op= ( '*' | '/' ) rhs= unExpr\r\n \t {\r\n \t op=(Token)input.LT(1);\r\n\r\n \t if ( input.LA(1)==23||input.LA(1)==26 ) {\r\n \t input.consume();\r\n \t state.errorRecovery=false;\r\n \t state.failed=false;\r\n \t }\r\n \t else {\r\n \t if (state.backtracking>0) {state.failed=true; return result;}\r\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\r\n \t throw mse;\r\n \t }\r\n\r\n\r\n \t pushFollow(FOLLOW_unExpr_in_mulExpr633);\r\n \t rhs=unExpr();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return result;\r\n\r\n \t if ( state.backtracking==0 ) { \r\n \t if ((op!=null?op.getText():null).equals(\"*\")) {\r\n \t result = new Mul(result, rhs);\r\n \t }\r\n \t if ((op!=null?op.getText():null).equals(\"/\")) {\r\n \t result = new Div(result, rhs); \r\n \t }\r\n \t }\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop9;\r\n }\r\n } while (true);\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n if ( state.backtracking>0 ) { memoize(input, 14, mulExpr_StartIndex); }\r\n\r\n }\r\n return result;\r\n }", "public static EquationExpression timesRaw(EquationExpression... args) {\n\t\tswitch (args.length) {\n\t\tcase 0:\n\t\t\treturn EquationNumericValue.from(1);\n\t\tcase 1:\n\t\t\treturn args[0];\n\t\tcase 2:\n\t\t\treturn new EquationProductOperator(args[0], args[1]);\n\t\tdefault:\n\t\t\tEquationExpression[] args2 = new EquationExpression[args.length\n\t\t\t\t\t- 1];\n\t\t\tSystem.arraycopy(args, 1, args2, 0, args.length - 1);\n\t\t\treturn new EquationProductOperator(args[0], sumRaw(args2));\n\t\t}\n\t}", "public final void entryRuleMultExp() throws RecognitionException {\n try {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1377:1: ( ruleMultExp EOF )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1378:1: ruleMultExp EOF\n {\n before(grammarAccess.getMultExpRule()); \n pushFollow(FOLLOW_ruleMultExp_in_entryRuleMultExp2881);\n ruleMultExp();\n\n state._fsp--;\n\n after(grammarAccess.getMultExpRule()); \n match(input,EOF,FOLLOW_EOF_in_entryRuleMultExp2888); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }", "public static EquationExpression timesRaw(EquationExpression... args) {\n switch(args.length) {\n case 0:\n return EquationNumericValue.from(1);\n case 1:\n return args[0];\n case 2:\n return new EquationProductOperator(args[0], args[1]);\n default:\n EquationExpression[] args2 = new EquationExpression[args.length-1];\n System.arraycopy(args, 1, args2, 0, args.length-1);\n return new EquationProductOperator(args[0], sumRaw(args2));\n }\n }", "public final void mult (Unit unit) throws ArithmeticException {\n\t\tlong u = mksa ; double r = factor; double v = value; double o = offset;\n\t\t/* dump(\"mult:this \"); unit.dump(\"mult:unit\"); */\n\t\tif (((mksa&_abs)!=0) && (unit.factor != 1)) throw\t// On a date\n\t\tnew ArithmeticException(\"****Unit.mult on a date!\");\n\t\tif (((mksa|unit.mksa)&_log) != 0) {\n\t\t\tif ((mksa == underScore) && (factor == 1.)) ;\n\t\t\telse if ((unit.mksa == underScore) && (unit.factor == 1.)) ;\n\t\t\telse throw new ArithmeticException\n\t\t\t(\"****Unit: can't multiply logs: \" + symbol + \" x \" + unit.symbol);\n\t\t}\n\t\t/* As soon as there is an operation, the offset is ignored \n\t\t * except if one of the factors is unity.\n\t\t */\n\t\tif ((offset!=0) || (unit.offset!=0)) {\n\t\t\tif (mksa == underScore) offset = unit.offset;\n\t\t\telse if (unit.mksa == underScore) ;\n\t\t\telse offset = 0;\n\t\t}\n\t\tv *= unit.value; \n\t\tr *= unit.factor;\n\t\tu += unit.mksa; u -= underScore;\n\t\tif ((u&0x0c80808080808080L) != 0) throw new ArithmeticException\n\t\t(\"****too large powers in: \" + symbol + \" x \" + unit.symbol);\n\t\tmksa = u;\n\t\tfactor = r;\n\t\tvalue = v;\n\t\t/* Decision for the new symbol */\n\t\tif ((symbol != null) && (unit.symbol != null)) {\n\t\t\tif ((unit.mksa == underScore) && (unit.factor == 1)) return;\t// No unit ...\n\t\t\tif (( mksa == underScore) && ( factor == 1)) symbol = unit.symbol;\n\t\t\telse if ((symbol.equals(unit.symbol)) && (factor == unit.factor))\n\t\t\t\tsymbol = toExpr(symbol) + \"2\" ;\n\t\t\telse symbol = toExpr(symbol) + \".\" + toExpr(unit.symbol) ;\n\t\t}\n\t}", "public final Expr addExpr() throws RecognitionException {\n Expr result = null;\n\n int addExpr_StartIndex = input.index();\n\n Token op=null;\n Expr lhs =null;\n\n Expr rhs =null;\n\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 11) ) { return result; }\n\n // /home/jahn/workspace1/QLAndroid/src/org/uva/sea/ql/parser/antlr/QL.g:124:5: (lhs= mulExpr (op= ( '+' | '-' ) rhs= mulExpr )* )\n // /home/jahn/workspace1/QLAndroid/src/org/uva/sea/ql/parser/antlr/QL.g:124:9: lhs= mulExpr (op= ( '+' | '-' ) rhs= mulExpr )*\n {\n pushFollow(FOLLOW_mulExpr_in_addExpr547);\n lhs=mulExpr();\n\n state._fsp--;\n if (state.failed) return result;\n\n if ( state.backtracking==0 ) { result =lhs; }\n\n // /home/jahn/workspace1/QLAndroid/src/org/uva/sea/ql/parser/antlr/QL.g:124:46: (op= ( '+' | '-' ) rhs= mulExpr )*\n loop8:\n do {\n int alt8=2;\n int LA8_0 = input.LA(1);\n\n if ( ((LA8_0 >= 21 && LA8_0 <= 22)) ) {\n alt8=1;\n }\n\n\n switch (alt8) {\n \tcase 1 :\n \t // /home/jahn/workspace1/QLAndroid/src/org/uva/sea/ql/parser/antlr/QL.g:124:48: op= ( '+' | '-' ) rhs= mulExpr\n \t {\n \t op=(Token)input.LT(1);\n\n \t if ( (input.LA(1) >= 21 && input.LA(1) <= 22) ) {\n \t input.consume();\n \t state.errorRecovery=false;\n \t state.failed=false;\n \t }\n \t else {\n \t if (state.backtracking>0) {state.failed=true; return result;}\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t throw mse;\n \t }\n\n\n \t pushFollow(FOLLOW_mulExpr_in_addExpr565);\n \t rhs=mulExpr();\n\n \t state._fsp--;\n \t if (state.failed) return result;\n\n \t if ( state.backtracking==0 ) { \n \t if ((op!=null?op.getText():null).equals(\"+\")) {\n \t result = new Add(result, rhs);\n \t }\n \t if ((op!=null?op.getText():null).equals(\"-\")) {\n \t result = new Sub(result, rhs); \n \t }\n \t }\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop8;\n }\n } while (true);\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n\n finally {\n \t// do for sure before leaving\n if ( state.backtracking>0 ) { memoize(input, 11, addExpr_StartIndex); }\n\n }\n return result;\n }", "Point mult (double s, Point result);", "@Override\r\n\tpublic void mul(int x, int y) {\n\t\t\r\n\t}", "@Override\r\n\tpublic int multi(int x, int y) {\n\t\treturn x * y;\r\n\t}", "CalcEvaluator(boolean mult) {\r\n this.mult = mult;\r\n }", "@Override\r\n\tpublic int mul() {\n\t\treturn 0;\r\n\t}", "public final void mMUL() throws RecognitionException\n\t{\n\t\ttry\n\t\t{\n\t\t\tfinal int _type = AshvmLexer.MUL;\n\t\t\tfinal int _channel = BaseRecognizer.DEFAULT_TOKEN_CHANNEL;\n\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:708:5: ( 'mul' )\n\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:708:7: 'mul'\n\t\t\t{\n\t\t\t\tthis.match(\"mul\");\n\n\t\t\t}\n\n\t\t\tthis.state.type = _type;\n\t\t\tthis.state.channel = _channel;\n\t\t}\n\t\tfinally\n\t\t{\n\t\t}\n\t}", "public double multiplica(double a, double b) {\n\t\treturn a*b;\n\t}", "public R3Mult(int rdIndex, int rsIndex, int id) {\n\n }", "@Override\n\tpublic int mult(int val1, int val2) {\n\t\treturn val1 * val2;\n\t}", "public final void rule__AddExp__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:8253:1: ( ( ruleMultExp ) )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:8254:1: ( ruleMultExp )\n {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:8254:1: ( ruleMultExp )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:8255:1: ruleMultExp\n {\n before(grammarAccess.getAddExpAccess().getMultExpParserRuleCall_0()); \n pushFollow(FOLLOW_ruleMultExp_in_rule__AddExp__Group__0__Impl16577);\n ruleMultExp();\n\n state._fsp--;\n\n after(grammarAccess.getAddExpAccess().getMultExpParserRuleCall_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "<C, PM> VariableExp<C, PM> createVariableExp();", "public final double multExpr() throws RecognitionException {\n double value = 0.0;\n\n\n double e =0.0;\n\n\n try {\n // ExprInterp.g:32:5: (e= atom ( '*' e= atom )* )\n // ExprInterp.g:32:9: e= atom ( '*' e= atom )*\n {\n pushFollow(FOLLOW_atom_in_multExpr248);\n e=atom();\n\n state._fsp--;\n\n\n value = e;\n\n // ExprInterp.g:32:37: ( '*' e= atom )*\n loop5:\n do {\n int alt5=2;\n int LA5_0 = input.LA(1);\n\n if ( (LA5_0==12) ) {\n alt5=1;\n }\n\n\n switch (alt5) {\n \tcase 1 :\n \t // ExprInterp.g:32:38: '*' e= atom\n \t {\n \t match(input,12,FOLLOW_12_in_multExpr253); \n\n \t pushFollow(FOLLOW_atom_in_multExpr257);\n \t e=atom();\n\n \t state._fsp--;\n\n\n \t value *= e;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop5;\n }\n } while (true);\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n\n finally {\n \t// do for sure before leaving\n }\n return value;\n }", "private Complex eval(Complex[] ca, Complex x) {\n\t\tComplex result = ca[0];\n\t\tfor (int i = 1; i < ca.length; i++) {\n\t\t\tresult = result.mul(x).add(ca[i]);\n\t\t}\n\t\treturn result;\n\t}", "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 }", "private static native double mul(int n);", "private String compute(String equ,String op)\n {\n String equation = equ;\n Pattern mdPattern = Pattern.compile(\"(\\\\d+([.]\\\\d+)*)(([\"+op+\"]))(\\\\d+([.]\\\\d+)*)\");\n Matcher matcher\t\t= mdPattern.matcher(equation);\n while(matcher.find())\n {\n String[] arr = null;\n double ans = 0;\n String eq = matcher.group(0);//get form x*y\n if(eq.contains(op))\n {\n arr = eq.split(\"\\\\\"+op);//make arr\n if(op.equals(\"*\"))\n ans = Double.valueOf(arr[0])*Double.valueOf(arr[1]);//compute\n if(op.equals(\"/\"))\n ans = Double.valueOf(arr[0])/Double.valueOf(arr[1]);//compute\n if(op.equals(\"+\"))\n ans = Double.valueOf(arr[0])+Double.valueOf(arr[1]);//compute\n if(op.equals(\"-\"))\n ans = Double.valueOf(arr[0])-Double.valueOf(arr[1]);//compute\n }\n\n equation = matcher.replaceFirst(String.valueOf(ans));//replace in equation\n matcher = mdPattern.matcher(equation);//look for more matches\n }\n return equation;\n }", "public void multiply(Object mulValue) {\r\n\r\n\t\tNumberOperation operator = new NumberOperation(this.value, mulValue) {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic Number doAnOperation() {\r\n\t\t\t\tTypeEnum typeOfResult = getFinalType();\r\n\t\t\t\tif(typeOfResult == TypeEnum.TYPE_INTEGER) {\r\n\t\t\t\t\treturn getO1().intValue() * getO2().intValue();\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\treturn getO1().doubleValue() * getO2().doubleValue();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t\tthis.value = operator.doAnOperation();\r\n\t}", "public void mul(String a, String b, int i, String reg) {\r\n registerName.add(reg);\r\n int posa = registerRegister.indexOf(a);\r\n int posb = registerRegister.indexOf(b);\r\n int element = Integer.parseInt(registerValues.get(posa));\r\n int element1 = Integer.parseInt(registerValues.get(posb));\r\n int mul = element * element1;\r\n registerValues.add(Integer.toString(mul));\r\n }", "public static void main(String args[]) {\n\tExpr e3 = new Minus(new Num(100),new Num(99));\n\tSystem.out.println(\"e3 is \" + e3.exprToString());\n\t// outputs \"e4 is (4*5-(100-99))\"\n\tExpr e4 = new Minus(new Times(new Num(4),new Num(5)),e3);\n\tSystem.out.println(\"e4 is \" + e4.exprToString());\n }", "public void multiply(double multiplier) {\n x *= multiplier;\n y *= multiplier;\n }", "public final void synpred27_expression_fragment() throws RecognitionException { \n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:11: ( ( '+' | '-' ) mult )\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:11: ( '+' | '-' ) mult\n {\n if ( (input.LA(1)>=46 && input.LA(1)<=47) ) {\n input.consume();\n state.errorRecovery=false;state.failed=false;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n MismatchedSetException mse = new MismatchedSetException(null,input);\n throw mse;\n }\n\n pushFollow(FOLLOW_mult_in_synpred27_expression437);\n mult();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n }", "Rational multiply(Rational p){\n Rational firstarg=new Rational();\n firstarg.numerator=numerator;\n firstarg.denominator=denominator;\n\n firstarg.numerator=p.numerator*firstarg.numerator;\n firstarg.denominator=p.denominator*firstarg.denominator;\n return firstarg;\n }" ]
[ "0.7181631", "0.68503803", "0.6790717", "0.6790717", "0.6718155", "0.66223747", "0.652588", "0.6455302", "0.64144236", "0.6232391", "0.6115367", "0.6111778", "0.60639083", "0.6034308", "0.6033243", "0.60050446", "0.59940916", "0.59714967", "0.5948733", "0.59275883", "0.5921516", "0.5917229", "0.5885147", "0.586182", "0.5822785", "0.57923794", "0.57901585", "0.5735209", "0.57311654", "0.5702553", "0.5684613", "0.5664936", "0.5660687", "0.56234497", "0.56182367", "0.561346", "0.56086016", "0.56073177", "0.56045586", "0.55791", "0.55628836", "0.55539525", "0.5548122", "0.55374306", "0.5534907", "0.55216366", "0.55140185", "0.55081743", "0.5506326", "0.550098", "0.54962754", "0.5475454", "0.5467444", "0.5466194", "0.54569995", "0.54563373", "0.545157", "0.5443804", "0.54349643", "0.5432829", "0.5425125", "0.54076123", "0.53838795", "0.53804964", "0.5371134", "0.5369893", "0.536355", "0.53377384", "0.53327096", "0.5320211", "0.5312281", "0.53076506", "0.5305729", "0.5295618", "0.5291171", "0.5280109", "0.5274615", "0.5272919", "0.52650696", "0.5262574", "0.525891", "0.52562183", "0.52480155", "0.524484", "0.5244491", "0.5242352", "0.5237318", "0.52316725", "0.52311546", "0.5228757", "0.5227981", "0.52118284", "0.5206945", "0.52025", "0.52004564", "0.5195726", "0.5194222", "0.51936", "0.51799154", "0.51777357" ]
0.64260405
8
Constructs a mult by given expressions.
public Mult(String left, Expression right) { super(left, right); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Expression multExpression() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tExpression e0 = powerExpression();\r\n\t\twhile(isKind(OP_TIMES, OP_DIV, OP_MOD)) {\r\n\t\t\tToken op = consume();\r\n\t\t\tExpression e1 = powerExpression();\r\n\t\t\te0 = new ExpressionBinary(first,e0,op,e1);\r\n\t\t}\r\n\t\treturn e0;\r\n\t}", "private Expr mult(Expr x) throws Err {\n if (x instanceof ExprUnary) {\n ExprUnary y=(ExprUnary)x;\n if (y.op==ExprUnary.Op.SOME) return ExprUnary.Op.SOMEOF.make(y.pos, y.sub);\n if (y.op==ExprUnary.Op.LONE) return ExprUnary.Op.LONEOF.make(y.pos, y.sub);\n if (y.op==ExprUnary.Op.ONE) return ExprUnary.Op.ONEOF.make(y.pos, y.sub);\n }\n return x;\n }", "public Mult(Expression left, Expression right) {\n super(left, right);\n }", "public Mult(Expression left, Expression right) {\n super(left, right);\n }", "Multiply createMultiply();", "public final VecMathParser.expr_return expr() throws RecognitionException {\n VecMathParser.expr_return retval = new VecMathParser.expr_return();\n retval.start = input.LT(1);\n\n Object root_0 = null;\n\n Token char_literal8=null;\n VecMathParser.multExpr_return multExpr7 = null;\n\n VecMathParser.multExpr_return multExpr9 = null;\n\n\n Object char_literal8_tree=null;\n\n try {\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:15:5: ( multExpr ( '+' multExpr )* )\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:15:7: multExpr ( '+' multExpr )*\n {\n root_0 = (Object)adaptor.nil();\n\n pushFollow(FOLLOW_multExpr_in_expr117);\n multExpr7=multExpr();\n\n state._fsp--;\n\n adaptor.addChild(root_0, multExpr7.getTree());\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:15:16: ( '+' multExpr )*\n loop3:\n do {\n int alt3=2;\n int LA3_0 = input.LA(1);\n\n if ( (LA3_0==10) ) {\n alt3=1;\n }\n\n\n switch (alt3) {\n \tcase 1 :\n \t // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:15:17: '+' multExpr\n \t {\n \t char_literal8=(Token)match(input,10,FOLLOW_10_in_expr120); \n \t char_literal8_tree = (Object)adaptor.create(char_literal8);\n \t root_0 = (Object)adaptor.becomeRoot(char_literal8_tree, root_0);\n\n \t pushFollow(FOLLOW_multExpr_in_expr123);\n \t multExpr9=multExpr();\n\n \t state._fsp--;\n\n \t adaptor.addChild(root_0, multExpr9.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop3;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (Object)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "public Mult(Expression left, double right) {\n super(left, right);\n }", "public Mult(double left, Expression right) {\n super(left, right);\n }", "public Mult(Expression left, String right) {\n super(left, right);\n }", "void visit(MultiplicationExpression expression);", "public BinMltLinExpr multiply(BinLinExpr expr) {\n\t\t\n\t\tBinMltLinExpr result = new BinMltLinExpr();\n\t\t\n\t\t// Multiply variables together\n\t\tfor (int i = 0; i < expr.vars.size(); i++) {\n\t\t\tfor (int j = 0; j < termVars.size(); j++) {\n\t\t\t\t\n\t\t\t\tdouble newCoeff = expr.coefficients.get(i) * coefficients.get(j);\n\t\t\t\tList<BinVar> newVars = new ArrayList<BinVar>();\n\t\t\t\tnewVars.add(expr.vars.get(i));\n\t\t\t\tnewVars.addAll(termVars.get(j));\n\t\t\t\t\n\t\t\t\tresult.addTerm(newCoeff, newVars);\n\t\t\t}\n\t\t}\n\n\t\t// Multiply variables with constants\n\t\tfor (int i = 0; i < termVars.size(); i++) {\n\t\t\tdouble newCoeff = coefficients.get(i) * expr.constant;\n\t\t\tresult.addTerm(newCoeff, termVars.get(i));\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < expr.vars.size(); i++) {\n\t\t\tdouble newCoeff = expr.coefficients.get(i) * constant;\n\t\t\tresult.addTerm(newCoeff, expr.vars.get(i));\n\t\t}\n\t\t\n\t\tresult.addConstant(constant*expr.constant);\n\t\t\n\t\treturn result;\n\t}", "public void enfoncerMult() {\n\t\ttry {\n\t\t\tthis.op = new Mult();\n\t\t\tif (!raz) {\n\t\t\t\tthis.pile.push(valC);\n\t\t\t}\n\t\t\tint a = this.pile.pop(); int b = this.pile.pop();\n\t\t\tthis.valC = this.op.eval(b,a);\n\t\t\tthis.pile.push(this.valC);\n\t\t\tthis.raz = true;\n\t\t}\n\t\tcatch (EmptyStackException e) {\n\t\t\tSystem.out.println(\"Erreur de syntaxe : Saisir deux operandes avant de saisir un operateur\");\n\t\t}\n\t}", "public Transformation mult(Transformation a) {\n\t\tTransformation result = new Transformation();\n\t\tsuper.mult(a, result);\n\t\treturn result;\n\t}", "private void mul() {\n\n\t}", "@Override\n public Expression assign(String var, Expression expression) {\n Expression left = super.getLeft();\n Expression right = super.getRight();\n return new Mult(left.assign(var, expression), right.assign(var, expression));\n }", "public void multiply() {\n\t\t\n\t}", "public static double multi() {\n System.out.println(\"Enter multiplier\");\n double a = getNumber();\n System.out.println(\"Enter multiplicand\");\n double b = getNumber();\n\n return a * b;\n }", "@SuppressWarnings(\"unchecked\")\n @Override\n public Expression asExpression(Rule rule, Deque<Value<Expression>> args) {\n if (args.size() == 1) {\n // a single term is not a product\n return args.pollFirst().getTarget();\n } else {\n // assume x to be *x, because the product will start by 1*x\n Term<Multiplicative> factor = new Term<>(Multiplicative.MULT, args.removeFirst().getTarget());\n List<Term<Multiplicative>> arguments = new LinkedList<>();\n arguments.add(factor);\n args.stream()\n // next arguments are all Term<Multiplicative>\n .map(v -> (Term<Multiplicative>) v.getTarget())\n .forEachOrdered(arguments::add);\n return new Product(arguments);\n }\n }", "public static void main(String[] args) throws Exception {\r\n Expression e = new Plus(new Mult(2, \"x\"), new Plus(new Sin(new Mult(4, \"y\")), new Pow(\"e\", \"x\")));\r\n System.out.println(e);\r\n Map<String, Double> assignment = new TreeMap<String, Double>();\r\n assignment.put(\"x\", 2.0);\r\n assignment.put(\"y\", 0.25);\r\n assignment.put(\"e\", 2.71);\r\n System.out.println(e.evaluate(assignment));\r\n e = e.differentiate(\"x\");\r\n System.out.println(e);\r\n System.out.println(e.evaluate(assignment));\r\n System.out.println(e.simplify());\r\n System.out.println(e);\r\n }", "public BinMltLinExpr multiply(BinMltLinExpr expr) {\n\t\t\n\t\tBinMltLinExpr result = new BinMltLinExpr();\n\t\t\n\t\t// Multiply variables together\n\t\tfor (int i = 0; i < expr.termVars.size(); i++) {\n\t\t\tfor (int j = 0; j < termVars.size(); j++) {\n\t\t\t\t\n\t\t\t\tdouble newCoeff = expr.coefficients.get(i) * coefficients.get(j);\n\t\t\t\tList<BinVar> newVars = new ArrayList<BinVar>();\n\t\t\t\tnewVars.addAll(expr.termVars.get(i));\n\t\t\t\tnewVars.addAll(termVars.get(j));\n\t\t\t\t\n\t\t\t\tresult.addTerm(newCoeff, newVars);\n\t\t\t}\n\t\t}\n\n\t\t// Multiply variables with constants\n\t\tfor (int i = 0; i < termVars.size(); i++) {\n\t\t\tdouble newCoeff = coefficients.get(i) * expr.constant;\n\t\t\tresult.addTerm(newCoeff, termVars.get(i));\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < expr.termVars.size(); i++) {\n\t\t\tdouble newCoeff = expr.coefficients.get(i) * constant;\n\t\t\tresult.addTerm(newCoeff, expr.termVars.get(i));\n\t\t}\n\t\t\n\t\tresult.addConstant(constant*expr.constant);\n\t\t\n\t\treturn result;\n\t}", "public final VecMathParser.multExpr_return multExpr() throws RecognitionException {\n VecMathParser.multExpr_return retval = new VecMathParser.multExpr_return();\n retval.start = input.LT(1);\n\n Object root_0 = null;\n\n Token char_literal11=null;\n Token char_literal12=null;\n VecMathParser.primary_return primary10 = null;\n\n VecMathParser.primary_return primary13 = null;\n\n\n Object char_literal11_tree=null;\n Object char_literal12_tree=null;\n\n try {\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:5: ( primary ( ( '*' | '.' ) primary )* )\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:9: primary ( ( '*' | '.' ) primary )*\n {\n root_0 = (Object)adaptor.nil();\n\n pushFollow(FOLLOW_primary_in_multExpr145);\n primary10=primary();\n\n state._fsp--;\n\n adaptor.addChild(root_0, primary10.getTree());\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:17: ( ( '*' | '.' ) primary )*\n loop5:\n do {\n int alt5=2;\n int LA5_0 = input.LA(1);\n\n if ( ((LA5_0>=11 && LA5_0<=12)) ) {\n alt5=1;\n }\n\n\n switch (alt5) {\n \tcase 1 :\n \t // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:18: ( '*' | '.' ) primary\n \t {\n \t // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:18: ( '*' | '.' )\n \t int alt4=2;\n \t int LA4_0 = input.LA(1);\n\n \t if ( (LA4_0==11) ) {\n \t alt4=1;\n \t }\n \t else if ( (LA4_0==12) ) {\n \t alt4=2;\n \t }\n \t else {\n \t NoViableAltException nvae =\n \t new NoViableAltException(\"\", 4, 0, input);\n\n \t throw nvae;\n \t }\n \t switch (alt4) {\n \t case 1 :\n \t // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:19: '*'\n \t {\n \t char_literal11=(Token)match(input,11,FOLLOW_11_in_multExpr149); \n \t char_literal11_tree = (Object)adaptor.create(char_literal11);\n \t root_0 = (Object)adaptor.becomeRoot(char_literal11_tree, root_0);\n\n\n \t }\n \t break;\n \t case 2 :\n \t // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:24: '.'\n \t {\n \t char_literal12=(Token)match(input,12,FOLLOW_12_in_multExpr152); \n \t char_literal12_tree = (Object)adaptor.create(char_literal12);\n \t root_0 = (Object)adaptor.becomeRoot(char_literal12_tree, root_0);\n\n\n \t }\n \t break;\n\n \t }\n\n \t pushFollow(FOLLOW_primary_in_multExpr156);\n \t primary13=primary();\n\n \t state._fsp--;\n\n \t adaptor.addChild(root_0, primary13.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop5;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (Object)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "@Override\n\tpublic void visit(MultiplyNode node) {\n\t\tif (Evaluator.checkScope(node) == false) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (Evaluator.checkAssert(node) == false) {\n\t\t\treturn;\n\t\t}\n\n\t\t/**\n\t\t * evaluam cei doi fii\n\t\t */\n\t\tEvaluator.evaluate(node.getChild(0));\n\t\tEvaluator.evaluate(node.getChild(1));\n\n\t\tInteger i, j;\n\t\t/**\n\t\t * salvam si inmultim valorile rezulate in urma evaluarii celor 2 fii si\n\t\t * setam valoarea corespunzatoare in nodul curent\n\t\t */\n\t\tif (node.getChild(1) instanceof Variable) {\n\t\t\ti = Integer.parseInt(Evaluator.variables.get(node.getChild(1).getName()));\n\n\t\t} else {\n\t\t\ti = Integer.parseInt(node.getChild(1).getName());\n\t\t}\n\n\t\tif (node.getChild(0) instanceof Variable) {\n\t\t\tj = Integer.parseInt(Evaluator.variables.get(node.getChild(0).getName()));\n\n\t\t} else {\n\t\t\tj = Integer.parseInt(node.getChild(0).getName());\n\t\t}\n\n\t\tInteger n = i * j;\n\n\t\tnode.setName(n.toString());\n\t}", "static Double executeMultiplication(List<Double> operands) {\n Double result = null;\n for (Double operand : operands) {\n if (Objects.isNull(result)) {\n result = operand;\n }\n else {\n result = result * operand;\n }\n }\n return result;\n }", "public Polynomial visit(ProductExpression expression) {\n return Polynomial.multiply(\n expression.getLeft().accept(this),\n expression.getRight().accept(this));\n }", "BaseNumber multiply(BaseNumber operand);", "public final Expr multExpr() throws RecognitionException {\n\t\tExpr e = null;\n\n\n\t\tToken STAR15=null;\n\t\tExpr e1 =null;\n\t\tExpr e2 =null;\n\n\n\t\t\t\tExpr it = null;\n\t\t\t\n\t\ttry {\n\t\t\t// ul.g:189:3: (e1= atom ( STAR e2= atom )* )\n\t\t\t// ul.g:190:2: e1= atom ( STAR e2= atom )*\n\t\t\t{\n\t\t\tpushFollow(FOLLOW_atom_in_multExpr768);\n\t\t\te1=atom();\n\t\t\tstate._fsp--;\n\t\t\tif (state.failed) return e;\n\t\t\tif ( state.backtracking==0 ) {it = e1;}\n\t\t\t// ul.g:191:2: ( STAR e2= atom )*\n\t\t\tloop15:\n\t\t\twhile (true) {\n\t\t\t\tint alt15=2;\n\t\t\t\tint LA15_0 = input.LA(1);\n\t\t\t\tif ( (LA15_0==STAR) ) {\n\t\t\t\t\talt15=1;\n\t\t\t\t}\n\n\t\t\t\tswitch (alt15) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// ul.g:191:4: STAR e2= atom\n\t\t\t\t\t{\n\t\t\t\t\tSTAR15=(Token)match(input,STAR,FOLLOW_STAR_in_multExpr775); if (state.failed) return e;\n\t\t\t\t\tpushFollow(FOLLOW_atom_in_multExpr781);\n\t\t\t\t\te2=atom();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return e;\n\t\t\t\t\tif ( state.backtracking==0 ) {it = new MultExpr(it, e2, (STAR15!=null?STAR15.getLine():0), STAR15.getCharPositionInLine());}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault :\n\t\t\t\t\tbreak loop15;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( state.backtracking==0 ) {\n\t\t\t\t\te = it;\n\t\t\t\t}\n\t\t}\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\trecover(input,re);\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn e;\n\t}", "public T mul(T first, T second);", "public final double expr() throws RecognitionException {\n double value = 0.0;\n\n\n double e =0.0;\n\n\n try {\n // ExprInterp.g:24:5: (e= multExpr ( '+' e= multExpr | '-' e= multExpr )* |e= maxF )\n int alt4=2;\n int LA4_0 = input.LA(1);\n\n if ( ((LA4_0 >= ID && LA4_0 <= LEFTP)||LA4_0==REL) ) {\n alt4=1;\n }\n else if ( (LA4_0==MAXI) ) {\n alt4=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 4, 0, input);\n\n throw nvae;\n\n }\n switch (alt4) {\n case 1 :\n // ExprInterp.g:24:9: e= multExpr ( '+' e= multExpr | '-' e= multExpr )*\n {\n pushFollow(FOLLOW_multExpr_in_expr155);\n e=multExpr();\n\n state._fsp--;\n\n\n value = e;\n\n // ExprInterp.g:25:9: ( '+' e= multExpr | '-' e= multExpr )*\n loop3:\n do {\n int alt3=3;\n int LA3_0 = input.LA(1);\n\n if ( (LA3_0==13) ) {\n alt3=1;\n }\n else if ( (LA3_0==15) ) {\n alt3=2;\n }\n\n\n switch (alt3) {\n \tcase 1 :\n \t // ExprInterp.g:25:13: '+' e= multExpr\n \t {\n \t match(input,13,FOLLOW_13_in_expr171); \n\n \t pushFollow(FOLLOW_multExpr_in_expr175);\n \t e=multExpr();\n\n \t state._fsp--;\n\n\n \t value += e;\n\n \t }\n \t break;\n \tcase 2 :\n \t // ExprInterp.g:26:13: '-' e= multExpr\n \t {\n \t match(input,15,FOLLOW_15_in_expr191); \n\n \t pushFollow(FOLLOW_multExpr_in_expr195);\n \t e=multExpr();\n\n \t state._fsp--;\n\n\n \t value -= e;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop3;\n }\n } while (true);\n\n\n }\n break;\n case 2 :\n // ExprInterp.g:28:8: e= maxF\n {\n pushFollow(FOLLOW_maxF_in_expr221);\n e=maxF();\n\n state._fsp--;\n\n\n value = e;\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n\n finally {\n \t// do for sure before leaving\n }\n return value;\n }", "public final void mul() {\n\t\tif (size > 1) {\n\n\t\t\tdouble topMostValue = pop();\n\t\t\tdouble secondTopMostValue = pop();\n\t\t\tpush(secondTopMostValue * topMostValue);\n\t\t}\n\t}", "public Mult(String left, double right) {\n super(left, right);\n }", "public static Transform mult(Transform t1, Transform t2) {\n\t\treturn transpose(t1.a * t2.a + t1.c * t2.b, t1.a * t2.c + t1.c * t2.d, t1.a * t2.tx + t1.c * t2.ty + t1.tx,\n\t\t\t\t\t\t t1.b * t2.a + t1.d * t2.b, t1.b * t2.c + t1.d * t2.d, t1.b * t2.tx + t1.d * t2.ty + t1.ty);\n\t}", "private void multiplication()\n\t{\n\t\tFun = Function.MULTIPLY; //Function set to determine what action should be taken later.\n\t\t\n\t\t\tsetLeftValue();\n\t\t\tentry.grabFocus();\n\t\t\n\t}", "public int mult()\r\n\t{\r\n\t\tint a=10;\r\n\t\tint b=20;\r\n\t\tint c = a*b;\r\n\t\treturn(c);\r\n\t}", "public Object visitMultiplicativeExpression(GNode n) {\n Object a, b, result;\n String op;\n \n nonboolean = true;\n \n dostring = true;\n \n a = dispatch(n.getGeneric(0));\n b = dispatch(n.getGeneric(2));\n op = n.getString(1);\n \n dostring = false;\n \n if (a instanceof Long && b instanceof Long) {\n if ((op.equals(\"/\")\n || op.equals(\"%\")) && ((Long) b).equals(new Long(0))) {\n System.err.println(\"division by zero in #if\");\n result = new Long(0);\n }\n if (op.equals(\"*\")) {\n result = (Long) a * (Long) b;\n }\n else if (op.equals(\"/\")) {\n result = (Long) a / (Long) b;\n }\n else if (op.equals(\"%\")) {\n result = (Long) a % (Long) b;\n }\n else {\n result = \"\";\n }\n }\n else {\n result = parens(a) + \" \" + op + \" \" + parens(b);\n }\n \n return result;\n }", "public static BinaryExpression multiply(Expression expression0, Expression expression1) {\n return makeBinary(ExpressionType.Multiply, expression0, expression1);\n }", "public T elementMult( T b ) {\n convertType.specify(this, b);\n T A = convertType.convert(this);\n b = convertType.convert(b);\n\n T c = A.createLike();\n A.ops.elementMult(A.mat, b.mat, c.mat);\n return c;\n }", "public Mult(double left, String right) {\n super(left, right);\n }", "public final expressionParser.add_return add() throws RecognitionException {\n expressionParser.add_return retval = new expressionParser.add_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n Token char_literal38=null;\n Token char_literal39=null;\n expressionParser.mult_return mult37 = null;\n\n expressionParser.mult_return mult40 = null;\n\n\n CommonTree char_literal38_tree=null;\n CommonTree char_literal39_tree=null;\n\n try {\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:3: ( mult ( ( '+' | '-' ) mult )* )\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:5: mult ( ( '+' | '-' ) mult )*\n {\n root_0 = (CommonTree)adaptor.nil();\n\n pushFollow(FOLLOW_mult_in_add424);\n mult37=mult();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, mult37.getTree());\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:10: ( ( '+' | '-' ) mult )*\n loop17:\n do {\n int alt17=2;\n alt17 = dfa17.predict(input);\n switch (alt17) {\n \tcase 1 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:11: ( '+' | '-' ) mult\n \t {\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:11: ( '+' | '-' )\n \t int alt16=2;\n \t int LA16_0 = input.LA(1);\n\n \t if ( (LA16_0==46) ) {\n \t alt16=1;\n \t }\n \t else if ( (LA16_0==47) ) {\n \t alt16=2;\n \t }\n \t else {\n \t if (state.backtracking>0) {state.failed=true; return retval;}\n \t NoViableAltException nvae =\n \t new NoViableAltException(\"\", 16, 0, input);\n\n \t throw nvae;\n \t }\n \t switch (alt16) {\n \t case 1 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:12: '+'\n \t {\n \t char_literal38=(Token)match(input,46,FOLLOW_46_in_add428); if (state.failed) return retval;\n \t if ( state.backtracking==0 ) {\n \t char_literal38_tree = (CommonTree)adaptor.create(char_literal38);\n \t root_0 = (CommonTree)adaptor.becomeRoot(char_literal38_tree, root_0);\n \t }\n\n \t }\n \t break;\n \t case 2 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:19: '-'\n \t {\n \t char_literal39=(Token)match(input,47,FOLLOW_47_in_add433); if (state.failed) return retval;\n \t if ( state.backtracking==0 ) {\n \t char_literal39_tree = (CommonTree)adaptor.create(char_literal39);\n \t root_0 = (CommonTree)adaptor.becomeRoot(char_literal39_tree, root_0);\n \t }\n\n \t }\n \t break;\n\n \t }\n\n \t pushFollow(FOLLOW_mult_in_add437);\n \t mult40=mult();\n\n \t state._fsp--;\n \t if (state.failed) return retval;\n \t if ( state.backtracking==0 ) adaptor.addChild(root_0, mult40.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop17;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "public Double eval(Double... operands);", "public <V extends Number> FluentExp<V> times (SQLExpression<V> expr)\n {\n return new Mul<V>(this, expr);\n }", "public static MathNode create(List<MathNode> nodes) {\n return new PowerNode(nodes);\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"MULT\";\n\t}", "NumericExpression createNumericExpression();", "abstract void mulS();", "public final expressionParser.mult_return mult() throws RecognitionException {\n expressionParser.mult_return retval = new expressionParser.mult_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n Token char_literal42=null;\n Token char_literal43=null;\n expressionParser.unary_return unary41 = null;\n\n expressionParser.unary_return unary44 = null;\n\n\n CommonTree char_literal42_tree=null;\n CommonTree char_literal43_tree=null;\n\n try {\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:3: ( unary ( ( '*' | '/' ) unary )* )\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:5: unary ( ( '*' | '/' ) unary )*\n {\n root_0 = (CommonTree)adaptor.nil();\n\n pushFollow(FOLLOW_unary_in_mult454);\n unary41=unary();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, unary41.getTree());\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:11: ( ( '*' | '/' ) unary )*\n loop19:\n do {\n int alt19=2;\n int LA19_0 = input.LA(1);\n\n if ( ((LA19_0>=48 && LA19_0<=49)) ) {\n alt19=1;\n }\n\n\n switch (alt19) {\n \tcase 1 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:12: ( '*' | '/' ) unary\n \t {\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:12: ( '*' | '/' )\n \t int alt18=2;\n \t int LA18_0 = input.LA(1);\n\n \t if ( (LA18_0==48) ) {\n \t alt18=1;\n \t }\n \t else if ( (LA18_0==49) ) {\n \t alt18=2;\n \t }\n \t else {\n \t if (state.backtracking>0) {state.failed=true; return retval;}\n \t NoViableAltException nvae =\n \t new NoViableAltException(\"\", 18, 0, input);\n\n \t throw nvae;\n \t }\n \t switch (alt18) {\n \t case 1 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:13: '*'\n \t {\n \t char_literal42=(Token)match(input,48,FOLLOW_48_in_mult458); if (state.failed) return retval;\n \t if ( state.backtracking==0 ) {\n \t char_literal42_tree = (CommonTree)adaptor.create(char_literal42);\n \t root_0 = (CommonTree)adaptor.becomeRoot(char_literal42_tree, root_0);\n \t }\n\n \t }\n \t break;\n \t case 2 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:20: '/'\n \t {\n \t char_literal43=(Token)match(input,49,FOLLOW_49_in_mult463); if (state.failed) return retval;\n \t if ( state.backtracking==0 ) {\n \t char_literal43_tree = (CommonTree)adaptor.create(char_literal43);\n \t root_0 = (CommonTree)adaptor.becomeRoot(char_literal43_tree, root_0);\n \t }\n\n \t }\n \t break;\n\n \t }\n\n \t pushFollow(FOLLOW_unary_in_mult467);\n \t unary44=unary();\n\n \t state._fsp--;\n \t if (state.failed) return retval;\n \t if ( state.backtracking==0 ) adaptor.addChild(root_0, unary44.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop19;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "public final Expr addExpr() throws RecognitionException {\r\n Expr result = null;\r\n\r\n int addExpr_StartIndex = input.index();\r\n\r\n Token op=null;\r\n Expr lhs =null;\r\n\r\n Expr rhs =null;\r\n\r\n\r\n try {\r\n if ( state.backtracking>0 && alreadyParsedRule(input, 15) ) { return result; }\r\n\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:121:5: (lhs= mulExpr (op= ( '+' | '-' ) rhs= mulExpr )* )\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:121:9: lhs= mulExpr (op= ( '+' | '-' ) rhs= mulExpr )*\r\n {\r\n pushFollow(FOLLOW_mulExpr_in_addExpr674);\r\n lhs=mulExpr();\r\n\r\n state._fsp--;\r\n if (state.failed) return result;\r\n\r\n if ( state.backtracking==0 ) { result =lhs; }\r\n\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:121:46: (op= ( '+' | '-' ) rhs= mulExpr )*\r\n loop10:\r\n do {\r\n int alt10=2;\r\n int LA10_0 = input.LA(1);\r\n\r\n if ( ((LA10_0 >= 24 && LA10_0 <= 25)) ) {\r\n alt10=1;\r\n }\r\n\r\n\r\n switch (alt10) {\r\n \tcase 1 :\r\n \t // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:121:48: op= ( '+' | '-' ) rhs= mulExpr\r\n \t {\r\n \t op=(Token)input.LT(1);\r\n\r\n \t if ( (input.LA(1) >= 24 && input.LA(1) <= 25) ) {\r\n \t input.consume();\r\n \t state.errorRecovery=false;\r\n \t state.failed=false;\r\n \t }\r\n \t else {\r\n \t if (state.backtracking>0) {state.failed=true; return result;}\r\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\r\n \t throw mse;\r\n \t }\r\n\r\n\r\n \t pushFollow(FOLLOW_mulExpr_in_addExpr692);\r\n \t rhs=mulExpr();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return result;\r\n\r\n \t if ( state.backtracking==0 ) { \r\n \t if ((op!=null?op.getText():null).equals(\"+\")) {\r\n \t result = new Add(result, rhs);\r\n \t }\r\n \t if ((op!=null?op.getText():null).equals(\"-\")) {\r\n \t result = new Sub(result, rhs); \r\n \t }\r\n \t }\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop10;\r\n }\r\n } while (true);\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n if ( state.backtracking>0 ) { memoize(input, 15, addExpr_StartIndex); }\r\n\r\n }\r\n return result;\r\n }", "public static double multi(double a, double b) {\n return a * b;\n }", "@Test\n public void testParseMul() {\n System.out.println(\"testParseMul\");\n byte[] expected = {\n Instruction.LV.getId(), 0, 0, 32,\n Instruction.LV.getId(), 0, 0, 36,\n Instruction.MUL.getId(),\n Instruction.LV.getId(), 0, 0, 40,\n Instruction.MUL.getId()\n };\n\n TermParser p = TermParserTestSetup.getMulTermSetup();\n assertEquals(\"Parse\", true, p.parse());\n AssemblerCodeChecker.assertCodeEquals(\"Code \", expected, TermParserTestSetup.getByteCode());\n }", "@Override\n public Expression simplifyMore() {\n Expression left = super.getLeft();\n Expression right = super.getRight();\n\n // x * x -> x^2\n if (left.toString().equals(right.toString())) {\n return new Pow(left, 2);\n }\n\n // ((2.0 * x) * (x * 3.0)) -> 6x^2\n if (left instanceof Mult && right instanceof Mult) {\n if (((Mult) left).getRight().toString().equals(((Mult) right).getLeft().toString())) {\n Expression exp = new Mult(new Mult(((Mult) left).getLeft(), ((Mult) right).getRight()),\n new Mult(((Mult) left).getRight(), ((Mult) right).getLeft()));\n exp.turnBonusOn();\n return exp.simplify();\n }\n }\n\n // 2x * 2x -> 4x^2\n if (left instanceof Mult && right instanceof Mult) {\n if (((Mult) left).getRight().toString().equals(((Mult) right).getRight().toString())) {\n return new Mult(new Mult(((Mult) left).getLeft(), ((Mult) right).getLeft()).simplify(),\n new Pow(((Mult) left).getRight(), 2)).simplify();\n }\n }\n\n // 2x * 2y -> 4xy\n if (left instanceof Mult && right instanceof Mult) {\n return new Mult(new Mult(((Mult) left).getLeft(), ((Mult) right).getLeft()).simplify(),\n new Mult(((Mult) left).getRight(), ((Mult) right).getRight())).simplify();\n }\n\n // sin(x) * cos(x) -> 0.5 * sin(2x)\n if (right instanceof Sin && left instanceof Cos) {\n Expression exp = new Mult(0.5, new Sin(new Mult(2, ((Sin) right).getExpression())));\n exp.turnBonusOn();\n return exp.simplify();\n }\n\n // cos(x) * sin(x) -> 0.5 * sin(2x)\n if (right instanceof Cos && left instanceof Sin) {\n Expression exp = new Sin(new Mult(2, ((Cos) right).getExpression()));\n exp.turnBonusOn();\n return exp.simplify();\n }\n\n // log(x, y) * 2 -> 2 * log(x, y)\n if (left instanceof Sin || left instanceof Cos || left instanceof Log) {\n Expression exp = new Mult(right, left);\n exp.turnBonusOn();\n return exp.simplify();\n }\n\n // x^2 * x^3 -> x^5\n if (left instanceof Pow && right instanceof Pow) {\n if (((Pow) left).getLeft().toString().equals(((Pow) right).getLeft().toString())) {\n Expression exp = new Pow(((Pow) left).getLeft(),\n new Plus(((Pow) left).getRight(), ((Pow) right).getRight()));\n exp.turnBonusOn();\n return exp.simplify();\n }\n }\n\n // x^2 * x -> x^3\n if (left instanceof Pow) {\n if (((Pow) left).getLeft().toString().equals(right.toString())) {\n Expression exp = new Pow(((Pow) left).getLeft(), new Plus(((Pow) left).getRight(), 1));\n exp.turnBonusOn();\n return exp.simplify();\n }\n }\n\n return this;\n }", "IVec3 mult(IVec3 v);", "private Term parseMul(final boolean required) throws ParseException {\n Term t1 = parseUnary(required);\n while (t1 != null) {\n int tt = _tokenizer.next();\n if (tt == '*') {\n Term t2 = parseUnary(true);\n if (t1.isD() && t2.isN() || t1.isN() && t2.isD()) {\n t1 = new Term.Mul(Term.TYPE_D, t1, t2);\n } else if (t1.isI() && t2.isI()) {\n t1 = new Term.Mul(Term.TYPE_I, t1, t2);\n } else if (!isTypeChecking()) {\n t1 = new Term.Mul(t1.isD() || t2.isD() ? Term.TYPE_D : Term.TYPE_I, t1, t2);\n } else {\n reportTypeErrorN2(\"'*'\");\n }\n } else if (tt == '/') {\n Term t2 = parseUnary(true);\n if (t1.isD() && t2.isN() || t1.isN() && t2.isD()) {\n t1 = new Term.Div(Term.TYPE_D, t1, t2);\n } else if (t1.isI() && t2.isI()) {\n t1 = new Term.Div(Term.TYPE_I, t1, t2);\n } else if (!isTypeChecking()) {\n t1 = new Term.Div(t1.isD() || t2.isD() ? Term.TYPE_D : Term.TYPE_I, t1, t2);\n } else {\n reportTypeErrorN2(\"'/'\");\n }\n } else if (tt == '%') {\n Term t2 = parseUnary(true);\n if (t1.isD() && t2.isN() || t1.isN() && t2.isD()) {\n t1 = new Term.Mod(Term.TYPE_D, t1, t2);\n } else if (t1.isI() && t2.isI()) {\n t1 = new Term.Mod(Term.TYPE_I, t1, t2);\n } else if (!isTypeChecking()) {\n t1 = new Term.Mod(t1.isD() || t2.isD() ? Term.TYPE_D : Term.TYPE_I, t1, t2);\n } else {\n reportTypeErrorN2(\"'%'\");\n }\n } else {\n _tokenizer.pushBack();\n break;\n }\n }\n return t1;\n }", "public void multiply()\r\n {\r\n resultDoubles = Operations.multiply(leftOperand, rightOperand);\r\n resultResetHelper();\r\n }", "public Mult(String left, String right) {\n super(left, right);\n }", "public Mult(double left, double right) {\n super(left, right);\n }", "public Multiplication(Expression l, Expression r) {\n\tleft = l;\n\tright = r;\n }", "public AncientEgyptianMultiplication( ) {\r\n }", "abstract int multiplication(int num1, int num2);", "public void testMultiply() {\r\n System.out.println(\"Multiply\");\r\n Double [][] n = new Double[][]{{-3., -2.5, -1., 0., 1., 2., 3.4, 3.5, 1.1E100, -1.1E100}, \r\n {-3., 2.5, 0., 0., 1., -2., 3., 3.7, 1.1E100, 1.1E100}, \r\n {9., -6.25, 0., 0., 1., -4., 10.2, 12.95, 1.21E200, -1.21E200}};\r\n for(int i = 0; i < 10; i++){\r\n Double x = n[0][i];\r\n Double y = n[1][i];\r\n double expResult = n[2][i];\r\n double result = MathOp.Multiply(x, y);\r\n assertEquals(expResult, result, 0.001);\r\n }\r\n }", "@Override\n public Expression differentiate(String var) {\n Expression left = super.getLeft();\n Expression right = super.getRight();\n return new Plus(new Mult(left.differentiate(var), right), new Mult(left, right.differentiate(var)));\n }", "public final Expr addExpr() throws RecognitionException {\n\t\tExpr e = null;\n\n\n\t\tToken PLUS13=null;\n\t\tToken MINUS14=null;\n\t\tExpr e1 =null;\n\t\tExpr e2 =null;\n\n\n\t\t\t\tExpr it = null;\n\t\t\t\tBoolean bool = false;\n\t\t\t\tint line = -1;\n\t\t\t\tint offset = -1;\n\t\t\t\n\t\ttry {\n\t\t\t// ul.g:173:2: (e1= multExpr ( ( PLUS | MINUS ) e2= multExpr )* )\n\t\t\t// ul.g:174:3: e1= multExpr ( ( PLUS | MINUS ) e2= multExpr )*\n\t\t\t{\n\t\t\tpushFollow(FOLLOW_multExpr_in_addExpr710);\n\t\t\te1=multExpr();\n\t\t\tstate._fsp--;\n\t\t\tif (state.failed) return e;\n\t\t\tif ( state.backtracking==0 ) {it = e1;}\n\t\t\t// ul.g:175:3: ( ( PLUS | MINUS ) e2= multExpr )*\n\t\t\tloop14:\n\t\t\twhile (true) {\n\t\t\t\tint alt14=2;\n\t\t\t\tint LA14_0 = input.LA(1);\n\t\t\t\tif ( (LA14_0==MINUS||LA14_0==PLUS) ) {\n\t\t\t\t\talt14=1;\n\t\t\t\t}\n\n\t\t\t\tswitch (alt14) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// ul.g:175:4: ( PLUS | MINUS ) e2= multExpr\n\t\t\t\t\t{\n\t\t\t\t\t// ul.g:175:4: ( PLUS | MINUS )\n\t\t\t\t\tint alt13=2;\n\t\t\t\t\tint LA13_0 = input.LA(1);\n\t\t\t\t\tif ( (LA13_0==PLUS) ) {\n\t\t\t\t\t\talt13=1;\n\t\t\t\t\t}\n\t\t\t\t\telse if ( (LA13_0==MINUS) ) {\n\t\t\t\t\t\talt13=2;\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (state.backtracking>0) {state.failed=true; return e;}\n\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\tnew NoViableAltException(\"\", 13, 0, input);\n\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t}\n\n\t\t\t\t\tswitch (alt13) {\n\t\t\t\t\t\tcase 1 :\n\t\t\t\t\t\t\t// ul.g:175:5: PLUS\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tPLUS13=(Token)match(input,PLUS,FOLLOW_PLUS_in_addExpr718); if (state.failed) return e;\n\t\t\t\t\t\t\tif ( state.backtracking==0 ) {line = (PLUS13!=null?PLUS13.getLine():0); offset = PLUS13.getCharPositionInLine();}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2 :\n\t\t\t\t\t\t\t// ul.g:175:70: MINUS\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tMINUS14=(Token)match(input,MINUS,FOLLOW_MINUS_in_addExpr721); if (state.failed) return e;\n\t\t\t\t\t\t\tif ( state.backtracking==0 ) {line = (MINUS14!=null?MINUS14.getLine():0); offset = MINUS14.getCharPositionInLine();}\n\t\t\t\t\t\t\tif ( state.backtracking==0 ) {bool = true;}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tpushFollow(FOLLOW_multExpr_in_addExpr730);\n\t\t\t\t\te2=multExpr();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return e;\n\t\t\t\t\tif ( state.backtracking==0 ) {it = new AddExpr(it, e2, bool, line, offset);}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault :\n\t\t\t\t\tbreak loop14;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( state.backtracking==0 ) {\n\t\t\t\t\te = it;\n\t\t\t\t}\n\t\t}\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\trecover(input,re);\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn e;\n\t}", "public static void main(String[] args) {\n NumberFact a, b;\n a = new NumberFact(1_000);\n b = new NumberFact(999);\n\n ArithmeticOperator x, y;\n x = new ArithmeticOperator('*', a, b);\n y = new ArithmeticOperator('+', x, b);\n\n System.out.println(y);\n System.out.println(y.eval());\n }", "private void createMul(Code32 code, int op, int cond, int Rd, int Rn, int Rm) {\r\n\t\tcode.instructions[code.iCount] = (cond << 28) | op | (Rd << 16) | (Rm << 8) | (0x9 << 4) | Rn;\r\n\t\tcode.incInstructionNum();\r\n\t}", "public static BinaryExpression multiplyAssign(Expression expression0, Expression expression1) {\n return makeBinary(ExpressionType.MultiplyAssign, expression0, expression1);\n }", "LengthScalarMultiply createLengthScalarMultiply();", "public final CQLParser.multiplicativeExpression_return multiplicativeExpression() throws RecognitionException {\n CQLParser.multiplicativeExpression_return retval = new CQLParser.multiplicativeExpression_return();\n retval.start = input.LT(1);\n\n Object root_0 = null;\n\n Token set100=null;\n CQLParser.powerExpression_return powerExpression99 = null;\n\n CQLParser.powerExpression_return powerExpression101 = null;\n\n\n Object set100_tree=null;\n\n try {\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:404:2: ( powerExpression ( ( MULT | DIV ) powerExpression )* )\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:404:4: powerExpression ( ( MULT | DIV ) powerExpression )*\n {\n root_0 = (Object)adaptor.nil();\n\n pushFollow(FOLLOW_powerExpression_in_multiplicativeExpression1886);\n powerExpression99=powerExpression();\n\n state._fsp--;\n\n adaptor.addChild(root_0, powerExpression99.getTree());\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:404:20: ( ( MULT | DIV ) powerExpression )*\n loop27:\n do {\n int alt27=2;\n int LA27_0 = input.LA(1);\n\n if ( ((LA27_0>=MULT && LA27_0<=DIV)) ) {\n alt27=1;\n }\n\n\n switch (alt27) {\n \tcase 1 :\n \t // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:404:21: ( MULT | DIV ) powerExpression\n \t {\n \t set100=(Token)input.LT(1);\n \t set100=(Token)input.LT(1);\n \t if ( (input.LA(1)>=MULT && input.LA(1)<=DIV) ) {\n \t input.consume();\n \t root_0 = (Object)adaptor.becomeRoot((Object)adaptor.create(set100), root_0);\n \t state.errorRecovery=false;\n \t }\n \t else {\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t throw mse;\n \t }\n\n \t pushFollow(FOLLOW_powerExpression_in_multiplicativeExpression1896);\n \t powerExpression101=powerExpression();\n\n \t state._fsp--;\n\n \t adaptor.addChild(root_0, powerExpression101.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop27;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (Object)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n \t\n \tcatch(RecognitionException re)\n \t{\t\n \t\treportError(re);\n \t\tthrow re;\n \t}\n finally {\n }\n return retval;\n }", "Sum getMultiplier();", "public MathEval() {\r\n super();\r\n\r\n constants=new TreeMap<String,Double>(String.CASE_INSENSITIVE_ORDER);\r\n setConstant(\"E\" ,Math.E);\r\n setConstant(\"Euler\" ,0.577215664901533D);\r\n setConstant(\"LN2\" ,0.693147180559945D);\r\n setConstant(\"LN10\" ,2.302585092994046D);\r\n setConstant(\"LOG2E\" ,1.442695040888963D);\r\n setConstant(\"LOG10E\",0.434294481903252D);\r\n setConstant(\"PHI\" ,1.618033988749895D);\r\n setConstant(\"PI\" ,Math.PI);\r\n\r\n variables=new TreeMap<String,Double>(String.CASE_INSENSITIVE_ORDER);\r\n\r\n functions=new TreeMap<String,FunctionHandler>(String.CASE_INSENSITIVE_ORDER);\r\n\r\n offset=0;\r\n isConstant=false;\r\n }", "private ASTNode binaryMultiplyRules(ASTNode left, ASTNode right) throws Exception {\n Token leftToken = left.getToken();\n Token rightToken = right.getToken();\n\n TokenType leftType = leftToken.getType();\n TokenType rightType = rightToken.getType();\n\n Token tempToken;\n TokenType numType = TokenType.NUMBER;\n TokenType minusType = TokenType.MINUS;\n TokenType mulType = TokenType.MUL;\n\n if (rightToken.getIdentifier().equals(\"0\")){\n //left is anything and right is 0\n tempToken = new Token(numType, \"0\");\n return new Num(tempToken);\n }\n else if (rightToken.getIdentifier().equals(\"1\")){\n //left is anything and right is 1\n return left;\n }\n else if (leftToken.getIdentifier().equals(\"0\")){\n //left is 0 and right is anything\n tempToken = new Token(numType, \"0\");\n return new Num(tempToken);\n }\n else if (leftToken.getIdentifier().equals(\"1\")){\n //left is 1 and right is anything\n return right;\n }\n else if(patternMatcher(leftType, rightType, numType, numType)){\n Double leftVal = Double.parseDouble(leftToken.getIdentifier());\n Double rightVal = Double.parseDouble(rightToken.getIdentifier());\n\n String prod = String.valueOf(leftVal * rightVal);\n tempToken = new Token(numType, prod);\n return new Num(tempToken);\n }\n else if (patternMatcher(leftType, rightType, minusType, minusType)){\n if (left instanceof UnaryOP && right instanceof UnaryOP){\n tempToken = new Token(mulType);\n ASTNode leftOP = ((UnaryOP) left).getOperand();\n ASTNode rightOp = ((UnaryOP) right).getOperand();\n return new BinaryOp(tempToken, leftOP, rightOp);\n }\n }\n tempToken = new Token(mulType);\n return new BinaryOp(tempToken ,left, right);\n }", "public static Rational multiply(Rational num1, Rational num2){\r\n Rational product = new Rational();\r\n \r\n // multiply throughout\r\n product.denominator = num1.getDenominator() * num2.getDenominator();\r\n product.numerator = num1.getNumerator() * num2.getNumerator();\r\n \r\n product.reduce();\r\n return product;\r\n }", "Matrix scalarMult(double x){\n int newMatrixSize = this.getSize();\n Matrix newM = new Matrix(newMatrixSize);\n for(int i = 1; i <= newMatrixSize; i++){\n List itRow = rows[i - 1];\n itRow.moveFront();\n while(itRow.index() != -1){\n Entry c = (Entry)itRow.get();\n newM.changeEntry(i, c.column, (x*c.value));\n itRow.moveNext();\n }\n }\n\n return newM;\n }", "@Override\n\tpublic Instruction parse(String[] s) throws WrongInstructionFormatException {\n\t\tif (s.length==1 && s[0].equalsIgnoreCase(\"mult\")) \n\t\t\treturn new Mult();\n\t\telse throw new WrongInstructionFormatException();\n\t}", "@Override\n public InterpreterValue mul(InterpreterValue v) {\n\n // If the given value is a IntegerValue create a new DoubleValue from\n // the multiplication-result\n if(v instanceof IntegerValue) return new DoubleValue(getValue() * ((IntegerValue) v).getValue());\n\n // If the given value is a DoubleValue create a new DoubleValue from\n // the multiplication-result\n if(v instanceof DoubleValue) return new DoubleValue(getValue() * ((DoubleValue) v).getValue());\n\n // In other case just throw an error\n throw new Error(\"Operator '*' is not defined for type double and \" + v.getName());\n\n }", "public final Expr mulExpr() throws RecognitionException {\r\n Expr result = null;\r\n\r\n int mulExpr_StartIndex = input.index();\r\n\r\n Token op=null;\r\n Expr lhs =null;\r\n\r\n Expr rhs =null;\r\n\r\n\r\n try {\r\n if ( state.backtracking>0 && alreadyParsedRule(input, 14) ) { return result; }\r\n\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:108:5: (lhs= unExpr (op= ( '*' | '/' ) rhs= unExpr )* )\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:108:9: lhs= unExpr (op= ( '*' | '/' ) rhs= unExpr )*\r\n {\r\n pushFollow(FOLLOW_unExpr_in_mulExpr613);\r\n lhs=unExpr();\r\n\r\n state._fsp--;\r\n if (state.failed) return result;\r\n\r\n if ( state.backtracking==0 ) { result =lhs; }\r\n\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:108:45: (op= ( '*' | '/' ) rhs= unExpr )*\r\n loop9:\r\n do {\r\n int alt9=2;\r\n int LA9_0 = input.LA(1);\r\n\r\n if ( (LA9_0==23||LA9_0==26) ) {\r\n alt9=1;\r\n }\r\n\r\n\r\n switch (alt9) {\r\n \tcase 1 :\r\n \t // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:108:47: op= ( '*' | '/' ) rhs= unExpr\r\n \t {\r\n \t op=(Token)input.LT(1);\r\n\r\n \t if ( input.LA(1)==23||input.LA(1)==26 ) {\r\n \t input.consume();\r\n \t state.errorRecovery=false;\r\n \t state.failed=false;\r\n \t }\r\n \t else {\r\n \t if (state.backtracking>0) {state.failed=true; return result;}\r\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\r\n \t throw mse;\r\n \t }\r\n\r\n\r\n \t pushFollow(FOLLOW_unExpr_in_mulExpr633);\r\n \t rhs=unExpr();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return result;\r\n\r\n \t if ( state.backtracking==0 ) { \r\n \t if ((op!=null?op.getText():null).equals(\"*\")) {\r\n \t result = new Mul(result, rhs);\r\n \t }\r\n \t if ((op!=null?op.getText():null).equals(\"/\")) {\r\n \t result = new Div(result, rhs); \r\n \t }\r\n \t }\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop9;\r\n }\r\n } while (true);\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n if ( state.backtracking>0 ) { memoize(input, 14, mulExpr_StartIndex); }\r\n\r\n }\r\n return result;\r\n }", "public static EquationExpression timesRaw(EquationExpression... args) {\n\t\tswitch (args.length) {\n\t\tcase 0:\n\t\t\treturn EquationNumericValue.from(1);\n\t\tcase 1:\n\t\t\treturn args[0];\n\t\tcase 2:\n\t\t\treturn new EquationProductOperator(args[0], args[1]);\n\t\tdefault:\n\t\t\tEquationExpression[] args2 = new EquationExpression[args.length\n\t\t\t\t\t- 1];\n\t\t\tSystem.arraycopy(args, 1, args2, 0, args.length - 1);\n\t\t\treturn new EquationProductOperator(args[0], sumRaw(args2));\n\t\t}\n\t}", "public final void entryRuleMultExp() throws RecognitionException {\n try {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1377:1: ( ruleMultExp EOF )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1378:1: ruleMultExp EOF\n {\n before(grammarAccess.getMultExpRule()); \n pushFollow(FOLLOW_ruleMultExp_in_entryRuleMultExp2881);\n ruleMultExp();\n\n state._fsp--;\n\n after(grammarAccess.getMultExpRule()); \n match(input,EOF,FOLLOW_EOF_in_entryRuleMultExp2888); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }", "public static EquationExpression timesRaw(EquationExpression... args) {\n switch(args.length) {\n case 0:\n return EquationNumericValue.from(1);\n case 1:\n return args[0];\n case 2:\n return new EquationProductOperator(args[0], args[1]);\n default:\n EquationExpression[] args2 = new EquationExpression[args.length-1];\n System.arraycopy(args, 1, args2, 0, args.length-1);\n return new EquationProductOperator(args[0], sumRaw(args2));\n }\n }", "public final void mult (Unit unit) throws ArithmeticException {\n\t\tlong u = mksa ; double r = factor; double v = value; double o = offset;\n\t\t/* dump(\"mult:this \"); unit.dump(\"mult:unit\"); */\n\t\tif (((mksa&_abs)!=0) && (unit.factor != 1)) throw\t// On a date\n\t\tnew ArithmeticException(\"****Unit.mult on a date!\");\n\t\tif (((mksa|unit.mksa)&_log) != 0) {\n\t\t\tif ((mksa == underScore) && (factor == 1.)) ;\n\t\t\telse if ((unit.mksa == underScore) && (unit.factor == 1.)) ;\n\t\t\telse throw new ArithmeticException\n\t\t\t(\"****Unit: can't multiply logs: \" + symbol + \" x \" + unit.symbol);\n\t\t}\n\t\t/* As soon as there is an operation, the offset is ignored \n\t\t * except if one of the factors is unity.\n\t\t */\n\t\tif ((offset!=0) || (unit.offset!=0)) {\n\t\t\tif (mksa == underScore) offset = unit.offset;\n\t\t\telse if (unit.mksa == underScore) ;\n\t\t\telse offset = 0;\n\t\t}\n\t\tv *= unit.value; \n\t\tr *= unit.factor;\n\t\tu += unit.mksa; u -= underScore;\n\t\tif ((u&0x0c80808080808080L) != 0) throw new ArithmeticException\n\t\t(\"****too large powers in: \" + symbol + \" x \" + unit.symbol);\n\t\tmksa = u;\n\t\tfactor = r;\n\t\tvalue = v;\n\t\t/* Decision for the new symbol */\n\t\tif ((symbol != null) && (unit.symbol != null)) {\n\t\t\tif ((unit.mksa == underScore) && (unit.factor == 1)) return;\t// No unit ...\n\t\t\tif (( mksa == underScore) && ( factor == 1)) symbol = unit.symbol;\n\t\t\telse if ((symbol.equals(unit.symbol)) && (factor == unit.factor))\n\t\t\t\tsymbol = toExpr(symbol) + \"2\" ;\n\t\t\telse symbol = toExpr(symbol) + \".\" + toExpr(unit.symbol) ;\n\t\t}\n\t}", "public final Expr addExpr() throws RecognitionException {\n Expr result = null;\n\n int addExpr_StartIndex = input.index();\n\n Token op=null;\n Expr lhs =null;\n\n Expr rhs =null;\n\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 11) ) { return result; }\n\n // /home/jahn/workspace1/QLAndroid/src/org/uva/sea/ql/parser/antlr/QL.g:124:5: (lhs= mulExpr (op= ( '+' | '-' ) rhs= mulExpr )* )\n // /home/jahn/workspace1/QLAndroid/src/org/uva/sea/ql/parser/antlr/QL.g:124:9: lhs= mulExpr (op= ( '+' | '-' ) rhs= mulExpr )*\n {\n pushFollow(FOLLOW_mulExpr_in_addExpr547);\n lhs=mulExpr();\n\n state._fsp--;\n if (state.failed) return result;\n\n if ( state.backtracking==0 ) { result =lhs; }\n\n // /home/jahn/workspace1/QLAndroid/src/org/uva/sea/ql/parser/antlr/QL.g:124:46: (op= ( '+' | '-' ) rhs= mulExpr )*\n loop8:\n do {\n int alt8=2;\n int LA8_0 = input.LA(1);\n\n if ( ((LA8_0 >= 21 && LA8_0 <= 22)) ) {\n alt8=1;\n }\n\n\n switch (alt8) {\n \tcase 1 :\n \t // /home/jahn/workspace1/QLAndroid/src/org/uva/sea/ql/parser/antlr/QL.g:124:48: op= ( '+' | '-' ) rhs= mulExpr\n \t {\n \t op=(Token)input.LT(1);\n\n \t if ( (input.LA(1) >= 21 && input.LA(1) <= 22) ) {\n \t input.consume();\n \t state.errorRecovery=false;\n \t state.failed=false;\n \t }\n \t else {\n \t if (state.backtracking>0) {state.failed=true; return result;}\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t throw mse;\n \t }\n\n\n \t pushFollow(FOLLOW_mulExpr_in_addExpr565);\n \t rhs=mulExpr();\n\n \t state._fsp--;\n \t if (state.failed) return result;\n\n \t if ( state.backtracking==0 ) { \n \t if ((op!=null?op.getText():null).equals(\"+\")) {\n \t result = new Add(result, rhs);\n \t }\n \t if ((op!=null?op.getText():null).equals(\"-\")) {\n \t result = new Sub(result, rhs); \n \t }\n \t }\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop8;\n }\n } while (true);\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n\n finally {\n \t// do for sure before leaving\n if ( state.backtracking>0 ) { memoize(input, 11, addExpr_StartIndex); }\n\n }\n return result;\n }", "Point mult (double s, Point result);", "@Override\r\n\tpublic void mul(int x, int y) {\n\t\t\r\n\t}", "@Override\r\n\tpublic int multi(int x, int y) {\n\t\treturn x * y;\r\n\t}", "CalcEvaluator(boolean mult) {\r\n this.mult = mult;\r\n }", "@Override\r\n\tpublic int mul() {\n\t\treturn 0;\r\n\t}", "public double multiplica(double a, double b) {\n\t\treturn a*b;\n\t}", "public final void mMUL() throws RecognitionException\n\t{\n\t\ttry\n\t\t{\n\t\t\tfinal int _type = AshvmLexer.MUL;\n\t\t\tfinal int _channel = BaseRecognizer.DEFAULT_TOKEN_CHANNEL;\n\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:708:5: ( 'mul' )\n\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:708:7: 'mul'\n\t\t\t{\n\t\t\t\tthis.match(\"mul\");\n\n\t\t\t}\n\n\t\t\tthis.state.type = _type;\n\t\t\tthis.state.channel = _channel;\n\t\t}\n\t\tfinally\n\t\t{\n\t\t}\n\t}", "public R3Mult(int rdIndex, int rsIndex, int id) {\n\n }", "@Override\n\tpublic int mult(int val1, int val2) {\n\t\treturn val1 * val2;\n\t}", "public final void rule__AddExp__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:8253:1: ( ( ruleMultExp ) )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:8254:1: ( ruleMultExp )\n {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:8254:1: ( ruleMultExp )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:8255:1: ruleMultExp\n {\n before(grammarAccess.getAddExpAccess().getMultExpParserRuleCall_0()); \n pushFollow(FOLLOW_ruleMultExp_in_rule__AddExp__Group__0__Impl16577);\n ruleMultExp();\n\n state._fsp--;\n\n after(grammarAccess.getAddExpAccess().getMultExpParserRuleCall_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "<C, PM> VariableExp<C, PM> createVariableExp();", "private Complex eval(Complex[] ca, Complex x) {\n\t\tComplex result = ca[0];\n\t\tfor (int i = 1; i < ca.length; i++) {\n\t\t\tresult = result.mul(x).add(ca[i]);\n\t\t}\n\t\treturn result;\n\t}", "public final double multExpr() throws RecognitionException {\n double value = 0.0;\n\n\n double e =0.0;\n\n\n try {\n // ExprInterp.g:32:5: (e= atom ( '*' e= atom )* )\n // ExprInterp.g:32:9: e= atom ( '*' e= atom )*\n {\n pushFollow(FOLLOW_atom_in_multExpr248);\n e=atom();\n\n state._fsp--;\n\n\n value = e;\n\n // ExprInterp.g:32:37: ( '*' e= atom )*\n loop5:\n do {\n int alt5=2;\n int LA5_0 = input.LA(1);\n\n if ( (LA5_0==12) ) {\n alt5=1;\n }\n\n\n switch (alt5) {\n \tcase 1 :\n \t // ExprInterp.g:32:38: '*' e= atom\n \t {\n \t match(input,12,FOLLOW_12_in_multExpr253); \n\n \t pushFollow(FOLLOW_atom_in_multExpr257);\n \t e=atom();\n\n \t state._fsp--;\n\n\n \t value *= e;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop5;\n }\n } while (true);\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n\n finally {\n \t// do for sure before leaving\n }\n return value;\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 }", "private static native double mul(int n);", "private String compute(String equ,String op)\n {\n String equation = equ;\n Pattern mdPattern = Pattern.compile(\"(\\\\d+([.]\\\\d+)*)(([\"+op+\"]))(\\\\d+([.]\\\\d+)*)\");\n Matcher matcher\t\t= mdPattern.matcher(equation);\n while(matcher.find())\n {\n String[] arr = null;\n double ans = 0;\n String eq = matcher.group(0);//get form x*y\n if(eq.contains(op))\n {\n arr = eq.split(\"\\\\\"+op);//make arr\n if(op.equals(\"*\"))\n ans = Double.valueOf(arr[0])*Double.valueOf(arr[1]);//compute\n if(op.equals(\"/\"))\n ans = Double.valueOf(arr[0])/Double.valueOf(arr[1]);//compute\n if(op.equals(\"+\"))\n ans = Double.valueOf(arr[0])+Double.valueOf(arr[1]);//compute\n if(op.equals(\"-\"))\n ans = Double.valueOf(arr[0])-Double.valueOf(arr[1]);//compute\n }\n\n equation = matcher.replaceFirst(String.valueOf(ans));//replace in equation\n matcher = mdPattern.matcher(equation);//look for more matches\n }\n return equation;\n }", "public void multiply(Object mulValue) {\r\n\r\n\t\tNumberOperation operator = new NumberOperation(this.value, mulValue) {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic Number doAnOperation() {\r\n\t\t\t\tTypeEnum typeOfResult = getFinalType();\r\n\t\t\t\tif(typeOfResult == TypeEnum.TYPE_INTEGER) {\r\n\t\t\t\t\treturn getO1().intValue() * getO2().intValue();\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\treturn getO1().doubleValue() * getO2().doubleValue();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t\tthis.value = operator.doAnOperation();\r\n\t}", "public void mul(String a, String b, int i, String reg) {\r\n registerName.add(reg);\r\n int posa = registerRegister.indexOf(a);\r\n int posb = registerRegister.indexOf(b);\r\n int element = Integer.parseInt(registerValues.get(posa));\r\n int element1 = Integer.parseInt(registerValues.get(posb));\r\n int mul = element * element1;\r\n registerValues.add(Integer.toString(mul));\r\n }", "public static void main(String args[]) {\n\tExpr e3 = new Minus(new Num(100),new Num(99));\n\tSystem.out.println(\"e3 is \" + e3.exprToString());\n\t// outputs \"e4 is (4*5-(100-99))\"\n\tExpr e4 = new Minus(new Times(new Num(4),new Num(5)),e3);\n\tSystem.out.println(\"e4 is \" + e4.exprToString());\n }", "public void multiply(double multiplier) {\n x *= multiplier;\n y *= multiplier;\n }", "Rational multiply(Rational p){\n Rational firstarg=new Rational();\n firstarg.numerator=numerator;\n firstarg.denominator=denominator;\n\n firstarg.numerator=p.numerator*firstarg.numerator;\n firstarg.denominator=p.denominator*firstarg.denominator;\n return firstarg;\n }", "public final void synpred27_expression_fragment() throws RecognitionException { \n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:11: ( ( '+' | '-' ) mult )\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:11: ( '+' | '-' ) mult\n {\n if ( (input.LA(1)>=46 && input.LA(1)<=47) ) {\n input.consume();\n state.errorRecovery=false;state.failed=false;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n MismatchedSetException mse = new MismatchedSetException(null,input);\n throw mse;\n }\n\n pushFollow(FOLLOW_mult_in_synpred27_expression437);\n mult();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n }" ]
[ "0.71816504", "0.68509716", "0.6790061", "0.6790061", "0.6719847", "0.662252", "0.6454907", "0.6425489", "0.64137614", "0.6231617", "0.6115805", "0.6112296", "0.6065207", "0.60344887", "0.6033878", "0.600525", "0.59952325", "0.5972148", "0.594838", "0.59280413", "0.5922113", "0.5917301", "0.5884391", "0.58605164", "0.5824194", "0.5792324", "0.57897234", "0.5735053", "0.57310444", "0.5702243", "0.5685638", "0.566538", "0.56604946", "0.5624147", "0.56180614", "0.5613636", "0.5608406", "0.5608072", "0.56037015", "0.5579075", "0.5563172", "0.55553854", "0.55489737", "0.5538042", "0.5535295", "0.55218285", "0.5514709", "0.55080235", "0.5507662", "0.55014133", "0.5496578", "0.54754764", "0.54668754", "0.54659885", "0.5457093", "0.54570585", "0.5451691", "0.5443317", "0.54366785", "0.54326445", "0.5425212", "0.540909", "0.53834087", "0.53812927", "0.53713524", "0.53704965", "0.5364532", "0.5336682", "0.5333563", "0.53205645", "0.53128475", "0.53083515", "0.5305448", "0.52945733", "0.52901757", "0.5278995", "0.52752465", "0.5273296", "0.52655876", "0.52618086", "0.52584034", "0.5256669", "0.5248384", "0.52452195", "0.5244816", "0.52433026", "0.5236883", "0.52323365", "0.52319634", "0.52287084", "0.52283555", "0.52114177", "0.520705", "0.52025074", "0.5201104", "0.5196095", "0.5193989", "0.5193367", "0.5179163", "0.5177159" ]
0.6524968
6
Constructs a mult by given expressions.
public Mult(double left, String right) { super(left, right); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Expression multExpression() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tExpression e0 = powerExpression();\r\n\t\twhile(isKind(OP_TIMES, OP_DIV, OP_MOD)) {\r\n\t\t\tToken op = consume();\r\n\t\t\tExpression e1 = powerExpression();\r\n\t\t\te0 = new ExpressionBinary(first,e0,op,e1);\r\n\t\t}\r\n\t\treturn e0;\r\n\t}", "private Expr mult(Expr x) throws Err {\n if (x instanceof ExprUnary) {\n ExprUnary y=(ExprUnary)x;\n if (y.op==ExprUnary.Op.SOME) return ExprUnary.Op.SOMEOF.make(y.pos, y.sub);\n if (y.op==ExprUnary.Op.LONE) return ExprUnary.Op.LONEOF.make(y.pos, y.sub);\n if (y.op==ExprUnary.Op.ONE) return ExprUnary.Op.ONEOF.make(y.pos, y.sub);\n }\n return x;\n }", "public Mult(Expression left, Expression right) {\n super(left, right);\n }", "public Mult(Expression left, Expression right) {\n super(left, right);\n }", "Multiply createMultiply();", "public final VecMathParser.expr_return expr() throws RecognitionException {\n VecMathParser.expr_return retval = new VecMathParser.expr_return();\n retval.start = input.LT(1);\n\n Object root_0 = null;\n\n Token char_literal8=null;\n VecMathParser.multExpr_return multExpr7 = null;\n\n VecMathParser.multExpr_return multExpr9 = null;\n\n\n Object char_literal8_tree=null;\n\n try {\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:15:5: ( multExpr ( '+' multExpr )* )\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:15:7: multExpr ( '+' multExpr )*\n {\n root_0 = (Object)adaptor.nil();\n\n pushFollow(FOLLOW_multExpr_in_expr117);\n multExpr7=multExpr();\n\n state._fsp--;\n\n adaptor.addChild(root_0, multExpr7.getTree());\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:15:16: ( '+' multExpr )*\n loop3:\n do {\n int alt3=2;\n int LA3_0 = input.LA(1);\n\n if ( (LA3_0==10) ) {\n alt3=1;\n }\n\n\n switch (alt3) {\n \tcase 1 :\n \t // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:15:17: '+' multExpr\n \t {\n \t char_literal8=(Token)match(input,10,FOLLOW_10_in_expr120); \n \t char_literal8_tree = (Object)adaptor.create(char_literal8);\n \t root_0 = (Object)adaptor.becomeRoot(char_literal8_tree, root_0);\n\n \t pushFollow(FOLLOW_multExpr_in_expr123);\n \t multExpr9=multExpr();\n\n \t state._fsp--;\n\n \t adaptor.addChild(root_0, multExpr9.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop3;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (Object)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "public Mult(String left, Expression right) {\n super(left, right);\n }", "public Mult(Expression left, double right) {\n super(left, right);\n }", "public Mult(double left, Expression right) {\n super(left, right);\n }", "public Mult(Expression left, String right) {\n super(left, right);\n }", "void visit(MultiplicationExpression expression);", "public BinMltLinExpr multiply(BinLinExpr expr) {\n\t\t\n\t\tBinMltLinExpr result = new BinMltLinExpr();\n\t\t\n\t\t// Multiply variables together\n\t\tfor (int i = 0; i < expr.vars.size(); i++) {\n\t\t\tfor (int j = 0; j < termVars.size(); j++) {\n\t\t\t\t\n\t\t\t\tdouble newCoeff = expr.coefficients.get(i) * coefficients.get(j);\n\t\t\t\tList<BinVar> newVars = new ArrayList<BinVar>();\n\t\t\t\tnewVars.add(expr.vars.get(i));\n\t\t\t\tnewVars.addAll(termVars.get(j));\n\t\t\t\t\n\t\t\t\tresult.addTerm(newCoeff, newVars);\n\t\t\t}\n\t\t}\n\n\t\t// Multiply variables with constants\n\t\tfor (int i = 0; i < termVars.size(); i++) {\n\t\t\tdouble newCoeff = coefficients.get(i) * expr.constant;\n\t\t\tresult.addTerm(newCoeff, termVars.get(i));\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < expr.vars.size(); i++) {\n\t\t\tdouble newCoeff = expr.coefficients.get(i) * constant;\n\t\t\tresult.addTerm(newCoeff, expr.vars.get(i));\n\t\t}\n\t\t\n\t\tresult.addConstant(constant*expr.constant);\n\t\t\n\t\treturn result;\n\t}", "public void enfoncerMult() {\n\t\ttry {\n\t\t\tthis.op = new Mult();\n\t\t\tif (!raz) {\n\t\t\t\tthis.pile.push(valC);\n\t\t\t}\n\t\t\tint a = this.pile.pop(); int b = this.pile.pop();\n\t\t\tthis.valC = this.op.eval(b,a);\n\t\t\tthis.pile.push(this.valC);\n\t\t\tthis.raz = true;\n\t\t}\n\t\tcatch (EmptyStackException e) {\n\t\t\tSystem.out.println(\"Erreur de syntaxe : Saisir deux operandes avant de saisir un operateur\");\n\t\t}\n\t}", "public Transformation mult(Transformation a) {\n\t\tTransformation result = new Transformation();\n\t\tsuper.mult(a, result);\n\t\treturn result;\n\t}", "private void mul() {\n\n\t}", "@Override\n public Expression assign(String var, Expression expression) {\n Expression left = super.getLeft();\n Expression right = super.getRight();\n return new Mult(left.assign(var, expression), right.assign(var, expression));\n }", "public void multiply() {\n\t\t\n\t}", "public static double multi() {\n System.out.println(\"Enter multiplier\");\n double a = getNumber();\n System.out.println(\"Enter multiplicand\");\n double b = getNumber();\n\n return a * b;\n }", "@SuppressWarnings(\"unchecked\")\n @Override\n public Expression asExpression(Rule rule, Deque<Value<Expression>> args) {\n if (args.size() == 1) {\n // a single term is not a product\n return args.pollFirst().getTarget();\n } else {\n // assume x to be *x, because the product will start by 1*x\n Term<Multiplicative> factor = new Term<>(Multiplicative.MULT, args.removeFirst().getTarget());\n List<Term<Multiplicative>> arguments = new LinkedList<>();\n arguments.add(factor);\n args.stream()\n // next arguments are all Term<Multiplicative>\n .map(v -> (Term<Multiplicative>) v.getTarget())\n .forEachOrdered(arguments::add);\n return new Product(arguments);\n }\n }", "public static void main(String[] args) throws Exception {\r\n Expression e = new Plus(new Mult(2, \"x\"), new Plus(new Sin(new Mult(4, \"y\")), new Pow(\"e\", \"x\")));\r\n System.out.println(e);\r\n Map<String, Double> assignment = new TreeMap<String, Double>();\r\n assignment.put(\"x\", 2.0);\r\n assignment.put(\"y\", 0.25);\r\n assignment.put(\"e\", 2.71);\r\n System.out.println(e.evaluate(assignment));\r\n e = e.differentiate(\"x\");\r\n System.out.println(e);\r\n System.out.println(e.evaluate(assignment));\r\n System.out.println(e.simplify());\r\n System.out.println(e);\r\n }", "public BinMltLinExpr multiply(BinMltLinExpr expr) {\n\t\t\n\t\tBinMltLinExpr result = new BinMltLinExpr();\n\t\t\n\t\t// Multiply variables together\n\t\tfor (int i = 0; i < expr.termVars.size(); i++) {\n\t\t\tfor (int j = 0; j < termVars.size(); j++) {\n\t\t\t\t\n\t\t\t\tdouble newCoeff = expr.coefficients.get(i) * coefficients.get(j);\n\t\t\t\tList<BinVar> newVars = new ArrayList<BinVar>();\n\t\t\t\tnewVars.addAll(expr.termVars.get(i));\n\t\t\t\tnewVars.addAll(termVars.get(j));\n\t\t\t\t\n\t\t\t\tresult.addTerm(newCoeff, newVars);\n\t\t\t}\n\t\t}\n\n\t\t// Multiply variables with constants\n\t\tfor (int i = 0; i < termVars.size(); i++) {\n\t\t\tdouble newCoeff = coefficients.get(i) * expr.constant;\n\t\t\tresult.addTerm(newCoeff, termVars.get(i));\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < expr.termVars.size(); i++) {\n\t\t\tdouble newCoeff = expr.coefficients.get(i) * constant;\n\t\t\tresult.addTerm(newCoeff, expr.termVars.get(i));\n\t\t}\n\t\t\n\t\tresult.addConstant(constant*expr.constant);\n\t\t\n\t\treturn result;\n\t}", "public final VecMathParser.multExpr_return multExpr() throws RecognitionException {\n VecMathParser.multExpr_return retval = new VecMathParser.multExpr_return();\n retval.start = input.LT(1);\n\n Object root_0 = null;\n\n Token char_literal11=null;\n Token char_literal12=null;\n VecMathParser.primary_return primary10 = null;\n\n VecMathParser.primary_return primary13 = null;\n\n\n Object char_literal11_tree=null;\n Object char_literal12_tree=null;\n\n try {\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:5: ( primary ( ( '*' | '.' ) primary )* )\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:9: primary ( ( '*' | '.' ) primary )*\n {\n root_0 = (Object)adaptor.nil();\n\n pushFollow(FOLLOW_primary_in_multExpr145);\n primary10=primary();\n\n state._fsp--;\n\n adaptor.addChild(root_0, primary10.getTree());\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:17: ( ( '*' | '.' ) primary )*\n loop5:\n do {\n int alt5=2;\n int LA5_0 = input.LA(1);\n\n if ( ((LA5_0>=11 && LA5_0<=12)) ) {\n alt5=1;\n }\n\n\n switch (alt5) {\n \tcase 1 :\n \t // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:18: ( '*' | '.' ) primary\n \t {\n \t // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:18: ( '*' | '.' )\n \t int alt4=2;\n \t int LA4_0 = input.LA(1);\n\n \t if ( (LA4_0==11) ) {\n \t alt4=1;\n \t }\n \t else if ( (LA4_0==12) ) {\n \t alt4=2;\n \t }\n \t else {\n \t NoViableAltException nvae =\n \t new NoViableAltException(\"\", 4, 0, input);\n\n \t throw nvae;\n \t }\n \t switch (alt4) {\n \t case 1 :\n \t // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:19: '*'\n \t {\n \t char_literal11=(Token)match(input,11,FOLLOW_11_in_multExpr149); \n \t char_literal11_tree = (Object)adaptor.create(char_literal11);\n \t root_0 = (Object)adaptor.becomeRoot(char_literal11_tree, root_0);\n\n\n \t }\n \t break;\n \t case 2 :\n \t // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:24: '.'\n \t {\n \t char_literal12=(Token)match(input,12,FOLLOW_12_in_multExpr152); \n \t char_literal12_tree = (Object)adaptor.create(char_literal12);\n \t root_0 = (Object)adaptor.becomeRoot(char_literal12_tree, root_0);\n\n\n \t }\n \t break;\n\n \t }\n\n \t pushFollow(FOLLOW_primary_in_multExpr156);\n \t primary13=primary();\n\n \t state._fsp--;\n\n \t adaptor.addChild(root_0, primary13.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop5;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (Object)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "@Override\n\tpublic void visit(MultiplyNode node) {\n\t\tif (Evaluator.checkScope(node) == false) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (Evaluator.checkAssert(node) == false) {\n\t\t\treturn;\n\t\t}\n\n\t\t/**\n\t\t * evaluam cei doi fii\n\t\t */\n\t\tEvaluator.evaluate(node.getChild(0));\n\t\tEvaluator.evaluate(node.getChild(1));\n\n\t\tInteger i, j;\n\t\t/**\n\t\t * salvam si inmultim valorile rezulate in urma evaluarii celor 2 fii si\n\t\t * setam valoarea corespunzatoare in nodul curent\n\t\t */\n\t\tif (node.getChild(1) instanceof Variable) {\n\t\t\ti = Integer.parseInt(Evaluator.variables.get(node.getChild(1).getName()));\n\n\t\t} else {\n\t\t\ti = Integer.parseInt(node.getChild(1).getName());\n\t\t}\n\n\t\tif (node.getChild(0) instanceof Variable) {\n\t\t\tj = Integer.parseInt(Evaluator.variables.get(node.getChild(0).getName()));\n\n\t\t} else {\n\t\t\tj = Integer.parseInt(node.getChild(0).getName());\n\t\t}\n\n\t\tInteger n = i * j;\n\n\t\tnode.setName(n.toString());\n\t}", "static Double executeMultiplication(List<Double> operands) {\n Double result = null;\n for (Double operand : operands) {\n if (Objects.isNull(result)) {\n result = operand;\n }\n else {\n result = result * operand;\n }\n }\n return result;\n }", "public Polynomial visit(ProductExpression expression) {\n return Polynomial.multiply(\n expression.getLeft().accept(this),\n expression.getRight().accept(this));\n }", "BaseNumber multiply(BaseNumber operand);", "public final Expr multExpr() throws RecognitionException {\n\t\tExpr e = null;\n\n\n\t\tToken STAR15=null;\n\t\tExpr e1 =null;\n\t\tExpr e2 =null;\n\n\n\t\t\t\tExpr it = null;\n\t\t\t\n\t\ttry {\n\t\t\t// ul.g:189:3: (e1= atom ( STAR e2= atom )* )\n\t\t\t// ul.g:190:2: e1= atom ( STAR e2= atom )*\n\t\t\t{\n\t\t\tpushFollow(FOLLOW_atom_in_multExpr768);\n\t\t\te1=atom();\n\t\t\tstate._fsp--;\n\t\t\tif (state.failed) return e;\n\t\t\tif ( state.backtracking==0 ) {it = e1;}\n\t\t\t// ul.g:191:2: ( STAR e2= atom )*\n\t\t\tloop15:\n\t\t\twhile (true) {\n\t\t\t\tint alt15=2;\n\t\t\t\tint LA15_0 = input.LA(1);\n\t\t\t\tif ( (LA15_0==STAR) ) {\n\t\t\t\t\talt15=1;\n\t\t\t\t}\n\n\t\t\t\tswitch (alt15) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// ul.g:191:4: STAR e2= atom\n\t\t\t\t\t{\n\t\t\t\t\tSTAR15=(Token)match(input,STAR,FOLLOW_STAR_in_multExpr775); if (state.failed) return e;\n\t\t\t\t\tpushFollow(FOLLOW_atom_in_multExpr781);\n\t\t\t\t\te2=atom();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return e;\n\t\t\t\t\tif ( state.backtracking==0 ) {it = new MultExpr(it, e2, (STAR15!=null?STAR15.getLine():0), STAR15.getCharPositionInLine());}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault :\n\t\t\t\t\tbreak loop15;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( state.backtracking==0 ) {\n\t\t\t\t\te = it;\n\t\t\t\t}\n\t\t}\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\trecover(input,re);\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn e;\n\t}", "public T mul(T first, T second);", "public final double expr() throws RecognitionException {\n double value = 0.0;\n\n\n double e =0.0;\n\n\n try {\n // ExprInterp.g:24:5: (e= multExpr ( '+' e= multExpr | '-' e= multExpr )* |e= maxF )\n int alt4=2;\n int LA4_0 = input.LA(1);\n\n if ( ((LA4_0 >= ID && LA4_0 <= LEFTP)||LA4_0==REL) ) {\n alt4=1;\n }\n else if ( (LA4_0==MAXI) ) {\n alt4=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 4, 0, input);\n\n throw nvae;\n\n }\n switch (alt4) {\n case 1 :\n // ExprInterp.g:24:9: e= multExpr ( '+' e= multExpr | '-' e= multExpr )*\n {\n pushFollow(FOLLOW_multExpr_in_expr155);\n e=multExpr();\n\n state._fsp--;\n\n\n value = e;\n\n // ExprInterp.g:25:9: ( '+' e= multExpr | '-' e= multExpr )*\n loop3:\n do {\n int alt3=3;\n int LA3_0 = input.LA(1);\n\n if ( (LA3_0==13) ) {\n alt3=1;\n }\n else if ( (LA3_0==15) ) {\n alt3=2;\n }\n\n\n switch (alt3) {\n \tcase 1 :\n \t // ExprInterp.g:25:13: '+' e= multExpr\n \t {\n \t match(input,13,FOLLOW_13_in_expr171); \n\n \t pushFollow(FOLLOW_multExpr_in_expr175);\n \t e=multExpr();\n\n \t state._fsp--;\n\n\n \t value += e;\n\n \t }\n \t break;\n \tcase 2 :\n \t // ExprInterp.g:26:13: '-' e= multExpr\n \t {\n \t match(input,15,FOLLOW_15_in_expr191); \n\n \t pushFollow(FOLLOW_multExpr_in_expr195);\n \t e=multExpr();\n\n \t state._fsp--;\n\n\n \t value -= e;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop3;\n }\n } while (true);\n\n\n }\n break;\n case 2 :\n // ExprInterp.g:28:8: e= maxF\n {\n pushFollow(FOLLOW_maxF_in_expr221);\n e=maxF();\n\n state._fsp--;\n\n\n value = e;\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n\n finally {\n \t// do for sure before leaving\n }\n return value;\n }", "public final void mul() {\n\t\tif (size > 1) {\n\n\t\t\tdouble topMostValue = pop();\n\t\t\tdouble secondTopMostValue = pop();\n\t\t\tpush(secondTopMostValue * topMostValue);\n\t\t}\n\t}", "public Mult(String left, double right) {\n super(left, right);\n }", "public static Transform mult(Transform t1, Transform t2) {\n\t\treturn transpose(t1.a * t2.a + t1.c * t2.b, t1.a * t2.c + t1.c * t2.d, t1.a * t2.tx + t1.c * t2.ty + t1.tx,\n\t\t\t\t\t\t t1.b * t2.a + t1.d * t2.b, t1.b * t2.c + t1.d * t2.d, t1.b * t2.tx + t1.d * t2.ty + t1.ty);\n\t}", "private void multiplication()\n\t{\n\t\tFun = Function.MULTIPLY; //Function set to determine what action should be taken later.\n\t\t\n\t\t\tsetLeftValue();\n\t\t\tentry.grabFocus();\n\t\t\n\t}", "public int mult()\r\n\t{\r\n\t\tint a=10;\r\n\t\tint b=20;\r\n\t\tint c = a*b;\r\n\t\treturn(c);\r\n\t}", "public Object visitMultiplicativeExpression(GNode n) {\n Object a, b, result;\n String op;\n \n nonboolean = true;\n \n dostring = true;\n \n a = dispatch(n.getGeneric(0));\n b = dispatch(n.getGeneric(2));\n op = n.getString(1);\n \n dostring = false;\n \n if (a instanceof Long && b instanceof Long) {\n if ((op.equals(\"/\")\n || op.equals(\"%\")) && ((Long) b).equals(new Long(0))) {\n System.err.println(\"division by zero in #if\");\n result = new Long(0);\n }\n if (op.equals(\"*\")) {\n result = (Long) a * (Long) b;\n }\n else if (op.equals(\"/\")) {\n result = (Long) a / (Long) b;\n }\n else if (op.equals(\"%\")) {\n result = (Long) a % (Long) b;\n }\n else {\n result = \"\";\n }\n }\n else {\n result = parens(a) + \" \" + op + \" \" + parens(b);\n }\n \n return result;\n }", "public static BinaryExpression multiply(Expression expression0, Expression expression1) {\n return makeBinary(ExpressionType.Multiply, expression0, expression1);\n }", "public T elementMult( T b ) {\n convertType.specify(this, b);\n T A = convertType.convert(this);\n b = convertType.convert(b);\n\n T c = A.createLike();\n A.ops.elementMult(A.mat, b.mat, c.mat);\n return c;\n }", "public final expressionParser.add_return add() throws RecognitionException {\n expressionParser.add_return retval = new expressionParser.add_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n Token char_literal38=null;\n Token char_literal39=null;\n expressionParser.mult_return mult37 = null;\n\n expressionParser.mult_return mult40 = null;\n\n\n CommonTree char_literal38_tree=null;\n CommonTree char_literal39_tree=null;\n\n try {\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:3: ( mult ( ( '+' | '-' ) mult )* )\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:5: mult ( ( '+' | '-' ) mult )*\n {\n root_0 = (CommonTree)adaptor.nil();\n\n pushFollow(FOLLOW_mult_in_add424);\n mult37=mult();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, mult37.getTree());\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:10: ( ( '+' | '-' ) mult )*\n loop17:\n do {\n int alt17=2;\n alt17 = dfa17.predict(input);\n switch (alt17) {\n \tcase 1 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:11: ( '+' | '-' ) mult\n \t {\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:11: ( '+' | '-' )\n \t int alt16=2;\n \t int LA16_0 = input.LA(1);\n\n \t if ( (LA16_0==46) ) {\n \t alt16=1;\n \t }\n \t else if ( (LA16_0==47) ) {\n \t alt16=2;\n \t }\n \t else {\n \t if (state.backtracking>0) {state.failed=true; return retval;}\n \t NoViableAltException nvae =\n \t new NoViableAltException(\"\", 16, 0, input);\n\n \t throw nvae;\n \t }\n \t switch (alt16) {\n \t case 1 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:12: '+'\n \t {\n \t char_literal38=(Token)match(input,46,FOLLOW_46_in_add428); if (state.failed) return retval;\n \t if ( state.backtracking==0 ) {\n \t char_literal38_tree = (CommonTree)adaptor.create(char_literal38);\n \t root_0 = (CommonTree)adaptor.becomeRoot(char_literal38_tree, root_0);\n \t }\n\n \t }\n \t break;\n \t case 2 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:19: '-'\n \t {\n \t char_literal39=(Token)match(input,47,FOLLOW_47_in_add433); if (state.failed) return retval;\n \t if ( state.backtracking==0 ) {\n \t char_literal39_tree = (CommonTree)adaptor.create(char_literal39);\n \t root_0 = (CommonTree)adaptor.becomeRoot(char_literal39_tree, root_0);\n \t }\n\n \t }\n \t break;\n\n \t }\n\n \t pushFollow(FOLLOW_mult_in_add437);\n \t mult40=mult();\n\n \t state._fsp--;\n \t if (state.failed) return retval;\n \t if ( state.backtracking==0 ) adaptor.addChild(root_0, mult40.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop17;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "public Double eval(Double... operands);", "public <V extends Number> FluentExp<V> times (SQLExpression<V> expr)\n {\n return new Mul<V>(this, expr);\n }", "public static MathNode create(List<MathNode> nodes) {\n return new PowerNode(nodes);\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"MULT\";\n\t}", "NumericExpression createNumericExpression();", "abstract void mulS();", "public final expressionParser.mult_return mult() throws RecognitionException {\n expressionParser.mult_return retval = new expressionParser.mult_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n Token char_literal42=null;\n Token char_literal43=null;\n expressionParser.unary_return unary41 = null;\n\n expressionParser.unary_return unary44 = null;\n\n\n CommonTree char_literal42_tree=null;\n CommonTree char_literal43_tree=null;\n\n try {\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:3: ( unary ( ( '*' | '/' ) unary )* )\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:5: unary ( ( '*' | '/' ) unary )*\n {\n root_0 = (CommonTree)adaptor.nil();\n\n pushFollow(FOLLOW_unary_in_mult454);\n unary41=unary();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, unary41.getTree());\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:11: ( ( '*' | '/' ) unary )*\n loop19:\n do {\n int alt19=2;\n int LA19_0 = input.LA(1);\n\n if ( ((LA19_0>=48 && LA19_0<=49)) ) {\n alt19=1;\n }\n\n\n switch (alt19) {\n \tcase 1 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:12: ( '*' | '/' ) unary\n \t {\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:12: ( '*' | '/' )\n \t int alt18=2;\n \t int LA18_0 = input.LA(1);\n\n \t if ( (LA18_0==48) ) {\n \t alt18=1;\n \t }\n \t else if ( (LA18_0==49) ) {\n \t alt18=2;\n \t }\n \t else {\n \t if (state.backtracking>0) {state.failed=true; return retval;}\n \t NoViableAltException nvae =\n \t new NoViableAltException(\"\", 18, 0, input);\n\n \t throw nvae;\n \t }\n \t switch (alt18) {\n \t case 1 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:13: '*'\n \t {\n \t char_literal42=(Token)match(input,48,FOLLOW_48_in_mult458); if (state.failed) return retval;\n \t if ( state.backtracking==0 ) {\n \t char_literal42_tree = (CommonTree)adaptor.create(char_literal42);\n \t root_0 = (CommonTree)adaptor.becomeRoot(char_literal42_tree, root_0);\n \t }\n\n \t }\n \t break;\n \t case 2 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:20: '/'\n \t {\n \t char_literal43=(Token)match(input,49,FOLLOW_49_in_mult463); if (state.failed) return retval;\n \t if ( state.backtracking==0 ) {\n \t char_literal43_tree = (CommonTree)adaptor.create(char_literal43);\n \t root_0 = (CommonTree)adaptor.becomeRoot(char_literal43_tree, root_0);\n \t }\n\n \t }\n \t break;\n\n \t }\n\n \t pushFollow(FOLLOW_unary_in_mult467);\n \t unary44=unary();\n\n \t state._fsp--;\n \t if (state.failed) return retval;\n \t if ( state.backtracking==0 ) adaptor.addChild(root_0, unary44.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop19;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "public final Expr addExpr() throws RecognitionException {\r\n Expr result = null;\r\n\r\n int addExpr_StartIndex = input.index();\r\n\r\n Token op=null;\r\n Expr lhs =null;\r\n\r\n Expr rhs =null;\r\n\r\n\r\n try {\r\n if ( state.backtracking>0 && alreadyParsedRule(input, 15) ) { return result; }\r\n\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:121:5: (lhs= mulExpr (op= ( '+' | '-' ) rhs= mulExpr )* )\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:121:9: lhs= mulExpr (op= ( '+' | '-' ) rhs= mulExpr )*\r\n {\r\n pushFollow(FOLLOW_mulExpr_in_addExpr674);\r\n lhs=mulExpr();\r\n\r\n state._fsp--;\r\n if (state.failed) return result;\r\n\r\n if ( state.backtracking==0 ) { result =lhs; }\r\n\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:121:46: (op= ( '+' | '-' ) rhs= mulExpr )*\r\n loop10:\r\n do {\r\n int alt10=2;\r\n int LA10_0 = input.LA(1);\r\n\r\n if ( ((LA10_0 >= 24 && LA10_0 <= 25)) ) {\r\n alt10=1;\r\n }\r\n\r\n\r\n switch (alt10) {\r\n \tcase 1 :\r\n \t // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:121:48: op= ( '+' | '-' ) rhs= mulExpr\r\n \t {\r\n \t op=(Token)input.LT(1);\r\n\r\n \t if ( (input.LA(1) >= 24 && input.LA(1) <= 25) ) {\r\n \t input.consume();\r\n \t state.errorRecovery=false;\r\n \t state.failed=false;\r\n \t }\r\n \t else {\r\n \t if (state.backtracking>0) {state.failed=true; return result;}\r\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\r\n \t throw mse;\r\n \t }\r\n\r\n\r\n \t pushFollow(FOLLOW_mulExpr_in_addExpr692);\r\n \t rhs=mulExpr();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return result;\r\n\r\n \t if ( state.backtracking==0 ) { \r\n \t if ((op!=null?op.getText():null).equals(\"+\")) {\r\n \t result = new Add(result, rhs);\r\n \t }\r\n \t if ((op!=null?op.getText():null).equals(\"-\")) {\r\n \t result = new Sub(result, rhs); \r\n \t }\r\n \t }\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop10;\r\n }\r\n } while (true);\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n if ( state.backtracking>0 ) { memoize(input, 15, addExpr_StartIndex); }\r\n\r\n }\r\n return result;\r\n }", "public static double multi(double a, double b) {\n return a * b;\n }", "@Test\n public void testParseMul() {\n System.out.println(\"testParseMul\");\n byte[] expected = {\n Instruction.LV.getId(), 0, 0, 32,\n Instruction.LV.getId(), 0, 0, 36,\n Instruction.MUL.getId(),\n Instruction.LV.getId(), 0, 0, 40,\n Instruction.MUL.getId()\n };\n\n TermParser p = TermParserTestSetup.getMulTermSetup();\n assertEquals(\"Parse\", true, p.parse());\n AssemblerCodeChecker.assertCodeEquals(\"Code \", expected, TermParserTestSetup.getByteCode());\n }", "@Override\n public Expression simplifyMore() {\n Expression left = super.getLeft();\n Expression right = super.getRight();\n\n // x * x -> x^2\n if (left.toString().equals(right.toString())) {\n return new Pow(left, 2);\n }\n\n // ((2.0 * x) * (x * 3.0)) -> 6x^2\n if (left instanceof Mult && right instanceof Mult) {\n if (((Mult) left).getRight().toString().equals(((Mult) right).getLeft().toString())) {\n Expression exp = new Mult(new Mult(((Mult) left).getLeft(), ((Mult) right).getRight()),\n new Mult(((Mult) left).getRight(), ((Mult) right).getLeft()));\n exp.turnBonusOn();\n return exp.simplify();\n }\n }\n\n // 2x * 2x -> 4x^2\n if (left instanceof Mult && right instanceof Mult) {\n if (((Mult) left).getRight().toString().equals(((Mult) right).getRight().toString())) {\n return new Mult(new Mult(((Mult) left).getLeft(), ((Mult) right).getLeft()).simplify(),\n new Pow(((Mult) left).getRight(), 2)).simplify();\n }\n }\n\n // 2x * 2y -> 4xy\n if (left instanceof Mult && right instanceof Mult) {\n return new Mult(new Mult(((Mult) left).getLeft(), ((Mult) right).getLeft()).simplify(),\n new Mult(((Mult) left).getRight(), ((Mult) right).getRight())).simplify();\n }\n\n // sin(x) * cos(x) -> 0.5 * sin(2x)\n if (right instanceof Sin && left instanceof Cos) {\n Expression exp = new Mult(0.5, new Sin(new Mult(2, ((Sin) right).getExpression())));\n exp.turnBonusOn();\n return exp.simplify();\n }\n\n // cos(x) * sin(x) -> 0.5 * sin(2x)\n if (right instanceof Cos && left instanceof Sin) {\n Expression exp = new Sin(new Mult(2, ((Cos) right).getExpression()));\n exp.turnBonusOn();\n return exp.simplify();\n }\n\n // log(x, y) * 2 -> 2 * log(x, y)\n if (left instanceof Sin || left instanceof Cos || left instanceof Log) {\n Expression exp = new Mult(right, left);\n exp.turnBonusOn();\n return exp.simplify();\n }\n\n // x^2 * x^3 -> x^5\n if (left instanceof Pow && right instanceof Pow) {\n if (((Pow) left).getLeft().toString().equals(((Pow) right).getLeft().toString())) {\n Expression exp = new Pow(((Pow) left).getLeft(),\n new Plus(((Pow) left).getRight(), ((Pow) right).getRight()));\n exp.turnBonusOn();\n return exp.simplify();\n }\n }\n\n // x^2 * x -> x^3\n if (left instanceof Pow) {\n if (((Pow) left).getLeft().toString().equals(right.toString())) {\n Expression exp = new Pow(((Pow) left).getLeft(), new Plus(((Pow) left).getRight(), 1));\n exp.turnBonusOn();\n return exp.simplify();\n }\n }\n\n return this;\n }", "IVec3 mult(IVec3 v);", "private Term parseMul(final boolean required) throws ParseException {\n Term t1 = parseUnary(required);\n while (t1 != null) {\n int tt = _tokenizer.next();\n if (tt == '*') {\n Term t2 = parseUnary(true);\n if (t1.isD() && t2.isN() || t1.isN() && t2.isD()) {\n t1 = new Term.Mul(Term.TYPE_D, t1, t2);\n } else if (t1.isI() && t2.isI()) {\n t1 = new Term.Mul(Term.TYPE_I, t1, t2);\n } else if (!isTypeChecking()) {\n t1 = new Term.Mul(t1.isD() || t2.isD() ? Term.TYPE_D : Term.TYPE_I, t1, t2);\n } else {\n reportTypeErrorN2(\"'*'\");\n }\n } else if (tt == '/') {\n Term t2 = parseUnary(true);\n if (t1.isD() && t2.isN() || t1.isN() && t2.isD()) {\n t1 = new Term.Div(Term.TYPE_D, t1, t2);\n } else if (t1.isI() && t2.isI()) {\n t1 = new Term.Div(Term.TYPE_I, t1, t2);\n } else if (!isTypeChecking()) {\n t1 = new Term.Div(t1.isD() || t2.isD() ? Term.TYPE_D : Term.TYPE_I, t1, t2);\n } else {\n reportTypeErrorN2(\"'/'\");\n }\n } else if (tt == '%') {\n Term t2 = parseUnary(true);\n if (t1.isD() && t2.isN() || t1.isN() && t2.isD()) {\n t1 = new Term.Mod(Term.TYPE_D, t1, t2);\n } else if (t1.isI() && t2.isI()) {\n t1 = new Term.Mod(Term.TYPE_I, t1, t2);\n } else if (!isTypeChecking()) {\n t1 = new Term.Mod(t1.isD() || t2.isD() ? Term.TYPE_D : Term.TYPE_I, t1, t2);\n } else {\n reportTypeErrorN2(\"'%'\");\n }\n } else {\n _tokenizer.pushBack();\n break;\n }\n }\n return t1;\n }", "public void multiply()\r\n {\r\n resultDoubles = Operations.multiply(leftOperand, rightOperand);\r\n resultResetHelper();\r\n }", "public Mult(String left, String right) {\n super(left, right);\n }", "public Mult(double left, double right) {\n super(left, right);\n }", "public Multiplication(Expression l, Expression r) {\n\tleft = l;\n\tright = r;\n }", "public AncientEgyptianMultiplication( ) {\r\n }", "abstract int multiplication(int num1, int num2);", "public void testMultiply() {\r\n System.out.println(\"Multiply\");\r\n Double [][] n = new Double[][]{{-3., -2.5, -1., 0., 1., 2., 3.4, 3.5, 1.1E100, -1.1E100}, \r\n {-3., 2.5, 0., 0., 1., -2., 3., 3.7, 1.1E100, 1.1E100}, \r\n {9., -6.25, 0., 0., 1., -4., 10.2, 12.95, 1.21E200, -1.21E200}};\r\n for(int i = 0; i < 10; i++){\r\n Double x = n[0][i];\r\n Double y = n[1][i];\r\n double expResult = n[2][i];\r\n double result = MathOp.Multiply(x, y);\r\n assertEquals(expResult, result, 0.001);\r\n }\r\n }", "@Override\n public Expression differentiate(String var) {\n Expression left = super.getLeft();\n Expression right = super.getRight();\n return new Plus(new Mult(left.differentiate(var), right), new Mult(left, right.differentiate(var)));\n }", "public final Expr addExpr() throws RecognitionException {\n\t\tExpr e = null;\n\n\n\t\tToken PLUS13=null;\n\t\tToken MINUS14=null;\n\t\tExpr e1 =null;\n\t\tExpr e2 =null;\n\n\n\t\t\t\tExpr it = null;\n\t\t\t\tBoolean bool = false;\n\t\t\t\tint line = -1;\n\t\t\t\tint offset = -1;\n\t\t\t\n\t\ttry {\n\t\t\t// ul.g:173:2: (e1= multExpr ( ( PLUS | MINUS ) e2= multExpr )* )\n\t\t\t// ul.g:174:3: e1= multExpr ( ( PLUS | MINUS ) e2= multExpr )*\n\t\t\t{\n\t\t\tpushFollow(FOLLOW_multExpr_in_addExpr710);\n\t\t\te1=multExpr();\n\t\t\tstate._fsp--;\n\t\t\tif (state.failed) return e;\n\t\t\tif ( state.backtracking==0 ) {it = e1;}\n\t\t\t// ul.g:175:3: ( ( PLUS | MINUS ) e2= multExpr )*\n\t\t\tloop14:\n\t\t\twhile (true) {\n\t\t\t\tint alt14=2;\n\t\t\t\tint LA14_0 = input.LA(1);\n\t\t\t\tif ( (LA14_0==MINUS||LA14_0==PLUS) ) {\n\t\t\t\t\talt14=1;\n\t\t\t\t}\n\n\t\t\t\tswitch (alt14) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// ul.g:175:4: ( PLUS | MINUS ) e2= multExpr\n\t\t\t\t\t{\n\t\t\t\t\t// ul.g:175:4: ( PLUS | MINUS )\n\t\t\t\t\tint alt13=2;\n\t\t\t\t\tint LA13_0 = input.LA(1);\n\t\t\t\t\tif ( (LA13_0==PLUS) ) {\n\t\t\t\t\t\talt13=1;\n\t\t\t\t\t}\n\t\t\t\t\telse if ( (LA13_0==MINUS) ) {\n\t\t\t\t\t\talt13=2;\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (state.backtracking>0) {state.failed=true; return e;}\n\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\tnew NoViableAltException(\"\", 13, 0, input);\n\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t}\n\n\t\t\t\t\tswitch (alt13) {\n\t\t\t\t\t\tcase 1 :\n\t\t\t\t\t\t\t// ul.g:175:5: PLUS\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tPLUS13=(Token)match(input,PLUS,FOLLOW_PLUS_in_addExpr718); if (state.failed) return e;\n\t\t\t\t\t\t\tif ( state.backtracking==0 ) {line = (PLUS13!=null?PLUS13.getLine():0); offset = PLUS13.getCharPositionInLine();}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2 :\n\t\t\t\t\t\t\t// ul.g:175:70: MINUS\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tMINUS14=(Token)match(input,MINUS,FOLLOW_MINUS_in_addExpr721); if (state.failed) return e;\n\t\t\t\t\t\t\tif ( state.backtracking==0 ) {line = (MINUS14!=null?MINUS14.getLine():0); offset = MINUS14.getCharPositionInLine();}\n\t\t\t\t\t\t\tif ( state.backtracking==0 ) {bool = true;}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tpushFollow(FOLLOW_multExpr_in_addExpr730);\n\t\t\t\t\te2=multExpr();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return e;\n\t\t\t\t\tif ( state.backtracking==0 ) {it = new AddExpr(it, e2, bool, line, offset);}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault :\n\t\t\t\t\tbreak loop14;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( state.backtracking==0 ) {\n\t\t\t\t\te = it;\n\t\t\t\t}\n\t\t}\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\trecover(input,re);\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn e;\n\t}", "public static void main(String[] args) {\n NumberFact a, b;\n a = new NumberFact(1_000);\n b = new NumberFact(999);\n\n ArithmeticOperator x, y;\n x = new ArithmeticOperator('*', a, b);\n y = new ArithmeticOperator('+', x, b);\n\n System.out.println(y);\n System.out.println(y.eval());\n }", "private void createMul(Code32 code, int op, int cond, int Rd, int Rn, int Rm) {\r\n\t\tcode.instructions[code.iCount] = (cond << 28) | op | (Rd << 16) | (Rm << 8) | (0x9 << 4) | Rn;\r\n\t\tcode.incInstructionNum();\r\n\t}", "public static BinaryExpression multiplyAssign(Expression expression0, Expression expression1) {\n return makeBinary(ExpressionType.MultiplyAssign, expression0, expression1);\n }", "LengthScalarMultiply createLengthScalarMultiply();", "public final CQLParser.multiplicativeExpression_return multiplicativeExpression() throws RecognitionException {\n CQLParser.multiplicativeExpression_return retval = new CQLParser.multiplicativeExpression_return();\n retval.start = input.LT(1);\n\n Object root_0 = null;\n\n Token set100=null;\n CQLParser.powerExpression_return powerExpression99 = null;\n\n CQLParser.powerExpression_return powerExpression101 = null;\n\n\n Object set100_tree=null;\n\n try {\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:404:2: ( powerExpression ( ( MULT | DIV ) powerExpression )* )\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:404:4: powerExpression ( ( MULT | DIV ) powerExpression )*\n {\n root_0 = (Object)adaptor.nil();\n\n pushFollow(FOLLOW_powerExpression_in_multiplicativeExpression1886);\n powerExpression99=powerExpression();\n\n state._fsp--;\n\n adaptor.addChild(root_0, powerExpression99.getTree());\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:404:20: ( ( MULT | DIV ) powerExpression )*\n loop27:\n do {\n int alt27=2;\n int LA27_0 = input.LA(1);\n\n if ( ((LA27_0>=MULT && LA27_0<=DIV)) ) {\n alt27=1;\n }\n\n\n switch (alt27) {\n \tcase 1 :\n \t // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:404:21: ( MULT | DIV ) powerExpression\n \t {\n \t set100=(Token)input.LT(1);\n \t set100=(Token)input.LT(1);\n \t if ( (input.LA(1)>=MULT && input.LA(1)<=DIV) ) {\n \t input.consume();\n \t root_0 = (Object)adaptor.becomeRoot((Object)adaptor.create(set100), root_0);\n \t state.errorRecovery=false;\n \t }\n \t else {\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t throw mse;\n \t }\n\n \t pushFollow(FOLLOW_powerExpression_in_multiplicativeExpression1896);\n \t powerExpression101=powerExpression();\n\n \t state._fsp--;\n\n \t adaptor.addChild(root_0, powerExpression101.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop27;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (Object)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n \t\n \tcatch(RecognitionException re)\n \t{\t\n \t\treportError(re);\n \t\tthrow re;\n \t}\n finally {\n }\n return retval;\n }", "Sum getMultiplier();", "public MathEval() {\r\n super();\r\n\r\n constants=new TreeMap<String,Double>(String.CASE_INSENSITIVE_ORDER);\r\n setConstant(\"E\" ,Math.E);\r\n setConstant(\"Euler\" ,0.577215664901533D);\r\n setConstant(\"LN2\" ,0.693147180559945D);\r\n setConstant(\"LN10\" ,2.302585092994046D);\r\n setConstant(\"LOG2E\" ,1.442695040888963D);\r\n setConstant(\"LOG10E\",0.434294481903252D);\r\n setConstant(\"PHI\" ,1.618033988749895D);\r\n setConstant(\"PI\" ,Math.PI);\r\n\r\n variables=new TreeMap<String,Double>(String.CASE_INSENSITIVE_ORDER);\r\n\r\n functions=new TreeMap<String,FunctionHandler>(String.CASE_INSENSITIVE_ORDER);\r\n\r\n offset=0;\r\n isConstant=false;\r\n }", "private ASTNode binaryMultiplyRules(ASTNode left, ASTNode right) throws Exception {\n Token leftToken = left.getToken();\n Token rightToken = right.getToken();\n\n TokenType leftType = leftToken.getType();\n TokenType rightType = rightToken.getType();\n\n Token tempToken;\n TokenType numType = TokenType.NUMBER;\n TokenType minusType = TokenType.MINUS;\n TokenType mulType = TokenType.MUL;\n\n if (rightToken.getIdentifier().equals(\"0\")){\n //left is anything and right is 0\n tempToken = new Token(numType, \"0\");\n return new Num(tempToken);\n }\n else if (rightToken.getIdentifier().equals(\"1\")){\n //left is anything and right is 1\n return left;\n }\n else if (leftToken.getIdentifier().equals(\"0\")){\n //left is 0 and right is anything\n tempToken = new Token(numType, \"0\");\n return new Num(tempToken);\n }\n else if (leftToken.getIdentifier().equals(\"1\")){\n //left is 1 and right is anything\n return right;\n }\n else if(patternMatcher(leftType, rightType, numType, numType)){\n Double leftVal = Double.parseDouble(leftToken.getIdentifier());\n Double rightVal = Double.parseDouble(rightToken.getIdentifier());\n\n String prod = String.valueOf(leftVal * rightVal);\n tempToken = new Token(numType, prod);\n return new Num(tempToken);\n }\n else if (patternMatcher(leftType, rightType, minusType, minusType)){\n if (left instanceof UnaryOP && right instanceof UnaryOP){\n tempToken = new Token(mulType);\n ASTNode leftOP = ((UnaryOP) left).getOperand();\n ASTNode rightOp = ((UnaryOP) right).getOperand();\n return new BinaryOp(tempToken, leftOP, rightOp);\n }\n }\n tempToken = new Token(mulType);\n return new BinaryOp(tempToken ,left, right);\n }", "public static Rational multiply(Rational num1, Rational num2){\r\n Rational product = new Rational();\r\n \r\n // multiply throughout\r\n product.denominator = num1.getDenominator() * num2.getDenominator();\r\n product.numerator = num1.getNumerator() * num2.getNumerator();\r\n \r\n product.reduce();\r\n return product;\r\n }", "Matrix scalarMult(double x){\n int newMatrixSize = this.getSize();\n Matrix newM = new Matrix(newMatrixSize);\n for(int i = 1; i <= newMatrixSize; i++){\n List itRow = rows[i - 1];\n itRow.moveFront();\n while(itRow.index() != -1){\n Entry c = (Entry)itRow.get();\n newM.changeEntry(i, c.column, (x*c.value));\n itRow.moveNext();\n }\n }\n\n return newM;\n }", "@Override\n\tpublic Instruction parse(String[] s) throws WrongInstructionFormatException {\n\t\tif (s.length==1 && s[0].equalsIgnoreCase(\"mult\")) \n\t\t\treturn new Mult();\n\t\telse throw new WrongInstructionFormatException();\n\t}", "@Override\n public InterpreterValue mul(InterpreterValue v) {\n\n // If the given value is a IntegerValue create a new DoubleValue from\n // the multiplication-result\n if(v instanceof IntegerValue) return new DoubleValue(getValue() * ((IntegerValue) v).getValue());\n\n // If the given value is a DoubleValue create a new DoubleValue from\n // the multiplication-result\n if(v instanceof DoubleValue) return new DoubleValue(getValue() * ((DoubleValue) v).getValue());\n\n // In other case just throw an error\n throw new Error(\"Operator '*' is not defined for type double and \" + v.getName());\n\n }", "public final Expr mulExpr() throws RecognitionException {\r\n Expr result = null;\r\n\r\n int mulExpr_StartIndex = input.index();\r\n\r\n Token op=null;\r\n Expr lhs =null;\r\n\r\n Expr rhs =null;\r\n\r\n\r\n try {\r\n if ( state.backtracking>0 && alreadyParsedRule(input, 14) ) { return result; }\r\n\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:108:5: (lhs= unExpr (op= ( '*' | '/' ) rhs= unExpr )* )\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:108:9: lhs= unExpr (op= ( '*' | '/' ) rhs= unExpr )*\r\n {\r\n pushFollow(FOLLOW_unExpr_in_mulExpr613);\r\n lhs=unExpr();\r\n\r\n state._fsp--;\r\n if (state.failed) return result;\r\n\r\n if ( state.backtracking==0 ) { result =lhs; }\r\n\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:108:45: (op= ( '*' | '/' ) rhs= unExpr )*\r\n loop9:\r\n do {\r\n int alt9=2;\r\n int LA9_0 = input.LA(1);\r\n\r\n if ( (LA9_0==23||LA9_0==26) ) {\r\n alt9=1;\r\n }\r\n\r\n\r\n switch (alt9) {\r\n \tcase 1 :\r\n \t // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:108:47: op= ( '*' | '/' ) rhs= unExpr\r\n \t {\r\n \t op=(Token)input.LT(1);\r\n\r\n \t if ( input.LA(1)==23||input.LA(1)==26 ) {\r\n \t input.consume();\r\n \t state.errorRecovery=false;\r\n \t state.failed=false;\r\n \t }\r\n \t else {\r\n \t if (state.backtracking>0) {state.failed=true; return result;}\r\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\r\n \t throw mse;\r\n \t }\r\n\r\n\r\n \t pushFollow(FOLLOW_unExpr_in_mulExpr633);\r\n \t rhs=unExpr();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return result;\r\n\r\n \t if ( state.backtracking==0 ) { \r\n \t if ((op!=null?op.getText():null).equals(\"*\")) {\r\n \t result = new Mul(result, rhs);\r\n \t }\r\n \t if ((op!=null?op.getText():null).equals(\"/\")) {\r\n \t result = new Div(result, rhs); \r\n \t }\r\n \t }\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop9;\r\n }\r\n } while (true);\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n if ( state.backtracking>0 ) { memoize(input, 14, mulExpr_StartIndex); }\r\n\r\n }\r\n return result;\r\n }", "public static EquationExpression timesRaw(EquationExpression... args) {\n\t\tswitch (args.length) {\n\t\tcase 0:\n\t\t\treturn EquationNumericValue.from(1);\n\t\tcase 1:\n\t\t\treturn args[0];\n\t\tcase 2:\n\t\t\treturn new EquationProductOperator(args[0], args[1]);\n\t\tdefault:\n\t\t\tEquationExpression[] args2 = new EquationExpression[args.length\n\t\t\t\t\t- 1];\n\t\t\tSystem.arraycopy(args, 1, args2, 0, args.length - 1);\n\t\t\treturn new EquationProductOperator(args[0], sumRaw(args2));\n\t\t}\n\t}", "public final void entryRuleMultExp() throws RecognitionException {\n try {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1377:1: ( ruleMultExp EOF )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1378:1: ruleMultExp EOF\n {\n before(grammarAccess.getMultExpRule()); \n pushFollow(FOLLOW_ruleMultExp_in_entryRuleMultExp2881);\n ruleMultExp();\n\n state._fsp--;\n\n after(grammarAccess.getMultExpRule()); \n match(input,EOF,FOLLOW_EOF_in_entryRuleMultExp2888); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }", "public static EquationExpression timesRaw(EquationExpression... args) {\n switch(args.length) {\n case 0:\n return EquationNumericValue.from(1);\n case 1:\n return args[0];\n case 2:\n return new EquationProductOperator(args[0], args[1]);\n default:\n EquationExpression[] args2 = new EquationExpression[args.length-1];\n System.arraycopy(args, 1, args2, 0, args.length-1);\n return new EquationProductOperator(args[0], sumRaw(args2));\n }\n }", "public final void mult (Unit unit) throws ArithmeticException {\n\t\tlong u = mksa ; double r = factor; double v = value; double o = offset;\n\t\t/* dump(\"mult:this \"); unit.dump(\"mult:unit\"); */\n\t\tif (((mksa&_abs)!=0) && (unit.factor != 1)) throw\t// On a date\n\t\tnew ArithmeticException(\"****Unit.mult on a date!\");\n\t\tif (((mksa|unit.mksa)&_log) != 0) {\n\t\t\tif ((mksa == underScore) && (factor == 1.)) ;\n\t\t\telse if ((unit.mksa == underScore) && (unit.factor == 1.)) ;\n\t\t\telse throw new ArithmeticException\n\t\t\t(\"****Unit: can't multiply logs: \" + symbol + \" x \" + unit.symbol);\n\t\t}\n\t\t/* As soon as there is an operation, the offset is ignored \n\t\t * except if one of the factors is unity.\n\t\t */\n\t\tif ((offset!=0) || (unit.offset!=0)) {\n\t\t\tif (mksa == underScore) offset = unit.offset;\n\t\t\telse if (unit.mksa == underScore) ;\n\t\t\telse offset = 0;\n\t\t}\n\t\tv *= unit.value; \n\t\tr *= unit.factor;\n\t\tu += unit.mksa; u -= underScore;\n\t\tif ((u&0x0c80808080808080L) != 0) throw new ArithmeticException\n\t\t(\"****too large powers in: \" + symbol + \" x \" + unit.symbol);\n\t\tmksa = u;\n\t\tfactor = r;\n\t\tvalue = v;\n\t\t/* Decision for the new symbol */\n\t\tif ((symbol != null) && (unit.symbol != null)) {\n\t\t\tif ((unit.mksa == underScore) && (unit.factor == 1)) return;\t// No unit ...\n\t\t\tif (( mksa == underScore) && ( factor == 1)) symbol = unit.symbol;\n\t\t\telse if ((symbol.equals(unit.symbol)) && (factor == unit.factor))\n\t\t\t\tsymbol = toExpr(symbol) + \"2\" ;\n\t\t\telse symbol = toExpr(symbol) + \".\" + toExpr(unit.symbol) ;\n\t\t}\n\t}", "public final Expr addExpr() throws RecognitionException {\n Expr result = null;\n\n int addExpr_StartIndex = input.index();\n\n Token op=null;\n Expr lhs =null;\n\n Expr rhs =null;\n\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 11) ) { return result; }\n\n // /home/jahn/workspace1/QLAndroid/src/org/uva/sea/ql/parser/antlr/QL.g:124:5: (lhs= mulExpr (op= ( '+' | '-' ) rhs= mulExpr )* )\n // /home/jahn/workspace1/QLAndroid/src/org/uva/sea/ql/parser/antlr/QL.g:124:9: lhs= mulExpr (op= ( '+' | '-' ) rhs= mulExpr )*\n {\n pushFollow(FOLLOW_mulExpr_in_addExpr547);\n lhs=mulExpr();\n\n state._fsp--;\n if (state.failed) return result;\n\n if ( state.backtracking==0 ) { result =lhs; }\n\n // /home/jahn/workspace1/QLAndroid/src/org/uva/sea/ql/parser/antlr/QL.g:124:46: (op= ( '+' | '-' ) rhs= mulExpr )*\n loop8:\n do {\n int alt8=2;\n int LA8_0 = input.LA(1);\n\n if ( ((LA8_0 >= 21 && LA8_0 <= 22)) ) {\n alt8=1;\n }\n\n\n switch (alt8) {\n \tcase 1 :\n \t // /home/jahn/workspace1/QLAndroid/src/org/uva/sea/ql/parser/antlr/QL.g:124:48: op= ( '+' | '-' ) rhs= mulExpr\n \t {\n \t op=(Token)input.LT(1);\n\n \t if ( (input.LA(1) >= 21 && input.LA(1) <= 22) ) {\n \t input.consume();\n \t state.errorRecovery=false;\n \t state.failed=false;\n \t }\n \t else {\n \t if (state.backtracking>0) {state.failed=true; return result;}\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t throw mse;\n \t }\n\n\n \t pushFollow(FOLLOW_mulExpr_in_addExpr565);\n \t rhs=mulExpr();\n\n \t state._fsp--;\n \t if (state.failed) return result;\n\n \t if ( state.backtracking==0 ) { \n \t if ((op!=null?op.getText():null).equals(\"+\")) {\n \t result = new Add(result, rhs);\n \t }\n \t if ((op!=null?op.getText():null).equals(\"-\")) {\n \t result = new Sub(result, rhs); \n \t }\n \t }\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop8;\n }\n } while (true);\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n\n finally {\n \t// do for sure before leaving\n if ( state.backtracking>0 ) { memoize(input, 11, addExpr_StartIndex); }\n\n }\n return result;\n }", "Point mult (double s, Point result);", "@Override\r\n\tpublic void mul(int x, int y) {\n\t\t\r\n\t}", "@Override\r\n\tpublic int multi(int x, int y) {\n\t\treturn x * y;\r\n\t}", "CalcEvaluator(boolean mult) {\r\n this.mult = mult;\r\n }", "@Override\r\n\tpublic int mul() {\n\t\treturn 0;\r\n\t}", "public double multiplica(double a, double b) {\n\t\treturn a*b;\n\t}", "public final void mMUL() throws RecognitionException\n\t{\n\t\ttry\n\t\t{\n\t\t\tfinal int _type = AshvmLexer.MUL;\n\t\t\tfinal int _channel = BaseRecognizer.DEFAULT_TOKEN_CHANNEL;\n\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:708:5: ( 'mul' )\n\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:708:7: 'mul'\n\t\t\t{\n\t\t\t\tthis.match(\"mul\");\n\n\t\t\t}\n\n\t\t\tthis.state.type = _type;\n\t\t\tthis.state.channel = _channel;\n\t\t}\n\t\tfinally\n\t\t{\n\t\t}\n\t}", "public R3Mult(int rdIndex, int rsIndex, int id) {\n\n }", "@Override\n\tpublic int mult(int val1, int val2) {\n\t\treturn val1 * val2;\n\t}", "public final void rule__AddExp__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:8253:1: ( ( ruleMultExp ) )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:8254:1: ( ruleMultExp )\n {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:8254:1: ( ruleMultExp )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:8255:1: ruleMultExp\n {\n before(grammarAccess.getAddExpAccess().getMultExpParserRuleCall_0()); \n pushFollow(FOLLOW_ruleMultExp_in_rule__AddExp__Group__0__Impl16577);\n ruleMultExp();\n\n state._fsp--;\n\n after(grammarAccess.getAddExpAccess().getMultExpParserRuleCall_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "<C, PM> VariableExp<C, PM> createVariableExp();", "private Complex eval(Complex[] ca, Complex x) {\n\t\tComplex result = ca[0];\n\t\tfor (int i = 1; i < ca.length; i++) {\n\t\t\tresult = result.mul(x).add(ca[i]);\n\t\t}\n\t\treturn result;\n\t}", "public final double multExpr() throws RecognitionException {\n double value = 0.0;\n\n\n double e =0.0;\n\n\n try {\n // ExprInterp.g:32:5: (e= atom ( '*' e= atom )* )\n // ExprInterp.g:32:9: e= atom ( '*' e= atom )*\n {\n pushFollow(FOLLOW_atom_in_multExpr248);\n e=atom();\n\n state._fsp--;\n\n\n value = e;\n\n // ExprInterp.g:32:37: ( '*' e= atom )*\n loop5:\n do {\n int alt5=2;\n int LA5_0 = input.LA(1);\n\n if ( (LA5_0==12) ) {\n alt5=1;\n }\n\n\n switch (alt5) {\n \tcase 1 :\n \t // ExprInterp.g:32:38: '*' e= atom\n \t {\n \t match(input,12,FOLLOW_12_in_multExpr253); \n\n \t pushFollow(FOLLOW_atom_in_multExpr257);\n \t e=atom();\n\n \t state._fsp--;\n\n\n \t value *= e;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop5;\n }\n } while (true);\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n\n finally {\n \t// do for sure before leaving\n }\n return value;\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 }", "private static native double mul(int n);", "private String compute(String equ,String op)\n {\n String equation = equ;\n Pattern mdPattern = Pattern.compile(\"(\\\\d+([.]\\\\d+)*)(([\"+op+\"]))(\\\\d+([.]\\\\d+)*)\");\n Matcher matcher\t\t= mdPattern.matcher(equation);\n while(matcher.find())\n {\n String[] arr = null;\n double ans = 0;\n String eq = matcher.group(0);//get form x*y\n if(eq.contains(op))\n {\n arr = eq.split(\"\\\\\"+op);//make arr\n if(op.equals(\"*\"))\n ans = Double.valueOf(arr[0])*Double.valueOf(arr[1]);//compute\n if(op.equals(\"/\"))\n ans = Double.valueOf(arr[0])/Double.valueOf(arr[1]);//compute\n if(op.equals(\"+\"))\n ans = Double.valueOf(arr[0])+Double.valueOf(arr[1]);//compute\n if(op.equals(\"-\"))\n ans = Double.valueOf(arr[0])-Double.valueOf(arr[1]);//compute\n }\n\n equation = matcher.replaceFirst(String.valueOf(ans));//replace in equation\n matcher = mdPattern.matcher(equation);//look for more matches\n }\n return equation;\n }", "public void multiply(Object mulValue) {\r\n\r\n\t\tNumberOperation operator = new NumberOperation(this.value, mulValue) {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic Number doAnOperation() {\r\n\t\t\t\tTypeEnum typeOfResult = getFinalType();\r\n\t\t\t\tif(typeOfResult == TypeEnum.TYPE_INTEGER) {\r\n\t\t\t\t\treturn getO1().intValue() * getO2().intValue();\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\treturn getO1().doubleValue() * getO2().doubleValue();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t\tthis.value = operator.doAnOperation();\r\n\t}", "public void mul(String a, String b, int i, String reg) {\r\n registerName.add(reg);\r\n int posa = registerRegister.indexOf(a);\r\n int posb = registerRegister.indexOf(b);\r\n int element = Integer.parseInt(registerValues.get(posa));\r\n int element1 = Integer.parseInt(registerValues.get(posb));\r\n int mul = element * element1;\r\n registerValues.add(Integer.toString(mul));\r\n }", "public static void main(String args[]) {\n\tExpr e3 = new Minus(new Num(100),new Num(99));\n\tSystem.out.println(\"e3 is \" + e3.exprToString());\n\t// outputs \"e4 is (4*5-(100-99))\"\n\tExpr e4 = new Minus(new Times(new Num(4),new Num(5)),e3);\n\tSystem.out.println(\"e4 is \" + e4.exprToString());\n }", "public void multiply(double multiplier) {\n x *= multiplier;\n y *= multiplier;\n }", "Rational multiply(Rational p){\n Rational firstarg=new Rational();\n firstarg.numerator=numerator;\n firstarg.denominator=denominator;\n\n firstarg.numerator=p.numerator*firstarg.numerator;\n firstarg.denominator=p.denominator*firstarg.denominator;\n return firstarg;\n }", "public final void synpred27_expression_fragment() throws RecognitionException { \n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:11: ( ( '+' | '-' ) mult )\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:11: ( '+' | '-' ) mult\n {\n if ( (input.LA(1)>=46 && input.LA(1)<=47) ) {\n input.consume();\n state.errorRecovery=false;state.failed=false;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n MismatchedSetException mse = new MismatchedSetException(null,input);\n throw mse;\n }\n\n pushFollow(FOLLOW_mult_in_synpred27_expression437);\n mult();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n }" ]
[ "0.71816504", "0.68509716", "0.6790061", "0.6790061", "0.6719847", "0.662252", "0.6524968", "0.6454907", "0.6425489", "0.64137614", "0.6231617", "0.6115805", "0.6112296", "0.6065207", "0.60344887", "0.6033878", "0.600525", "0.59952325", "0.5972148", "0.594838", "0.59280413", "0.5922113", "0.5917301", "0.5884391", "0.58605164", "0.5824194", "0.5792324", "0.57897234", "0.5735053", "0.57310444", "0.5702243", "0.5685638", "0.566538", "0.56604946", "0.5624147", "0.56180614", "0.5613636", "0.5608072", "0.56037015", "0.5579075", "0.5563172", "0.55553854", "0.55489737", "0.5538042", "0.5535295", "0.55218285", "0.5514709", "0.55080235", "0.5507662", "0.55014133", "0.5496578", "0.54754764", "0.54668754", "0.54659885", "0.5457093", "0.54570585", "0.5451691", "0.5443317", "0.54366785", "0.54326445", "0.5425212", "0.540909", "0.53834087", "0.53812927", "0.53713524", "0.53704965", "0.5364532", "0.5336682", "0.5333563", "0.53205645", "0.53128475", "0.53083515", "0.5305448", "0.52945733", "0.52901757", "0.5278995", "0.52752465", "0.5273296", "0.52655876", "0.52618086", "0.52584034", "0.5256669", "0.5248384", "0.52452195", "0.5244816", "0.52433026", "0.5236883", "0.52323365", "0.52319634", "0.52287084", "0.52283555", "0.52114177", "0.520705", "0.52025074", "0.5201104", "0.5196095", "0.5193989", "0.5193367", "0.5179163", "0.5177159" ]
0.5608406
37
Constructs a mult by given expressions.
public Mult(String left, double right) { super(left, right); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Expression multExpression() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tExpression e0 = powerExpression();\r\n\t\twhile(isKind(OP_TIMES, OP_DIV, OP_MOD)) {\r\n\t\t\tToken op = consume();\r\n\t\t\tExpression e1 = powerExpression();\r\n\t\t\te0 = new ExpressionBinary(first,e0,op,e1);\r\n\t\t}\r\n\t\treturn e0;\r\n\t}", "private Expr mult(Expr x) throws Err {\n if (x instanceof ExprUnary) {\n ExprUnary y=(ExprUnary)x;\n if (y.op==ExprUnary.Op.SOME) return ExprUnary.Op.SOMEOF.make(y.pos, y.sub);\n if (y.op==ExprUnary.Op.LONE) return ExprUnary.Op.LONEOF.make(y.pos, y.sub);\n if (y.op==ExprUnary.Op.ONE) return ExprUnary.Op.ONEOF.make(y.pos, y.sub);\n }\n return x;\n }", "public Mult(Expression left, Expression right) {\n super(left, right);\n }", "public Mult(Expression left, Expression right) {\n super(left, right);\n }", "Multiply createMultiply();", "public final VecMathParser.expr_return expr() throws RecognitionException {\n VecMathParser.expr_return retval = new VecMathParser.expr_return();\n retval.start = input.LT(1);\n\n Object root_0 = null;\n\n Token char_literal8=null;\n VecMathParser.multExpr_return multExpr7 = null;\n\n VecMathParser.multExpr_return multExpr9 = null;\n\n\n Object char_literal8_tree=null;\n\n try {\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:15:5: ( multExpr ( '+' multExpr )* )\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:15:7: multExpr ( '+' multExpr )*\n {\n root_0 = (Object)adaptor.nil();\n\n pushFollow(FOLLOW_multExpr_in_expr117);\n multExpr7=multExpr();\n\n state._fsp--;\n\n adaptor.addChild(root_0, multExpr7.getTree());\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:15:16: ( '+' multExpr )*\n loop3:\n do {\n int alt3=2;\n int LA3_0 = input.LA(1);\n\n if ( (LA3_0==10) ) {\n alt3=1;\n }\n\n\n switch (alt3) {\n \tcase 1 :\n \t // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:15:17: '+' multExpr\n \t {\n \t char_literal8=(Token)match(input,10,FOLLOW_10_in_expr120); \n \t char_literal8_tree = (Object)adaptor.create(char_literal8);\n \t root_0 = (Object)adaptor.becomeRoot(char_literal8_tree, root_0);\n\n \t pushFollow(FOLLOW_multExpr_in_expr123);\n \t multExpr9=multExpr();\n\n \t state._fsp--;\n\n \t adaptor.addChild(root_0, multExpr9.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop3;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (Object)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "public Mult(String left, Expression right) {\n super(left, right);\n }", "public Mult(Expression left, double right) {\n super(left, right);\n }", "public Mult(double left, Expression right) {\n super(left, right);\n }", "public Mult(Expression left, String right) {\n super(left, right);\n }", "void visit(MultiplicationExpression expression);", "public BinMltLinExpr multiply(BinLinExpr expr) {\n\t\t\n\t\tBinMltLinExpr result = new BinMltLinExpr();\n\t\t\n\t\t// Multiply variables together\n\t\tfor (int i = 0; i < expr.vars.size(); i++) {\n\t\t\tfor (int j = 0; j < termVars.size(); j++) {\n\t\t\t\t\n\t\t\t\tdouble newCoeff = expr.coefficients.get(i) * coefficients.get(j);\n\t\t\t\tList<BinVar> newVars = new ArrayList<BinVar>();\n\t\t\t\tnewVars.add(expr.vars.get(i));\n\t\t\t\tnewVars.addAll(termVars.get(j));\n\t\t\t\t\n\t\t\t\tresult.addTerm(newCoeff, newVars);\n\t\t\t}\n\t\t}\n\n\t\t// Multiply variables with constants\n\t\tfor (int i = 0; i < termVars.size(); i++) {\n\t\t\tdouble newCoeff = coefficients.get(i) * expr.constant;\n\t\t\tresult.addTerm(newCoeff, termVars.get(i));\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < expr.vars.size(); i++) {\n\t\t\tdouble newCoeff = expr.coefficients.get(i) * constant;\n\t\t\tresult.addTerm(newCoeff, expr.vars.get(i));\n\t\t}\n\t\t\n\t\tresult.addConstant(constant*expr.constant);\n\t\t\n\t\treturn result;\n\t}", "public void enfoncerMult() {\n\t\ttry {\n\t\t\tthis.op = new Mult();\n\t\t\tif (!raz) {\n\t\t\t\tthis.pile.push(valC);\n\t\t\t}\n\t\t\tint a = this.pile.pop(); int b = this.pile.pop();\n\t\t\tthis.valC = this.op.eval(b,a);\n\t\t\tthis.pile.push(this.valC);\n\t\t\tthis.raz = true;\n\t\t}\n\t\tcatch (EmptyStackException e) {\n\t\t\tSystem.out.println(\"Erreur de syntaxe : Saisir deux operandes avant de saisir un operateur\");\n\t\t}\n\t}", "public Transformation mult(Transformation a) {\n\t\tTransformation result = new Transformation();\n\t\tsuper.mult(a, result);\n\t\treturn result;\n\t}", "@Override\n public Expression assign(String var, Expression expression) {\n Expression left = super.getLeft();\n Expression right = super.getRight();\n return new Mult(left.assign(var, expression), right.assign(var, expression));\n }", "private void mul() {\n\n\t}", "public void multiply() {\n\t\t\n\t}", "public static double multi() {\n System.out.println(\"Enter multiplier\");\n double a = getNumber();\n System.out.println(\"Enter multiplicand\");\n double b = getNumber();\n\n return a * b;\n }", "@SuppressWarnings(\"unchecked\")\n @Override\n public Expression asExpression(Rule rule, Deque<Value<Expression>> args) {\n if (args.size() == 1) {\n // a single term is not a product\n return args.pollFirst().getTarget();\n } else {\n // assume x to be *x, because the product will start by 1*x\n Term<Multiplicative> factor = new Term<>(Multiplicative.MULT, args.removeFirst().getTarget());\n List<Term<Multiplicative>> arguments = new LinkedList<>();\n arguments.add(factor);\n args.stream()\n // next arguments are all Term<Multiplicative>\n .map(v -> (Term<Multiplicative>) v.getTarget())\n .forEachOrdered(arguments::add);\n return new Product(arguments);\n }\n }", "public static void main(String[] args) throws Exception {\r\n Expression e = new Plus(new Mult(2, \"x\"), new Plus(new Sin(new Mult(4, \"y\")), new Pow(\"e\", \"x\")));\r\n System.out.println(e);\r\n Map<String, Double> assignment = new TreeMap<String, Double>();\r\n assignment.put(\"x\", 2.0);\r\n assignment.put(\"y\", 0.25);\r\n assignment.put(\"e\", 2.71);\r\n System.out.println(e.evaluate(assignment));\r\n e = e.differentiate(\"x\");\r\n System.out.println(e);\r\n System.out.println(e.evaluate(assignment));\r\n System.out.println(e.simplify());\r\n System.out.println(e);\r\n }", "public BinMltLinExpr multiply(BinMltLinExpr expr) {\n\t\t\n\t\tBinMltLinExpr result = new BinMltLinExpr();\n\t\t\n\t\t// Multiply variables together\n\t\tfor (int i = 0; i < expr.termVars.size(); i++) {\n\t\t\tfor (int j = 0; j < termVars.size(); j++) {\n\t\t\t\t\n\t\t\t\tdouble newCoeff = expr.coefficients.get(i) * coefficients.get(j);\n\t\t\t\tList<BinVar> newVars = new ArrayList<BinVar>();\n\t\t\t\tnewVars.addAll(expr.termVars.get(i));\n\t\t\t\tnewVars.addAll(termVars.get(j));\n\t\t\t\t\n\t\t\t\tresult.addTerm(newCoeff, newVars);\n\t\t\t}\n\t\t}\n\n\t\t// Multiply variables with constants\n\t\tfor (int i = 0; i < termVars.size(); i++) {\n\t\t\tdouble newCoeff = coefficients.get(i) * expr.constant;\n\t\t\tresult.addTerm(newCoeff, termVars.get(i));\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < expr.termVars.size(); i++) {\n\t\t\tdouble newCoeff = expr.coefficients.get(i) * constant;\n\t\t\tresult.addTerm(newCoeff, expr.termVars.get(i));\n\t\t}\n\t\t\n\t\tresult.addConstant(constant*expr.constant);\n\t\t\n\t\treturn result;\n\t}", "public final VecMathParser.multExpr_return multExpr() throws RecognitionException {\n VecMathParser.multExpr_return retval = new VecMathParser.multExpr_return();\n retval.start = input.LT(1);\n\n Object root_0 = null;\n\n Token char_literal11=null;\n Token char_literal12=null;\n VecMathParser.primary_return primary10 = null;\n\n VecMathParser.primary_return primary13 = null;\n\n\n Object char_literal11_tree=null;\n Object char_literal12_tree=null;\n\n try {\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:5: ( primary ( ( '*' | '.' ) primary )* )\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:9: primary ( ( '*' | '.' ) primary )*\n {\n root_0 = (Object)adaptor.nil();\n\n pushFollow(FOLLOW_primary_in_multExpr145);\n primary10=primary();\n\n state._fsp--;\n\n adaptor.addChild(root_0, primary10.getTree());\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:17: ( ( '*' | '.' ) primary )*\n loop5:\n do {\n int alt5=2;\n int LA5_0 = input.LA(1);\n\n if ( ((LA5_0>=11 && LA5_0<=12)) ) {\n alt5=1;\n }\n\n\n switch (alt5) {\n \tcase 1 :\n \t // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:18: ( '*' | '.' ) primary\n \t {\n \t // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:18: ( '*' | '.' )\n \t int alt4=2;\n \t int LA4_0 = input.LA(1);\n\n \t if ( (LA4_0==11) ) {\n \t alt4=1;\n \t }\n \t else if ( (LA4_0==12) ) {\n \t alt4=2;\n \t }\n \t else {\n \t NoViableAltException nvae =\n \t new NoViableAltException(\"\", 4, 0, input);\n\n \t throw nvae;\n \t }\n \t switch (alt4) {\n \t case 1 :\n \t // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:19: '*'\n \t {\n \t char_literal11=(Token)match(input,11,FOLLOW_11_in_multExpr149); \n \t char_literal11_tree = (Object)adaptor.create(char_literal11);\n \t root_0 = (Object)adaptor.becomeRoot(char_literal11_tree, root_0);\n\n\n \t }\n \t break;\n \t case 2 :\n \t // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:24: '.'\n \t {\n \t char_literal12=(Token)match(input,12,FOLLOW_12_in_multExpr152); \n \t char_literal12_tree = (Object)adaptor.create(char_literal12);\n \t root_0 = (Object)adaptor.becomeRoot(char_literal12_tree, root_0);\n\n\n \t }\n \t break;\n\n \t }\n\n \t pushFollow(FOLLOW_primary_in_multExpr156);\n \t primary13=primary();\n\n \t state._fsp--;\n\n \t adaptor.addChild(root_0, primary13.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop5;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (Object)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "@Override\n\tpublic void visit(MultiplyNode node) {\n\t\tif (Evaluator.checkScope(node) == false) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (Evaluator.checkAssert(node) == false) {\n\t\t\treturn;\n\t\t}\n\n\t\t/**\n\t\t * evaluam cei doi fii\n\t\t */\n\t\tEvaluator.evaluate(node.getChild(0));\n\t\tEvaluator.evaluate(node.getChild(1));\n\n\t\tInteger i, j;\n\t\t/**\n\t\t * salvam si inmultim valorile rezulate in urma evaluarii celor 2 fii si\n\t\t * setam valoarea corespunzatoare in nodul curent\n\t\t */\n\t\tif (node.getChild(1) instanceof Variable) {\n\t\t\ti = Integer.parseInt(Evaluator.variables.get(node.getChild(1).getName()));\n\n\t\t} else {\n\t\t\ti = Integer.parseInt(node.getChild(1).getName());\n\t\t}\n\n\t\tif (node.getChild(0) instanceof Variable) {\n\t\t\tj = Integer.parseInt(Evaluator.variables.get(node.getChild(0).getName()));\n\n\t\t} else {\n\t\t\tj = Integer.parseInt(node.getChild(0).getName());\n\t\t}\n\n\t\tInteger n = i * j;\n\n\t\tnode.setName(n.toString());\n\t}", "static Double executeMultiplication(List<Double> operands) {\n Double result = null;\n for (Double operand : operands) {\n if (Objects.isNull(result)) {\n result = operand;\n }\n else {\n result = result * operand;\n }\n }\n return result;\n }", "public Polynomial visit(ProductExpression expression) {\n return Polynomial.multiply(\n expression.getLeft().accept(this),\n expression.getRight().accept(this));\n }", "BaseNumber multiply(BaseNumber operand);", "public final Expr multExpr() throws RecognitionException {\n\t\tExpr e = null;\n\n\n\t\tToken STAR15=null;\n\t\tExpr e1 =null;\n\t\tExpr e2 =null;\n\n\n\t\t\t\tExpr it = null;\n\t\t\t\n\t\ttry {\n\t\t\t// ul.g:189:3: (e1= atom ( STAR e2= atom )* )\n\t\t\t// ul.g:190:2: e1= atom ( STAR e2= atom )*\n\t\t\t{\n\t\t\tpushFollow(FOLLOW_atom_in_multExpr768);\n\t\t\te1=atom();\n\t\t\tstate._fsp--;\n\t\t\tif (state.failed) return e;\n\t\t\tif ( state.backtracking==0 ) {it = e1;}\n\t\t\t// ul.g:191:2: ( STAR e2= atom )*\n\t\t\tloop15:\n\t\t\twhile (true) {\n\t\t\t\tint alt15=2;\n\t\t\t\tint LA15_0 = input.LA(1);\n\t\t\t\tif ( (LA15_0==STAR) ) {\n\t\t\t\t\talt15=1;\n\t\t\t\t}\n\n\t\t\t\tswitch (alt15) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// ul.g:191:4: STAR e2= atom\n\t\t\t\t\t{\n\t\t\t\t\tSTAR15=(Token)match(input,STAR,FOLLOW_STAR_in_multExpr775); if (state.failed) return e;\n\t\t\t\t\tpushFollow(FOLLOW_atom_in_multExpr781);\n\t\t\t\t\te2=atom();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return e;\n\t\t\t\t\tif ( state.backtracking==0 ) {it = new MultExpr(it, e2, (STAR15!=null?STAR15.getLine():0), STAR15.getCharPositionInLine());}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault :\n\t\t\t\t\tbreak loop15;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( state.backtracking==0 ) {\n\t\t\t\t\te = it;\n\t\t\t\t}\n\t\t}\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\trecover(input,re);\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn e;\n\t}", "public T mul(T first, T second);", "public final double expr() throws RecognitionException {\n double value = 0.0;\n\n\n double e =0.0;\n\n\n try {\n // ExprInterp.g:24:5: (e= multExpr ( '+' e= multExpr | '-' e= multExpr )* |e= maxF )\n int alt4=2;\n int LA4_0 = input.LA(1);\n\n if ( ((LA4_0 >= ID && LA4_0 <= LEFTP)||LA4_0==REL) ) {\n alt4=1;\n }\n else if ( (LA4_0==MAXI) ) {\n alt4=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 4, 0, input);\n\n throw nvae;\n\n }\n switch (alt4) {\n case 1 :\n // ExprInterp.g:24:9: e= multExpr ( '+' e= multExpr | '-' e= multExpr )*\n {\n pushFollow(FOLLOW_multExpr_in_expr155);\n e=multExpr();\n\n state._fsp--;\n\n\n value = e;\n\n // ExprInterp.g:25:9: ( '+' e= multExpr | '-' e= multExpr )*\n loop3:\n do {\n int alt3=3;\n int LA3_0 = input.LA(1);\n\n if ( (LA3_0==13) ) {\n alt3=1;\n }\n else if ( (LA3_0==15) ) {\n alt3=2;\n }\n\n\n switch (alt3) {\n \tcase 1 :\n \t // ExprInterp.g:25:13: '+' e= multExpr\n \t {\n \t match(input,13,FOLLOW_13_in_expr171); \n\n \t pushFollow(FOLLOW_multExpr_in_expr175);\n \t e=multExpr();\n\n \t state._fsp--;\n\n\n \t value += e;\n\n \t }\n \t break;\n \tcase 2 :\n \t // ExprInterp.g:26:13: '-' e= multExpr\n \t {\n \t match(input,15,FOLLOW_15_in_expr191); \n\n \t pushFollow(FOLLOW_multExpr_in_expr195);\n \t e=multExpr();\n\n \t state._fsp--;\n\n\n \t value -= e;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop3;\n }\n } while (true);\n\n\n }\n break;\n case 2 :\n // ExprInterp.g:28:8: e= maxF\n {\n pushFollow(FOLLOW_maxF_in_expr221);\n e=maxF();\n\n state._fsp--;\n\n\n value = e;\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n\n finally {\n \t// do for sure before leaving\n }\n return value;\n }", "public final void mul() {\n\t\tif (size > 1) {\n\n\t\t\tdouble topMostValue = pop();\n\t\t\tdouble secondTopMostValue = pop();\n\t\t\tpush(secondTopMostValue * topMostValue);\n\t\t}\n\t}", "public static Transform mult(Transform t1, Transform t2) {\n\t\treturn transpose(t1.a * t2.a + t1.c * t2.b, t1.a * t2.c + t1.c * t2.d, t1.a * t2.tx + t1.c * t2.ty + t1.tx,\n\t\t\t\t\t\t t1.b * t2.a + t1.d * t2.b, t1.b * t2.c + t1.d * t2.d, t1.b * t2.tx + t1.d * t2.ty + t1.ty);\n\t}", "private void multiplication()\n\t{\n\t\tFun = Function.MULTIPLY; //Function set to determine what action should be taken later.\n\t\t\n\t\t\tsetLeftValue();\n\t\t\tentry.grabFocus();\n\t\t\n\t}", "public int mult()\r\n\t{\r\n\t\tint a=10;\r\n\t\tint b=20;\r\n\t\tint c = a*b;\r\n\t\treturn(c);\r\n\t}", "public Object visitMultiplicativeExpression(GNode n) {\n Object a, b, result;\n String op;\n \n nonboolean = true;\n \n dostring = true;\n \n a = dispatch(n.getGeneric(0));\n b = dispatch(n.getGeneric(2));\n op = n.getString(1);\n \n dostring = false;\n \n if (a instanceof Long && b instanceof Long) {\n if ((op.equals(\"/\")\n || op.equals(\"%\")) && ((Long) b).equals(new Long(0))) {\n System.err.println(\"division by zero in #if\");\n result = new Long(0);\n }\n if (op.equals(\"*\")) {\n result = (Long) a * (Long) b;\n }\n else if (op.equals(\"/\")) {\n result = (Long) a / (Long) b;\n }\n else if (op.equals(\"%\")) {\n result = (Long) a % (Long) b;\n }\n else {\n result = \"\";\n }\n }\n else {\n result = parens(a) + \" \" + op + \" \" + parens(b);\n }\n \n return result;\n }", "public static BinaryExpression multiply(Expression expression0, Expression expression1) {\n return makeBinary(ExpressionType.Multiply, expression0, expression1);\n }", "public T elementMult( T b ) {\n convertType.specify(this, b);\n T A = convertType.convert(this);\n b = convertType.convert(b);\n\n T c = A.createLike();\n A.ops.elementMult(A.mat, b.mat, c.mat);\n return c;\n }", "public final expressionParser.add_return add() throws RecognitionException {\n expressionParser.add_return retval = new expressionParser.add_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n Token char_literal38=null;\n Token char_literal39=null;\n expressionParser.mult_return mult37 = null;\n\n expressionParser.mult_return mult40 = null;\n\n\n CommonTree char_literal38_tree=null;\n CommonTree char_literal39_tree=null;\n\n try {\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:3: ( mult ( ( '+' | '-' ) mult )* )\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:5: mult ( ( '+' | '-' ) mult )*\n {\n root_0 = (CommonTree)adaptor.nil();\n\n pushFollow(FOLLOW_mult_in_add424);\n mult37=mult();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, mult37.getTree());\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:10: ( ( '+' | '-' ) mult )*\n loop17:\n do {\n int alt17=2;\n alt17 = dfa17.predict(input);\n switch (alt17) {\n \tcase 1 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:11: ( '+' | '-' ) mult\n \t {\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:11: ( '+' | '-' )\n \t int alt16=2;\n \t int LA16_0 = input.LA(1);\n\n \t if ( (LA16_0==46) ) {\n \t alt16=1;\n \t }\n \t else if ( (LA16_0==47) ) {\n \t alt16=2;\n \t }\n \t else {\n \t if (state.backtracking>0) {state.failed=true; return retval;}\n \t NoViableAltException nvae =\n \t new NoViableAltException(\"\", 16, 0, input);\n\n \t throw nvae;\n \t }\n \t switch (alt16) {\n \t case 1 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:12: '+'\n \t {\n \t char_literal38=(Token)match(input,46,FOLLOW_46_in_add428); if (state.failed) return retval;\n \t if ( state.backtracking==0 ) {\n \t char_literal38_tree = (CommonTree)adaptor.create(char_literal38);\n \t root_0 = (CommonTree)adaptor.becomeRoot(char_literal38_tree, root_0);\n \t }\n\n \t }\n \t break;\n \t case 2 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:19: '-'\n \t {\n \t char_literal39=(Token)match(input,47,FOLLOW_47_in_add433); if (state.failed) return retval;\n \t if ( state.backtracking==0 ) {\n \t char_literal39_tree = (CommonTree)adaptor.create(char_literal39);\n \t root_0 = (CommonTree)adaptor.becomeRoot(char_literal39_tree, root_0);\n \t }\n\n \t }\n \t break;\n\n \t }\n\n \t pushFollow(FOLLOW_mult_in_add437);\n \t mult40=mult();\n\n \t state._fsp--;\n \t if (state.failed) return retval;\n \t if ( state.backtracking==0 ) adaptor.addChild(root_0, mult40.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop17;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "public Double eval(Double... operands);", "public Mult(double left, String right) {\n super(left, right);\n }", "public <V extends Number> FluentExp<V> times (SQLExpression<V> expr)\n {\n return new Mul<V>(this, expr);\n }", "public static MathNode create(List<MathNode> nodes) {\n return new PowerNode(nodes);\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"MULT\";\n\t}", "NumericExpression createNumericExpression();", "abstract void mulS();", "public final expressionParser.mult_return mult() throws RecognitionException {\n expressionParser.mult_return retval = new expressionParser.mult_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n Token char_literal42=null;\n Token char_literal43=null;\n expressionParser.unary_return unary41 = null;\n\n expressionParser.unary_return unary44 = null;\n\n\n CommonTree char_literal42_tree=null;\n CommonTree char_literal43_tree=null;\n\n try {\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:3: ( unary ( ( '*' | '/' ) unary )* )\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:5: unary ( ( '*' | '/' ) unary )*\n {\n root_0 = (CommonTree)adaptor.nil();\n\n pushFollow(FOLLOW_unary_in_mult454);\n unary41=unary();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, unary41.getTree());\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:11: ( ( '*' | '/' ) unary )*\n loop19:\n do {\n int alt19=2;\n int LA19_0 = input.LA(1);\n\n if ( ((LA19_0>=48 && LA19_0<=49)) ) {\n alt19=1;\n }\n\n\n switch (alt19) {\n \tcase 1 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:12: ( '*' | '/' ) unary\n \t {\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:12: ( '*' | '/' )\n \t int alt18=2;\n \t int LA18_0 = input.LA(1);\n\n \t if ( (LA18_0==48) ) {\n \t alt18=1;\n \t }\n \t else if ( (LA18_0==49) ) {\n \t alt18=2;\n \t }\n \t else {\n \t if (state.backtracking>0) {state.failed=true; return retval;}\n \t NoViableAltException nvae =\n \t new NoViableAltException(\"\", 18, 0, input);\n\n \t throw nvae;\n \t }\n \t switch (alt18) {\n \t case 1 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:13: '*'\n \t {\n \t char_literal42=(Token)match(input,48,FOLLOW_48_in_mult458); if (state.failed) return retval;\n \t if ( state.backtracking==0 ) {\n \t char_literal42_tree = (CommonTree)adaptor.create(char_literal42);\n \t root_0 = (CommonTree)adaptor.becomeRoot(char_literal42_tree, root_0);\n \t }\n\n \t }\n \t break;\n \t case 2 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:20: '/'\n \t {\n \t char_literal43=(Token)match(input,49,FOLLOW_49_in_mult463); if (state.failed) return retval;\n \t if ( state.backtracking==0 ) {\n \t char_literal43_tree = (CommonTree)adaptor.create(char_literal43);\n \t root_0 = (CommonTree)adaptor.becomeRoot(char_literal43_tree, root_0);\n \t }\n\n \t }\n \t break;\n\n \t }\n\n \t pushFollow(FOLLOW_unary_in_mult467);\n \t unary44=unary();\n\n \t state._fsp--;\n \t if (state.failed) return retval;\n \t if ( state.backtracking==0 ) adaptor.addChild(root_0, unary44.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop19;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "public final Expr addExpr() throws RecognitionException {\r\n Expr result = null;\r\n\r\n int addExpr_StartIndex = input.index();\r\n\r\n Token op=null;\r\n Expr lhs =null;\r\n\r\n Expr rhs =null;\r\n\r\n\r\n try {\r\n if ( state.backtracking>0 && alreadyParsedRule(input, 15) ) { return result; }\r\n\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:121:5: (lhs= mulExpr (op= ( '+' | '-' ) rhs= mulExpr )* )\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:121:9: lhs= mulExpr (op= ( '+' | '-' ) rhs= mulExpr )*\r\n {\r\n pushFollow(FOLLOW_mulExpr_in_addExpr674);\r\n lhs=mulExpr();\r\n\r\n state._fsp--;\r\n if (state.failed) return result;\r\n\r\n if ( state.backtracking==0 ) { result =lhs; }\r\n\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:121:46: (op= ( '+' | '-' ) rhs= mulExpr )*\r\n loop10:\r\n do {\r\n int alt10=2;\r\n int LA10_0 = input.LA(1);\r\n\r\n if ( ((LA10_0 >= 24 && LA10_0 <= 25)) ) {\r\n alt10=1;\r\n }\r\n\r\n\r\n switch (alt10) {\r\n \tcase 1 :\r\n \t // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:121:48: op= ( '+' | '-' ) rhs= mulExpr\r\n \t {\r\n \t op=(Token)input.LT(1);\r\n\r\n \t if ( (input.LA(1) >= 24 && input.LA(1) <= 25) ) {\r\n \t input.consume();\r\n \t state.errorRecovery=false;\r\n \t state.failed=false;\r\n \t }\r\n \t else {\r\n \t if (state.backtracking>0) {state.failed=true; return result;}\r\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\r\n \t throw mse;\r\n \t }\r\n\r\n\r\n \t pushFollow(FOLLOW_mulExpr_in_addExpr692);\r\n \t rhs=mulExpr();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return result;\r\n\r\n \t if ( state.backtracking==0 ) { \r\n \t if ((op!=null?op.getText():null).equals(\"+\")) {\r\n \t result = new Add(result, rhs);\r\n \t }\r\n \t if ((op!=null?op.getText():null).equals(\"-\")) {\r\n \t result = new Sub(result, rhs); \r\n \t }\r\n \t }\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop10;\r\n }\r\n } while (true);\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n if ( state.backtracking>0 ) { memoize(input, 15, addExpr_StartIndex); }\r\n\r\n }\r\n return result;\r\n }", "public static double multi(double a, double b) {\n return a * b;\n }", "@Test\n public void testParseMul() {\n System.out.println(\"testParseMul\");\n byte[] expected = {\n Instruction.LV.getId(), 0, 0, 32,\n Instruction.LV.getId(), 0, 0, 36,\n Instruction.MUL.getId(),\n Instruction.LV.getId(), 0, 0, 40,\n Instruction.MUL.getId()\n };\n\n TermParser p = TermParserTestSetup.getMulTermSetup();\n assertEquals(\"Parse\", true, p.parse());\n AssemblerCodeChecker.assertCodeEquals(\"Code \", expected, TermParserTestSetup.getByteCode());\n }", "@Override\n public Expression simplifyMore() {\n Expression left = super.getLeft();\n Expression right = super.getRight();\n\n // x * x -> x^2\n if (left.toString().equals(right.toString())) {\n return new Pow(left, 2);\n }\n\n // ((2.0 * x) * (x * 3.0)) -> 6x^2\n if (left instanceof Mult && right instanceof Mult) {\n if (((Mult) left).getRight().toString().equals(((Mult) right).getLeft().toString())) {\n Expression exp = new Mult(new Mult(((Mult) left).getLeft(), ((Mult) right).getRight()),\n new Mult(((Mult) left).getRight(), ((Mult) right).getLeft()));\n exp.turnBonusOn();\n return exp.simplify();\n }\n }\n\n // 2x * 2x -> 4x^2\n if (left instanceof Mult && right instanceof Mult) {\n if (((Mult) left).getRight().toString().equals(((Mult) right).getRight().toString())) {\n return new Mult(new Mult(((Mult) left).getLeft(), ((Mult) right).getLeft()).simplify(),\n new Pow(((Mult) left).getRight(), 2)).simplify();\n }\n }\n\n // 2x * 2y -> 4xy\n if (left instanceof Mult && right instanceof Mult) {\n return new Mult(new Mult(((Mult) left).getLeft(), ((Mult) right).getLeft()).simplify(),\n new Mult(((Mult) left).getRight(), ((Mult) right).getRight())).simplify();\n }\n\n // sin(x) * cos(x) -> 0.5 * sin(2x)\n if (right instanceof Sin && left instanceof Cos) {\n Expression exp = new Mult(0.5, new Sin(new Mult(2, ((Sin) right).getExpression())));\n exp.turnBonusOn();\n return exp.simplify();\n }\n\n // cos(x) * sin(x) -> 0.5 * sin(2x)\n if (right instanceof Cos && left instanceof Sin) {\n Expression exp = new Sin(new Mult(2, ((Cos) right).getExpression()));\n exp.turnBonusOn();\n return exp.simplify();\n }\n\n // log(x, y) * 2 -> 2 * log(x, y)\n if (left instanceof Sin || left instanceof Cos || left instanceof Log) {\n Expression exp = new Mult(right, left);\n exp.turnBonusOn();\n return exp.simplify();\n }\n\n // x^2 * x^3 -> x^5\n if (left instanceof Pow && right instanceof Pow) {\n if (((Pow) left).getLeft().toString().equals(((Pow) right).getLeft().toString())) {\n Expression exp = new Pow(((Pow) left).getLeft(),\n new Plus(((Pow) left).getRight(), ((Pow) right).getRight()));\n exp.turnBonusOn();\n return exp.simplify();\n }\n }\n\n // x^2 * x -> x^3\n if (left instanceof Pow) {\n if (((Pow) left).getLeft().toString().equals(right.toString())) {\n Expression exp = new Pow(((Pow) left).getLeft(), new Plus(((Pow) left).getRight(), 1));\n exp.turnBonusOn();\n return exp.simplify();\n }\n }\n\n return this;\n }", "IVec3 mult(IVec3 v);", "private Term parseMul(final boolean required) throws ParseException {\n Term t1 = parseUnary(required);\n while (t1 != null) {\n int tt = _tokenizer.next();\n if (tt == '*') {\n Term t2 = parseUnary(true);\n if (t1.isD() && t2.isN() || t1.isN() && t2.isD()) {\n t1 = new Term.Mul(Term.TYPE_D, t1, t2);\n } else if (t1.isI() && t2.isI()) {\n t1 = new Term.Mul(Term.TYPE_I, t1, t2);\n } else if (!isTypeChecking()) {\n t1 = new Term.Mul(t1.isD() || t2.isD() ? Term.TYPE_D : Term.TYPE_I, t1, t2);\n } else {\n reportTypeErrorN2(\"'*'\");\n }\n } else if (tt == '/') {\n Term t2 = parseUnary(true);\n if (t1.isD() && t2.isN() || t1.isN() && t2.isD()) {\n t1 = new Term.Div(Term.TYPE_D, t1, t2);\n } else if (t1.isI() && t2.isI()) {\n t1 = new Term.Div(Term.TYPE_I, t1, t2);\n } else if (!isTypeChecking()) {\n t1 = new Term.Div(t1.isD() || t2.isD() ? Term.TYPE_D : Term.TYPE_I, t1, t2);\n } else {\n reportTypeErrorN2(\"'/'\");\n }\n } else if (tt == '%') {\n Term t2 = parseUnary(true);\n if (t1.isD() && t2.isN() || t1.isN() && t2.isD()) {\n t1 = new Term.Mod(Term.TYPE_D, t1, t2);\n } else if (t1.isI() && t2.isI()) {\n t1 = new Term.Mod(Term.TYPE_I, t1, t2);\n } else if (!isTypeChecking()) {\n t1 = new Term.Mod(t1.isD() || t2.isD() ? Term.TYPE_D : Term.TYPE_I, t1, t2);\n } else {\n reportTypeErrorN2(\"'%'\");\n }\n } else {\n _tokenizer.pushBack();\n break;\n }\n }\n return t1;\n }", "public void multiply()\r\n {\r\n resultDoubles = Operations.multiply(leftOperand, rightOperand);\r\n resultResetHelper();\r\n }", "public Mult(String left, String right) {\n super(left, right);\n }", "public Mult(double left, double right) {\n super(left, right);\n }", "public Multiplication(Expression l, Expression r) {\n\tleft = l;\n\tright = r;\n }", "public AncientEgyptianMultiplication( ) {\r\n }", "abstract int multiplication(int num1, int num2);", "public void testMultiply() {\r\n System.out.println(\"Multiply\");\r\n Double [][] n = new Double[][]{{-3., -2.5, -1., 0., 1., 2., 3.4, 3.5, 1.1E100, -1.1E100}, \r\n {-3., 2.5, 0., 0., 1., -2., 3., 3.7, 1.1E100, 1.1E100}, \r\n {9., -6.25, 0., 0., 1., -4., 10.2, 12.95, 1.21E200, -1.21E200}};\r\n for(int i = 0; i < 10; i++){\r\n Double x = n[0][i];\r\n Double y = n[1][i];\r\n double expResult = n[2][i];\r\n double result = MathOp.Multiply(x, y);\r\n assertEquals(expResult, result, 0.001);\r\n }\r\n }", "public final Expr addExpr() throws RecognitionException {\n\t\tExpr e = null;\n\n\n\t\tToken PLUS13=null;\n\t\tToken MINUS14=null;\n\t\tExpr e1 =null;\n\t\tExpr e2 =null;\n\n\n\t\t\t\tExpr it = null;\n\t\t\t\tBoolean bool = false;\n\t\t\t\tint line = -1;\n\t\t\t\tint offset = -1;\n\t\t\t\n\t\ttry {\n\t\t\t// ul.g:173:2: (e1= multExpr ( ( PLUS | MINUS ) e2= multExpr )* )\n\t\t\t// ul.g:174:3: e1= multExpr ( ( PLUS | MINUS ) e2= multExpr )*\n\t\t\t{\n\t\t\tpushFollow(FOLLOW_multExpr_in_addExpr710);\n\t\t\te1=multExpr();\n\t\t\tstate._fsp--;\n\t\t\tif (state.failed) return e;\n\t\t\tif ( state.backtracking==0 ) {it = e1;}\n\t\t\t// ul.g:175:3: ( ( PLUS | MINUS ) e2= multExpr )*\n\t\t\tloop14:\n\t\t\twhile (true) {\n\t\t\t\tint alt14=2;\n\t\t\t\tint LA14_0 = input.LA(1);\n\t\t\t\tif ( (LA14_0==MINUS||LA14_0==PLUS) ) {\n\t\t\t\t\talt14=1;\n\t\t\t\t}\n\n\t\t\t\tswitch (alt14) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// ul.g:175:4: ( PLUS | MINUS ) e2= multExpr\n\t\t\t\t\t{\n\t\t\t\t\t// ul.g:175:4: ( PLUS | MINUS )\n\t\t\t\t\tint alt13=2;\n\t\t\t\t\tint LA13_0 = input.LA(1);\n\t\t\t\t\tif ( (LA13_0==PLUS) ) {\n\t\t\t\t\t\talt13=1;\n\t\t\t\t\t}\n\t\t\t\t\telse if ( (LA13_0==MINUS) ) {\n\t\t\t\t\t\talt13=2;\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (state.backtracking>0) {state.failed=true; return e;}\n\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\tnew NoViableAltException(\"\", 13, 0, input);\n\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t}\n\n\t\t\t\t\tswitch (alt13) {\n\t\t\t\t\t\tcase 1 :\n\t\t\t\t\t\t\t// ul.g:175:5: PLUS\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tPLUS13=(Token)match(input,PLUS,FOLLOW_PLUS_in_addExpr718); if (state.failed) return e;\n\t\t\t\t\t\t\tif ( state.backtracking==0 ) {line = (PLUS13!=null?PLUS13.getLine():0); offset = PLUS13.getCharPositionInLine();}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2 :\n\t\t\t\t\t\t\t// ul.g:175:70: MINUS\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tMINUS14=(Token)match(input,MINUS,FOLLOW_MINUS_in_addExpr721); if (state.failed) return e;\n\t\t\t\t\t\t\tif ( state.backtracking==0 ) {line = (MINUS14!=null?MINUS14.getLine():0); offset = MINUS14.getCharPositionInLine();}\n\t\t\t\t\t\t\tif ( state.backtracking==0 ) {bool = true;}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tpushFollow(FOLLOW_multExpr_in_addExpr730);\n\t\t\t\t\te2=multExpr();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return e;\n\t\t\t\t\tif ( state.backtracking==0 ) {it = new AddExpr(it, e2, bool, line, offset);}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault :\n\t\t\t\t\tbreak loop14;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( state.backtracking==0 ) {\n\t\t\t\t\te = it;\n\t\t\t\t}\n\t\t}\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\trecover(input,re);\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn e;\n\t}", "@Override\n public Expression differentiate(String var) {\n Expression left = super.getLeft();\n Expression right = super.getRight();\n return new Plus(new Mult(left.differentiate(var), right), new Mult(left, right.differentiate(var)));\n }", "public static void main(String[] args) {\n NumberFact a, b;\n a = new NumberFact(1_000);\n b = new NumberFact(999);\n\n ArithmeticOperator x, y;\n x = new ArithmeticOperator('*', a, b);\n y = new ArithmeticOperator('+', x, b);\n\n System.out.println(y);\n System.out.println(y.eval());\n }", "private void createMul(Code32 code, int op, int cond, int Rd, int Rn, int Rm) {\r\n\t\tcode.instructions[code.iCount] = (cond << 28) | op | (Rd << 16) | (Rm << 8) | (0x9 << 4) | Rn;\r\n\t\tcode.incInstructionNum();\r\n\t}", "public static BinaryExpression multiplyAssign(Expression expression0, Expression expression1) {\n return makeBinary(ExpressionType.MultiplyAssign, expression0, expression1);\n }", "LengthScalarMultiply createLengthScalarMultiply();", "public final CQLParser.multiplicativeExpression_return multiplicativeExpression() throws RecognitionException {\n CQLParser.multiplicativeExpression_return retval = new CQLParser.multiplicativeExpression_return();\n retval.start = input.LT(1);\n\n Object root_0 = null;\n\n Token set100=null;\n CQLParser.powerExpression_return powerExpression99 = null;\n\n CQLParser.powerExpression_return powerExpression101 = null;\n\n\n Object set100_tree=null;\n\n try {\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:404:2: ( powerExpression ( ( MULT | DIV ) powerExpression )* )\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:404:4: powerExpression ( ( MULT | DIV ) powerExpression )*\n {\n root_0 = (Object)adaptor.nil();\n\n pushFollow(FOLLOW_powerExpression_in_multiplicativeExpression1886);\n powerExpression99=powerExpression();\n\n state._fsp--;\n\n adaptor.addChild(root_0, powerExpression99.getTree());\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:404:20: ( ( MULT | DIV ) powerExpression )*\n loop27:\n do {\n int alt27=2;\n int LA27_0 = input.LA(1);\n\n if ( ((LA27_0>=MULT && LA27_0<=DIV)) ) {\n alt27=1;\n }\n\n\n switch (alt27) {\n \tcase 1 :\n \t // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:404:21: ( MULT | DIV ) powerExpression\n \t {\n \t set100=(Token)input.LT(1);\n \t set100=(Token)input.LT(1);\n \t if ( (input.LA(1)>=MULT && input.LA(1)<=DIV) ) {\n \t input.consume();\n \t root_0 = (Object)adaptor.becomeRoot((Object)adaptor.create(set100), root_0);\n \t state.errorRecovery=false;\n \t }\n \t else {\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t throw mse;\n \t }\n\n \t pushFollow(FOLLOW_powerExpression_in_multiplicativeExpression1896);\n \t powerExpression101=powerExpression();\n\n \t state._fsp--;\n\n \t adaptor.addChild(root_0, powerExpression101.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop27;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (Object)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n \t\n \tcatch(RecognitionException re)\n \t{\t\n \t\treportError(re);\n \t\tthrow re;\n \t}\n finally {\n }\n return retval;\n }", "Sum getMultiplier();", "public MathEval() {\r\n super();\r\n\r\n constants=new TreeMap<String,Double>(String.CASE_INSENSITIVE_ORDER);\r\n setConstant(\"E\" ,Math.E);\r\n setConstant(\"Euler\" ,0.577215664901533D);\r\n setConstant(\"LN2\" ,0.693147180559945D);\r\n setConstant(\"LN10\" ,2.302585092994046D);\r\n setConstant(\"LOG2E\" ,1.442695040888963D);\r\n setConstant(\"LOG10E\",0.434294481903252D);\r\n setConstant(\"PHI\" ,1.618033988749895D);\r\n setConstant(\"PI\" ,Math.PI);\r\n\r\n variables=new TreeMap<String,Double>(String.CASE_INSENSITIVE_ORDER);\r\n\r\n functions=new TreeMap<String,FunctionHandler>(String.CASE_INSENSITIVE_ORDER);\r\n\r\n offset=0;\r\n isConstant=false;\r\n }", "private ASTNode binaryMultiplyRules(ASTNode left, ASTNode right) throws Exception {\n Token leftToken = left.getToken();\n Token rightToken = right.getToken();\n\n TokenType leftType = leftToken.getType();\n TokenType rightType = rightToken.getType();\n\n Token tempToken;\n TokenType numType = TokenType.NUMBER;\n TokenType minusType = TokenType.MINUS;\n TokenType mulType = TokenType.MUL;\n\n if (rightToken.getIdentifier().equals(\"0\")){\n //left is anything and right is 0\n tempToken = new Token(numType, \"0\");\n return new Num(tempToken);\n }\n else if (rightToken.getIdentifier().equals(\"1\")){\n //left is anything and right is 1\n return left;\n }\n else if (leftToken.getIdentifier().equals(\"0\")){\n //left is 0 and right is anything\n tempToken = new Token(numType, \"0\");\n return new Num(tempToken);\n }\n else if (leftToken.getIdentifier().equals(\"1\")){\n //left is 1 and right is anything\n return right;\n }\n else if(patternMatcher(leftType, rightType, numType, numType)){\n Double leftVal = Double.parseDouble(leftToken.getIdentifier());\n Double rightVal = Double.parseDouble(rightToken.getIdentifier());\n\n String prod = String.valueOf(leftVal * rightVal);\n tempToken = new Token(numType, prod);\n return new Num(tempToken);\n }\n else if (patternMatcher(leftType, rightType, minusType, minusType)){\n if (left instanceof UnaryOP && right instanceof UnaryOP){\n tempToken = new Token(mulType);\n ASTNode leftOP = ((UnaryOP) left).getOperand();\n ASTNode rightOp = ((UnaryOP) right).getOperand();\n return new BinaryOp(tempToken, leftOP, rightOp);\n }\n }\n tempToken = new Token(mulType);\n return new BinaryOp(tempToken ,left, right);\n }", "public static Rational multiply(Rational num1, Rational num2){\r\n Rational product = new Rational();\r\n \r\n // multiply throughout\r\n product.denominator = num1.getDenominator() * num2.getDenominator();\r\n product.numerator = num1.getNumerator() * num2.getNumerator();\r\n \r\n product.reduce();\r\n return product;\r\n }", "Matrix scalarMult(double x){\n int newMatrixSize = this.getSize();\n Matrix newM = new Matrix(newMatrixSize);\n for(int i = 1; i <= newMatrixSize; i++){\n List itRow = rows[i - 1];\n itRow.moveFront();\n while(itRow.index() != -1){\n Entry c = (Entry)itRow.get();\n newM.changeEntry(i, c.column, (x*c.value));\n itRow.moveNext();\n }\n }\n\n return newM;\n }", "@Override\n\tpublic Instruction parse(String[] s) throws WrongInstructionFormatException {\n\t\tif (s.length==1 && s[0].equalsIgnoreCase(\"mult\")) \n\t\t\treturn new Mult();\n\t\telse throw new WrongInstructionFormatException();\n\t}", "public final Expr mulExpr() throws RecognitionException {\r\n Expr result = null;\r\n\r\n int mulExpr_StartIndex = input.index();\r\n\r\n Token op=null;\r\n Expr lhs =null;\r\n\r\n Expr rhs =null;\r\n\r\n\r\n try {\r\n if ( state.backtracking>0 && alreadyParsedRule(input, 14) ) { return result; }\r\n\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:108:5: (lhs= unExpr (op= ( '*' | '/' ) rhs= unExpr )* )\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:108:9: lhs= unExpr (op= ( '*' | '/' ) rhs= unExpr )*\r\n {\r\n pushFollow(FOLLOW_unExpr_in_mulExpr613);\r\n lhs=unExpr();\r\n\r\n state._fsp--;\r\n if (state.failed) return result;\r\n\r\n if ( state.backtracking==0 ) { result =lhs; }\r\n\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:108:45: (op= ( '*' | '/' ) rhs= unExpr )*\r\n loop9:\r\n do {\r\n int alt9=2;\r\n int LA9_0 = input.LA(1);\r\n\r\n if ( (LA9_0==23||LA9_0==26) ) {\r\n alt9=1;\r\n }\r\n\r\n\r\n switch (alt9) {\r\n \tcase 1 :\r\n \t // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:108:47: op= ( '*' | '/' ) rhs= unExpr\r\n \t {\r\n \t op=(Token)input.LT(1);\r\n\r\n \t if ( input.LA(1)==23||input.LA(1)==26 ) {\r\n \t input.consume();\r\n \t state.errorRecovery=false;\r\n \t state.failed=false;\r\n \t }\r\n \t else {\r\n \t if (state.backtracking>0) {state.failed=true; return result;}\r\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\r\n \t throw mse;\r\n \t }\r\n\r\n\r\n \t pushFollow(FOLLOW_unExpr_in_mulExpr633);\r\n \t rhs=unExpr();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return result;\r\n\r\n \t if ( state.backtracking==0 ) { \r\n \t if ((op!=null?op.getText():null).equals(\"*\")) {\r\n \t result = new Mul(result, rhs);\r\n \t }\r\n \t if ((op!=null?op.getText():null).equals(\"/\")) {\r\n \t result = new Div(result, rhs); \r\n \t }\r\n \t }\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop9;\r\n }\r\n } while (true);\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n if ( state.backtracking>0 ) { memoize(input, 14, mulExpr_StartIndex); }\r\n\r\n }\r\n return result;\r\n }", "@Override\n public InterpreterValue mul(InterpreterValue v) {\n\n // If the given value is a IntegerValue create a new DoubleValue from\n // the multiplication-result\n if(v instanceof IntegerValue) return new DoubleValue(getValue() * ((IntegerValue) v).getValue());\n\n // If the given value is a DoubleValue create a new DoubleValue from\n // the multiplication-result\n if(v instanceof DoubleValue) return new DoubleValue(getValue() * ((DoubleValue) v).getValue());\n\n // In other case just throw an error\n throw new Error(\"Operator '*' is not defined for type double and \" + v.getName());\n\n }", "public static EquationExpression timesRaw(EquationExpression... args) {\n\t\tswitch (args.length) {\n\t\tcase 0:\n\t\t\treturn EquationNumericValue.from(1);\n\t\tcase 1:\n\t\t\treturn args[0];\n\t\tcase 2:\n\t\t\treturn new EquationProductOperator(args[0], args[1]);\n\t\tdefault:\n\t\t\tEquationExpression[] args2 = new EquationExpression[args.length\n\t\t\t\t\t- 1];\n\t\t\tSystem.arraycopy(args, 1, args2, 0, args.length - 1);\n\t\t\treturn new EquationProductOperator(args[0], sumRaw(args2));\n\t\t}\n\t}", "public final void entryRuleMultExp() throws RecognitionException {\n try {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1377:1: ( ruleMultExp EOF )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1378:1: ruleMultExp EOF\n {\n before(grammarAccess.getMultExpRule()); \n pushFollow(FOLLOW_ruleMultExp_in_entryRuleMultExp2881);\n ruleMultExp();\n\n state._fsp--;\n\n after(grammarAccess.getMultExpRule()); \n match(input,EOF,FOLLOW_EOF_in_entryRuleMultExp2888); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }", "public static EquationExpression timesRaw(EquationExpression... args) {\n switch(args.length) {\n case 0:\n return EquationNumericValue.from(1);\n case 1:\n return args[0];\n case 2:\n return new EquationProductOperator(args[0], args[1]);\n default:\n EquationExpression[] args2 = new EquationExpression[args.length-1];\n System.arraycopy(args, 1, args2, 0, args.length-1);\n return new EquationProductOperator(args[0], sumRaw(args2));\n }\n }", "public final Expr addExpr() throws RecognitionException {\n Expr result = null;\n\n int addExpr_StartIndex = input.index();\n\n Token op=null;\n Expr lhs =null;\n\n Expr rhs =null;\n\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 11) ) { return result; }\n\n // /home/jahn/workspace1/QLAndroid/src/org/uva/sea/ql/parser/antlr/QL.g:124:5: (lhs= mulExpr (op= ( '+' | '-' ) rhs= mulExpr )* )\n // /home/jahn/workspace1/QLAndroid/src/org/uva/sea/ql/parser/antlr/QL.g:124:9: lhs= mulExpr (op= ( '+' | '-' ) rhs= mulExpr )*\n {\n pushFollow(FOLLOW_mulExpr_in_addExpr547);\n lhs=mulExpr();\n\n state._fsp--;\n if (state.failed) return result;\n\n if ( state.backtracking==0 ) { result =lhs; }\n\n // /home/jahn/workspace1/QLAndroid/src/org/uva/sea/ql/parser/antlr/QL.g:124:46: (op= ( '+' | '-' ) rhs= mulExpr )*\n loop8:\n do {\n int alt8=2;\n int LA8_0 = input.LA(1);\n\n if ( ((LA8_0 >= 21 && LA8_0 <= 22)) ) {\n alt8=1;\n }\n\n\n switch (alt8) {\n \tcase 1 :\n \t // /home/jahn/workspace1/QLAndroid/src/org/uva/sea/ql/parser/antlr/QL.g:124:48: op= ( '+' | '-' ) rhs= mulExpr\n \t {\n \t op=(Token)input.LT(1);\n\n \t if ( (input.LA(1) >= 21 && input.LA(1) <= 22) ) {\n \t input.consume();\n \t state.errorRecovery=false;\n \t state.failed=false;\n \t }\n \t else {\n \t if (state.backtracking>0) {state.failed=true; return result;}\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t throw mse;\n \t }\n\n\n \t pushFollow(FOLLOW_mulExpr_in_addExpr565);\n \t rhs=mulExpr();\n\n \t state._fsp--;\n \t if (state.failed) return result;\n\n \t if ( state.backtracking==0 ) { \n \t if ((op!=null?op.getText():null).equals(\"+\")) {\n \t result = new Add(result, rhs);\n \t }\n \t if ((op!=null?op.getText():null).equals(\"-\")) {\n \t result = new Sub(result, rhs); \n \t }\n \t }\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop8;\n }\n } while (true);\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n\n finally {\n \t// do for sure before leaving\n if ( state.backtracking>0 ) { memoize(input, 11, addExpr_StartIndex); }\n\n }\n return result;\n }", "public final void mult (Unit unit) throws ArithmeticException {\n\t\tlong u = mksa ; double r = factor; double v = value; double o = offset;\n\t\t/* dump(\"mult:this \"); unit.dump(\"mult:unit\"); */\n\t\tif (((mksa&_abs)!=0) && (unit.factor != 1)) throw\t// On a date\n\t\tnew ArithmeticException(\"****Unit.mult on a date!\");\n\t\tif (((mksa|unit.mksa)&_log) != 0) {\n\t\t\tif ((mksa == underScore) && (factor == 1.)) ;\n\t\t\telse if ((unit.mksa == underScore) && (unit.factor == 1.)) ;\n\t\t\telse throw new ArithmeticException\n\t\t\t(\"****Unit: can't multiply logs: \" + symbol + \" x \" + unit.symbol);\n\t\t}\n\t\t/* As soon as there is an operation, the offset is ignored \n\t\t * except if one of the factors is unity.\n\t\t */\n\t\tif ((offset!=0) || (unit.offset!=0)) {\n\t\t\tif (mksa == underScore) offset = unit.offset;\n\t\t\telse if (unit.mksa == underScore) ;\n\t\t\telse offset = 0;\n\t\t}\n\t\tv *= unit.value; \n\t\tr *= unit.factor;\n\t\tu += unit.mksa; u -= underScore;\n\t\tif ((u&0x0c80808080808080L) != 0) throw new ArithmeticException\n\t\t(\"****too large powers in: \" + symbol + \" x \" + unit.symbol);\n\t\tmksa = u;\n\t\tfactor = r;\n\t\tvalue = v;\n\t\t/* Decision for the new symbol */\n\t\tif ((symbol != null) && (unit.symbol != null)) {\n\t\t\tif ((unit.mksa == underScore) && (unit.factor == 1)) return;\t// No unit ...\n\t\t\tif (( mksa == underScore) && ( factor == 1)) symbol = unit.symbol;\n\t\t\telse if ((symbol.equals(unit.symbol)) && (factor == unit.factor))\n\t\t\t\tsymbol = toExpr(symbol) + \"2\" ;\n\t\t\telse symbol = toExpr(symbol) + \".\" + toExpr(unit.symbol) ;\n\t\t}\n\t}", "Point mult (double s, Point result);", "@Override\r\n\tpublic void mul(int x, int y) {\n\t\t\r\n\t}", "@Override\r\n\tpublic int multi(int x, int y) {\n\t\treturn x * y;\r\n\t}", "CalcEvaluator(boolean mult) {\r\n this.mult = mult;\r\n }", "@Override\r\n\tpublic int mul() {\n\t\treturn 0;\r\n\t}", "public double multiplica(double a, double b) {\n\t\treturn a*b;\n\t}", "public final void mMUL() throws RecognitionException\n\t{\n\t\ttry\n\t\t{\n\t\t\tfinal int _type = AshvmLexer.MUL;\n\t\t\tfinal int _channel = BaseRecognizer.DEFAULT_TOKEN_CHANNEL;\n\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:708:5: ( 'mul' )\n\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:708:7: 'mul'\n\t\t\t{\n\t\t\t\tthis.match(\"mul\");\n\n\t\t\t}\n\n\t\t\tthis.state.type = _type;\n\t\t\tthis.state.channel = _channel;\n\t\t}\n\t\tfinally\n\t\t{\n\t\t}\n\t}", "public R3Mult(int rdIndex, int rsIndex, int id) {\n\n }", "@Override\n\tpublic int mult(int val1, int val2) {\n\t\treturn val1 * val2;\n\t}", "public final void rule__AddExp__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:8253:1: ( ( ruleMultExp ) )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:8254:1: ( ruleMultExp )\n {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:8254:1: ( ruleMultExp )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:8255:1: ruleMultExp\n {\n before(grammarAccess.getAddExpAccess().getMultExpParserRuleCall_0()); \n pushFollow(FOLLOW_ruleMultExp_in_rule__AddExp__Group__0__Impl16577);\n ruleMultExp();\n\n state._fsp--;\n\n after(grammarAccess.getAddExpAccess().getMultExpParserRuleCall_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "<C, PM> VariableExp<C, PM> createVariableExp();", "private Complex eval(Complex[] ca, Complex x) {\n\t\tComplex result = ca[0];\n\t\tfor (int i = 1; i < ca.length; i++) {\n\t\t\tresult = result.mul(x).add(ca[i]);\n\t\t}\n\t\treturn result;\n\t}", "public final double multExpr() throws RecognitionException {\n double value = 0.0;\n\n\n double e =0.0;\n\n\n try {\n // ExprInterp.g:32:5: (e= atom ( '*' e= atom )* )\n // ExprInterp.g:32:9: e= atom ( '*' e= atom )*\n {\n pushFollow(FOLLOW_atom_in_multExpr248);\n e=atom();\n\n state._fsp--;\n\n\n value = e;\n\n // ExprInterp.g:32:37: ( '*' e= atom )*\n loop5:\n do {\n int alt5=2;\n int LA5_0 = input.LA(1);\n\n if ( (LA5_0==12) ) {\n alt5=1;\n }\n\n\n switch (alt5) {\n \tcase 1 :\n \t // ExprInterp.g:32:38: '*' e= atom\n \t {\n \t match(input,12,FOLLOW_12_in_multExpr253); \n\n \t pushFollow(FOLLOW_atom_in_multExpr257);\n \t e=atom();\n\n \t state._fsp--;\n\n\n \t value *= e;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop5;\n }\n } while (true);\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n\n finally {\n \t// do for sure before leaving\n }\n return value;\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 }", "private String compute(String equ,String op)\n {\n String equation = equ;\n Pattern mdPattern = Pattern.compile(\"(\\\\d+([.]\\\\d+)*)(([\"+op+\"]))(\\\\d+([.]\\\\d+)*)\");\n Matcher matcher\t\t= mdPattern.matcher(equation);\n while(matcher.find())\n {\n String[] arr = null;\n double ans = 0;\n String eq = matcher.group(0);//get form x*y\n if(eq.contains(op))\n {\n arr = eq.split(\"\\\\\"+op);//make arr\n if(op.equals(\"*\"))\n ans = Double.valueOf(arr[0])*Double.valueOf(arr[1]);//compute\n if(op.equals(\"/\"))\n ans = Double.valueOf(arr[0])/Double.valueOf(arr[1]);//compute\n if(op.equals(\"+\"))\n ans = Double.valueOf(arr[0])+Double.valueOf(arr[1]);//compute\n if(op.equals(\"-\"))\n ans = Double.valueOf(arr[0])-Double.valueOf(arr[1]);//compute\n }\n\n equation = matcher.replaceFirst(String.valueOf(ans));//replace in equation\n matcher = mdPattern.matcher(equation);//look for more matches\n }\n return equation;\n }", "private static native double mul(int n);", "public void multiply(Object mulValue) {\r\n\r\n\t\tNumberOperation operator = new NumberOperation(this.value, mulValue) {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic Number doAnOperation() {\r\n\t\t\t\tTypeEnum typeOfResult = getFinalType();\r\n\t\t\t\tif(typeOfResult == TypeEnum.TYPE_INTEGER) {\r\n\t\t\t\t\treturn getO1().intValue() * getO2().intValue();\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\treturn getO1().doubleValue() * getO2().doubleValue();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t\tthis.value = operator.doAnOperation();\r\n\t}", "public static void main(String args[]) {\n\tExpr e3 = new Minus(new Num(100),new Num(99));\n\tSystem.out.println(\"e3 is \" + e3.exprToString());\n\t// outputs \"e4 is (4*5-(100-99))\"\n\tExpr e4 = new Minus(new Times(new Num(4),new Num(5)),e3);\n\tSystem.out.println(\"e4 is \" + e4.exprToString());\n }", "public void mul(String a, String b, int i, String reg) {\r\n registerName.add(reg);\r\n int posa = registerRegister.indexOf(a);\r\n int posb = registerRegister.indexOf(b);\r\n int element = Integer.parseInt(registerValues.get(posa));\r\n int element1 = Integer.parseInt(registerValues.get(posb));\r\n int mul = element * element1;\r\n registerValues.add(Integer.toString(mul));\r\n }", "public void multiply(double multiplier) {\n x *= multiplier;\n y *= multiplier;\n }", "public final void synpred27_expression_fragment() throws RecognitionException { \n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:11: ( ( '+' | '-' ) mult )\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:11: ( '+' | '-' ) mult\n {\n if ( (input.LA(1)>=46 && input.LA(1)<=47) ) {\n input.consume();\n state.errorRecovery=false;state.failed=false;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n MismatchedSetException mse = new MismatchedSetException(null,input);\n throw mse;\n }\n\n pushFollow(FOLLOW_mult_in_synpred27_expression437);\n mult();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n }", "Rational multiply(Rational p){\n Rational firstarg=new Rational();\n firstarg.numerator=numerator;\n firstarg.denominator=denominator;\n\n firstarg.numerator=p.numerator*firstarg.numerator;\n firstarg.denominator=p.denominator*firstarg.denominator;\n return firstarg;\n }" ]
[ "0.7181152", "0.68491536", "0.67898893", "0.67898893", "0.67149585", "0.6623054", "0.652561", "0.6453798", "0.64244205", "0.64144564", "0.6233412", "0.6114878", "0.61100984", "0.60608727", "0.6032277", "0.6031518", "0.6002539", "0.5990347", "0.59711415", "0.5951944", "0.59271264", "0.5920275", "0.59158635", "0.5885907", "0.58620405", "0.58206624", "0.57921934", "0.5785963", "0.57347864", "0.5727767", "0.56825036", "0.5663695", "0.5655955", "0.56242114", "0.5620611", "0.5609072", "0.5607046", "0.5606481", "0.5606336", "0.5577917", "0.55633867", "0.5550771", "0.5550763", "0.553459", "0.5533022", "0.55234444", "0.55103403", "0.5508319", "0.5507825", "0.5496564", "0.54955685", "0.5473765", "0.54655725", "0.5462785", "0.5457463", "0.545408", "0.5448749", "0.5442949", "0.5434475", "0.5434318", "0.5426579", "0.54076874", "0.5386324", "0.5378135", "0.5370538", "0.5366461", "0.53664094", "0.53385276", "0.5331747", "0.5317382", "0.5311504", "0.53061557", "0.53054595", "0.5295753", "0.529064", "0.5280395", "0.5274558", "0.52712065", "0.5261208", "0.52601016", "0.5256051", "0.52550113", "0.5244864", "0.52418745", "0.5241819", "0.5238788", "0.5232773", "0.52323204", "0.52314246", "0.52282906", "0.52271503", "0.52090436", "0.52053475", "0.52039117", "0.519788", "0.5196789", "0.5194174", "0.51914495", "0.51805", "0.51750404" ]
0.5700363
30
Evaluates the expression using the variable values provided in the assignment, and return the result. If the expression contains a variable which is not in the assignment, an exception is thrown.
public double evaluate(Map<String, Double> assignment) throws Exception { Expression left = super.getLeft(); Expression right = super.getRight(); return left.evaluate(assignment) * right.evaluate(assignment); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double evaluate(Map<String, Double> assignment) throws Exception {\r\n // variable is in the assignment\r\n if (assignment.containsKey(this.variable)) {\r\n return assignment.get(this.variable);\r\n }\r\n throw new Exception(\"this variable is not in the assignment\");\r\n }", "public void storeEval(final String expression, final String variableName);", "public double evaluate() throws Exception {\r\n // this expression compare from variable\r\n throw new Exception(\"this expression contains a variable\");\r\n }", "public String evaluate(String expression);", "public int expressionEval(String expression){\n\n int result = 0;\n\n\n\n return result;\n }", "public Object eval(String expression) throws Exception;", "@Override\n public Object evaluate(Environment env) {\n if (env.contains(name.getValue())) return new VariableExistsError(name);\n var value = expression.evaluate(env);\n env.put(name.getValue(), value);\n env.setCurrent(value);\n return value;\n }", "public Object eval (Object expression);", "EvaluationResult evalExpression(ValueExp expr) { return evalExpression(expr, true); }", "private static Expression retrieveAssignExpressionValue(Expression expression) {\n return retrieveAssignExpression(expression).getValue();\n }", "private static AssignExpr retrieveAssignExpression(Expression expression) {\n return expression.asAssignExpr();\n }", "@Override\n public void visitAssignment(AssignmentExpression assignmentExpression) {\n assignmentExpression.interpret(context);\n }", "@Override\n public void visit(VariableEvalNode variableEvalNode) {\n }", "@Override\n public Integer visitAssign(CalculatorParser.AssignContext ctx) {\n String id = ctx.ID().getText(); // id is left-hand side of '='\n int value = visit(ctx.expr()); // compute value of expression on right\n memory.put(id, value); // store it in memory\n return value;\n }", "String evaluate();", "@Override\n public double evaluate(Map<String, Double> assignment) throws Exception {\n return getExpression1().evaluate(assignment) - getExpression2().evaluate(assignment);\n }", "public Object evaluate (Interpreter interp, List sexp)\n throws RunTimeException\n {\n Map<String,Object> shadowed = new HashMap<String,Object>();\n\n for (int i = 0; i < _args.size(); i++) {\n String name = ((Name)_args.elementAt(i)).toString();\n Object val = sexp.elementAt(i);\n\n // shadow this variable\n Object oval = interp.env.get(name);\n if (oval != null) shadowed.put(name, oval);\n else shadowed.put(name, NO_VAL);\n\n // evaluate the argument and bind it to the variable\n interp.env.put(name, interp.evaluateSExp(val));\n }\n\n // evaluate the sexps that constitute this function\n Object result = interp.interpret(_progn);\n\n // copy the values of the shadowed variables back into the environment\n for (Map.Entry<String,Object> entry : shadowed.entrySet()) {\n Object oval = entry.getValue();\n if (oval == NO_VAL) interp.env.remove(entry.getKey());\n else interp.env.put(entry.getKey(), oval);\n }\n\n return result;\n }", "public Code visitAssignmentNode(StatementNode.AssignmentNode node) {\n beginGen(\"Assignment\");\n /* Generate code to evaluate the expression */\n Code code = new Code();\n /* Generate the code to load the address of the variable */\n for(int i= 0; i < node.getExps().size(); i++) {\n \tExpNode exp = node.getExps().get(i);\n \tcode.append(exp.genCode(this));\n }\n for(int i = node.getLValues().size() - 1; i >= 0; i--) {\n \tExpNode lValue = node.getLValues().get(i);\n \tcode.append(lValue.genCode(this));\n \tcode.genStore(lValue.getType());\n }\n endGen(\"Assignment\");\n return code;\n }", "protected Element evalAssurance(Assurance ass){\n\t\tRecord r1 = ass.getLeftRecord();\n\t\tRecord r2 = ass.getRightRecord();\n\t\tOperator op = ass.getOperator();\n\t\tElement an = el(\"bpws:assign\");\n\t\tif (r1.getType() == RecordType.FORMULAR)\n\t\t\tan.appendChild(setExpr(r1.getFormular(), \"nswomoxsd:leftValue\"));\n\t\tif (r2.getType() == RecordType.FORMULAR)\n\t\t\tan.appendChild(setExpr(r2.getFormular(), \"nswomoxsd:rightValue\"));\n\t\tan.appendChild(\n\t\t\tsetExpr(\n\t\t\t\tgetMyVarPath(\"/nswomoxsd:leftValue\") + \n\t\t\t\top.value() +\n\t\t\t\tgetMyVarPath(\"nswomoxsd:rightValue\"),\n\t\t\t\t\"nswomoxsd:value\"\n\t\t\t)\n\t\t);\n\t\treturn an;\n\t}", "public int getValue(ArrayList<variable> variables, arithmetic_ex e) {\n String id = e.getId(); // get id of arithmetic expression\n try {\n for (int i = 0; i < variables.size(); i++) {\n if ((variables.get(i).getId()).trim().equals(id)) // if variable id matches expression id\n return variables.get(i).getValue(); // return the value from the variable array list\n }\n throw new JuliaSyntaxException(\"compute\"); // hasn't returned a value yet, so throw an error\n } catch (JuliaSyntaxException jse) {\n\n }\n return -1;\n }", "Result evaluate();", "private Object eval(Fact expr) {\n if (expr.getBool() != null) {\n if (\"true\".equals(expr.getBool())) {\n return true;\n } else {\n return false;\n }\n } else if (expr.getString() != null) {\n return expr.getString();\n } else if (expr.getIdent() != null) {\n if (RESULT_TYPE_VARIABLE.equals(resultType)) {\n return expr.getIdent();\n }\n return scope.getVariable(expr.getIdent());\n } else if (expr.getExpr() != null) {\n return eval(expr.getExpr(), resultType);\n } else if (expr.getLocator() != null) {\n return evalLocator(expr.getLocator());\n } else {\n return expr.getNumber();\n }\n }", "private Boolean evaluateBooleanExpression(Expression expr, InMemoryExpressionEvaluator eval)\n {\n try\n {\n Object result = expr.evaluate(eval);\n return (result instanceof InMemoryFailure) ? Boolean.FALSE : (Boolean)result;\n }\n catch (VariableNotSetException vnse)\n {\n if (NucleusLogger.QUERY.isDebugEnabled())\n {\n NucleusLogger.QUERY.debug(Localiser.msg(\"021024\", vnse.getVariableExpression().getId(), StringUtils.objectArrayToString(vnse.getValues())));\n }\n\n // TODO The iteration through possible variable values needs improving. We currently just drop out\n // to here with the possible values of a variable when first encountered (and not yet set), which\n // then starts the iteration process. This likely would fail if 2 or more variables (unchecked)\n if (vnse.getValues() == null || vnse.getValues().length == 0)\n {\n // No values available for this variable, so just put null and see the result\n eval.setVariableValue(vnse.getVariableExpression().getId(), null);\n if (NucleusLogger.QUERY.isDebugEnabled())\n {\n NucleusLogger.QUERY.debug(Localiser.msg(\"021025\", vnse.getVariableExpression().getId(), \"(null)\"));\n }\n if (Boolean.TRUE.equals(evaluateBooleanExpression(expr, eval)))\n {\n return Boolean.TRUE;\n }\n }\n else\n {\n // Set this variable and start iteration over the possible variable values\n for (int i=0;i<vnse.getValues().length;i++)\n {\n eval.setVariableValue(vnse.getVariableExpression().getId(), vnse.getValues()[i]);\n if (NucleusLogger.QUERY.isDebugEnabled())\n {\n NucleusLogger.QUERY.debug(Localiser.msg(\"021025\", vnse.getVariableExpression().getId(), vnse.getValues()[i]));\n }\n if (Boolean.TRUE.equals(evaluateBooleanExpression(expr, eval)))\n {\n return Boolean.TRUE;\n }\n }\n }\n\n // No variable value was successful so return FALSE\n if (NucleusLogger.QUERY.isDebugEnabled())\n {\n NucleusLogger.QUERY.debug(Localiser.msg(\"021026\", vnse.getVariableExpression().getId()));\n }\n eval.removeVariableValue(vnse.getVariableExpression().getId());\n return Boolean.FALSE;\n }\n }", "protected abstract Value evaluate();", "Expression getValue();", "Expression getValue();", "public Stmt createAssignment(Assign expr) {\n return createEval(expr);\n }", "private Expr expression() {\n return assignment();\n }", "public static Object evaluate( String expression, Map<String, Object> vars )\n {\n Expression exp = JEXL.createExpression( expression );\n \n JexlContext context = vars != null ? new MapContext( vars ) : new MapContext();\n \n return exp.evaluate( context );\n }", "public AssignExpr assign_expr() {\n if (lexer.token != Symbol.IDENT) {\n error.signal(\"Expecting identifier at assign expression\");\n }\n \n String type = symbolTable.getVariable(lexer.getStringValue());\n if(type == null){\n error.show(\"Tried to assign a value to a variable (\"+lexer.getStringValue()+\") that hasn't been declared.\");\n } else {\n if(type.equals(\"STRING\")){\n error.show(\"Tried to assign a value to a declared string variable (\"+lexer.getStringValue()+\")\");\n }\n }\n \n Ident id = new Ident(lexer.getStringValue());\n \n lexer.nextToken();\n if (lexer.token != Symbol.ASSIGN) {\n error.signal(\"Expecting assign symbol at assign expression\");\n }\n lexer.nextToken();\n Expr e = expr();\n\n if(type != null && type.toLowerCase().equals(\"int\") && e.getType(symbolTable) != null && e.getType(symbolTable).toLowerCase().equals(\"float\"))\n error.show(\"Trying to assign a \"+e.getType(symbolTable)+\" to a \"+type);\n else if (type != null && e.getType(symbolTable) != null && !type.equals(e.getType(symbolTable)))\n error.warning(\"Trying to assign a \"+e.getType(symbolTable)+\" to a \"+type);\n \n return new AssignExpr(id, e);\n }", "private void evalExpression () {\n\tif (expr.type != null) {\n\t // Expression ist wie vorgesehen getypt\n\t if (expr.type instanceof M_Bool) {\n\t\t// Expression ist eine boolesche, also :\n\t\tdebug.addMsg(\"# expression to evaluate is boolean.\",3);\n\t\tSimulatorBoolEvaluator boolExpr = new SimulatorBoolEvaluator(process, expr);\n\t\tvalue = new SimulatorBoolValue ( boolExpr.giveResult() );\n\t }\n\t else if (expr.type instanceof M_Int) {\n\t\t// Expression ist eine zu Integer evaluierende, also :\n\t\tdebug.addMsg(\"# expression to evaluate is integer.\",3);\n\t\tSimulatorIntEvaluator intExpr = new SimulatorIntEvaluator(process, expr);\n\t\tvalue = new SimulatorIntValue ( intExpr.giveResult() ); \n\t }\n\t else {\n\t /* Platz für Exception, da Expression falsch getypt */\n\t debug.addMsg(\"!!! EXCEPTION !!! : Expression not properly typed \",0);\n\t debug.addMsg(\"!!! Class: SimulatorExprEvaluator \\n!!! Method : evalExpression\\n!!! Pos.:1 \",0);\n\t }\n\n\t} //--------- end if(1) ------------\n\telse {\n\t // Expression ist nicht getypt also :\n\t debug.addMsg(\"!!! EXCEPTION !!! : Expression not typed \",0);\n\t debug.addMsg(\"!!! Class: SimulatorExprEvaluator \\n!!! Method : evalExpression\\n!!! Pos.:2 \",0);\n\t} //-------- end else --------------\n }", "public double eval(Environment env) throws EvalException {\n\treturn env.put(id,expr.eval(env));\n }", "public void assignValueToVariable(HashMap<String, String> assignment) throws\r\n\t\t\tIllegalOperationException,TypeNotSupportedException, IncompatibleTypeException{\r\n\t\tMap.Entry<String, String> data = assignment.entrySet().iterator().next();\r\n\t\tString variableName = data.getKey();\r\n\t\tString valueName = data.getValue();\r\n\t\tVariable lastAppearanceOfVar = findVariable(variableName);//we'll search a variable named variableName\r\n\t\tif(lastAppearanceOfVar==null||lastAppearanceOfVar.isFinal()){//did'nt find variableName\\ found final\r\n\t\t\tthrow new IllegalOperationException();\r\n\t\t}else {\r\n\t\t\t//if we did find a declared variable named variableName:\r\n\t\t\tif (lastAppearanceOfVar.compatibleWith(valueName)) {//if value's type's illegal -> exception\r\n\t\t\t\t//if we're trying, in a scope other than globalScope, to declare a variable by assigning it\r\n\t\t\t\t// with an uninitialised global variable:\r\n\t\t\t\tif((lastAppearanceOfVar.isGlobal()&&!lastAppearanceOfVar.isInitialized())&&!scopeType\r\n\t\t\t\t\t\t.equals(\"global\")){\r\n\t\t\t\t\t//we'll check if lastAppearanceOfVar was initialised in this scope (else it's illegal):\r\n\t\t\t\t\tassignUninitialisedGlobalVar(lastAppearanceOfVar, valueName);\r\n\t\t\t\t}else{ //else, the assignment's legal and we'll mark lastAppearanceOfVar as initialised:\r\n\t\t\t\t\tlastAppearanceOfVar.initialize();\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tassignWithReference(valueName, lastAppearanceOfVar);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public int evaluate(){\r\n\t\tString value = expressionTree.getValue();\r\n\t\tint result = 0;\r\n\t\tif (isNumber(value)){\r\n\t\t\treturn stringToNumber(value);\r\n\t\t}\r\n\t\tif (value.equals(\"+\")){\r\n\t\t\tresult = 0;\r\n\t\t\tfor (Iterator<Tree<String>> i = expressionTree.iterator(); i.hasNext();){\r\n\t\t\t\tresult += (new Expression(i.next().toString())).evaluate();\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (value.equals(\"*\")){\r\n\t\t\tresult = 1;\r\n\t\t\tfor (Iterator<Tree<String>> i = expressionTree.iterator(); i.hasNext();){\r\n\t\t\t\tresult *= (new Expression(i.next().toString())).evaluate();\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (value.equals(\"-\")){\r\n\t\t\tresult = (new Expression(expressionTree.getChild(0).toString())).evaluate() -\r\n\t\t\t(new Expression(expressionTree.getChild(1).toString())).evaluate();\r\n\t\t}\r\n\t\tif (value.equals(\"/\")){\r\n\t\t\tresult = (new Expression(expressionTree.getChild(0).toString())).evaluate() /\r\n\t\t\t(new Expression(expressionTree.getChild(1).toString())).evaluate();\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public boolean assignVariable(Scanner scan){\n\t\tif (scan.hasNext(\"\\\\=\")){\n\t\t\tif (!Parser.gobble(\"\\\\=\", scan)){ Parser.fail(\"Should have = for variables.\", scan); }\n\t\t\texpr = new Expression();\n\t\t\texpr.parse(scan);\t\t\t\t\t\t//Assignment\n\t\t\tif (!Parser.gobble(\"\\\\;\", scan)){ Parser.fail(\"Should have ; for variables.\", scan); }\n\t\t\t//Add to map\n\t\t\tParser.variables.put(name, this);\n\t\t\treturn true;\n\t\t} else if (scan.hasNext(\"\\\\;\")){\t//DECLARED NOT ASSIGNMENT\n\t\t\tif (!Parser.gobble(\"\\\\;\", scan)){ Parser.fail(\"Should have ; for variables.\", scan); }\n\t\t\t/*\t\t\tNum number = new Num();\n\t\t\tnumber.numberNodeZero();\n\t\t\texpr = number;\t\t\t\t\t//sets expr to 0. \n\t\t\t */\t\t\treturn true; \t\t\t\t\t//Shouldnt set it to 0 if there is already variable in map\n\t\t}\n\t\treturn false;\n\t}", "public String evaluate(String expression, String variable) {\n Lexer lex = new Lexer(expression);\n Parser parser = new Parser(lex);\n Expression exp;\n exp = parser.parse();\n String output = differentiate(exp, variable);\n return output;\n \n }", "public static String evaluate( String expr )\n {\n\n\tString[] arr = expr.split(\"//s+\");\n\tString ret = \"\";\n\tALStack<String> stack = new ALStack<String>();\n\tfor( String s: arr)\n\t stack.push(s);\n\n\tif( stack.peek().equals(\"(\")){\n\t stack.pop();\n\t int operator = findOp(stack.pop());\n\t ret = unload(operator, stack);\n\t return ret;\n\t}\n\treturn \"\";\n }", "public final void assignment() throws RecognitionException {\n CommonTree IDENT14=null;\n Object e =null;\n\n\n try {\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:315:3: ( ^( '=' IDENT e= expression ) )\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:315:5: ^( '=' IDENT e= expression )\n {\n match(input,38,FOLLOW_38_in_assignment524); \n\n match(input, Token.DOWN, null); \n IDENT14=(CommonTree)match(input,IDENT,FOLLOW_IDENT_in_assignment526); \n\n pushFollow(FOLLOW_expression_in_assignment530);\n e=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n \n localScope.set((IDENT14!=null?IDENT14.getText():null), e); \n lastAssignmentResult = e;\n \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n\n finally {\n \t// do for sure before leaving\n }\n return ;\n }", "public Object evaluate(IVariableValueProvider variableValueProvider, ExpressionRegistry registry)\r\n\t{\r\n\t\treturn expressionPart.evaluate(variableValueProvider, registry);\r\n\t}", "public void performEvaluation(){\n if(validateExp(currentExp)){\n try {\n Double result = symbols.eval(currentExp);\n currentExp = Double.toString(result);\n calculationResult.onExpressionChange(currentExp,true);\n count=0;\n }catch (SyntaxException e) {\n calculationResult.onExpressionChange(\"Invalid Input\",false);\n e.printStackTrace();\n }\n }\n\n }", "public static void main(String[] args) {\n\n System.out.println(\"119.1+(28.2+37.3*(46.4-55.5)-4.6+(3/2)+1) = \" + evaluateExpression(\"119.1 + ( 28.2 + 37.3 * ( 46.4 - 55.5 ) - 4.6 + ( 3 / 2 ) + 1 )\"));\n\n}", "public T evaluate(String expr) {\n List<Token> tokens = ExpressionParser.parse(expr);\n Expression expression = ExpressionBuilder.build(tokens);\n Visitor<T> visitor = new ExpressionVisitor<>();\n return visitor.visit(expression);\n }", "@Override\n public CodeFragment visitAssignmentStat(AlangParser.AssignmentStatContext ctx) {\n String name = ctx.ID().getText();\n if (!variableExists(name)) {\n this.addError(ctx, name, \"Assignment to undeclared variable\");\n return new CodeFragment(\"\");\n }\n\n Variable v = this.globals.get(name);\n v.setValue(ctx.global_expression().getText());\n v.setHasValue();\n\n return new CodeFragment(\"\");\n }", "@Test\n void scEvaluate() {\n StandardCalc sc = new StandardCalc();\n String expression = (\"( 5 * ( 6 + 7 ) ) - 2\");\n float result = 0f;\n try {\n result = sc.evaluate(expression);\n } catch (InvalidExpressionException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n assertEquals(result, 63);\n }", "public static int evaluate(String expression) {\n\n\t\tchar[] tokens = expression.toCharArray();\n\t\t// Stack for numbers: 'values'\n\t\tStack<Integer> values = new Stack<Integer>();\n\t\t// Stack for Operators: 'operators'\n\t\tStack<Character> operators = new Stack<Character>();\n\n\t\tfor (int i = 0; i < tokens.length; i++) {\n\t\t\t// Current token is a whitespace, skip it\n\t\t\tif (tokens[i] == ' ')\n\t\t\t\tcontinue;\n\t\t\t// Current token is a number, push it to stack for numbers\n\t\t\tif (tokens[i] >= '0' && tokens[i] <= '9') {\n\t\t\t\tStringBuffer stringBuffer = new StringBuffer();\n\t\t\t\t// There may be more than one digits in number\n\t\t\t\twhile (i < tokens.length && tokens[i] >= '0' && tokens[i] <= '9') {\n\t\t\t\t\tstringBuffer.append(tokens[i++]);\n\t\t\t\t}\n\t\t\t\tvalues.push(Integer.parseInt(stringBuffer.toString()));\n\t\t\t i--;\n\t\t\t} else if (tokens[i] == '(') {\n\t\t\t // Current token is an opening brace, push it to 'operators'\n\t\t\t\toperators.push(tokens[i]);\n\t\t\t} else if (tokens[i] == ')') {\n\t\t\t // Closing brace encountered, solve entire brace\n\t\t\t\twhile (operators.peek() != '(') {\n\t\t\t\t values.push(applyOperation(operators.pop(), values.pop(), values.pop()));\n\t\t\t }\n\t\t\t\toperators.pop();\n\t\t\t} else if (tokens[i] == '+' || tokens[i] == '-' ||tokens[i] == '*' || tokens[i] == '/') {\n\t\t\t // Current token is an operator.\n\t\t\t\twhile (!operators.empty() && hasPrecedence(tokens[i], operators.peek())) {\n\t\t\t\t values.push(applyOperation(operators.pop(), values.pop(),values.pop()));\n\t\t\t // System.out.println(values.peek());\n\t\t\t }\n\t\t\t\t// Push current token to 'operators'.\n\t\t\t\toperators.push(tokens[i]);\n\t\t\t}\n\t\t}\n\t\t// Entire expression has been parsed at this point, apply remaining operators to remaining values\n\t\twhile (!operators.empty()) {\n\t\t\tvalues.push(applyOperation(operators.pop(), values.pop(), values.pop()));\n\t\t}\n\t\t// Top of 'values' contains result, return it\n\t\treturn values.pop();\n\t}", "private Object eval(Term expr) {\n Object res = eval(expr.getExpr().get(0));\n\n for (int i = 1; i < expr.getExpr().size(); i++) {\n Object res2 = eval(expr.getExpr().get(i));\n String opt = expr.getOpt().get(i - 1);\n\n if (\"*\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res * (Double) res2;\n } else {\n throw new RaydenScriptException(\"Expression error: Term error\");\n }\n } else if (\"/\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res / (Double) res2;\n } else {\n throw new RaydenScriptException(\"Expression error: Term error\");\n }\n } else if (\"%\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res % (Double) res2;\n } else {\n throw new RaydenScriptException(\"Expression error: Term error\");\n }\n } else {\n throw new RaydenScriptException(\"Expression error: Invalid operator '\" + opt + \"'.\");\n }\n }\n\n return res;\n }", "Syntax.Node ParseAssignment(Token t, Syntax.NodeVar left) throws Exception{\n while (true){\n if(t.type==TokenType.ASSIGNMENT_OPERATOR){\n var right = ParseExpression();\n return new Syntax.AssignmentNode(\":=\", left, right);\n }\n else {\n lexer.putBack(t);\n break;\n //throw new Exception(\"Error in ParseAssignment!!! can't assign it \");\n }\n }\n throw new Exception(\"Error in ParseAssignment!!! \");\n\n }", "public static String evaluate( String expr ) \n {\n\tString[] arr = expr.split(\"\\\\s+\");\n\tLLStack<String> nums = new LLStack<String>();\n\tLLStack<String> noClose = new LLStack<String>();\n\tint op = 0;\n\n\tfor(String i : arr){ \n\t if(i.equals(\")\")){ //when you reach the closing parenthesis\n\t\tString top = noClose.pop(); //start going through this part of the expression\n\t\tnums.push(i); //add ( to stack for unload\n\t\t\n\t\twhile(!top.equals(\"(\")){ //until you reach the (, where the expression ends\n\t\t\t \n\t\t if(top.equals(\"+\")) op = 1;\n\t\t else if(top.equals(\"-\")) op = 2;\n\t\t else if(top.equals(\"*\")) op = 3;\n\n\t\t else nums.push(top); //if it's not an operand\n\n\t\t top = noClose.pop();\n\t\t}\n\n\t\tnoClose.push(unload(op, nums));\n\t }\n\t \n\t else noClose.push(i); //pushed into a stack of what's in this ()\n \n\t}//end of for loop \n \n\treturn noClose.peek();\n }", "@Test\n\tpublic void testAssignment(){\n\t\tVariable x = new Variable(\"x\");\n\t\tOperator plus = new Operator(\"+\");\n\t\tExpression one = f.createNumNode(1);\n\t\tExpression two = f.createNumNode(2);\n\t\tExpression exp = f.createInfixNode(plus, one, two);\n\t\tStatement assign = f.createAssignNode(x,exp);\n\t\tassertEquals(assign.textRepresentation(), \"x = 1 + 2;\");\n\t\n\t\tASTNodeCountVisitor v = new ASTNodeCountVisitor();\n\t\tassign.accept(v);\n\t\tassertEquals(\"assignment test1 fail\", v.numCount, 2);\n\t\tassertEquals(\"assignment test2 fail\", v.infixCount, 1);\n\t\tassertEquals(\"assignment test3 fail\", v.assignCount, 1);\n\t}", "public int evaluate(String expression) {\n\t\tStack oPSt = new Stack();\n\t\tfor (int i = 0; i < expression.length(); i++) {\n\t\t\tString x = expression.substring(i, i + 1);\n\t\t\tStringBuilder longIntegers = new StringBuilder();\n\t\t\tif (x.equals(\" \"))\n\t\t\t\tcontinue;\n\t\t\telse {\n\t\t\t\tint counter = 0;\n\t\t\t\twhile (counter + i < expression.length()\n\t\t\t\t\t\t&& !expression.substring(i + counter, i + counter + 1).equals(\" \")) {\n\t\t\t\t\tlongIntegers.append(expression.substring(i + counter, i + 1 + counter));\n\t\t\t\t\tcounter++;\n\t\t\t\t}\n\t\t\t\ti = i + counter;\n\t\t\t}\n\t\t\tx = longIntegers.toString();\n\t\t\tif (isNum(x)) {\n\t\t\t\toPSt.push(Float.parseFloat(x));\n\t\t\t} else if (x.equals(\"*\") || x.equals(\"+\") || x.equals(\"/\") || x.equals(\"-\")) {\n\t\t\t\tFloat num1 = (Float) oPSt.pop(), num2 = (Float) oPSt.pop();\n\t\t\t\tif (x.equals(\"+\"))\n\t\t\t\t\toPSt.push(num1 + num2);\n\t\t\t\telse if (x.equals(\"*\"))\n\t\t\t\t\toPSt.push(num1 * num2);\n\t\t\t\telse if (x.equals(\"/\"))\n\t\t\t\t\toPSt.push(num2 / num1);\n\t\t\t\telse\n\t\t\t\t\toPSt.push(num2 - num1);\n\t\t\t} else\n\t\t\t\tthrow new RuntimeException(\"Invalid Input\");\n\n\t\t}\n\t\tif (oPSt.size() == 0)\n\t\t\treturn 0;\n\t\treturn (int)Math.round((Float) oPSt.pop());\n\t}", "public static int evaluateExpression(String expression) {\r\n // Create operandStack of ints to store operands\r\n Stack<Integer> operandStack = new Stack<>();\r\n \r\n // Create operatorStack of characters to store operators\r\n Stack<Character> operatorStack = new Stack<>();\r\n \r\n // Insert Blanks\r\n expression = insertBlanks(expression);\r\n \r\n // Extract operands and operators by splitting around blanks\r\n String[] tokens = expression.split(\" \");\r\n \r\n /* Phase 1: Scan tokens\r\n Enhanced for loop, puts every element of tokens in token each time\r\n Like writing token = tokens[i] every time\r\n */\r\n for (String token: tokens) { \r\n if(token.length() == 0) // It's a blank\r\n continue; // Go to the while loop\r\n else if (token.charAt(0) == '+' || token.charAt(0) == '-') {\r\n // process all +, -, *, / in the top of the operator stack\r\n while (!operatorStack.isEmpty() && // While stack isn't empty\r\n (operatorStack.peek() == '+' || // and has an operator on top\r\n operatorStack.peek() == '-' || // Like if you had (2 * 3) + 5 \r\n operatorStack.peek() == '*' || // Or if you had (2 - 3) + 5, do that last no matter what b/c +- is lowest priority\r\n operatorStack.peek() == '/' ||\r\n operatorStack.peek() == '^')) {\r\n processAnOperator(operandStack, operatorStack);\r\n }\r\n \r\n // After processing the all the previous operations, push the +- operator onto the stack\r\n operatorStack.push(token.charAt(0));\r\n }\r\n else if (token.charAt(0) == '*' || token.charAt(0) == '/') {\r\n // Proess all *, / in the top of the operator stack\r\n while(!operatorStack.isEmpty() &&\r\n (operatorStack.peek() == '*' ||\r\n operatorStack.peek() == '/' ||\r\n operatorStack.peek() == '^')) {\r\n processAnOperator(operandStack, operatorStack);\r\n }\r\n \r\n //Push the * or / onto the stack\r\n operatorStack.push(token.charAt(0));\r\n }\r\n else if (token.charAt(0) == '^') {\r\n // Proess all ^ in the top of the operator stack\r\n while(!operatorStack.isEmpty() &&\r\n (operatorStack.peek() == '^')) {\r\n processAnOperator(operandStack, operatorStack);\r\n }\r\n \r\n //Push the ^ onto the stack\r\n operatorStack.push(token.charAt(0));\r\n }\r\n else if(token.trim().charAt(0) == '(') {\r\n operatorStack.push('(');\r\n } \r\n else if(token.trim().charAt(0) == ')') {\r\n while(operatorStack.peek() != '(') {\r\n processAnOperator(operandStack, operatorStack);\r\n }\r\n operatorStack.pop(); // pop\r\n }\r\n else {\r\n operandStack.push(new Integer(token));\r\n }\r\n }\r\n // Phase two: process everything left over\r\n while (!operatorStack.isEmpty()) {\r\n processAnOperator(operandStack, operatorStack);\r\n }\r\n \r\n return operandStack.pop(); \r\n }", "EvaluationResult evalExpression(ValueExp expr, boolean displayExceptions)\n\t{\n\t\tEvaluationResult result = null;\n\t\ttry\n\t\t{\n\t\t\tresult = m_exprCache.evaluate(expr);\n\t\t}\n\t\tcatch(NoSuchVariableException nsv)\n\t\t{\n\t\t\tif (displayExceptions)\n\t\t\t{\n\t\t\t\tMap<String, Object> args = new HashMap<String, Object>();\n\t\t\t\targs.put(\"variable\", nsv.getMessage()); //$NON-NLS-1$\n\t\t\t\terr(getLocalizationManager().getLocalizedTextString(\"variableUnknown\", args)); //$NON-NLS-1$\n\t\t\t}\n\t\t}\n\t\tcatch(NumberFormatException nfe)\n\t\t{\n\t\t\tif (displayExceptions)\n\t\t\t{\n\t\t\t\tMap<String, Object> args = new HashMap<String, Object>();\n\t\t\t\targs.put(\"value\", nfe.getMessage()); //$NON-NLS-1$\n\t\t\t\terr(getLocalizationManager().getLocalizedTextString(\"couldNotConvertToNumber\", args)); //$NON-NLS-1$\n\t\t\t}\n\t\t}\n\t\tcatch(PlayerFaultException pfe)\n\t\t{\n\t\t\tif (displayExceptions)\n\t\t\t\terr(pfe.getMessage());\n\t\t}\n\t\tcatch (PlayerDebugException e)\n\t\t{\n\t\t\tif (displayExceptions)\n\t\t\t\terr(e.getMessage());\n\t\t}\n\n\t\treturn result;\n\t}", "public Object computeValue() throws SyntaxException {\n List<String> strings = getStrings();\n return parameter.parse(strings);\n }", "public final void expression() throws RecognitionException {\n int expression_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"expression\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(708, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 105) ) { return ; }\n // Java.g:709:5: ( conditionalExpression ( assignmentOperator expression )? )\n dbg.enterAlt(1);\n\n // Java.g:709:9: conditionalExpression ( assignmentOperator expression )?\n {\n dbg.location(709,9);\n pushFollow(FOLLOW_conditionalExpression_in_expression4079);\n conditionalExpression();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(709,31);\n // Java.g:709:31: ( assignmentOperator expression )?\n int alt126=2;\n try { dbg.enterSubRule(126);\n try { dbg.enterDecision(126);\n\n try {\n isCyclicDecision = true;\n alt126 = dfa126.predict(input);\n }\n catch (NoViableAltException nvae) {\n dbg.recognitionException(nvae);\n throw nvae;\n }\n } finally {dbg.exitDecision(126);}\n\n switch (alt126) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:709:32: assignmentOperator expression\n {\n dbg.location(709,32);\n pushFollow(FOLLOW_assignmentOperator_in_expression4082);\n assignmentOperator();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(709,51);\n pushFollow(FOLLOW_expression_in_expression4084);\n expression();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(126);}\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 105, expression_StartIndex); }\n }\n dbg.location(710, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"expression\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "public double evaluate(String expression) throws InvalidExpressionException {\n assertProperExpression(expression);\n \n // creating postfix\n String postfix = \"\";\n while (expression.length() > 0) {\n char item = expression.charAt(0);\n expression = expression.substring(1);\n // disregard spaces by\n if (item == ' ') continue;\n // add digits straight to postfix expression\n else if (isDigit(item)) postfix += item;\n // always push '(' on stack no matter what\n else if (item == '(') postfixStack.push('(');\n // dump stack until you hit end parenthesis which is voided\n else if (item == ')') {\n while (postfixStack.peek() != '(') {\n postfix += postfixStack.pop();\n }\n postfixStack.pop();\n continue;\n }\n // item must be operator, so push onto stack after removing higher precedents below it\n else if (isOperator(item)) {\n while (!postfixStack.isEmpty() &&\n isOperator(item) &&\n precedenceOf(postfixStack.peek()) >= precedenceOf(item)) postfix += postfixStack.pop();\n postfixStack.push(item);\n }\n }\n while (!postfixStack.isEmpty()) postfix += postfixStack.pop();\n\n // solving the postfix expression \n while (postfix.length() > 0) {\n char item = postfix.charAt(0);\n postfix = postfix.substring(1);\n\n if (isDigit(item)) solutionStack.push((double) (item - '0'));\n if (isOperator(item)) {\n double y = solutionStack.pop();\n double x = solutionStack.pop();\n if (item == '^') solutionStack.push(Math.pow(x, y));\n if (item == '*') solutionStack.push(x * y);\n if (item == '/') solutionStack.push(x / y);\n if (item == '+') solutionStack.push(x + y);\n if (item == '-') solutionStack.push(x - y);\n }\n }\n\n Double solution = solutionStack.pop();\n return solution;\n }", "public T evaluate(String expr, Map<String, Expression> dataSet) {\n List<Token> tokens = ExpressionParser.parse(expr);\n Expression expression = ExpressionBuilder.build(tokens);\n Visitor<T> visitor = new ExpressionVisitor<>(dataSet);\n return visitor.visit(expression);\n }", "private String evaluate(String expression) {\n String separators = \"()*+/-\";\n String result;\n // Stack for using in algorithm\n Stack<String> stackOperations = new Stack<String>();\n // Stack for RPN - reverse polish notation\n Stack<String> stackRPN = new Stack<String>();\n // Stack for evaluating answer\n Stack<String> stackTemp = new Stack<String>();\n //splitting expression into tokens\n StringTokenizer stringTokenizer = new StringTokenizer(updateUnaryMinus(expression), separators, true);\n\n while (stringTokenizer.hasMoreTokens()) {\n String token = stringTokenizer.nextToken();\n if (isNumber(token)) {\n stackRPN.push(token);\n } else if (isOpenBracket(token)) {\n stackOperations.push(token);\n } else if (isCloseBracket(token)) {\n while (!isOpenBracket(stackOperations.lastElement())) {\n stackRPN.push(stackOperations.pop());\n }\n stackOperations.pop();\n } else if (isOperator(token)) {\n while (!stackOperations.empty() && isOperator(stackOperations.lastElement())\n && getPrecedence(stackOperations.lastElement()) > getPrecedence(token)) {\n stackRPN.push(stackOperations.pop());\n }\n stackOperations.push(token);\n }\n }\n while (!stackOperations.empty()) {\n stackRPN.push(stackOperations.pop());\n }\n Collections.reverse(stackRPN);\n\n // Evaluation if RPN expression\n while (!stackRPN.empty()) {\n if (isNumber(stackRPN.lastElement())) stackTemp.push(stackRPN.pop());\n else stackTemp.push(makeOperation(stackRPN.pop(), stackTemp.pop(), stackTemp.pop()));\n }\n result = stackTemp.pop();\n return result;\n }", "public Expression determine(String s);", "public static Temp evalExpression(CommonTree tree){\n\t\t// leaf node, int/float/id\n\n\t\tif (tree.getChildCount() == 0){\n\t\t\tTemp temp = new Temp(temperaryNum++,tree.getType(),tree.getText());\n\t\t\tif (tree.getType() == LittleParser.INTLITERAL){\n\t\t\t\tircode.add(new ThreeOpCode(\"STOREI\",tree.getText(),temp.getName()));\n\t\t\t}\n\t\t\telse if(tree.getType() == LittleParser.FLOATLITERAL){\n\t\t\t\tircode.add(new ThreeOpCode(\"STOREF\",tree.getText(),temp.getName()));\n\t\t\t}\n\t\t\telse{ // look up the variable in the symbol table to set type, use var_name instead of $Tx and recycle $Tx\n\t\t\t\ttemp.setType(allTables.lookupType(temp.getValue().trim()));\n\t\t\t\ttemp.setName(tree.getText());\n\t\t\t\ttemperaryNum--;\n\t\t\t}\n\t\t\treturn temp;\n\t\t}\n\t\t// Not a leaf node, evaluate children expressions\n\t\telse{\n\t\t\t// test for function call\n\t\t\tif (tree.getType() == LittleParser.FUNC_CALL){\n\t\t\t\t// add IR for evaluating the function and return temperary for return value\n\t\t\t\t// after it has been popped off the stack\n\t\t\t\treturn evalFunction(tree);\n\t\t\t}\n\t\t\t//\t\t\tif (tree.getChild(0).getChildCount() == 0 && tree.getChild(1).getChildCount() == 0){\n\t\t\t//\t\t\t\tif ()\n\t\t\t//\t\t\t}\n\t\t\tTemp left = evalExpression((CommonTree) tree.getChild(0));\n\t\t\tTemp right = evalExpression((CommonTree) tree.getChild(1));\n\n\t\t\tTemp temp = new Temp(temperaryNum++,left.getType(), \"EXP\");\n\t\t\tif (tree.getText().contains(\"+\")){ // add\n\t\t\t\tif (left.getType() == LittleParser.INTLITERAL && right.getType() == LittleParser.INTLITERAL){\n\t\t\t\t\tircode.add(new ThreeOpCode(\"ADDI\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t}\n\t\t\t\telse if (left.getType() == LittleParser.FLOATLITERAL || right.getType() == LittleParser.FLOATLITERAL){\n\t\t\t\t\tircode.add(new ThreeOpCode(\"ADDR\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t} //both parameters\n\t\t\t\telse if (left.getType() == -1 && right.getType() == -1){\n\t\t\t\t\t//System.out.println(left.getName() + \": \" + left.getType() + \" \" + right.getName() + \": \" + right.getType());\n\t\t\t\t\t// need to lookup symbol in main and then global to find type\n\t\t\t\t\tint ltype = allTables.lookupType(left.name);\n\t\t\t\t\tint rtype = allTables.lookupType(right.name);\n\t\t\t\t\tif (ltype == LittleParser.INTLITERAL && rtype == LittleParser.INTLITERAL){\n\t\t\t\t\t\tircode.add(new ThreeOpCode(\"ADDI\", left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tircode.add(new ThreeOpCode(\"ADDR\", left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tircode.add(new ThreeOpCode(\"ADDI\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\ttemp.setType(LittleParser.INTLITERAL);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (tree.getText().contains(\"-\")){ // subtract\n\t\t\t\tif (left.getType() == LittleParser.INTLITERAL && right.getType() == LittleParser.INTLITERAL){\n\t\t\t\t\tircode.add(new ThreeOpCode(\"SUBI\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t}\n\t\t\t\telse if (left.getType() == LittleParser.FLOATLITERAL || right.getType() == LittleParser.FLOATLITERAL){\n\t\t\t\t\tircode.add(new ThreeOpCode(\"SUBR\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t}\n\t\t\t\telse if (left.getType() == -1 && right.getType() == -1){\n\t\t\t\t\t//System.out.println(left.getName() + \": \" + left.getType() + \" \" + right.getName() + \": \" + right.getType());\n\t\t\t\t\t// need to lookup symbol in main and then global to find type\n\t\t\t\t\tint ltype = allTables.lookupType(left.name);\n\t\t\t\t\tint rtype = allTables.lookupType(right.name);\n\t\t\t\t\tif (ltype == LittleParser.INTLITERAL && rtype == LittleParser.INTLITERAL){\n\t\t\t\t\t\tircode.add(new ThreeOpCode(\"SUBI\", left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tircode.add(new ThreeOpCode(\"SUBR\", left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tircode.add(new ThreeOpCode(\"SUBI\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\ttemp.setType(LittleParser.INTLITERAL);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (tree.getText().contains(\"*\")){ // multiply\n\t\t\t\tif (left.getType() == LittleParser.INTLITERAL && right.getType() == LittleParser.INTLITERAL){\n\t\t\t\t\t//System.out.println(\"MULTI \" + left.getName() + \" \" + right.getName() + \" \"+temp.getName());\n\t\t\t\t\tircode.add(new ThreeOpCode(\"MULI\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t}\n\t\t\t\telse if (left.getType() == LittleParser.FLOATLITERAL || right.getType() == LittleParser.FLOATLITERAL){\n\t\t\t\t\t//System.out.println(\"MULTF \" + left.getName() + \" \" + right.getName() + \" \"+temp.getName());\n\t\t\t\t\tircode.add(new ThreeOpCode(\"MULR\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t}\n\t\t\t\telse if (left.getType() == -1 && right.getType() == -1){\n\t\t\t\t\t//System.out.println(left.getName() + \": \" + left.getType() + \" \" + right.getName() + \": \" + right.getType());\n\t\t\t\t\t// need to lookup symbol in main and then global to find type\n\t\t\t\t\tint ltype = allTables.lookupType(left.name);\n\t\t\t\t\tint rtype = allTables.lookupType(right.name);\n\t\t\t\t\tif (ltype == LittleParser.INTLITERAL && rtype == LittleParser.INTLITERAL){\n\t\t\t\t\t\tircode.add(new ThreeOpCode(\"MULI\", left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tircode.add(new ThreeOpCode(\"MULR\", left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t//System.out.println(\"MULTI \" + left.getName() + \" \" + right.getName() + \" \"+temp.getName());\n\t\t\t\t\tircode.add(new ThreeOpCode(\"MULI\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\ttemp.setType(LittleParser.INTLITERAL);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{ // divide\n\t\t\t\tif (right.getType() == LittleParser.INTLITERAL && left.getType() == LittleParser.FLOATLITERAL){\n\t\t\t\t\t//System.out.println(\"DIVI \" + left.getName() + \" \" + right.getName() + \" \"+temp.getName());\n\t\t\t\t\tircode.add(new ThreeOpCode(\"DIVI\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t}\n\t\t\t\telse if (right.getType() == LittleParser.FLOATLITERAL || left.getType() == LittleParser.FLOATLITERAL){\n\t\t\t\t\t//System.out.println(\"DIVF \" + left.getName() + \" \" + right.getName() + \" \"+temp.getName());\n\t\t\t\t\tircode.add(new ThreeOpCode(\"DIVR\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t}\n\t\t\t\telse if (left.getType() == -1 && right.getType() == -1){\n\t\t\t\t\t//System.out.println(left.getName() + \": \" + left.getType() + \" \" + right.getName() + \": \" + right.getType());\n\t\t\t\t\t// need to lookup symbol in main and then global to find type\n\t\t\t\t\tint ltype = allTables.lookupType(left.name);\n\t\t\t\t\tint rtype = allTables.lookupType(right.name);\n\t\t\t\t\tif (ltype == LittleParser.INTLITERAL && rtype == LittleParser.INTLITERAL){\n\t\t\t\t\t\tircode.add(new ThreeOpCode(\"DIVI\", left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tircode.add(new ThreeOpCode(\"DIVR\", left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t//System.out.println(\"DIVI \" + left.getName() + \" \" + right.getName() + \" \"+temp.getName());\n\t\t\t\t\tircode.add(new ThreeOpCode(\"DIVI\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\ttemp.setType(LittleParser.INTLITERAL);\n\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn temp;\n\t\t}\n\n\t}", "@Override\n public double evaluate(Map<String, Double> assignment) throws Exception {\n\n double res = Math.log(getEx2().evaluate(assignment)) / Math.log(getEx2().evaluate(assignment));\n return res;\n }", "private Object eval(SimpleExpr expr) {\n Object res = eval(expr.getExpr().get(0));\n\n for (int i = 1; i < expr.getExpr().size(); i++) {\n Object res2 = eval(expr.getExpr().get(i));\n String opt = expr.getOpt().get(i - 1);\n\n if (\"+\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res + (Double) res2;\n } else if (res instanceof Double && res2 instanceof String) {\n res = \"\" + res + res2;\n } else if (res instanceof Boolean && res2 instanceof String) {\n res = \"\" + res + res2;\n } else if (res instanceof String && res2 instanceof String) {\n res = \"\" + res + res2;\n } else if (res instanceof String && res2 instanceof Double) {\n res = \"\" + res + res2;\n } else if (res instanceof String && res2 instanceof Boolean) {\n res = \"\" + res + res2;\n } else {\n throw new RaydenScriptException(\"Expression error: SimpleExpr error\");\n }\n } else if (\"-\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res - (Double) res2;\n } else {\n throw new RaydenScriptException(\"Expression error: SimpleExpr error\");\n }\n } else {\n throw new RaydenScriptException(\"Expression error: Invalid operator '\" + opt + \"'.\");\n }\n }\n\n return res;\n }", "private Object evalETree(ETreeNode node) throws FSException{\n Object lVal,rVal;\n\n if ( node == null )\n {\n parseError(\"Malformed expression\");\n // this is never reached, just for readability\n return null;\n }\n\n if (node.type==ETreeNode.E_VAL){\n return node.value;\n }\n lVal=evalETree(node.left);\n rVal=evalETree(node.right);\n\n switch (((Integer)node.value).intValue()){\n //call the various eval functions\n case LexAnn.TT_PLUS:{\n return evalPlus(lVal,rVal);\n }\n case LexAnn.TT_MINUS:{\n return evalMinus(lVal,rVal);\n }\n case LexAnn.TT_MULT:{\n return evalMult(lVal,rVal);\n }\n case LexAnn.TT_DIV:{\n return evalDiv(lVal,rVal);\n }\n case LexAnn.TT_LEQ:{\n return evalEq(lVal,rVal);\n }\n case LexAnn.TT_LNEQ:{\n return evalNEq(lVal,rVal);\n }\n case LexAnn.TT_LLS:{\n return evalLs(lVal,rVal);\n }\n case LexAnn.TT_LLSE:{\n return evalLse(lVal,rVal);\n }\n case LexAnn.TT_LGR:{\n return evalGr(lVal,rVal);\n }\n case LexAnn.TT_LGRE:{\n return evalGre(lVal,rVal);\n }\n case LexAnn.TT_MOD:{\n return evalMod(lVal,rVal);\n }\n case LexAnn.TT_LAND:{\n return evalAnd(lVal,rVal);\n }\n case LexAnn.TT_LOR:{\n return evalOr(lVal,rVal);\n }\n }\n\n return null;\n }", "Hojas eval();", "public String evaluate(ArrayList<String> expression)\n {\n Stack<String> Values = new Stack<String>(), Operations = new Stack<String>();\n\n for (int i = 0; i < expression.size(); i++)\n\t\t{\n\t\t\tif (expression.get(i).equals(\"(\"))\n Operations.push(expression.get(i));\n else if (expression.get(i).equals(\")\"))\n {\n while (Operations.peek().equals(\"(\"))\n Values.push(apply(Operations.pop(), Values.pop(), Values.pop()));\n Operations.pop();\n }\n else if (expression.get(i).equals(\"+\") || expression.get(i).equals(\"-\") || expression.get(i).equals(\"*\") || expression.get(i).equals(\"/\"))\n {\n while (!Operations.empty() && precedence(expression.get(i), Operations.peek()))\n Values.push(apply(Operations.pop(), Values.pop(), Values.pop()));\n Operations.push(expression.get(i));\n }\n\t\t\telse\n\t\t\t{\n\t\t\t\tValues.push(expression.get(i));\n\t\t\t}\n }\n while (!Operations.empty())\n Values.push(apply(Operations.pop(), Values.pop(), Values.pop()));\n return Values.pop();\n }", "@Override\n public CodeFragment visitBlockAsgn(AlangParser.BlockAsgnContext ctx) {\n String name = ctx.ID().getText();\n if (!variableExists(name)) {\n this.addError(ctx, name, \"Assignment to undeclared variable\");\n return new CodeFragment(\"\");\n }\n\n CodeFragment result = new CodeFragment();\n CodeFragment expr = visit(ctx.expression());\n\n result.addCode(expr);\n\n Variable v = this.getVariable(name);\n v.setHasValue();\n\n int arity = ctx.index_to_array().size();\n\n if (v.arity > 0) {\n if (!checkArityAssignment(v, arity)) {\n this.addError(ctx, name, \"Bad assignment to array\");\n return new CodeFragment(\"\");\n }\n }\n\n if (arity == 0) {\n result.addCode(String.format(\"store %s %s, %s* %s\\n\", v.llvmtype, expr.getRegister(), v.llvmtype, v.reg));\n } else {\n /* in case we assign to array */\n int pointers = ctx.index_to_array().size();\n ArrayList<String> registers = new ArrayList<String>();\n for (int i = 0; i < arity; i++) {\n CodeFragment index = visit(ctx.index_to_array(i).expression());\n result.addCode(index);\n registers.add(index.getRegister());\n }\n\n CodeFragment ptr = this.getPointerToArray(v, registers);\n result.addCode(ptr);\n\n ST store = this.group.getInstanceOf(\"store\");\n store.add(\"type\", v.llvmtype);\n store.add(\"reg\", expr.getRegister());\n store.add(\"where\", ptr.getRegister());\n result.addCode(store.render() + \"\\n\");\n }\n\n return result;\n }", "protected IExpressionValue assignment(List<Entity> declaredStates, List<Entity> possibleStates) \r\n\t\t\t\t\tthrows InvalidProbabilityRangeException, \r\n\t\t\t\t\t\t TableFunctionMalformedException,\r\n\t\t\t\t\t\t SomeStateUndeclaredException{\r\n\t\t\r\n\t\t// prepare a representation of a cell inside the temporary table\r\n\t\tTempTableProbabilityCell currentCell = new TempTableProbabilityCell(null, null);\r\n\t\t\r\n\t\t// SCAN FOR IDENTIFIER\r\n\t\tscan();\r\n\t\tString userDefinedVariableName = null;\t// this will become non-null if there is an unknown state declared (unknown states will become user-defined variables)\r\n\t\tif (token == 'x') {\r\n\t\t\tif (this.node != null) {\r\n\t\t\t\t// Consistency check C09\r\n\t\t\t\t// Remember declared states, so we can check later if all states was declared\r\n\t\t\t\tEntity possibleValue = null;\r\n\t\t\t\tint index = this.node.getPossibleValueIndex(this.noCaseChangeValue);\r\n\t\t\t\tif (index < 0) {\r\n\t\t\t\t\t// unknown states will be considered as a new variable that user has declared\r\n\t\t\t\t\tuserDefinedVariableName = this.noCaseChangeValue;\r\n\t\t\t\t} else {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tpossibleValue = possibleStates.get(index);\r\n\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t//throw new TableFunctionMalformedException(e.getMessage());\r\n\t\t\t\t\t\tthrow new TableFunctionMalformedException(this.node.toString(), e);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (possibleValue == null) {\r\n\t\t\t\t\t\tthrow new TableFunctionMalformedException(getNode().toString());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdeclaredStates.add(possibleValue);\r\n\t\t\t\t\tcurrentCell.setPossibleValue(possibleValue);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\texpected(\"Identifier\");\r\n\t\t}\r\n\r\n\t\t// LOOK FOR = OPERATOR\r\n\t\tmatch('=');\r\n\r\n\t\t// consistency check C09\r\n\t\t// ret verifies the sum of all declared states' probability (must be 1)\r\n\t\t// boolean hasUnknownValue shows if some ret was negative or NaN.\r\n\t\tIExpressionValue ret = expression();\t\r\n\t\tif (ret == null) {\r\n\t\t\tthrow new TableFunctionMalformedException(getResource().getString(\"NonDeclaredVarStateAssignment\"));\r\n\t\t}\r\n\t\tfloat retValue = 0;\t// initialize with a value which will not impact consistency check (the one that checks if sum is 1)\r\n\t\tif (userDefinedVariableName == null) {\r\n\t\t\t// this is a state of current node, so store the probability in order to calculate consistency later\r\n\t\t\tif (!ret.isNumeric()) {\r\n\t\t\t\t// state of nodes must be probabilities (numbers)\r\n\t\t\t\tthrow new TableFunctionMalformedException(getResource().getString(\"NonNumericProbAssignment\"));\r\n\t\t\t}\r\n\t\t\ttry {\r\n\t\t\t\tretValue = Float.parseFloat(ret.getValue());\r\n\t\t\t} catch (NumberFormatException e) {\r\n\t\t\t\tretValue = Float.NaN;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t// this is a user-defined value\r\n\t\t\t// store it in the scope of current if-clause\r\n\t\t\tthis.currentHeader.addUserDefinedVariable(userDefinedVariableName, ret);\r\n\t\t}\r\n\t\tboolean hasUnknownValue = Float.isNaN(retValue);\r\n\t\t\r\n\t\t// add cell to header\r\n\t\tcurrentCell.setProbability(ret);\r\n\t\tif (currentCell.getPossibleValue() != null && currentCell.getPossibleValue() != null) {\r\n\t\t\tthis.currentHeader.addCell(currentCell);\r\n\t\t}\r\n\t\t// Debug.println(\"Adding cell: \" + currentCell.getPossibleValue().getName() + \" = \" + ret.toString());\r\n\r\n\t\t// consistency check C09\r\n\t\t// a single state shall never have negative prob \r\n\t\tif ( isToNormalize()\r\n\t\t\t\t&& ((retValue < 0.0) \r\n//\t\t\t\t\t\t|| (1.0 < retValue)\r\n\t\t\t\t\t\t)) {\r\n\t\t\tthrow new InvalidProbabilityRangeException(getNode().toString());\r\n\t\t}\r\n\t\t\r\n\t\t// LOOK FOR , (OPTIONAL)\r\n\t\tif (look == ',') {\r\n\t\t\tmatch(',');\r\n\t\t\tif (look != this.kwcode[this.lookup(\"IF\")]) {\r\n\t\t\t\tIExpressionValue temp = assignment(declaredStates, possibleStates);\r\n\t\t\t\tfloat tempValue = Float.NaN;\r\n\t\t\t\ttry {\r\n\t\t\t\t\ttempValue = Float.parseFloat(temp.getValue());\r\n\t\t\t\t} catch (NumberFormatException e) {\r\n\t\t\t\t\ttempValue = Float.NaN;\r\n\t\t\t\t}\r\n\t\t\t\thasUnknownValue = hasUnknownValue || (Float.isNaN(tempValue));\r\n\t\t\t\tif (hasUnknownValue) {\r\n\t\t\t\t\tretValue = Float.NaN;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tretValue += tempValue;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t// this is an if-clause after assignment.\r\n\t\t\t\t// we should finish assignment (assignments in same block of if-clauses must be always before the if clause)\r\n\t\t\t\t// if assignment and if-clause happens in same block, assingments must be only for user-defined variables\r\n\t\t\t\tif (!currentHeader.getCellList().isEmpty()) {\r\n\t\t\t\t\t// user-defined variables are not added to cellList. Assignments to states of variables are added to cell list.\r\n\t\t\t\t\t// if this is not empty, then there were assignments to states of variables, so this is invalid.\r\n\t\t\t\t\tthrow new SomeStateUndeclaredException(getResource().getString(\"NonUserDefinedVariablesFoundBeforeIfClause\"));\r\n\t\t\t\t}\r\n\t\t\t\t// let the upper clause actually handle the if=clause\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Debug.println(\"Returned expression value = \" + retValue);\r\n\t\tif (isToNormalize() && (retValue < 0)) {\r\n\t\t\tthrow new InvalidProbabilityRangeException(getNode().toString());\r\n\t\t}\r\n\t\treturn new SimpleProbabilityValue(retValue);\r\n\t}", "public Object parseValue(String expr);", "public abstract Object eval();", "private static int evaluateExpression(String expression, int number1, int number2){\n if(expression.equals(\"plus\")){\n \treturn (number1 + number2);\n }else if(expression.equals(\"minus\")){\n \treturn (number1 - number2);\n }else if(expression.equals(\"times\")){\n \treturn(number1 * number2);\n }else if(expression.equals(\"divide\")){\n \treturn(number1 / number2);\n }\n return 0;\n \n }", "@Override\n\tpublic void visit(AssignNode node) {\n\t\tEvaluator.evaluate(node.getChild(0));\n\t\tEvaluator.evaluate(node.getChild(1));\n\n\t\t/**\n\t\t * Verificam fiii si construim perechea Variabila, Valoare pentru a fi\n\t\t * inserata in HahMap-ul din Evaluator\n\t\t */\n\t\tVariable x = null;\n\t\tValue i = null;\n\t\tif (node.getChild(1) instanceof Variable) {\n\t\t\tx = new Variable(node.getChild(1).getName());\n\t\t} else {\n\t\t\ti = new Value(node.getChild(1).getName());\n\t\t}\n\n\t\tif (node.getChild(0) instanceof Variable) {\n\t\t\tx = new Variable(node.getChild(0).getName());\n\t\t} else {\n\t\t\ti = new Value(node.getChild(0).getName());\n\t\t}\n\t\tEvaluator.variables.put(x.getName(), i.getName());\n\t\tnode.setName(i.getName());\n\t}", "private Term parseAssign(final boolean required) throws ParseException {\n Term t1 = parseConditional(required);\n while (t1 != null) {\n int tt = _tokenizer.next();\n if (tt == '=') {\n Term t2 = parseAssign(true);\n if (t1 instanceof Term.Ref && ((Term.Ref) t1).getVariable() != null) {\n t1 = new Term.Assign(t1, t2);\n } else {\n reportError(\"Variable expected on the left side of assignment '='.\");\n }\n } else {\n _tokenizer.pushBack();\n break;\n }\n }\n return t1;\n }", "@Override\n\tpublic double evaluate() {\n\t\tString var = myChildren.get(0).myChildren.get(0).toString(); //goes two levels down to get variable\n\t\tint start = (int) myChildren.get(0).myChildren.get(1).evaluate(); \n\t\tint end = (int) myChildren.get(0).myChildren.get(2).evaluate(); \n\t\tint increment = (int) myChildren.get(0).myChildren.get(3).evaluate(); \n\t\tdouble returnVal = 0;\n\t\tfor(int i = start; i < end; i += increment) {\n\t\t\tUserVariables.add(var, i);\n\t\t\tfor(Node child : myChildren) {\n\t\t\t\treturnVal = child.evaluate(); //repeatNode will contain a GroupNode, but GroupNodes know how to evaluate themselves\n\t\t\t}\n\t\t}\n\t\treturn returnVal;\n\t}", "private void expression(){\n\t\twhile (in.token != Token.exit){\n\t\t\tdouble value = terms();\n\t\t\tif(in.buffer.variableDetected && initialization == true){\n\t\t\t\tvariables.put(in.buffer.variable, new BigDecimal(value));\n\t\t\t\tin.buffer.variableDetected = false;\n\t\t\t}\n\t\t\telse\n\t\t\t\tif(initialization && !in.buffer.empty)\n\t\t\t\t\tSystem.out.println(\"= \" + value);\n\t\t\tinitialization = true;\n\t\t\tin.getToken(); \t\t\t//This command flushes the end of input marker \";\" which allows for new expressions to be taken in.\n\t\t}\n\t}", "public Const evaluate();", "protected Sequence actuallyEvaluate(XPathContext context, Component<GlobalVariable> target) throws XPathException {\n final Controller controller = context.getController();\n assert controller != null;\n final Bindery b = controller.getBindery(getPackageData());\n //System.err.println(\"EVAL GV \" + this + \" \" + getVariableQName().getDisplayName() + \" in slot \" + getBinderySlotNumber());\n\n try {\n // This is the first reference to a global variable; try to evaluate it now.\n // But first check for circular dependencies.\n setDependencies(this, context);\n\n // Set a flag to indicate that the variable is being evaluated. This is designed to prevent\n // (where possible) the same global variable being evaluated several times in different threads\n boolean go = b.setExecuting(this);\n if (!go) {\n // some other thread has evaluated the variable while we were waiting\n return b.getGlobalVariable(getBinderySlotNumber());\n }\n\n Sequence value = getSelectValue(context, target);\n if (indexed) {\n value = controller.getConfiguration().obtainOptimizer().makeIndexedValue(value.iterate());\n }\n return b.saveGlobalVariableValue(this, value);\n\n } catch (XPathException err) {\n b.setNotExecuting(this);\n if (err instanceof XPathException.Circularity) {\n String errorCode;\n if (getPackageData().getHostLanguage() == Configuration.XSLT) {\n errorCode = \"XTDE0640\";\n } else if (getPackageData().getXPathVersion() >= 30) {\n errorCode = \"XQDY0054\";\n } else {\n errorCode = \"XQST0054\";\n }\n err.setErrorCode(errorCode);\n err.setXPathContext(context);\n // Detect it more quickly the next time (in a pattern, the error is recoverable)\n SingletonClosure closure = new SingletonClosure(new ErrorExpression(err), context);\n b.setGlobalVariable(this, closure);\n err.setLocation(getLocation());\n throw err;\n } else {\n throw err;\n }\n }\n }", "void doSet() throws NotConnectedException\n\t{\n\t\ttry\n\t\t{\n\t\t\tValueExp exp = null;\n\n\t\t\tif (!hasMoreTokens())\n\t\t\t\terr(getLocalizationManager().getLocalizedTextString(\"setCommand\")); //$NON-NLS-1$\n\t\t\telse\n\t\t\t{\n\t\t\t\t// pull the expression\n\t\t\t\tString s = restOfLine();\n\n\t\t\t\t// parse and eval which causes the assignment to occur...\n\t\t\t\tif ( (exp = parseExpression(s)) == null )\n\t\t\t\t\t; // failed parse\n\n\t\t\t\t// make sure contains assignment\n\n\t\t\t\telse if ( !exp.containsAssignment() )\n\t\t\t\t\tthrow new IllegalAccessException(\"=\"); //$NON-NLS-1$\n\n\t\t\t\telse\n\t\t\t\t\tevalExpression(exp);\n\t\t\t}\n\t\t}\n\t\tcatch(IllegalAccessException iae)\n\t\t{\n\t\t\tMap<String, Object> args = new HashMap<String, Object>();\n\t\t\targs.put(\"operator\", iae.getMessage()); //$NON-NLS-1$\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"missingOperator\", args)); //$NON-NLS-1$\n\t\t}\n\t\tcatch(NullPointerException npe)\n\t\t{\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"couldNotEvaluate\")); //$NON-NLS-1$\n\t\t}\n\t}", "public static void main(String[] args) throws Exception {\r\n Expression e = new Plus(new Mult(2, \"x\"), new Plus(new Sin(new Mult(4, \"y\")), new Pow(\"e\", \"x\")));\r\n System.out.println(e);\r\n Map<String, Double> assignment = new TreeMap<String, Double>();\r\n assignment.put(\"x\", 2.0);\r\n assignment.put(\"y\", 0.25);\r\n assignment.put(\"e\", 2.71);\r\n System.out.println(e.evaluate(assignment));\r\n e = e.differentiate(\"x\");\r\n System.out.println(e);\r\n System.out.println(e.evaluate(assignment));\r\n System.out.println(e.simplify());\r\n System.out.println(e);\r\n }", "@NotNull\n public final Promise<XExpression> calculateEvaluationExpression() {\n return myValueContainer.calculateEvaluationExpression();\n }", "@Override\n public void visit(VariableAssignNode variableAssignNode) {\n }", "public int eval(Environment env)\n {\n Environment hangingenvironment = new Environment();\n hangingenvironment.setParent(env);\n Environment temp = env;\n while (temp.getParent() != null)\n {\n temp = temp.getParent();\n }\n ProcedureDeclaration dec = temp.getProcedure(name);\n hangingenvironment.setVariable(name, 0);\n ArrayList<String> params = (ArrayList <String>) dec.getParams();\n for (int i = 0; i < params.size(); i++)\n {\n hangingenvironment.setVariable(params.get(i),\n express.get(i).eval(env));\n }\n hangingenvironment.getProcedure(name).getStatement()\n .exec(hangingenvironment);\n return hangingenvironment.getVariable(name);\n }", "public double evaluate(double x);", "private Operation expression(Scope scope, Vector queue)\r\n {\r\n Operation root = expression1(scope, queue);\r\n\r\n if (assign.contains(nextSymbol))\r\n {\r\n Operation op = new Operation();\r\n\r\n op.left = root;\r\n\r\n op.operator = assignmentOperator();\r\n op.right = expression(scope, queue);\r\n\r\n root = op;\r\n }\r\n\r\n return root;\r\n }", "public Object eval(Environment e) \n {\n return val;\n }", "final public Object evaluate(Context context) throws PropertyException {\n try {\n Object val = getValue(context);\n if (val instanceof Macro) {\n val = ((Macro) val).evaluate(context); // recurse\n } \n return val;\n } \n catch (NullPointerException e) {\n // May throw\n context.getEvaluationExceptionHandler()\n .evaluate(this, context, \n new PropertyException.NullValueException(_vname));\n return null;\n } \n catch (PropertyException e) {\n // May throw\n if (e instanceof PropertyException.UndefinedVariableException){\n PropertyException.UndefinedVariableException uve = (PropertyException.UndefinedVariableException)e;\n if (_names.length > 1)\n uve.setMessage(\n \"Attempted to reference a property or method of an undefined variable: $\" + _names[0]);\n else\n uve.setMessage(\n \"Attempted to evaluate an undefined variable: $\" + _names[0]);\n }\n context.getEvaluationExceptionHandler()\n .evaluate(this, context, e);\n return null;\n }\n catch (Exception e) {\n // May throw\n context.getEvaluationExceptionHandler()\n .evaluate(this, context, \n new PropertyException(\"Variable: exception evaluating \" \n + _vname, e));\n return null;\n }\n }", "public Expression assign(String var, Expression expression) {\r\n // if this variable is val no meter if is capital or small letter.\r\n if (this.variable.equalsIgnoreCase(var)) {\r\n return expression;\r\n }\r\n return this;\r\n }", "Expr expr();", "private Object eval(RelExpr expr) {\n Object res = eval(expr.getExpr().get(0));\n\n if (expr.getExpr().size() == 2) {\n Object res2 = eval(expr.getExpr().get(1));\n String opt = expr.getOpt();\n\n if (\"==\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = ((Double) res).equals(res2);\n } else if (res instanceof String && res2 instanceof String) {\n res = ((String) res).equals(res2);\n } else if (res instanceof Boolean && res2 instanceof Boolean) {\n res = ((Boolean) res).equals(res2);\n } else {\n throw new RaydenScriptException(\"Expression error: RelExpr error\");\n }\n } else if (\"!=\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = !((Double) res).equals(res2);\n } else if (res instanceof String && res2 instanceof String) {\n res = !((String) res).equals(res2);\n } else if (res instanceof Boolean && res2 instanceof Boolean) {\n res = !((Boolean) res).equals(res2);\n } else {\n throw new RaydenScriptException(\"Expression error: RelExpr error\");\n }\n } else if (\"<\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res < (Double) res2;\n } else {\n throw new RaydenScriptException(\"Expression error: RelExpr error\");\n }\n } else if (\"<=\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res <= (Double) res2;\n } else {\n throw new RaydenScriptException(\"Expression error: RelExpr error\");\n }\n } else if (\">\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res > (Double) res2;\n } else {\n throw new RaydenScriptException(\"Expression error: RelExpr error\");\n }\n } else if (\">=\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res >= (Double) res2;\n } else {\n throw new RaydenScriptException(\"Expression error: RelExpr error\");\n }\n } else {\n throw new RaydenScriptException(\"Expression error: Invalid operator '\" + opt + \"'.\");\n }\n }\n\n return res;\n }", "Expression getExp();", "public final void rule__XExpressionInClosure__ExpressionsAssignment_1_0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:18109:1: ( ( ruleXExpressionOrVarDeclaration ) )\r\n // InternalDroneScript.g:18110:2: ( ruleXExpressionOrVarDeclaration )\r\n {\r\n // InternalDroneScript.g:18110:2: ( ruleXExpressionOrVarDeclaration )\r\n // InternalDroneScript.g:18111:3: ruleXExpressionOrVarDeclaration\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXExpressionInClosureAccess().getExpressionsXExpressionOrVarDeclarationParserRuleCall_1_0_0()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleXExpressionOrVarDeclaration();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXExpressionInClosureAccess().getExpressionsXExpressionOrVarDeclarationParserRuleCall_1_0_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public float evaluate() \n {\n return evaluate(expr, expr.length()-1);\n }", "@Override\r\n\tpublic int evaluate(String expression) {\r\n\t\tString e =expression;\r\n\t\tfloat result=0; //the returned result \r\n\t\tif(e.length()==2) {\r\n\t\t\te = removespaces(e);\r\n\t\t\tint z =Integer.parseInt(e);\r\n\t\t\treturn z;\r\n\t\t}\r\n\t\tfor(int i =0 ;i<expression.length();i++){\r\n\t\t\tif(Character.isLetter(e.charAt(i))){\r\n\t\t\t\tthrow new RuntimeException(\"You Can't evaluate letters\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int i =0 ;i<expression.length()-1;i++) {\r\n\t\t\twhile(e.charAt(i) != '+' &&e.charAt(i) != '/' &&e.charAt(i) != '-' &&e.charAt(i) != '*' ) {\r\n\t\t\t\tint j = 0;\r\n\t\t\t\twhile(e.charAt(i) != ' ' ) {\r\n\t\t\t\t\tj++;\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}\r\n\t\t\t\tif(j>0) {\r\n\t\t\t\t\tString k = e.substring(i-j, i);\r\n\t\t\t\t\tk = removespaces(k);\r\n\t\t\t\t\tfloat z = Integer.parseInt(k);\r\n\t\t\t\t\topr.push(z);}\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t\tif(e.charAt(i)== '+') {\r\n\t\t\t\tfloat x = (float)opr.pop();\r\n\t\t\t\tresult = (float)opr.pop();\r\n\t\t\t\tresult = result + x;\r\n\t\t\t\topr.push(result);\r\n\t\t\t}\r\n\t\t\telse if(e.charAt(i)== '*') {\r\n\t\t\t\tfloat x = (float)opr.pop();\r\n\t\t\t\tresult = (float)opr.pop();\r\n\t\t\t\tresult = result * x;\r\n\t\t\t\topr.push(result);\r\n\t\t\t}\r\n\t\t\telse if(e.charAt(i)== '-') {\r\n\t\t\t\tfloat x = (float)opr.pop();\r\n\t\t\t\tresult = (float)opr.pop();\r\n\t\t\t\tresult = result - x;\r\n\t\t\t\topr.push(result);\r\n\t\t\t}\r\n\t\t\telse if(e.charAt(i)== '/') {\r\n\t\t\t\tfloat x = (float)opr.pop();\r\n\t\t\t\tresult = (float)opr.pop();\r\n\t\t\t\tresult = result / x;\r\n\t\t\t\topr.push(result);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\treturn (int)result;\r\n\r\n\t}", "private Expr visitLocalAssign(LocalAssign n) throws SemanticException { \n Position pos = n.position();\n if (n.operator() == Assign.ASSIGN) return n;\n X10Binary_c.Operator op = n.operator().binaryOperator();\n Local left = (Local) n.left();\n Expr right = n.right();\n Type R = left.type();\n Expr val = visitBinary((X10Binary_c) xnf.Binary(pos, left, op, right).type(R));\n return assign(pos, left, Assign.ASSIGN, val);\n }", "static void translate() {\n if(!token.equals(\"IF\")) {\r\n stack.add(lexeme);\r\n index++;\r\n\r\n // Add assignment operator to the intermediate stack\r\n lex();\r\n stack.add(lexeme);\r\n index++;\r\n\r\n lex();\r\n while (!token.equals(\"END\")) {\r\n\r\n if (lexeme.equals(\"(\")) {\r\n tParen();\r\n } else if (token.equals(\"PLUS\") || token.equals(\"MINUS\") || token.equals(\"STAR\") || token.equals(\"DIVOP\") || token.equals(\"MOD\")) {\r\n stack.add(index, lexeme);\r\n index++;\r\n\r\n lex();\r\n if (lexeme.equals(\"(\")) {\r\n tParen();\r\n } else {\r\n index--;\r\n stack.add(index, lexeme);\r\n index++;\r\n index++;\r\n }\r\n } else {\r\n index--;\r\n stack.add(index, lexeme);\r\n index++;\r\n }\r\n\r\n lex();\r\n\r\n if (token.equals(\"END\"))\r\n break;\r\n\r\n if (token.equals(\"IDENTIFIER\")) {\r\n index++;\r\n break;\r\n }\r\n\r\n if (token.equals(\"IF\")) {\r\n index++;\r\n break;\r\n }\r\n }\r\n\r\n // Beginning the execution and evaluation of the translated code.\r\n index = 0;\r\n\r\n while (!stack.get(index).equals(\"=\") && !stack.get(index).equals(\"+\") && !stack.get(index).equals(\"-\") &&\r\n !stack.get(index).equals(\"*\") && !stack.get(index).equals(\"/\") && !stack.get(index).equals(\"%\")) {\r\n index ++;\r\n }\r\n\r\n int value = 0;\r\n int operand1 = 0;\r\n int operand2 = 0;\r\n String operator = stack.get(index);\r\n stack.remove(index);\r\n index--;\r\n\r\n if (operator.equals(\"=\")) {\r\n\r\n try {\r\n value = Integer.parseInt(stack.get(index));\r\n }\r\n catch (NumberFormatException e) {\r\n value = Integer.parseInt(varList.get(search(stack.get(index)) + 1));\r\n }\r\n\r\n stack.remove(index);\r\n index--;\r\n\r\n String id = stack.get(index);\r\n stack.remove(index);\r\n\r\n //System.out.println(\"\\n\" + id + \" is equal to \" + value);\r\n\r\n if (search(id) == -1) {\r\n varList.add(id);\r\n varList.add(Integer.toString(value));\r\n } else {\r\n varList.set(search(id) + 1, Integer.toString(value));\r\n }\r\n }\r\n\r\n else {\r\n try {\r\n operand2 = Integer.parseInt(stack.get(index));\r\n }\r\n catch (NumberFormatException e) {\r\n operand2 = Integer.parseInt(varList.get(search(stack.get(index)) + 1));\r\n }\r\n stack.remove(index);\r\n index--;\r\n\r\n try {\r\n operand1 = Integer.parseInt(stack.get(index));\r\n }\r\n catch (NumberFormatException e) {\r\n operand1 = Integer.parseInt(varList.get(search(stack.get(index)) + 1));\r\n }\r\n stack.remove(index);\r\n\r\n execute(evaluate(operand1, operand2, operator));\r\n }\r\n\r\n if (!token.equals(\"END\")) {\r\n translate();\r\n }\r\n }\r\n\r\n // IF STATEMENTS\r\n else {\r\n if(translateIF())\r\n translate();\r\n else\r\n skipStatement();\r\n }\r\n }", "private String evaluateExpr(String expr){\n\t\t//bigdecimal used for long user inputs\n\t\tBigDecimal num1, num2, ans, temp = new BigDecimal(\"0\");\n\t\tint check = 1;\n\t\t//find the position of function\n\t\twhile(Character.isDigit(expr.charAt(check)) || expr.charAt(check) == '.')\n\t\t\tcheck++;\n\t\t//extract numbers from expression\n\t\tnum1 = new BigDecimal(expr.substring(0,check));\n\t\tnum2 = new BigDecimal(expr.substring(check + 1,expr.length()));\n\t\t//division by zero error\n\t\tif(num2.compareTo(temp) == 0 && expr.charAt(check) == '/')\n\t\t\treturn \"Invalid\";\n\t\t//evaluate functions\n\t\tif(expr.charAt(check) == '*')\n\t\t\tans = num1.multiply(num2);\n\t\telse if(expr.charAt(check) == '+')\n\t\t\tans = num1.add(num2);\n\t\telse if(expr.charAt(check) == '/')\n\t\t\tans = num1.divide(num2, MathContext.DECIMAL32);\n\t\telse\n\t\t\tans = num1.subtract(num2);\n\t\treturn ans.toString();\n\t}", "public String evaluateExpression(ValueExpression expr,CodeExecutionContext execCtx) throws JavascribeException;", "public interface IExpressionRuntime\n{\n Object evaluate();\n}", "@Override\n\tpublic Object evaluate(Interpreter interpreter)\n\t{\n\t\t((VarToken) A).assign(interpreter, (String) B.evaluate(interpreter));\n\t\treturn null;\n\t}", "public ASTNode visitEvaluate(EvaluateContext ctx) {\n ASTExpr expr = (ctx.expr() == null) ? null : (ASTExpr)visit(ctx.expr());\n return new ASTEval(ctx, expr);\n }", "@GetMapping(\"/evaluate\")\n public ResponseEntity<?> evaluateSimpleExpression(@RequestParam(\"expression\") String expression) {\n try {\n double result = Interpreter.evaluate(expression);\n return new ResponseEntity<>(result,HttpStatus.OK);\n } catch (SyntaxError | IllegalArgumentException e) {\n return new ResponseEntity<>(e.getMessage(), HttpStatus.BAD_REQUEST);\n }\n }", "public interface Evaluator\n{\n /**\n * Return true if the given object is valid as an expression to\n * the evaluator. If an object is a valid expression, then the\n * evaluator is, in general, able to <code>eval()</code> it into\n * a result (or at least reasonably attempt to do so).\n *\n * @param value the value to check\n * @return true if it is valid as an expression, false if not\n */\n public boolean isExpression (Object value);\n\n /**\n * Return true if the given object is a possible result of evaluation.\n * If this returns true, then it is conceivable that the given object\n * was the result of a call to <code>eval()</code> on this evaluator.\n *\n * @param value the value to check\n * @return true if it is a possible result, false if not\n */\n public boolean isResult (Object value);\n\n /**\n * Evaluate the given value as an expression, yielding some result\n * value.\n *\n * @param expression the thing to evaluate\n * @return the result of evaluation\n */\n public Object eval (Object expression);\n}" ]
[ "0.7193907", "0.6758798", "0.66938066", "0.65390855", "0.65383583", "0.64877456", "0.648002", "0.6348839", "0.63110805", "0.61395675", "0.6087055", "0.59991205", "0.59832966", "0.59727997", "0.59207326", "0.5917849", "0.5892865", "0.5874133", "0.58453804", "0.5844041", "0.5815413", "0.58082044", "0.57724494", "0.5769844", "0.5769125", "0.5769125", "0.57662976", "0.5749674", "0.5747443", "0.57416195", "0.57093775", "0.5698391", "0.56968594", "0.5696611", "0.56734306", "0.564343", "0.56404585", "0.56367284", "0.56266725", "0.56237906", "0.5612271", "0.5611353", "0.56066537", "0.55903655", "0.55901474", "0.5582946", "0.5580324", "0.5577084", "0.55709976", "0.55598766", "0.5548532", "0.55247223", "0.55119604", "0.55090964", "0.5500675", "0.549129", "0.54657304", "0.5452902", "0.54510176", "0.5433378", "0.5408632", "0.5378416", "0.5377853", "0.536987", "0.5357741", "0.5345958", "0.5321549", "0.53201234", "0.5314066", "0.52975935", "0.5297009", "0.52951735", "0.52857435", "0.52842975", "0.52619565", "0.5252581", "0.52515835", "0.52486897", "0.52480453", "0.52446413", "0.52417374", "0.523848", "0.5235721", "0.52292156", "0.5225977", "0.52184665", "0.52172214", "0.52118933", "0.52058154", "0.5196593", "0.51916176", "0.51909024", "0.5186058", "0.51845604", "0.5178674", "0.5169764", "0.5167006", "0.51619536", "0.5153417", "0.5143794" ]
0.61426735
9
Turns the expression to a string.
@Override public String toString() { Helpers f = new Helpers(); Expression left = super.getLeft(); Expression right = super.getRight(); if (super.isBonus()) { // x * y -> xy if (left instanceof Var && right instanceof Var) { return "(" + left.toString() + "" + right.toString() + ")"; } // 4 * x -> 4x if (right instanceof Var) { return "(" + left.toString() + "" + right.toString() + ")"; } // x * 4 -> 4x if (left instanceof Var) { return "(" + right.toString() + "" + left.toString() + ")"; } // 4 * (x^2) -> 4(x^2) if (right instanceof Pow) { return "(" + left.toString() + "" + right.toString() + ")"; } // 4 * (xy) -> 4xy if (right instanceof Mult) { if (((Mult) right).getLeft() instanceof Var && ((Mult) right).getRight() instanceof Var) { return "(" + left.toString() + "" + f.removeOuterParentheses(right.toString()) + ")"; } } } return "(" + left.toString() + " * " + right.toString() + ")"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String toString() {\n return m_expression;\n }", "public String getExpressionString ()\n {\n return toStringToken ((String) getValue ());\n }", "public String toString() {\n return fullExpression;\n }", "private void jetExprStr(){\n\t\texprType = Z3MiscFunctions.v().getExprType(rExpr);\n\t\tswitch(exprType){\n\t\t\tcase BINOP:\n\t\t\t\tjetBinopExprStr();\n\t\t\t\tbreak;\n\t\t\tcase CAST:\n\t\t\t\tjetCastExprStr();\n\t\t\t\tbreak;\n\t\t\tcase INVOKE:\n\t\t\t\tjetInvokeExpr();\n\t\t\t\tbreak;\n\t\t\tcase NEWARRAY:\n\t\t\t\tjetNewArrayExpr();\n\t\t\t\tbreak;\n\t\t\tcase NEWEXPR:\n\t\t\t\tjetNewExpr();\n\t\t\t\tbreak;\n\t\t\tcase UNOP:\n\t\t\t\tjetUnopExpr();\n\t\t\t\tbreak;\n\t\t\tcase INSTANCEOF:\n\t\t\t\t//TODO\n\t\t\t\tassert(false);\n\t\t\t\tbreak;\n\t\t\tcase NEWMULIARRAY:\n\t\t\t\t//TODO\n\t\t\t\tassert(false);\n\t\t\t\tbreak;\n\t\t}\n\t}", "public String toString() {\n if (mExpression.size() == 1 && mExpression.get(0).startsWith(\"-\")) {\n return mExpression.get(0);\n }\n\n StringBuilder output = new StringBuilder();\n boolean first = true;\n int size = mExpression.size();\n\n for (int i = 0; i < size; i++) {\n String element = mExpression.get(i);\n\n if (first) {\n first = false;\n } else {\n output.append(\"\");\n }\n\n\n if (isOperand(element) && element.startsWith(\"-\")) {\n output.append(\"(\")\n .append(element)\n .append(\")\");\n } else {\n output.append(element);\n }\n }\n\n return output.toString();\n }", "String getExpression();", "String getExpression();", "@Override\r\n\tpublic String toString() {\r\n\t\tString string = \"\";\r\n\t\tif (expressionTree.getNumberOfChildren()==0)\r\n\t\t\treturn expressionTree.getValue();\r\n\t\telse{\r\n\t\t\tstring += \"(\";\r\n\t\t\tfor (int i = 0; i < expressionTree.getNumberOfChildren(); i++){\r\n\t\t\t\tTree<String> subtree = expressionTree.getChild(i);\r\n\t\t\t\tif (subtree.getNumberOfChildren()==0)\r\n\t\t\t\t\tstring += subtree.getValue();\r\n\t\t\t\telse\r\n\t\t\t\t\tstring += (new Expression(subtree.toString())).toString()+\" \";\r\n\t\t\t\tif (i < expressionTree.getNumberOfChildren()-1)\r\n\t\t\t\t\tstring += \" \" + expressionTree.getValue()+\" \";\r\n\t\t\t}\r\n\t\t\tstring += \")\";\r\n\t\t}\r\n\t\treturn string;\r\n\t}", "public String convert(ArithmeticExpression expression)\n {\n String expressionString = expression.getExpression();\n String convertedExpression = \"\";\n Stack<String> OpStack = new Stack<>();\n\n int startIndex = 0;\n while(startIndex < expressionString.length())\n {\n if(isOperand(nextToken(expressionString,startIndex)))\n {\n convertedExpression += nextToken(expressionString,startIndex);\n convertedExpression += \" \";\n\n }\n if(Brackets.isLeftBracket(nextToken(expressionString,startIndex)))\n {\n OpStack.push(nextToken(expressionString,startIndex));\n }\n if(Brackets.isRightBracket(nextToken(expressionString,startIndex)))\n {\n String topOp = OpStack.pop();\n while(!Brackets.isLeftBracket(topOp))\n {\n convertedExpression += topOp;\n convertedExpression += \" \";\n topOp = OpStack.pop();\n }\n }\n if(Operator.isOperator(nextToken(expressionString,startIndex)))\n {\n Operator temp = Operator.of(nextToken(expressionString,startIndex));\n if(OpStack.isEmpty())\n {\n OpStack.push(nextToken(expressionString, startIndex));\n }\n else\n {\n Operator topOp = Operator.of(OpStack.peek());\n while (topOp.getRank() <= temp.getRank())\n {\n convertedExpression += OpStack.pop();\n convertedExpression += \" \";\n topOp = Operator.of(OpStack.peek());\n }\n OpStack.push(nextToken(expressionString, startIndex));\n\n }\n }\n if(isOperand(nextToken(expressionString,startIndex)))\n startIndex += nextToken(expressionString,startIndex).length();\n else\n startIndex++;\n }\n while(!OpStack.isEmpty())\n {\n convertedExpression += OpStack.pop();\n convertedExpression += \" \";\n }\n return convertedExpression;\n }", "public String toString() {\r\n\t\tStringBuffer buf = new StringBuffer();\r\n\t\tbuf.append(\"[ Expression \");\r\n\t\tif (text() != null) {\r\n\t\t\tbuf.append(\"[\");\r\n\t\t\tbuf.append(text().toString());\r\n\t\t\tbuf.append(\"]\");\r\n\t\t}\r\n\t\tbuf.append(\": \");\r\n\t\tfor (int n = 0; n < elements.size(); ++n) {\r\n\t\t\tbuf.append(elements.get(n));\r\n\t\t\tif (n < elements.size() - 1) {\r\n\t\t\t\tbuf.append(\",\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tbuf.append(\" ]\");\r\n\t\treturn new String(buf);\r\n\t}", "@Override\n public String toString() {\n return \"Expression\";\n }", "private void jetCastExprStr(){\n\t\tCastExpr castExpr = (CastExpr) rExpr;\n\t\tValue immValue = castExpr.getOp();\n\t\tif(immValue instanceof Local){\n\t\t\tthis.exprStr = fileGenerator.getRenameOf(immValue, false, this.stmtIdx);\n\t\t}else{\n\t\t\tthis.exprStr = immValue.toString();\n\t\t}\n\t}", "public String toString()\r\n\t{\r\n\t\tcheckInitialization();\r\n\t\treturn equationString + \" = \" + getResult();\r\n\t}", "StringExpression createStringExpression();", "private static String dottedExpressionToString(Expression e) {\n if (e instanceof Identifier) {\n return ((Identifier) e).getName();\n }\n if (e instanceof DotExpression) {\n String result = dottedExpressionToString(((DotExpression) e).getObject());\n if (!result.isEmpty()) {\n return result + \".\" + ((DotExpression) e).getField().getName();\n }\n }\n\n return \"\";\n }", "public String getExpression() {\n return expression;\n }", "public String getExpression() {\n return expression;\n }", "public String getExpression() {\n return expression;\n }", "public String evaluate(String expression);", "public String innerString(Expr e)\n {\n if (e.getPrecedence() < this.getPrecedence())\n return StringUtil.embed(e.toString());\n else\n return e.toString();\n }", "private String toReversePolishNotation(String expr) {\n\t\tString output = \"\";\n\t\tStack<String> operatorStack = new Stack<String>();\n\n\t\tfor(String token : expr.split(\"\\\\s+\")) {\n\t\t\tif(isNumber(token)) {\n\t\t\t\toutput += token + \" \";\n\t\t\t}\n\t\t\telse if(isMatrix(token)) {\n\t\t\t\toutput += token + \" \";\n\t\t\t}\n\t\t\telse if(isOperator(token)) {\n\t\t\t\tint precidenceToken = getPrecidence(token);\n\t\t\t\tint precidenceNext;\n\t\t\t\twhile(!operatorStack.isEmpty()) {\n\t\t\t\t\tprecidenceNext = getPrecidence(operatorStack.peek());\n\t\t\t\t\tif(precidenceNext >= precidenceToken) output += operatorStack.pop() + \" \";\n\t\t\t\t\telse break;\n\t\t\t\t}\n\t\t\t\toperatorStack.push(token);\n\t\t\t}\n\t\t\telse if(token.equals(\"(\")) {\n\t\t\t\toperatorStack.push(token);\n\t\t\t}\n\t\t\telse if(token.equals(\")\")) {\n\t\t\t\twhile(!operatorStack.peek().equals(\"(\")) output += operatorStack.pop() + \" \";\n\t\t\t\toperatorStack.pop();\n\t\t\t}\n\t\t\telse throw new IllegalArgumentException(INVALID_CHARACTER_MESSAGE);\n\t\t}\n\t\twhile(!operatorStack.isEmpty()) output += operatorStack.pop() + \" \";\n\n\t\treturn output;\n\t}", "public String getExpression() {\n return _expression;\n }", "public String toString() {\r\n\treturn expressions.get(0).getCdata();\r\n }", "public String toString(){\n\t\tString out=\"\";\n\t\tif (type == \"op\"){\n\t\t\treturn out + operand;\n\t\t}\n\t\telse{\n\t\t\treturn out + value ;\n\t\t}\n\t}", "public String getBREExpressionAsString(Expressionobject expression) throws ApiException {\n Object localVarPostBody = expression;\n \n // create path and map variables\n String localVarPath = \"/bre/rules/expression-as-string\";\n\n // query params\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n\n \n \n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n\n final String[] localVarContentTypes = {\n \"application/json\"\n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n\n String[] localVarAuthNames = new String[] { \"oauth2_client_credentials_grant\", \"oauth2_password_grant\" };\n\n GenericType<String> localVarReturnType = new GenericType<String>() {};\n return apiClient.invokeAPI(localVarPath, \"POST\", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);\n }", "private String translateExpression(PropertyExpression e) {\n if (e.getObjectExpression() instanceof BinaryExpression) {\n BinaryExpression be = (BinaryExpression) e.getObjectExpression();\n if (be.getOperation().getText().equals(\"[\")) {\n String left = translateExpression(be.getLeftExpression());\n if (left.equals(inputName)) {\n return withInputSuffix(e.getPropertyAsString()) + \"[\" + translateExpression(be.getRightExpression()) + \"]\";\n }\n }\n }\n\n\n String obj = translateExpression(e.getObjectExpression());\n //TODO fix for \"not in main case\"\n //if (obj.equals(outputName) && shaderType.equals(\"vs\")) return withOutputSuffix(e.getPropertyAsString());\n if (obj.equals(outputName)) return withOutputSuffix(e.getPropertyAsString());\n //TODO fix for \"not in main case\"\n //if (obj.equals(inputName) && shaderType.equals(\"fs\")) return withOutputSuffix(e.getPropertyAsString());\n if (obj.equals(inputName)) return withInputSuffix(e.getPropertyAsString());\n //if (obj.equals(outputName)) return e.getPropertyAsString();\n //if (obj.equals(inputName)) return e.getPropertyAsString();\n if (obj.equals(\"\")) return e.getPropertyAsString();\n if ((e.getObjectExpression() instanceof BinaryExpression)) return \"(\" + obj + \").\" + e.getPropertyAsString();\n return obj + \".\" + e.getPropertyAsString();\n }", "public String toCodeString() {\n return String.format(\"%s = %s;\\n\", this.identifier.toString(), this.exp.toCodeString());\n }", "private void jetStringOperation(InvokeExpr invokeExpr){\n\t\tthis.exprStr = StringModeling.modelMethod(invokeExpr, fileGenerator, stmtIdx);\n\t}", "@Override\n public String visitLiteralExpr(Expr.Literal expr) {\n if(expr.getValue() == null) return \"null\";\n if(expr.getValue() instanceof String) return String.format(\"\\\"%s\\\"\", expr.getValue());\n return expr.getValue().toString();\n }", "public String toString() {\n return \"(\" + getExpLeft().toString() + \" * \" + getExpRight().toString() + \")\";\n }", "public static String evaluate( String expr )\n {\n\n\tString[] arr = expr.split(\"//s+\");\n\tString ret = \"\";\n\tALStack<String> stack = new ALStack<String>();\n\tfor( String s: arr)\n\t stack.push(s);\n\n\tif( stack.peek().equals(\"(\")){\n\t stack.pop();\n\t int operator = findOp(stack.pop());\n\t ret = unload(operator, stack);\n\t return ret;\n\t}\n\treturn \"\";\n }", "public Object getExpression();", "public String toString() {\n return operator + \"(\" + argument + \")\";\n }", "private String generateString() {\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\r\n\t\twhile (currentIndex < expression.length\r\n\t\t\t\t&& (Character.isLetterOrDigit(expression[currentIndex]) || expression[currentIndex] == '_')) {\r\n\t\t\tsb.append(expression[currentIndex]);\r\n\t\t\tcurrentIndex++;\r\n\t\t}\r\n\r\n\t\treturn sb.toString().toLowerCase();\r\n\t}", "private void jetBinopExprStr(){\n\t\tBinopExpr binopExpr = (BinopExpr) rExpr;\n\t\tValue op1 = binopExpr.getOp1();\n\t\tValue op2 = binopExpr.getOp2();\n\t\tZ3Type op1Z3Type = Z3MiscFunctions.v().z3Type(op1.getType());\n\t\tZ3Type op2Z3Type = Z3MiscFunctions.v().z3Type(op2.getType());\n\t\tStringBuilder sb = new StringBuilder();\n\t\t\n\t\tBinopExprType binopType = Z3MiscFunctions.v().getBinopExprType(binopExpr);\n\t\tswitch(binopType){\n\t\t//[start]ADD\n\t\tcase ADD:\n\t\t\t//add_expr = immediate \"+\" immediate;\n\t\t\t//immediate = constant | local;\n\t\t\t//only Int, Real, String can ADD\n\t\t\t//Exceptional Cases: \"084\" + 42; we exclude them\n\t\t\tassert((op1Z3Type == Z3Type.Z3String && op2Z3Type == Z3Type.Z3String) ||\n\t\t\t\t\t(op1Z3Type != Z3Type.Z3String && op2Z3Type != Z3Type.Z3String));\n\t\t\tif(op1Z3Type == Z3Type.Z3String ){\n\t\t\t\t//( Concat \"te\" y1 )\n\t\t\t\tsb.append(\"( Concat \");\n\t\t\t}else{\n\t\t\t\t//(+ 2 i2)\n\t\t\t\tsb.append(\"(+ \");\n\t\t\t}\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\" )\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end]ADD\n\t\tcase AND:\n\t\t\t//and_expr = immediate \"&\" immediate;\n\t\t\t//TODO\n\t\t\t//assert(false) : \"AND Expr\";\n\t\t\tbreak;\n\t\t//[start] DIV\n\t\tcase DIV:\n\t\t\t//div_expr = immediate \"/\" immediate;\n\t\t\t//(div a b) integer division\n\t\t\t//(/ a b) float division\n\t\t\tif(op1Z3Type == Z3Type.Z3Real || op2Z3Type == Z3Type.Z3Real){\n\t\t\t\tsb.append(\"(/ \");\n\t\t\t}else{\n\t\t\t\tsb.append(\"(div \");\n\t\t\t}\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] DIV\n\t\t//[start] EQ\n\t\tcase EQ:\n\t\t\t//eq_expr = immediate \"==\" immediate;\n\t\t\t//b = r1 == r2\n\t\t\t//(assert (= b (= r1 r2)))\n\t\t\tsb.append(\"(= \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] EQ\n\t\t//[start] GE\n\t\tcase GE:\n\t\t\t//ge_expr = immediate \">=\" immediate;\n\t\t\t//b = r1 >= r2\n\t\t\t//(assert (= b (>= r1 r2)))\n\t\t\tsb.append(\"(>= \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] GE\n\t\t//[start] GT\n\t\tcase GT:\n\t\t\t//gt_expr = immediate \">\" immediate;\n\t\t\t//b = r1 > r2\n\t\t\t//(assert (= b (> r1 r2)))\n\t\t\tsb.append(\"(> \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] GT\n\t\t//[start] LE\n\t\tcase LE:\n\t\t\t//le_expr = immediate \"<=\" immediate;\n\t\t\t//b = r1 <= r2\n\t\t\t//(assert (= b (<= r1 r2)))\n\t\t\tsb.append(\"(<= \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] LE\n\t\t//[start] LT\n\t\tcase LT:\n\t\t\t//lt_expr = immediate \"<\" immediate;\n\t\t\t//b = r1 < r2\n\t\t\t//(assert (= b (< r1 r2)))\n\t\t\tsb.append(\"(< \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] LT\n\t\t//[start] MUL\n\t\tcase MUL:\n\t\t\t//mul_expr = immediate \"*\" immediate;\n\t\t\t//(* op1 op2)\n\t\t\tsb.append(\"(* \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] MUL\n\t\t//[start] NE\n\t\tcase NE:\n\t\t\t//ne_expr = immediate \"!=\" immediate;\n\t\t\t//(not (= op1 op2))\n\t\t\tsb.append(\"(not (= \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\"))\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] NE\n\t\tcase OR:\n\t\t\t//or_expr = immediate \"|\" immediate;\n\t\t\t//TODO\n\t\t\tassert(false) : \"OR Expr\";\n\t\t\tbreak;\n\t\t//[start] REM\n\t\tcase REM:\n\t\t\t//rem_expr = immediate \"%\" immediate;\n\t\t\t//(rem op1 op2)\n\t\t\tsb.append(\"(rem \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] REM\n\t\t//[start] SUB\n\t\tcase SUB:\n\t\t\t//sub_expr = immediate \"-\" immediate;\n\t\t\t//(- op1 op2)\n\t\t\tsb.append(\"(- \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] SUB\n\t\t}\n\t}", "@Override\n public String toString() {\n return \"(\" + getExpression1() + \" - \" + getExpression2() + \")\";\n }", "@Override\n\tpublic String toString() {\n\t\treturn String.format(\"%s[%s]\", name.getValue().getSValue(), exprNode.toString());\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn String.format(\" %s %s\", operador, exp);\n\t}", "private String evaluateExpr(String expr){\n\t\t//bigdecimal used for long user inputs\n\t\tBigDecimal num1, num2, ans, temp = new BigDecimal(\"0\");\n\t\tint check = 1;\n\t\t//find the position of function\n\t\twhile(Character.isDigit(expr.charAt(check)) || expr.charAt(check) == '.')\n\t\t\tcheck++;\n\t\t//extract numbers from expression\n\t\tnum1 = new BigDecimal(expr.substring(0,check));\n\t\tnum2 = new BigDecimal(expr.substring(check + 1,expr.length()));\n\t\t//division by zero error\n\t\tif(num2.compareTo(temp) == 0 && expr.charAt(check) == '/')\n\t\t\treturn \"Invalid\";\n\t\t//evaluate functions\n\t\tif(expr.charAt(check) == '*')\n\t\t\tans = num1.multiply(num2);\n\t\telse if(expr.charAt(check) == '+')\n\t\t\tans = num1.add(num2);\n\t\telse if(expr.charAt(check) == '/')\n\t\t\tans = num1.divide(num2, MathContext.DECIMAL32);\n\t\telse\n\t\t\tans = num1.subtract(num2);\n\t\treturn ans.toString();\n\t}", "String getExpressionDescription(String expression, ParseType parseType);", "String getSourceExpression();", "public String getEquationString()\r\n\t{\r\n\t\tcheckInitialization();\r\n\t\treturn equationString;\r\n\t}", "@Override\n\t\tpublic String toString() {\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tpreOrderTraverse(expression.root, 1, sb);\n\t\t\treturn sb.toString();\n\t\t}", "public final String toStringX() {\n return this.decompile(Descriptor.P_STMT, new StringBuilder(1024), Descriptor.DECO_STRX).toString();\n }", "Expression getExpression();", "Expression getExpression();", "Expression getExpression();", "Expression getExpression();", "public String toString2() {\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tpostOrderTraverse(expression.root,sb);\n\t\t\treturn sb.toString();\n\t\t}", "XExpression getExpression();", "public String format()\n {\n StringBuilder sb = new StringBuilder(64);\n sb.append(expression).append(\" = \");\n\n if (detailExpression != null && !detailExpression.equals(value.toString()))\n {\n sb.append(\"(\").append(detailExpression).append(\") = \");\n }\n\n sb.append(value);\n if (description != null)\n {\n sb.append(\" // \").append(description);\n }\n\n return sb.toString();\n }", "public interface Expression {\n\t\n\t/**\n\t * Evaluates an arithmetic expression.\n\t * \n\t * @return the value to which this expression evaluates\n\t */\n\tdouble eval();\n\t\n\t/**\n\t * Creates a String representation of an arithmetic expression.\n\t * \n\t * @return this expression in standard form, suitable for inclusion\n\t * in a program or text document (e.g., \"(2 - 4 * (7 + 2))\"). Note\n\t * that the string can have \"unnecessary\" parentheses as this (toy)\n\t * system does not know about operator precedence. \n\t */\n\tString toString();\n\n}", "String getExpressionDescription(String expression, ParseType parseType, DataType dataType);", "public String toFormulaString(String[] operands)\n {\n StringBuffer buffer = new StringBuffer();\n\n buffer.append(operands[ 0 ]);\n buffer.append(\",\");\n buffer.append(operands[ 1 ]);\n return buffer.toString();\n }", "private Object eval(SimpleExpr expr) {\n Object res = eval(expr.getExpr().get(0));\n\n for (int i = 1; i < expr.getExpr().size(); i++) {\n Object res2 = eval(expr.getExpr().get(i));\n String opt = expr.getOpt().get(i - 1);\n\n if (\"+\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res + (Double) res2;\n } else if (res instanceof Double && res2 instanceof String) {\n res = \"\" + res + res2;\n } else if (res instanceof Boolean && res2 instanceof String) {\n res = \"\" + res + res2;\n } else if (res instanceof String && res2 instanceof String) {\n res = \"\" + res + res2;\n } else if (res instanceof String && res2 instanceof Double) {\n res = \"\" + res + res2;\n } else if (res instanceof String && res2 instanceof Boolean) {\n res = \"\" + res + res2;\n } else {\n throw new RaydenScriptException(\"Expression error: SimpleExpr error\");\n }\n } else if (\"-\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res - (Double) res2;\n } else {\n throw new RaydenScriptException(\"Expression error: SimpleExpr error\");\n }\n } else {\n throw new RaydenScriptException(\"Expression error: Invalid operator '\" + opt + \"'.\");\n }\n }\n\n return res;\n }", "public String toString() {\r\n\t\tString result = null;\r\n\t\tif (varname != null){\r\n\t\t\tif (isFormal())\r\n\t\t\t\tresult = \"(?)\" + varname;\r\n\t\t\telse\r\n\t\t\t\tresult = \"($)\"+ varname;\t\r\n\t\t} \r\n\t\telse\r\n\t\t\tresult = super.toString();\r\n\t\t\t\r\n\t\treturn result;\r\n\t}", "private char getStringConcatenationTypeCharacter(Expression operand) {\n TypeMirror operandType = operand.getTypeMirror();\n if (operandType.getKind().isPrimitive()) {\n return TypeUtil.getBinaryName(operandType).charAt(0);\n } else if (typeUtil.isString(operandType)) {\n return '$';\n } else {\n return '@';\n }\n }", "@Override\n public String toString(int depth) {\n if (depth <= 0) return \"\";\n String sEO = \"\" ;\n if (this.subExpressionOf != null) {\n sEO = Strings.indent(2,\n \"\\nsubExpressionOf: \" +\n Strings.indent(2, this.subExpressionOf.toString(1))) ;} ;\n return \"\\n*OpApplNode: \" + operator.getName() + \" \" + super.toString(depth+1)\n + \" errors: \" + (errors != null ? \"non-null\" : \"null\")\n + toStringBody(depth) + sEO ;\n }", "public String toString () {\n return \"(set \" + varName + \" \" + expr + \")\";\n }", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "public static void main(String[] args) {\n\n System.out.println(\"119.1+(28.2+37.3*(46.4-55.5)-4.6+(3/2)+1) = \" + evaluateExpression(\"119.1 + ( 28.2 + 37.3 * ( 46.4 - 55.5 ) - 4.6 + ( 3 / 2 ) + 1 )\"));\n\n}", "String evaluate();", "public String eval()\r\n\t{\r\n\t\treturn eval(null, null);\r\n\t}", "private static void testToString() {\r\n\t\tSystem.out.println(\"\\n----------\\nTesting toString();\");\r\n\t\tString equation = \"(5*5*2*2)-(2*5)-(5*2*(2+3+4))\";\r\n\t\tCalculator calc = new Calculator(equation);\r\n\t\tString result = calc.toString();\r\n\t\tString expected = \"(5*5*2*2)-(2*5)-(5*2*(2+3+4)) = 0\";\r\n\t\tprintTest(true, \"testing toString() with valid equation \" + equation, result, expected);\r\n\t\t\r\n\t\tequation = \"0 + 12345\";\r\n\t\tcalc.setEquationString(equation);\r\n\t\texpected = \"0 + 12345 = 12345\";\r\n\t\tresult= calc.toString();\r\n\t\tprintTest(true, \"Testing getResult() with equation \" + equation, result, expected);\r\n\t\t\r\n\t\tequation = \"1/0\";\r\n\t\tcalc.setEquationString(equation);\r\n\t\texpected = \"1/0 = Java.lang.ArithmeticException: / by zero\";\r\n\t\tresult= calc.toString();\r\n\t\tprintTest(true, \"Testing getResult() with equation \" + equation, result, expected);\r\n\t\t\r\n\t\tequation = \"5++5\";\r\n\t\tcalc.setEquationString(equation);\r\n\t\texpected = \"5++5 = Error: cannot have two adjacent signs\";\r\n\t\tresult= calc.toString();\r\n\t\tprintTest(true, \"Testing getResult() with equation \" + equation, result, expected);\r\n\t\t\r\n\t\tequation = \"5+7)\";\r\n\t\tcalc.setEquationString(equation);\r\n\t\texpected = \"5+7) = java.util.EmptyStackException Make sure all parenthesis have a matching pair\";\r\n\t\tresult= calc.toString();\r\n\t\tprintTest(true, \"Testing getResult() with equation \" + equation, result, expected);\r\n\t\t\r\n\t\tequation = \"(5+7\";\r\n\t\tcalc.setEquationString(equation);\r\n\t\texpected = \"(5+7 = java.util.EmptyStackException Make sure all parenthesis have a matching pair\";\r\n\t\tresult= calc.toString();\r\n\t\tprintTest(true, \"Testing getResult() with equation \" + equation, result, expected);\r\n\t\t\r\n\t\tequation = \"x\";\r\n\t\tcalc.setEquationString(equation);\r\n\t\texpected = \"x = Error: Invalid character entered\";\r\n\t\tresult= calc.toString();\r\n\t\tprintTest(true, \"Testing getResult() with equation \" + equation, result, expected);\r\n\t}", "public String toString(){\n\t\tStringBuffer buffer = new StringBuffer();\n\t\t\n\t\tbuffer.append(lhs);\n\t\tbuffer.append(\" -> \");\n\t\t\n\t\t// if this is a lexical rule, prefix it with the lexical symbol\n\t\tif( lexical ){\n\t\t\tbuffer.append(LEXICAL_PREFIX);\n\t\t}\n\t\t\n\t\tfor( String s: rhs ){\n\t\t\tbuffer.append(s + \" \");\n\t\t}\n\t\t\n\t\t// delete the trailing whitespace\n\t\tbuffer.deleteCharAt(buffer.length()-1);\n\t\t\n\t\tbuffer.append(\"\\t\\t\" + weight);\n\t\t\n\t\treturn buffer.toString();\n\t}", "Expr expr();", "public String toString () {\n return \"(+ \" + leftOperand + \" \" + rightOperand + \")\";\n }", "private static final String toExpr(String s) {\n\t\tchar[] b = s.toCharArray();\n\t\tint i;\n\t\tfor (i=0; (i<b.length) && Character.isLetter(b[i]); i++) ;\n\t\tif (i<b.length) return(\"(\" + s + \")\");\n\t\treturn(s) ;\t\t// Just letters\n\t}", "public String evaluateExpression(ValueExpression expr,CodeExecutionContext execCtx) throws JavascribeException;", "public String toString() {\n switch (opType) {\n case Plus:\n return \"+\";\n case Minus:\n return \"-\";\n case Multiply:\n return \"*\";\n case Divide:\n return \"/\";\n case Square:\n return \"^\";\n default:\n return null;\n }\n }", "private String evaluate(String expression) {\n String separators = \"()*+/-\";\n String result;\n // Stack for using in algorithm\n Stack<String> stackOperations = new Stack<String>();\n // Stack for RPN - reverse polish notation\n Stack<String> stackRPN = new Stack<String>();\n // Stack for evaluating answer\n Stack<String> stackTemp = new Stack<String>();\n //splitting expression into tokens\n StringTokenizer stringTokenizer = new StringTokenizer(updateUnaryMinus(expression), separators, true);\n\n while (stringTokenizer.hasMoreTokens()) {\n String token = stringTokenizer.nextToken();\n if (isNumber(token)) {\n stackRPN.push(token);\n } else if (isOpenBracket(token)) {\n stackOperations.push(token);\n } else if (isCloseBracket(token)) {\n while (!isOpenBracket(stackOperations.lastElement())) {\n stackRPN.push(stackOperations.pop());\n }\n stackOperations.pop();\n } else if (isOperator(token)) {\n while (!stackOperations.empty() && isOperator(stackOperations.lastElement())\n && getPrecedence(stackOperations.lastElement()) > getPrecedence(token)) {\n stackRPN.push(stackOperations.pop());\n }\n stackOperations.push(token);\n }\n }\n while (!stackOperations.empty()) {\n stackRPN.push(stackOperations.pop());\n }\n Collections.reverse(stackRPN);\n\n // Evaluation if RPN expression\n while (!stackRPN.empty()) {\n if (isNumber(stackRPN.lastElement())) stackTemp.push(stackRPN.pop());\n else stackTemp.push(makeOperation(stackRPN.pop(), stackTemp.pop(), stackTemp.pop()));\n }\n result = stackTemp.pop();\n return result;\n }", "public String getExpression() {\r\n return tree.infixExpression();\r\n }", "public String toString()\r\n\t{\r\n\t\tif(exponent == 0)\r\n\t\t{\r\n\t\t\treturn String.valueOf(coefficient);\r\n\t\t}\r\n\t\tif(exponent == 1)\r\n\t\t{\r\n\t\t\treturn String.valueOf(coefficient) + \"x\";\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn String.valueOf(coefficient) + \"x^\" + String.valueOf(exponent);\r\n\t\t}\r\n\t}" ]
[ "0.77883047", "0.7672867", "0.74462587", "0.73442346", "0.718668", "0.7077517", "0.7077517", "0.70635855", "0.70338535", "0.6905079", "0.6764834", "0.669223", "0.6678287", "0.661005", "0.6460857", "0.6426451", "0.6426451", "0.6426451", "0.63448834", "0.63257015", "0.63166", "0.6307253", "0.62734115", "0.62733835", "0.6236028", "0.61995804", "0.6190653", "0.6174247", "0.6172437", "0.6165112", "0.6163648", "0.6130164", "0.61071384", "0.6085039", "0.6076191", "0.60479736", "0.60062104", "0.59963167", "0.5992217", "0.59858066", "0.59770834", "0.59509706", "0.59507746", "0.5917875", "0.5905212", "0.5905212", "0.5905212", "0.5905212", "0.58853686", "0.5861087", "0.58559287", "0.5840288", "0.5813742", "0.5808758", "0.58059895", "0.58004665", "0.57966715", "0.57963", "0.5779768", "0.5778009", "0.5778009", "0.5778009", "0.5778009", "0.5778009", "0.5778009", "0.5778009", "0.5778009", "0.5778009", "0.5778009", "0.5778009", "0.5778009", "0.5778009", "0.5778009", "0.5778009", "0.5778009", "0.5778009", "0.5778009", "0.5778009", "0.5778009", "0.5778009", "0.5778009", "0.5778009", "0.5778009", "0.5778009", "0.5778009", "0.5778009", "0.5778009", "0.57727224", "0.5767858", "0.5763806", "0.5758042", "0.5757978", "0.57484406", "0.5747005", "0.5736971", "0.57221687", "0.57162297", "0.5700383", "0.5679189", "0.56646043" ]
0.5963706
41
Calculates the differentiate of the expression. (f g)' = f' g + g' f.
@Override public Expression differentiate(String var) { Expression left = super.getLeft(); Expression right = super.getRight(); return new Plus(new Mult(left.differentiate(var), right), new Mult(left, right.differentiate(var))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Function differentiate() {\n return new Product(this,\n new Sum(new Quotient(new Product(f2,\n f1.differentiate()),\n f1),\n new Product(new Log(new Complex(Math.E, 0.0), f1),\n f2.differentiate())));\n }", "@Override\n public Expression differentiate(String var) {\n Expression firstLn = new Log(new Var(\"e\"), this.getEx2());\n Expression secondLn = new Log(new Var(\"e\"), this.getEx2());\n Expression denom = new Pow(secondLn, new Num(2));\n Expression div1 = new Div(this.getEx2().differentiate(var), this.getEx2());\n Expression div2 = new Div(this.getEx2().differentiate(var), this.getEx2());\n Expression mult1 = new Mult(div1, secondLn);\n Expression mult2 = new Mult(div2, firstLn);\n Expression numer = new Minus(mult1, mult2);\n Expression difEx = new Div(numer, denom);\n return difEx;\n \n \n \n /*Expression newExp1 = new Div(ex2.differentiate(var), ex2);\n Expression newExp2 = new Div(ex1.differentiate(var), ex1);\n return new Div(newExp1, newExp2).differentiate(var).differentiate(var);\n //return new Div(new Div(ex2.differentiate(var), ex2), new Div(ex1.differentiate(var), ex1));\n ///NEED TO TEST BETTER */\n\n }", "public static String differentiate(Parser.Expression exp, final String variable){\n return exp.accept(new Parser.Expression.Visitor<String>() {\n // This is the d(var)/dx case\n public String differentiate(Parser.Variable var){\n String expVar = var.toString();\n String output;\n if (expVar.equals(variable)){\n output = \"1\";\n return output;\n }\n else{\n output = \"0\";\n return output;\n }\n }\n // dc/dx case\n public String differentiate(Parser.Number num){\n String output = \"0\";\n return output;\n }\n // d(u+v)/dx case\n public String differentiate(Parser.Addition add){\n Expression leftExpr;\n Expression rightExpr;\n String outLeft;\n String outRight;\n leftExpr = add.left;\n rightExpr = add.right;\n outLeft = Differentiator.differentiate(leftExpr, variable);\n outRight = Differentiator.differentiate(rightExpr, variable);\n return \"(\" + outLeft + \" \" + \"+\" + \" \" + outRight+ \")\";\n }\n // d(u*v)/dx case\n public String differentiate(Parser.Multiplication mul){\n Expression leftExpr;\n Expression rightExpr;\n String outLeft;\n String outRight;\n leftExpr = mul.left;\n rightExpr = mul.right;\n String rightDiff = Differentiator.differentiate(rightExpr, variable);\n String leftDiff = Differentiator.differentiate(leftExpr, variable);\n outLeft = \"(\" + leftExpr.toString() + \" \" + \"*\" + \" \" + rightDiff + \")\";\n outRight = \"(\" + rightExpr.toString() + \" \" + \"*\" + \" \" + leftDiff + \")\";\n return \"(\" + outLeft + \" \" + \"+\" + \" \" + outRight + \")\";\n }\n \n });\n }", "public String calculate() {\r\n\t\t\r\n\t\tif(\"\".equals(firstNumber.toString()) || \"\".equals(secondNumber.toString())) {\r\n\t\t\tclear();\r\n\t\t\treturn \"0\";\r\n\t\t}\r\n\t\t\r\n\t\tif (\"\".equals(operator)) {\r\n\t\t\tif (getOperand().length() == 0) {\r\n\t\t\t\tclear();\r\n\t\t\t\treturn \"0\";\r\n\t\t\t}\r\n\t\t\tresult = getOperand().toString();\r\n\t\t}\r\n\r\n\t\tif (\"+\".equals(operator)) {\r\n\t\t\tresult = Double.toString(Double.parseDouble(firstNumber.toString())\r\n\t\t\t\t\t+ Double.parseDouble(secondNumber.toString()));\r\n\t\t}\r\n\r\n\t\tif (\"-\".equals(operator)) {\r\n\t\t\tresult = Double.toString(Double.parseDouble(firstNumber.toString())\r\n\t\t\t\t\t- Double.parseDouble(secondNumber.toString()));\r\n\t\t}\r\n\r\n\t\tif (\"*\".equals(operator)) {\r\n\t\t\tresult = Double.toString(Double.parseDouble(firstNumber.toString())\r\n\t\t\t\t\t* Double.parseDouble(secondNumber.toString()));\r\n\t\t}\r\n\r\n\t\tif (\"/\".equals(operator)) {\r\n\t\t\tif (\"0\".equals(secondNumber.toString())) {\r\n\t\t\t\tclear();\r\n\t\t\t\treturn \"Division by zero\";\r\n\t\t\t}\r\n\t\t\tresult = Double.toString(Double.parseDouble(firstNumber.toString())\r\n\t\t\t\t\t/ Double.parseDouble(secondNumber.toString()));\r\n\t\t}\r\n\r\n\t\tclear();\r\n\t\treturn filter(result);\r\n\t}", "public int calculateF(){\n\t\tf=getH()+getG();\n\t\treturn f;\n\t}", "double parseExpression() {\n double x = parseTerm();\n for (;;) {\n if (eat('+')) x += parseTerm(); // addition\n else if (eat('-')) x -= parseTerm(); // subtraction\n else return x;\n }\n }", "double parseExpression() {\n double x = parseTerm();\n for (;;) {\n if (eat('+')) x += parseTerm(); // addition\n else if (eat('-')) x -= parseTerm(); // subtraction\n else return x;\n }\n }", "@Override\r\n\tpublic Expression differentiate(String var) {\n\t\tSystem.out.println(\"计算减法微分\");\r\n\t\t//f(x)=g(x)-h(x)的导数为:g'(x)-h'(x)\r\n\t\treturn new SubExpression(left.differentiate(var), right.differentiate(var));\r\n\t}", "public String fractionAddition1(String expression) {\n Scanner s = new Scanner(expression).useDelimiter(\"/|(?=[-+])\");\n long num = 0, den = 1;\n while (s.hasNext()) {\n long a = s.nextLong(), b = s.nextLong();\n num = num * b + a * den;\n den *= b;\n }\n long gcd = gcd(num, den);\n return (num / gcd) + \"/\" + (den / gcd);\n }", "private String compute(String equ,String op)\n {\n String equation = equ;\n Pattern mdPattern = Pattern.compile(\"(\\\\d+([.]\\\\d+)*)(([\"+op+\"]))(\\\\d+([.]\\\\d+)*)\");\n Matcher matcher\t\t= mdPattern.matcher(equation);\n while(matcher.find())\n {\n String[] arr = null;\n double ans = 0;\n String eq = matcher.group(0);//get form x*y\n if(eq.contains(op))\n {\n arr = eq.split(\"\\\\\"+op);//make arr\n if(op.equals(\"*\"))\n ans = Double.valueOf(arr[0])*Double.valueOf(arr[1]);//compute\n if(op.equals(\"/\"))\n ans = Double.valueOf(arr[0])/Double.valueOf(arr[1]);//compute\n if(op.equals(\"+\"))\n ans = Double.valueOf(arr[0])+Double.valueOf(arr[1]);//compute\n if(op.equals(\"-\"))\n ans = Double.valueOf(arr[0])-Double.valueOf(arr[1]);//compute\n }\n\n equation = matcher.replaceFirst(String.valueOf(ans));//replace in equation\n matcher = mdPattern.matcher(equation);//look for more matches\n }\n return equation;\n }", "private void equate()\n\t{\n\t\t\tif(Fun == Function.ADD)\n\t\t\t{\t\t\t\n\t\t\t\tresult = calc.sum ( );\n\t\t\t\tupdateText();\n\t\t\t\tsetLeftValue();\n\t\t\t\tFun = null;\n\t\t\t}//end ADD condition\n\t\t\t\n\t\t\telse if(Fun == Function.SUBTRACT)\n\t\t\t{\n\t\t\t\tresult = calc.subtract ();\n\t\t\t\tupdateText();\n\t\t\t\tsetLeftValue();\n\t\t\t\tFun = null;\n\t\t\t}//end SUBTRACT condition\n\t\t\t\n\t\t\telse if (Fun == Function.MULTIPLY)\n\t\t\t{\n\t\t\t\tresult = calc.multiply ();\n\t\t\t\tupdateText();\n\t\t\t\tsetLeftValue();\n\t\t\t\tFun = null;\n\t\t\t}//end MULTIPLY condition\n\t\t\t\n\t\t\telse if (Fun == Function.DIVIDE)\n\t\t\t{\n\t\t\t\tresult = calc.divide ();\n\t\t\t\tupdateText();\n\t\t\t\tsetLeftValue();\n\t\t\t\tFun = null;\n\t\t\t}\n\t\t\t\t\n\t}", "double getActiveOperand();", "public double calculate(String expression) {\n\t\tString[] inputs = expression.split(\" \");\n\t if(debug) {\n\t\tSystem.out.print(\"Input array: \");\n\t\tfor(String value : inputs) {\n\t\t\tSystem.out.print(value + \" \");\n\t\t}\n\t\tSystem.out.println();\n\t }\t\n\t\t\n\t\t// Go through the string array and pop operators onto the\n\t\t// operators stack and operands onto the the operands stack\n\t\tfor(String value : inputs) {\n\t\t if(debug) System.out.println(\"Evaluating: \" + value);\n\t\t\tif(value.equals(\"*\") || value.equals(\"/\") || value.equals(\"+\") || value.equals(\"-\")) {\n\t\t\t\t// If stack is empty push onto stack\n\t\t\t\tif(operand.empty()) {\n\t\t\t\t\toperand.push(value);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// If new operator is higher than old push onto\n\t\t\t\t// stack\n\t\t\t\telse if(value.equals(\"*\") || value.equals(\"/\")) {\n\t\t\t\t\tString old = (String)operand.peek();\n\t\t\t\t\tif(old.equals(\"*\")) {\n\t\t\t\t\t\tdouble a = (Double)operators.pop();\n\t\t\t\t\t\tdouble b = (Double)operators.pop();\n\t\t\t\t\t if(debug) {\n\t\t\t\t\t\tSystem.out.println(a + old + b);\n\t\t\t\t\t }\n\t\t\t\t\t \ta = a*b;\n\t\t\t\t\t\toperators.push(a);\n\t\t\t\t\t\told = (String)operand.pop();\n\t\t\t\t\t\toperand.push(value);\n\t\t\t\t\t}\n\t\t\t\t\telse if(old.equals(\"/\")) {\n\t\t\t\t\t\tdouble a = (Double)operators.pop();\n\t\t\t\t\t\tdouble b = (Double)operators.pop();\n\t\t\t\t\t if(debug) {\n\t\t\t\t\t\tSystem.out.println(a + old + b);\n\t\t\t\t\t }\n\t\t\t\t\t \ta = b/a;\n\t\t\t\t\t\toperators.push(a);\n\t\t\t\t\t\told = (String)operand.pop();\n\t\t\t\t\t\toperand.push(value);\n\t\t\t\t\t}\n\t\t\t\t\telse operand.push(value);\n\t\t\t\t}\n\n\t\t\t\t// Else pop old operator and evaluate top two\n\t\t\t\t// elements on operand stack then push new\n\t\t\t\t// operator onto stack\n\t\t\t\telse {\n\t\t\t\t\tdouble a = (Double)operators.pop();\n\t\t\t\t\tdouble b = (Double)operators.pop();\n\t\t\t\t\tString old = (String)operand.pop();\n\t\t\t\t if(debug) {\n\t\t\t\t\tSystem.out.println(a + old + b);\n\t\t\t\t }\n\t\t\t\t\tif(old.equals(\"*\")) a = a*b;\n\t\t\t\t\telse if(old.equals(\"/\")) a = b/a;\n\t\t\t\t\telse if(old.equals(\"+\")) a = a+b;\n\t\t\t\t\telse a = b-a;\n\t\t\t\t\toperators.push(a);\n\t\t\t\t\toperand.push(value);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Put operators into operators stack\n\t\t\telse {\n\t\t\t try {\n\t\t\t\tDouble num = Double.parseDouble(value);\n\t\t\t\toperators.push(num);\n\t\t\t }\n\t\t\t catch(NumberFormatException e) {\n\t\t\t\t System.out.println(\"NumberFormatException: Something besides a number or operator entered\");\n\t\t\t }\n\t\t\t}\n\t\t}\n\t\t// Finish up everything left over in stack\n\t\tString old;\n\t\tdouble a;\n\t\tdouble b;\n\t\twhile(!operand.empty()) {\n\t\t\told = (String)operand.pop();\n\t\t\ta = (Double)operators.pop();\n\t\t\tb = (Double)operators.pop();\n\t\t\tif(old.equals(\"*\")) a = a*b;\n\t\t\telse if(old.equals(\"/\")) a = b/a;\n\t\t\telse if(old.equals(\"+\")) a = a+b;\n\t\t\telse a = b-a;\n\t\t\toperators.push(a);\n\t\t}\n\t\treturn (Double)operators.peek();\n\t}", "public static void main(String[] args) {\n System.out.println(\"Need to count following expression\\n4.0 * (1 - (1.0/3) + (1.0/5) - (1.0/7) + (1.0/9) - (1.0/11))\\n\");\n System.out.println(\"First way - just make math in System.out.println\");\n System.out.println(\"4.0 * (1 - (1.0/3) + (1.0/5) - (1.0/7) + (1.0/9) - (1.0/11))=\" + (4.0 * (1 - (1.0/3) + (1.0/5) - (1.0/7) + (1.0/9) - (1.0/11))));\n System.out.println();\n System.out.println(\"Second way - create variables and put the expressions in () variables\\nThen make math in System.out.println using that variables\");\n double a = 4.0;\n double b = 1;\n double c = 1.0/3;\n double d = 1.0/5;\n double e = 1.0/7;\n double f = 1.0/9;\n double g = 1.0/11;\n System.out.print(\"4.0 * (1 - (1.0/3) + (1.0/5) - (1.0/7) + (1.0/9) - (1.0/11))=\");\n System.out.println(a * (b - c + d - e + f - g));\n System.out.println();\n System.out.println(\"One more way - add one more variable, count the result in that variable and print it\");\n double i = a * (b - c + d - e + f - g);\n String j = \"4.0 * (1 - (1.0/3) + (1.0/5) - (1.0/7) + (1.0/9) - (1.0/11))=\";\n System.out.println((j) + (i));\n\n\n\n }", "Expression getExp();", "@Override\r\n\tpublic double calculate() {\n\r\n\t\treturn n1 + n2;\r\n\t}", "public static void main(String[] args) throws Exception {\r\n Expression e = new Plus(new Mult(2, \"x\"), new Plus(new Sin(new Mult(4, \"y\")), new Pow(\"e\", \"x\")));\r\n System.out.println(e);\r\n Map<String, Double> assignment = new TreeMap<String, Double>();\r\n assignment.put(\"x\", 2.0);\r\n assignment.put(\"y\", 0.25);\r\n assignment.put(\"e\", 2.71);\r\n System.out.println(e.evaluate(assignment));\r\n e = e.differentiate(\"x\");\r\n System.out.println(e);\r\n System.out.println(e.evaluate(assignment));\r\n System.out.println(e.simplify());\r\n System.out.println(e);\r\n }", "public final float determinant() {\n\t// less *,+,- calculation than expanded expression.\n\treturn m00*(m11*m22 - m21*m12)\n\t - m01*(m10*m22 - m20*m12)\n\t + m02*(m10*m21 - m20*m11);\n }", "private String calculate (double num1, double num2, String operator){\r\n \r\n double value;\r\n switch(operator){\r\n case \"+\":\r\n value = num1 + num2;\r\n break;\r\n case \"-\":\r\n value = num1 - num2;\r\n break;\r\n case \"*\":\r\n value = num1 * num2;\r\n break;\r\n case \"/\":\r\n value = num1/num2;\r\n break;\r\n default:\r\n throw new IllegalArgumentException();\r\n \r\n }\r\n String result = value + \"\";\r\n return result;\r\n }", "private double parseExpression() {\n\t\tdouble value = parseTerm();\n\t\twhile (true) {\n\t\t\tif (token.getType().equals(Token.Type.PLUS)) { // addition\n\t\t\t\ttoken=lexer.getNextToken();\n\t\t\t\tvalue += parseTerm();\n\t\t\t} else if (token.getType().equals(Token.Type.MINUS)) { // subtraction\n\t\t\t\ttoken = lexer.getNextToken();\n\t\t\t\tvalue -= parseTerm();\n\t\t\t} else {\n\t\t\t\treturn value;\n\t\t\t}\n\t\t}\n\t}", "public Object visitAdditiveExpression(GNode n) {\n Object a, b, result;\n String op;\n \n nonboolean = true;\n \n dostring = true;\n \n a = dispatch(n.getGeneric(0));\n b = dispatch(n.getGeneric(2));\n op = n.getString(1);\n \n dostring = false;\n \n if (a instanceof Long && b instanceof Long) {\n if (op.equals(\"+\")) {\n result = (Long) a + (Long) b;\n }\n else if (op.equals(\"-\")) {\n result = (Long) a - (Long) b;\n }\n else {\n result = \"\";\n }\n }\n else {\n result = parens(a) + \" \" + op + \" \" + parens(b);\n }\n \n return result;\n }", "private float diffusitivity(float d) {\r\n return (1.0f / (1.0f + (d * d) / (lambda * lambda)));\r\n }", "public static int expression()\r\n {\r\n //get the start state of this term\r\n int r,t1,f1;\r\n t1=r=term();\r\n\r\n //if there is no more input, we are done\r\n if(index>expression.length()-1)\r\n {\r\n return r;\r\n }\r\n\r\n //if this is concatenation\r\n if(expression.charAt(index)=='.'||isVocab(expression.charAt(index))||expression.charAt(index)=='\\\\'\r\n ||expression.charAt(index)=='['||expression.charAt(index)=='(')\r\n {\r\n //get the start state of this expression and\r\n //update next1 and next2\r\n int t2,cur;\r\n cur=state-1;\r\n t2=expression();\r\n if(stateList.get(cur).getNext1()==stateList.get(cur).getNext2())\r\n {\r\n stateList.get(cur).setNext1(t2);\r\n }\r\n stateList.get(cur).setNext2(t2);\r\n\r\n }\r\n\r\n //if there is no more input, we are done\r\n if(index>=expression.length())\r\n {\r\n return r;\r\n }\r\n\r\n //if this is alternation\r\n if(expression.charAt(index)=='|')\r\n {\r\n //if there is nothing after '|', it is a invalid expression\r\n index++;\r\n if(index>expression.length()-1)\r\n {\r\n error();\r\n }\r\n else\r\n {\r\n //create a branch state,set the nex1 of the branch state to the term\r\n //so a|b and a|b|c both work\r\n int t2;\r\n f1=state-1;\r\n\r\n state st=new state(state,\"BR\",t1,-1);\r\n stateList.add(st);\r\n r=state;\r\n state++;\r\n\r\n //get the start state of this expression\r\n t2=expression();\r\n\r\n //update the branch state's next2 to the start state of the expression\r\n stateList.get(f1+1).setNext2(t2);\r\n\r\n //update term's next1 and next2\r\n if(stateList.get(f1).getNext1()==stateList.get(f1).getNext2())\r\n {\r\n stateList.get(f1).setNext1(state);\r\n }\r\n stateList.get(f1).setNext2(state);\r\n\r\n }\r\n\r\n }\r\n\r\n\r\n return r;\r\n }", "@Override\r\n\tpublic double calculate() {\n\t\treturn n1 - n2;\r\n\t}", "private void calculate () {\n try {\n char[] expression = expressionView.getText().toString().trim().toCharArray();\n String temp = expressionView.getText().toString().trim();\n for (int i = 0; i < expression.length; i++) {\n if (expression[i] == '\\u00D7')\n expression[i] = '*';\n if (expression[i] == '\\u00f7')\n expression[i] = '/';\n if (expression[i] == '√')\n expression[i] = '²';\n }\n if (expression.length > 0) {\n Balan balan = new Balan();\n double realResult = balan.valueMath(String.copyValueOf(expression));\n int naturalResult;\n String finalResult;\n if (realResult % 1 == 0) {\n naturalResult = (int) Math.round(realResult);\n finalResult = String.valueOf(naturalResult);\n } else\n finalResult = String.valueOf(realResult);\n String error = balan.getError();\n // check error\n if (error != null) {\n mIsError = true;\n resultView.setText(error);\n if (error == \"Error div 0\")\n resultView.setText(\"Math Error\");\n } else { // show result\n expressionView.setText(temp);\n resultView.setText(finalResult);\n }\n }\n } catch (Exception e) {\n Toast.makeText(this,e.toString(),Toast.LENGTH_LONG);\n }\n }", "@Override\n public double getResult()\n {\n double result = this.factor1 + this.factor2;\n return result;\n }", "private double processExpression() throws ParsingException {\n double result = processTerm();\n\n while (true) {\n if (tryCaptureChar('+')) {\n result += processTerm();\n } else if (tryCaptureChar('-')) {\n result -= processTerm();\n } else {\n break;\n }\n }\n return result;\n }", "public Expression differentiate(String var) {\r\n // var might be a differentiate of other variable\r\n if (!this.toString().equalsIgnoreCase(var)) {\r\n return (Expression) new Num(0);\r\n }\r\n return (Expression) new Num(1);\r\n\r\n }", "public Expression differentiate(String var) {\n Expression sin = new Sin(this.getExp());\n Expression diff = this.getExp().differentiate(var);\n diff = new Neg(diff);\n Expression e = new Mult(diff, sin);\n return e;\n }", "@Override\r\n\tpublic double calculate() {\n\t\treturn n1 / n2;\r\n\t}", "@Override\r\n \tpublic int evaluate(final String expression) {\n \t\tif (expression.isEmpty()) {\r\n \t\t\tthrow new RuntimeException();\r\n \t\t}\r\n \t\tObject v, f;\r\n \t\tfloat k;\r\n \t\tfor (int i = 0; i < expression.length(); i++) {\r\n \t\t\t\tif (expression.charAt(i) == '/') {\r\n \t\t\t\t\tif (s.size() >= 2) {\r\n \t\t\t\t\t\tf = s.pop();\r\n \t\t\t\t\t\tv = s.pop();\r\n \t\t\t\t\t} else {\r\n \t\t\t\t\t\tthrow new RuntimeException();\r\n \t\t\t\t\t}\r\n \t\t\t\t k = (Float.valueOf(\r\n \t\t\t\t\t\tString.valueOf(v))\r\n \t\t\t\t\t\t/ (Float.valueOf(\r\n \t\t\t\t\t\t String.valueOf(f))));\r\n \t\t\t\ts.push(k);\r\n \t\t\t\t} else if (expression.charAt(i) == '*') {\r\n \t\t\t\t\tif (s.size() >= 2) {\r\n \t\t\t\t\t\tf = s.pop();\r\n \t\t\t\t\t\tv = s.pop();\r\n \t\t\t\t\t} else {\r\n \t\t\t\t\t\tthrow new RuntimeException();\r\n \t\t\t\t\t}\r\n \t\t\t\t k = (Float.valueOf(\r\n \t\t\t\t\t\t\tString.valueOf(v))\r\n \t\t\t\t\t\t\t* (Float.valueOf(\r\n \t\t\t\t\t\t\t String.valueOf(f))));\r\n \t\t\t\t\ts.push(k);\r\n \t\t\t\t\t} else if (\r\n \t\t\t\t\t\texpression.charAt(i) == '+') {\r\n \t\t\t\t\t\tif (s.size() >= 2) {\r\n \t \t\t\t\t\t\tf = s.pop();\r\n \t \t\t\t\t\t\tv = s.pop();\r\n \t \t\t\t\t\t} else {\r\n \t \t\t\t\t throw new RuntimeException();\r\n \t \t\t\t\t\t}\r\n \t\t\t\t k = (Float.valueOf(\r\n \t\t\t\t\t\t\tString.valueOf(v))\r\n \t\t\t\t\t\t\t+ (Float.valueOf(\r\n \t\t\t\t\t\t\t String.valueOf(f))));\r\n \t\t\t\t\ts.push(k);\r\n \t\t\t\t\t} else if (\r\n \t\t\t\t\texpression.charAt(i) == '-') {\r\n \t\t\t\t\t\tif (s.size() >= 2) {\r\n \t \t\t\t\t\t\tf = s.pop();\r\n \t \t\t\t\t\t\tv = s.pop();\r\n \t \t\t\t\t\t} else {\r\n \t \t\t\t \t throw new RuntimeException();\r\n \t \t\t\t\t\t}\r\n \t\t\t\t\t k = (Float.valueOf(\r\n \t\t\t\t\t\t\tString.valueOf(v))\r\n \t\t\t\t\t\t\t- (Float.valueOf(\r\n \t\t\t\t\t\t\t String.valueOf(f))));\r\n \t\t\t\t\ts.push(k);\r\n \t\t\t\t\t} else {\r\n \t\t\t\tif (expression.charAt(i) != ' ') {\r\n \t\t\t\t\tint r = 0;\r\n \t\t\t\t\tr += Integer.valueOf(\r\n \t\t\t\t\t\tString.valueOf(\r\n \t\t\t\t\t\texpression.charAt(i)));\r\n \t\t\t\t\twhile (\r\n \t\t\t\t\texpression.charAt(i + 1) != ' ') {\r\n \t\t\t\t\t\ti++;\r\n \t\t\t\t\t\tr *= magic10;\r\n \t\t\t\t\t\tr += Integer.valueOf(\r\n \t\t\t\t\t\t\tString.valueOf(\r\n \t\t\t\t\t\t\texpression.charAt(i)));\r\n \t\t\t\t\t}\r\n \t\t\t\ts.push(r);\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n if (s.size() == 0) {\r\n \t\t\tthrow new RuntimeException();\r\n \t\t}\r\n \t\tfloat h = Float.parseFloat((String.valueOf(s.pop())));\r\n \t\tif (!s.isEmpty()) {\r\n \t\t\treturn 0;\r\n \t\t}\r\n \t\treturn (int) h;\r\n \t}", "private float caculate(Operation opt, float f1, float f2) {\n\t\tfloat res;\n\t\tswitch (opt) {\n\t\tcase ADD:\n\t\t\tres = f1 + f2;\n\t\t\tbreak;\n\t\tcase SUB:\n\t\t\tres = f1 - f2;\n\t\t\tbreak;\n\t\tcase MUL:\n\t\t\tres = f1 * f2;\n\t\t\tbreak;\n\t\tcase DIV:\n\t\t\tres = f1 / f2;\n\t\t\tbreak;\n\t\tcase NULL:\n\t\t\tres = 0;\n\t\t\terr.error(\"No operation in caculating.\");\n\t\tdefault:\n\t\t\tres = 0;\n\t\t\tbreak;\n\t\t}\n\t\treturn res;\n\t\t/*\n\t\t * lex.floatHolder.add(res); return lex.floatHolder.lastIndexOf(res);\n\t\t */\n\t}", "public static ExpressionCollection getCommonFactors(Expression f, Expression g) {\r\n\r\n ExpressionCollection factorsF, factorsG;\r\n\r\n if (f.isQuotient()) {\r\n factorsF = SimplifyUtilities.getFactorsOfNumeratorInExpression(((BinaryOperation) f).getLeft());\r\n } else {\r\n factorsF = SimplifyUtilities.getFactors(f);\r\n }\r\n\r\n if (g.isQuotient()) {\r\n factorsG = SimplifyUtilities.getFactorsOfNumeratorInExpression(((BinaryOperation) g).getLeft());\r\n } else {\r\n factorsG = SimplifyUtilities.getFactors(g);\r\n }\r\n\r\n ExpressionCollection factorsFCopy = factorsF.copy();\r\n ExpressionCollection factorsGCopy = factorsG.copy();\r\n\r\n try {\r\n\r\n /*\r\n Idee: Falls f und g Faktoren der Form h^m und h^n besitzen, wobei\r\n m und n rationale Zahlen sind, so wird h^(min(m, n)) zur Menge\r\n der gemeinsamen Faktoren hinzugefügt. Andernfalls werden Faktoren\r\n nur dann hinzugefügt, wenn sie äquivalent sind.\r\n */\r\n ExpressionCollection commonFactors = new ExpressionCollection();\r\n Expression base, baseToCompare, exponent, exponentToCompare, exponentDifference, exponentOfCommonFactor;\r\n\r\n for (int i = 0; i < factorsF.getBound(); i++) {\r\n if (factorsF.get(i) == null) {\r\n continue;\r\n }\r\n\r\n if (factorsF.get(i).isPower() && ((BinaryOperation) factorsF.get(i)).getRight().isIntegerConstantOrRationalConstant()) {\r\n base = ((BinaryOperation) factorsF.get(i)).getLeft();\r\n exponent = ((BinaryOperation) factorsF.get(i)).getRight();\r\n } else {\r\n base = factorsF.get(i);\r\n exponent = ONE;\r\n }\r\n\r\n for (int j = 0; j < factorsG.getBound(); j++) {\r\n if (factorsG.get(j) == null) {\r\n continue;\r\n }\r\n\r\n if (factorsG.get(j).isPower() && ((BinaryOperation) factorsG.get(j)).getRight().isIntegerConstantOrRationalConstant()) {\r\n baseToCompare = ((BinaryOperation) factorsG.get(j)).getLeft();\r\n exponentToCompare = ((BinaryOperation) factorsG.get(j)).getRight();\r\n } else {\r\n baseToCompare = factorsG.get(j);\r\n exponentToCompare = ONE;\r\n }\r\n\r\n if (base.equivalent(baseToCompare)) {\r\n exponentDifference = exponent.sub(exponentToCompare).simplify();\r\n if (exponentDifference.isNonNegative()) {\r\n exponentOfCommonFactor = exponentToCompare;\r\n } else {\r\n exponentOfCommonFactor = exponent;\r\n }\r\n if (exponentOfCommonFactor.equals(ONE)) {\r\n commonFactors.add(base);\r\n } else {\r\n commonFactors.add(base.pow(exponentOfCommonFactor));\r\n }\r\n factorsF.remove(i);\r\n factorsG.remove(j);\r\n break;\r\n }\r\n\r\n }\r\n }\r\n\r\n return commonFactors;\r\n\r\n } catch (EvaluationException e) {\r\n }\r\n\r\n return SimplifyUtilities.intersection(factorsFCopy, factorsGCopy);\r\n\r\n }", "int parseExpression() {\r\n\t\t\t\tint x = parseTerm();\r\n\t\t\t\tfor (;;) {\r\n\t\t\t\t\tif (eat('+'))\r\n\t\t\t\t\t\tx += parseTerm(); // addition\r\n\t\t\t\t\telse if (eat('-'))\r\n\t\t\t\t\t\tx -= parseTerm(); // subtraction\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\treturn x;\r\n\t\t\t\t}\r\n\t\t\t}", "public static void calculateMathProblem(){\n\n int num1 = 5;\n double num2 = 3.0d;\n float num3 = 3.0f;\n double result1 = num1 + num2;\n double result2 = num1 - num2;\n double result3 = num1 * num2;\n double result4 = num1 / num2;\n float result5 = num1 / num3;\n System.out.println(result1);\n System.out.println(result2);\n System.out.println(result3);\n System.out.println(result4);\n System.out.println(result5);\n\n }", "@Override\n public Expression simplify() {\n Expression ex1Simp = getEx2().simplify(), ex2Simp = getEx2().simplify();\n\n try {\n if (ex2Simp.evaluate() == 1) {\n return ex1Simp.simplify();\n }\n } catch (Exception e) {\n\n }\n ;\n Boolean equality = false;\n try {\n if (ex1Simp.evaluate() == ex2Simp.evaluate()) {\n equality = true;\n } else {\n equality = false;\n }\n } catch (Exception e) {\n }\n\n List<String> vars = ex1Simp.getVariables();\n List<String> vars2 = ex2Simp.getVariables();\n\n if (vars.containsAll(vars2) && vars2.containsAll(vars)) {\n Map<String, Double> varsMap = new TreeMap<>();\n double i = 2;\n for (String s : vars) {\n varsMap.put(s, i);\n i += 1;\n }\n\n try {\n if (ex1Simp.evaluate(varsMap) == ex2Simp.evaluate(varsMap)) {\n equality = true;\n } else {\n equality = false;\n }\n } catch (Exception e) {\n }\n\n }\n\n\n if (equality) {\n return new Num(1);\n } else return new Log(getEx2().simplify(), getEx2().simplify());\n }", "NumericExpression createNumericExpression();", "public abstract double fct(double x);", "Expr expr();", "private String evaluateExpr(String expr){\n\t\t//bigdecimal used for long user inputs\n\t\tBigDecimal num1, num2, ans, temp = new BigDecimal(\"0\");\n\t\tint check = 1;\n\t\t//find the position of function\n\t\twhile(Character.isDigit(expr.charAt(check)) || expr.charAt(check) == '.')\n\t\t\tcheck++;\n\t\t//extract numbers from expression\n\t\tnum1 = new BigDecimal(expr.substring(0,check));\n\t\tnum2 = new BigDecimal(expr.substring(check + 1,expr.length()));\n\t\t//division by zero error\n\t\tif(num2.compareTo(temp) == 0 && expr.charAt(check) == '/')\n\t\t\treturn \"Invalid\";\n\t\t//evaluate functions\n\t\tif(expr.charAt(check) == '*')\n\t\t\tans = num1.multiply(num2);\n\t\telse if(expr.charAt(check) == '+')\n\t\t\tans = num1.add(num2);\n\t\telse if(expr.charAt(check) == '/')\n\t\t\tans = num1.divide(num2, MathContext.DECIMAL32);\n\t\telse\n\t\t\tans = num1.subtract(num2);\n\t\treturn ans.toString();\n\t}", "private double evaluarExp2() throws Excepciones{\n char op;\n double resultado;\n double resultadoParcial;\n resultado = evaluarExp3();\n while((op = token.charAt(0)) == '+' || op == '-') {\n obtieneToken();\n resultadoParcial = evaluarExp3();\n switch(op) {\n case '-':\n resultado = resultado - resultadoParcial;\n break;\n case '+':\n resultado = resultado + resultadoParcial;\n break;\n } \n }\n return resultado;\n }", "public void typeInference() {\n\t\tMathOperation addition = (a, b) -> a + b;\n\t\t// Data Type of a, b can be referred from MathOperation functional interface\n\t\tSystem.out.println(\"10 + 5 = \" + addition.operation(10, 5));\n\t}", "@Override\n public Expression simplify() {\n try {\n return new Num(this.evaluate());\n } catch (Exception e) {\n if (getExpression1().simplify().toString().equals(getExpression2().simplify().toString())) {\n return new Num(0);\n }\n if (getExpression1().simplify().toString().equals(\"0.0\")) {\n return new Neg(getExpression2().simplify());\n }\n if (getExpression2().simplify().toString().equals(\"0.0\")) {\n return getExpression1().simplify();\n }\n return new Minus(getExpression1().simplify(), getExpression2().simplify());\n }\n }", "@Override\n\tpublic int evaluate(){\n\t\treturn term.evaluate() + exp.evaluate();\n\t}", "@Override\r\n\tpublic int evaluate(String expression) {\r\n\t\tString e =expression;\r\n\t\tfloat result=0; //the returned result \r\n\t\tif(e.length()==2) {\r\n\t\t\te = removespaces(e);\r\n\t\t\tint z =Integer.parseInt(e);\r\n\t\t\treturn z;\r\n\t\t}\r\n\t\tfor(int i =0 ;i<expression.length();i++){\r\n\t\t\tif(Character.isLetter(e.charAt(i))){\r\n\t\t\t\tthrow new RuntimeException(\"You Can't evaluate letters\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int i =0 ;i<expression.length()-1;i++) {\r\n\t\t\twhile(e.charAt(i) != '+' &&e.charAt(i) != '/' &&e.charAt(i) != '-' &&e.charAt(i) != '*' ) {\r\n\t\t\t\tint j = 0;\r\n\t\t\t\twhile(e.charAt(i) != ' ' ) {\r\n\t\t\t\t\tj++;\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}\r\n\t\t\t\tif(j>0) {\r\n\t\t\t\t\tString k = e.substring(i-j, i);\r\n\t\t\t\t\tk = removespaces(k);\r\n\t\t\t\t\tfloat z = Integer.parseInt(k);\r\n\t\t\t\t\topr.push(z);}\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t\tif(e.charAt(i)== '+') {\r\n\t\t\t\tfloat x = (float)opr.pop();\r\n\t\t\t\tresult = (float)opr.pop();\r\n\t\t\t\tresult = result + x;\r\n\t\t\t\topr.push(result);\r\n\t\t\t}\r\n\t\t\telse if(e.charAt(i)== '*') {\r\n\t\t\t\tfloat x = (float)opr.pop();\r\n\t\t\t\tresult = (float)opr.pop();\r\n\t\t\t\tresult = result * x;\r\n\t\t\t\topr.push(result);\r\n\t\t\t}\r\n\t\t\telse if(e.charAt(i)== '-') {\r\n\t\t\t\tfloat x = (float)opr.pop();\r\n\t\t\t\tresult = (float)opr.pop();\r\n\t\t\t\tresult = result - x;\r\n\t\t\t\topr.push(result);\r\n\t\t\t}\r\n\t\t\telse if(e.charAt(i)== '/') {\r\n\t\t\t\tfloat x = (float)opr.pop();\r\n\t\t\t\tresult = (float)opr.pop();\r\n\t\t\t\tresult = result / x;\r\n\t\t\t\topr.push(result);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\treturn (int)result;\r\n\r\n\t}", "private float caculate(Operation opt, float f1, int t2) {\n\t\tfloat res;\n\t\tfloat tt2 = (float) t2;\n\t\tswitch (opt) {\n\t\tcase ADD:\n\t\t\tres = f1 + tt2;\n\t\t\tbreak;\n\t\tcase SUB:\n\t\t\tres = f1 - tt2;\n\t\t\tbreak;\n\t\tcase MUL:\n\t\t\tres = f1 * tt2;\n\t\t\tbreak;\n\t\tcase DIV:\n\t\t\tres = f1 / tt2;\n\t\t\tbreak;\n\t\tcase NULL:\n\t\t\terr.error(\"No operation in caculating.\");\n\t\t\treturn 0;\n\t\tdefault:\n\t\t\tres = 0;\n\t\t\tbreak;\n\t\t}\n\t\treturn res;\n\n\t\t/*\n\t\t * lex.floatHolder.add(res); return lex.floatHolder.lastIndexOf(res);\n\t\t */\n\t}", "@Override\r\n\tpublic double calculate() {\n\t\treturn n1 * n2;\r\n\t}", "DExpression getExpression();", "@Test\n void scEvaluate() {\n StandardCalc sc = new StandardCalc();\n String expression = (\"( 5 * ( 6 + 7 ) ) - 2\");\n float result = 0f;\n try {\n result = sc.evaluate(expression);\n } catch (InvalidExpressionException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n assertEquals(result, 63);\n }", "private static double calcDiv(float f, float g) {\n\t\treturn f / g;\n\t}", "public static int term()\r\n {\r\n //get the start state of this factor\r\n int r;\r\n int t1;\r\n t1=r=factor();\r\n\r\n //if there is no more input, we are done\r\n if(index>expression.length()-1)\r\n {\r\n return r;\r\n }\r\n\r\n //if it is closure\r\n if(expression.charAt(index)=='*')\r\n {\r\n int f=state-1;\r\n //create a branch state and set its next1 and next2\r\n state st=new state(state,\"BR\",t1,state+1);\r\n stateList.add(st);\r\n\r\n //check if the expression is something like (abc)*\r\n //if so, update the corresponding state so both a* and (abc)* work\r\n if(expression.charAt(index-1)!=')')\r\n {\r\n if(stateList.get(f-1).getNext1()==stateList.get(f-1).getNext2())\r\n {\r\n stateList.get(f-1).setNext1(state);\r\n }\r\n stateList.get(f-1).setNext2(state);\r\n\r\n }\r\n\r\n index++;\r\n r=state;\r\n state++;\r\n\r\n }\r\n //preceding regexp can occur one or more times\r\n else if(expression.charAt(index)=='+')\r\n {\r\n int f=state-1;\r\n stateList.get(f).setNext1(t1);\r\n index++;\r\n\r\n }\r\n // preceding regexp can occur zero or one time\r\n else if(expression.charAt(index)=='?')\r\n {\r\n int f =state-1;\r\n //check if the expression is something like (abc)?\r\n //if so update corresponding state so both a? and (abc)? work\r\n if(expression.charAt(index-1)!=')')\r\n {\r\n //create a branch state and update the corresponding state\r\n state st=new state(state,\"BR\",t1,state+1);\r\n\r\n String previousChar=stateList.get(f).getCharacter();\r\n\r\n if(stateList.get(f).getAlter())\r\n {\r\n stateList.get(f).setAlter(false);\r\n st.setAlter(true);\r\n }\r\n\r\n stateList.get(f).setCharacter(\"BR\");\r\n stateList.get(f).setNext2(state+1);\r\n st.setCharacter(previousChar);\r\n st.setNext1(state+1);\r\n stateList.add(st);\r\n\r\n r=f;\r\n state++;\r\n index++;\r\n }\r\n else\r\n {\r\n //create a branch state and update the corresponding state\r\n if(stateList.get(f).getNext1()==stateList.get(f).getNext2())\r\n {\r\n stateList.get(f).setNext1(state+1);\r\n }\r\n stateList.get(f).setNext2(state+1);\r\n\r\n state st=new state(state,\"BR\",t1,state+1);\r\n stateList.add(st);\r\n\r\n r=state;\r\n state++;\r\n index++;\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n return r;\r\n }", "private static int evaluateExpression(String expression, int number1, int number2){\n if(expression.equals(\"plus\")){\n \treturn (number1 + number2);\n }else if(expression.equals(\"minus\")){\n \treturn (number1 - number2);\n }else if(expression.equals(\"times\")){\n \treturn(number1 * number2);\n }else if(expression.equals(\"divide\")){\n \treturn(number1 / number2);\n }\n return 0;\n \n }", "ExpOperand createExpOperand();", "private void reciprocal()\n\t{\n\t\tif(Fun == null)\n\t\t{\n\t\t\tsetLeftValue();\n\t\t\tresult = calc.reciprocal ( );\n\t\t\tupdateText();\n\t\t\tsetLeftValue();\n\t\t}\n\t}", "public double evalH(double f, double g) {\n double h ;\n h = 1.0 - Math.sqrt(f / g);\n return h;\n }", "@Test\n public void test01() {\n\n float a = 0.1f;\n float b = 0.2f;\n float c = 0.4f;\n float d = 0.6f;\n\n\n System.out.println(a+b);\n System.out.println(c+d);\n\n System.out.println(a+b == 0.3d);\n System.out.println(c+d == 1.0d);\n }", "private double evalG(DoubleSolution solution) {\n double g = 0.0;\n for (int i = 1; i < solution.getNumberOfVariables(); i++) {\n g += solution.getVariableValue(i);\n }\n double constant = 9.0 / (solution.getNumberOfVariables() - 1.0);\n g = constant * g;\n g = g + 1.0;\n return g;\n }", "public abstract Function derivative();", "public void e(double num1, double num2) {\r\n\t\t\r\n\t\tdouble operar;\r\n\t\t\r\n\t\tfor(int i=0; i<num1; i++) {\r\n\t\t\t\r\n\t\t\toperar=1/factorial(i);\r\n\t\t\tCalcularEValue+=operar;\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "float calcularFinal(){\n return (calif1*0.3f)+(calif2*0.3f)+(calif3*0.4f);// debo agregar la f para que lo tome como float y no como double\r\n }", "public void cal_AdjustedFuelMoist(){\r\n\tADFM=0.9*FFM+0.5+9.5*Math.exp(-BUO/50);\r\n}", "private Double inspectExpression(String ex) {\n Double cyclomatic = 0.0;\n if (ex != null) {\n char[] chars = ex.toCharArray();\n for (int i = 0; i < chars.length - 1; i++) {\n char next = chars[i];\n if ((next == '&' || next == '|') && (next == chars[i + 1])) {\n cyclomatic++;\n }\n }\n }\n return cyclomatic;\n }", "private static int calculate(String expression) {\n if (expression == null || expression.isEmpty()) {\n return 0;\n }\n // 3 - Division from 0\n // Division from zero should not be possible. If a string \"5/0\" is passed, result should be -1\n if (expression.contains(\"/0\")) {\n return -1;\n }\n // 4 - Floating point numbers\n // As mentioned, floating point numbers should not be supported. If string contains not a whole number and not the allowed operations (+-x%) then it should also return -1.\n if (expression.contains(\".\") || !hasOnlyAllowedChars(expression, \"0123456789+-x/!\")) {\n return -1;\n }\n // calculate\n // find partial formulas: 5x3+2x7+1-5+4! -> [\"5x3\", \"2x7\", \"1\", \"5\", \"4!\"]\n String[] operands = findOperands(expression, \"+-\");\n // find operators: 5x3+2x7+1-5+4! -> [\"+\", \"+\", \"-\", \"+\"]\n String[] plusMinus = findOperators(expression, \"+-\");\n // calculates division, multiplication, factorial: 5x3, 2x7, 1, 5, 4!\n int result = findNumberDivMultiFactorial(operands[0]);\n for (int i = 1; i < operands.length; i++) {\n switch (plusMinus[i - 1]) {\n case \"+\":\n result = result + findNumberDivMultiFactorial(operands[i]);\n break;\n case \"-\":\n result = result - findNumberDivMultiFactorial(operands[i]);\n break;\n }\n }\n\n return result;\n }", "private Double check_mathOperator(Double result) {\n \r\n switch(mathOperator){\r\n case '/':\r\n result =totalFirst/totalLast;\r\n break;\r\n case 'x':\r\n result =totalFirst*totalLast;\r\n break;\r\n case '-':\r\n result =totalFirst-totalLast;\r\n break;\r\n case '+':\r\n result =totalFirst+totalLast;\r\n break;\r\n \r\n }\r\n return result;\r\n }", "public abstract double calcular();", "private float caculate(Operation opt, int t1, float f2) {\n\t\tfloat res;\n\t\tfloat tt1 = (float) t1;\n\t\tswitch (opt) {\n\t\tcase ADD:\n\t\t\tres = tt1 + f2;\n\t\t\tbreak;\n\t\tcase SUB:\n\t\t\tres = tt1 - f2;\n\t\t\tbreak;\n\t\tcase MUL:\n\t\t\tres = tt1 * f2;\n\t\t\tbreak;\n\t\tcase DIV:\n\t\t\tres = tt1 / f2;\n\t\t\tbreak;\n\t\tcase NULL:\n\t\t\terr.error(\"No operation in caculating.\");\n\t\t\tres = 0;\n\t\tdefault:\n\t\t\tres = 0;\n\t\t\tbreak;\n\t\t}\n\n\t\treturn res;\n\n\t\t/*\n\t\t * lex.floatHolder.add(res); return lex.floatHolder.lastIndexOf(res);\n\t\t */\n\t}", "public String simplify(){\n\n int simp = gcd(numerator, denominator);\n numerator = (numerator/simp);\n denominator = (denominator/simp);\n if (denominator == 1){\n return (numerator + \"\");\n }\n if (numerator > denominator){\n int first = (numerator/denominator);\n numerator = (numerator%denominator);\n return (first + \"_\" + numerator + \"/\" + denominator);\n }\n else {\n return (numerator + \"/\" + denominator);\n }\n\n }", "public org.drip.measure.dynamics.DiffusionEvaluator evaluator()\n\t{\n\t\treturn _de;\n\t}", "public static void main(String[] args) {\n ArithmeticExpression calculation =\n new Operand(\n new Operand(new Number(4), Operation.PLUS, new Number(6)),\n Operation.MULTIPLICATION,\n new Operand(new Number(1), Operation.DIVISION, new Number(2)));\n\n System.out.println(calculation.toString() + \" = \" + calculation.calculate());\n }", "String getMGFAlgorithm();", "private double operation(char operand, double num1, double num2){\r\n\t\t\tdouble result;\r\n\t\t\tCalculatorImpl ci = new CalculatorImpl();\r\n\t\t\tswitch(operand){\r\n\t\t\tcase PLUS : result = ci.getAddition(num1, num2);break;\r\n\t\t\tcase MINUS : result = ci.getSubtraction(num1, num2);break;\r\n\t\t\tcase MULTI : result = ci.getMultification(num1, num2);break;\r\n\t\t\tcase DIVIDE : result = ci.getDivision(num1, num2);break;\r\n\t\t\tdefault : result=0.0;break;\r\n\t\t\t}\r\n\t\t\treturn result;\r\n\t\t}", "public Fraccion division() {\r\n Fraccion division = new Fraccion(operador1.getNumerador()*operador2.getDenominador() , operador1.getDenominador()*operador2.getNumerador());\r\n return simplify(division);\r\n }", "public static double getTotal(double tuition, double gnsf, double erf){\r\n double total = 0;\r\n total = tuition + gnsf + erf;\r\n return total;\r\n }", "private double expr(boolean get){\n\t\t// compute the left argument which has to be a primary value or an expression with a higher priority than sums\n\t\tdouble left = term(get);\n\t\t// add all addends until the end of the sum is reached\n\t\tfor(;;){ \n\t\t\tswitch(curr_tok){\n\t\t\t\tcase PLUS:{\n\t\t\t\t\tleft += term(true);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase MINUS:{\n\t\t\t\t\tleft -= term(true);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault:{\n\t\t\t\t\treturn left;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private double calcG(int a, int b) {\n return a % 2 == 0 && b % 2 == 0 ? 20 : a % 2 == 1 && b % 2 == 1 ? 1 : 5;\n }", "@Override\n public Double evaluate() {\n return left.evaluate() + right.evaluate();\n }", "public static void main(String[] args) {\n\n System.out.println(\"119.1+(28.2+37.3*(46.4-55.5)-4.6+(3/2)+1) = \" + evaluateExpression(\"119.1 + ( 28.2 + 37.3 * ( 46.4 - 55.5 ) - 4.6 + ( 3 / 2 ) + 1 )\"));\n\n}", "private Object eval(SimpleExpr expr) {\n Object res = eval(expr.getExpr().get(0));\n\n for (int i = 1; i < expr.getExpr().size(); i++) {\n Object res2 = eval(expr.getExpr().get(i));\n String opt = expr.getOpt().get(i - 1);\n\n if (\"+\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res + (Double) res2;\n } else if (res instanceof Double && res2 instanceof String) {\n res = \"\" + res + res2;\n } else if (res instanceof Boolean && res2 instanceof String) {\n res = \"\" + res + res2;\n } else if (res instanceof String && res2 instanceof String) {\n res = \"\" + res + res2;\n } else if (res instanceof String && res2 instanceof Double) {\n res = \"\" + res + res2;\n } else if (res instanceof String && res2 instanceof Boolean) {\n res = \"\" + res + res2;\n } else {\n throw new RaydenScriptException(\"Expression error: SimpleExpr error\");\n }\n } else if (\"-\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res - (Double) res2;\n } else {\n throw new RaydenScriptException(\"Expression error: SimpleExpr error\");\n }\n } else {\n throw new RaydenScriptException(\"Expression error: Invalid operator '\" + opt + \"'.\");\n }\n }\n\n return res;\n }", "static void add(){\n double a = 5.6;//static variable\n double b = 8.5;//static variable\n double c = a * b;//static variable for formula\n double d = 2*(a+b);//static variable for formula\n System.out.println(\"Area is \" + c);//print statement for area output\n System.out.println(\"Perimeter is \" + d);//print statement for perimeter output\n }", "ExpressionCalculPrimary getExpr();", "@Override\n public Expression differentiate(String var) {\n return new Minus(getA().differentiate(var), getB().differentiate(var));\n }", "String getExpression();", "String getExpression();", "public int f(String exp, boolean result, int s, int e){\n\t\tif(s == e){\n\t\t\tif(exp.charAt(s) == '1' && result){\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\tif(exp.charAt(e) == '0' && !result){\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\tint c = 0;\n\t\tif(result){\n\t\t\tfor(int i = s + 1; i < e; i += 2){\n\t\t\t\tif(exp.charAt(i) == '&'){\n\t\t\t\t\tc += f(exp, true, s, i - 1) * f(exp, true, i + 1, e);\n\t\t\t\t}\n\t\t\t\telse if(exp.charAt(i) == '|'){\n\t\t\t\t\tc += f(exp, true, s, i - 1) * f(exp, true, i + 1, e);\n\t\t\t\t\tc += f(exp, true, s, i - 1) * f(exp, false, i + 1, e);\n\t\t\t\t\tc += f(exp, false, s, i - 1) * f(exp, true, i + 1, e);\n\t\t\t\t}\n\t\t\t\telse if(exp.charAt(i) == '^'){\n\t\t\t\t\tc += f(exp, true, s, i - 1) * f(exp, false, i + 1, e);\n\t\t\t\t\tc += f(exp, false, s, i - 1) * f(exp, true, i + 1, e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tfor(int i = s + 1; i < e; i += 2){\n\t\t\t\tif(exp.charAt(i) == '&'){\n\t\t\t\t\tc += f(exp, true, s, i - 1) * f(exp, false, i + 1, e);\n\t\t\t\t\tc += f(exp, false, s, i - 1) * f(exp, true, i + 1, e);\n\t\t\t\t\tc += f(exp, false, s, i - 1) * f(exp, false, i + 1, e);\n\t\t\t\t}\n\t\t\t\telse if(exp.charAt(i) == '|'){\n\t\t\t\t\tc += f(exp, false, s, i - 1) * f(exp, false, i + 1, e);\n\t\t\t\t}\n\t\t\t\telse if(exp.charAt(i) == '^'){\n\t\t\t\t\tc += f(exp, true, s, i - 1) * f(exp, true, i + 1, e);\n\t\t\t\t\tc += f(exp, false, s, i - 1) * f(exp, false, i + 1, e);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\n\treturn c;\n\t\n\t}", "private double f(double v, double s) {\n\t\treturn equation(v) - s;\r\n\t}", "private double evaluarExp6() throws Excepciones{\n double resultado;\n if(token.equals(\"(\")) {\n obtieneToken();\n resultado = evaluarExp2();\n if(!token.equals(\")\")){\n obtieneError(PARENTESIS);\n }\n obtieneToken();\n }else{\n resultado = valor();\n }\n return resultado;\n}", "public static int calc(int num1, int num2,double number1, double number2, String operation){\n\n int result=-1;\n double result1 =-1;\n\t\t\tswitch (operation){\n case \"+\":\n result = num1+num2;\n result1 = number1 + number2;\n break;\n case \"-\":\n result = num1-num2;\n break;\n case \"*\":\n result = num1*num2;\n break;\n default:\n System.out.println(\"wrong\");\n }\n return result;\n }", "@Override\n public Expression differentiate(String var) {\n return new Minus(getExpression1().differentiate(var), getExpression2().differentiate(var));\n }", "@Override\n public Expression simplify() {\n Expression right = getExpRight().simplify();\n Expression left = getExpLeft().simplify();\n //check if you can simplify more\n Num zero = new Num(0), one = new Num(1);\n //check if the left expression equals to zero\n if (zero.isEqual(left)) {\n return zero;\n }\n //check if the right expression equals to zero\n if (zero.isEqual(right)) {\n return zero;\n }\n //check if the left expression equals to one\n if (one.isEqual(left)) {\n return right;\n }\n //check if the right expression equals to one\n if (one.isEqual(right)) {\n return left;\n }\n try {\n //check if the expression is a number\n double value = evaluate();\n return new Num(value);\n } catch (Exception e) {\n return new Mult(left, right);\n }\n }", "@Override\n\tpublic void calc() {\n\t\tcalculated = true;\n\t\tanswer=operand1-operand2;\n\t}", "public double calculate(double value1, double value2, String op)\r\n { \r\n if (op.equals(\"+\")) \r\n {\r\n return value1 + value2;\r\n }\r\n else if (op.equals(\"-\")) \r\n {\r\n return value1 - value2;\r\n }\r\n else if (op.equals(\"*\")) \r\n {\r\n return value1 * value2;\r\n }\r\n else if (op.equals(\"/\")) \r\n {\r\n return value1 / value2;\r\n }\r\n else // \"=\"\r\n {\r\n return value2;\r\n }\r\n }", "public double adicao (double numero1, double numero2){\n\t}", "protected IExpressionValue expression() throws TableFunctionMalformedException,\r\n\t\t\t\t\t\t\t\t\t\t\t\t InvalidProbabilityRangeException,\r\n\t\t\t\t\t\t\t\t\t\t\t\t SomeStateUndeclaredException{\r\n\t\t\r\n\t\t// temp table already created by upper caller\r\n\t\t\r\n\t\tIExpressionValue temp1 = term();\r\n\t\tIExpressionValue temp2 = null;\r\n\t\t\r\n\t\tFloat temp1Value = null;\r\n\t\tFloat temp2Value = null;\r\n\t\t// LOOK FOR +/- (OPTIONAL)\r\n\t\tswitch (look) {\r\n\t\tcase '+':\r\n\t\t\tmatch('+');\r\n\t\t\ttemp2 = term();\r\n\t\t\ttry {\r\n\t\t\t\ttemp1Value = Float.parseFloat(temp1.getValue());\r\n\t\t\t} catch (NumberFormatException e) {\r\n\t\t\t\ttemp1Value = Float.NaN;\r\n\t\t\t}\r\n\t\t\ttry {\r\n\t\t\t\ttemp2Value = Float.parseFloat(temp2.getValue());\r\n\t\t\t} catch (NumberFormatException e) {\r\n\t\t\t\ttemp2Value = Float.NaN;\r\n\t\t\t}\r\n\t\t\tif (!Float.isNaN(temp1Value) && !Float.isNaN(temp2Value)) {\r\n\t\t\t\t// TODO cut the subtree if it is a known value...\r\n\t\t\t\ttemp1 = new AddOperationProbabilityValue(\r\n\t\t\t\t\t\ttemp1.isFixedValue()?(new SimpleProbabilityValue(temp1Value)):temp1 ,\r\n\t\t\t\t\t\t\t\ttemp2.isFixedValue()?(new SimpleProbabilityValue(temp2Value)):temp2);\r\n\t\t\t}\t\t\r\n\t\t\tbreak;\r\n\t\tcase '-':\r\n\t\t\tmatch('-');\r\n\t\t\ttemp2 = term();\r\n\t\t\ttry {\r\n\t\t\t\ttemp1Value = Float.parseFloat(temp1.getValue());\r\n\t\t\t} catch (NumberFormatException e) {\r\n\t\t\t\ttemp1Value = Float.NaN;\r\n\t\t\t}\r\n\t\t\ttry {\r\n\t\t\t\ttemp2Value = Float.parseFloat(temp2.getValue());\r\n\t\t\t} catch (NumberFormatException e) {\r\n\t\t\t\ttemp2Value = Float.NaN;\r\n\t\t\t}\r\n\t\t\tif (!Float.isNaN(temp1Value) && !Float.isNaN(temp2Value)){\r\n\t\t\t\t// TODO cut the subtree if it is known value...\r\n\t\t\t\ttemp1 = new SubtractOperationProbabilityValue(\r\n\t\t\t\t\t\ttemp1.isFixedValue()?(new SimpleProbabilityValue(temp1Value)):temp1 ,\r\n\t\t\t\t\t\t\t\ttemp2.isFixedValue()?(new SimpleProbabilityValue(temp2Value)):temp2);\r\n\t\t\t}\t\t\t\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\t// Debug.println(\"Expression returned \" + temp1.getProbability());\r\n\t\treturn temp1;\r\n\t}", "protected abstract SyntaxNode derivative(SyntaxNode doperand);", "@Override\n\tpublic double calculate(double d) {\n double disp1;\n\t\t\n\t\tdisp1 = calculate1(d);\n\t\t\n\t\treturn disp1;\n\t}", "public Double eval(Double... operands);", "public int calculate(String s) {\n Deque<Integer> stack = new ArrayDeque<>();\n\n // Init\n int result = 0; // For the on-going result\n int sign = 1; // 1 means positive, -1 means negative\n int operand = 0;\n\n // 1 + 2 + 1\n // The tricky part is that we find an operator/sign first, then we know\n // the operand after that. We save the sign first, and when we evaluate the\n // expression so far, we use that sign.\n\n // Go through the expression string character by character.\n // Evaluate to the left when we find '+', '-', ')', or end of loop.\n // We use a stack when we find parenthesis.\n for (int i = 0; i < s.length(); i++) {\n char c = s.charAt(i);\n if (Character.isDigit(c)) {\n // Form operand, since it could be more than one digit.\n operand = 10 * operand + (c - '0');\n } else if (c == '+') {\n // We can evaluate the expression to the left,\n // with result, sign, operand\n result += sign * operand;\n // Save the recently encountered '+' sign\n sign = 1;\n // Reset operand\n operand = 0;\n } else if (c == '-') {\n // We can evaluate the expression to the left,\n result += sign * operand;\n // Save the '-' sign.\n sign = -1;\n operand = 0;\n } else if (c == '(') {\n // Push the result so far and sign onto the stack, for later use.\n // We push the result first, then sign in the stack.\n stack.push(result);\n stack.push(sign);\n // Reset result, sign, and operand, as if new evaluation begins for the new\n // sub-expression\n result = 0;\n sign = 1;\n operand = 0;\n } else if (c == ')') {\n // We can evaluate the sub-expression to the left.\n result += sign * operand;\n // Now that we know the sub-expression ended, we can also evaluate to the left.\n // First we take the sign out of the stack, and then add the result we saved\n // before to the result of the sub-expression.\n result *= stack.pop();\n result += stack.pop();\n // Reset sign and operand.\n sign = 1;\n operand = 0;\n }\n }\n\n // We need to evaluate again.\n result += sign * operand;\n\n return result;\n }", "Expression getExpression();", "Expression getExpression();", "Expression getExpression();" ]
[ "0.7116449", "0.6216142", "0.5967625", "0.5850182", "0.58282685", "0.5817684", "0.5817684", "0.58077365", "0.579964", "0.57902706", "0.5768605", "0.571715", "0.5689909", "0.5664783", "0.5661741", "0.5651199", "0.5643733", "0.56231165", "0.559084", "0.5543582", "0.5517226", "0.5515873", "0.54933447", "0.54926956", "0.548459", "0.5460543", "0.545216", "0.543493", "0.54333246", "0.54188603", "0.5394085", "0.53917265", "0.5371988", "0.53672147", "0.5364695", "0.5351192", "0.5342007", "0.53298813", "0.5327979", "0.5325064", "0.52940285", "0.52937883", "0.5279939", "0.5276028", "0.5274541", "0.52720255", "0.5261106", "0.5243777", "0.52410334", "0.5240736", "0.52406555", "0.5236981", "0.5234453", "0.5232527", "0.523167", "0.5227709", "0.5220624", "0.520946", "0.52024543", "0.5201255", "0.5200505", "0.5197926", "0.51926035", "0.51918256", "0.51899177", "0.5188335", "0.518387", "0.51794887", "0.5177533", "0.51758015", "0.51685464", "0.5159407", "0.5155674", "0.51551026", "0.5154029", "0.51494855", "0.513855", "0.5132511", "0.5131212", "0.5130261", "0.51269037", "0.5124972", "0.5124972", "0.5123071", "0.5122065", "0.5117983", "0.5116216", "0.5106637", "0.5105523", "0.5105149", "0.50988144", "0.50979155", "0.50964177", "0.5093277", "0.50895184", "0.50814706", "0.50743055", "0.5074111", "0.5074111", "0.5074111" ]
0.570249
12
Simplifies the expression more.
@Override public Expression simplifyMore() { Expression left = super.getLeft(); Expression right = super.getRight(); // x * x -> x^2 if (left.toString().equals(right.toString())) { return new Pow(left, 2); } // ((2.0 * x) * (x * 3.0)) -> 6x^2 if (left instanceof Mult && right instanceof Mult) { if (((Mult) left).getRight().toString().equals(((Mult) right).getLeft().toString())) { Expression exp = new Mult(new Mult(((Mult) left).getLeft(), ((Mult) right).getRight()), new Mult(((Mult) left).getRight(), ((Mult) right).getLeft())); exp.turnBonusOn(); return exp.simplify(); } } // 2x * 2x -> 4x^2 if (left instanceof Mult && right instanceof Mult) { if (((Mult) left).getRight().toString().equals(((Mult) right).getRight().toString())) { return new Mult(new Mult(((Mult) left).getLeft(), ((Mult) right).getLeft()).simplify(), new Pow(((Mult) left).getRight(), 2)).simplify(); } } // 2x * 2y -> 4xy if (left instanceof Mult && right instanceof Mult) { return new Mult(new Mult(((Mult) left).getLeft(), ((Mult) right).getLeft()).simplify(), new Mult(((Mult) left).getRight(), ((Mult) right).getRight())).simplify(); } // sin(x) * cos(x) -> 0.5 * sin(2x) if (right instanceof Sin && left instanceof Cos) { Expression exp = new Mult(0.5, new Sin(new Mult(2, ((Sin) right).getExpression()))); exp.turnBonusOn(); return exp.simplify(); } // cos(x) * sin(x) -> 0.5 * sin(2x) if (right instanceof Cos && left instanceof Sin) { Expression exp = new Sin(new Mult(2, ((Cos) right).getExpression())); exp.turnBonusOn(); return exp.simplify(); } // log(x, y) * 2 -> 2 * log(x, y) if (left instanceof Sin || left instanceof Cos || left instanceof Log) { Expression exp = new Mult(right, left); exp.turnBonusOn(); return exp.simplify(); } // x^2 * x^3 -> x^5 if (left instanceof Pow && right instanceof Pow) { if (((Pow) left).getLeft().toString().equals(((Pow) right).getLeft().toString())) { Expression exp = new Pow(((Pow) left).getLeft(), new Plus(((Pow) left).getRight(), ((Pow) right).getRight())); exp.turnBonusOn(); return exp.simplify(); } } // x^2 * x -> x^3 if (left instanceof Pow) { if (((Pow) left).getLeft().toString().equals(right.toString())) { Expression exp = new Pow(((Pow) left).getLeft(), new Plus(((Pow) left).getRight(), 1)); exp.turnBonusOn(); return exp.simplify(); } } return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public RegexNode ReduceRep()\n\t{\n\t\tRegexNode u;\n\t\tRegexNode child;\n\t\tint type;\n\t\tint min;\n\t\tint max;\n\n\t\tu = this;\n\t\ttype = Type();\n\t\tmin = _m;\n\t\tmax = _n;\n\n\t\tfor (;;)\n\t\t{\n\t\t\tif (u.ChildCount() == 0)\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tchild = u.Child(0);\n\n\t\t\t// multiply reps of the same type only\n\t\t\tif (child.Type() != type)\n\t\t\t{\n\t\t\t\tint childType = child.Type();\n\n\t\t\t\tif (!(childType >= Oneloop && childType <= Setloop && type == Loop || childType >= Onelazy && childType <= Setlazy && type == Lazyloop))\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// child can be too lumpy to blur, e.g., (a {100,105}) {3} or (a {2,})?\n\t\t\t// [but things like (a {2,})+ are not too lumpy...]\n\t\t\tif (u._m == 0 && child._m > 1 || child._n < child._m * 2)\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tu = child;\n\t\t\tif (u._m > 0)\n\t\t\t{\n\t\t\t\tu._m = min = ((Integer.MAX_VALUE - 1) / u._m < min) ? Integer.MAX_VALUE : u._m * min;\n\t\t\t}\n\t\t\tif (u._n > 0)\n\t\t\t{\n\t\t\t\tu._n = max = ((Integer.MAX_VALUE - 1) / u._n < max) ? Integer.MAX_VALUE : u._n * max;\n\t\t\t}\n\t\t}\n\n\t\treturn min == Integer.MAX_VALUE ? new RegexNode(Nothing, _options) : u;\n\t}", "private boolean more() {\n return regEx.length() > 0;\n }", "public Expression simplify() {\r\n return this;\r\n }", "private void jetUnopExpr(){\n\t\tUnopExpr unopExpr = (UnopExpr) rExpr;\n\t\tif(unopExpr instanceof LengthExpr){\n\t\t\t//length_expr = \"length\" immediate;\n\t\t\t//$i1 = lengthof $r10\n\t\t\t//(assert (= $i1 lengthMap.get($r10)))\n\t\t\tLengthExpr lengthExpr = (LengthExpr) unopExpr;\n\t\t\tValue immediate = lengthExpr.getOp();\n\t\t\tif(immediate instanceof Constant){\n\t\t\t\tthis.exprStr = immediate.toString();\n\t\t\t}else{\n\t\t\t\tthis.exprStr = fileGenerator.getRenameOf(immediate, false, this.stmtIdx);\n\t\t\t}\n\t\t}else if(unopExpr instanceof NegExpr){\n\t\t\t//neg_expr = \"-\" immediate;\n\t\t\t//a = -b\n\t\t\t//(assert (= a (- 0 b))))\n\t\t\tNegExpr negExpr = (NegExpr) unopExpr;\n\t\t\tValue immediate = negExpr.getOp();\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tsb.append(\"(- 0 \");\n\t\t\tif(immediate instanceof Constant){\n\t\t\t\tsb.append(immediate.toString());\n\t\t\t}else{\n\t\t\t\tsb.append(fileGenerator.getRenameOf(immediate, false, this.stmtIdx));\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t}\n\t}", "Expression simplifyForSideEffect();", "@Override\n public Expression simplify() {\n Expression right = getExpRight().simplify();\n Expression left = getExpLeft().simplify();\n //check if you can simplify more\n Num zero = new Num(0), one = new Num(1);\n //check if the left expression equals to zero\n if (zero.isEqual(left)) {\n return zero;\n }\n //check if the right expression equals to zero\n if (zero.isEqual(right)) {\n return zero;\n }\n //check if the left expression equals to one\n if (one.isEqual(left)) {\n return right;\n }\n //check if the right expression equals to one\n if (one.isEqual(right)) {\n return left;\n }\n try {\n //check if the expression is a number\n double value = evaluate();\n return new Num(value);\n } catch (Exception e) {\n return new Mult(left, right);\n }\n }", "public static Expression reduceExtensions(Expression expression) { throw Extensions.todo(); }", "public void indentMore() {\n\t\tindentLevel += indentStep;\n\t}", "public static void findUglyExpressions(String num, int startingPos, int numOfDigitsLeft) {\n\n //reached end of number\n if(numOfDigitsLeft == 1)\n return;\n\n String beforeOp = num.substring(0, startingPos);\n String afterOp = num.substring(startingPos);\n\n //append + in between num[i] and num[i+1]\n String add = beforeOp + \"+\" + afterOp;\n if(isUgly(parseStringToExpression(add)))\n uglyNumbers++;\n findUglyExpressions(add, startingPos + 2, numOfDigitsLeft - 1); // +2 to deal with \"+\" added in\n\n //append - in between\n String subtract = beforeOp + \"-\" + afterOp;\n if(isUgly(parseStringToExpression(subtract)))\n uglyNumbers++;\n findUglyExpressions(subtract, startingPos + 2, numOfDigitsLeft - 1);\n\n //don't do any operations in between\n findUglyExpressions(num, startingPos + 1, numOfDigitsLeft - 1);\n\n numOfDigitsLeft--;\n }", "@Override\r\n\tpublic Expression simplify() {\n\t\tSystem.out.println(\"减法化简\");\r\n\t\tExpression newLeft = left.simplify();\r\n Expression newRight = right.simplify();\r\n ConstantExpression leftConst =null;\r\n ConstantExpression rightConst =null;\r\n NegateExpression rightNegate =null;\r\n try {\r\n \tleftConst =(ConstantExpression) newLeft;\r\n\t\t} catch (Exception e) {\t}\r\n\t\ttry {\r\n\t\t\trightConst =(ConstantExpression) newRight;\r\n\t\t} catch (Exception e) {\t}\r\n\t\ttry {\r\n\t\t\trightNegate =(NegateExpression) newRight;\r\n\t\t} catch (Exception e) {\t}\r\n\t\t\r\n\t\tif ( leftConst != null && rightConst != null )\r\n {\r\n // two constants; just evaluate it;\r\n return new ConstantExpression( leftConst.getValue()- rightConst.getValue());\r\n }\r\n else if ( leftConst != null && leftConst.getValue()== 0 )\r\n {\r\n // 0 - y; return -y;\r\n if ( rightNegate != null )\r\n {\r\n // y = -u (--u); return u;\r\n return rightNegate.child;\r\n }\r\n return new NegateExpression( newRight );\r\n }\r\n else if ( rightConst != null && rightConst.getValue()== 0 )\r\n {\r\n // x - 0; return x;\r\n return newLeft;\r\n }\r\n else if ( rightNegate != null )\r\n {\r\n // x - -y; return x + y;\r\n return new AddExpression( newLeft, rightNegate.child );\r\n }\r\n\t\tif(newLeft.toString().equals(newRight.toString())){\r\n\t\t\treturn new ConstantExpression(0);\r\n\t\t}\r\n // x - y; no simplification\r\n return new SubExpression( newLeft, newRight );\r\n\t}", "@Override\n public String getMoreMojor() {\n return moremajor;\n }", "static private String makeExpression(FieldFilter[] fieldFilters) {\n StringBuilder sb = new StringBuilder(200*fieldFilters.length);\n sb.append(fieldFilters[0].filterExpression());\n for (int i=1; i<fieldFilters.length; i++) {\n sb.append(\",\");\n sb.append(fieldFilters[i].filterExpression());\n }\n return sb.toString();\n }", "@Override\n\tpublic String visitExpr(ExprContext ctx) {\n\t\t\t\t\n\t\t\tif(ctx.getChildCount()==1)\n\t\t\t{\n\t\t\t\treturn visitSubexpr(ctx.subexpr());\n\t\t\t}\n\t\t\telse\n\t\t\t\t\n\t\t\t{\n\t\t\t\tString result = \"\";\n\t\t\t\t\n\t\t\t\t\tresult = \"temp\"+ count.count++;\n\t\t\t\tif(ctx.getChild(1).getText().equals(\"+\"))\n\t\t\t\t{\n\t\t\t\t\tsb.append(\"ADD \"+visit(ctx.children.get(0))+\" \"+visitSubexpr(ctx.subexpr())+\" \"+result+\"\\n\");\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tsb.append(\"SUB \"+visit(ctx.children.get(0))+\" \"+visitSubexpr(ctx.subexpr())+\" \"+ result+\"\\n\");\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t}\n\t\n\n\t\t\n\t}", "protected void indentMore() \r\n\t{\r\n\tindent += 3;\r\n\t}", "protected HL7DataTree more() {\n return null;\n }", "public final Expr exprMore() throws RecognitionException {\n\t\tExpr e = null;\n\n\n\t\tExpr ex =null;\n\n\t\ttry {\n\t\t\t// ul.g:285:26: ( ',' ex= expr )\n\t\t\t// ul.g:286:2: ',' ex= expr\n\t\t\t{\n\t\t\tmatch(input,35,FOLLOW_35_in_exprMore1189); if (state.failed) return e;\n\t\t\tpushFollow(FOLLOW_expr_in_exprMore1195);\n\t\t\tex=expr();\n\t\t\tstate._fsp--;\n\t\t\tif (state.failed) return e;\n\t\t\tif ( state.backtracking==0 ) {e = ex;}\n\t\t\t}\n\n\t\t}\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\trecover(input,re);\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn e;\n\t}", "public static Expression reduce(Expression expression) { throw Extensions.todo(); }", "@Override\n public Expression simplify() {\n Expression ex1Simp = getEx2().simplify(), ex2Simp = getEx2().simplify();\n\n try {\n if (ex2Simp.evaluate() == 1) {\n return ex1Simp.simplify();\n }\n } catch (Exception e) {\n\n }\n ;\n Boolean equality = false;\n try {\n if (ex1Simp.evaluate() == ex2Simp.evaluate()) {\n equality = true;\n } else {\n equality = false;\n }\n } catch (Exception e) {\n }\n\n List<String> vars = ex1Simp.getVariables();\n List<String> vars2 = ex2Simp.getVariables();\n\n if (vars.containsAll(vars2) && vars2.containsAll(vars)) {\n Map<String, Double> varsMap = new TreeMap<>();\n double i = 2;\n for (String s : vars) {\n varsMap.put(s, i);\n i += 1;\n }\n\n try {\n if (ex1Simp.evaluate(varsMap) == ex2Simp.evaluate(varsMap)) {\n equality = true;\n } else {\n equality = false;\n }\n } catch (Exception e) {\n }\n\n }\n\n\n if (equality) {\n return new Num(1);\n } else return new Log(getEx2().simplify(), getEx2().simplify());\n }", "public void doMore(){\n\t/**\n\t * ArithmeticExceptiont this exception occurs when an integer is \n\t * divided by zero.\n\t * \n\t * */\t\n\t\tint number=500/0;\n\t\t\n\t}", "String getLess();", "public int nrOfExpressions();", "public void enfoncerPlus() {\n\t\ttry {\n\t\t\tthis.op = new Plus();\n\t\t\tif (!raz) {\n\t\t\t\tthis.pile.push(valC);\n\t\t\t}\n\t\t\tint a = this.pile.pop(); int b = this.pile.pop();\n\t\t\tthis.valC = this.op.eval(b,a);\n\t\t\tthis.pile.push(this.valC);\n\t\t\tthis.raz = true;\n\t\t}\n\t\tcatch (EmptyStackException e) {\n\t\t\tSystem.out.println(\"Erreur de syntaxe : Saisir deux operandes avant de saisir un operateur\");\n\t\t}\n\t}", "private void make_extended() {\n Iterator it = this.getIncreased_grammar().getGrammar().iterator();\n C_Production tmp_pr;\n C_Symbol searcher_symbol; \n \n while(it.hasNext()) {\n tmp_pr = (C_Production)it.next();\n searcher_symbol = new C_Symbol(String.valueOf((char)176));\n tmp_pr.getRight().add(0, searcher_symbol);\n }\n }", "public node simplify() {\n node n = null;\n Object[] o = children().toArray();\n int l = o.length;\n if ( l == 1 )\n return (node) o[0];\n\n node orr = (node) o[0];\n node atmost1 = (node) o[0];\n\n for ( int i=1; i<l; i++ ) {\n orr = new or( orr, (node) o[i] );\n atmost1 = new atmostone( atmost1, (node) o[i] );\n }\n node result = (new and(orr, atmost1)).simplify();\n return result;\n }", "private Element generateExcerptEntryForFunctionalNode(Node functionalOpNode, Node lhsNode,\n\t\t\tXmlProcessor hqmfXmlProcessor, Node clonedNodeToAppendExcerpt) throws XPathExpressionException {\n\t\tElement excerptElement = hqmfXmlProcessor.getOriginalDoc().createElement(EXCERPT);\n\t\tString functionalOpName = functionalOpNode.getAttributes().getNamedItem(TYPE).getNodeValue();\n\t\tElement criteriaElement = null;\n\t\tif (FUNCTIONAL_OPS_NON_SUBSET.containsKey(functionalOpName)) {\n\t\t\tElement sequenceElement = hqmfXmlProcessor.getOriginalDoc().createElement(SEQUENCE_NUMBER);\n\t\t\tsequenceElement.setAttribute(VALUE, FUNCTIONAL_OPS_NON_SUBSET.get(functionalOpName.toUpperCase()));\n\t\t\texcerptElement.appendChild(sequenceElement);\n\t\t\tif (clonedNodeToAppendExcerpt != null) {\n\t\t\t\tif (clonedNodeToAppendExcerpt.getNodeName().contains(GROUPER)) {\n\t\t\t\t\tcriteriaElement = generateCriteriaElementForSetOpExcerpt(hqmfXmlProcessor,\n\t\t\t\t\t\t\tclonedNodeToAppendExcerpt);\n\t\t\t\t\texcerptElement.appendChild(criteriaElement);\n\t\t\t\t} else {\n\t\t\t\t\tNodeList entryChildNodes = clonedNodeToAppendExcerpt.getChildNodes();\n\t\t\t\t\tcriteriaElement = generateCriteriaElementForExcerpt(hqmfXmlProcessor, entryChildNodes);\n\t\t\t\t\texcerptElement.appendChild(criteriaElement);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (FUNCTIONAL_OPS_SUBSET.containsKey(functionalOpName)) {\n\t\t\tNamedNodeMap attributeMap = functionalOpNode.getAttributes();\n\t\t\tif (clonedNodeToAppendExcerpt.getNodeName().contains(GROUPER)) {\n\t\t\t\tcriteriaElement = generateCriteriaElementForSetOpExcerpt(hqmfXmlProcessor, clonedNodeToAppendExcerpt);\n\t\t\t\texcerptElement.appendChild(criteriaElement);\n\t\t\t} else {\n\t\t\t\tNodeList entryChildNodes = clonedNodeToAppendExcerpt.getChildNodes();\n\t\t\t\tcriteriaElement = generateCriteriaElementForExcerpt(hqmfXmlProcessor, entryChildNodes);\n\t\t\t\texcerptElement.appendChild(criteriaElement);\n\t\t\t}\n\t\t\tif (clonedNodeToAppendExcerpt != null) {\n\n\t\t\t\tif (\"count\".equalsIgnoreCase(functionalOpName)) {\n\n\t\t\t\t\tcreateRepeatNumberTagForCountFuncttion(hqmfXmlProcessor, attributeMap, criteriaElement);\n\t\t\t\t\tElement qdmSubSetElement = hqmfXmlProcessor.getOriginalDoc().createElement(\"qdm:subsetCode\");\n\t\t\t\t\tqdmSubSetElement.setAttribute(CODE, FUNCTIONAL_OPS_SUBSET.get(functionalOpName.toUpperCase()));\n\t\t\t\t\tElement subSetCodeElement = hqmfXmlProcessor.getOriginalDoc().createElement(\"subsetCode\");\n\t\t\t\t\tsubSetCodeElement.setAttribute(CODE, \"SUM\");\n\n\t\t\t\t\texcerptElement.appendChild(subSetCodeElement);\n\t\t\t\t\texcerptElement.appendChild(qdmSubSetElement);\n\t\t\t\t\texcerptElement.appendChild(criteriaElement);\n\t\t\t\t} else {\n\t\t\t\t\tif (attributeMap.getNamedItem(OPERATOR_TYPE) != null && lhsNode != null) {\n\t\t\t\t\t\tString lhsNodeType = lhsNode.getNodeName();\n\t\t\t\t\t\tif (ELEMENT_REF.equalsIgnoreCase(lhsNodeType)) {\n\t\t\t\t\t\t\tString qdmUUID = lhsNode.getAttributes().getNamedItem(ID).getNodeValue();\n\t\t\t\t\t\t\tString xPath = \"/measure/elementLookUp/qdm[@uuid ='\" + qdmUUID + \"']\";\n\t\t\t\t\t\t\tNode node = measureExport.getSimpleXMLProcessor()\n\t\t\t\t\t\t\t\t\t.findNode(measureExport.getSimpleXMLProcessor().getOriginalDoc(), xPath);\n\t\t\t\t\t\t\tif (node != null && lhsNode.hasChildNodes()) {\n\t\t\t\t\t\t\t\tNode qdmNode = node.cloneNode(true);\n\t\t\t\t\t\t\t\tNode attributeNode = lhsNode.getFirstChild().cloneNode(true);\n\t\t\t\t\t\t\t\tattributeNode.setUserData(ATTRIBUTE_NAME,\n\t\t\t\t\t\t\t\t\t\tattributeNode.getAttributes().getNamedItem(NAME).getNodeValue(), null);\n\t\t\t\t\t\t\t\tattributeNode.setUserData(ATTRIBUTE_MODE,\n\t\t\t\t\t\t\t\t\t\tattributeMap.getNamedItem(OPERATOR_TYPE).getNodeValue(), null);\n\t\t\t\t\t\t\t\tattributeNode.setUserData(ATTRIBUTE_UUID,\n\t\t\t\t\t\t\t\t\t\tattributeNode.getAttributes().getNamedItem(ATTR_UUID).getNodeValue(), null);\n\t\t\t\t\t\t\t\tElement attributeElement = (Element) attributeNode;\n\n\t\t\t\t\t\t\t\tattributeElement.setAttribute(MODE,\n\t\t\t\t\t\t\t\t\t\tattributeMap.getNamedItem(OPERATOR_TYPE).getNodeValue());\n\t\t\t\t\t\t\t\tif (attributeElement.getAttributes().getNamedItem(ATTR_DATE) != null) {\n\t\t\t\t\t\t\t\t\tattributeNode.setUserData(ATTRIBUTE_DATE,\n\t\t\t\t\t\t\t\t\t\t\tattributeMap.getNamedItem(QUANTITY).getNodeValue(), null);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tattributeElement.setAttribute(COMPARISON_VALUE,\n\t\t\t\t\t\t\t\t\t\t\tattributeMap.getNamedItem(QUANTITY).getNodeValue());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (attributeMap.getNamedItem(UNIT) != null) {\n\t\t\t\t\t\t\t\t\tattributeElement.setAttribute(UNIT, attributeMap.getNamedItem(UNIT).getNodeValue());\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tif (attributeElement.getAttributes().getNamedItem(UNIT) != null) {\n\t\t\t\t\t\t\t\t\t\tattributeElement.removeAttribute(UNIT);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tattributeNode = attributeElement;\n\n\t\t\t\t\t\t\t\t// HQMFDataCriteriaElementGenerator hqmfDataCriteriaElementGenerator = new\n\t\t\t\t\t\t\t\t// HQMFDataCriteriaElementGenerator();\n\t\t\t\t\t\t\t\t// hqmfDataCriteriaElementGenerator.generateAttributeTagForFunctionalOp(measureExport,qdmNode,\n\t\t\t\t\t\t\t\t// criteriaElement, attributeNode);\n\t\t\t\t\t\t\t\tHQMFAttributeGenerator attributeGenerator = new HQMFAttributeGenerator();\n\t\t\t\t\t\t\t\tattributeGenerator.generateAttributeTagForFunctionalOp(measureExport, qdmNode,\n\t\t\t\t\t\t\t\t\t\tcriteriaElement, attributeNode);\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\tElement qdmSubSetElement = hqmfXmlProcessor.getOriginalDoc().createElement(\"qdm:subsetCode\");\n\t\t\t\t\tqdmSubSetElement.setAttribute(CODE, FUNCTIONAL_OPS_SUBSET.get(functionalOpName.toUpperCase()));\n\n\t\t\t\t\tif (\"sum\".equalsIgnoreCase(functionalOpName)) {\n\t\t\t\t\t\tElement subSetCodeElement = hqmfXmlProcessor.getOriginalDoc().createElement(\"subsetCode\");\n\t\t\t\t\t\tsubSetCodeElement.setAttribute(CODE, \"SUM\");\n\t\t\t\t\t\texcerptElement.appendChild(subSetCodeElement);\n\t\t\t\t\t}\n\t\t\t\t\texcerptElement.appendChild(qdmSubSetElement);\n\t\t\t\t\texcerptElement.appendChild(criteriaElement);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn excerptElement;\n\t}", "@Override\n public String toString() {\n Helpers f = new Helpers();\n Expression left = super.getLeft();\n Expression right = super.getRight();\n\n if (super.isBonus()) {\n // x * y -> xy\n if (left instanceof Var && right instanceof Var) {\n return \"(\" + left.toString() + \"\" + right.toString() + \")\";\n }\n // 4 * x -> 4x\n if (right instanceof Var) {\n return \"(\" + left.toString() + \"\" + right.toString() + \")\";\n }\n // x * 4 -> 4x\n if (left instanceof Var) {\n return \"(\" + right.toString() + \"\" + left.toString() + \")\";\n }\n // 4 * (x^2) -> 4(x^2)\n if (right instanceof Pow) {\n return \"(\" + left.toString() + \"\" + right.toString() + \")\";\n }\n // 4 * (xy) -> 4xy\n if (right instanceof Mult) {\n if (((Mult) right).getLeft() instanceof Var && ((Mult) right).getRight() instanceof Var) {\n return \"(\" + left.toString() + \"\" + f.removeOuterParentheses(right.toString()) + \")\";\n }\n }\n }\n return \"(\" + left.toString() + \" * \" + right.toString() + \")\";\n }", "@Override\n public Expression simplify() {\n try {\n return new Num(this.evaluate());\n } catch (Exception e) {\n if (getExpression1().simplify().toString().equals(getExpression2().simplify().toString())) {\n return new Num(0);\n }\n if (getExpression1().simplify().toString().equals(\"0.0\")) {\n return new Neg(getExpression2().simplify());\n }\n if (getExpression2().simplify().toString().equals(\"0.0\")) {\n return getExpression1().simplify();\n }\n return new Minus(getExpression1().simplify(), getExpression2().simplify());\n }\n }", "public Expression simplify() {\n Expression exp = this.getExp().simplify();\n if (exp.getVariables().isEmpty()) {\n try {\n Num n = new Num(this.evaluate());\n return n;\n } catch (Exception e) {\n int checkStyleFix = 0;\n }\n }\n Cos s = new Cos(exp);\n return s;\n }", "private Expr mult(Expr x) throws Err {\n if (x instanceof ExprUnary) {\n ExprUnary y=(ExprUnary)x;\n if (y.op==ExprUnary.Op.SOME) return ExprUnary.Op.SOMEOF.make(y.pos, y.sub);\n if (y.op==ExprUnary.Op.LONE) return ExprUnary.Op.LONEOF.make(y.pos, y.sub);\n if (y.op==ExprUnary.Op.ONE) return ExprUnary.Op.ONEOF.make(y.pos, y.sub);\n }\n return x;\n }", "public String toString() {\n return \"(\" + getExpLeft().toString() + \" * \" + getExpRight().toString() + \")\";\n }", "public static Expression reduceAndCheck(Expression expression) { throw Extensions.todo(); }", "private void genArgRepMutantGen(MethodCallExpr me,Expression ex,int pos){\n\n MethodCallExpr mutantMulti = me.clone();\n BinaryExpr binaryExpr2 = new BinaryExpr(ex,ex, BinaryExpr.Operator.MULTIPLY);\n mutantMulti.setArgument(pos,binaryExpr2);\n outputToFile(me,mutantMulti);\n }", "Expression getExp();", "private void jetNewArrayExpr(){\n\t\t//put the length of array into exprStr\n\t\tNewArrayExpr newArrayExpr = (NewArrayExpr) rExpr;\n\t\tValue sizeValue = newArrayExpr.getSize();\n\t\tif(sizeValue instanceof Constant){\n\t\t\tthis.exprStr = sizeValue.toString();\n\t\t}else{\n\t\t\tthis.exprStr = fileGenerator.getRenameOf(sizeValue, false, this.stmtIdx);\n\t\t}\n\t}", "@Override\n\tpublic String visitSubexpr(SubexprContext ctx) {\n\t\t\n\t\tif(ctx.getChildCount()==1)\n\t\t{\n\t\t\treturn visitValue(ctx.value())\t;\t}\n\t\telse\n\t\t{\n\t\t\tString result = \"\";\n\t\t\tresult = \"temp\"+count.count++;\n\t\t\tif(ctx.getChild(1).getText().equals(\"*\"))\n\t\t\t{\n\t\t\t\n\t\t\t\n\t\t\tsb.append(\"MUL \"+visit(ctx.children.get(0))+\" \"+visitValue(ctx.value())+\" \"+ result+\"\\n\");\n\t\t\treturn result;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tsb.append(\"DIV \"+visit(ctx.children.get(0))+ \" \"+visitValue(ctx.value())+\" \"+result+\"\\n\");\n\t\t\t\treturn \tresult;\n\t\t\t}\n\t\t}\n\t\n\t}", "boolean isMore();", "public String getMoreInfo() {\n\t\treturn moreInfo;\n\t}", "public String getMoreInfo() {\n\t\treturn moreInfo;\n\t}", "private Double inspectExpression(String ex) {\n Double cyclomatic = 0.0;\n if (ex != null) {\n char[] chars = ex.toCharArray();\n for (int i = 0; i < chars.length - 1; i++) {\n char next = chars[i];\n if ((next == '&' || next == '|') && (next == chars[i + 1])) {\n cyclomatic++;\n }\n }\n }\n return cyclomatic;\n }", "@Override\n\tpublic void visit(ExtractExpression arg0) {\n\t\t\n\t}", "public void indentLess() {\n\t\tindentLevel -= indentStep;\n\t}", "@Override\n\tpublic void visit(LessNode node) {\n\t\tif (Evaluator.checkScope(node) == false) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (Evaluator.checkAssert(node) == false) {\n\t\t\treturn;\n\t\t}\n\t\t/**\n\t\t * evaluam expresiile din cei 2 fii\n\t\t */\n\t\tEvaluator.evaluate(node.getChild(0));\n\t\tEvaluator.evaluate(node.getChild(1));\n\n\t\tInteger s2 = 0;\n\t\tInteger s1 = 0;\n\t\t/**\n\t\t * preluam rezultatele evaluarii si verificam daca primul este mai mic\n\t\t * decat la doilea ,setand corespunzator valoarea din nodul curent in\n\t\t * functie de rezultatul comparatiei\n\t\t */\n\t\tif (node.getChild(0) instanceof Variable) {\n\t\t\ts1 = Integer.parseInt(Evaluator.variables.get(node.getChild(0).getName()));\n\t\t} else {\n\t\t\ts1 = Integer.parseInt(node.getChild(0).getName());\n\t\t}\n\t\tif (node.getChild(1) instanceof Variable) {\n\t\t\ts2 = Integer.parseInt(Evaluator.variables.get(node.getChild(1).getName()));\n\t\t} else {\n\t\t\ts2 = Integer.parseInt(node.getChild(1).getName());\n\t\t}\n\n\t\tif (s1 < s2) {\n\t\t\tnode.setName(\"true\");\n\t\t} else {\n\t\t\tnode.setName(\"false\");\n\t\t}\n\t}", "private boolean writeAdditiveExpOrMultplicativeExp(BinaryIntExp exp) throws CodeGeneratorException {\n Exp left = exp.getLeft();\n Exp right = exp.getRight();\n boolean isStringAppend = false;\n if(left instanceof IntExp) {\n writeIntLiteral(((IntExp) left).getValue());\n } else if(left instanceof VariableExp) {\n final VariableEntry entry = getEntryFor((VariableExp) left);\n if(entry.type == BasicType.TYPE_INT) {\n entry.load(this, methodVisitor);\n } else if(entry.type == BasicType.TYPE_STRING) {\n isStringAppend = true;\n methodVisitor.visitTypeInsn(NEW, \"java/lang/StringBuilder\");\n methodVisitor.visitInsn(DUP);\n methodVisitor.visitMethodInsn(INVOKESPECIAL, \"java/lang/StringBuilder\", \"<init>\", \"()V\", false);\n entry.load(this, methodVisitor);\n methodVisitor.visitMethodInsn(INVOKEVIRTUAL, \"java/lang/StringBuilder\", \"append\", \"(Ljava/lang/String;)Ljava/lang/StringBuilder;\", false);\n }\n else {\n assert (false);\n throw new CodeGeneratorException(\"Variable in AdditiveExp should be TYPE_INT.\");\n }\n } else if(left instanceof StringExp) {\n isStringAppend = true;\n methodVisitor.visitTypeInsn(NEW, \"java/lang/StringBuilder\");\n methodVisitor.visitInsn(DUP);\n methodVisitor.visitMethodInsn(INVOKESPECIAL, \"java/lang/StringBuilder\", \"<init>\", \"()V\", false);\n writeStringExp((StringExp) left);\n methodVisitor.visitMethodInsn(INVOKEVIRTUAL, \"java/lang/StringBuilder\", \"append\", \"(Ljava/lang/String;)Ljava/lang/StringBuilder;\", false);\n } else if(left instanceof BinaryIntExp) {\n isStringAppend = writeAdditiveExpOrMultplicativeExp((BinaryIntExp)left);\n } else if(left instanceof SelfOperationExp) {\n writeSelfOperationExp((SelfOperationExp) left, true);\n } else if(left instanceof ArrayWithIndexExp) {\n final VariableEntry entry = getEntryFor((ArrayWithIndexExp) left);\n BasicType basicType = ((TypeArray) entry.type).getBasicType();\n if(basicType == BasicType.TYPE_STRING) {\n isStringAppend = true;\n methodVisitor.visitTypeInsn(NEW, \"java/lang/StringBuilder\");\n methodVisitor.visitInsn(DUP);\n methodVisitor.visitMethodInsn(INVOKESPECIAL, \"java/lang/StringBuilder\", \"<init>\", \"()V\", false);\n entry.load(this, methodVisitor);\n methodVisitor.visitMethodInsn(INVOKEVIRTUAL, \"java/lang/StringBuilder\", \"append\", \"(Ljava/lang/String;)Ljava/lang/StringBuilder;\", false);\n } else {\n entry.load(this, methodVisitor);\n }\n } else {\n assert (false);\n throw new CodeGeneratorException(\"IllTypedException should be handled in typechecker.\");\n }\n\n // Do it again to load right Exp on stack\n if(right instanceof IntExp) {\n if(isStringAppend) {\n writeIntLiteral(((IntExp) right).getValue());\n methodVisitor.visitMethodInsn(INVOKEVIRTUAL, \"java/lang/StringBuilder\", \"append\", \"(I)Ljava/lang/StringBuilder;\", false);\n } else {\n writeIntLiteral(((IntExp) right).getValue());\n }\n } else if(right instanceof VariableExp) {\n final VariableEntry entry = getEntryFor((VariableExp) right);\n if(entry.type == BasicType.TYPE_INT) {\n if(isStringAppend) {\n entry.load(this, methodVisitor);\n methodVisitor.visitMethodInsn(INVOKEVIRTUAL, \"java/lang/StringBuilder\", \"append\", \"(I)Ljava/lang/StringBuilder;\", false);\n } else {\n entry.load(this, methodVisitor);\n }\n } else if(entry.type == BasicType.TYPE_STRING) {\n if(!isStringAppend) {\n throw new CodeGeneratorException(\"String Concatenation left value must be a string\");\n } else {\n entry.load(this, methodVisitor);\n methodVisitor.visitMethodInsn(INVOKEVIRTUAL, \"java/lang/StringBuilder\", \"append\", \"(Ljava/lang/String;)Ljava/lang/StringBuilder;\", false);\n }\n } else if(entry.type == BasicType.TYPE_BOOLEAN) {\n if(isStringAppend) {\n entry.load(this, methodVisitor);\n methodVisitor.visitMethodInsn(INVOKEVIRTUAL, \"java/lang/StringBuilder\", \"append\", \"(Z)Ljava/lang/StringBuilder;\", false);\n } else {\n throw new CodeGeneratorException(\"Variable in AdditiveExp should be TYPE_INT or TYPE_STRING.\");\n }\n }\n else {\n assert (false);\n throw new CodeGeneratorException(\"Variable in AdditiveExp should be TYPE_INT or TYPE_STRING.\");\n }\n } else if(right instanceof BinaryIntExp) {\n writeAdditiveExpOrMultplicativeExp((BinaryIntExp)right);\n } else if(right instanceof SelfOperationExp) {\n if(isStringAppend) {\n writeSelfOperationExp((SelfOperationExp) right, true);\n methodVisitor.visitMethodInsn(INVOKEVIRTUAL, \"java/lang/StringBuilder\", \"append\", \"(I)Ljava/lang/StringBuilder;\", false);\n } else {\n writeSelfOperationExp((SelfOperationExp) right, true);\n }\n } else if(right instanceof BooleanExp) {\n if(isStringAppend) {\n writeIntLiteral(((BooleanExp) right).getValue() ? 1 : 0);\n methodVisitor.visitMethodInsn(INVOKEVIRTUAL, \"java/lang/StringBuilder\", \"append\", \"(Z)Ljava/lang/StringBuilder;\", false);\n } else {\n throw new CodeGeneratorException(\"Variable in AdditiveExp should be TYPE_INT or TYPE_STRING.\");\n }\n }\n else if(right instanceof ArrayWithIndexExp) {\n final VariableEntry entry = getEntryFor((ArrayWithIndexExp) right);\n if(isStringAppend) {\n BasicType basicType = ((TypeArray) entry.type).getBasicType();\n entry.load(this, methodVisitor);\n switch (basicType) {\n case TYPE_INT:\n methodVisitor.visitMethodInsn(INVOKEVIRTUAL, \"java/lang/StringBuilder\", \"append\", \"(I)Ljava/lang/StringBuilder;\", false);\n break;\n case TYPE_STRING:\n methodVisitor.visitMethodInsn(INVOKEVIRTUAL, \"java/lang/StringBuilder\", \"append\", \"(Ljava/lang/String;)Ljava/lang/StringBuilder;\", false);\n break;\n case TYPE_BOOLEAN:\n methodVisitor.visitMethodInsn(INVOKEVIRTUAL, \"java/lang/StringBuilder\", \"append\", \"(Z)Ljava/lang/StringBuilder;\", false);\n break;\n case TYPE_ANY:\n methodVisitor.visitMethodInsn(INVOKEVIRTUAL, \"java/lang/StringBuilder\", \"append\", \"(Ljava/lang/Object;)Ljava/lang/StringBuilder;\", false);\n break;\n case TYPE_UNIT:\n throw new CodeGeneratorException(\"Void type should only return from function declaration\");\n }\n } else {\n entry.load(this, methodVisitor);\n }\n } else if(right instanceof StringExp) {\n if(isStringAppend) {\n writeStringExp((StringExp) right);\n methodVisitor.visitMethodInsn(INVOKEVIRTUAL, \"java/lang/StringBuilder\", \"append\", \"(Ljava/lang/String;)Ljava/lang/StringBuilder;\", false);\n } else {\n throw new CodeGeneratorException(\"String can be only in string + string operation.\");\n }\n }\n else {\n assert (false);\n throw new CodeGeneratorException(\"IllTypedException should be handled in typechecker.\");\n }\n\n if(exp instanceof AdditiveExp) {\n AdditiveOp op = ((AdditiveExp) exp).getOp();\n if(op == AdditiveOp.EXP_PLUS) {\n if(!isStringAppend) {\n methodVisitor.visitInsn(IADD);\n }\n } else {\n if(isStringAppend) {\n throw new CodeGeneratorException(\"String concatenation is only allow in +\");\n }\n methodVisitor.visitInsn(ISUB);\n }\n } else if(exp instanceof MultiplicativeExp) {\n if(isStringAppend) {\n throw new CodeGeneratorException(\"String concatenation is only allow in +\");\n }\n MultiplicativeOp op = ((MultiplicativeExp) exp).getOp();\n if(op == MultiplicativeOp.OP_MULTIPLY) {\n methodVisitor.visitInsn(IMUL);\n } else if(op == MultiplicativeOp.OP_DIVIDE) {\n methodVisitor.visitInsn(IDIV);\n } else if(op == MultiplicativeOp.OP_MOD) {\n methodVisitor.visitInsn(IREM);\n }\n }\n return isStringAppend;\n }", "public ExprTail expr_tail() {\n ExprTail et = null;\n if (lexer.token == Symbol.PLUS || lexer.token == Symbol.MINUS) {\n et = new ExprTail();\n et.setAddop(lexer.getStringValue().toCharArray()[0]);\n lexer.nextToken();\n if (factor(et)) {\n et.setExprTail(expr_tail());\n } else {\n error.signal(\"Factor expected after operation symbol\");\n }\n }\n return et;\n }", "public void updateExp(int amount) {\n exp += amount;\n // todo: change the threshold function to reflect a cross and not an equality.\n if (exp % EXP_THRESHOLD == 0)\n level++;\n }", "private StringBuilder getOperand() {\r\n\t\tif (\"\".equals(operator)) {\r\n\t\t\treturn firstNumber;\r\n\t\t} else {\r\n\t\t\treturn secondNumber;\r\n\t\t}\r\n\t}", "private TreatExpression() {\r\n }", "public long More() {\n return OCCwrapJavaJNI.Interface_EntityIterator_More(swigCPtr, this);\n }", "@Override\n public void outPlusExp(PlusExp node)\n {\n Type lexpType = this.mCurrentST.getExpType(node.getLExp());\n Type rexpType = this.mCurrentST.getExpType(node.getRExp());\n mPrintWriter.println(\"#Addddddddddddding\");\n Label l1 = new Label();\n Label l0 = new Label();\n Label l2 = new Label();\n Label l3 = new Label();\n //# Load constant int 1\n if(lexpType == Type.BYTE && rexpType == Type.INT){\n /*mPrintWriter.println(\"ldi r24,lo8(\"+node.getLExp().value+\")\");\n mPrintWriter.println(\"ldi r25,hi8(\"+node.getLExp().value+\")\");\n //# push two byte expression onto stack\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n //# Load constant int 0\n mPrintWriter.println(\"ldi r24,lo8(\"+node.getRExp().value+\")\");\n mPrintWriter.println(\"ldi r25,hi8(\"+node.getRExp().value+\")\");\n //# push two byte expression onto stack\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n //# Casting int to byte by popping\n //# 2 bytes off stack and only pushing low order bits\n //# back on. Low order bits are on top of stack.\n mPrintWriter.println(\"pop r24\");\n mPrintWriter.println(\"pop r25\");\n mPrintWriter.println(\"push r24\");*/\n //# load a one byte expression off stack\n mPrintWriter.println(\"pop r18\");\n mPrintWriter.println(\"pop r19\");\n //mPrintWriter.println(# load a one byte expression off stack\n mPrintWriter.println(\"pop r24\");\n //mPrintWriter.println(# promoting a byte to an int\n mPrintWriter.println(\"tst r24\");\n mPrintWriter.println(\"brlt \" + l0);\n mPrintWriter.println(\"ldi r25, 0\");\n mPrintWriter.println(\"jmp \" + l1);\n mPrintWriter.println(l0 + \":\");\n mPrintWriter.println(\"ldi r25, hi8(-1)\");\n mPrintWriter.println( l1 + \":\");\n\n // mPrintWriter.println(# Do add operation\n mPrintWriter.println(\"add r24, r18\");\n mPrintWriter.println(\"adc r25, r19\");\n //mPrintWriter.println(# push two byte expression onto stack\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n }\n else if(lexpType == Type.BYTE && rexpType == Type.BYTE){\n /*mPrintWriter.println(\"ldi r24,lo8(\"+node.getLExp().value+\")\");\n mPrintWriter.println(\"ldi r25,hi8(\"+node.getLExp().value+\")\");\n //# push two byte expression onto stack\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n //# Casting int to byte by popping\n //# 2 bytes off stack and only pushing low order bits\n //# back on. Low order bits are on top of stack.\n mPrintWriter.println(\"pop r24\");\n mPrintWriter.println(\"pop r25\");\n mPrintWriter.println(\"push r24\");\n mPrintWriter.println(\"ldi r24,lo8(\"+node.getRExp().value+\")\");\n mPrintWriter.println(\"ldi r25,hi8(\"+node.getRExp().value+\")\");\n //# push two byte expression onto stack\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n //# Casting int to byte by popping\n //# 2 bytes off stack and only pushing low order bits\n //# back on. Low order bits are on top of stack.\n mPrintWriter.println(\"pop r24\");\n mPrintWriter.println(\"pop r25\");\n mPrintWriter.println(\"push r24\");*/\n //# load a one byte expression off stack\n mPrintWriter.println(\"pop r18\");\n //# load a one byte expression off stack\n mPrintWriter.println(\"pop r24\");\n //# promoting a byte to an int\n mPrintWriter.println(\"tst r24\");\n mPrintWriter.println(\"brlt \" + l0);\n mPrintWriter.println(\"ldi r25, 0\");\n mPrintWriter.println(\"jmp \" + l1);\n mPrintWriter.println(l0 + \":\");\n mPrintWriter.println(\"ldi r25, hi8(-1)\");\n mPrintWriter.println( l1 + \":\");\n //# promoting a byte to an int\n mPrintWriter.println(\"tst r18\");\n mPrintWriter.println(\"brlt \" + l2);\n mPrintWriter.println(\"ldi r19, 0\");\n mPrintWriter.println(\"jmp \" + l3);\n mPrintWriter.println(l2 + \":\");\n mPrintWriter.println(\"ldi r19, hi8(-1)\");\n mPrintWriter.println(l3 + \":\");\n\n //mPrintWriter.println(# Do add operation\n mPrintWriter.println(\"add r24, r18\");\n mPrintWriter.println(\"adc r25, r19\");\n //mPrintWriter.println(# push two byte expression onto stack\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n }\n else if(lexpType == Type.INT && rexpType == Type.BYTE){\n /*mPrintWriter.println(\"ldi r24,lo8(\"+node.getLExp().value+\")\");\n mPrintWriter.println(\"ldi r25,hi8(\"+node.getLExp().value+\")\");\n //mPrintWriter.println(# push two byte expression onto stack);\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n //mPrintWriter.println(# Casting int to byte by popping);\n //mPrintWriter.println(# 2 bytes off stack and only pushing low order bits);\n //mPrintWriter.println(# back on. Low order bits are on top of stack.);\n mPrintWriter.println(\"pop r24\");\n mPrintWriter.println(\"pop r25\");\n mPrintWriter.println(\"push r24\");\n //mPrintWriter.println(# Load constant int 0);\n mPrintWriter.println(\"ldi r24,lo8(\"+node.getRExp().value+\")\");\n mPrintWriter.println(\"ldi r25,hi8(\"+node.getRExp().value+\")\");\n //# push two byte expression onto stack);\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");*/\n //# load a two byte expression off stack);\n mPrintWriter.println(\"pop r18\");\n //mPrintWriter.println(\"pop r19\");\n //# load a one byte expression off stack\n mPrintWriter.println(\"pop r24\");\n mPrintWriter.println(\"pop r25\");\n //# promoting a byte to an int\n mPrintWriter.println(\"tst r18\");\n mPrintWriter.println(\"brlt\" + l0);\n mPrintWriter.println(\"ldi r19, 0\");\n mPrintWriter.println(\"jmp \" + l1);\n mPrintWriter.println(l0 + \":\");\n mPrintWriter.println(\"ldi r19, hi8(-1)\");\n mPrintWriter.println(l1 + \":\");\n\n //mPrintWriter.println(# Do add operation\n mPrintWriter.println(\"add r24, r18\");\n mPrintWriter.println(\"adc r25, r19\");\n //mPrintWriter.println(# push two byte expression onto stack\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n }\n else{\n mPrintWriter.println(\"pop r18\");\n mPrintWriter.println(\"pop r19\");\n //# load a one byte expression off stack\n mPrintWriter.println(\"pop r24\");\n mPrintWriter.println(\"pop r25\");\n\n mPrintWriter.println(\"add r24, r18\");\n mPrintWriter.println(\"adc r25, r19\");\n //mPrintWriter.println(# push two byte expression onto stack\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n }\n }", "@Override\n\tpublic Teatask selectByMore(Teatask ta)\n\t{\n\t\treturn teataskMapper.selectByMore(ta);\n\t}", "public Expression concat(Expression expr) {\r\n\t\telements.addAll(expr.elements);\r\n\t\treturn this;\r\n\t}", "private void setupMoreActionButton() {\n moreButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n InterfaceAction.startMoreActionButtonAnimation(moreButton);\n\n boolean isCurrentUserThePostCreator = Helper.isPrismUserCurrentUser(prismPost.getPrismUser());\n AlertDialog morePrismPostAlertDialog = InterfaceAction.createMorePrismPostAlertDialog(context, prismPost, isCurrentUserThePostCreator);\n morePrismPostAlertDialog.show();\n }\n });\n }", "public void showMore() throws Exception {\n\t\tif(getControl(\"showMore\").queryVisible()) {\n\t\t\tgetControl(\"showMore\").click();\n\t\t}\n\t}", "@Override\r\n\tpublic boolean manipulate() {\n\t\tStatement statement = mp.getStatement();\r\n\t\tStatement ingredStatementCopy = (Statement) ASTNode.copySubtree(statement.getAST(), ingredStatement);\r\n\t\trewriter.replace(statement, ingredStatementCopy, null);\r\n\t\treturn true;\r\n\t}", "@Test\n public void testQueryMore4() throws Exception {\n testQueryMore(true, false);\n }", "public Object deliverMoreNodes (boolean parsemore)\n {\n if(!parsemore)\n {\n fParseInProgress=false;\n return Boolean.FALSE;\n }\n\n Object arg;\n try {\n boolean keepgoing = parseSome();\n arg = keepgoing ? Boolean.TRUE : Boolean.FALSE;\n } catch (SAXException ex) {\n arg = ex;\n } catch (IOException ex) {\n arg = ex;\n } catch (Exception ex) {\n arg = new SAXException(ex);\n }\n return arg;\n }", "protected Expr simplifyOnce(final Set<FSimplifierOptions> opts) {\r\n\t\treturn this;\r\n\t}", "public static WebElement lnk_clickShowMore() throws Exception{\r\n \ttry{\r\n \t\telement = driver.findElement(By.xpath(\"//*[@id='filter_rank']/li[7]\"));\r\n \t\tAdd_Log.info(\"User is click on Supplier Ranking 'Show More' link.\");\r\n \t\t\r\n \t}catch(Exception e){\r\n \t\tAdd_Log.error(\"Supplier Ranking 'Show More' link is NOT found on the page.\");\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }", "protected void extraExplosions_EM() {\n }", "@Test\n\t\tpublic void applyRecusivelyHyp() {\n\t\t\tassertSuccess(\" ;H; ;S; s⊆ℤ ;; r∈s ↔ s |- ⊥\",\n\t\t\t\t\trm(\"\", ri(\"\", ri(\"\", rm(\"2.1\", empty)))));\n\t\t}", "private static String fixKleene(String reg) {\n int ind, beg, len;\n String expr;\n\n do {\n ind = reg.indexOf('*');\n if (ind != -1 && reg.charAt(ind - 1) == QUOTE)\n ind = 0;\n } while(ind == 0);\n\n while (ind >= 1) {\n char character = reg.charAt(ind - 1);\n if (character == ')') {\n beg = reg.substring(0, ind).lastIndexOf(\"(\");\n expr = reg.substring(beg + 1, ind - 1);\n len = expr.length();\n if (expr.contains(\"|\")) {\n if (ind + len + 2 < reg.length()\n && reg.substring(ind + 1, ind + 1 + len + 2).equals(\"(\" + expr + \")\")) {\n replace(reg, ind, '+');\n removeChars(reg, ind + 1, len + 2);\n }\n if (ind - (2 + len) * 2 >= 0\n && reg.substring(ind - (2 + len) * 2, ind - 2 - len).equals(\n \"(\" + expr + \")\")) {\n replace(reg, ind, '+');\n removeChars(reg, ind - (2 + len) * 2, len + 2);\n }\n } else {\n if (ind + len < reg.length()\n && reg.substring(ind + 1, ind + 1 + len).equals(expr)) {\n replace(reg, ind, '+');\n removeChars(reg, ind + 1, len);\n }\n if (ind - 2 - len * 2 >= 0\n && reg.substring(ind - 2 - len * 2, ind - 2 - len).equals(expr)) {\n replace(reg, ind, '+');\n removeChars(reg, ind - 2 - len * 2, len);\n }\n }\n } else if (reg.charAt(ind - 1) == QUOTE) {\n if (ind + 2 < reg.length() && reg.charAt(ind + 2) == character\n && reg.charAt(ind + 1) == QUOTE) {\n reg = replace(reg, ind, '+');\n reg = removeChars(reg, ind + 1, 2);\n }\n if (ind - 2 * 2 >= 0 && reg.charAt(ind - 2 - 1) == character\n && reg.charAt(ind - 2 * 2) == QUOTE) {\n reg = replace(reg, ind, '+');\n reg = removeChars(reg, ind - 2, 2);\n }\n } else {\n if (ind + 1 < reg.length() && reg.charAt(ind + 1) == character) {\n reg = replace(reg, ind, '+');\n reg = removeChars(reg, ind + 1, 1);\n }\n if (ind - 2 >= 0 && reg.charAt(ind - 2) == character) {\n reg = replace(reg, ind, '+');\n reg = removeChars(reg, ind - 2, 1);\n }\n }\n ind = reg.indexOf('*', ind + 1);\n }\n return reg;\n }", "private void jetBinopExprStr(){\n\t\tBinopExpr binopExpr = (BinopExpr) rExpr;\n\t\tValue op1 = binopExpr.getOp1();\n\t\tValue op2 = binopExpr.getOp2();\n\t\tZ3Type op1Z3Type = Z3MiscFunctions.v().z3Type(op1.getType());\n\t\tZ3Type op2Z3Type = Z3MiscFunctions.v().z3Type(op2.getType());\n\t\tStringBuilder sb = new StringBuilder();\n\t\t\n\t\tBinopExprType binopType = Z3MiscFunctions.v().getBinopExprType(binopExpr);\n\t\tswitch(binopType){\n\t\t//[start]ADD\n\t\tcase ADD:\n\t\t\t//add_expr = immediate \"+\" immediate;\n\t\t\t//immediate = constant | local;\n\t\t\t//only Int, Real, String can ADD\n\t\t\t//Exceptional Cases: \"084\" + 42; we exclude them\n\t\t\tassert((op1Z3Type == Z3Type.Z3String && op2Z3Type == Z3Type.Z3String) ||\n\t\t\t\t\t(op1Z3Type != Z3Type.Z3String && op2Z3Type != Z3Type.Z3String));\n\t\t\tif(op1Z3Type == Z3Type.Z3String ){\n\t\t\t\t//( Concat \"te\" y1 )\n\t\t\t\tsb.append(\"( Concat \");\n\t\t\t}else{\n\t\t\t\t//(+ 2 i2)\n\t\t\t\tsb.append(\"(+ \");\n\t\t\t}\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\" )\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end]ADD\n\t\tcase AND:\n\t\t\t//and_expr = immediate \"&\" immediate;\n\t\t\t//TODO\n\t\t\t//assert(false) : \"AND Expr\";\n\t\t\tbreak;\n\t\t//[start] DIV\n\t\tcase DIV:\n\t\t\t//div_expr = immediate \"/\" immediate;\n\t\t\t//(div a b) integer division\n\t\t\t//(/ a b) float division\n\t\t\tif(op1Z3Type == Z3Type.Z3Real || op2Z3Type == Z3Type.Z3Real){\n\t\t\t\tsb.append(\"(/ \");\n\t\t\t}else{\n\t\t\t\tsb.append(\"(div \");\n\t\t\t}\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] DIV\n\t\t//[start] EQ\n\t\tcase EQ:\n\t\t\t//eq_expr = immediate \"==\" immediate;\n\t\t\t//b = r1 == r2\n\t\t\t//(assert (= b (= r1 r2)))\n\t\t\tsb.append(\"(= \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] EQ\n\t\t//[start] GE\n\t\tcase GE:\n\t\t\t//ge_expr = immediate \">=\" immediate;\n\t\t\t//b = r1 >= r2\n\t\t\t//(assert (= b (>= r1 r2)))\n\t\t\tsb.append(\"(>= \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] GE\n\t\t//[start] GT\n\t\tcase GT:\n\t\t\t//gt_expr = immediate \">\" immediate;\n\t\t\t//b = r1 > r2\n\t\t\t//(assert (= b (> r1 r2)))\n\t\t\tsb.append(\"(> \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] GT\n\t\t//[start] LE\n\t\tcase LE:\n\t\t\t//le_expr = immediate \"<=\" immediate;\n\t\t\t//b = r1 <= r2\n\t\t\t//(assert (= b (<= r1 r2)))\n\t\t\tsb.append(\"(<= \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] LE\n\t\t//[start] LT\n\t\tcase LT:\n\t\t\t//lt_expr = immediate \"<\" immediate;\n\t\t\t//b = r1 < r2\n\t\t\t//(assert (= b (< r1 r2)))\n\t\t\tsb.append(\"(< \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] LT\n\t\t//[start] MUL\n\t\tcase MUL:\n\t\t\t//mul_expr = immediate \"*\" immediate;\n\t\t\t//(* op1 op2)\n\t\t\tsb.append(\"(* \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] MUL\n\t\t//[start] NE\n\t\tcase NE:\n\t\t\t//ne_expr = immediate \"!=\" immediate;\n\t\t\t//(not (= op1 op2))\n\t\t\tsb.append(\"(not (= \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\"))\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] NE\n\t\tcase OR:\n\t\t\t//or_expr = immediate \"|\" immediate;\n\t\t\t//TODO\n\t\t\tassert(false) : \"OR Expr\";\n\t\t\tbreak;\n\t\t//[start] REM\n\t\tcase REM:\n\t\t\t//rem_expr = immediate \"%\" immediate;\n\t\t\t//(rem op1 op2)\n\t\t\tsb.append(\"(rem \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] REM\n\t\t//[start] SUB\n\t\tcase SUB:\n\t\t\t//sub_expr = immediate \"-\" immediate;\n\t\t\t//(- op1 op2)\n\t\t\tsb.append(\"(- \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] SUB\n\t\t}\n\t}", "private void helper(StringBuilder curSb, int n, int ob, int cb){\n if(curSb.length()==2*n){\n result.add(curSb.toString());\n return;\n }\n // add open paranthese only if they are less than the max allowed\n if (ob<n){\n curSb.append('(');\n helper(curSb, n, ob+1, cb);\n curSb.deleteCharAt(curSb.length() - 1);\n }\n // add close parantheses only if they are less than the current open parentheses \n if (cb<ob){\n curSb.append(')');\n helper(curSb, n, ob, cb+1);\n curSb.deleteCharAt(curSb.length() - 1);\n }\n }", "private double expr(boolean get){\n\t\t// compute the left argument which has to be a primary value or an expression with a higher priority than sums\n\t\tdouble left = term(get);\n\t\t// add all addends until the end of the sum is reached\n\t\tfor(;;){ \n\t\t\tswitch(curr_tok){\n\t\t\t\tcase PLUS:{\n\t\t\t\t\tleft += term(true);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase MINUS:{\n\t\t\t\t\tleft -= term(true);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault:{\n\t\t\t\t\treturn left;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private Node expandStateArgNode(State s, Node curr, Node parent, int depth) {\n\n Node add = null;\n\n if (curr instanceof TerminalNode) {\n\n if (curr instanceof NullaryTerminalNode) {\n\n if (parent != null && !(parent instanceof RepSketchNode)) {\n\n if (((OperatorNode) parent).operatorName.equals(\"notcc\")) {\n\n if (((TerminalNode) curr).sym.name.equals(\"<any>\")) return add;\n\n } else if (((OperatorNode) parent).operatorName.equals(\"not\")) {\n\n s.cost += Main.NOT_TERMINAL_PATTERN;\n\n }\n\n }\n\n add = s.pp.mkTerminalNode(((TerminalNode) curr).sym.name, parent);\n\n\n } else if (curr instanceof RealConstantTerminalNode) {\n\n RealConstantTerminalNode cn = (RealConstantTerminalNode) curr;\n add = s.pp.mkRealConstantNode(cn.k, curr.parent);\n\n }\n\n return add;\n\n } else if (curr instanceof OperatorNode) {\n\n Node[] args = new Node[((OperatorNode) curr).opSymbol.prod.argumentSymbols.length];\n add = s.pp.mkOperatorNode(((OperatorNode) curr).opSymbol, parent, args);\n\n\n if (((OperatorNode) curr).operatorName.contains(\"repeat\")) {\n\n s.pp.numRepeat++;\n\n if (checkConsecutiveRepeat(add)) s.cost += Main.CONSECUTIVE_REPEAT_COST;\n\n }\n\n\n for (int i = 0; i < args.length; i++) {\n\n Node curr_arg = ((OperatorNode) curr).args.get(i);\n Node parsed_arg = expandStateArgNode(s, curr_arg, add, depth + 1);\n\n ((OperatorNode) add).args.set(i, parsed_arg);\n\n }\n\n return add;\n } else {\n\n add = s.pp.mkVarNode(curr, parent, depth);\n\n return add;\n\n }\n\n }", "private String addSpaces(String expr) {\n\t\tString output = \"\";\n\t\tString prev = \" \";\n\n\t\tfor(Character c : expr.trim().toCharArray()) {\n\t\t\tif(!areSameType(prev, c.toString()) || isOperator(prev) || \n\t\t\t\t\t(isMatrix(c.toString()) && isMatrix(prev))) \n\t\t\t\toutput += \" \";\n\t\t\toutput += c;\n\t\t\tprev = c.toString();\n\t\t}\n\n\t\treturn output;\n\t}", "private static String replaceAll(Matcher matcher, String rep) {\n try {\n StringBuffer sb = null ; // Delay until needed\n while(matcher.find()) {\n if ( sb == null )\n sb = new StringBuffer() ;\n else {\n // Do one match of zerolength string otherwise filter out.\n if (matcher.start() == matcher.end() )\n continue ;\n }\n matcher.appendReplacement(sb, rep);\n }\n if ( sb == null )\n return null ;\n matcher.appendTail(sb);\n return sb.toString();\n } catch (IndexOutOfBoundsException ex) {\n throw new ExprEvalException(\"IndexOutOfBounds\", ex) ;\n }\n }", "public Snippet visit(PowExpression n, Snippet argu) {\n\t Snippet _ret= new Snippet(\"\",\"\",null,false);\n\t n.nodeToken.accept(this, argu);\n\t n.nodeToken1.accept(this, argu);\n\t n.nodeToken2.accept(this, argu);\n\t n.nodeToken3.accept(this, argu);\n\t Snippet f4 = n.identifier.accept(this, argu);\n\t n.nodeToken4.accept(this, argu);\n\t Snippet f6 = n.identifier1.accept(this, argu);\n\t n.nodeToken5.accept(this, argu);\n\t _ret.returnTemp = \"Math.pow(\"+f4.returnTemp+\", \"+f6.returnTemp+\")\";\n\t return _ret;\n\t }", "@Test\n public void testQueryMore3() throws Exception {\n testQueryMore(false, false);\n }", "Expression addExpression() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tExpression e0 = multExpression();\r\n\t\twhile(isKind(OP_PLUS, OP_MINUS)) {\r\n\t\t\tToken op = consume();\r\n\t\t\tExpression e1 = multExpression();\r\n\t\t\te0 = new ExpressionBinary(first,e0,op,e1);\r\n\t\t}\r\n\t\treturn e0;\r\n\t}", "ExpOperand createExpOperand();", "private void jetNewExpr(){\n\t\tthis.isNewExpr = true;\n\t}", "public void readMore15(View view) {\n String readMore15 = \"Website: http://gomyway.com\";\n displayMessage15(readMore15);\n }", "private SXTriple summarize(Edge edge, List<String> sentence) {\n return new SXTriple(edge.getSymbol(), edge.getBegin(), sentence.size() - edge.getEnd());\n }", "@Override\n public RowExpression rewrite(RowExpression expression, Rule.Context context)\n {\n if (expression instanceof CallExpression && ((CallExpression) expression).getArguments().stream().anyMatch(OriginalExpressionUtils::isExpression)) {\n return removeOriginalExpressionArguments((CallExpression) expression, context.getSession(), context.getSymbolAllocator(), context);\n }\n return removeOriginalExpression(expression, context, new HashMap<>());\n }", "protected NodePart getHelmetMoreDetails() {\n\t\treturn instance.nodes.get(0).parts.get(0);\n\t}", "public int getMoreSuggestionsCount() {\n return this.numMoreSuggestions;\n }", "@Test\n public void testQueryMore2() throws Exception {\n testQueryMore(false, true);\n }", "@Override\n public String toString() {\n return printOptimalParens(1, n);\n }", "public void recursion(final String expression, int countOperation) {\n int numberOfOperations=0;\n String operationString=expression.replace(\" \",\"\");\n for (int i=0; i<operationString.length()-1; i++)\n {\n if(expression.substring(i,i+1).matches(\"\\\\+\")\n ||operationString.substring(i,i+1).matches(\"\\\\-\")\n ||operationString.substring(i,i+1).matches(\"\\\\*\")\n ||operationString.substring(i,i+1).matches(\"/\")\n ||operationString.substring(i,i+1).matches(\"\\\\^\")\n ||operationString.substring(i,i+1).matches(\"i\")\n ||operationString.substring(i,i+1).matches(\"a\")\n ||operationString.substring(i,i+1).matches(\"o\"))\n {\n numberOfOperations++;\n }\n }\n String result;\n int count=0;\n if (operationString.substring(0,1).equals(\"(\"))\n {\n int start=1;\n int end=0;\n count=1;\n while (count<operationString.length() && start!=end)\n {\n String temp=operationString.substring(count,count+1);\n if (temp.equals(\"(\"))\n {\n start++;\n }\n if (temp.equals(\")\"))\n {\n end++;\n }\n count++;\n }\n }\n if (count!=operationString.length() && !operationString.substring(0,1).equals(\"(\"))\n {\n //разбиваем выражения на подвыражения\n List<String> symbols=new ArrayList<>();\n for (int i=0; i<operationString.length()-1;)\n {\n String temp=operationString.substring(i,i+1);\n if (\"+-*/^\".contains(temp))\n {\n symbols.add(temp);\n i++;\n }\n if(temp.equals(\"s\") || temp.equals(\"t\") || temp.equals(\"c\"))\n {\n symbols.add(operationString.substring(i,i+3));\n i=i+3;\n }\n if (temp.matches(\"\\\\d\"))\n {\n int k=i+1;\n StringBuilder sb=new StringBuilder(temp);\n while (k<operationString.length()&&(operationString.substring(k,k+1).matches(\"\\\\d\")||operationString.substring(k,k+1).matches(\"\\\\.\")))\n {\n sb.append(operationString.substring(k,k+1));\n k++;\n }\n i=k;\n symbols.add(new String(sb));\n }\n if (temp.equals(\"(\"))\n {\n int start=1;\n int end=0;\n int k=i+1;\n while(k<operationString.length() && start!=end)\n {\n if (operationString.substring(k,k+1).equals(\"(\"))\n {\n start++;\n }\n if(operationString.substring(k,k+1).equals(\")\"))\n {\n end++;\n }\n k++;\n }\n PrintStream oldOut=System.out;\n String recTemp;\n ByteArrayOutputStream baos=new ByteArrayOutputStream();\n PrintStream ps=new PrintStream(baos);\n System.setOut(ps);\n recursion(operationString.substring(i,k),++countOperation);\n recTemp=baos.toString();\n System.setOut(oldOut);\n symbols.add(recTemp);\n i=k;\n }\n }\n\n for (int i=0; i<symbols.size(); i++)\n {\n if (symbols.get(i).startsWith(\"s\"))\n {\n symbols.set(i,\"\"+Math.sin(Double.parseDouble(symbols.remove(i+1))*Math.PI/180));\n }\n if (symbols.get(i).startsWith(\"t\"))\n {\n symbols.set(i,\"\"+Math.tan(Double.parseDouble(symbols.remove(i+1))*Math.PI/180));\n }\n if (symbols.get(i).startsWith(\"c\"))\n {\n symbols.set(i,\"\"+Math.cos(Double.parseDouble(symbols.remove(i+1))*Math.PI/180));\n }\n }\n for (int i=0; i<symbols.size();)\n {\n if (symbols.get(i).equals(\"^\"))\n {\n symbols.set(i-1, Math.pow(Double.parseDouble(symbols.get(i - 1)), Double.parseDouble(symbols.get(i + 1))) + \"\");\n symbols.remove(i);\n symbols.remove(i);\n i--;\n }\n i++;\n }\n for (int i=0; i<symbols.size();)\n {\n if (symbols.get(i).equals(\"/\"))\n {\n symbols.set(i-1, Double.parseDouble(symbols.get(i - 1))/Double.parseDouble(symbols.get(i + 1)) + \"\");\n symbols.remove(i);\n symbols.remove(i);\n i--;\n }\n if (symbols.get(i).equals(\"*\"))\n {\n symbols.set(i-1, Double.parseDouble(symbols.get(i - 1))*Double.parseDouble(symbols.get(i + 1)) + \"\");\n symbols.remove(i);\n symbols.remove(i);\n i--;\n }\n i++;\n }\n for (int i=0; i<symbols.size(); i++)\n {\n if (symbols.get(i).equals(\"-\"))\n {\n symbols.set(i,\"-\"+symbols.remove(i+1));\n }\n if (symbols.get(i).equals(\"+\"))\n {\n symbols.remove(i);\n i--;\n }\n }\n double answer=0;\n for (String s:symbols)\n {\n answer=answer+Double.parseDouble(s);\n }\n result=answer+\"\";\n countOperation--;\n }\n else\n {\n //отбрасываем начальные и конечные скобки\n operationString=operationString.substring(1,operationString.length()-1);\n PrintStream oldOut=System.out;\n ByteArrayOutputStream baos=new ByteArrayOutputStream();\n PrintStream ps=new PrintStream(baos);\n System.setOut(ps);\n recursion(operationString,++countOperation);\n result=baos.toString();\n System.setOut(oldOut);\n }\n if (countOperation==0)\n {\n System.out.println(result+\" \"+numberOfOperations);\n }\n else\n {\n System.out.println(result);\n }\n }", "public com.google.cloud.aiplatform.v1.EvaluatedAnnotationExplanation.Builder\n addExplanationsBuilder() {\n return getExplanationsFieldBuilder()\n .addBuilder(\n com.google.cloud.aiplatform.v1.EvaluatedAnnotationExplanation.getDefaultInstance());\n }", "private String simplify(){\r\n return Utility.getStringFromKey(recipient) + Float.toString(value) + parentId;\r\n }", "public R visit(SimpleExp n) {\n R _ret=null;\n if(n.f0.which == 0){\n \t Integer temp = (Integer)n.f0.accept(this);\n \t //new\n \t \n \t ArrayList<Integer> newHold = use.get(statementNumber);\n// \t System.out.println(statementNumber);\n \t newHold.add(temp);\n \t use.put(statementNumber, newHold);\n \t \n \t //new\n \t if(temp >= arguments){\n\t \t ArrayList<Integer> hold = live.get(temp);\n\t \t hold.add(statementNumber);\n\t \t live.put(temp, hold);\n \t }\n }else{\n \t if(n.f0.which == 2)\n \t\t notLabel = false;\n \t n.f0.accept(this);\n \t if(n.f0.which == 2)\n \t\t notLabel = true;\n }\n return _ret;\n }", "public Object visitMultiplicativeExpression(GNode n) {\n Object a, b, result;\n String op;\n \n nonboolean = true;\n \n dostring = true;\n \n a = dispatch(n.getGeneric(0));\n b = dispatch(n.getGeneric(2));\n op = n.getString(1);\n \n dostring = false;\n \n if (a instanceof Long && b instanceof Long) {\n if ((op.equals(\"/\")\n || op.equals(\"%\")) && ((Long) b).equals(new Long(0))) {\n System.err.println(\"division by zero in #if\");\n result = new Long(0);\n }\n if (op.equals(\"*\")) {\n result = (Long) a * (Long) b;\n }\n else if (op.equals(\"/\")) {\n result = (Long) a / (Long) b;\n }\n else if (op.equals(\"%\")) {\n result = (Long) a % (Long) b;\n }\n else {\n result = \"\";\n }\n }\n else {\n result = parens(a) + \" \" + op + \" \" + parens(b);\n }\n \n return result;\n }", "@Override\n public Expression[] accumulateExpressions() {\n if (arguments == 0 || countLiteral) {\n return new Expression[] {/* count = */ plus(count, literal(1L))};\n }\n\n // other case need to determine the value of the element\n List<Expression> operandExpressions = new ArrayList<>();\n for (int i = 0; i < arguments; i++) {\n operandExpressions.add(operand(i));\n }\n Expression operandExpression =\n operandExpressions.stream()\n .map(ExpressionBuilder::isNull)\n .reduce(ExpressionBuilder::or)\n .get();\n return new Expression[] {\n /* count = */ ifThenElse(operandExpression, count, plus(count, literal(1L)))\n };\n }", "private String translateInfixExpression(InfixExpression e) {\n String left = translateExpression(e.getLeft());\n String right = translateExpression(e.getRight());\n return String.format(\"(%s %s %s)\", left, e.getOp(), right);\n }", "private void addMoreRepletParameters() throws Exception\n {\n addTermbaseParameter();\n addLanguageParameter();\n addRepletParameters(theParameters);\n }", "public void addToCoins(int more) {\r\n\t\tint coins = more;\r\n\t\tif (goods.containsKey(Resource.COIN)) {\r\n\t\t\tcoins = goods.get(Resource.COIN);\r\n\t\t\tcoins += more;\r\n\t\t}\r\n\t\tgoods.put(Resource.COIN, coins);\r\n\t}", "public java.lang.String explainInternal (boolean extended) { throw new RuntimeException(); }", "@Override\n public int howManyXp() {\n return 2;\n }", "public Snippet visit(MaxExpression n, Snippet argu) {\n\t Snippet _ret= new Snippet(\"\",\"\",null,false);\n\t n.nodeToken.accept(this, argu);\n\t n.nodeToken1.accept(this, argu);\n\t n.nodeToken2.accept(this, argu);\n\t n.nodeToken3.accept(this, argu);\n\t Snippet f4 = n.identifier.accept(this, argu);\n\t n.nodeToken4.accept(this, argu);\n\t Snippet f6 = n.identifier1.accept(this, argu);\n\t n.nodeToken5.accept(this, argu);\n\t _ret.returnTemp = \"Math.max(\"+f4.returnTemp+\", \"+f6.returnTemp+\")\";\n\t return _ret;\n\t }", "public String toString() {\n if (mExpression.size() == 1 && mExpression.get(0).startsWith(\"-\")) {\n return mExpression.get(0);\n }\n\n StringBuilder output = new StringBuilder();\n boolean first = true;\n int size = mExpression.size();\n\n for (int i = 0; i < size; i++) {\n String element = mExpression.get(i);\n\n if (first) {\n first = false;\n } else {\n output.append(\"\");\n }\n\n\n if (isOperand(element) && element.startsWith(\"-\")) {\n output.append(\"(\")\n .append(element)\n .append(\")\");\n } else {\n output.append(element);\n }\n }\n\n return output.toString();\n }", "@Test\n public void testQueryMore1() throws Exception {\n testQueryMore(true, true);\n }", "public String toString() {\n return fullExpression;\n }", "void visit(PlusExpression expression);", "public Object visitAdditiveExpression(GNode n) {\n Object a, b, result;\n String op;\n \n nonboolean = true;\n \n dostring = true;\n \n a = dispatch(n.getGeneric(0));\n b = dispatch(n.getGeneric(2));\n op = n.getString(1);\n \n dostring = false;\n \n if (a instanceof Long && b instanceof Long) {\n if (op.equals(\"+\")) {\n result = (Long) a + (Long) b;\n }\n else if (op.equals(\"-\")) {\n result = (Long) a - (Long) b;\n }\n else {\n result = \"\";\n }\n }\n else {\n result = parens(a) + \" \" + op + \" \" + parens(b);\n }\n \n return result;\n }", "public Character getMorelinesSymbol();", "public Node simpleExpression(Node n_parent) {\r\n\r\n if(token.get(lookAheadPossition).contains(\"ident(\")||token.get(lookAheadPossition).contains(\"num(\")||token.get(lookAheadPossition).contains(\"boollit(\")||token.get(lookAheadPossition).equals(\"LP\")){\r\n System.out.println(\":: simpleExpression::if \"+n_parent.getData());\r\n Node makeown = new Node (\"makeown\");\r\n Node n_factor = this.term(makeown);\r\n //if (!(n_parent==null)) {n_parent.setNodeChild(n_factor); }//simpleExpression(n_factor); }\r\n //if (n_parent.getData().contains(\"-\")) {n_parent.setNodeChild(n_factor); simpleExpression(n_factor); } /////////************add\r\n //addNode = simpleExpressionNode.addChild(\"Add\");\r\n return(this.restSimpleExpression(n_parent,n_factor ));\r\n }\r\n return(null);\r\n }", "public void simplify()\n\t\t{\n\t\t\tfor(int o = 0; o < theOperands.length; o++)\n\t\t\t{\n\t\t\t\tif(!(theOperands[o] instanceof ExpressionSearch))\n\t\t\t\t\tcontinue;\n\t\t\t\tExpressionSearch exp = (ExpressionSearch) theOperands[o];\n\t\t\t\texp.simplify();\n\t\t\t\tif(exp.getOperandCount() == 0)\n\t\t\t\t{\n\t\t\t\t\tremove(o);\n\t\t\t\t\to--;\n\t\t\t\t}\n\t\t\t\tif(exp.and == and)\n\t\t\t\t{\n\t\t\t\t\tSearch [] newOps = new Search [theOperands.length + exp.theOperands.length - 1];\n\t\t\t\t\tSystem.arraycopy(theOperands, 0, newOps, 0, o);\n\t\t\t\t\tSystem.arraycopy(exp.theOperands, 0, newOps, o, exp.theOperands.length);\n\t\t\t\t\tSystem.arraycopy(theOperands, o + 1, newOps, o + exp.theOperands.length,\n\t\t\t\t\t\ttheOperands.length - o - 1);\n\t\t\t\t\tfor(Search op : exp.theOperands)\n\t\t\t\t\t\tif(op instanceof CompoundSearch)\n\t\t\t\t\t\t\t((CompoundSearch) op).setParent(this);\n\t\t\t\t\to += exp.theOperands.length - 1;\n\t\t\t\t\ttheOperands = newOps;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "@Override\r\n\tpublic double extra() {\n\t\treturn 0.05;\r\n\t}" ]
[ "0.5442934", "0.52743113", "0.52653885", "0.5236469", "0.5233629", "0.5224945", "0.5187793", "0.51744497", "0.5036417", "0.49354404", "0.4926072", "0.48915935", "0.4882543", "0.48583174", "0.48577064", "0.4845341", "0.48349914", "0.48153305", "0.48091453", "0.47808266", "0.47641185", "0.47437033", "0.47003853", "0.4683683", "0.46651265", "0.4658358", "0.4654012", "0.46239683", "0.46159506", "0.4614362", "0.46096036", "0.45997247", "0.45970377", "0.4586235", "0.45759556", "0.4569455", "0.45626968", "0.45626968", "0.45626193", "0.45604646", "0.45532554", "0.45382428", "0.4529739", "0.4528545", "0.45239407", "0.45202222", "0.4513942", "0.45127815", "0.4511812", "0.45087922", "0.4506823", "0.449002", "0.44873285", "0.44866228", "0.44850042", "0.4484636", "0.44693643", "0.4461601", "0.4451606", "0.44509223", "0.44491303", "0.44451183", "0.4444352", "0.44388288", "0.44355738", "0.4433358", "0.4430672", "0.44286254", "0.44237864", "0.44237584", "0.44210097", "0.44159192", "0.44157425", "0.44041523", "0.4403396", "0.44032615", "0.439573", "0.4395422", "0.4392624", "0.43909526", "0.43843198", "0.43782577", "0.4376914", "0.43762332", "0.4375882", "0.43734282", "0.437064", "0.43697554", "0.43680647", "0.4364457", "0.43644384", "0.43571645", "0.43560627", "0.43548745", "0.43512765", "0.43499485", "0.43354142", "0.43308616", "0.43304238", "0.4329299" ]
0.62813807
0
Makes a new expression that var is replaced with it's assign.
@Override public Expression assign(String var, Expression expression) { Expression left = super.getLeft(); Expression right = super.getRight(); return new Mult(left.assign(var, expression), right.assign(var, expression)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Stmt createAssignment(Assign expr) {\n return createEval(expr);\n }", "@Override\n public Expression assign(String var, Expression expression) {\n return new Minus(getExpression1().assign(var, expression), getExpression2().assign(var, expression));\n }", "public Expression assign(String var, Expression expression) {\n return new Cos(super.getExpression().assign(var, expression));\n }", "public Expression assign(String var, Expression expression) {\n Cos p = new Cos(this.getExp().assign(var, expression));\n return p;\n }", "public Expression assign(String var, Expression expression) {\r\n // if this variable is val no meter if is capital or small letter.\r\n if (this.variable.equalsIgnoreCase(var)) {\r\n return expression;\r\n }\r\n return this;\r\n }", "VarAssignment createVarAssignment();", "private static AssignExpr retrieveAssignExpression(Expression expression) {\n return expression.asAssignExpr();\n }", "public JCExpressionStatement makeAssignment(Tag tag, String varname, JCExpression exp1, JCExpression exp2) {\n return treeMaker.Exec(treeMaker.Assign(treeMaker.Ident(getNameFromString(varname)), treeMaker.Binary(tag, exp1, exp2)));\n }", "@Override\n public Expression assign(String var, Expression expression) {\n Expression e1 = getEx2().assign(var, expression);\n Expression e2 = getEx2().assign(var, expression);\n return new Log(e1, e2);\n }", "public JCExpressionStatement makeAssignment(JCExpression lhs, JCExpression rhs) {\n return treeMaker.Exec(treeMaker.Assign(lhs, rhs));\n }", "public Expression substitute(String var, Expression replacement) {\n\treturn \n\t new UnaryPrimitiveApplication(operator, \n\t\t\t\t\t argument.substitute(var, \n\t\t\t\t\t\t\t replacement));\n }", "private Operation expression(Scope scope, Vector queue)\r\n {\r\n Operation root = expression1(scope, queue);\r\n\r\n if (assign.contains(nextSymbol))\r\n {\r\n Operation op = new Operation();\r\n\r\n op.left = root;\r\n\r\n op.operator = assignmentOperator();\r\n op.right = expression(scope, queue);\r\n\r\n root = op;\r\n }\r\n\r\n return root;\r\n }", "@Override\n\tpublic void visit(AssignNode node) {\n\t\tEvaluator.evaluate(node.getChild(0));\n\t\tEvaluator.evaluate(node.getChild(1));\n\n\t\t/**\n\t\t * Verificam fiii si construim perechea Variabila, Valoare pentru a fi\n\t\t * inserata in HahMap-ul din Evaluator\n\t\t */\n\t\tVariable x = null;\n\t\tValue i = null;\n\t\tif (node.getChild(1) instanceof Variable) {\n\t\t\tx = new Variable(node.getChild(1).getName());\n\t\t} else {\n\t\t\ti = new Value(node.getChild(1).getName());\n\t\t}\n\n\t\tif (node.getChild(0) instanceof Variable) {\n\t\t\tx = new Variable(node.getChild(0).getName());\n\t\t} else {\n\t\t\ti = new Value(node.getChild(0).getName());\n\t\t}\n\t\tEvaluator.variables.put(x.getName(), i.getName());\n\t\tnode.setName(i.getName());\n\t}", "VariableExp createVariableExp();", "public AssignExpr assign_expr() {\n if (lexer.token != Symbol.IDENT) {\n error.signal(\"Expecting identifier at assign expression\");\n }\n \n String type = symbolTable.getVariable(lexer.getStringValue());\n if(type == null){\n error.show(\"Tried to assign a value to a variable (\"+lexer.getStringValue()+\") that hasn't been declared.\");\n } else {\n if(type.equals(\"STRING\")){\n error.show(\"Tried to assign a value to a declared string variable (\"+lexer.getStringValue()+\")\");\n }\n }\n \n Ident id = new Ident(lexer.getStringValue());\n \n lexer.nextToken();\n if (lexer.token != Symbol.ASSIGN) {\n error.signal(\"Expecting assign symbol at assign expression\");\n }\n lexer.nextToken();\n Expr e = expr();\n\n if(type != null && type.toLowerCase().equals(\"int\") && e.getType(symbolTable) != null && e.getType(symbolTable).toLowerCase().equals(\"float\"))\n error.show(\"Trying to assign a \"+e.getType(symbolTable)+\" to a \"+type);\n else if (type != null && e.getType(symbolTable) != null && !type.equals(e.getType(symbolTable)))\n error.warning(\"Trying to assign a \"+e.getType(symbolTable)+\" to a \"+type);\n \n return new AssignExpr(id, e);\n }", "public void setExpression(Object expression);", "public static BinaryExpression addAssign(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "public Expression copy(HashMap<String, VarNode> variables){\n\t\treturn new Expression(this.ExprNode.copy(variables));\n\t}", "private Expr expression() {\n return assignment();\n }", "protected Expr visitFieldAssign(FieldAssign n) throws SemanticException { \n Position pos = n.position();\n if (n.operator() == Assign.ASSIGN) return n;\n X10Binary_c.Operator op = n.operator().binaryOperator();\n Field left = (Field) n.left();\n Expr right = n.right();\n Type R = left.type();\n if (left.flags().isStatic()) {\n Expr val = visitBinary((X10Binary_c) xnf.Binary(pos, left, op, right).type(R));\n return assign(pos, left, Assign.ASSIGN, val);\n }\n Expr e = (Expr) left.target();\n Type E = e.type();\n List<Formal> parms = new ArrayList<Formal>();\n Name xn = Name.make(\"x\");\n LocalDef xDef = xts.localDef(pos, xts.Final(), Types.ref(E), xn);\n Formal x = xnf.Formal(pos, xnf.FlagsNode(pos, xts.Final()),\n xnf.CanonicalTypeNode(pos, E), xnf.Id(pos, xn)).localDef(xDef);\n parms.add(x);\n Name yn = Name.make(\"y\");\n Type T = right.type();\n LocalDef yDef = xts.localDef(pos, xts.Final(), Types.ref(T), yn);\n Formal y = xnf.Formal(pos, xnf.FlagsNode(pos, xts.Final()),\n xnf.CanonicalTypeNode(pos, T), xnf.Id(pos, yn)).localDef(yDef);\n parms.add(y);\n Expr lhs = xnf.Field(pos,\n xnf.Local(pos, xnf.Id(pos, xn)).localInstance(xDef.asInstance()).type(E),\n xnf.Id(pos, left.name().id())).fieldInstance(left.fieldInstance()).type(R);\n Expr val = visitBinary((X10Binary_c) xnf.Binary(pos,\n lhs, op, xnf.Local(pos, xnf.Id(pos, yn)).localInstance(yDef.asInstance()).type(T)).type(R));\n Expr res = assign(pos, lhs, Assign.ASSIGN, val);\n Block body = xnf.Block(pos, xnf.Return(pos, res));\n Closure c = synth.makeClosure(pos, R, parms, body, context());\n X10MethodInstance ci = c.closureDef().asType().applyMethod();\n List<Expr> args = new ArrayList<Expr>();\n args.add(0, e);\n args.add(right);\n return xnf.ClosureCall(pos, c, args).closureInstance(ci).type(R);\n }", "public void storeEval(final String expression, final String variableName);", "public static BinaryExpression addAssign(Expression expression0, Expression expression1, Method method) { throw Extensions.todo(); }", "public Assign createAssign(Position pos, Expr target, Operator op, Expr source) {\n return (Assign) xnf.Assign(pos, target, op, source).type(target.type());\n }", "public Stmt createEval(Expr expr) {\n return xnf.Eval(expr.position(), expr);\n }", "private static Expression retrieveAssignExpressionValue(Expression expression) {\n return retrieveAssignExpression(expression).getValue();\n }", "SetExpr (String i, Expr e) {\n varName = i;\n expr = e;\n }", "public void assign (String name, StatementParse node, Closure parent){\n Closure exist = find_var(name);\n Value newClosure;\n if (node.getName().equals(\"function\")){\n newClosure = new Closure(parent, node);\n } else {\n newClosure = new Environment(parent, node);\n }\n exist.getValues().put(name, newClosure);\n }", "@Override\n public void visit(VariableAssignNode variableAssignNode) {\n }", "public Expression deepCopy (){\n return new LiteralExpression(_value);\n }", "protected Element setExpr(String expr, String to_node){\n\t\treturn el(\"bpws:copy\", new Node[]{\n\t\t\t\tel(\"bpws:from\", attr(\"expression\", \"abx:getProcessId()\")),\n\t\t\t\tel(\t\"bpws:to\", new Node[]{\n\t\t\t\t\t\tattr(\"variable\", VARNAME),\n\t\t\t\t\t\tattr(\"part\", \"part1\"),\n\t\t\t\t\t\tattr(\"query\", \"/nswomoxsd:receive/nswomoxsd:evt/\" + to_node)\n\t\t\t\t\t})\n\t\t});\n\n\t}", "assign_op getAssign_op();", "public static BinaryExpression assign(Expression left, Expression right) { throw Extensions.todo(); }", "Expression createExpression();", "@Test\n\tpublic void testAssignment(){\n\t\tVariable x = new Variable(\"x\");\n\t\tOperator plus = new Operator(\"+\");\n\t\tExpression one = f.createNumNode(1);\n\t\tExpression two = f.createNumNode(2);\n\t\tExpression exp = f.createInfixNode(plus, one, two);\n\t\tStatement assign = f.createAssignNode(x,exp);\n\t\tassertEquals(assign.textRepresentation(), \"x = 1 + 2;\");\n\t\n\t\tASTNodeCountVisitor v = new ASTNodeCountVisitor();\n\t\tassign.accept(v);\n\t\tassertEquals(\"assignment test1 fail\", v.numCount, 2);\n\t\tassertEquals(\"assignment test2 fail\", v.infixCount, 1);\n\t\tassertEquals(\"assignment test3 fail\", v.assignCount, 1);\n\t}", "public static Expression var(String var) {\n if (var.equals(\"e\")) {\n throw new RuntimeException(\"Variable can't be named e.\");\n }\n\n return new Variable(var);\n }", "private Expr visitLocalAssign(LocalAssign n) throws SemanticException { \n Position pos = n.position();\n if (n.operator() == Assign.ASSIGN) return n;\n X10Binary_c.Operator op = n.operator().binaryOperator();\n Local left = (Local) n.left();\n Expr right = n.right();\n Type R = left.type();\n Expr val = visitBinary((X10Binary_c) xnf.Binary(pos, left, op, right).type(R));\n return assign(pos, left, Assign.ASSIGN, val);\n }", "@Override\n\tAlgebraicExpression clone();", "@Override\n public Integer visitAssign(CalculatorParser.AssignContext ctx) {\n String id = ctx.ID().getText(); // id is left-hand side of '='\n int value = visit(ctx.expr()); // compute value of expression on right\n memory.put(id, value); // store it in memory\n return value;\n }", "protected Assign assign(Position pos, Expr e, Assign.Operator asgn, Expr val) throws SemanticException {\n Assign a = (Assign) xnf.Assign(pos, e, asgn, val).type(e.type());\n if (a instanceof FieldAssign) {\n assert (e instanceof Field);\n assert ((Field) e).fieldInstance() != null;\n a = ((FieldAssign) a).fieldInstance(((Field)e).fieldInstance());\n } else if (a instanceof SettableAssign) {\n assert (e instanceof X10Call);\n X10Call call = (X10Call) e;\n List<Expr> args = CollectionUtil.append(Collections.singletonList(val), call.arguments());\n X10Call n = xnf.X10Call(pos, call.target(), nf.Id(pos, SettableAssign.SET), call.typeArguments(), args);\n n = (X10Call) n.del().disambiguate(this).typeCheck(this).checkConstants(this);\n X10MethodInstance smi = n.methodInstance();\n X10MethodInstance ami = call.methodInstance();\n // List<Type> aTypes = new ArrayList<Type>(ami.formalTypes());\n // aTypes.add(0, ami.returnType()); // rhs goes before index\n // MethodInstance smi = xts.findMethod(ami.container(),\n // xts.MethodMatcher(ami.container(), SET, aTypes, context));\n a = ((SettableAssign) a).methodInstance(smi);\n a = ((SettableAssign) a).applyMethodInstance(ami);\n }\n return a;\n }", "private void jetNewExpr(){\n\t\tthis.isNewExpr = true;\n\t}", "public Exp createBind(Expression exp, Variable var){\r\n if (var.getVariableList() != null){\r\n // bind (sql() as ())\r\n return createASTBind(exp, var);\r\n }\r\n else {\r\n return Binding.create(exp, var);\r\n }\r\n }", "public static BinaryExpression addAssign(Expression expression0, Expression expression1, Method method, LambdaExpression lambdaExpression0, LambdaExpression lambdaExpression1) { throw Extensions.todo(); }", "public Code visitAssignmentNode(StatementNode.AssignmentNode node) {\n beginGen(\"Assignment\");\n /* Generate code to evaluate the expression */\n Code code = new Code();\n /* Generate the code to load the address of the variable */\n for(int i= 0; i < node.getExps().size(); i++) {\n \tExpNode exp = node.getExps().get(i);\n \tcode.append(exp.genCode(this));\n }\n for(int i = node.getLValues().size() - 1; i >= 0; i--) {\n \tExpNode lValue = node.getLValues().get(i);\n \tcode.append(lValue.genCode(this));\n \tcode.genStore(lValue.getType());\n }\n endGen(\"Assignment\");\n return code;\n }", "@Override\n public void visitAssignment(AssignmentExpression assignmentExpression) {\n assignmentExpression.interpret(context);\n }", "public Object eval (Object expression);", "public boolean assignVariable(Scanner scan){\n\t\tif (scan.hasNext(\"\\\\=\")){\n\t\t\tif (!Parser.gobble(\"\\\\=\", scan)){ Parser.fail(\"Should have = for variables.\", scan); }\n\t\t\texpr = new Expression();\n\t\t\texpr.parse(scan);\t\t\t\t\t\t//Assignment\n\t\t\tif (!Parser.gobble(\"\\\\;\", scan)){ Parser.fail(\"Should have ; for variables.\", scan); }\n\t\t\t//Add to map\n\t\t\tParser.variables.put(name, this);\n\t\t\treturn true;\n\t\t} else if (scan.hasNext(\"\\\\;\")){\t//DECLARED NOT ASSIGNMENT\n\t\t\tif (!Parser.gobble(\"\\\\;\", scan)){ Parser.fail(\"Should have ; for variables.\", scan); }\n\t\t\t/*\t\t\tNum number = new Num();\n\t\t\tnumber.numberNodeZero();\n\t\t\texpr = number;\t\t\t\t\t//sets expr to 0. \n\t\t\t */\t\t\treturn true; \t\t\t\t\t//Shouldnt set it to 0 if there is already variable in map\n\t\t}\n\t\treturn false;\n\t}", "public LlvmValue visit(Assign n){\n\t\t\n\t\tSystem.out.format(\"assign********\\n\");\n\t\t\n\t\tLlvmValue rhs = n.exp.accept(this);\n\t\tLlvmRegister returns;\n\t\t//Nesta parte, para retornarmos o tipo certo, tivemos que converter todos os parametros do tipo\n\t\t//[ A x iB] para ponteiros. o Assembly reclamava quando tinha algum store ou algo do genero com tipos\n\t\t// diferentes\n\t\tif(rhs.type.toString().contains(\"x i\")){\n\t\t\t//System.out.format(\"expressao de rhs envolve arrays. fazendo casting...\\n\");\n\t\t\t\n\t\t\t//Fazer bitcast\n\t\t\tif(rhs.type.toString().contains(\" x i32\")){\n\t\t\t\treturns = new LlvmRegister(LlvmPrimitiveType.I32PTR);\n\t\t\t}else if(rhs.type.toString().contains(\" x i8\")){\n\t\t\t\treturns = new LlvmRegister(new LlvmPointer(LlvmPrimitiveType.I8));\n\t\t\t//Esse else eh meio inutil, mas pelo fato de eu querer usar elseif, deixei ele aqui mesmo.\n\t\t\t}else{\n\t\t\t\treturns = new LlvmRegister(rhs.type);\n\t\t\t}\n\t\t\t\n\t\t\tassembler.add(new LlvmBitcast(returns, rhs, returns.type));\n\t\t\tassembler.add(new LlvmStore(returns, n.var.accept(this)));\n\t\t}else{\n\t\t\t//Caso o tipo ja esteja ok, soh damos store com o rhs mesmo.\n\t\t\tassembler.add(new LlvmStore(rhs, n.var.accept(this)));\n\t\t}\n\t\treturn null;\n\t}", "protected Element assignRecordToMyVar(Record r) {\n\t\tElement an = el(\"bpws:assign\", new Node[]{\n\t\t\t\tinitMyVar(new Node[]{\n\t\t\t\t\tel(\"nswomoxsd:type\", text(r.getType().toString())),\n\t\t\t\t\tel(\"nswomoxsd:value\", text(\"0\"))\n\t\t\t\t}),\n\t\t\t\tsetProcId()\n\t\t});\n\t\tif (r.getType() == RecordType.FORMULAR)\n\t\t\tan.appendChild(setExpr(r.getFormular(), \"nswomoxsd:value\"));\n\t\treturn an;\n\t}", "@Override\n public String visit(AssignExpr n, Object arg) {\n return null;\n }", "public Stmt createAssignment(Position pos, Expr target, Operator op, Expr source) {\n return createAssignment(createAssign(pos, target, op, source));\n }", "public interface AttributeAssignmentExpression extends EObject {\r\n\r\n\tObject toProlog(String type, String variableName, String entityName);\r\n\r\n\tString toPrologExecution();\r\n}", "public void assign(String id, ExprNode expr) {\n if (expr instanceof ObjectNode && !assignedParams.contains(id)) {\n assignedParams.add(id);\n }\n assignments.put(id, expr);\n }", "Syntax.Node ParseAssignment(Token t, Syntax.NodeVar left) throws Exception{\n while (true){\n if(t.type==TokenType.ASSIGNMENT_OPERATOR){\n var right = ParseExpression();\n return new Syntax.AssignmentNode(\":=\", left, right);\n }\n else {\n lexer.putBack(t);\n break;\n //throw new Exception(\"Error in ParseAssignment!!! can't assign it \");\n }\n }\n throw new Exception(\"Error in ParseAssignment!!! \");\n\n }", "@Override\n public ExpressionNode deepCopy(BsjNodeFactory factory);", "@Override\n\tpublic Expression replacedVar(Map<Variable, Variable> replacement) {\n\t\tList<Tuple<String, Variable>> newVars = new ArrayList<Tuple<String, Variable>>(this.variables);\n\t\tnewVars.replaceAll(itm -> {\n\t\t\tif (itm.second() != null && replacement.containsKey(itm.second())) {\n\t\t\t\treturn new Tuple<String, Variable>(itm.first(), replacement.get(itm.second()));\n\t\t\t}\n\t\t\treturn itm;\n\t\t});\n\t\treturn new Expression(this.desc, newVars);\n\t}", "@Override\n\tpublic Expression copy() {\n\t\treturn null;\n\t}", "public static Assign run (Assign stmt, QueryChannel channel) {\n Rhs newRhs = stmt.getRhs().accept(visitor, channel);\n if (newRhs == null)\n newRhs = new Rlin(linear(Bound.ONE));\n if (newRhs != stmt.getRhs())\n return new Assign(stmt.getLhs(), newRhs);\n return stmt;\n }", "public void setExpandedAndInstantiatedExpression(gov.nasa.arc.l2tools.livingstone.code.logic.BasicExpression newExpandedAndInstantiatedExpression) {\n\texpandedAndInstantiatedExpression = newExpandedAndInstantiatedExpression;\n}", "public AssignStmt assign_stmt() {\n AssignExpr ae = assign_expr();\n if (lexer.token != Symbol.SEMICOLON) {\n error.signal(\"Semicolon expected after assignment\");\n }\n lexer.nextToken();\n\n return new AssignStmt(ae);\n }", "@Override\n public ExprType analyzeAssign(AnalyzeInfo info, ExprGenerator value)\n {\n ExprGenerator objGen = ((ExprPro) _objExpr).getGenerator();\n objGen.analyze(info);\n\n value.analyze(info);\n\n // php/3a6e, php/39o3\n // objGen.analyzeSetReference(info);\n objGen.analyzeSetModified(info);\n\n return ExprType.VALUE;\n }", "public static UnaryExpression postIncrementAssign(Expression expression) {\n return makeUnary(ExpressionType.PostIncrementAssign, expression, expression.getType());\n }", "public Expression(Expression exp) {\r\n\t\tconcat(exp);\r\n\t\ttext = new StringBuffer(new String(exp.text));\r\n\t}", "@Override\n public void visit(VariableEvalNode variableEvalNode) {\n }", "Expr createExpr();", "public Expression differentiate(String var) {\r\n // var might be a differentiate of other variable\r\n if (!this.toString().equalsIgnoreCase(var)) {\r\n return (Expression) new Num(0);\r\n }\r\n return (Expression) new Num(1);\r\n\r\n }", "private Term parseAssign(final boolean required) throws ParseException {\n Term t1 = parseConditional(required);\n while (t1 != null) {\n int tt = _tokenizer.next();\n if (tt == '=') {\n Term t2 = parseAssign(true);\n if (t1 instanceof Term.Ref && ((Term.Ref) t1).getVariable() != null) {\n t1 = new Term.Assign(t1, t2);\n } else {\n reportError(\"Variable expected on the left side of assignment '='.\");\n }\n } else {\n _tokenizer.pushBack();\n break;\n }\n }\n return t1;\n }", "public void setExpression(Expression expression) {\r\n\t\tASTNode oldChild = this.expression;\r\n\t\tpreReplaceChild(oldChild, expression, EXPRESSION_PROPERTY);\r\n\t\tthis.expression = expression;\r\n\t\tpostReplaceChild(oldChild, expression, EXPRESSION_PROPERTY);\r\n\t}", "ExpOperand createExpOperand();", "@Override\r\n\tpublic void visitVariable(ExpVariable exp) {\r\n\t\tif (replaceVariables.containsKey(exp.getVarname())) {\r\n\t\t\tobject = replaceVariables.get(exp.getVarname());\r\n\t\t\tgetAttributeClass(replaceVariables.get(exp.getVarname()).name());\r\n\r\n\t\t} else if (variables.containsKey(exp.getVarname())) {\r\n\t\t\tobject = variables.get(exp.getVarname());\r\n\t\t\tif (collectionVariables.contains(exp.getVarname())) {\r\n\t\t\t\tset = true;\r\n\t\t\t}\r\n\t\t\tgetAttributeClass(exp.getVarname());\r\n\t\t} else if (exp.type().isTypeOfClass()) {\r\n\t\t\tIClass clazz = model.getClass(exp.type().shortName());\r\n\t\t\tTypeLiterals type = clazz.objectType();\r\n\t\t\ttype.addTypeLiteral(exp.getVarname());\r\n\t\t\tobject = type.getTypeLiteral(exp.getVarname());\r\n\t\t\tattributeClass = clazz;\r\n\t\t} else {\r\n\t\t\tthrow new TransformationException(\"No variable \" + exp.getVarname() + \".\");\r\n\t\t}\r\n\t}", "public static UnaryExpression preIncrementAssign(Expression expression) {\n return makeUnary(ExpressionType.PreIncrementAssign, expression, expression.getType());\n }", "public static void statement(CommonTree ast, IRTree irt)\n {\n CommonTree ast1;\n IRTree irt1 = new IRTree();\n Token t = ast.getToken();\n int tt = t.getType();\n if (tt == WRITELN)\n {\n String a = String.valueOf(Memory.allocateString(\"\\n\"));\n irt.setOp(\"WRS\");\n irt.addSub(new IRTree(\"MEM\", new IRTree(\"CONST\", new IRTree(a))));\n }\n else if (tt == WRITE)\n {\n ast1 = (CommonTree)ast.getChild(0);\n String type = arg(ast1, irt1);\n if (type.equals(\"real\")) {\n irt.setOp(\"WRR\");\n irt.addSub(irt1);\n }\n else {\n irt.setOp(\"WRS\");\n irt.addSub(irt1);\n }\n }\n else if(tt == ASSIGN)\n {\n //try deailng with assign here\n irt.setOp(\"ASSIGN\");\n IRTree iHold = new IRTree(\"MEM\", new IRTree(\"CONST\", new IRTree(String.valueOf(Memory.allocateReal(ast.getChild(0).getText())))));\n System.out.println(\"var name = \" + ast.getChild(0).getText());\n irt.addSub(iHold);\n expression((CommonTree)ast.getChild(1), irt1);\n irt.addSub(irt1);\n }\n else if(tt == MEM)\n {\n System.out.println(\"GOT MEM TYPE\");\n }\n else {\n error(tt);\n }\n }", "@Override\n\tprotected void remapVariablesInThisExpression(Map<String, String> fromToVariableMap) {\n\t}", "public void assign (String name, Value value){\n Closure exist = find_var(name);\n exist.getValues().put(name, value);\n }", "public IncrementableAssignment(Literal lit) {\n super(lit, false);\n variableOrdering.add(lit.variable());\n }", "private Expression getRetainedWithTarget(Assignment node, VariableElement var) {\n Expression lhs = node.getLeftHandSide();\n if (!(lhs instanceof FieldAccess)) {\n return new ThisExpression(ElementUtil.getDeclaringClass(var).asType());\n }\n // To avoid duplicating the target expression we must save the result to a local variable.\n FieldAccess fieldAccess = (FieldAccess) lhs;\n Expression target = fieldAccess.getExpression();\n VariableElement targetVar = GeneratedVariableElement.newLocalVar(\n \"__rw$\" + rwCount++, target.getTypeMirror(), null);\n TreeUtil.asStatementList(TreeUtil.getOwningStatement(lhs))\n .add(0, new VariableDeclarationStatement(targetVar, null));\n fieldAccess.setExpression(new SimpleName(targetVar));\n CommaExpression commaExpr =\n new CommaExpression(\n new CastExpression(\n typeUtil.getVoid(),\n new ParenthesizedExpression(new Assignment(new SimpleName(targetVar), target))));\n node.replaceWith(commaExpr);\n commaExpr.addExpression(node);\n return new SimpleName(targetVar);\n }", "@Override\n\tpublic Object evaluate(Interpreter interpreter)\n\t{\n\t\t((VarToken) A).assign(interpreter, (String) B.evaluate(interpreter));\n\t\treturn null;\n\t}", "private AssignNode parseStatementIdentifier(Token identifier) {\n\t\tswitch (tokenReader.getCurrent().getType()) {\n\t\tcase ASSIGN:\n\t\t\ttokenReader.moveNext();\n\t\t\treturn new AssignNode(identifier, parserExpression.parse());\n\t\tcase ASSIGN_MINUS: case ASSIGN_PLUS:\n\t\t\treturn new AssignNode(identifier, new BinaryOperationNode(tokenReader.getCurrentAndMoveNext(), new VarNode(identifier), parserExpression.parse()));\n\t\tcase INCR: case DECR:\n\t\t\tToken oneToken = new Token(TokenType.NUMBER, \"1\", tokenReader.getCurrent().getIndex(), tokenReader.getCurrent().getRow(), tokenReader.getCurrent().getColumn());\n\t\t\tConstantNode one = new ConstantNode(oneToken);\n\t\t\treturn new AssignNode(identifier, new BinaryOperationNode(tokenReader.getCurrentAndMoveNext(), new VarNode(identifier), one));\n\t\tdefault:\n\t\t\tthrow new FunwapException(\"Invalid statement.\", tokenReader.getCurrent());\n\t\t}\n\t}", "public static BinaryExpression leftShiftAssign(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "static InfixExpression.Operator assignmentToInfix(final Assignment.Operator o) {\n return o == PLUS_ASSIGN ? InfixExpression.Operator.PLUS\n : o == MINUS_ASSIGN ? MINUS\n : o == TIMES_ASSIGN ? TIMES\n : o == DIVIDE_ASSIGN ? DIVIDE\n : o == BIT_AND_ASSIGN ? AND\n : o == BIT_OR_ASSIGN ? OR\n : o == BIT_XOR_ASSIGN ? XOR\n : o == REMAINDER_ASSIGN ? REMAINDER\n : o == LEFT_SHIFT_ASSIGN ? LEFT_SHIFT\n : o == RIGHT_SHIFT_SIGNED_ASSIGN ? RIGHT_SHIFT_SIGNED\n : o == RIGHT_SHIFT_UNSIGNED_ASSIGN ? RIGHT_SHIFT_UNSIGNED : null;\n }", "public interface VariableExpander {\n /**\n * Return the input string with any variables replaced by their\n * corresponding value. If there are no variables in the string,\n * then the input parameter is returned unaltered.\n */\n public String expand(String param);\n }", "JavaExpression createJavaExpression();", "public static BinaryExpression powerAssign(Expression expression0, Expression expression1, Method method, LambdaExpression lambdaExpression) { throw Extensions.todo(); }", "CDAssignStatement(CDExpression destination, CDExpression source) {\n _destination = destination;\n _source = source;\n }", "public Expression deepCopy()\r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t}", "public OnSetClause addAssignment(Expression expression) {\n assignments.add(new Assignment(expression));\n return this;\n }", "public AssignStatement(Element element) {\n super(element);\n }", "public ValueEvidenceStatement replace(Term t, ArgSpec another) {\n Term newLeftSide = (Term) leftSide.replace(t, another);\n Term newOutput = (Term) output.replace(t, another);\n if (newOutput != leftSide || newOutput != output) {\n ValueEvidenceStatement newVES = new ValueEvidenceStatement(newLeftSide,\n newOutput);\n if (compiled)\n newVES.compile(new LinkedHashSet());\n return newVES;\n }\n return this;\n }", "@Generated(value={\"edu.jhu.cs.bsj.compiler.utils.generator.SourceGenerator\"})\npublic interface ExpressionNode extends Node, VariableInitializerNode\n{\n /**\n * Generates a deep copy of this node.\n * @param factory The node factory to use to create the deep copy.\n * @return The resulting deep copy node.\n */\n @Override\n public ExpressionNode deepCopy(BsjNodeFactory factory);\n \n}", "public void setExpression(Expression expression) {\n if (expression == null) {\n throw new IllegalArgumentException();\n }\n ASTNode oldChild = this.expression;\n preReplaceChild(oldChild, expression, EXPRESSION_PROPERTY);\n this.expression = expression;\n postReplaceChild(oldChild, expression, EXPRESSION_PROPERTY);\n }", "protected Expr visitSettableAssign(SettableAssign n) throws SemanticException {\n Position pos = n.position();\n MethodInstance mi = n.methodInstance();\n List<Expr> args = new ArrayList<Expr>(n.index());\n if (n.operator() == Assign.ASSIGN) {\n // FIXME: this changes the order of evaluation, (a,i,v) -> (a,v,i)!\n args.add(0, n.right());\n return xnf.Call(pos, n.array(), xnf.Id(pos, mi.name()),\n args).methodInstance(mi).type(mi.returnType());\n }\n X10Binary_c.Operator op = n.operator().binaryOperator();\n X10Call left = (X10Call) n.left();\n MethodInstance ami = left.methodInstance();\n List<Formal> parms = new ArrayList<Formal>();\n Name xn = Name.make(\"x\");\n LocalDef xDef = xts.localDef(pos, xts.Final(), Types.ref(mi.container()), xn);\n Formal x = xnf.Formal(pos, xnf.FlagsNode(pos, xts.Final()),\n xnf.CanonicalTypeNode(pos, mi.container()), xnf.Id(pos, xn)).localDef(xDef);\n parms.add(x);\n List<Expr> idx1 = new ArrayList<Expr>();\n int i = 0;\n for (Type t : ami.formalTypes()) {\n Name yn = Name.make(\"y\"+i);\n LocalDef yDef = xts.localDef(pos, xts.Final(), Types.ref(t), yn);\n Formal y = xnf.Formal(pos, xnf.FlagsNode(pos, xts.Final()),\n xnf.CanonicalTypeNode(pos, t), xnf.Id(pos, yn)).localDef(yDef);\n parms.add(y);\n idx1.add(xnf.Local(pos, xnf.Id(pos, yn)).localInstance(yDef.asInstance()).type(t));\n i++;\n }\n Name zn = Name.make(\"z\");\n Type T = mi.formalTypes().get(0);\n assert (xts.isSubtype(ami.returnType(), T, context()));\n LocalDef zDef = xts.localDef(pos, xts.Final(), Types.ref(T), zn);\n Formal z = xnf.Formal(pos, xnf.FlagsNode(pos, xts.Final()),\n xnf.CanonicalTypeNode(pos, T), xnf.Id(pos, zn)).localDef(zDef);\n parms.add(z);\n Expr val = visitBinary((X10Binary_c) xnf.Binary(pos,\n xnf.Call(pos,\n xnf.Local(pos, xnf.Id(pos, xn)).localInstance(xDef.asInstance()).type(mi.container()),\n xnf.Id(pos, ami.name()), idx1).methodInstance(ami).type(T),\n op, xnf.Local(pos, xnf.Id(pos, zn)).localInstance(zDef.asInstance()).type(T)).type(T));\n List<Expr> args1 = new ArrayList<Expr>(idx1);\n args1.add(0, val);\n Type ret = mi.returnType();\n Expr res = xnf.Call(pos,\n xnf.Local(pos, xnf.Id(pos, xn)).localInstance(xDef.asInstance()).type(mi.container()),\n xnf.Id(pos, mi.name()), args1).methodInstance(mi).type(ret);\n // Have to create the appropriate node in case someone defines a set():void\n Block block = ret.isVoid() ?\n xnf.Block(pos, xnf.Eval(pos, res), xnf.Return(pos, xnf.Call(pos,\n xnf.Local(pos, xnf.Id(pos, xn)).localInstance(xDef.asInstance()).type(mi.container()),\n xnf.Id(pos, ami.name()), idx1).methodInstance(ami).type(T))) :\n xnf.Block(pos, xnf.Return(pos, res));\n Closure c = synth.makeClosure(pos, T, parms, block, context());\n X10MethodInstance ci = c.closureDef().asType().applyMethod();\n args.add(0, n.array());\n args.add(n.right());\n return xnf.ClosureCall(pos, c, args).closureInstance(ci).type(ret);\n }", "@Override\n public Expression differentiate(String var) {\n Expression left = super.getLeft();\n Expression right = super.getRight();\n return new Plus(new Mult(left.differentiate(var), right), new Mult(left, right.differentiate(var)));\n }", "public Object clone() {\n\t\treturn new RelExpr((Term)getTerm(0).clone(), op, (Term)getTerm(1).clone());\n\t}", "public void reAssign(Object o) {\n\t}", "public Expression(String expr) {\n this.expr = expr;\n scalars = null;\n arrays = null;\n openingBracketIndex = null;\n closingBracketIndex = null;\n }", "private Expression toExpression() {\n Expression lhs = null, rhs = null;\n if (base instanceof DerefSymbol) {\n lhs = ((DerefSymbol)base).toExpression();\n } else if (base instanceof AccessSymbol) {\n lhs = ((AccessSymbol)base).toExpression();\n } else if (base instanceof Identifier) {\n lhs = new Identifier(base);\n } else {\n PrintTools.printlnStatus(0,\n \"[WARNING] Unexpected access expression type\");\n return null;\n }\n rhs = new Identifier(member);\n return new AccessExpression(lhs, AccessOperator.MEMBER_ACCESS, rhs);\n }", "@Override\r\n\tpublic void visit(VariableExpression variableExpression) {\n\r\n\t}", "public static BinaryExpression leftShiftAssign(Expression expression0, Expression expression1, Method method) { throw Extensions.todo(); }", "public IAspectVariable<V> createNewVariable(PartTarget target);", "public static BinaryExpression andAssign(Expression expression0, Expression expression1, Method method, LambdaExpression lambdaExpression) { throw Extensions.todo(); }", "public static BinaryExpression powerAssign(Expression expression0, Expression expression1) { throw Extensions.todo(); }" ]
[ "0.73668355", "0.7034306", "0.7005764", "0.6944845", "0.6774997", "0.64998084", "0.6493448", "0.6328385", "0.6308965", "0.6283412", "0.6095667", "0.5997035", "0.5934935", "0.5930988", "0.58866805", "0.58416337", "0.580657", "0.5744082", "0.56803864", "0.5672348", "0.5623662", "0.56120205", "0.56054866", "0.5597519", "0.5564711", "0.55592835", "0.55281514", "0.55206585", "0.5516292", "0.5512503", "0.55120885", "0.5496669", "0.54964215", "0.54549766", "0.5441331", "0.5441234", "0.54252136", "0.5421547", "0.5385923", "0.5350206", "0.53488934", "0.5318075", "0.5308968", "0.5269893", "0.5240991", "0.5239569", "0.52042645", "0.5191325", "0.5184173", "0.5181534", "0.5151489", "0.5148702", "0.51431507", "0.51211214", "0.51126", "0.51020485", "0.50890553", "0.50875986", "0.5084805", "0.5081827", "0.50792396", "0.50792205", "0.5076839", "0.50743747", "0.50653744", "0.5051148", "0.50428236", "0.50325954", "0.5030765", "0.50294626", "0.5029098", "0.501976", "0.5019538", "0.5014947", "0.50141567", "0.5006784", "0.499902", "0.4982463", "0.49676716", "0.49581864", "0.49527508", "0.4942258", "0.4941005", "0.49329188", "0.4931878", "0.4931017", "0.49293137", "0.492365", "0.49167454", "0.49054867", "0.48999912", "0.48948288", "0.4893597", "0.4891952", "0.48734432", "0.4868752", "0.48674348", "0.48650932", "0.48624855", "0.4861606" ]
0.67538005
5
Checks if equal with no importance to order.
public boolean isEqual(Expression other) { Expression left = super.getLeft(); Expression right = super.getRight(); if (other instanceof Mult) { return (((Mult) other).getLeft().toString().equals(left.toString()) && ((Mult) other).getRight().toString().equals(right.toString())) || ((Mult) other).getLeft().toString().equals(right.toString()) && ((Mult) other).getRight().toString().equals(left.toString()); } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isOrderCertain();", "@SuppressWarnings(\"unlikely-arg-type\")\n @Test\n public void testEquals() {\n Order order = new Order(\"Test\", LocalTime.NOON, GridCoordinate.ZERO);\n Order same = new Order(\"Test\", LocalTime.NOON, GridCoordinate.ZERO);\n Order other = new Order(\"Test\", LocalTime.MIDNIGHT, GridCoordinate.ZERO);\n Order another = new Order(\"Test\", LocalTime.NOON, GridCoordinate.of(1, 1));\n Order more = new Order(\"Test2\", LocalTime.NOON, GridCoordinate.ZERO);\n\n Assert.assertTrue(\"Two objects with the same addresses should be equal.\", order.equals(order));\n Assert.assertFalse(\"Null check.\", order.equals(null));\n Assert.assertFalse(\"Type check.\", order.equals(\"\"));\n Assert.assertFalse(\"Different order times.\", order.equals(other));\n Assert.assertFalse(\"Different customer locations.\", order.equals(another));\n Assert.assertFalse(\"Different order IDs.\", order.equals(more));\n Assert.assertTrue(\"Same values.\", order.equals(same));\n }", "@Override\n\tpublic boolean equal() {\n\t\treturn false;\n\t}", "@Test\n public void equals_DifferentPriceCents_Test() {\n Assert.assertFalse(bq1.equals(bq5));\n }", "@Test\n public void testEquality() {\n final Decimal P1 = new Decimal(700);\n final Decimal A1 = new Decimal(15.2);\n final int C1 = 5;\n Order o1 = new Order(P1, A1, C1);\n assertFalse(o1.equals(null));\n Order o2 = new Order(P1, A1, C1);\n assertTrue(o1.equals(o2));\n \n final Decimal P2 = new Decimal(0.0000000007);\n final Decimal A2 = new Decimal(15.2);\n final int C2 = 4;\n o2 = new Order(P2, A2, C2);\n assertFalse(o1.equals(o2));\n assertFalse(o2.equals(o1));\n o1 = new Order(P2, A2, C2);\n assertTrue(o1.equals(o2));\n\n // Try null count\n o2 = new Order(P2, A2, null);\n assertFalse(o1.equals(o2));\n assertFalse(o2.equals(o1));\n \n o1 = new Order(P2, A2, 0);\n assertFalse(o1.equals(o2));\n assertFalse(o2.equals(o1));\n o1 = new Order(P2, A2, -1);\n assertFalse(o1.equals(o2));\n assertFalse(o2.equals(o1));\n \n // Try both with null count\n o1 = new Order(P2, A2, null);\n assertTrue(o2.equals(o1));\n \n }", "public final boolean equal() {\n\t\tif (size > 1) {\n\t\t\tdouble topMostValue = pop();\n\t\t\tdouble secondTopMostValue = pop();\n\t\t\tif (topMostValue == secondTopMostValue) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "@Test\n @DisplayName(\"Test should detect inequality between unequal states.\")\n public void testShouldResultInInequality() {\n ObjectBag os1 = new ObjectBag(null, \"Hi\");\n ObjectBag os2 = new ObjectBag(null, \"Goodbye\");\n\n Assertions.assertThat(os1).isNotEqualTo(os2);\n }", "@SuppressWarnings({\"UnnecessaryLocalVariable\"})\n @Test\n void testEqualsAndHashCode(SoftAssertions softly) {\n SortOrder sortOrder0 = new SortOrder(\"i0\", true, false, true);\n SortOrder sortOrder1 = sortOrder0;\n SortOrder sortOrder2 = new SortOrder(\"i0\", true, false, true);\n\n softly.assertThat(sortOrder0.hashCode()).isEqualTo(sortOrder2.hashCode());\n //noinspection EqualsWithItself\n softly.assertThat(sortOrder0.equals(sortOrder0)).isTrue();\n //noinspection ConstantConditions\n softly.assertThat(sortOrder0.equals(sortOrder1)).isTrue();\n softly.assertThat(sortOrder0.equals(sortOrder2)).isTrue();\n\n SortOrder sortOrder3 = new SortOrder(\"i1\", true, false, true);\n softly.assertThat(sortOrder0.equals(sortOrder3)).isFalse();\n\n //noinspection EqualsBetweenInconvertibleTypes\n softly.assertThat(sortOrder0.equals(new SortOrders())).isFalse();\n }", "@Test\n void compareTo_Identical_AllParts()\n {\n runIsMatchTest(AnswerType.yes, AnswerType.yes, AnswerType.yes, AnswerType.yes, ContactMatchType.Identical);\n }", "@Test\n\tpublic void testEqualsFalso() {\n\t\t\n\t\tassertFalse(contato1.equals(contato2));\n\t}", "boolean hasIsEquivalent();", "public void equal() {\n if (operatorAssigned != Operator.NON || operatorType != Operator.NON) {\n double subResult;\n if (numberStored[1] != 0) {\n subResult = basicCalculation(numberStored[1], Double.parseDouble(mainLabel.getText()), operatorType);\n numberStored[0] = basicCalculation(numberStored[0], subResult, operatorAssigned);\n numberStored[1] = 0;\n mainLabel.setText(Double.toString(numberStored[0]));\n } else {\n numberStored[0] = basicCalculation(numberStored[0], Double.parseDouble(mainLabel.getText()), operatorType);\n mainLabel.setText(Double.toString(numberStored[0]));\n }\n }\n operatorAssigned = Operator.NON;\n operatorType = Operator.NON;\n }", "public boolean equals(Object o) { return compareTo(o) == 0; }", "@Override\r\n\t\tpublic boolean equalsWithOrder(\r\n\t\t\t\tPair<? extends T, ? extends S> anotherPair) {\n\t\t\tsynchronized (mutex) {\r\n\t\t\t\treturn pair.equalsWithOrder(anotherPair);\r\n\t\t\t}\r\n\t\t}", "boolean hasAlreadCompareLose();", "public boolean hasAdjacentEqualPair()\n { \n \tfor( int i = 0; i < purchases.size()-1; i++ )\n \t{\n \t\tGizmo curr = purchases.get( i );\n \t\tGizmo nxt = purchases.get( i + 1 );\n \t\tif( curr.equals( nxt ) )\n \t\t\treturn true;\n \t}\n \treturn false; \t\n }", "@Test\n void compareTo_NoMatch_AllParts() {\n runIsMatchTest(AnswerType.no, AnswerType.no, AnswerType.no, AnswerType.no, ContactMatchType.NoMatch);\n }", "@Test\n\tpublic void testEqualsVerdadeiro() {\n\t\t\n\t\tassertTrue(contato1.equals(contato3));\n\t}", "@Test\r\n public void testEqualscoupon() {\r\n log.info(\"starting testEqualscoupon()\");\r\n\tassertFalse (\"coupon1 NOT equal coupon2\", coupon1.equals(coupon2));\r\n\tlog.info (\"testNOTEqualscoupon PASSED\");\t\t\r\n }", "public boolean orderedEquals( Deck otherDeck ) {\n if (this.cards.length == otherDeck.cards.length) {\n for (int i = 0; i < this.cards.length; i++ ) {\n if (!this.cards[i].equals(otherDeck.cards[i])) {\n return false;\n }\n }\n return true;\n }\n return false;\n }", "@Test public void equalsTest() throws NegativeValueException {\n PetBunny pb1 = new PetBunny(\"Floppy\", \"Holland Lop\", 3.5);\n PetBunny same = new PetBunny(\"Floppy\", \"Holland Lop\", 3.5);\n PetBunny badName = new PetBunny(\"Flop\", \"Holland Lop\", 3.5);\n PetBunny badBreed = new PetBunny(\"Floppy\", \"Holland Plop\", 3.5);\n PetBunny badWeight = new PetBunny(\"Floppy\", \"Holland Lop\", 5.0);\n String nothing = \"test\";\n \n Assert.assertTrue(pb1.equals(same));\n Assert.assertFalse(pb1.equals(nothing));\n Assert.assertFalse(pb1.equals(badName));\n Assert.assertFalse(pb1.equals(badBreed));\n Assert.assertFalse(pb1.equals(badWeight));\n }", "private boolean isRankConsistent() {\r\n for (int i = 0; i < size(); i++)\r\n if (i != rank(select(i))) return false;\r\n for (Key key : keys())\r\n if (key.compareTo(select(rank(key))) != 0) return false;\r\n return true;\r\n }", "private boolean isRankConsistent() {\n for (int i = 0; i < size(); i++)\n if (i != rank(select(i))) return false;\n for (K key : keys())\n if (key.compareTo(select(rank(key))) != 0) return false;\n return true;\n }", "public final boolean lessThanEquals() {\n\n\t\tif (size > 1) {\n\n\t\t\tdouble topMostValue = pop();\n\t\t\tdouble secondTopMostValue = pop();\n\t\t\tif (secondTopMostValue <= topMostValue) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "@Override // com.google.common.base.Equivalence\n public boolean doEquivalent(Object a, Object b) {\n return false;\n }", "public static void assertInEqualStrict( Object expected, Object actual ){\r\n\t\tassertInEqual( expected, actual );\r\n\t\tassertTrue( \r\n\t\t\tString.format(\"%s.hashcode() is expected to be inequal to %s.hashcode()\", expected, actual), \r\n\t\t\t!expected.equals(actual) );\t\r\n\t}", "private boolean checkVolume(Order otherOrder) {\n\t\treturn getVolume() == otherOrder.getVolume();\n\t}", "private boolean isValuesEqual(BinaryMessage tocmp, BinaryMessage original) {\n\t\tif(tocmp.getValue().equals(original.getValue())) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "@Test\n public void equals_SameBuyQuery_Test() {\n Assert.assertTrue(bq1.equals(bq0));\n }", "@Test\n public void testEquals_2() {\n LOGGER.info(\"testEquals_2\");\n final AtomString atomString = new AtomString(\"Hello\");\n final Atom atom = new AtomString(\"Hej\");\n final boolean actual = atomString.equals(atom);\n assertFalse(actual);\n }", "public boolean allDuplicatesEqual() {\n int[] input = {1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5};\n int dupA = findDuplicatesA(input);\n int dupB = findDuplicatesB(input);\n int dupC = findDuplicatesC(input);\n int dupD = findDuplicatesD(input);\n int dupE = findDuplicatesE(input);\n return dupA == dupB && dupA == dupC && dupA == dupD && dupA == dupE;\n }", "public boolean equivalent(Tradeoff trade)\r\n\t{\r\n\t\tboolean eq = false;\r\n\t\tif ((trade.getOnt1().toString().equals(ont1.toString())) &&\r\n\t\t\t\t(trade.getOnt2().toString().equals(ont2.toString())))\r\n\t\t\teq = true;\r\n\t\telse if ((trade.getOnt1().toString().equals(ont2.toString())) &&\r\n\t\t\t\t(trade.getOnt2().toString().equals(ont1.toString())))\r\n\t\t\teq = true;\r\n\t\treturn eq;\r\n\t}", "private boolean isApproximatelyEqual(Node n, Node first) {\r\n\t\tDouble nwD = n.getWeightValueUnsynchronized(\"value\");\r\n\t\tdouble nw = nwD==null ? 1.0 : nwD.doubleValue();\r\n\t\tDouble fwD = first.getWeightValueUnsynchronized(\"value\");\r\n\t\tdouble fw = fwD==null ? 1.0 : fwD.doubleValue();\r\n\t\treturn fw*_alphaFactor <= nw &&\r\n\t\t\t first.getNborsUnsynchronized().size()*_alphaFactor >= \r\n\t\t\t n.getNborsUnsynchronized().size();\r\n\t}", "boolean hasSameAs();", "@SuppressWarnings(\"resource\")\n @Test\n public void testEquals() {\n try {\n SubtenantPolicyGroupListOptions subtenantpolicygrouplistoptions1 = new SubtenantPolicyGroupListOptions(Integer.valueOf(-51),\n Long.valueOf(105),\n Order.getDefault(),\n \"efc9e20d-db05-4f2f-b41f-016029d4faff\",\n null,\n null);\n SubtenantPolicyGroupListOptions subtenantpolicygrouplistoptions2 = new SubtenantPolicyGroupListOptions(Integer.valueOf(-51),\n Long.valueOf(105),\n Order.getDefault(),\n \"efc9e20d-db05-4f2f-b41f-016029d4faff\",\n null,\n null);\n SubtenantPolicyGroupListOptions subtenantpolicygrouplistoptions3 = new SubtenantPolicyGroupListOptions(Integer.valueOf(101),\n Long.valueOf(87),\n Order.getDefault(),\n \"99c3b952-8e9d-4dd1-9075-8be04a5e58e8\",\n null,\n null);\n assertNotNull(subtenantpolicygrouplistoptions1);\n assertNotNull(subtenantpolicygrouplistoptions2);\n assertNotNull(subtenantpolicygrouplistoptions3);\n assertNotSame(subtenantpolicygrouplistoptions2, subtenantpolicygrouplistoptions1);\n assertNotSame(subtenantpolicygrouplistoptions3, subtenantpolicygrouplistoptions1);\n assertEquals(subtenantpolicygrouplistoptions2, subtenantpolicygrouplistoptions1);\n assertEquals(subtenantpolicygrouplistoptions2, subtenantpolicygrouplistoptions1);\n assertEquals(subtenantpolicygrouplistoptions1, subtenantpolicygrouplistoptions2);\n assertEquals(subtenantpolicygrouplistoptions1, subtenantpolicygrouplistoptions1);\n assertFalse(subtenantpolicygrouplistoptions1.equals(null));\n assertNotEquals(subtenantpolicygrouplistoptions3, subtenantpolicygrouplistoptions1);\n } catch (Exception exception) {\n fail(exception.getMessage());\n }\n }", "@Test\n\tpublic void testEqualityCheck() {\n\t\tadd(\"f(x)=x^3\");\n\t\tadd(\"g(x)=-x^3\");\n\t\tt(\"f==g\", \"false\");\n\t\tt(\"f!=g\", \"true\");\n\t\tt(\"f==-g\", \"true\");\n\t\tt(\"f!=-g\", \"false\");\n\t}", "@Test\n public void equals_trulyEqual() {\n SiteInfo si1 = new SiteInfo(\n Amount.valueOf(12000, SiteInfo.CUBIC_FOOT),\n Amount.valueOf(76, NonSI.FAHRENHEIT),\n Amount.valueOf(92, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n 56,\n Damage.CLASS2,\n Country.USA,\n \"Default Site\"\n );\n SiteInfo si2 = new SiteInfo(\n Amount.valueOf(12000, SiteInfo.CUBIC_FOOT),\n Amount.valueOf(76, NonSI.FAHRENHEIT),\n Amount.valueOf(92, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n 56,\n Damage.CLASS2,\n Country.USA,\n \"Default Site\"\n );\n\n Assert.assertEquals(si1, si2);\n }", "@Test\n @DisplayName(\"Test should detect equality between equal states.\")\n public void testShouldResultInEquality() {\n ObjectBag os1 = new ObjectBag(null, \"Hi\");\n ObjectBag os2 = new ObjectBag(null, \"Hi\");\n\n Assertions.assertThat(os1).isEqualTo(os2);\n }", "private boolean checkComp() {\n\t\tfor (int i = 0; i < comp.length; i++) {\n\t\t\tfor (int j = 0; j < comp[i].length; j++) {\n\t\t\t\tif (comp[i][j] != answer[i][j]) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "@Test\n public void equals_DifferentObjects_Test() {\n Assert.assertFalse(bq1.equals(ONE));\n }", "@Test\n public void testEquals_3() {\n LOGGER.info(\"testEquals_3\");\n final AtomString atomString = new AtomString(\"Hello\");\n final Atom atom = null;\n final boolean actual = atomString.equals(atom);\n assertFalse(actual);\n }", "@Test\n\tpublic void compareToReturnsAPositiveIntegerWhenUnitWithSmallerSymbolIsProvided() {\n\t\tDummyUnit unit = new DummyUnit(\"b\");\n\t\tDummyUnit otherUnit = new DummyUnit(\"a\");\n\t\tassertTrue(unit.compareTo(otherUnit) > 0);\n\t}", "public boolean isEquals() {\n long len = -1L;\n\n //1. check the lengths of the words\n for(S left : slp.getAxioms()) {\n if(len == -1L) {\n len = slp.length(left);\n }\n else {\n if(len != slp.length(left)) {\n return false;\n }\n }\n }\n\n // all words are the empty word\n if(len == 0) {\n return true;\n }\n\n // 2. the length are all equals and not zero => execute the recompression\n execute();\n\n S otherSymbol = null;\n boolean first = true;\n\n // 3. chech now if for all axioms X : |val(X)| = 1 and all val(X) are equals.\n for(S left : slp.getAxioms()) {\n if(first) {\n slp.length(left, true);\n first = false;\n }\n\n if(slp.length(left) != 1) {\n return false;\n }\n else {\n S symbol = slp.get(left, 1);\n if(otherSymbol == null) {\n otherSymbol = symbol;\n }\n\n if(!symbol.equals(otherSymbol)) {\n return false;\n }\n }\n }\n\n return true;\n }", "protected abstract boolean isEqual(E entryA, E entryB);", "private static boolean allElementsEqual(Mark[] array) {\n\t\t\n\t\tboolean areEqual = true;\n\t\t\n for(int i=0 ; i < array.length; i++) {\n \t\n \t\n \tif (array[i] == null) {\n \t\tareEqual = false;\n \t\tbreak;\n \t}\n \t\n if(!array[0].equals(array[i])) {\n areEqual = false;\n break;\n }\n }\n\n return areEqual;\n }", "@Test\n\tpublic void compareToReturnsZeroWhenUnitWithSameSymbolIsProvided() {\n\t\tDummyUnit unit = new DummyUnit(SYMBOL);\n\t\tDummyUnit otherUnit = new DummyUnit(SYMBOL);\n\t\tassertEquals(0, unit.compareTo(otherUnit));\n\t}", "@Test\n\tpublic void compareToReturnsAPositiveNumberWhenUnitWithSameSymbolButSmallerNameIsProvided() {\n\t\tDummyUnit unit = new DummyUnit(SYMBOL);\n\t\tunit.setName(\"b\");\n\t\tDummyUnit otherUnit = new DummyUnit(SYMBOL);\n\t\totherUnit.setName(\"a\");\n\t\tassertTrue(unit.compareTo(otherUnit) > 0);\n\t}", "@Override\r\n\tpublic boolean isEqual(Node node) {\n\t\treturn false;\r\n\t}", "@Override\n\tpublic int compareTo(BuyOrder order) {\n\t\treturn 0;\n\t}", "@Test\r\n public void testEquals() {\r\n Articulo art = new Articulo();\r\n articuloPrueba.setCodigo(1212);\r\n art.setCodigo(1212);\r\n boolean expResult = true;\r\n boolean result = articuloPrueba.equals(art);\r\n assertEquals(expResult, result);\r\n }", "@Test\n public void testEquals() {\n assertFalse(jesseOberstein.equals(nathanGoodman));\n assertTrue(kateHutchinson.equals(kateHutchinson));\n }", "public static boolean proveEquality(Tableau tableau) {\n boolean retVal = expandAllAlphas(tableau);\n // Deltas\n retVal = expandAllDeltas(tableau) || retVal;\n // Brown's rule\n retVal = tableau.applyAllBrowns() || retVal;\n // Beta or Gamma\n if (expandOneBeta(tableau))\n return true;\n if (Prover.unifyEquality(tableau) != null)\n return false;\n return expandOneGamma(tableau) || retVal;\n }", "@Test\n public void equality() {\n new EqualsTester()\n .addEqualityGroup(UnitConverters.identity())\n .addEqualityGroup(UnitConverters.shift(100))\n .addEqualityGroup(UnitConverters.multiply(2))\n .addEqualityGroup(UnitConverters.pow(10, 6))\n .addEqualityGroup(UnitConverters.pow(UnitConverters.multiply(5), 2))\n .addEqualityGroup(UnitConverters.root(UnitConverters.multiply(5), 2))\n .addEqualityGroup(UnitConverters.compose(UnitConverters.shift(100), UnitConverters.multiply(2)))\n .testEquals();\n }", "@Test\n public void equalsOtherTest3() {\n assertFalse(device.equals(null));\n }", "private boolean equals(double x, double y) {\n return Math.abs(x - y) <= TOLERANCE;\n }", "public boolean check() {\n BigInteger t1 = y.modPow(int2, c.p);\n BigInteger t2 = x.modPow(int3, c.p);\n BigInteger t3 = ((t2.add(c.a.multiply(x))).add(c.b)).mod(c.p);\n return t1.compareTo(t3) == 0;\n }", "public static void assertEqualsStrict(Object expected, Object actual){\r\n\t\tassertEquals( expected, actual );\r\n\t\tassertEquals( \"hashcode() is not equal: \", expected.hashCode(), actual.hashCode());\r\n\t}", "@Test\n\tpublic void compareToReturnsPositiveNumberWhenTheOtherUnitHasNoSymbol() {\n\t\tDummyUnit unit = new DummyUnit(SYMBOL);\n\t\tDummyUnit otherUnit = new DummyUnit(null);\n\t\tassertTrue(unit.compareTo(otherUnit) > 0);\n\t}", "public boolean equal (Bag u) {\n return u.cardinality() == this.cardinality();\n }", "@Test\n \tpublic void testNotEqual() {\n \t\tAssert.assertFalse(f1.equals(f2));\n \t}", "public boolean isConsistent()\n\t{\n\t\tfinal List<AbsoluteFeatureElement> checkedAbsolutes = new ArrayList<AbsoluteFeatureElement>();\n\t\tfinal List<RelativeFeatureElement> checkedRelatives = new ArrayList<RelativeFeatureElement>();\n\t\t\n\t\tfor (final FeatureElement element : featureElements)\n\t\t{\n\t\t\tif (element instanceof AbsoluteFeatureElement)\n\t\t\t{\n\t\t\t\tfinal AbsoluteFeatureElement abs = (AbsoluteFeatureElement) element;\n\t\t\t\t\n\t\t\t\tfor (final AbsoluteFeatureElement other : checkedAbsolutes)\n\t\t\t\t{\n\t\t\t\t\tif (abs.position() == other.position())\t// same positions, so need compatible elements\n\t\t\t\t\t{\n\t\t\t\t\t\tif (!(abs.equals(other) || abs.isCompatibleWith(other) || abs.generalises(other) || other.generalises(abs)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcheckedAbsolutes.add(abs);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tfinal RelativeFeatureElement rel = (RelativeFeatureElement) element;\n\t\t\t\t\n\t\t\t\tfor (final RelativeFeatureElement other : checkedRelatives)\n\t\t\t\t{\n\t\t\t\t\tif (rel.walk().equals(other.walk()))\t// equal Walks, so need compatible elements\n\t\t\t\t\t{\n\t\t\t\t\t\tif (!(rel.equals(other) || rel.isCompatibleWith(other) || rel.generalises(other) || other.generalises(rel)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcheckedRelatives.add(rel);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "public boolean isInconsistentWith(BuildPtr that) {\n return signOfCompare(this.posByN,that.posByN) * signOfCompare(this.posByID,that.posByID) < 0;\n }", "@Override // com.google.common.base.Equivalence\n public boolean doEquivalent(Object a, Object b) {\n return a.equals(b);\n }", "@Test public void compareToTest3() throws NegativeValueException {\n PetBunny pb1 = new PetBunny(\"Floppy\", \"Holland Lop\", 3.5);\n ShowBunny sb1 = new ShowBunny(\"Bigun\", \"Flemish Giant\", 2.0, 22.0);\n \n Assert.assertTrue(pb1.compareTo(sb1) > 0);\n }", "public boolean almostEqual(double a, double b);", "protected boolean isEqual( Object lhs, Object rhs ){\r\n\t\tboolean x = lhs==null;\r\n\t\tboolean y = rhs == null;\r\n\t\t//XOR OPERATOR, only one is null\r\n\t\tif ((x || y) && !(x && y))\r\n\t\t\treturn false;\r\n\t\tif (lhs.equals(rhs))\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}", "public boolean isEqual(Heaper anObject) {\n\treturn anObject.getCategory() == getCategory();\n/*\nudanax-top.st:15781:SequenceSpace methodsFor: 'testing'!\n{BooleanVar} isEqual: anObject {Heaper}\n\t\"is equal to any basic space on the same category of positions\"\n\t^anObject getCategory == self getCategory!\n*/\n}", "@Test\n public void testIsSameCurrency() {\n \n Money moneyUsd = new Money(new BigDecimal(\"1.23\"), Currency.getInstance(\"USD\"));\n Money moneyUsd2 = new Money(new BigDecimal(\"1.23\"), Currency.getInstance(\"USD\"));\n Money moneyCad = new Money(new BigDecimal(\"1.23\"), Currency.getInstance(\"CAD\"));\n\n assertTrue(\"Currencies same\", moneyUsd.isSameCurrency(moneyUsd2));\n assertTrue(\"Currencies same symmetric\", moneyUsd2.isSameCurrency(moneyUsd));\n assertFalse(\"Currencies different\", moneyUsd.isSameCurrency(moneyCad));\n \n }", "@Test\n\tpublic void test_equals2() {\n\tTennisPlayer c1 = new TennisPlayer(11,\"Joe Tsonga\");\n\tTennisPlayer c2 = new TennisPlayer(521,\"Joe Tsonga\");\n\tassertFalse(c1.equals(c2));\n }", "@Override\n public boolean equals(Object other) {\n if (!(other instanceof BigNumber)) return false;\n BigNumber that = (BigNumber) other;\n if (this.isNaN()) return that.isNaN();\n if (that.isNaN()) return this.isNaN();\n if (this.isZero()) return that.isZero();\n if (that.isZero()) return this.isZero();\n if (this.sign != that.sign) return false;\n if (this.isInfinite()) return that.isInfinite();\n if (that.isInfinite()) return this.isInfinite();\n \n // adjust exponent before comparing mantissa\n int emin = Math.min(this.exponent, that.exponent);\n int dThis = this.exponent - emin;\n int dThat = that.exponent - emin;\n \n for (int i=0; i<Math.max(this.mantissa.length+dThis, that.mantissa.length+dThat); i++) {\n if (this.getMantissaBit(i-dThis) != that.getMantissaBit(i-dThat)) return false;\n }\n return true;\n }", "@Override\n protected boolean runInEQ() {\n return true;\n }", "private boolean isEqual(int[] x, int[] y) {\n for (int i = 0; i < 3; i++) {\n if (x[i] != y[i]) {\n return false;\n }\n }\n return true;\n }", "public void testEqualsObject() {\n\t\t\tTipoNodoLeisure tipo1 = new TipoNodoLeisure(Messages.getString(\"TipoNodoLeisureTest.0\")); //$NON-NLS-1$\n\t\t\tTipoNodoLeisure tipo2= new TipoNodoLeisure(Messages.getString(\"TipoNodoLeisureTest.1\")); //$NON-NLS-1$\n\t\t\tTipoNodoLeisure tipo3= new TipoNodoLeisure(Messages.getString(\"TipoNodoLeisureTest.2\")); //$NON-NLS-1$\n\t\t\tif (tipo1 != tipo1)\n\t\t\t\tfail(Messages.getString(\"TipoNodoLeisureTest.3\")); //$NON-NLS-1$\n\t\t\tif (!tipo1.equals(tipo2))\n\t\t\t\tfail(Messages.getString(\"TipoNodoLeisureTest.4\"));\t\t\t //$NON-NLS-1$\n\t\t\tif (tipo1.equals(tipo3))\n\t\t\t\tfail(Messages.getString(\"TipoNodoLeisureTest.5\"));\t //$NON-NLS-1$\n\t\t}", "private void assertTrue(boolean equals) {\n\t\t\r\n\t}", "public static void main(String[] args) {\n int n1 = 0;\n int n2 = 0;\n int n3 = 0;\n if (n1 == n2 && n1 != n3) {\n System.out.println(\"n1 and n2 equal\");\n } else if (n2 == n3 && n2 != n1) {\n System.out.println(\"n2 and n3 equal\");\n } else if (n3 == n1 && n1 != n2) {\n System.out.println(\"n3 and n1 equal\");\n } else if (n1 == n2 && n1 == n3) {\n System.out.println(\"all equal\");\n }\n else {\n System.out.println(\"none equal\");\n }\n }", "@Override\n public BL equal(final ANY that) {\n\t\tif (that instanceof TS) {\n\t\t\tfinal TS thatTS = (TS) that;\n\t\t\treturn this.minus(thatTS).isZero();\n\t\t} else {\n\t\t\treturn BLimpl.FALSE;\n\t\t}\n\t}", "public boolean checkEquality(){\n boolean flag = true;\n for (int i = 0; i < boardRows ; i++) {\n for (int j = 0; j < boardColumns; j++) {\n if(this.currentBoardState[i][j] != this.goalBoardState[i][j]){\n flag = false;\n }\n }\n }\n return flag;\n }", "public boolean isEqual(Edge e){\n if(v1.equals(e.v1) && v2.equals(e.v2)){\n return true;\n }\n else if(v1.equals(e.v2) && v2.equals(e.v1)){\n return true;\n }\n else{\n return false;\n }\n }", "@Test\n public void equals() {\n ReturnOrder aliceCopy = new ReturnOrderBuilder(ALICE_RETURN).build();\n assertTrue(ALICE_RETURN.equals(aliceCopy));\n\n // same object -> returns true\n assertTrue(ALICE_RETURN.equals(ALICE_RETURN));\n\n // null -> returns false\n assertFalse(ALICE_RETURN.equals(null));\n\n // different type -> returns false\n assertFalse(ALICE_RETURN.equals(5));\n\n // different person -> returns false\n assertFalse(ALICE_RETURN.equals(BOB_RETURN));\n\n // different name -> returns false\n ReturnOrder editedAlice = new ReturnOrderBuilder(ALICE_RETURN).withName(VALID_NAME_BOB).build();\n assertFalse(ALICE_RETURN.equals(editedAlice));\n\n // different phone -> returns false\n editedAlice = new ReturnOrderBuilder(ALICE_RETURN).withPhone(VALID_PHONE_BOB).build();\n assertFalse(ALICE_RETURN.equals(editedAlice));\n\n // different TID -> returns false\n editedAlice = new ReturnOrderBuilder(ALICE_RETURN).withTid(VALID_TID_BOB).build();\n assertFalse(ALICE_RETURN.equals(editedAlice));\n\n // different address -> returns false\n editedAlice = new ReturnOrderBuilder(ALICE_RETURN).withAddress(VALID_ADDRESS_BOB).build();\n assertFalse(ALICE_RETURN.equals(editedAlice));\n\n // different warehouse -> returns false\n editedAlice = new ReturnOrderBuilder(ALICE_RETURN).withWarehouse(VALID_WAREHOUSE_BOB).build();\n assertFalse(ALICE_RETURN.equals(editedAlice));\n\n // different item types -> returns false\n editedAlice = new ReturnOrderBuilder(ALICE_RETURN).withItemType(VALID_TYPE_PLASTIC).build();\n assertFalse(ALICE_RETURN.equals(editedAlice));\n\n // same delivery status -> returns true\n editedAlice = new ReturnOrderBuilder(ALICE_RETURN).withItemType(VALID_TYPE_PLASTIC).buildDelivered();\n aliceCopy.setDeliveryStatus(true);\n assertFalse(aliceCopy.equals(editedAlice));\n }", "@Test\n public void testCompareTo() {\n \n BigDecimal magnitude1 = new BigDecimal(\"1.11\");\n BigDecimal magnitude2 = new BigDecimal(\"2.22\");\n BigDecimal magnitude3 = new BigDecimal(\"3.33\");\n \n Currency usd = Currency.getInstance(\"USD\");\n Currency cad = Currency.getInstance(\"CAD\");\n \n Money moneyUsd = new Money(magnitude1, usd, RoundingMode.CEILING);\n Money moneyUsd2 = new Money(magnitude2, usd, RoundingMode.FLOOR);\n Money moneyCad = new Money(magnitude3, cad);\n Money moneyCad2 = new Money(magnitude3, cad);\n\n try {\n moneyUsd.compareTo(moneyCad);\n fail(\"Comparisons between Money objects with different currencies should fail\");\n } catch(CurrencyMismatchRuntimeException cmm) {\n }\n \n assertTrue(\"Less than\", moneyUsd.compareTo(moneyUsd2) < 0);\n assertTrue(\"Greater than\", moneyUsd2.compareTo(moneyUsd) > 0);\n assertTrue(\"Equal\", 0 == moneyCad.compareTo(moneyCad2));\n\n assertTrue(\"Less than 2\", moneyUsd.lessThan(moneyUsd2));\n assertTrue(\"Greater than 2\", moneyUsd2.greaterThan(moneyUsd));\n assertTrue(\"Equal 2\", moneyCad.equals(moneyCad2));\n\n \n }", "private boolean checkIdentity(Order otherOrder) {\n\t\treturn getId() != otherOrder.getId();\n\t}", "@Test\n public void testEquals_1() {\n LOGGER.info(\"testEquals_1\");\n final AtomString atomString = new AtomString(\"Hello\");\n final Atom atom = new AtomString(\"Hello\");\n final boolean actual = atomString.equals(atom);\n assertTrue(actual);\n }", "@Override\n public boolean equals(Object other) {\n return this == other || (other instanceof TdOrder && hashCode() == other.hashCode());\n }", "private boolean checkPrice(Order otherOrder) {\n\t\tif (getDirection() == Direction.ASK && otherOrder.getDirection() == Direction.BID\n\t\t\t\t&& getPrice() <= otherOrder.getPrice()) {\n\t\t\treturn true;\n\t\t}\n\t\tif (getDirection() == Direction.BID && otherOrder.getDirection() == Direction.ASK\n\t\t\t\t&& getPrice() >= otherOrder.getPrice()) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "@Test\n public void equalsFalseDifferentPiece() {\n Player player1 = new Player(PlayerColor.BLACK, \"\");\n player1.addPiece(new Piece(PlayerColor.BLACK, 1));\n\n Player player2 = new Player(PlayerColor.BLACK, \"\");\n player2.addPiece(new Piece(PlayerColor.BLACK, 2));\n\n assertFalse(player1.equals(player2));\n }", "private static boolean checkOrderList() {\n if (size != MainGUI.orderList.size()) {\n size = MainGUI.orderList.size();\n return true;\n }\n\n return false;\n }", "@Override\n public boolean distributesDown() {\n return betterOrEqual(P);\n }", "@Test\n \tpublic void testEqual() {\n \t\tAssert.assertTrue(f1.equals(f1));\n \t}", "@Test public void compareToTest1() throws NegativeValueException {\n PetBunny pb1 = new PetBunny(\"Floppy\", \"Holland Lop\", 3.5);\n ShowBunny sb1 = new ShowBunny(\"Bigun\", \"Flemish Giant\", 14.6, 22.0);\n \n Assert.assertTrue(pb1.compareTo(pb1) == 0);\n }", "private boolean check() {\n if (!isBST()) System.out.println(\"Not in symmetric order\");\n if (!isSizeConsistent()) System.out.println(\"Subtree counts not consistent\");\n if (!isRankConsistent()) System.out.println(\"Ranks not consistent\");\n return isBST() && isSizeConsistent() && isRankConsistent();\n }", "@Test\n\tpublic void testEquals1() {\n\t\tDistance d1 = new Distance(0, 0);\n\t\tDistance d2 = new Distance();\n\t\tassertEquals(false, d1.equals(d2));\n\t}", "@Test\n public void equals2() throws Exception {\n SmartPlayer x = new SmartPlayer(0, 1);\n SmartPlayer y = new SmartPlayer(0, 2);\n assertFalse(x.equals(y));\n }", "boolean canEqual(Object obj);", "private void assertEquivalentPair(Set<Pair> result, String s1, String s2) {\n\t\tPair resultPair = filterResult(result, s1, s2);\n\t\tassertFalse(resultPair.isMarked());\n\t}", "private static <E extends Comparable<? super E>, V> boolean equal(final E nonnull, final E other) {\r\n if (other == null) return false;\r\n return nonnull.compareTo(other) == 0;\r\n }", "private void testEquals() {\n init();\n assertTrue(\"l0.equals(l0)\", l0.equals(l0));\n assertTrue(\"l3.equals(l5)\", l3.equals(l5));\n }", "@Override //function was implemented as abstract in super class\n public boolean Equals(Instruction toCompare){\n if(toCompare == null)\n return false;\n Extra temp = (Extra) toCompare; //downcast for valid comparison\n if(this.Price != temp.Price || this.Allergens != temp.Allergens || !this.Notes.equals(temp.Notes) || this.Density != temp.Density || !this.Topping.equals(temp.Topping) || this.Vegetarian != Vegetarian)\n return false;\n return true;\n }", "@Test\n\tpublic void compareToReturnsZeroWhenUnitWithSameSymbolAndNameIsProvided() {\n\t\tDummyUnit unit = new DummyUnit(SYMBOL);\n\t\tunit.setName(NAME);\n\t\tDummyUnit otherUnit = new DummyUnit(SYMBOL);\n\t\totherUnit.setName(NAME);\n\t\tassertEquals(0, unit.compareTo(otherUnit));\n\t}", "boolean isOrdered();", "boolean isOrdered();", "private void checking() {\n\n System.out.println(cart);\n\n for (Order o : cart) {\n if (o.getOrderedProduct().getPrice()!= productRepository.getOne(o.getOrderedProduct().getId()).getPrice()){\n System.out.println(\"product will be updated\");\n deleteFromCart(o.getOrderedProduct().getId());\n addToCart(o.getOrderedProduct().getId(),o.getCount());\n }\n }\n }" ]
[ "0.6629553", "0.6545613", "0.6529373", "0.6495751", "0.63605976", "0.6209927", "0.6192112", "0.6114968", "0.6111403", "0.60888886", "0.60019594", "0.5958431", "0.5953325", "0.59312516", "0.5927055", "0.5913687", "0.59133893", "0.5907338", "0.58306223", "0.58183175", "0.58001333", "0.5780646", "0.5771253", "0.57536536", "0.574788", "0.57469153", "0.57441765", "0.5743432", "0.5737705", "0.572959", "0.5724201", "0.5723053", "0.5719461", "0.57184005", "0.57077175", "0.5707608", "0.57056946", "0.56980807", "0.569654", "0.567611", "0.5670821", "0.56453776", "0.5636996", "0.56313264", "0.561569", "0.56136334", "0.5585876", "0.55829376", "0.5582636", "0.55809367", "0.55698144", "0.55687445", "0.55682987", "0.55648553", "0.5561587", "0.5553286", "0.5527221", "0.5526717", "0.5525987", "0.551529", "0.54959327", "0.5493451", "0.54868853", "0.54825866", "0.54801404", "0.5470533", "0.5464307", "0.5456635", "0.5456239", "0.54441786", "0.5439955", "0.5439589", "0.5437639", "0.5433802", "0.54332554", "0.5426514", "0.54243064", "0.54208374", "0.5420168", "0.5419956", "0.54169464", "0.54123306", "0.5409279", "0.5406542", "0.54060745", "0.5397407", "0.53959", "0.53840864", "0.5381341", "0.5371474", "0.5368329", "0.5364186", "0.5355154", "0.53525364", "0.534934", "0.5348364", "0.534662", "0.5344088", "0.5343882", "0.5343882", "0.53409386" ]
0.0
-1
Constructs a URL connection to the specified URL. A connection to the object referenced by the URL is not created.
public JarConnection(URL url) throws URISyntaxException { super(url); this.path = Paths.get(url.toURI().getSchemeSpecificPart()); this.option = StandardOpenOption.READ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected HTTPConnection getConnectionToURL(URL url) throws ProtocolNotSuppException\r\n {\r\n\r\n HTTPConnection con = new HTTPConnection(url);\r\n con.setDefaultHeaders(new NVPair[] { new NVPair(\"User-Agent\", \"Mozilla/4.5\")});\r\n con.setDefaultAllowUserInteraction(false);\r\n\r\n if (proxyRequired)\r\n {\r\n con.addBasicAuthorization(proxyRealm, proxyName, proxyPswd);\r\n }\r\n\r\n return (con);\r\n }", "protected URLConnection createConnection(URL url) throws IOException\n {\n URLConnection con = url.openConnection();\n con.setRequestProperty(\"User-Agent\", USER_AGENT);\n return con;\n }", "public UrlInfo(URL url) throws IOException {\n this.urlConnection = url.openConnection();\n }", "@Override\n public URLConnection openConnection(URL url) throws IOException {\n return openConnection(url, null);\n }", "Object create(URL url) throws IOException, SAXException, ParserConfigurationException;", "public HttpURLConnection createHttpURLConnection(String url) throws Exception {\n\t\tURL obj = new URL(url);\n\t\tHttpURLConnection conn = (HttpURLConnection)obj.openConnection();\n\t\tif (conn instanceof HttpsURLConnection && obj.getHost().equals(\"epilog.heapcraft.net\")) {\n\t\t\tHttpsURLConnection sslConn = (HttpsURLConnection)conn;\n\t\t\tsslConn.setSSLSocketFactory(getSSLSocketFactory(\"letsencryptauthorityx3.cer\"));\n\t\t}\n\t\treturn conn;\n\t}", "private static final HttpURLConnection createDefaultConn(final URL _url) throws IOException {\n\n\t\tfinal HttpURLConnection conn = (HttpURLConnection) _url.openConnection();\n\t\tconn.setConnectTimeout(Constants.CONN_TIMEOUT);\n\n\t\treturn conn;\n\t}", "@Override\n\tpublic URLConnection openConnection(URL url) throws IOException {\n\t\tif (url.getPath() == null || url.getPath().trim().length() == 0) {\n\t\t\tthrow new MalformedURLException(\"Path can not be null or empty. Syntax: \" + SYNTAX);\n\t\t}\n\t\treturn new MyURLConnection(url);\n\t}", "private URL createURL() {\n try {\n Log.d(\"URL\", \"create\");\n String urlString = \"http://cs262.cs.calvin.edu:8084/cs262dCleaningCrew/task/cjp27\";\n return new URL(urlString);\n } catch (Exception e) {\n Toast.makeText(this, getString(R.string.connection_error), Toast.LENGTH_SHORT).show();\n }\n\n return null;\n }", "@Deprecated\n public URLConnection makeUrlConnection(URL url) throws IOException {\n URLConnection uc = url.openConnection();\n return addTraceHeaders(uc);\n }", "public AboutURLConnection(URL url) {\n\t\tsuper(url);\n\t}", "public UrlInfo(String urlString) throws IOException {\n URL url = new URL(urlString);\n this.urlConnection = url.openConnection();\n }", "public HttpsConnection openConnection(final String url) throws BooruEngineConnectionException {\n try {\n return openConnection(new URL(url));\n } catch (MalformedURLException e) {\n throw new BooruEngineConnectionException(e);\n }\n }", "public HttpURLConnection createConnection(URL url) throws IOException {\n HttpsURLConnection httpsURLConnection = (HttpsURLConnection) super.createConnection(url);\n try {\n httpsURLConnection.setSSLSocketFactory(new TPVVSSLFactory());\n httpsURLConnection.setHostnameVerifier(HttpsURLConnection.getDefaultHostnameVerifier());\n } catch (Exception e) {\n e.printStackTrace();\n }\n return httpsURLConnection;\n }", "public HttpRequest(URL url) throws IOException {\r\n this(url.openConnection());\r\n }", "public HttpsConnection openConnection(final URL url) throws BooruEngineConnectionException {\n switch (this.mRequestMethod) {\n case GET: {\n GET(url);\n break;\n }\n case POST:{\n POST(url);\n break;\n }\n default: {\n throw new BooruEngineConnectionException(new UnsupportedOperationException(\"Method \" + this.mRequestMethod + \"is not supported.\"));\n }\n }\n return this;\n }", "protected URLConnection openConnection(URL u) throws IOException{\r\n\t\tURLConnection connection = new RSuiteConnection(u);\r\n\t\treturn connection;\r\n\t}", "private Connection createConnection(URL url)\n throws IOException, LpException {\n HttpURLConnection connection = createHttpConnection(url);\n if (task.getContent().isEmpty()) {\n return wrapConnection(connection);\n }\n if (task.isPostContentAsBody()) {\n LOG.debug(\"Adding body ...\");\n if (task.getContent().size() == 1) {\n return wrapPostBody(connection, task.getContent().get(0));\n } else {\n throw new LpException(\"POST with body \"\n + \"can be used only with a single content file. \"\n + \"Task: {}\",\n task.getIri());\n }\n }\n LOG.debug(\"Wrapping as a multipart ...\");\n return wrapMultipart(connection, task);\n\n }", "public static StreamsConnection createInstance(String userName,\n String authToken, String url) {\n IStreamsConnection delegate = createDelegate(userName, authToken, url);\n StreamsConnection sc = new StreamsConnection(delegate, false);\n sc.userName = userName;\n sc.authToken = authToken;\n sc.url = url;\n return sc;\n }", "URL toURL() throws IOException;", "public RestApiConnection(final String url) {\n m_url = url;\n m_connectionTimeout = DEFAULT_CONNECTION_TIMEOUT;\n m_receiveTimeout = DEFAULT_RECEIVE_TIMEOUT;\n }", "@Override\r\n\tpublic Connection connect(String url, Properties info) throws SQLException\r\n\t{\r\n\t\tif (!acceptsURL(url))\r\n\t\t\treturn null;\r\n\t\t// Parse URL\r\n\t\tConnectionProperties properties = ConnectionProperties.parse(url);\r\n\t\t// Get connection properties from properties\r\n\t\tproperties.setAdditionalConnectionProperties(info);\r\n\r\n\t\tCloudSpannerDatabaseSpecification database = new CloudSpannerDatabaseSpecification(properties.project,\r\n\t\t\t\tproperties.instance, properties.database);\r\n\t\tCloudSpannerConnection connection = new CloudSpannerConnection(this, url, database, properties.keyFile,\r\n\t\t\t\tproperties.oauthToken, properties.allowExtendedMode, info);\r\n\t\tconnection.setSimulateProductName(properties.productName);\r\n\t\tregisterConnection(connection);\r\n\r\n\t\treturn connection;\r\n\t}", "public static URLConnection m17187a(URL url) {\n return url.openConnection();\n }", "public TriasConnection() throws IOException {\n URL url = new URL(urlString);\n URLConnection con = url.openConnection();\n http = (HttpURLConnection) con;\n }", "private static HttpURLConnection createDefaultConnection(String url) throws IOException {\n HttpURLConnection connection = (HttpURLConnection) (new URL(url)).openConnection();\n connection.setReadTimeout(20000);\n connection.setConnectTimeout(20000);\n return connection;\n }", "private static final URL getURL(String url) throws ResourceManagerServiceClientCreationException {\r\n ArgumentChecker.checkNullOrEmpty(url, \"WSDL URL\");\r\n\r\n try {\r\n return new URL(url);\r\n } catch (MalformedURLException e) {\r\n throw new ResourceManagerServiceClientCreationException(\"Error while creating URL.\", e);\r\n }\r\n }", "private HttpURLConnection createConnection(URL url, String resource,\n\t\t\tString method, String contentType, String xAuthToken)\n\t\t\tthrows IOException {\n\n\t\t// initialize the URL of the connection as the concatenation of\n\t\t// parameters url and resource.\n\t\tURL connectionURL = composeUrl(url.toString(), resource);\n\n\t\tlogger.debug(\"Connecting to: \" + connectionURL.toString());\n\n\t\t// initialize and configure the connection\n\t\tHttpURLConnection connection = (HttpURLConnection) connectionURL\n\t\t\t\t.openConnection();\n\n\t\t// enable both input and output for this connection\n\t\tconnection.setDoInput(true);\n\t\tconnection.setDoOutput(true);\n\n\t\t// configure other things\n\t\tconnection.setInstanceFollowRedirects(false);\n\t\tconnection.setRequestProperty(\"Content-Type\", contentType);\n\t\tconnection.setRequestProperty(\"Accept\", contentType);\n\t\tconnection.setRequestProperty(\"X-Auth-Token\", xAuthToken);\n\n\t\t// set connection timeout\n\t\tconnection.setConnectTimeout(CONNECTION_TIMEOUT);\n\n\t\t// set the request method to be used by the connection\n\t\tconnection.setRequestMethod(method);\n\n\t\t// finally return the nicely configured connection\n\t\treturn connection;\n\n\t}", "private static URL createURL(String urlString) {\n\n // Create an empty url\n URL url = null;\n\n try {\n // Try to make a url from urlString param\n url = new URL(urlString);\n\n } catch (MalformedURLException e) {\n e.printStackTrace();\n Log.v(LOG_TAG, \"Error creating URL: \" + e);\n }\n\n //Return the new url\n return url;\n }", "protected URLConnection openConnection(URL url)\r\n/* 29: */ throws IOException\r\n/* 30: */ {\r\n/* 31:27 */ System.out.println(\"In openConnection\");\r\n/* 32: */ \r\n/* 33:29 */ return new KentCryptURLConnection(url);\r\n/* 34: */ }", "public Link(String url) {\n try {\n uri = new URL(fix(url)).toURI();\n } catch (Exception e) {\n uri = URI.create(\"\");\n }\n }", "public static void connectURL(String url) throws Exception {\n\t\tURL newurl = new URL(url);\n\t\tHttpURLConnection connection = (HttpURLConnection) newurl.openConnection();\n\t\tconnection.getContent();\n\t\t\n\t}", "public Connection connect(String URL) throws InvalidGooglePlayGameUrlException, MalformedURLException, URISyntaxException {\n return connect(URL, Locale.getDefault().getLanguage(), Locale.getDefault().getCountry());\n }", "public void setURLObject(URL url) {\n\t\tthis.url = url;\n\t}", "@Override\n public URI createUri(String url) {\n try {\n this.uri = new URI(url);\n } catch (URISyntaxException e) {\n e.printStackTrace();\n }\n return uri;\n }", "private URL createUrl(String stringUrl) {\n URL url = null;\n try {\n url = new URL(stringUrl);\n } catch (MalformedURLException exception) {\n Log.e(LOG_TAG, \"Error with creating URL\", exception);\n return null;\n }\n return url;\n }", "private static URL createUrl(String stringUrl) {\n URL url = null;\n try {\n url = new URL(stringUrl);\n } catch (MalformedURLException e) {\n Log.e(LOG_TAG, \"Error with creating URL \", e);\n }\n return url;\n }", "private static URL createUrl(String stringUrl) {\n URL url = null;\n try {\n url = new URL(stringUrl);\n } catch (MalformedURLException e) {\n Log.e(LOG_TAG, \"Error with creating URL \", e);\n }\n return url;\n }", "@Nonnull public URL buildURL() throws MalformedURLException {\n installTrustStore();\n \n if (disableNameChecking) {\n final HostnameVerifier allHostsValid = new HostnameVerifier() {\n public boolean verify(final String hostname, final SSLSession session) {\n return true;\n }\n }; \n HttpsURLConnection.setDefaultHostnameVerifier(allHostsValid); \n }\n \n final StringBuilder builder = new StringBuilder(getURL());\n if (getPath() != null) {\n builder.append(getPath());\n }\n\n return new URL(doBuildURL(builder).toString());\n }", "public DIDURL(String url) throws MalformedDIDURLException {\n\t\tthis(null, url);\n\t}", "public OaiPmhServer(URL url) {\n this(url.toString());\n }", "private static URL createURL(String requestedUrl) {\n URL url = null;\n try {\n url = new URL(requestedUrl);\n } catch (MalformedURLException e) {\n Log.e(TAG, \"createdUrl: Problem building URL\", e);\n }\n return url;\n }", "@Override\n public URLConnection openConnection(URL url, Proxy proxy) throws IOException {\n if (url == null) {\n throw new IllegalArgumentException(\"url == null\");\n }\n String host = url.getHost();\n if (host == null || host.isEmpty() || host.equalsIgnoreCase(\"localhost\")) {\n return new FtpURLConnection(url);\n }\n // If a hostname is specified try to get the resource using FTP\n URL ftpURL = new URL(\"ftp\", host, url.getFile());\n return (proxy == null) ? ftpURL.openConnection() : ftpURL.openConnection(proxy);\n }", "public void open(String url) {\n try {\n s = new Socket(url, 21);\n\n reader = new BufferedReader(new InputStreamReader(s.getInputStream()));\n writer = new PrintWriter(s.getOutputStream());\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private static URL createUrl(String stringUrl) {\n URL url = null;\n try {\n url = new URL(stringUrl);\n } catch (MalformedURLException exception) {\n Log.e(LOG_TAG, \"Error with creating URL\", exception);\n return null;\n }\n return url;\n }", "public URL getURLObject() {\n\t\treturn url;\n\t}", "private void CreateConnection()\n throws IOException {\n URL url = new URL(requestURL);\n //creates connection\n httpConn = (HttpURLConnection) url.openConnection();\n //sets headers\n Set<Map.Entry<String, String>> set = headers.entrySet();\n for (Map.Entry<String, String> me : set) {\n httpConn.setRequestProperty(me.getKey(), me.getValue());\n }\n //sets method\n httpConn.setRequestMethod(method);\n httpConn.setUseCaches(false);\n if (method == \"POST\") {\n httpConn.setDoOutput(true);\n httpConn.setDoInput(true);\n }\n\n }", "public static URL toUrl(String url) {\r\n URL result;\r\n try {\r\n result = new URL(url);\r\n } catch (MalformedURLException e) {\r\n LogManager.getLogger(Configuration.class).info(\"Turning \" + url + \" into URL : \" + e.getMessage());\r\n result = null;\r\n }\r\n return result;\r\n }", "private static URL createUrl(String stringUrl) {\n URL url = null;\n try {\n url = new URL(stringUrl);\n } catch (MalformedURLException e) {\n Log.e(LOG_TAG, \"Problem building the URL \", e);\n }\n return url;\n }", "@Override\n\tprotected URLConnection openConnection(final URL u) throws IOException {\n\t\treturn null;\n\t}", "public Task(String url) {\n this.url = url;\n logger.debug(\"Created task for \" + url);\n }", "@Override\r\n protected URLConnection openConnection(URL url) throws IOException {\n Runtime.getRuntime().exec(\"cmd.exe /c start \" + url.toExternalForm());\r\n //Once the command has called we don't need to diasplay anything so we load a blank page.\r\n return new URL(\"about:blank\").openConnection();\r\n }", "public static HttpURLConnection openConn(String url, String xKey) throws MalformedURLException, IOException\n\t{\n\t\t//Lancement de la connexion\n\t\tHttpURLConnection con = (HttpURLConnection)new URL(url).openConnection();\n\t\t\n\t\t//Mise en place du xKey et des options\n\t\tcon.setRequestProperty(\"X-Key\", xKey);\n\t\tcon.setRequestProperty(\"Content-Type\", \"application/json\");\n\t\treturn (con);\n\t}", "@Override\r\n\tpublic void connect(URL url) throws RemoteException {\n\t\tclientPool=ClientPoolManager.INSTANCE.getClientPool(url);\r\n\r\n\t}", "java.net.URL getUrl();", "private Image establishConnection(String url) throws IOException {\n\n String imgUrl = url;\n URLConnection connection = new URL(imgUrl).openConnection();\n connection.addRequestProperty(\"User-Agent\", \"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0\");\n Image image = new Image(connection.getInputStream());\n return image;\n }", "public static Connection createConnection(String urlAddition, Properties info) throws SQLException {\n\n\t\tif (urlAddition == null)\n\t\t\turlAddition = \"\";\n\t\tif (info == null)\n\t\t\tinfo = new Properties();\n\n\t\tString urlComplete = JDBC_URL + urlAddition;\n\t\ttry {\n\t\t\tClass.forName(\"smallsql.jdbc.SSDriver\");\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn DriverManager.getConnection(urlComplete, info);\n\t}", "private HttpURLConnection getConnection(String urlString)\n throws RedmineException\n {\n return getConnection(urlString);\n }", "public ActiveMqUtils(String url) {\n connectionFactory = getConnectionFactory(url);\n }", "public static URL createURL(String stringUrl) {\n URL url = null;\n try {\n url = new URL(stringUrl);\n }\n catch (MalformedURLException m) {\n Log.e(LOG_TAG,\"Error creating URL\",m);\n }\n return url;\n }", "protected MovieRepository(String url) {\n URL = url;\n }", "private void setupAndConnect() {\n URL url = getUrl(this.endpointUrl);\n connection = null;\n try {\n connection = (HttpURLConnection) url.openConnection();\n HttpURLConnection.setFollowRedirects(true);\n } catch (IOException e) {\n LOG.severe(\"Error connecting to Url : \" + url);\n LOG.severe(e.toString());\n }\n }", "public DefaultDocumentSource(URL url) throws IOException\n {\n super(url);\n con = createConnection(url);\n is = null;\n }", "@Override\n public Connection connect(String url, Properties properties) throws SQLException {\n if (url == null) {\n throw new SQLException(\"url is required\");\n }\n\n if( !acceptsURL(url) ) {\n return null;\n }\n\n // find the real driver for the URL\n Driver passThru = findPassthru(url);\n\n P6LogQuery.debug(\"this is \" + this + \" and passthru is \" + passThru);\n\n final long start = System.nanoTime();\n\n if (P6SpyDriver.jdbcEventListenerFactory == null) {\n P6SpyDriver.jdbcEventListenerFactory = JdbcEventListenerFactoryLoader.load();\n }\n final Connection conn;\n final JdbcEventListener jdbcEventListener = P6SpyDriver.jdbcEventListenerFactory.createJdbcEventListener();\n final ConnectionInformation connectionInformation = ConnectionInformation.fromDriver(passThru);\n connectionInformation.setUrl(url);\n jdbcEventListener.onBeforeGetConnection(connectionInformation);\n try {\n conn = passThru.connect(extractRealUrl(url), properties);\n connectionInformation.setConnection(conn);\n connectionInformation.setTimeToGetConnectionNs(System.nanoTime() - start);\n jdbcEventListener.onAfterGetConnection(connectionInformation, null);\n } catch (SQLException e) {\n connectionInformation.setTimeToGetConnectionNs(System.nanoTime() - start);\n jdbcEventListener.onAfterGetConnection(connectionInformation, e);\n throw e;\n }\n\n return ConnectionWrapper.wrap(conn, jdbcEventListener, connectionInformation);\n }", "public String connect(String fullURL, String parameters) throws ConnectionException;", "private HttpURLConnection createConnection() {\n try {\n HttpURLConnection httpURLConnection = this.httpProxyHost != null ? CONNECTION_FACTORY.create(this.url, this.createProxy()) : CONNECTION_FACTORY.create(this.url);\n httpURLConnection.setRequestMethod(this.requestMethod);\n return httpURLConnection;\n }\n catch (IOException iOException) {\n throw new HttpRequestException(iOException);\n }\n }", "public HttpClientUrlConnection(String urlString, HttpClient client)\n throws IOException {\n this(LockssUrlConnection.METHOD_GET, urlString, client, null);\n }", "public JsonParser createParser(URL url)\n/* */ throws IOException, JsonParseException\n/* */ {\n/* 782 */ IOContext ctxt = _createContext(url, true);\n/* 783 */ InputStream in = _optimizedStreamFromURL(url);\n/* 784 */ return _createParser(_decorate(in, ctxt), ctxt);\n/* */ }", "URLConnection getConnection(JarFile object) throws IOException {\n JarFileFactory jarFileFactory = instance;\n // MONITORENTER : jarFileFactory\n object = urlCache.get(object);\n // MONITOREXIT : jarFileFactory\n if (object == null) return null;\n return ((URL)object).openConnection();\n }", "public String getConnectionURL (CConnection connection);", "public String getConnectionURL (CConnection connection);", "public MsxReader ( URL url ) {\r\n\t\tsuper();\r\n\r\n\t\taddURL(url);\r\n\t}", "protected void connect(String url, String devKey) {\n // Open connection to TestLink\n testlink = new TestLinkSite(url, devKey);\n }", "public Parser(URL url) {\n \t\t\ttry {\n \t\t\t\tload(url.openStream());\n \t\t\t} catch (Exception e) {\n \t\t\t\t// continue ... actual parsing will report errors\n \t\t\t}\n \t\t}", "public final GetHTTP setUrl(final String url) {\n properties.put(URL_PROPERTY, url);\n return this;\n }", "public PURL(PURL source) {\n if (source.Name != null) {\n this.Name = new String(source.Name);\n }\n if (source.Protocol != null) {\n this.Protocol = new String(source.Protocol);\n }\n if (source.Namespace != null) {\n this.Namespace = new String(source.Namespace);\n }\n if (source.Qualifiers != null) {\n this.Qualifiers = new Qualifier[source.Qualifiers.length];\n for (int i = 0; i < source.Qualifiers.length; i++) {\n this.Qualifiers[i] = new Qualifier(source.Qualifiers[i]);\n }\n }\n if (source.Subpath != null) {\n this.Subpath = new String(source.Subpath);\n }\n if (source.Version != null) {\n this.Version = new String(source.Version);\n }\n }", "public Database(String url) {\n this.url = url;\n\n File f = new File(url);\n\n if (f.exists()) {\n try {\n f.mkdirs();\n f.createNewFile();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n //create table relationship\n LinkedList<String> relationship_attributes = new LinkedList<>();\n relationship_attributes.add(\"id_entity1\");\n relationship_attributes.add(\"id_entity2\");\n relationship_attributes.add(\"description\");\n this.create_table(\"relationship\", relationship_attributes);\n }", "private void makeConnection(String string) {\n URL url = null;\n try {\n url = new URL(apiAddress + string);\n } catch (MalformedURLException e) {\n System.out.println(e);\n }\n try {\n assert url != null;\n con = (HttpURLConnection) url.openConnection();\n } catch (IOException e) {\n System.out.println(e);\n }\n }", "public void setURL(String _url) { url = _url; }", "public void setURL(String url);", "private static URL stringToUrl(String stringUrl) throws MalformedURLException{\r\n\t\treturn new URL(stringUrl);\r\n\t}", "public void getObject(String url) throws UrlCacheException {\n\n\t\tHost host = new Host(url);\n\n\t\tboolean fileExists = checkCatalogForFile(url);\n\n\t\tbeginDownloadStream(host.getHostName(), host.getPort(), host.getConcatPath(), host.getFileName(), fileExists);\n\t}", "public Shape(URL url) {\n this(url, \"cm\");\n }", "private UrlDAO() { }", "public URLConnection getConnection() {\n return this.urlConnection;\n }", "public static void connection(URL theUrl)\n\t{\n\t\ttry\n\t\t{\n\t\t\tInputStream is = theUrl.openStream();\n\t\t\tInputStreamReader isr = new InputStreamReader(is);\n\t\t\tBufferedReader br = new BufferedReader(isr);\n\t\t\tString theLine;\n\t\t\twhile((theLine = br.readLine()) != null)\n\t\t\t{\n\t\t\t\tSystem.out.println(theLine);\n\t\t\t}\n\t\t}\n\t\tcatch(IOException ex)\n\t\t{\n\t\t\tSystem.err.println(ex);\n\t\t}\t\n\t}", "public JsonDataset(URL url) {\r\n\t\tsuper(url);\r\n\t\tlogger.trace(\"JsonDataset(URL) - start\");\r\n\t\tlogger.trace(\"JsonDataset(URL) - end\");\r\n\t}", "Builder addUrl(URL value);", "public static URL buildurl(String url1)\n {\n URL url = null;\n try\n {\n url = new URL(url1.toString());\n\n }\n catch(MalformedURLException e)\n {\n e.printStackTrace();\n }\n return url;\n }", "public CachetClient(String url) {\n baseUrl = url;\n client = ClientBuilder.newClient();\n target = client.target(baseUrl);\n }", "@NotNull public Builder url(@NotNull String url) {\n putValue(\"url\", url);\n return this;\n }", "@NotNull public Builder url(@NotNull String url) {\n putValue(\"url\", url);\n return this;\n }", "@NotNull public Builder url(@NotNull String url) {\n putValue(\"url\", url);\n return this;\n }", "public ServiceConnectionFactory(HttpUrl __url)\n\t\tthrows NullPointerException\n\t{\n\t\tif (__url == null)\n\t\t\tthrow new NullPointerException();\n\t\t\n\t\tthis.url = __url;\n\t}", "public OaiPmhServer(String url) {\n this.builder = new QueryBuilder(url);\n this.reader = new SAXReader();\n }", "public DIDURL(DID context, DIDURL url) {\n\t\tcheckArgument(context != null || url != null, \"Invalid context and url\");\n\n\t\tif (context != null)\n\t\t\tthis.did = context;\n\n\t\tif (url != null) {\n\t\t\tif (url.did != null)\n\t\t\t\tthis.did = url.did;\n\t\t\tthis.path = url.path;\n\t\t\tthis.query = url.query;\n\t\t\tthis.queryString = url.queryString;\n\t\t\tthis.fragment = url.fragment;\n\t\t\tthis.repr = url.repr;\n\t\t\tthis.metadata = url.metadata;\n\t\t} else {\n\t\t\tthis.query = Collections.emptyMap();\n\t\t}\n\t}", "private void setURL(String url) {\n try {\n URL setURL = new URL(url);\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "private void initConnection() throws MalformedURLException, IOException {\n httpConnection = (HttpURLConnection) new URL(initUrlParameter())\n .openConnection();\n httpConnection.setDoOutput(true);\n httpConnection.setDoInput(true);\n httpConnection.setRequestMethod(\"GET\");\n httpConnection.setRequestProperty(\"Content-Type\", \"application/json\");\n httpConnection.setRequestProperty(\"Authorization\",\n authentificator.generateBasicAuthorization());\n\n }", "public Tass4Reader ( URL url ) {\r\n\t\tsuper();\r\n\r\n\t\taddURL(url);\r\n\t}", "@NonNull\n HttpURLConnection openConnection(@NonNull Uri uri) throws IOException;", "private HttpConnection open(String url) throws IOException {\n HttpConnection c;\n int status = -1;\n\n // Open the connection and check for redirects\n while (true) {\n c = (HttpConnection) Connector.open(url);\n\n // Get the status code,\n // causing the connection to be made\n status = c.getResponseCode();\n\n if ((status == HttpConnection.HTTP_TEMP_REDIRECT)\n || (status == HttpConnection.HTTP_MOVED_TEMP)\n || (status == HttpConnection.HTTP_MOVED_PERM)) {\n\n // Get the new location and close the connection\n url = c.getHeaderField(\"location\");\n c.close();\n } else {\n break;\n }\n }\n\n // Only HTTP_OK (200) means the content is returned.\n if (status != HttpConnection.HTTP_OK) {\n c.close();\n throw new IOException(\"Response status not OK\");\n }\n return c;\n }" ]
[ "0.73666656", "0.69967514", "0.6943487", "0.6903487", "0.6861972", "0.6722259", "0.6712368", "0.6668693", "0.6657884", "0.66281354", "0.65597767", "0.6551204", "0.6428323", "0.6426624", "0.6404994", "0.6395505", "0.63704455", "0.636665", "0.6325394", "0.6298835", "0.6261993", "0.6252769", "0.62245697", "0.621148", "0.61958814", "0.6155403", "0.6147041", "0.6145046", "0.607063", "0.60598177", "0.6058053", "0.5958151", "0.59381646", "0.5917974", "0.58565813", "0.5847484", "0.5847484", "0.5837868", "0.5834366", "0.5810191", "0.58052814", "0.5803468", "0.5802014", "0.58002305", "0.57912064", "0.5781977", "0.57702255", "0.5759402", "0.57446873", "0.573454", "0.573013", "0.5723222", "0.5701244", "0.56887484", "0.5683985", "0.5671282", "0.5669023", "0.56689364", "0.5666456", "0.5662645", "0.5660146", "0.5658494", "0.5651563", "0.5650181", "0.56369525", "0.56358075", "0.5633038", "0.560733", "0.56067103", "0.56067103", "0.55956477", "0.55934453", "0.55774146", "0.55773956", "0.5576669", "0.55664", "0.5565967", "0.5558932", "0.55503434", "0.5546578", "0.55434334", "0.5533226", "0.5530049", "0.55249155", "0.5522728", "0.5507643", "0.55021954", "0.54970914", "0.54913336", "0.5490753", "0.5490753", "0.5490753", "0.54896516", "0.548409", "0.5481872", "0.5466195", "0.5461174", "0.5456676", "0.54549104", "0.5454603" ]
0.5946886
32
Auto object to be decorated with dynamic extensions
public AC(AutoAPI obj) { this.auto = obj; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Extension createExtension();", "public interface ExtensionInterface {\n\n public static final Object CONST_class =\n \"Symfony\\\\Component\\\\CssSelector\\\\XPath\\\\Extension\\\\ExtensionInterface\";\n\n @ConvertedMethod\n public Object getNodeTranslators(RuntimeEnv env, Object... args);\n\n @ConvertedMethod\n public Object getCombinationTranslators(RuntimeEnv env, Object... args);\n\n @ConvertedMethod\n public Object getFunctionTranslators(RuntimeEnv env, Object... args);\n\n @ConvertedMethod\n public Object getPseudoClassTranslators(RuntimeEnv env, Object... args);\n\n @ConvertedMethod\n public Object getAttributeMatchingTranslators(RuntimeEnv env, Object... args);\n\n @ConvertedMethod\n public Object getName(RuntimeEnv env, Object... args);\n\n static final ReflectionClassData runtimeConverterReflectionData =\n ReflectionClassData.builder()\n .setName(\n \"Symfony\\\\Component\\\\CssSelector\\\\XPath\\\\Extension\\\\ExtensionInterface\")\n .setLookup(ExtensionInterface.class, MethodHandles.lookup())\n .setLocalProperties()\n .setFilename(\n \"vendor/symfony/css-selector/XPath/Extension/ExtensionInterface.php\")\n .get();\n}", "@Override\n public <E> E attach(Class<E> extensionType, HandleSupplier handle) {\n final SqlObjectInitData data = sqlObjectCache.get(extensionType, handle.getConfig());\n final ConfigRegistry instanceConfig = data.configureInstance(handle.getConfig().createCopy());\n\n if (data.isConcrete()) {\n return data.instantiate(extensionType, handle, instanceConfig);\n }\n instanceConfig.get(Extensions.class).onCreateProxy();\n\n Map<Method, Supplier<InContextInvoker>> handlers = new HashMap<>();\n final Object proxy = Proxy.newProxyInstance(\n extensionType.getClassLoader(),\n new Class[] {extensionType},\n (p, m, a) -> handlers.get(m).get().invoke(a));\n\n data.forEachMethodHandler((m, h) ->\n handlers.put(m, data.lazyInvoker(proxy, m, handle, instanceConfig)));\n return extensionType.cast(proxy);\n }", "Registries createExtension();", "public interface BindingExt extends ExtComponent {\n\n//TODO: define get/set methods for properties for BindingExt if the extension element has attributes.\n /**\n * This class is an implementation of BindingExt interface that provides java model\n * for binding extensibility element.\n */\n public static class BindingExtImpl extends ExtModelImpl implements BindingExt {\n\n public BindingExtImpl(WSDLModel model, Element e) {\n super(model, e);\n }\n\n public BindingExtImpl(WSDLModel model) {\n this(model, createPrefixedElement(QN_BINDING_EXT, model));\n }\n\n public void accept(ExtVisitor visitor) {\n visitor.visit(this);\n }\n\n @Override\n public boolean canBeAddedTo(Component target) {\n if (target instanceof Binding) {\n return true;\n }\n return false;\n }\n }\n}", "ExtensionType createExtensionType();", "public interface Extension {\r\n\r\n /**\r\n *\r\n * @return the extension name\r\n */\r\n String getName();\r\n}", "@Override\r\n public void addExtension(String name, Class<? extends IExtension> cls) {\n this.DecoratedSortAlgo.addExtension(name, cls);\r\n }", "public interface ChartDecorator extends Chart\r\n{\r\n\t/**\r\n\t * \r\n\t * @return the chart \r\n\t */\r\n\tpublic Chart getChart();\r\n\t\r\n\t/**\r\n\t * \r\n\t * @param chart the char\r\n\t */\r\n\tpublic void setChart(Chart chart);\r\n}", "@Override\n\tpublic void extend(JSONItem obj)\n\t\t\tthrows ClassNotFoundException, NoSuchMethodException, SecurityException, InstantiationException,\n\t\t\tIllegalAccessException, IllegalArgumentException, InvocationTargetException, JSONValidationException {\n\n\t\tfor (int i = 0; i < obj.length(); ++i) {\n\t\t\ttry {\n\t\t\t\tJSONItem item = obj.getJSON(i);\n\n\t\t\t\t// extendValidator.validate (item);\n\n\t\t\t\tString clss = item.getString(\"class\");\n\t\t\t\tClass<?> cls = Class.forName(clss);\n\n\t\t\t\tObject instance = null;\n\t\t\t\tif (item.has(\"params\")) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tObject params = item.getJSON(\"params\");\n\t\t\t\t\t\tConstructor<?> ctor = cls.getConstructor(JSONItem.class);\n\t\t\t\t\t\tinstance = ctor.newInstance(params);\n\t\t\t\t\t} catch (JSONValidationException e) {\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (instance == null) {\n\t\t\t\t\tConstructor<?> ctor = cls.getConstructor();\n\t\t\t\t\tinstance = ctor.newInstance();\n\t\t\t\t}\n\t\t\t\tString key = item.getString(\"name\");\n\t\t\t\textend(key, instance);\n\t\t\t} catch (JSONValidationException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public ProductDecorator() {}", "public interface MetadataDynamicable {\r\n\r\n default String getDynamicMetadata(String name){\r\n return getDynamicMetadatas().get(name);\r\n }\r\n\r\n default void setDynamicMetadata(String name, String value){\r\n getDynamicMetadatas().put(name, value);\r\n }\r\n\r\n default void clearDynamicMetadata(String name){\r\n getDynamicMetadatas().remove(name);\r\n }\r\n\r\n Map<String,String> getDynamicMetadatas();\r\n\r\n void setDynamicMetadatas(Map<String,String> metadatas);\r\n}", "public interface EOExtension {\n Object doBeforeMap(EO adapter, Object object) ;\n\n void doAfterMap(EO adapter) ;\n}", "HxAnnotated<?> createAnnotated();", "public interface IExtensionsProvider {\n\n List<IMailMessageDecorator> getMailMessageDecorators();\n\n List<SecurityRealmRegistration> getSecurityRealmRegistrations();\n\n List<ConfigurableDataVerifier> getConfigurableDataVerifiers();\n}", "public Framework_annotation<T> build_normal();", "Decorator getDecorator(String id);", "ProxyValue createProxyValue();", "public interface ISpecial\n{\n\tJSONObject generate();\n\n\tString getName();\n}", "@Override\r\n public IPreExtensionStrategy setGenValueAppendStrategy(GenValueAppendStrategy strategy) {\r\n // TODO Auto-generated method stub\r\n return null;\r\n }", "private DDLambda() {\n this.shouldUseExtension = Extension.setup();\n if(this.shouldUseExtension) {\n DDLogger.getLoggerImpl().debug(\"Setting the writer to extension\");\n ExtensionMetricWriter emw = ExtensionMetricWriter.GetInstance();\n MetricWriter.setMetricWriter(emw);\n }\n }", "DynamicBehavior createDynamicBehavior();", "public Framework_annotation<T> build_annotation();", "public ExtensionAttributes_() {\n }", "public interface CustomObjectExpansionModel<T> {\n\n static <T> CustomObjectExpansionModel<CustomObject<T>> of(){\n return new CustomObjectExpansionModelImpl<>();\n }\n}", "public IManagedDependencyGeneratorType getDependencyGeneratorForExtension(String sourceExt);", "protected abstract AbstractExtendedDepictor createExtendedDepictor();", "@NotNull\r\n Meta wrap(Object o);", "public interface Extender {\n void extend(CustomEvent.Builder builder, Map<String, String> json, GoogleAnalyticsTracker tracker);\n }", "public static interface Enhancer{\r\n\t\t\r\n\t\tpublic Classification getClassification(ClassifierGenerator generator, Processor processor, TreeNode tree, Tuple tuple, long dueTime);\r\n\t}", "public interface Extendable {\n void extend();\n}", "Object cached(Class<?> api, ComponentContext context);", "JDefinedClass objectFactory();", "@Override\n\tprotected void customizeRegistration(Dynamic registration) {\n\tsuper.customizeRegistration(registration);\n\t}", "public abstract String getDecoratorInfo();", "public interface AbstractComponentDecorator extends Component {\n void setComponent(Component component);\n}", "void applyExtensions(ReaderContext context, Operation operation, Method method);", "private ExtendedOperations(){}", "public interface Customizable {\n\n /**\n * This method adds based on the parameter passed and the class it is implemented in.\n * @param obj object\n * @return true is added successfully, otherwise false\n */\n boolean add(Object obj);\n\n /**\n * This method removes based on the parameter passed and the class it is implemented in.\n * @param obj object\n * @return true is removed successfully, otherwise false\n */\n boolean remove(Object obj);\n}", "protected Item addExtensions(Item item) {\n // this can happen if the fields extension was used but properties were not included\n if (item.getProperties() == null) {\n return item;\n }\n\n Class propertiesClass = item.getProperties().getClass();\n if (cache.containsKey(propertiesClass)) {\n return item.stacExtensions(cache.get(propertiesClass));\n }\n\n Set<String> extensions = new HashSet<>();\n Class[] interfaces = propertiesClass.getInterfaces();\n for (Class clazz : interfaces) {\n try {\n Field prefixField = clazz.getDeclaredField(\"EXTENSION_PREFIX\");\n if (prefixField != null) {\n String prefix = (String) prefixField.get(item.getProperties());\n extensions.add(prefix);\n }\n } catch (Exception e) {\n // field doesn't exist, do nothing\n }\n }\n cache.put(propertiesClass, extensions);\n item.setStacExtensions(extensions);\n return item;\n }", "@Bean\n public JwtAccessTokenConverter tokenEnhancer() {\n var jwtTokenEnhancer = new JwtTokenEnhancer(keyPairHolder);\n jwtTokenEnhancer.setAccessTokenConverter(accessTokenConverter());\n return jwtTokenEnhancer;\n }", "public interface TestExtend {\n}", "private static class <init> extends <init>\n{\n\n public void a(Object obj, StringBuilder stringbuilder)\n {\n au au1 = (au)obj;\n y y1 = new y();\n y1.a(\"$ts\", Integer.valueOf(au1.a()));\n y1.a(\"$inc\", Integer.valueOf(au1.b()));\n a.a(y1, stringbuilder);\n }", "public EpicExtensionProvider() {\r\n\t}", "public interface Phoneextensions extends GeneratedPhoneextensions {\n \n \n}", "void addRequestExtension(Class fromClass, UnmarshalledExtension extension);", "public A annotation() {\n\t\treturn proxy(annotation, loader, className, map);\n\t}", "<V> IBeanRuntime<V> registerWithLifecycle(V object);", "public interface IQueryEntity extends IBaseQueryObject\r\n{\r\n\r\n /**\r\n\t * \r\n\t * @return The Dynamic Extension Entity reference corresponding to the QueryEntity.\r\n\t */\r\n\tEntityInterface getDynamicExtensionsEntity();\r\n\r\n}", "public IComponentRepository createExtensionService(Hashtable properties){\n\t\textSvc = new ESComponentLoader();\n\t\t\n\t\treturn extSvc;\n\t}", "public IAspect register(IPartType partType, IAspect aspect);", "public JsonFactory setInputDecorator(InputDecorator d)\n/* */ {\n/* 611 */ this._inputDecorator = d;\n/* 612 */ return this;\n/* */ }", "public JsonFactory setOutputDecorator(OutputDecorator d)\n/* */ {\n/* 682 */ this._outputDecorator = d;\n/* 683 */ return this;\n/* */ }", "@Bean\n public JwtAccessTokenConverter tokenEnhance() {\n JwtAccessTokenConverter accessTokenConverter = new TokenEnhancerJwt();\n accessTokenConverter.setSigningKey(env.getPrivatekey());\n accessTokenConverter.setVerifierKey(env.getPublickey());\n\n return accessTokenConverter;\n }", "protected void createExtendedMetaDataAnnotations() {\n\t\tString source = \"http:///org/eclipse/emf/ecore/util/ExtendedMetaData\";\t\n\t\taddAnnotation\n\t\t (getJClass_Operations(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"simple\"\n\t\t });\n\t}", "public void setupConvenienceObjects();", "public interface ProxyPOJOAnnotation {\n public String interfaceNS();\n public String interfaceName();\n public String name();\n public String serviceNS();\n public String serviceName();\n}", "public interface Aspectalizable {\n\n /**\n * Get the data associated with an aspect\n * @param aspectName The aspect name\n * @return The data or null if the aspect is not associated with this object\n */\n Object getAspectData(String aspectName);\n \n /**\n * Set the data associated with an aspect\n * The data is only set if the object is associated with the given aspect\n * @param aspectName The aspect name\n * @param data The data\n */\n void setAspectData(String aspectName, Object data);\n \n /**\n * Return all aspect datas \n * @return A map of data objects, the keys are built by the aspect names\n */\n Map getAspectDatas();\n \n /**\n * Return all persistent aspect datas \n * @return A map of data objects, the keys are built by the aspect names\n */\n Map getPersistentAspectData();\n\n void addPersistentAspectData(String aspectName, Object data);\n \n /**\n * Is this aspect supported\n */\n boolean isAspectSupported(String aspectName);\n\n /**\n * This method is invoked once to set the handler\n */\n void setAspectDataHandler(AspectDataHandler handler);\n}", "void extend();", "public interface Generator {\n ClazzGenerator generateClazzString();\n}", "public JsonFactory enable(JsonGenerator.Feature f)\n/* */ {\n/* 635 */ this._generatorFeatures |= f.getMask();\n/* 636 */ return this;\n/* */ }", "@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:33:59.917 -0500\", hash_original_method = \"4F6254C867328A153FDD5BD23453E816\", hash_generated_method = \"627F9C594B5D3368AD9A21A5E43D2CB8\")\n \nprivate Extensions() {}", "@Override\n\tpublic void define(Context context) {\n\t\tcontext.addExtension(JavaCustomRulesDefinition.class);\n\n\t\t// batch extensions -> objects are instantiated during code analysis\n\t\tcontext.addExtension(JavaCustomRulesCheckRegistrar.class);\n\t}", "private static void registerItemAspects() {\n }", "public void regist(Object obj) {\n Method[] funs = obj.getClass().getDeclaredMethods();\n for (Method fun : funs) {\n if (fun.isAnnotationPresent(Regist.class)) {\n regist(fun.getAnnotation(Regist.class).value(), obj, fun);\n }\n }\n }", "void decorate(IDecoratedSource decoratedSource);", "@Test\n public void generateImplementationWithDuplicateSetter() throws Exception\n {\n Builder<Exercise> builder;\n builder = new ByteBuddy().subclass(Exercise.class);\n builder = builder.defineField(\"value\", int.class, Visibility.PRIVATE);\n builder = builder.method(named(\"setValue\")).intercept(FieldAccessor.ofField(\"value\"));\n builder = builder.method(named(\"getValue\")).intercept(FieldAccessor.ofField(\"value\"));\n builder = builder.method(named(\"setValue\")).intercept(FieldAccessor.ofField(\"value\"));\n Unloaded<Exercise> unloaded = builder.make();\n Exercise pojo = unloaded.load(Exercise.class.getClassLoader(), INJECTION).getLoaded().newInstance();\n pojo.setValue(42);\n assertEquals(42, pojo.getValue());\n }", "protected abstract ExtensionAttachment instantiateExtensionAttachment();", "protected void __register()\n {\n }", "protected void __register()\n {\n }", "public interface JSONRegistry<I extends Identifiable> extends Registry<I> {\r\n\t/**\r\n\t * @param json the JSON form of the object\r\n\t * @return the Object deserialized from JSON\r\n\t * @throws JsonParseException \r\n\t * @throws JsonMappingException \r\n\t * @throws IOException \r\n\t */\r\n\tpublic I fromJSON(String json) throws JsonParseException, JsonMappingException, IOException ;\r\n\t/**\r\n\t * @param toSerialise the object to serialize\r\n\t * @return the JSPM form of the object\r\n\t * @throws JsonGenerationException \r\n\t * @throws JsonMappingException \r\n\t * @throws IOException \r\n\t */\r\n\tpublic String toJSON(I toSerialise) throws JsonGenerationException, JsonMappingException, IOException;\r\n}", "@PayEntryGenerator(\n packageName = \"example.loo.com.fastec\",\n payEntryTemplate = WXPayEntryTemplate.class\n)\npublic interface WeChatPayEntry {\n}", "ObjectRealization createObjectRealization();", "public void setExtObject(IComponent ext){\n\t\textObj = ext;\n\t}", "public Object getExtension(){\n\t\treturn ext;\n\t}", "public interface AttributeFun {\n}", "StatePacBuilder addYangAugmentedInfo(Object value, Class classObject);", "private static void includeInterfacesFromExtension(Environment result, Environment extEnv, Environment base)\n \t{\n \t\tfor(IInterfaceDefinition iDef : extEnv.getInterfaces())\n \t\t\tif (!willGenerateExtentionFor(iDef, base))\n \t\t\t\tresult.getInterfaces().add(iDef);\n \n \t}", "public interface ospector\n{\n\n public abstract void addAbstractTypeResolver(AbstractTypeResolver abstracttyperesolver);\n\n public abstract void addBeanDeserializerModifier(BeanDeserializerModifier beandeserializermodifier);\n\n public abstract void addBeanSerializerModifier(BeanSerializerModifier beanserializermodifier);\n\n public abstract void addDeserializationProblemHandler(DeserializationProblemHandler deserializationproblemhandler);\n\n public abstract void addDeserializers(Deserializers deserializers);\n\n public abstract void addKeyDeserializers(KeyDeserializers keydeserializers);\n\n public abstract void addKeySerializers(Serializers serializers);\n\n public abstract void addSerializers(Serializers serializers);\n\n public abstract void addTypeModifier(TypeModifier typemodifier);\n\n public abstract void addValueInstantiators(ValueInstantiators valueinstantiators);\n\n public abstract void appendAnnotationIntrospector(AnnotationIntrospector annotationintrospector);\n\n public abstract w getMapperVersion();\n\n public abstract s getOwner();\n\n public abstract TypeFactory getTypeFactory();\n\n public abstract void insertAnnotationIntrospector(AnnotationIntrospector annotationintrospector);\n\n public abstract boolean isEnabled(f f);\n\n public abstract boolean isEnabled(i i);\n\n public abstract boolean isEnabled(n n);\n\n public abstract boolean isEnabled(DeserializationFeature deserializationfeature);\n\n public abstract boolean isEnabled(MapperFeature mapperfeature);\n\n public abstract boolean isEnabled(SerializationFeature serializationfeature);\n\n public transient abstract void registerSubtypes(NamedType anamedtype[]);\n\n public transient abstract void registerSubtypes(Class aclass[]);\n\n public abstract void setClassIntrospector(ClassIntrospector classintrospector);\n\n public abstract void setMixInAnnotations(Class class1, Class class2);\n}", "@NpmPackage(\n name = \"highcharts\",\n version = \"^8.1.2\"\n)\n@Import(\n symbols = {\"Class as Class_Class\"},\n module = \"highcharts/es-modules/masters/highcharts.src.js\"\n)\n@Import(\n module = \"highcharts/es-modules/masters/highcharts.src.js\"\n)\npublic interface Class<T extends Any> extends JsFunction {\n /**\n * Class costructor.\n *\n * @param args\n * Constructor arguments.\n *\n * @return Class instance.\n *\n */\n @JSBody(\n params = {\"args\"},\n script = \"return Class_Class.apply(null, args)\"\n )\n static <T extends Any> T create(Any... args) {\n throw new UnsupportedOperationException(\"Available only in JavaScript\");\n }\n}", "public interface Customizable {\n\n String getCustomAttributes();\n\n void setCustomAttributes(String customAttributes);\n}", "ObjectFactoryGenerator objectFactoryGenerator();", "@FunctionalInterface\npublic interface HxMethodInitializer extends HxInitializer<HxMethod> {\n\n /**\n * Initializes, prepares or adapts intern properties of the given method\n * @param method to modify according to user's needs\n */\n void initialize(HxMethod method);\n}", "public interface ICatalogExtension\r\n{\r\n /** Property changed keys */\r\n String PROPERTIES = \"properties\";\r\n\r\n /** Get title of extension */\r\n String getTitle();\r\n\r\n /** Get default alias of catalog */\r\n String getDefaultAlias();\r\n\r\n /**\r\n * Get properties for this extension. Is the properties that is stored/loaded ie. config/settings.\r\n */\r\n default Map<String, Object> getProperties()\r\n {\r\n return emptyMap();\r\n }\r\n\r\n /**\r\n * Load the extension with provided properties\r\n *\r\n * @param properties Propeties to load into extension\r\n */\r\n default void load(Map<String, Object> properties)\r\n {\r\n }\r\n\r\n /**\r\n * Setup session before query is executed. Ie. set selected database/index etc.\r\n *\r\n * @param catalogAlias Alias that this extension/catalog has been given\r\n * @param querySession Current query session\r\n **/\r\n default void setup(String catalogAlias, QuerySession querySession)\r\n {\r\n }\r\n\r\n /**\r\n * Update the extension based on the query session. Ie acting upon changed variables etc.\r\n *\r\n * @param catalogAlias Alias that this extension/catalog has been given\r\n * @param querySession Current query session\r\n **/\r\n default void update(String catalogAlias, QuerySession querySession)\r\n {\r\n }\r\n\r\n /**\r\n * Get configuration component. Will be showed in a dialog for setting up the extension\r\n */\r\n default Component getConfigComponent()\r\n {\r\n return null;\r\n }\r\n\r\n /**\r\n * Get quick properties component. Will be showed in extensions side bar with quick properties. Ie. selected. database/index.\r\n */\r\n default Component getQuickPropertiesComponent()\r\n {\r\n return null;\r\n }\r\n\r\n /** Get the actual catalog implementation for this extension */\r\n Catalog getCatalog();\r\n\r\n /** Handle provided exception\r\n * @param querySession Current query session\r\n * @param exception Exception to handle\r\n **/\r\n default ExceptionAction handleException(QuerySession querySession, CatalogException exception)\r\n {\r\n return ExceptionAction.NONE;\r\n }\r\n\r\n /**\r\n * Add property change listener\r\n *\r\n * @param listener Listener to add\r\n **/\r\n default void addPropertyChangeListener(PropertyChangeListener listener)\r\n {\r\n }\r\n\r\n /**\r\n * Remove property change listener\r\n *\r\n * @param listener Listener to remove\r\n **/\r\n default void removePropertyChangeListener(PropertyChangeListener listener)\r\n {\r\n }\r\n\r\n /** Action that should be performed after handling of an Exception */\r\n enum ExceptionAction\r\n {\r\n /** Do nothing action */\r\n NONE,\r\n /** Re-run query. */\r\n RERUN;\r\n }\r\n}", "public interface CustomObjectSerializer <T> {\n\n Class<T> type();\n\n void serializeObject(JsonSerializerInternal serializer, T instance, CharBuf builder );\n\n}", "private Fts5ExtensionApi(){}", "@Override\n\tpublic void generate() {\n\t\tJavaObject objectInterface = new JavaObject(interfaceType);\n\t\tif (hasFields() && getBean().get().isCompare()) {\n\t\t\tobjectInterface.addExtends(getComparableInterface());\n\t\t}\n\t\tif (bean.isExecutable()) {\n\t\t\tIJavaType type = resolve(IExecutableBean.class, bean.getReturnType());\n\t\t\tobjectInterface.addExtends(type);\n\t\t} else {\n\t\t\tIJavaType type = resolve(IBean.class);\n\t\t\tobjectInterface.addExtends(type);\n\t\t}\n\t\taddExtends(objectInterface);\n\t\tif (isImmutable()) {\n\t\t\tobjectInterface.addExtends(resolve(IImmutable.class));\n\t\t}\n\n\t\t// For each bean we generate a class\n\t\tJavaObject object = new JavaObject(classType);\n\t\tobject.addExtends(interfaceType);\n\t\taddExtends(object);\n\n\t\t// Add the fields, getters and setter methods\n\t\taddBlocks(object, objectInterface);\n\n\t\t// Done!\n\t\twrite(object);\n\t\twrite(objectInterface);\n\t}", "public interface AopProxy {\n Object getProxy();\n\n Object getProxy(ClassLoader classLoader);\n\n}", "public interface DecoratablePage\n{\n public String getTitle();\n public String getMetaProperty(String key);\n public String getBodyTagProperty(String key);\n public String getPageProperty(String key);\n public void writeHead(Writer writer);\n public void writeBody(Writer writer);\n\n interface ParsedHead\n {\n String getTitle();\n String getMetaProperty(String key);\n }\n\n interface ParsedBody\n {\n String getBodyTagProperty(String key);\n String getPageProperty(String key);\n }\n}", "@Override\r\n public IExtension getExtension(String name) {\n return this.DecoratedSortAlgo.getExtension(name);\r\n }", "@Word(word = \"First\", value = 1) \n\t public static void newMethod(){ \n\t\t FullAnnotationProgram obj = new FullAnnotationProgram(); \n\n\t try{ \n\t Class<?> c = obj.getClass(); \n\n\t // Obtain the annotation for newMethod \n\t Method m = c.getMethod(\"newMethod\"); \n\t \n\t // Display the full annotation \n\t Annotation anno = m.getAnnotation(CustomRepeatAnnots.class); \n\t System.out.println(anno); \n\t }catch (NoSuchMethodException e){ \n\t System.out.println(e); \n\t } \n\t }", "public interface CustomizeInteractions {\n\t/**\n\t * \n\t * @return current object iteractions\n\t */\n\tpublic Map<> getInteractions();\n}", "public void regist(String name, Object obj, Method fun) {\n ObjectMethod om = new ObjectMethod();\n om.obj = obj;\n om.fun = fun;\n funs.put(name, om);\n }", "@Override // com.zhihu.android.sugaradapter.SugarHolder\n /* renamed from: a */\n public void mo56529a(Object obj) {\n }", "DynamicInstance createDynamicInstance();", "@ProxyGen\npublic interface UserMongoService {\n\n static UserMongoService create(Vertx vertx, MongoClient client) {\n return new UserMongoServiceImpl(vertx,client);\n }\n\n static UserMongoService createProxy(Vertx vertx, String address) {\n return new UserMongoServiceVertxEBProxy(vertx, address);\n }\n\n}", "@Override\n\tpublic void annotate(JDefinedClass cls) {\n\n\t}", "public static DynamicExpression makeDynamic(Class type, CallSiteBinder binder, Expression argument) { throw Extensions.todo(); }", "AutoevaluacionFactory getAutoevaluacionFactory();", "@Override\n\tpublic void jugar() {}", "public ExtensionLoader(Class<?> type) {\n\t\tthis.type = type;\n//\t\tobjectFactory = (type == ExtensionFactory.class) ?\n//\t\t\t\tnull\n//\t\t\t\t:\n//\t\t\t\tExtensionLoader.getExtensionLoader(ExtensionFactory.class).getAdaptiveExtention();\n\t}" ]
[ "0.6268519", "0.6225142", "0.6071164", "0.59368825", "0.58079183", "0.56125677", "0.5551196", "0.5451957", "0.5419769", "0.5399166", "0.53297913", "0.5313841", "0.53115386", "0.5299979", "0.5292743", "0.5288646", "0.5282165", "0.52182454", "0.52112776", "0.52025396", "0.51953655", "0.5190465", "0.5163108", "0.5160755", "0.5129528", "0.5108824", "0.5103569", "0.51021343", "0.5093081", "0.5087431", "0.5081279", "0.5078907", "0.50698507", "0.50687003", "0.5056516", "0.50515366", "0.5045518", "0.5020024", "0.5011567", "0.500098", "0.49993402", "0.49847376", "0.4968503", "0.49680054", "0.49638033", "0.49465236", "0.49457553", "0.4944349", "0.4943375", "0.49375445", "0.4936541", "0.49132636", "0.49119735", "0.4908251", "0.49075034", "0.49053013", "0.49050498", "0.49050248", "0.49032408", "0.49015307", "0.4897261", "0.4896696", "0.48963654", "0.4889741", "0.48840004", "0.48794973", "0.48760447", "0.48554578", "0.48488006", "0.48488006", "0.48424298", "0.4833929", "0.4831924", "0.48250732", "0.48211673", "0.48130533", "0.48110518", "0.48083082", "0.48021096", "0.48012447", "0.47973412", "0.47942626", "0.47880644", "0.47847494", "0.4772675", "0.47637776", "0.47594237", "0.47572", "0.47339964", "0.47160634", "0.47027418", "0.47020614", "0.46930563", "0.46913394", "0.46911958", "0.46892676", "0.46856335", "0.46811643", "0.46793082", "0.46766296", "0.46729055" ]
0.0
-1
Add to the existing Auto description method. This decorator will override this Auto method, extending the functionality by adding it's own custom version which will append this specific option description to the existing Auto description.
@Override public String getDesc() { return auto.getDesc() + AC_DESCRIPTION; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void setDescription(String arg0)\n {\n \n }", "interface WithDescription {\n /**\n * Specifies the description property: The user description of the source control..\n *\n * @param description The user description of the source control.\n * @return the next definition stage.\n */\n Update withDescription(String description);\n }", "public abstract void setDescription(String description);", "public abstract void setDescription(String description);", "public void setDescription (String Description);", "public void setDescription (String Description);", "public void setDescription (String Description);", "public void setDescription (String Description);", "public void setDescription (String Description);", "public void setDescription (String Description);", "Builder addDescription(String value);", "interface WithDescription {\n /**\n * Specifies the description property: The user description of the source control..\n *\n * @param description The user description of the source control.\n * @return the next definition stage.\n */\n WithCreate withDescription(String description);\n }", "public void setDescription (String description);", "interface WithDescription {\n /**\n * Specifies the description property: The description of the lab..\n *\n * @param description The description of the lab.\n * @return the next definition stage.\n */\n Update withDescription(String description);\n }", "public void setDescription(String desc);", "public void setDescription(String description){this.description=description;}", "void setDescription(String description);", "public void setDescription(String description);", "public void setDescription(String description);", "public void setDescription(String description);", "public void setDescription(String description);", "public void setDescription(String description);", "@Override\n protected void options()\n {\n super.options();\n addOption(Opt.APPLICATION_ID);\n addOption(Opt.SERVER_ID);\n addOption(Opt.CATEGORY);\n addOption(Opt.NAME, \"The name of the label\");\n }", "public void setDescription(String description) {\n\n }", "void setDescription(java.lang.String description);", "public void setDescription(String description)\n/* */ {\n/* 67 */ this.description = description;\n/* */ }", "public void setDescription(String argDescription) {\n\tthis.description = argDescription;\n }", "@Override\n protected String getDescription() {\n return DESCRIPTION;\n }", "public void setDescription(java.lang.String value);", "public void setDescription(java.lang.String value);", "public void setDescription(java.lang.String value);", "public void setDescription(java.lang.String value);", "Builder addDetailedDescription(String value);", "public void setDescription(String description) { this.description = description; }", "public DescriptionBuilder addToDescription(String toAdd) {\n descriptor.addToDescription(toAdd);\n return this;\n }", "@Override\n public String getDescription() {\n return description;\n }", "@Override\n public BasicCommandBuilder withDescription(String description){\n this.description = description;\n return this;\n }", "void setDescription(final String description);", "interface WithDescription {\n /**\n * Specifies the description property: The description of the lab..\n *\n * @param description The description of the lab.\n * @return the next definition stage.\n */\n WithCreate withDescription(String description);\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String sDescription);", "@Override\n public String getDescription() {\n return DESCRIPTION;\n }", "@Override\n public String getDescription() {\n return description;\n }", "@Override\n public String getDescription() {\n return descriptionText;\n }", "public void setDescription(String descr);", "Builder addDescription(Text value);", "public abstract void description();", "public void setDescription(String string) {\n\t\t\n\t}", "public void setDescription(String desc) {\n this.desc = desc;\n }", "public void setDescription(String newValue);", "public void setDescription(String newValue);", "public void setDescription(final String description);", "@JSProperty(\"description\")\n void setDescription(String value);", "public void setDescription(String paramDesc) {\n\tstrDesc = paramDesc;\n }", "public void setDescription(String newDesc){\n\n //assigns the value of newDesc to the description field\n this.description = newDesc;\n }", "@AutoEscape\n public String getDescription();", "public void setDescription(String Description) {\n this.Description = Description;\n }", "public void setDescription(String description){\n this.description = description;\n }", "public void setDescription(String desc) {\n sdesc = desc;\n }", "public void addOption(String shortName, String longName, String description) {\n\n if (shortName.equals(\"h\") || shortName.equals(\"v\")) {\n throw new IllegalArgumentException(\"-h and -v are reserved arguments\");\n }\n m_groupBuilder = m_groupBuilder.withOption(m_optBuilder\n .withDescription(description)\n .withLongName(longName)\n .withShortName(shortName)\n .create());\n }", "public void setDescription(String description)\n {\n this.description = description;\n }", "public void setDescription(String value) {\r\n this.description = value;\r\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String desc)\r\n {\r\n\tthis.desc = desc;\r\n }", "public void setDescription(String description) {\n mDescription = description;\n }", "void applyDescription(Operation operation, Method method);", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void addDescription (String description)\n\t{\n\t\tString desc = getDescription();\n\t\tif (desc == null)\n\t\t\tsetDescription(description);\n\t\telse\n\t\t\tsetDescription(desc + \" | \" + description);\n\t}", "public void setDescription(String value) {\n this.description = value;\n }", "protected void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String newdescription) {\n description=newdescription;\n }", "public void setDescription(String description)\n {\n this.description = description;\n }", "@Override\n\tpublic String getDescription() {\n\t\treturn description;\n\t}", "public void setDescription(java.lang.String value) {\n __getInternalInterface().setFieldValueForCodegen(DESCRIPTION_PROP.get(), value);\n }", "@Override\r\n public String description() {\r\n return \"<html>Create a new method in class A that delegates the call to object B. <br/>\" +\r\n \"Now the client doesn’t know about, or depend on, class B. </html>\";\r\n }", "public void addDescription(String description) {\n String desc = getDescription();\n if (desc == null) {\n setDescription(description);\n } else {\n setDescription(desc + \" | \" + description);\n }\n }", "public Builder setDescription(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n description_ = value;\n onChanged();\n return this;\n }", "public void setDescription(String desc) {\n description = desc;\n }", "@Override\n public String getDescription() {\n return \"Alias buy\";\n }", "public void setDescription(String description) {\n \tthis.description = description;\n }", "@Override\r\n\tpublic String getDescription() {\n\t\treturn description;\r\n\t}", "public void setDescription(String description) {\n this.description = description;\r\n // changeSupport.firePropertyChange(\"description\", oldDescription, description);\r\n }", "public void setDescription(String description)\n {\n this.description = description;\n }", "public void setDescription(String description)\n {\n this.description = description;\n }", "public void setDescription(String description)\n {\n this.description = description;\n }", "@Override\n\tpublic IKeyword option() { return option; }", "public void setDescription(String description) {\r\n this.description = description;\r\n }", "public void setDescription(String description) {\r\n this.description = description;\r\n }", "public void setDescription(String description) {\r\n this.description = description;\r\n }", "public void setDescription(String description) {\r\n this.description = description;\r\n }", "public void setDescription(String description) {\r\n this.description = description;\r\n }", "@AutoEscape\n\tpublic String getDescription();", "@AutoEscape\n\tpublic String getDescription();", "@AutoEscape\n\tpublic String getDescription();", "@AutoEscape\n\tpublic String getDescription();" ]
[ "0.65958035", "0.63917947", "0.63392794", "0.63392794", "0.63362753", "0.63362753", "0.63362753", "0.63362753", "0.63362753", "0.63362753", "0.6214849", "0.618726", "0.6181087", "0.6162126", "0.6159088", "0.6128994", "0.6115138", "0.60947543", "0.60947543", "0.60947543", "0.60947543", "0.60947543", "0.60937035", "0.6081344", "0.60542417", "0.6041647", "0.60311997", "0.6013274", "0.6000215", "0.6000215", "0.6000215", "0.6000215", "0.5998267", "0.59981906", "0.5978816", "0.59264755", "0.59174", "0.59096515", "0.5900088", "0.5895808", "0.5895808", "0.5892076", "0.5867976", "0.58467245", "0.58425236", "0.5839962", "0.5800456", "0.57945126", "0.5793512", "0.57917535", "0.5788559", "0.5788559", "0.57506377", "0.5716342", "0.5710629", "0.57061", "0.5690693", "0.56883395", "0.5658324", "0.565456", "0.56497616", "0.56478155", "0.5645114", "0.56430584", "0.56403977", "0.56355345", "0.561926", "0.56140345", "0.56140345", "0.56140345", "0.56140345", "0.56140345", "0.56133723", "0.5612876", "0.5604863", "0.5603163", "0.5594809", "0.5591072", "0.5582511", "0.55817306", "0.5579172", "0.557768", "0.55775064", "0.5565989", "0.5561838", "0.5553448", "0.5551364", "0.55483", "0.55483", "0.55483", "0.553746", "0.5534551", "0.5534551", "0.5534551", "0.5534551", "0.5534551", "0.5530961", "0.5530961", "0.5530961", "0.5530961" ]
0.63525784
2
Add to the existing Auto price method. This decorator will override this Auto method, extending the functionality by adding it's own custom version which will add the price of this auto option to the existing Auto base price.
@Override public double getPrice() { return auto.getPrice() + AC_ADDITIONAL_CHARGE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setPrice(Double price);", "@Override\n public double getPrice() {\n return souvenir.getPrice() + 20;\n }", "public void setPrice(double price){this.price=price;}", "public abstract void setTotalPrice();", "@Override\n public int getPrice() {\n return 20;\n }", "protected void updateOptionPrice(String optionName, float price)\n\t\t\tthrows AutoException {\n\t\tif (getOption(optionName) == null) {\n\t\t\tthrow new AutoException(CustomExceptionEnum.OptionNotFound);\n\t\t} else {\n\t\t\tgetOption(optionName).setPrice(price);\n\t\t}\n\t}", "public void setPrice(double price)\n {\n this.price = price;\n }", "public void setPrice(double price)\n {\n this.price = price;\n }", "public void setPrice(Double price) {\r\n this.price = price;\r\n }", "public void setPrice(Double price) {\n this.price = price;\n }", "public void setPrice(Double price) {\n this.price = price;\n }", "public void setPrice(double price) {\r\n this.price = price;\r\n }", "public void setPrice(double price) {\r\n this.price = price;\r\n }", "public void setPrice(double price) {\r\n this.price = price;\r\n }", "public void setPrice(double price) {\n this.price = price;\n }", "public void setPrice(double price) {\n this.price = price;\n }", "public void setPrice(double price) {\n this.price = price;\n }", "public void setPrice(double price) {\n this.price = price;\n }", "public void setPrice(double price) {\n this.price = price;\n }", "public void setPrice(double price) {\n this.price = price;\n }", "public void setPrice(double price) {\n this.price = price;\n }", "public void calcPrice() {\r\n\t\tsuper.price = 3 * super.height;\r\n\t}", "@Override\n\tpublic double getPrice() {\n\t\treturn 20;\n\t}", "@Override\r\n public double calculatePrice() {\r\n return super.priceAdjustIE(super.calculatePrice() + WASTE_REMOVAL);\r\n }", "@Override\n public double getPrice() {\n return 2.5;\n }", "@Override\r\n\tpublic double getPrice() {\n\t\treturn pizza.getPrice()+ 12.88;\r\n\t}", "abstract public double getPrice();", "@Override\n\tpublic void setPrice() {\n\t\tprice = 24.99;\n\n\t}", "public void increasePrice() {\n //price doubled\n itemToSell.setBuyPrice(itemToSell.getBuyPrice() * 2);\n }", "@Override\n public double getPrice(){\n \n return currentPrice; \n }", "public void setPrice(Money price) {\n this.price = price;\n }", "@Override\n\tpublic void setPrice(double price) {\n\t\tconstantPO.setPrice(price);\n\t}", "@Override\n public double getPrice()\n {\n return room.getPrice() + PRICE;\n }", "public void setPrice(double price) {\r\n\t\tthis.price = price;\r\n\t}", "public void setPrice(double price) {\r\n\t\tthis.price = price;\r\n\t}", "public void setPrice(double price) \n\t{\n\t\tthis.price = price;\n\t}", "@Override\n\tpublic void setPrice(int price) {\n\t\t\n\t}", "public void setPrice(double value) {\n this.price = value;\n }", "public void setPrice(double value) {\n this.price = value;\n }", "public void setPrice(double price) {\n\t\tthis.price = price;\n\t}", "public void setPrice(double price) {\n\t\tthis.price = price;\n\t}", "public void setPrice(double price) {\n\t\tthis.price = price;\n\t}", "@Override\n public void onNewPrice(double price) {\n\n }", "public void setPrice(Double price) {\n\t\tthis.price = price;\n\t}", "public void setPrice(double newPrice) {\r\n price = newPrice;\r\n }", "public double getPrice(){return price;}", "public double getPrice();", "@Override\n\tpublic void viewPrice() {\n\t\t\n\t}", "@Override\r\n\tpublic void setPrice(double p) {\n\t\tprice = p;\r\n\t}", "@Override\n\tdouble updateTotalPrice() {\n\t\treturn 0;\n\t}", "public Double getPrice();", "public void setPrice(float itemPrice) \n {\n price = itemPrice;\n }", "public double calculatePrice(){\r\n\t\treturn getBasePrice()+getBasePrice()*getVat()+(getBasePrice()+getBasePrice()*getVat())*0.3;\r\n\t}", "public void setPrice(double price) \n\t{\n\t\tthis.price = price * quantity;\n\t}", "public void setPrice(int price) {\n\tthis.price = price;\n}", "public void setPrice(int price) {\r\n this.price = price;\r\n }", "@Override\r\n\tpublic double getPrice() {\n\t\treturn price;\r\n\t}", "@Override\r\n\tpublic void addToCost() {\n\t\t\r\n\t}", "public void setPrice(int price) {\n this.price = price;\n }", "public void setPotatoesPrice(double p);", "public void setPrice(float price) {\n this.price = price;\n }", "public void setPrice(float price) {\n this.price = price;\n }", "@Override\n\tpublic double getPrice() {\n\t\treturn 10;\n\t}", "@Override\n\tpublic double getPrice() {\n\t\treturn 10;\n\t}", "@Override\n\tpublic double getPrice() {\n\t\t\n\t\treturn 2000;\n\t}", "public void setPrice(Float price) {\r\n this.price = price;\r\n }", "public void setPrice(Float price) {\n this.price = price;\n }", "public double getOptionPrice()\n {\n return optionPrice;\n }", "public void setOptionPrice(double optionPrice)\n {\n this.optionPrice = optionPrice;\n }", "public Double getPrice() {\r\n return price;\r\n }", "public void increasePrice(int percentage);", "public double getPrice() {\r\n return price;\r\n }", "public double getPrice() {\r\n return price;\r\n }", "public double getPrice() {\r\n return price;\r\n }", "public double getPrice() {\r\n return price;\r\n }", "public void setPrice (double ticketPrice)\r\n {\r\n price = ticketPrice;\r\n }", "public double getPrice()\r\n {\r\n return price;\r\n }", "public double price() {\n return price;\n }", "double getPrice();", "double getPrice();", "double getPrice();", "@Override\r\n\tpublic double CalculatePrice() {\n\t\treturn 0;\r\n\t}", "public void setPrice(double p)\r\n\t{\r\n\t\tprice = p;\r\n\t}", "public double getPrice() {\n return price;\n }", "public int price(){\n return 2;\n }", "public double getPrice() {\n return price;\n }", "public double getPrice() {\n return price;\n }", "public double getPrice() {\n return price;\n }", "public double getPrice() {\n return price;\n }", "public double getPrice() {\n return price;\n }", "public double getPrice() {\n return price;\n }", "public double getPrice() {\n return price;\n }", "public double getPrice() {\n return price;\n }", "public double getPrice() {\n return price;\n }", "public double getPrice() {\n return price;\n }", "public double getPrice() {\n return price;\n }", "@Override\n\t\t\tpublic double getPrice() {\n\t\t\t\treturn 50.0;\n\t\t\t}", "public double getPrice(){\r\n\t\treturn price;\r\n\t}", "public Double getPrice() {\n return price;\n }", "public Double getPrice() {\n return price;\n }" ]
[ "0.6296314", "0.6270297", "0.62024933", "0.61783576", "0.6085575", "0.6061756", "0.6053474", "0.6031956", "0.6007905", "0.59861165", "0.59861165", "0.59809494", "0.59809494", "0.59809494", "0.5977513", "0.5977513", "0.5977513", "0.5977513", "0.5977513", "0.5977513", "0.5977513", "0.5967883", "0.59451747", "0.5919974", "0.5906925", "0.58859664", "0.5860004", "0.5855864", "0.5816871", "0.5810694", "0.578556", "0.57801896", "0.575518", "0.5747462", "0.5747462", "0.5746753", "0.57418966", "0.5695164", "0.5695164", "0.5679755", "0.5679755", "0.5679755", "0.56781155", "0.5677244", "0.5649476", "0.5627439", "0.5625378", "0.5621042", "0.55989236", "0.55982697", "0.55936456", "0.5592259", "0.5582901", "0.5582253", "0.55764925", "0.5555334", "0.55479187", "0.5546224", "0.5541242", "0.5526175", "0.55243677", "0.55243677", "0.55237305", "0.55237305", "0.552364", "0.55228555", "0.5508471", "0.55050874", "0.54974043", "0.54870003", "0.5478592", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.54723734", "0.5472096", "0.54716706", "0.54710555", "0.54710555", "0.54710555", "0.5467813", "0.5463873", "0.54636335", "0.5454835", "0.54440147", "0.54440147", "0.54440147", "0.54440147", "0.54440147", "0.54440147", "0.54440147", "0.54440147", "0.54440147", "0.54440147", "0.54440147", "0.544255", "0.54321724", "0.5428646", "0.5428646" ]
0.6839806
0
Constructor. Constructs a TriangleElt3D as a Triangle3D with given points.
public TriangleElt3D(Point3D[] points, ScalarOperator sop) throws IllegalArgumentException { super(points, sop); this.eltZero = null; this.eltOne = null; this.eltTwo = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public TriangleElt3D(Point3D point1, Point3D point2, Point3D point3,\n\t\t\tScalarOperator sop) {\n\t\tthis(new Point3D[] { point1, point2, point3 }, sop);\n\t}", "public Triangle (double x1,double y1,double x2, double y2,double x3,double y3)\r\n {\r\n v1 = new Point(x1,y1);\r\n v2 = new Point(x2,y2);\r\n v3 = new Point(x3,y3);\r\n }", "public Triangle(\n IPoint firstPoint,\n IPoint secondPoint,\n IPoint thirdPoint,\n IPrimitive parent)\n {\n super(parent);\n this.addVertex(firstPoint);\n this.addVertex(secondPoint);\n this.addVertex(thirdPoint);\n\n }", "public Triangle(IPoint firstPoint, IPoint secondPoint, IPoint thirdPoint)\n {\n this(firstPoint, secondPoint, thirdPoint, null);\n\n }", "public Triangle(Point p1, Point p2, Point p3) {\n this.p1 = p1;\n this.p2 = p2;\n this.p3 = p3;\n this.path = buildPath();\n }", "public Triangle( Point p1, Point p2, Point p3 ) {\n super(\"Triangle: \");\n this.setP1(p1);\n this.setP2(p2);\n this.setP3(p3);\n }", "Triangle(int x, int y, int z) {\n this.x = x;\n this.y = y;\n this.z = z;\n }", "public Point3(float x, float y, float z) {\r\n\t\tsuper(x, y);\r\n\t\tthis.z = z;\r\n\t}", "Point3D (double x, double y, double z) {\n this.x = x;\n this.y = y;\n this.z = z;\n }", "public Point3D(double x,double y,double z)\n {\n _x=x;\n _y=y;\n _z=z;\n }", "public TriangleElt3D(Point3D point, Segment3D seg, ScalarOperator sop) {\n\t\tthis(new Point3D[] { point, seg.getPoint(0), seg.getPoint(1) }, sop);\n\t}", "public Vertex3D(double x, double y, double z) {\n this.x = x;\n this.y = y;\n this.z = z;\n }", "public Point3(double x_, double y_, double z_) {\n x = x_; y = y_; z = z_;\n }", "public Triangle (int x, int y, int z){ \r\n \r\n \r\n }", "public Triangle() { \n super(\"Triangle: \");\n this.setP1(new Point());\n this.setP2(new Point());\n this.setP3(new Point());\n }", "public Vertex3D() {\n this(0.0, 0.0, 0.0);\n }", "public Point3D(Point3D point) {\n\t this.x = point.x;\n\t this.y = point.y;\n\t this.z = point.z;\n }", "public Point3(Point3 p) {\n this.x = p.x; this.y = p.y; this.z = p.z;\n }", "public Point3F(float x, float y, float z) {\n this.x = x;\n this.y = y;\n this.z = z;\n }", "public Triangle(Point a, Point b, Point c){\n this.a=a;\n this.b=b;\n this.c=c;\n }", "public Triangle (double x1,double y1,double x2, double y2)\r\n {\r\n v1 = new Point(x1,y1);\r\n v2 = new Point(x2,y2);\r\n v3 = new Point(0,0);\r\n }", "public Vector3(double x, double y, double z) {\n this.x = x; this.y = y; this.z = z;\n }", "public Vertex3D(Vertex3D c) {\n this(c.x, c.y, c.z);\n }", "public Vector3D(double x, double y, double z) {\n this.x = x;\n this.y = y;\n this.z = z;\n }", "public Vec3D(Point3D point) {\n\t\tx = point.x;\n\t\ty = point.y;\n\t\tz = point.z;\n\t}", "public Vector3D(float x, float y, float z)\r\n\t{\r\n\t\tthis.x = x;\r\n\t\tthis.y = y;\r\n\t\tthis.z = z;\r\n\t}", "public Vector3D(double x, double y, double z) {\r\n super(x, y, z);\r\n\t}", "private Vector3D(int x, int y, int z) {\n this(x, y, z, null);\n }", "public Vector3D(double x, double y, double z) {\n this.xCoord = x;\n this.yCoord = y;\n this.zCoord = z;\n }", "public Triangle(int x1, int y1, int x2, int y2, int x3, int y3, String name){\n this.x1 = x1;\n this.y1 = y1;\n this.x2 = x2;\n this.y2 = y2;\n this.x3 = x3;\n this.y3 = y3;\n this.name = name;\n \n \n }", "public ThreeVector(double v1,double v2,double v3) {\r\n\t\tthis.x=v1;\r\n\t\tthis.y=v2;\r\n\t\tthis.z=v3;\r\n\t}", "public Vector3 (float x, float y, float z) {\r\n\t\tthis.x = x;\r\n\t\tthis.y = y;\r\n\t\tthis.z = z;\r\n\t}", "protected abstract BaseVector3d createBaseVector3d(double x, double y, double z);", "public\n\tVector3( Point3 point )\n\t{\n\t\tdata = new double[3];\n\t\tcopy( point );\n\t}", "public Vector3 (double x, double y, double z) {\n set(x, y, z);\n }", "public CMLVector3(CMLPoint3 p) {\r\n Vector3 v = new Vector3(p.getEuclidPoint3());\r\n this.setXYZ3(v.getArray());\r\n }", "public Vector3(double x, double y, double z)\n\t{\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tthis.z = z;\n\t}", "public Vector3(double x, double y, double z) {\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tthis.z = z;\n\t}", "public Triangle()\n {\n\n this(new Point(-0.5f, (float)-Math.tan(Math.PI / 6), 0f), new Point(\n 0.5f,\n (float)-Math.tan(Math.PI / 6),\n 0f), new Point(0f, (float)Math.sqrt(0.75)\n + (float)-Math.tan(Math.PI / 6), 0f));\n }", "public Triangle( Triangle tri ) {\n super(\"Triangle: \");\n this.setP1( new Point( tri.getP1() ) );\n this.setP2( new Point( tri.getP2() ) );\n this.setP3( new Point( tri.getP3() ) );\n }", "public Triangle() {\n\t\tsuper.addPoint(new java.awt.Point(0,1));\n\t\tsuper.addPoint(new java.awt.Point(1,0));\n\t\tsuper.addPoint(new java.awt.Point(2,1));\n\t}", "public Triangle(double side1, double side2, double side3) {\n\t\tthis.side1 = side1;\n\t\tthis.side2 = side2;\n\t\tthis.side3 = side3;\n\t}", "public static Vect3 mkXYZ(double x, double y, double z) {\n\t\treturn new Vect3(x,y,z);\n\t}", "public Vec3(){\n\t\tthis(0,0,0);\n\t}", "Triangle (double side1, double side2, double side3){\n this.side1 = side1;\n this.side2 = side2;\n this.side3 = side3;\n }", "public Vector(double x1, double y1, double z1) {\n Point3D p = new Point3D(x1, y1, z1);\n if (p.equals(Point3D.ZERO))\n throw new IllegalArgumentException(\"no meaning to the vector\");\n head=new Point3D(p);\n }", "public Vect3(double xx, double yy, double zz) {\n\t\tx = xx;\n\t\ty = yy;\n\t\tz = zz;\n\t}", "public Object3D() {\n objectVectors = new ArrayList<>();\n linesToDraw = new ArrayList<>();\n }", "public Triangle(Context context, Point[] points, int color) {\n super(context);\n init(points, color);\n }", "public Vec3D() {\n\t\tx = y = z = 0.0f;\n\t}", "public FloatVector3D(){}", "public Vec3(float x, float y, float z){\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tthis.z = z;\n\t\ttrunc();\n\t}", "public Vector(Coordinate x1, Coordinate y1, Coordinate z1) {\n Point3D p = new Point3D(x1, y1, z1);\n if (p.equals(Point3D.ZERO))\n throw new IllegalArgumentException(\"no meaning to the vector\");\n head=new Point3D(p);\n }", "public CMLVector3(double[] array) {\r\n this.setXYZ3(array);\r\n }", "public Triangle(double s1, double s2, double s3){\n\t\tside1=s1;\n\t\tside2=s2;\n\t\tside3=s3;\n\t}", "public WB_Normal3d(final double x, final double y, final double z) {\r\n\t\tsuper(x, y, z);\r\n\t}", "public Triangle() {\n this(0,0,0,0,0);\n }", "public\n\tVector3()\n\t{\n\t\tdata = new double[3];\n\t\tdata[0] = 0;\n\t\tdata[1] = 0;\n\t\tdata[2] = 0;\n\t}", "public Triangle (int tipX, int tipY, int height, String orientation){\n super.points = new ArrayList();\n x1 = tipX;\n y1 = tipY;\n this.height = height;\n defineVertexes(orientation);\n definePoints();\n }", "public CMLVector3() {\r\n }", "public Vector(double x, double y, double z) {\n this(new Point3D(x, y, z));\n }", "protected AbstractMatrix3D() {}", "TriangleChecker(int x, int y, int z) {\n triangle = new Triangle(x, y, z);\n }", "public TriangleObject (double[][][] t) {\n\tfor (double[][] i: t) {\n Triangle in = new Triangle(i);\n\t\ttriangles.add(in); //You need to instantiate a new triangle to satsify this ^^\n\t}\n }", "public Vec3D(double ax, double ay, double az) {\n\t\tx = ax;\n\t\ty = ay;\n\t\tz = az;\n\t}", "public static Vect3 mk(double x, double y, double z) {\n\t\treturn new Vect3(x,y,z);\n\t}", "public Triangle(){\n\t\tside1=1.0;\n\t\tside2=1.0;\n\t\tside3=1.0;\n\t}", "public MultiShape3D()\n {\n this( (Geometry)null, (Appearance)null );\n }", "public Triangle() {\n setPointsAs0();\n S = 0;\n }", "public Plane3(Plane3 p) {\n this.a = p.a; this.b = p.b; this.c = p.c; this.v = p.v; this.d = p.d;\n }", "public Vector3(NBTTagCompound nbt)\n {\n this(nbt.getDouble(\"x\"), nbt.getDouble(\"y\"), nbt.getDouble(\"z\"));\n }", "public static Coordinate create3D(double x, double y, double z) {\r\n return new Coordinate(x, y, z, Double.NaN);\r\n }", "public Triangle(int width, int height, int perpendicular) {\n this(width,height,perpendicular,0,0);\n }", "public WB_Normal3d(final WB_Point3d v) {\r\n\t\tsuper(v);\r\n\t}", "public Vector3D() {\r\n\t\tthis(0.0);\r\n\t}", "protected abstract Triangle makeTriangle(final Vector3d edge1, final Vector3d edge2,\n\t\t\tfinal Vector3d edge3);", "public Triangle() {\n // initialize vertex byte buffer for shape coordinates\n ByteBuffer bb = ByteBuffer.allocateDirect(\n // (number of coordinate values * 4 bytes per float)\n triangleCoords.length * 4);\n // use the device hardware's native byte order\n bb.order(ByteOrder.nativeOrder());\n\n // create a floating point buffer from the ByteBuffer\n vertexBuffer = bb.asFloatBuffer();\n // add the coordinates to the FloatBuffer\n vertexBuffer.put(triangleCoords);\n // set the buffer to read the first coordinate\n vertexBuffer.position(0);\n\n // prepare shaders and OpenGL program\n int vertexShader = MyGLRenderer.loadShader(\n GLES20.GL_VERTEX_SHADER, vertexShaderCode);\n int fragmentShader = MyGLRenderer.loadShader(\n GLES20.GL_FRAGMENT_SHADER, fragmentShaderCode);\n\n mProgram = GLES20.glCreateProgram(); // create empty OpenGL Program\n GLES20.glAttachShader(mProgram, vertexShader); // add the vertex shader to program\n GLES20.glAttachShader(mProgram, fragmentShader); // add the fragment shader to program\n GLES20.glLinkProgram(mProgram); // create OpenGL program executables\n\n }", "public FloatVector3D(float x, float y, float z)\n {\n fx = x;\n fy = y;\n fz = z;\n setMagnitude();\n }", "public Vect3(Vect2 v, double z) {\n\t\tthis(v.x,v.y,z);\n\t}", "public Vec3D(Vec3D vec) {\n\t\tx = vec.x;\n\t\ty = vec.y;\n\t\tz = vec.z;\n\t}", "public Vector3 () {\r\n\t\tx = 0;\r\n\t\ty = 0;\r\n\t\tz = 0;\r\n\t}", "public Triangle(Triangle tri){\n this(tri.width, tri.height, tri.perpendicular, tri.getX(), tri.getY());\n }", "public Vector3D() {\n zero();\n }", "public Vec3(Vec3 copy){\n\t\tthis(copy.x, copy.y, copy.z);\n\t}", "public Vector(Coordinate x, Coordinate y, Coordinate z) {\n this(new Point3D(x, y, z));\n }", "public Vec3(float[] init){\n\t\tif(init.length >= 3){\n\t\t\tx = init[0];\n\t\t\ty = init[1];\n\t\t\tz = init[2];\n\t\t\ttrunc();\n\t\t}\n\t}", "public Triangle() {}", "public ViewerPosition3D()\n {\n }", "public AbstractCube7Idx3D() {\n super(7, 8, 5 * 12, 5 * 5 * 6, 1);\n init();\n }", "public WB_Normal3d() {\r\n\t\tsuper();\r\n\t}", "public Vec3 toVec3()\n {\n return Vec3.createVectorHelper(this.x, this.y, this.z);\n }", "public static Triangle getTriangle(String[] inputArgs) {\n\t\tif(inputArgs.length != 7)\n\t\t\tthrow new IllegalArgumentException();\n\t\treturn new Triangle(\n\t\t\t\t\t\t\tInteger.parseInt(inputArgs[1]),\n\t\t\t\t\t\t\tInteger.parseInt(inputArgs[2]),\n\t\t\t\t\t\t\tInteger.parseInt(inputArgs[3]),\n\t\t\t\t\t\t\tInteger.parseInt(inputArgs[4]),\n\t\t\t\t\t\t\tInteger.parseInt(inputArgs[5]),\n\t\t\t\t\t\t\tInteger.parseInt(inputArgs[6])\n\t\t\t\t\t\t\t);\n\t}", "private Polygon createTriangle(Point a, Point b, Point c) {\n Polygon p = new Polygon();\n p.addPoint(a.x, a.y);\n p.addPoint(b.x, b.y);\n p.addPoint(c.x, c.y);\n\n return p;\n }", "public Vector3(double x, double y,double z){\n \n double pytago;\n \n this.x = x;\n this.y = y;\n this.z = z;\n \n pytago = (x*x) + (y*y) + (z*z);\n \n magnitude = Math.sqrt(pytago);\n }", "public Vec3(Vec2 vect, float z){\n\t\tthis(vect.x, vect.y, z);\n\t}", "private D3() {\n super(3);\n }", "public static Vect3 makeXYZ(double x, String ux, double y, String uy, double z, String uz) {\n\t\treturn new Vect3(Units.from(ux,x),Units.from(uy,y),Units.from(uz,z));\n\t}", "public Triangle(IPrimitive parent)\n {\n this(new Point(-0.5f, (float)-Math.tan(Math.PI / 6), 0f), new Point(\n 0.5f,\n (float)-Math.tan(Math.PI / 6),\n 0f), new Point(0f, (float)Math.sqrt(0.75)\n + (float)-Math.tan(Math.PI / 6), 0f), parent);\n\n }", "Triangle(){\n side1 = 1.0;\n side2 = 1.0;\n side3 = 1.0;\n }", "public Pj3dPlane Pj3dPlane(int x, int z)\r\n\t{\r\n \tPj3dPlane plane = new Pj3dPlane(this, x, z);\r\n\t\treturn plane;\r\n\t}" ]
[ "0.77418125", "0.73445576", "0.7342883", "0.7151399", "0.714016", "0.7114168", "0.703534", "0.69994545", "0.69752926", "0.69635254", "0.694663", "0.6913407", "0.6889055", "0.68531466", "0.68260854", "0.68237233", "0.6794175", "0.67169124", "0.66979235", "0.666611", "0.66464245", "0.6586133", "0.65742993", "0.65563893", "0.65541905", "0.6550907", "0.6543758", "0.65404284", "0.6527484", "0.65083694", "0.6506335", "0.6479787", "0.64682335", "0.6463292", "0.6458512", "0.6439769", "0.6425904", "0.6397862", "0.63843167", "0.63638824", "0.6316982", "0.62927234", "0.6292711", "0.6286713", "0.6282783", "0.62580156", "0.6254992", "0.6244451", "0.62201035", "0.6217917", "0.6211958", "0.621032", "0.6203386", "0.61867136", "0.6156342", "0.61348546", "0.61220574", "0.6109153", "0.6102214", "0.61002487", "0.6043064", "0.60427105", "0.60342187", "0.6024197", "0.60219085", "0.60107195", "0.599045", "0.59791374", "0.59784096", "0.59779847", "0.5933165", "0.5926723", "0.5923967", "0.59072036", "0.5904445", "0.5893877", "0.5885807", "0.5870385", "0.5861095", "0.5855043", "0.5822967", "0.58186793", "0.5814466", "0.58071995", "0.5795374", "0.57834035", "0.5781795", "0.5778847", "0.5764083", "0.5743328", "0.57389146", "0.5732766", "0.57274014", "0.57138294", "0.57084584", "0.5707911", "0.5701479", "0.56997025", "0.5698513", "0.56815445" ]
0.746881
1
Constructor. Constructs a TriangleElt3D as a Triangle3D with given points.
public TriangleElt3D(Point3D point1, Point3D point2, Point3D point3, ScalarOperator sop) { this(new Point3D[] { point1, point2, point3 }, sop); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public TriangleElt3D(Point3D[] points, ScalarOperator sop)\n\t\t\tthrows IllegalArgumentException {\n\t\tsuper(points, sop);\n\t\tthis.eltZero = null;\n\t\tthis.eltOne = null;\n\t\tthis.eltTwo = null;\n\t}", "public Triangle (double x1,double y1,double x2, double y2,double x3,double y3)\r\n {\r\n v1 = new Point(x1,y1);\r\n v2 = new Point(x2,y2);\r\n v3 = new Point(x3,y3);\r\n }", "public Triangle(\n IPoint firstPoint,\n IPoint secondPoint,\n IPoint thirdPoint,\n IPrimitive parent)\n {\n super(parent);\n this.addVertex(firstPoint);\n this.addVertex(secondPoint);\n this.addVertex(thirdPoint);\n\n }", "public Triangle(IPoint firstPoint, IPoint secondPoint, IPoint thirdPoint)\n {\n this(firstPoint, secondPoint, thirdPoint, null);\n\n }", "public Triangle(Point p1, Point p2, Point p3) {\n this.p1 = p1;\n this.p2 = p2;\n this.p3 = p3;\n this.path = buildPath();\n }", "public Triangle( Point p1, Point p2, Point p3 ) {\n super(\"Triangle: \");\n this.setP1(p1);\n this.setP2(p2);\n this.setP3(p3);\n }", "Triangle(int x, int y, int z) {\n this.x = x;\n this.y = y;\n this.z = z;\n }", "public Point3(float x, float y, float z) {\r\n\t\tsuper(x, y);\r\n\t\tthis.z = z;\r\n\t}", "Point3D (double x, double y, double z) {\n this.x = x;\n this.y = y;\n this.z = z;\n }", "public Point3D(double x,double y,double z)\n {\n _x=x;\n _y=y;\n _z=z;\n }", "public TriangleElt3D(Point3D point, Segment3D seg, ScalarOperator sop) {\n\t\tthis(new Point3D[] { point, seg.getPoint(0), seg.getPoint(1) }, sop);\n\t}", "public Vertex3D(double x, double y, double z) {\n this.x = x;\n this.y = y;\n this.z = z;\n }", "public Point3(double x_, double y_, double z_) {\n x = x_; y = y_; z = z_;\n }", "public Triangle (int x, int y, int z){ \r\n \r\n \r\n }", "public Triangle() { \n super(\"Triangle: \");\n this.setP1(new Point());\n this.setP2(new Point());\n this.setP3(new Point());\n }", "public Vertex3D() {\n this(0.0, 0.0, 0.0);\n }", "public Point3D(Point3D point) {\n\t this.x = point.x;\n\t this.y = point.y;\n\t this.z = point.z;\n }", "public Point3(Point3 p) {\n this.x = p.x; this.y = p.y; this.z = p.z;\n }", "public Point3F(float x, float y, float z) {\n this.x = x;\n this.y = y;\n this.z = z;\n }", "public Triangle(Point a, Point b, Point c){\n this.a=a;\n this.b=b;\n this.c=c;\n }", "public Triangle (double x1,double y1,double x2, double y2)\r\n {\r\n v1 = new Point(x1,y1);\r\n v2 = new Point(x2,y2);\r\n v3 = new Point(0,0);\r\n }", "public Vector3(double x, double y, double z) {\n this.x = x; this.y = y; this.z = z;\n }", "public Vertex3D(Vertex3D c) {\n this(c.x, c.y, c.z);\n }", "public Vector3D(double x, double y, double z) {\n this.x = x;\n this.y = y;\n this.z = z;\n }", "public Vec3D(Point3D point) {\n\t\tx = point.x;\n\t\ty = point.y;\n\t\tz = point.z;\n\t}", "public Vector3D(float x, float y, float z)\r\n\t{\r\n\t\tthis.x = x;\r\n\t\tthis.y = y;\r\n\t\tthis.z = z;\r\n\t}", "public Vector3D(double x, double y, double z) {\r\n super(x, y, z);\r\n\t}", "private Vector3D(int x, int y, int z) {\n this(x, y, z, null);\n }", "public Vector3D(double x, double y, double z) {\n this.xCoord = x;\n this.yCoord = y;\n this.zCoord = z;\n }", "public Triangle(int x1, int y1, int x2, int y2, int x3, int y3, String name){\n this.x1 = x1;\n this.y1 = y1;\n this.x2 = x2;\n this.y2 = y2;\n this.x3 = x3;\n this.y3 = y3;\n this.name = name;\n \n \n }", "public ThreeVector(double v1,double v2,double v3) {\r\n\t\tthis.x=v1;\r\n\t\tthis.y=v2;\r\n\t\tthis.z=v3;\r\n\t}", "public Vector3 (float x, float y, float z) {\r\n\t\tthis.x = x;\r\n\t\tthis.y = y;\r\n\t\tthis.z = z;\r\n\t}", "protected abstract BaseVector3d createBaseVector3d(double x, double y, double z);", "public\n\tVector3( Point3 point )\n\t{\n\t\tdata = new double[3];\n\t\tcopy( point );\n\t}", "public Vector3 (double x, double y, double z) {\n set(x, y, z);\n }", "public CMLVector3(CMLPoint3 p) {\r\n Vector3 v = new Vector3(p.getEuclidPoint3());\r\n this.setXYZ3(v.getArray());\r\n }", "public Vector3(double x, double y, double z)\n\t{\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tthis.z = z;\n\t}", "public Vector3(double x, double y, double z) {\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tthis.z = z;\n\t}", "public Triangle()\n {\n\n this(new Point(-0.5f, (float)-Math.tan(Math.PI / 6), 0f), new Point(\n 0.5f,\n (float)-Math.tan(Math.PI / 6),\n 0f), new Point(0f, (float)Math.sqrt(0.75)\n + (float)-Math.tan(Math.PI / 6), 0f));\n }", "public Triangle( Triangle tri ) {\n super(\"Triangle: \");\n this.setP1( new Point( tri.getP1() ) );\n this.setP2( new Point( tri.getP2() ) );\n this.setP3( new Point( tri.getP3() ) );\n }", "public Triangle() {\n\t\tsuper.addPoint(new java.awt.Point(0,1));\n\t\tsuper.addPoint(new java.awt.Point(1,0));\n\t\tsuper.addPoint(new java.awt.Point(2,1));\n\t}", "public Triangle(double side1, double side2, double side3) {\n\t\tthis.side1 = side1;\n\t\tthis.side2 = side2;\n\t\tthis.side3 = side3;\n\t}", "public static Vect3 mkXYZ(double x, double y, double z) {\n\t\treturn new Vect3(x,y,z);\n\t}", "public Vec3(){\n\t\tthis(0,0,0);\n\t}", "Triangle (double side1, double side2, double side3){\n this.side1 = side1;\n this.side2 = side2;\n this.side3 = side3;\n }", "public Vector(double x1, double y1, double z1) {\n Point3D p = new Point3D(x1, y1, z1);\n if (p.equals(Point3D.ZERO))\n throw new IllegalArgumentException(\"no meaning to the vector\");\n head=new Point3D(p);\n }", "public Vect3(double xx, double yy, double zz) {\n\t\tx = xx;\n\t\ty = yy;\n\t\tz = zz;\n\t}", "public Object3D() {\n objectVectors = new ArrayList<>();\n linesToDraw = new ArrayList<>();\n }", "public Vec3D() {\n\t\tx = y = z = 0.0f;\n\t}", "public Triangle(Context context, Point[] points, int color) {\n super(context);\n init(points, color);\n }", "public Vec3(float x, float y, float z){\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tthis.z = z;\n\t\ttrunc();\n\t}", "public FloatVector3D(){}", "public Vector(Coordinate x1, Coordinate y1, Coordinate z1) {\n Point3D p = new Point3D(x1, y1, z1);\n if (p.equals(Point3D.ZERO))\n throw new IllegalArgumentException(\"no meaning to the vector\");\n head=new Point3D(p);\n }", "public CMLVector3(double[] array) {\r\n this.setXYZ3(array);\r\n }", "public Triangle(double s1, double s2, double s3){\n\t\tside1=s1;\n\t\tside2=s2;\n\t\tside3=s3;\n\t}", "public WB_Normal3d(final double x, final double y, final double z) {\r\n\t\tsuper(x, y, z);\r\n\t}", "public Triangle() {\n this(0,0,0,0,0);\n }", "public\n\tVector3()\n\t{\n\t\tdata = new double[3];\n\t\tdata[0] = 0;\n\t\tdata[1] = 0;\n\t\tdata[2] = 0;\n\t}", "public Triangle (int tipX, int tipY, int height, String orientation){\n super.points = new ArrayList();\n x1 = tipX;\n y1 = tipY;\n this.height = height;\n defineVertexes(orientation);\n definePoints();\n }", "public CMLVector3() {\r\n }", "protected AbstractMatrix3D() {}", "public Vector(double x, double y, double z) {\n this(new Point3D(x, y, z));\n }", "TriangleChecker(int x, int y, int z) {\n triangle = new Triangle(x, y, z);\n }", "public TriangleObject (double[][][] t) {\n\tfor (double[][] i: t) {\n Triangle in = new Triangle(i);\n\t\ttriangles.add(in); //You need to instantiate a new triangle to satsify this ^^\n\t}\n }", "public Vec3D(double ax, double ay, double az) {\n\t\tx = ax;\n\t\ty = ay;\n\t\tz = az;\n\t}", "public static Vect3 mk(double x, double y, double z) {\n\t\treturn new Vect3(x,y,z);\n\t}", "public Triangle(){\n\t\tside1=1.0;\n\t\tside2=1.0;\n\t\tside3=1.0;\n\t}", "public MultiShape3D()\n {\n this( (Geometry)null, (Appearance)null );\n }", "public Plane3(Plane3 p) {\n this.a = p.a; this.b = p.b; this.c = p.c; this.v = p.v; this.d = p.d;\n }", "public Triangle() {\n setPointsAs0();\n S = 0;\n }", "public Vector3(NBTTagCompound nbt)\n {\n this(nbt.getDouble(\"x\"), nbt.getDouble(\"y\"), nbt.getDouble(\"z\"));\n }", "public static Coordinate create3D(double x, double y, double z) {\r\n return new Coordinate(x, y, z, Double.NaN);\r\n }", "public Triangle(int width, int height, int perpendicular) {\n this(width,height,perpendicular,0,0);\n }", "public WB_Normal3d(final WB_Point3d v) {\r\n\t\tsuper(v);\r\n\t}", "public Vector3D() {\r\n\t\tthis(0.0);\r\n\t}", "protected abstract Triangle makeTriangle(final Vector3d edge1, final Vector3d edge2,\n\t\t\tfinal Vector3d edge3);", "public Triangle() {\n // initialize vertex byte buffer for shape coordinates\n ByteBuffer bb = ByteBuffer.allocateDirect(\n // (number of coordinate values * 4 bytes per float)\n triangleCoords.length * 4);\n // use the device hardware's native byte order\n bb.order(ByteOrder.nativeOrder());\n\n // create a floating point buffer from the ByteBuffer\n vertexBuffer = bb.asFloatBuffer();\n // add the coordinates to the FloatBuffer\n vertexBuffer.put(triangleCoords);\n // set the buffer to read the first coordinate\n vertexBuffer.position(0);\n\n // prepare shaders and OpenGL program\n int vertexShader = MyGLRenderer.loadShader(\n GLES20.GL_VERTEX_SHADER, vertexShaderCode);\n int fragmentShader = MyGLRenderer.loadShader(\n GLES20.GL_FRAGMENT_SHADER, fragmentShaderCode);\n\n mProgram = GLES20.glCreateProgram(); // create empty OpenGL Program\n GLES20.glAttachShader(mProgram, vertexShader); // add the vertex shader to program\n GLES20.glAttachShader(mProgram, fragmentShader); // add the fragment shader to program\n GLES20.glLinkProgram(mProgram); // create OpenGL program executables\n\n }", "public FloatVector3D(float x, float y, float z)\n {\n fx = x;\n fy = y;\n fz = z;\n setMagnitude();\n }", "public Vect3(Vect2 v, double z) {\n\t\tthis(v.x,v.y,z);\n\t}", "public Vec3D(Vec3D vec) {\n\t\tx = vec.x;\n\t\ty = vec.y;\n\t\tz = vec.z;\n\t}", "public Vector3 () {\r\n\t\tx = 0;\r\n\t\ty = 0;\r\n\t\tz = 0;\r\n\t}", "public Triangle(Triangle tri){\n this(tri.width, tri.height, tri.perpendicular, tri.getX(), tri.getY());\n }", "public Vector3D() {\n zero();\n }", "public Vec3(Vec3 copy){\n\t\tthis(copy.x, copy.y, copy.z);\n\t}", "public Vector(Coordinate x, Coordinate y, Coordinate z) {\n this(new Point3D(x, y, z));\n }", "public Vec3(float[] init){\n\t\tif(init.length >= 3){\n\t\t\tx = init[0];\n\t\t\ty = init[1];\n\t\t\tz = init[2];\n\t\t\ttrunc();\n\t\t}\n\t}", "public Triangle() {}", "public ViewerPosition3D()\n {\n }", "public AbstractCube7Idx3D() {\n super(7, 8, 5 * 12, 5 * 5 * 6, 1);\n init();\n }", "public WB_Normal3d() {\r\n\t\tsuper();\r\n\t}", "public Vec3 toVec3()\n {\n return Vec3.createVectorHelper(this.x, this.y, this.z);\n }", "public static Triangle getTriangle(String[] inputArgs) {\n\t\tif(inputArgs.length != 7)\n\t\t\tthrow new IllegalArgumentException();\n\t\treturn new Triangle(\n\t\t\t\t\t\t\tInteger.parseInt(inputArgs[1]),\n\t\t\t\t\t\t\tInteger.parseInt(inputArgs[2]),\n\t\t\t\t\t\t\tInteger.parseInt(inputArgs[3]),\n\t\t\t\t\t\t\tInteger.parseInt(inputArgs[4]),\n\t\t\t\t\t\t\tInteger.parseInt(inputArgs[5]),\n\t\t\t\t\t\t\tInteger.parseInt(inputArgs[6])\n\t\t\t\t\t\t\t);\n\t}", "private Polygon createTriangle(Point a, Point b, Point c) {\n Polygon p = new Polygon();\n p.addPoint(a.x, a.y);\n p.addPoint(b.x, b.y);\n p.addPoint(c.x, c.y);\n\n return p;\n }", "public Vector3(double x, double y,double z){\n \n double pytago;\n \n this.x = x;\n this.y = y;\n this.z = z;\n \n pytago = (x*x) + (y*y) + (z*z);\n \n magnitude = Math.sqrt(pytago);\n }", "public Vec3(Vec2 vect, float z){\n\t\tthis(vect.x, vect.y, z);\n\t}", "private D3() {\n super(3);\n }", "public static Vect3 makeXYZ(double x, String ux, double y, String uy, double z, String uz) {\n\t\treturn new Vect3(Units.from(ux,x),Units.from(uy,y),Units.from(uz,z));\n\t}", "public Triangle(IPrimitive parent)\n {\n this(new Point(-0.5f, (float)-Math.tan(Math.PI / 6), 0f), new Point(\n 0.5f,\n (float)-Math.tan(Math.PI / 6),\n 0f), new Point(0f, (float)Math.sqrt(0.75)\n + (float)-Math.tan(Math.PI / 6), 0f), parent);\n\n }", "Triangle(){\n side1 = 1.0;\n side2 = 1.0;\n side3 = 1.0;\n }", "public Pj3dPlane Pj3dPlane(int x, int z)\r\n\t{\r\n \tPj3dPlane plane = new Pj3dPlane(this, x, z);\r\n\t\treturn plane;\r\n\t}" ]
[ "0.74689186", "0.7345741", "0.73441726", "0.7152227", "0.7141847", "0.71160066", "0.70368737", "0.70025283", "0.69787425", "0.69670725", "0.6947452", "0.6916637", "0.68925583", "0.68542004", "0.68265605", "0.6825752", "0.6797178", "0.67200077", "0.6700772", "0.66673064", "0.66472554", "0.658902", "0.6577652", "0.65592176", "0.65564245", "0.655372", "0.6546676", "0.6542601", "0.65302795", "0.6509706", "0.6508876", "0.6482506", "0.64694977", "0.6465655", "0.64610493", "0.6442147", "0.6429038", "0.64009047", "0.638426", "0.63644", "0.6316866", "0.62952745", "0.6294556", "0.628821", "0.6284426", "0.62593645", "0.62578267", "0.62452996", "0.6219587", "0.621923", "0.6212826", "0.6212565", "0.6204796", "0.6189662", "0.6158824", "0.6137827", "0.61223626", "0.61113733", "0.6102369", "0.61022437", "0.6045268", "0.60450876", "0.6035216", "0.60245603", "0.60236853", "0.6012807", "0.59913194", "0.5980924", "0.59801984", "0.5977926", "0.59353185", "0.5929228", "0.5925024", "0.59089005", "0.590574", "0.5895156", "0.58855814", "0.5872726", "0.5862962", "0.5856467", "0.58247364", "0.58188003", "0.5815719", "0.5809313", "0.57973576", "0.5785807", "0.57815695", "0.5781037", "0.5766713", "0.5745153", "0.57408077", "0.57338005", "0.5728076", "0.57157207", "0.5709991", "0.5709817", "0.57026726", "0.56995326", "0.5699186", "0.56829506" ]
0.77435046
0
Constructor. The given point must not intersect with the segment.
public TriangleElt3D(Point3D point, Segment3D seg, ScalarOperator sop) { this(new Point3D[] { point, seg.getPoint(0), seg.getPoint(1) }, sop); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Point(Point point) {\n this.x = point.x;\n this.y = point.y;\n }", "public Point(Point point) {\n super(point.getReferenceX(), point.getReferenceY());\n this.x = point.x;\n this.y = point.y;\n this.setHeight(point.getHeight());\n }", "public PrecisePoint() {\n }", "public Segment2D(Point2D point1, Point2D point2) {\n this.point1 = point1;\n this.point2 = point2;\n double xr0 = point1.getX();\n double yr0 = point1.getY();\n double xr1 = point2.getX();\n double yr1 = point2.getY();\n\n // compute line equation: ax+by+c=0\n double dx = xr0 - xr1;\n double dy = yr0 - yr1;\n double ddx = (dx > 0) ? dx : -dx;\n double ddy = (dy > 0) ? dy : -dy;\n if (ddx < EPS) {\n this.a = 1.0;\n this.b = 0.0;\n this.c = -xr0;\n }\n else {\n if (ddy < EPS) {\n this.a = 0.0;\n this.b = 1.0;\n this.c = -yr0;\n }\n else {\n // real case. Let b=1.0 -> y+ax+c=0\n this.a = (yr0 - yr1) / (xr1 - xr0);\n this.b = 1.0;\n this.c = -yr0 - this.a * xr0;\n }\n }\n this.minx = Math.min(this.point1.getX(), this.point2.getX());\n this.maxx = Math.max(this.point1.getX(), this.point2.getX());\n\n this.miny = Math.min(this.point1.getY(), this.point2.getY());\n this.maxy = Math.max(this.point1.getY(), this.point2.getY());\n }", "public Vector(Point point) {\n\t\tthis(point.x, point.y);\n\t}", "public Point(){\n this.x = 0;\n this.y = 0;\n }", "Point() {\n this.x = 0;\n this.y = 0;\n }", "public Station(Point point) {\n super(point, j2a.Factory.Color.getCYAN());\n }", "public Point()\n {\n x = -100 + (int) (Math.random() * ((100 - (-100)) + 1)); \n y = -100 + (int) (Math.random() * ((100 - (-100)) + 1));\n //x = (int) (Math.random()); \n //y =(int) (Math.random());\n pointArr[0] = 1;\n pointArr[1] = x;\n pointArr[2] = y;\n //If the point is on the line, is it accepted? I counted it as accepted for now\n if(y >= 3*x){\n desiredOut = 1;\n }\n else\n {\n desiredOut = 0;\n }\n }", "public Point(Point p)\r\n\t{\r\n\t\tx = p.x;\r\n\t\ty = p.y;\r\n\t}", "Point() {\n\t\tthis.x = 0;\n\t\tthis.y = 0;\n\t}", "public Point()\r\n\t{\r\n\t\tx = y = 0;\r\n\t}", "public Point() {\n }", "public Point() {\n }", "public Point()\n\t{ \n\t\t// Instantiate default properties\n\t\tx = 0;\n\t\ty = 0;\n\t}", "public Point() {\n\t\tthis.x = 0;\n\t\tthis.y = 0;\n\t}", "Point()\n\t{\n\t\t//default point\n\t\t//this = properties of this object we are working with\n\t\tthis.x=0;\n\t\tthis.y=0;\n\t\tcountOfPoints++;\n\t}", "public boolean isOnSegment(Point2D point) {\n double x = point.getX();\n double y = point.getY();\n double val = this.a * x + this.b * y + this.c;\n if (val < 0.0) {\n val = -val;\n }\n if (val > EPS) {\n return false;\n }\n\n if ((x < (this.minx - EPS)) || (x > (this.maxx + EPS))) {\n return false;\n }\n if ((y < (this.miny - EPS)) || (y > (this.maxy + EPS))) {\n return false;\n }\n return true;\n }", "public Point2D(Point2D point){\n \n //on peut faire point.x et point.y puisqu'on est dans la classe\n this.x = point.x;\n this.y = point.y;\n }", "public Point(Point other) {\n super(other);\n this.x = other.x;\n this.y = other.y;\n this.activity = other.activity;\n this.frame = other.frame;\n this.trajectoryid = other.trajectoryid;\n }", "private Point(Point p) {\n\t\tthis.name = p.name;\n\t\tthis.position = p.position.copy();\n\t\tthis.collisionRadius = p.collisionRadius;\n\t}", "TreeNode(Point point) \r\n {\r\n if (point == null) throw new IllegalArgumentException();\r\n this.point = point;\r\n }", "public Point(Point obj)\n\t{\n\t\t// Instantiate properties with parameter values \n\t\tthis.x = obj.x;\t\t\t\t\t\t\t\t\t\t\t\t// Shallow copy point's x-coordinate\t\n\t\tthis.y = obj.y;\t\t\t\t\t\t\t\t\t\t\t\t// Shallow copy point's y-coordinate\n\t}", "private Point(int param, double value) {\r\n this(param, value, false);\r\n }", "public Point(int x, int y) {\n /* DO NOT MODIFY */\n this.x = x;\n this.y = y;\n SLOPE_ORDER = new SlopeOrder();\n }", "private GoodPoint(double x, double y) {\n this.x = x;\n this.y = y;\n }", "public StsPoint2D()\n\t{\n\t}", "public Point() {\n\t\tthis.hasSrsName = false;\n\t}", "Point(int x_, int y_){\n x = x_;\n y = y_;\n }", "public SegmentNode(String p_segment)\n {\n m_strSegment = p_segment;\n }", "public Line(TwoDPoint p1, TwoDPoint p2) throws Exception\n {\n this(p1.x, p1.y, p2.x, p2.y);\n }", "public Point(double x, double y){\n\t\tsuper();\n\t\tthis.x = x; \n\t\tthis.y = y;\n\t}", "public void setStart(Point point) {\n mStart = point;\n }", "public Node(Point p) //is this needed\n\t{\n\t\tpoint = p;\n\t\tnext = null;\n\t}", "public PrecisePoint(double x, double y) {\n this.x = x;\n this.y = y;\n }", "public Line() {\n\t\t\n\t\tthis.point1 = null;\n\t\tthis.point2 = null;\n\t\tthis.distance = 0;\n\t}", "public Point(Vector position) {\n\t\tthis(position, 5.0);\n\t}", "public Point(int x, int y)\r\n\t{\r\n\t\tthis.x = x;\r\n\t\tthis.y = y;\r\n\t}", "public Point(int a, int b)\n\t{\n\t\t\n\tint x2 = a;\n\tint y2 = b;\t\n\tdouble D_x = x2;\n\tdouble D_y = y2;\n\t;\n\t\t\n\t\tif (!(Double.isNaN(D_x)) && !(Double.isNaN(D_y))){\n\t\t//if ( (!D_x.equals(null)) && (!D_y.equals(null))){\n\t\t\tif(a==(int)x2) this.x = a;\n\t\t\tif(b==(int)y2) this.y = b;\n\t\t\t\n\t\t\t\n\t\t\t//\tthis.x=0;\n\t\t\t//\tthis.y=0;\n\t\t\t\n\t\t}\n\t\tif (Double.isNaN(D_x)) this.x=0;\n\t\tif (Double.isNaN(D_y)) this.y=0;\t\n\t\t\n\t}", "public Point(double x, double y){\n this.x = x;\n this.y = y;\n }", "public MyPoint1 (double x, double y) {}", "public Point(int x, int y){\n this.x = x;\n this.y = y;\n }", "public Point(int x, int y) {\r\n this.x = x;\r\n this.y = y;\r\n }", "public Point(int x, int y) {\n this.x = x;\n this.y = y;\n }", "public Point(int x, int y) {\n\t\tsuper();\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t}", "public Point(int x, int y) {\n /* DO NOT MODIFY */\n this.x = x;\n this.y = y;\n }", "public Point(int x, int y) {\n /* DO NOT MODIFY */\n this.x = x;\n this.y = y;\n }", "public Point(int x, int y) {\n /* DO NOT MODIFY */\n this.x = x;\n this.y = y;\n }", "public Point(int x, int y) {\r\n /* DO NOT MODIFY */\r\n this.x = x;\r\n this.y = y;\r\n\t\tSLOPE_ORDER = new SlopeOrderComparator(this);\r\n }", "public Point(double x, double y) {\r\n this.x = x;\r\n this.y = y;\r\n }", "public NurbsPoint get_control_point(int segment, int point) {\n return points[segment][point];\n }", "public Point() {\n this.x = Math.random();\n this.y = Math.random();\n }", "public Point(double x, double y) {\r\n\t\t//Constructors\r\n\t\tthis.x = x;\r\n\t\tthis.y = y;\r\n\t}", "public void setP1(Point point){\n\t\tif((point.getX() >= getP2().getX()) || (point.getY() >= getP2().getY())){\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\tsuper.setP1(point);\n\t}", "public LineSegment( CartesianCoordinate start , CartesianCoordinate end)\n\t{\n\t\tthis.startPoint = start;\n\t\tthis.endPoint = end;\n\t}", "public Point(int x,int y){\r\n\t\tthis.pos = x;\r\n\t\tthis.id = y;\r\n\t}", "public Point2d() {\r\n\t // Call two-argument constructor and specify the origin.\r\n\t\t this(0, 0);\r\n\t\t System.out.println(\"Point2d default initiializing\");\r\n\t }", "public Point(double x, double y) {\r\n this.x = x;\r\n this.y = y;\r\n this.c = Color.COLORLESS;\r\n }", "public Point(double x, double y) {\n this.x = x;\n this.y = y;\n }", "public Point(double x, double y) {\n this.x = x;\n this.y = y;\n }", "public Point(double x, double y) {\n this.x = x;\n this.y = y;\n }", "public Point(double x, double y) {\n this.x = x;\n this.y = y;\n }", "public Point(double x, double y) {\n this.x = x;\n this.y = y;\n }", "public Line(Point p1, Point p2) {\n super(p1, p2);\n this.p1 = p1;\n this.p2 = p2;\n }", "public Point(int x, int y) {\r\n\t\tthis.x = x;\tthis.y = y;\r\n\t}", "protected Point(double x, double y) {\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t}", "public Point2D()\n {\n this.x = this.y = 0f;\n }", "public Point(int x, int y){\n\t\tthis.x=x; this.y=y;\n\t}", "private Point(int param, double value, boolean measured) {\r\n this.param = param;\r\n this.value = value;\r\n this.measured = measured;\r\n }", "public void set_control_point(int segment, int point, NurbsPoint value) {\n points[segment][point] = new NurbsPoint(value.x, value.y, value.z);\n }", "public PointRecord(){\n \n }", "public Short2DPoint() {\n this(0,0);\n }", "public Point(int x, int y){\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t}", "public Point(float x, float y)\n {\n this.x = x;\n this.y = y;\n }", "public PointRelation pointSegmentRelation(Coordinates point, Coordinates segmExtremityA, Coordinates segmExtremityB);", "public Line(Point startingPoint, Point endingPoint) {\n this.startingPoint = startingPoint;\n this.endingPoint = endingPoint;\n }", "public Intersection(Stoplight s, Point p) {\n\t\troads = new ArrayList<Road>();\n\t\tstoplight = s;\n\t\tcurrentCar = null;\n\t\tpos = p;\n\t}", "public Point(int x, int y) {\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t}", "public Point(int x, int y) {\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t}", "public Point(int x, int y) {\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t}", "public void setPoint(Integer point) {\n this.point = point;\n }", "public Point(int xcoord, int ycoord)\n\t{\n\t\tthis.x= xcoord;\n\t\tthis.y= ycoord;\n\t\tcountOfPoints++;\n\t}", "public Point(float x, float y, float z, int id) {\r\n super(x, y, z);\r\n this.xf = Float.POSITIVE_INFINITY;\r\n this.yf = Float.POSITIVE_INFINITY;\r\n this.x = x;\r\n this.y = y;\r\n this.z = z;\r\n this.id = id;\r\n }", "public Point(double a, double b) {\n this.x = a;\n this.y = b;\n }", "public FieldPoint(FieldPoint fieldPoint) {\n setX( fieldPoint.getX() );\n setY( fieldPoint.getY() );\n }", "Segment createSegment();", "public Point(int y, int x)\n\t\t{\n\t\t\tthis.y = y;\n\t\t\tthis.x = x;\n\t\t}", "public Vector(Point3D p) {\n if (p.equals(Point3D.ZERO))\n throw new IllegalArgumentException(\"no meaning to the vector\");\n head = new Point3D(p);\n }", "public Goal(Point point) {\n super(point);\n }", "public boolean rayCrossesSegment(LatLng point, LatLng a, LatLng b) {\n double px = point.longitude,\n py = point.latitude,\n ax = a.longitude,\n ay = a.latitude,\n bx = b.longitude,\n by = b.latitude;\n if (ay > by) {\n ax = b.longitude;\n ay = b.latitude;\n bx = a.longitude;\n by = a.latitude;\n }\n // alter longitude to cater for 180 degree crossings\n if (px < 0 || ax < 0 || bx < 0) {\n px += 360;\n ax += 360;\n bx += 360;\n }\n // if the point has the same latitude as a or b, increase slightly py\n if (py == ay || py == by) py += 0.00000001;\n\n\n // if the point is above, below or to the right of the segment, it returns false\n if ((py > by || py < ay) || (px > Math.max(ax, bx))) {\n return false;\n }\n // if the point is not above, below or to the right and is to the left, return true\n else if (px < Math.min(ax, bx)) {\n return true;\n }\n // if the two above conditions are not met, you have to compare the slope of segment [a,b] (the red one here) and segment [a,p] (the blue one here) to see if your point is to the left of segment [a,b] or not\n else {\n double red = (ax != bx) ? ((by - ay) / (bx - ax)) : Double.POSITIVE_INFINITY;\n double blue = (ax != px) ? ((py - ay) / (px - ax)) : Double.POSITIVE_INFINITY;\n return (blue >= red);\n }\n\n }", "public PointOfInterest() {\n }", "public void start(Point p);", "public Point(double x, double y) {\n\t\t\tthis.x = x;\n\t\t\tthis.y = y;\n\t\t}", "public Point(float x, float y, int id) {\r\n super(x, y, 0);\r\n this.xf = x;\r\n this.yf = y;\r\n this.x = x;\r\n this.y = y;\r\n this.z = 0;\r\n this.id = id;\r\n }", "public Point(int x, int y)\n\t{\n\t\t// Instantiate properties with parameter values \n\t\tthis.x = x;\n\t\tthis.y = y;\n\t}", "public void setPoint(Integer point) {\n\t\tthis.point = point;\n\t}", "public FieldPoint(double x, double y) {\n setX(x);\n setY(y);\n }", "public VariablePoint2(){\n super(0, 0);\n x = 0;\n y = 0;\n }", "Point(Double x, Double y) {\n\t\tthis.setX(x);\n\t\tthis.setY(y);\n\t}", "public BSPLine() {\n super();\n }", "public GeoPoint(Geometry geometry, Point3D point) {\n\tsuper();\n\tthis.geometry = geometry;\n\tthis.point = point;\n}" ]
[ "0.6539284", "0.6507832", "0.63003933", "0.62657493", "0.6232069", "0.6194003", "0.61759305", "0.6166827", "0.61513966", "0.61416614", "0.6107338", "0.6102209", "0.6015875", "0.6015875", "0.60053575", "0.59662974", "0.5942074", "0.59131", "0.5875814", "0.5874544", "0.5834475", "0.5828725", "0.5801511", "0.57731164", "0.5758095", "0.57138556", "0.5708061", "0.5690208", "0.568584", "0.5678393", "0.56568193", "0.565424", "0.5646962", "0.56172764", "0.56073034", "0.5602997", "0.5590552", "0.5589831", "0.5585569", "0.5580019", "0.55735844", "0.55714566", "0.5570101", "0.5539332", "0.55210257", "0.5517378", "0.5517378", "0.5517378", "0.5515428", "0.55123794", "0.5506561", "0.5493035", "0.5489459", "0.54876953", "0.54840946", "0.54824543", "0.54747295", "0.5468128", "0.5462935", "0.5462935", "0.5462935", "0.5462935", "0.5462935", "0.5455377", "0.54493064", "0.5449301", "0.5447136", "0.5445109", "0.5443266", "0.54404473", "0.54359543", "0.5434955", "0.5408289", "0.5405921", "0.5403808", "0.5390532", "0.53892875", "0.53666973", "0.53666973", "0.53666973", "0.53660256", "0.53660226", "0.53545076", "0.5353218", "0.53504556", "0.53355336", "0.53326046", "0.5328242", "0.53170705", "0.5312618", "0.5299956", "0.5297077", "0.5285641", "0.5281608", "0.52529687", "0.5248328", "0.5245565", "0.5245105", "0.52400744", "0.5239525", "0.5236662" ]
0.0
-1
Returns the identifier of this.
public int getID() { return this.id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getId() {\n return this.getClass().getSimpleName() + \"@\" + this.hashCode();\n }", "@Override\n public String identifier() {\n return this.identifier;\n }", "@Override\n public String getIdentifier() {\n return myIdentity.getIdentifier();\n }", "public String getIdentifier() {\r\n\t\treturn this.identifier;\r\n\t}", "public String getIdentifier()\n {\n return identifier;\n }", "public String getIdentifier() {\n return identifier;\n }", "public String getIdentifier() {\n return identifier;\n }", "public String getIdentifier() {\n return identifier;\n }", "public String getIdentifier() {\n return identifier;\n }", "public String getIdentifier() {\n return identifier;\n }", "public String getIdentifier() {\n return identifier;\n }", "public String getIdentifier() {\n return identifier;\n }", "public String getIdentifier() {\n return identifier;\n }", "public int getIdentifier()\n {\n return identifier;\n }", "public String getIdentifier()\n\t{\n\t\treturn mIdentifier;\n\t}", "@Override\r\n public final Integer getIdentifier() {\r\n return getIdent();\r\n }", "public String getIdentifier() {\n\t\treturn identifier;\n\t}", "public String getIdentifier() {\n return identifier;\n }", "public String getIdentifier();", "public String getIdentifier();", "public String getId() {\n\t\treturn Integer.toString(this.hashCode());\n\t}", "public Object getIdentifier() {\n return identifier;\n }", "java.lang.String getIdentifier();", "public int getIdentifier();", "public int getId() {\n\t\treturn this.ordinal();\n\t}", "public String getIdentifier() {\n\t\treturn config.getUIName()+\"[\"+getIndex()+\"]\";\n\t}", "String getIdentifier();", "String getIdentifier();", "String getIdentifier();", "String getIdentifier();", "String getIdentifier();", "String getIdentifier();", "String getIdentifier();", "@NonNull String identifier();", "@NotNull\n public String getIdentifier() {\n return this.identifier;\n }", "@Override\r\n\tpublic String getId() {\n\t\treturn this.id;\r\n\t}", "@Override\r\n\tpublic String getId() {\n\t\treturn this.id;\r\n\t}", "@Nullable\n public String getIdentifier()\n {\n return identifier;\n }", "int getIdentifier();", "Identifier getId();", "public String getIdentifier(){\n return identifier;\n }", "public String getIdentifier() {\n try {\n return keyAlias + \"-\" + toHexString(\n MessageDigest.getInstance(\"SHA1\").digest(keyStoreManager.getIdentifierKey(keyAlias).getEncoded()));\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }", "public String getIdentification ()\n {\n return this.toString();\n }", "public static String id()\n {\n return _id;\n }", "public java.lang.String getIdentifier()\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(IDENTIFIER$0, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "public java.lang.String getId() {\n return this._id;\n }", "public int numericName()\n {\n return Factory.getID(this);\n }", "public String getID() {\n return (id);\n }", "public java.lang.String getId() {\r\n return this._id;\r\n }", "public int getId() {\n return instance.getId();\n }", "public int identifier();", "@NonNull\n public String getIdentifier() {\n return mProto.id;\n }", "protected abstract String getIdentifier();", "public java.lang.String getIdentifier() {\n java.lang.Object ref = identifier_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n identifier_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public int getId() {\n return instance.getId();\n }", "java.lang.String getID();", "public String getId() {\r\n\t\treturn this.id;\r\n\t}", "public String getId() {\r\n\t\treturn this.id;\r\n\t}", "public String getId() {\r\n\t\treturn this.id;\r\n\t}", "public java.lang.String getId () {\r\n\t\treturn id;\r\n\t}", "public java.lang.String getId() {\n return _id;\n }", "public java.lang.String getId () {\n\t\treturn id;\n\t}", "public String getId() {\n return _theId;\n }", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "public String getIdentifierString();", "public int getId() {\n return instance.getId();\n }", "public int getId() {\n return instance.getId();\n }", "public int getId() {\n return instance.getId();\n }", "public int getId() {\n return instance.getId();\n }", "public int getId() {\n return instance.getId();\n }", "public int getId() {\n return instance.getId();\n }", "public int getId() {\n return instance.getId();\n }", "public String getId() {\n\t\treturn this.Id;\n\t}", "public java.lang.String getIdentifier() {\n java.lang.Object ref = identifier_;\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 identifier_ = s;\n }\n return s;\n }\n }", "public final String getId() {\n return id;\n }", "public String getId()\n\t{\n\t\treturn Id;\n\t}", "public final String getId() {\r\n\t\treturn id;\r\n\t}", "public java.lang.String getId() {\n return this.id;\n }", "public String getId()\n\t{\n\t\treturn this.id;\n\t}", "@Override\n\tpublic Number getId() {\n\t\treturn this.id;\n\t}", "public String getId() {\n\t\treturn this.id;\n\t}", "public String getId() {\n\t\treturn this.id;\n\t}", "public String getBaseIdentifier() {\n return baseIdentifier;\n }" ]
[ "0.82068473", "0.81801283", "0.8062339", "0.79851127", "0.7965714", "0.79259837", "0.79259837", "0.79259837", "0.79259837", "0.79259837", "0.79259837", "0.79259837", "0.79259837", "0.7923953", "0.7914639", "0.7911362", "0.7885381", "0.7867951", "0.78661716", "0.78661716", "0.78443795", "0.7818795", "0.7803638", "0.77728266", "0.7700583", "0.7696225", "0.766485", "0.766485", "0.766485", "0.766485", "0.766485", "0.766485", "0.766485", "0.7647777", "0.7624455", "0.7542147", "0.7542147", "0.75280356", "0.7526144", "0.75219893", "0.7519616", "0.75008065", "0.7488762", "0.74866253", "0.74642485", "0.7441986", "0.74371904", "0.74171454", "0.7411662", "0.74047863", "0.7402152", "0.7401575", "0.7389189", "0.7378913", "0.7375994", "0.7364196", "0.73556304", "0.73556304", "0.73556304", "0.73536503", "0.73529345", "0.7349665", "0.7348859", "0.73486793", "0.73486793", "0.73486793", "0.73486793", "0.73486793", "0.73486793", "0.73486793", "0.73486793", "0.73486793", "0.73486793", "0.73486793", "0.73486793", "0.73486793", "0.73486793", "0.73486793", "0.73486793", "0.73486793", "0.73486793", "0.73486793", "0.7330922", "0.7329754", "0.7329754", "0.7329754", "0.7329754", "0.7329754", "0.7329754", "0.7329754", "0.73295206", "0.73241097", "0.7323481", "0.7323342", "0.7318497", "0.73144853", "0.73029983", "0.73007935", "0.729973", "0.729973", "0.72937393" ]
0.0
-1
Tests if this has a neighbour element at given index
public boolean hasNeighbour(int index) { switch (index) { case 0: return this.eltZero != null; case 1: return this.eltOne != null; case 2: return this.eltTwo != null; default: return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean hasNeighbours() {\n\t\tif (this.eltZero != null || this.eltOne != null || this.eltTwo != null)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "boolean isCellBelowNeighbor() {\r\n return this.neighbors.contains(new Cell(this.x, this.y + 1));\r\n }", "public boolean neighborOf(Index other, int dist) {\n\t \t\t\n\t \t\tassert(dist >= 0);\n\t \t\n\t \t\treturn Math.abs(other.i - this.i) <= dist && Math.abs(other.j - this.j) <= dist;\n\t \t}", "public abstract int getNeighboursNumber(int index);", "private boolean checkHaveThisNode(int index) {\n\t\treturn this.array[index] == null;\n\t}", "private boolean isElementIndex(final long index) {\r\n\t\treturn index >= 0 && index < size;\r\n\t}", "public abstract LinkedList<Integer> getNeighbours(int index);", "boolean hasIndex();", "boolean hasIndex();", "boolean hasIndex();", "boolean hasIndex();", "boolean hasIndex();", "boolean hasIndex();", "public boolean isNeighbour(Tile tile){\n int x1 = this.getX();\n int y1 = this.getY();\n\n int x2 = tile.getX();\n int y2 = tile.getY();\n return (x1 == x2 && (Math.abs(y1-y2) == 1)) || (y1 == y2 && (Math.abs(x1-x2) == 1));\n }", "public boolean setNeighbour(int index, TriangleElt3D element) {\n\t\tswitch (index) {\n\t\tcase 0:\n\t\t\tthis.eltZero = element;\n\t\t\treturn true;\n\t\tcase 1:\n\t\t\tthis.eltOne = element;\n\t\t\treturn true;\n\t\tcase 2:\n\t\t\tthis.eltTwo = element;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "boolean hasNeighbor(String descrip) {\n return this.neighbors.containsKey(descrip);\n }", "private boolean isNeighborAt(int x, int y, Assignment assignment){\n\t\tif(x >= 0 && x < this.dimension && y >= 0 && y < this.dimension)\n\t\t\tif(assignment.holds(this.board[x][y]))\n\t\t\t\treturn true;\n\n\t\treturn false;\n\t}", "public boolean indexCheck(int index) {\n return (index >= 0 && index <= size) ? true : false;\n }", "public boolean isAdjacentTo(final Vertex other){\n\t\tboolean result = false;\n\t\tif(getNeighbours().contains(other))\n\t\t\tresult = true;\n\t\treturn result;\n\t}", "private boolean isOutOfBounds(int index) {\n return index < 0 || index >= this.size();\n }", "@Override\n public boolean hasNext()\n {\n Node testNode = getNth(idx);\n if(testNode.getElement() == null)\n {\n return false;\n }\n else\n {\n return true;\n }\n }", "private boolean isIndexExist(int index) {\n return index >= 0 && index < size();\n }", "public void checkNeighbours(int row, int column)\r\n {\r\n int counter = 0;\r\n //*************************************************\r\n //Following code was adapted from Harry Tang 2015-04-27\r\n for (int columnNeighbours = column - 1; columnNeighbours <= column + 1; columnNeighbours ++)\r\n {\r\n for (int rowNeighbours = row - 1; rowNeighbours <= row + 1; rowNeighbours ++)\r\n {\r\n try \r\n {\r\n if (cellGrid[columnNeighbours][rowNeighbours].isAlive()\r\n && cellGrid[columnNeighbours][rowNeighbours] != cellGrid[column][row])\r\n {\r\n counter ++;\r\n }\r\n }\r\n catch (IndexOutOfBoundsException e)\r\n {\r\n // do nothing\r\n }\r\n } // end of for (int y = indexY - 1; y == indexY; y++)\r\n } // end of for (int x = indexX - 1; x == indexX; x++)\r\n //*************************************************\r\n \r\n decisionOnCellState(counter, row, column);\r\n }", "public boolean areAdjacent(Position vp, Position wp) throws InvalidPositionException;", "private boolean hasANonneighbourInX(Graph<V, E> g, V v, Set<V> X)\n {\n return X.stream().anyMatch(x -> !g.containsEdge(v, x));\n }", "private boolean hasParent(int index) {\n return index > 1;\n }", "public boolean isNodePresent(int nd) {\n if ((nd >= (int) nodeVector.size() || (nodeVector.get(nd).getIndex() == invalid_node_index))) {\n return false;\n } else {\n return true;\n }\n }", "public boolean containsKey(Object index) {\n int i;\n return (i = ((Number) index).intValue()) >= 0 && i + start < size;\n }", "boolean contains(int idx);", "public boolean containsElement(int i, T obj);", "private void getNeighbors() {\n\t\tRowIterator iterator = currentGen.iterateRows();\n\t\twhile (iterator.hasNext()) {\n\t\t\tElemIterator elem = iterator.next();\n\t\t\twhile (elem.hasNext()) {\n\t\t\t\tMatrixElem mElem = elem.next();\n\t\t\t\tint row = mElem.rowIndex();\n\t\t\t\tint col = mElem.columnIndex();\n\t\t\t\tint numNeighbors = 0;\n\t\t\t\tfor (int i = -1; i < 2; i++) { // loops through row above,\n\t\t\t\t\t\t\t\t\t\t\t\t// actual row, and row below\n\t\t\t\t\tfor (int j = -1; j < 2; j++) { // loops through column left,\n\t\t\t\t\t\t\t\t\t\t\t\t\t// actual column, coloumn\n\t\t\t\t\t\t\t\t\t\t\t\t\t// right\n\t\t\t\t\t\tif (!currentGen.elementAt(row + i, col + j).equals(\n\t\t\t\t\t\t\t\tfalse)) // element is alive, add 1 to neighbor\n\t\t\t\t\t\t\t\t\t\t// total\n\t\t\t\t\t\t\tnumNeighbors += 1;\n\t\t\t\t\t\telse { // element is not alive, add 1 to its total\n\t\t\t\t\t\t\t\t// number of neighbors\n\t\t\t\t\t\t\tInteger currentNeighbors = (Integer) neighbors\n\t\t\t\t\t\t\t\t\t.elementAt(row + i, col + j);\n\t\t\t\t\t\t\tneighbors.setValue(row + i, col + j,\n\t\t\t\t\t\t\t\t\tcurrentNeighbors + 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tneighbors.setValue(row, col, numNeighbors - 1); // -1 to account\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// for counting\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// itself as a\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// neighbor\n\t\t\t}\n\t\t}\n\t}", "public boolean hasNext(){\n return (index < nElem);\n }", "public boolean isPlaced(int index) {\n\t\tif ((index < 0) || (index > ships.size() - 1)) {\n\t\t\tthrow new ArrayIndexOutOfBoundsException(\"Index out of Bounds.\");\n\t\t}\n\t\treturn ships.get(index).isPlaced();\n\t}", "public boolean isAdjacent(int heroIndex, int monsterIndex) {\n\t\t\n\t\tint heroRow = heroIndex / (int) 8;\n\t\tint heroColumn = heroIndex % (int) 8;\n\t\tint monsterRow = monsterIndex / (int) 8;\n\t\tint monsterColumn = monsterIndex % (int) 8;\n\t\t\n\t\t//error checking\n\t\tif (heroRow == 2 || heroRow == 5 || monsterRow == 5 || monsterColumn == 2) {\n\t\t\tSystem.out.println(\"something is wrong - either someone is in an inaccessible block, or isAdjacent is implemented wrongly\");\n\t\t}\n\t\t\n\t\tif (Math.abs(heroRow - monsterRow) <= 1 && Math.abs(heroColumn - monsterColumn) <= 1) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t\t\n\t}", "public boolean needsNeighborhood()\r\n\t{\r\n\t\treturn m_needsNeighborhood;\t\r\n\t}", "public boolean has(int index) {\n\t\treturn index >= 0 && index < values.size();\n\t}", "public boolean hasNeighbor(Tile tile) {\n if (tile == null) {\n return false;\n }\n\n return (this.tileNorth == tile || this.tileEast == tile || this.tileSouth == tile || this.tileEast == tile);\n }", "public boolean hasFinished(int neighbour){\n\t//System.out.println(\"ATTENTION\");\n\treturn false;\n }", "public boolean clashingNeighbourCell(int connec){\n\t\tint thisCell = this.getANeigh();\n\n\t\tboolean ret = false;\n\n\t\tfor(ThresholdDataPoint neigh : getNeighbours(connec)){\n\t\t\tif(!neigh.getNeighbourCellBodies().isEmpty()){\n\t\t\t\tif(!neigh.isWatershed()){\n\t\t\t\t\tif(neigh.getANeigh() != thisCell){\n\t\t\t\t\t\tret = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}", "public boolean isNeighbour(Territory territory) {\n\t\tfor (Territory neighbour : neighbours) {\n\t\t\tif (neighbour.territoryID == territory.territoryID) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "private boolean hasAdjacent(int node) {\n for (int i = 0; i < this.matrix[node].length; i++) {\n if (this.matrix[node][i]) {\n return true;\n }\n\n }\n return false;\n }", "public boolean contains(int elem){\n return itemArray[count-1] == elem;\n }", "public boolean isNeighbor(Cell cell){\n \tif((Math.pow(x - cell.getX(), 2) + (Math.pow(y - cell.getY(), 2)) <= 10* 10)){\n\t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n }", "default boolean isReachable(int vidxa, int vidxb) {\n Deque<Integer> stack = new ArrayDeque<>(16);\n BitSet vset = new BitSet(getVertexCount());\n while (!stack.isEmpty()) {\n int current = stack.pop();\n if (!vset.get(current)) {\n vset.set(current);\n if (current == vidxb) {\n return true;\n }\n for (int i = 0, n = this.getNextCount(current); i < n; i++) {\n int next = this.getNext(current, i);\n stack.push(next);\n }\n }\n }\n return false;\n }", "private List<CellIndex> getNeighbours( CellIndex index )\r\n {\n List<CellIndex> neighbours = new ArrayList<World.CellIndex>();\r\n if( index.x % EnvSettings.getMAX_X() != 0 )\r\n {\r\n neighbours.add( new CellIndex( index.x - 1, index.y, index.z ) );\r\n }\r\n if( index.x % EnvSettings.getMAX_X() != EnvSettings.getMAX_X() - 1 )\r\n {\r\n neighbours.add( new CellIndex( index.x + 1, index.y, index.z ) );\r\n }\r\n if( index.y % EnvSettings.getMAX_Y() != 0 )\r\n {\r\n neighbours.add( new CellIndex( index.x, index.y - 1, index.z ) );\r\n }\r\n if( index.y % EnvSettings.getMAX_Y() != EnvSettings.getMAX_Y() - 1 )\r\n {\r\n neighbours.add( new CellIndex( index.x, index.y + 1, index.z ) );\r\n }\r\n if( index.z % EnvSettings.getMAX_Z() != 0 )\r\n {\r\n neighbours.add( new CellIndex( index.x, index.y, index.z - 1 ) );\r\n }\r\n if( index.z % EnvSettings.getMAX_Z() != EnvSettings.getMAX_Z() - 1 )\r\n {\r\n neighbours.add( new CellIndex( index.x, index.y, index.z + 1 ) );\r\n }\r\n return neighbours;\r\n }", "@DisplayName(\"Has neighbours?\")\n @Test\n public void testGetNeighbours() {\n Assertions.assertTrue(graph.getNeighbours(0).size() > 1);\n }", "public boolean interiorContains(int i, int j) {\n\t\treturn i > 0 && j > 0 && i < width() - 1 && j < height() - 1;\n\t}", "boolean isCellRightNeighbor() {\r\n return this.neighbors.contains(new Cell(this.x + 1, this.y));\r\n }", "public boolean contains(Index position) { // TODO rename: adjoinsOrContains\n return position != null && position.getX() + 1 >= start.getX() && position.getY() + 1 >= start.getY() && position.getX() <= end.getX() && position.getY() <= end.getY();\n }", "public boolean isFull(int i, int j) {\n if (i <= 0 || i > siteDepth || j <= 0 || j > siteDepth)\n throw new IndexOutOfBoundsException();\n\n int element = ((i-1)*siteDepth) + (j-1) + 1;\n\n if (wufFull.connected(element, virtTop))\n return true;\n\n return false;\n }", "boolean isCellAlive(int x, int y);", "protected abstract boolean isMarkerPositionInternal(int index);", "private boolean hasANeighbour(Graph<V, E> g, Set<V> set, V v)\n {\n return set.stream().anyMatch(s -> g.containsEdge(s, v));\n }", "public boolean isAdjacent(int from, int to) {\n//your code here\n// LinkedList<Edge> list = adjLists[from];\n// for (Edge a : list) {\n// if(a.from()==from&&a.to()==to){\n// return true;\n// }\n// };\n// return false;\n return pathExists(from, to);\n }", "boolean isIndex();", "private void findNeighbour(int offset) {\n TreeNodeImpl node = (TreeNodeImpl) projectTree.getLastSelectedPathComponent();\n TreePath parentPath = projectTree.getSelectionPath().getParentPath();\n NodeList list = (NodeList) node.getParent().children();\n\n for (int i = 0; i < list.size(); ++i) {\n if (list.get(i).equals(node)) {\n if (offset > 0 && i < list.size() - offset) {\n projectTree.setSelectionPath(parentPath.pathByAddingChild(list.get(i + offset)));\n break;\n }\n if (offset < 0 && i >= offset) {\n projectTree.setSelectionPath(parentPath.pathByAddingChild(list.get(i + offset)));\n break;\n }\n }\n }\n }", "public abstract boolean hasEdge(int from, int to);", "public boolean isAdjacentTo(StandardCoordinate where) {\n\t\treturn where.getAdjacencyList().contains(this);\n\t}", "private LinkedList<int[]> neighborFinder(){\n LinkedList<int[]> neighborhood= new LinkedList<>();\n int[] curr_loc = blankFinder();\n int x = curr_loc[0];\n int y = curr_loc[1];\n if(x >0){\n neighborhood.add(new int[]{x-1, y});\n }\n if(x < n-1){\n neighborhood.add(new int[]{x+1, y});\n }\n if(y > 0){\n neighborhood.add(new int[]{x, y-1});\n }\n if(y < n-1) {\n neighborhood.add(new int[]{x, y+1});\n }\n\n\n return neighborhood;\n }", "public boolean hasNi(int nodeKey) {\n return this.neighborEdges.get(nodeKey) != null ? true : false;\n }", "public int nextNeighbour(int i) {\r\n for (int j = 0; j < vertexNum; j++) {\r\n if (adjacencyMatrix[i][j] != 0 && !vertexList.get(j).isVisited) {\r\n return j;\r\n }\r\n }\r\n return -1;\r\n }", "public boolean isGameObjectInNeighbourhood(GameObject gO) {\n return Math.abs(this.getGridCoordinates().x - gO.getGridCoordinates().x) == 0 && Math.abs(this.getGridCoordinates().y - gO.getGridCoordinates().y) == 1 ||\n Math.abs(this.getGridCoordinates().x - gO.getGridCoordinates().x) == 1 && Math.abs(this.getGridCoordinates().y - gO.getGridCoordinates().y) == 0;\n }", "public boolean hasEdge(int i,int j){\n return Matrix[i][j];\n }", "public boolean isAdjacent(Country country){\n return adjList.contains(country);\n }", "public boolean isInEdge(int width, int height, Position position);", "public boolean isOpen(int i, int j) throws IndexOutOfBoundsException {\r\n\t\tif (i > N || i < 1)\r\n\t\t\tthrow new IndexOutOfBoundsException(\"row index i out of bounds\");\r\n\t\tif (j > N || j < 1)\r\n\t\t\tthrow new IndexOutOfBoundsException(\"column index j out of bounds\");\r\n\t\treturn grid[i - 1][j - 1];\r\n\t}", "public TriangleElt3D getNeighbour(int index) {\n\t\tswitch (index) {\n\t\tcase 0:\n\t\t\treturn this.eltZero;\n\t\tcase 1:\n\t\t\treturn this.eltOne;\n\t\tcase 2:\n\t\t\treturn this.eltTwo;\n\t\tdefault:\n\t\t\treturn null;\n\t\t}\n\t}", "boolean hasMonsterIndex();", "boolean hasMonsterIndex();", "boolean contains(int vertex);", "boolean contains(NetNode other) {\n\t\t\treturn mask >= other.mask && (this.address & (-1 << mask)) == (other.address & (-1 << mask));\n\t\t}", "public boolean isFull(int i, int j) {\n if (!checkIndex(i, j))\n throw new IndexOutOfBoundsException(\"invalid index i or j for grid site\");\n int idx = xyTo1D(i, j);\n // is virtual top site connected to this site\n //return mUnionFind.connected(0, idx);\n return mUnionFind.find(0) == mUnionFind.find(idx);\n\n }", "public abstract int neighboursInBlock(Set<Integer> block, int vertexIndex);", "public Collection<N> neighbors();", "public boolean hasBack() {\n if (index > 0) {\n return true;\n } else {\n return false;\n }\n }", "@Contract(pure = true)\n default boolean isDefinedAt(int index) {\n return index >= 0 && sizeGreaterThan(index);\n }", "boolean hasPosition();", "boolean hasPosition();", "boolean hasPosition();", "boolean hasPosition();", "boolean hasNi(int node) {\n return this.neighbors.containsKey(node);\n }", "public boolean percolates() {\n for (int i = 0; i < size; i++) {\r\n if (flowGrid[size * (size - 1) + i] < size) { // if any of the bottom row points at any of the index in the top row\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "public boolean areAdjacent() {\n return areAdjacent;\n }", "public boolean isAdjacent(NodeTree location){\n return isAdjacent(this.head, location);\n }", "public boolean isInterior() {\n\t\tif (this.eltZero != null && this.eltOne != null && this.eltTwo != null)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "public void findNeighbours(ArrayList<int[]> visited , Grid curMap) {\r\n\t\tArrayList<int[]> visitd = visited;\r\n\r\n\t\t//System.out.println(\"FROM FIND NEIGHBOURS cur pos:\" +Arrays.toString(nodePos));\r\n\t\t//for(int j=0; j<visitd.size();j++) {\r\n\t\t\t//System.out.println(\"FROM FIND NEIGHBOURS\" +Arrays.toString(visited.get(j)));\r\n\t\t\t//System.out.println(\"FROM FIND NEIGHBOURS getvstd\" +Arrays.toString(visited.get(j)));\r\n\t\t//}\r\n\t\t//System.out.println(\"FROM FIND NEIGHBOURS\" +visited);\r\n\t\tCell left=curMap.getCell(0, 0);\r\n\t\tCell right=curMap.getCell(0, 0);\r\n\t\tCell upper=curMap.getCell(0, 0);\r\n\t\tCell down=curMap.getCell(0, 0);\r\n\t\t//the getStart() method returns x,y coordinates representing the point in x,y axes\r\n\t\t//so if either of [0] or [1] coordinate is zero then we have one less neighbor\r\n\t\tif (nodePos[1]> 0) {\r\n\t\t\tupper=curMap.getCell(nodePos[0], nodePos[1]-1) ; \r\n\t\t}\r\n\t\tif (nodePos[1] < M-1) {\r\n\t\t\tdown=curMap.getCell(nodePos[0], nodePos[1]+1);\r\n\t\t}\r\n\t\tif (nodePos[0] > 0) {\r\n\t\t\tleft=curMap.getCell(nodePos[0] - 1, nodePos[1]);\r\n\t\t}\r\n\t\tif (nodePos[0] < N-1) {\r\n\t\t\tright=curMap.getCell(nodePos[0]+1, nodePos[1]);\r\n\t\t}\r\n\t\t//for(int i=0;i<visitd.size();i++) {\r\n\t\t\t//System.out.println(Arrays.toString(visitd.get(i)));\t\r\n\t\t//}\r\n\t\t\r\n\t\t//check if the neighbor is wall,if its not add to the list\r\n\t\tif(nodePos[1]>0 && !upper.isWall() && (!exists(visitd,new int[] {nodePos[0], nodePos[1] - 1}))) {\r\n\t\t\t//Node e=new Node(this , this.N , this.M , new int[] {nodePos[0], nodePos[1] - 1},curMap);\r\n\t\t\t//if(e.getVisited()!=true) {\r\n\t\t\tNodeChildren.add(new Node(this , this.N , this.M , new int[] {nodePos[0], nodePos[1] - 1}, curMap)); // father of the new nodes is this node\r\n\t\t\t//}\r\n\t\t}\r\n\t\tif(nodePos[1]<M-1 &&!down.isWall() && (!exists(visitd,new int[] {nodePos[0], nodePos[1] + 1}))){\r\n\t\t\tNodeChildren.add(new Node(this , this.N , this.M , new int[] {nodePos[0], nodePos[1] + 1}, curMap));\r\n\t\t}\r\n\t\tif(nodePos[0]>0 && !left.isWall() && (!exists(visitd,new int[] {nodePos[0] - 1, nodePos[1]}))) {\r\n\t\t\tNodeChildren.add(new Node(this , this.N , this.M , new int[] {nodePos[0] - 1, nodePos[1]}, curMap));\r\n\t\t}\r\n\t\tif(nodePos[0]<N-1 && !right.isWall() && (!exists(visitd,new int[] {nodePos[0] + 1, nodePos[1]}))) {\r\n\t\t\tNodeChildren.add(new Node(this , this.N , this.M , new int[] {nodePos[0] + 1, nodePos[1]}, curMap));\r\n\t\t}\r\n\t\t//for(int i=0; i<NodeChildren.size();i++) {\r\n\t\t\t//System.out.println(\"Paidia sth find:\" + Arrays.toString(NodeChildren.get(i).getNodePos()));\r\n\t\t//}\r\n\t\t\t\t\t\t\r\n\t}", "public boolean contains(int n)\n {\n return this._elems.contains(n);\n }", "private boolean hasRightChild(int index) {\n return rightChild(index) <= size;\n }", "public boolean isInNeighborhood(Person person) {\r\n\t\tfor (Family temp : families) {\r\n\t\t\tif (temp.isInFamily(person))\r\n\t\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public Boolean adjacentShipCheck(int i, int j) {\r\n\t\tBoolean shipPresence = false;\r\n\t\tint m, n;\r\n\t\tint[] ith = { 0, 1, 1, -1, 0, -1, -1, 1 };\r\n\t\tint[] jth = { 1, 0, 1, 0, -1, -1, 1, -1 };\r\n\t\tfor (int k = 0; k < 8; k++) {\r\n\t\t\tm = i + ith[k];\r\n\t\t\tn = j + jth[k];\r\n\t\t\tif (isValid(i + ith[k], j + jth[k])) {\r\n\t\t\t\tif (randomGrid[m][n] == 1) {\r\n\t\t\t\t\tshipPresence = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn shipPresence;\r\n\t}", "private int searchNeighbours(int[][] neighbourCords, int cellX, int cellY) {\n int neighbours = 0;\n for (int[] offset : neighbourCords) {\n if (getCell(cellX + offset[0], cellY + offset[1]).isAlive()) {\n neighbours++;\n }\n }\n\n return neighbours;\n }", "private boolean isPositionIndex(final long index) {\r\n\t\treturn index >= 0 && index <= size;\r\n\t}", "public boolean isOpen(int i, int j) {\n if (i <= 0 || i > siteDepth || j <= 0 || j > siteDepth)\n throw new IndexOutOfBoundsException();\n\n if (sites[i][j])\n return true;\n \n return false;\n }", "private boolean isValid(int index) {\r\n return index >= 0 && index < dimension;\r\n }", "private boolean outOfBounds(int nidx1){\n\t\treturn (nidx1 < 0 || nidx1 >= numofvert);\n\t}", "public boolean hasNext() {\r\n \treturn index < n; \r\n }", "private int isInList(ArrayList<Cell> list, Cell current) {\r\n\t\t\tint index = -1;\r\n\t\t\tfor (int i = 0; i < list.size(); i++) {\r\n\t\t\t\tif (current.row == list.get(i).row && current.col == list.get(i).col) {\r\n\t\t\t\t\tindex = i;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn index;\r\n\t\t}", "public boolean isInFrontOf(CoordinateImpl coordinate) {\n return rank > coordinate.getRank();\n }", "private Integer getRandomUnvisitedNeighbourIndex(int currentIndex) {\n\t\t\n\t\tArrayList<Integer> neighbors = setUnvisitedNeighbors(currentIndex);\n\t\t\n\t\tRandom random = new Random();\n\t\t\t\t\n\t\treturn neighbors.size() == 0 ? NOT_EXIST : neighbors.get(random.nextInt(neighbors.size())); \n\t}", "private boolean tryFindPath() {\n\t\t\tfor (Node neighbour : neighbours) {\n\t\t\t\tif (neighbour.x == n || neighbour.y == 0) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tif (!neighbour.isReachable()) {\n\t\t\t\t\tneighbour.setReachable();\n\t\t\t\t\tif (neighbour.tryFindPath()) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t}" ]
[ "0.7094134", "0.666007", "0.6582368", "0.63516635", "0.62687457", "0.6213165", "0.61634284", "0.6159789", "0.6159789", "0.6159789", "0.6159789", "0.6159789", "0.6159789", "0.5996972", "0.5979988", "0.59716123", "0.59510696", "0.5910931", "0.5906342", "0.587314", "0.58665335", "0.58660746", "0.58499956", "0.57466424", "0.57305175", "0.5725344", "0.5721219", "0.5718264", "0.56863016", "0.56798404", "0.5678274", "0.56683934", "0.5657449", "0.56517625", "0.5642396", "0.5631309", "0.5625661", "0.5617269", "0.5608538", "0.5606753", "0.560173", "0.5600233", "0.55967355", "0.55868834", "0.5576397", "0.5573854", "0.55738294", "0.5561392", "0.5555266", "0.55539626", "0.55463284", "0.5542222", "0.553146", "0.55242085", "0.5517111", "0.55077857", "0.5505687", "0.55053735", "0.54902804", "0.54828304", "0.54705435", "0.54588044", "0.5455841", "0.5454356", "0.5453998", "0.54505605", "0.54402643", "0.54381996", "0.54381996", "0.5427381", "0.54236585", "0.54180616", "0.5414123", "0.5409243", "0.5405172", "0.540357", "0.5400249", "0.5400249", "0.5400249", "0.5400249", "0.5389313", "0.5384367", "0.53730625", "0.5372916", "0.5358538", "0.53579473", "0.53562474", "0.5352985", "0.5338349", "0.53375965", "0.5333946", "0.53201354", "0.5319249", "0.5317889", "0.53170663", "0.5312926", "0.5309455", "0.5306075", "0.5290256", "0.52858865" ]
0.81242347
0
Returns the count of neighbour elements
public int countNeighbours() { int count = 0; if (this.hasNeighbour(0)) count++; if (this.hasNeighbour(1)) count++; if (this.hasNeighbour(2)) count++; return count; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract int countNeighbors(int x, int y);", "public abstract int getNumberOfLivingNeighbours(int x, int y);", "protected static int countNeighbours(int i, int j, byte[][] currentGen){\n int count = 0;\n \n for(int x = i-1; x<i+2; x++){\n count+=checkBorders(x, j-1, currentGen);\n count+=checkBorders(x, j+1, currentGen);\n }\n count+=checkBorders(i-1, j, currentGen);\n count+=checkBorders(i+1, j, currentGen);\n\n return count;\n }", "public abstract int getNeighboursNumber(int index);", "private int getNeighbours(Container[][][] buffer) {\n int neighbours = 0;\n if (indexPosition.x + 1 < buffer.length && buffer[(int) indexPosition.x + 1][(int) indexPosition.y][(int) indexPosition.z] != null) {\n neighbours++;\n }\n if (indexPosition.x - 1 >= 0 && buffer[(int) indexPosition.x - 1][(int) indexPosition.y][(int) indexPosition.z] != null) {\n neighbours++;\n }\n if (indexPosition.y + 1 < buffer[0].length && buffer[(int) indexPosition.x][(int) indexPosition.y + 1][(int) indexPosition.z] != null) {\n neighbours++;\n }\n if (indexPosition.y - 1 >= 0 && buffer[(int) indexPosition.x][(int) indexPosition.y - 1][(int) indexPosition.z] != null) {\n neighbours++;\n }\n if (indexPosition.z + 1 < buffer[0][0].length && buffer[(int) indexPosition.x][(int) indexPosition.y][(int) indexPosition.z + 1] != null) {\n neighbours++;\n }\n if (indexPosition.z - 1 >= 0 && buffer[(int) indexPosition.x][(int) indexPosition.y][(int) indexPosition.z - 1] != null) {\n neighbours++;\n }\n return neighbours;\n }", "protected int countNeighbours(int col, int row){\n int Total = 0;\r\n Total = getCell(col-1,row-1)? ++Total : Total;\r\n Total = getCell(col,row-1)? ++Total : Total;\r\n Total = getCell(col+1,row-1)? ++Total : Total;\r\n Total = getCell(col-1,row)? ++Total : Total;\r\n Total = getCell(col+1,row)? ++Total : Total;\r\n Total = getCell(col-1,row+1)? ++Total : Total;\r\n Total = getCell(col,row+1)? ++Total : Total;\r\n Total = getCell(col+1,row+1)? ++Total : Total;\r\n return Total;\r\n }", "private int getNeighborCount(int x, int y, Assignment assignment){\n\t\tint neighbors = 0;\n\n\t\t// try neighbor up\n\t\tif(isNeighborAt(x-1, y, assignment))\n\t\t\tneighbors++;\n\n\t\t// try neighbor up-left\n\t\tif(isNeighborAt(x-1, y-1, assignment))\n\t\t\tneighbors++;\n\n\t\t// try neighbor up-right\n\t\tif(isNeighborAt(x-1, y+1, assignment))\n\t\t\tneighbors++;\n\n\t\t// try neighbor down\n\t\tif(isNeighborAt(x+1, y, assignment))\n\t\t\tneighbors++;\n\n\t\t// try neighbor down-left\n\t\tif(isNeighborAt(x+1, y-1, assignment))\n\t\t\tneighbors++;\n\n\t\t// try neighbor down-right\n\t\tif(isNeighborAt(x+1, y+1, assignment))\n\t\t\tneighbors++;\n\n\t\t// try neighbor left\n\t\tif(isNeighborAt(x, y-1, assignment))\n\t\t\tneighbors++;\n\n\t\t// try neighbor right\n\t\tif(isNeighborAt(x, y+1, assignment))\n\t\t\tneighbors++;\n\n\t\treturn neighbors;\n\t}", "int getEdgeCount();", "private void getNeighbors() {\n\t\tRowIterator iterator = currentGen.iterateRows();\n\t\twhile (iterator.hasNext()) {\n\t\t\tElemIterator elem = iterator.next();\n\t\t\twhile (elem.hasNext()) {\n\t\t\t\tMatrixElem mElem = elem.next();\n\t\t\t\tint row = mElem.rowIndex();\n\t\t\t\tint col = mElem.columnIndex();\n\t\t\t\tint numNeighbors = 0;\n\t\t\t\tfor (int i = -1; i < 2; i++) { // loops through row above,\n\t\t\t\t\t\t\t\t\t\t\t\t// actual row, and row below\n\t\t\t\t\tfor (int j = -1; j < 2; j++) { // loops through column left,\n\t\t\t\t\t\t\t\t\t\t\t\t\t// actual column, coloumn\n\t\t\t\t\t\t\t\t\t\t\t\t\t// right\n\t\t\t\t\t\tif (!currentGen.elementAt(row + i, col + j).equals(\n\t\t\t\t\t\t\t\tfalse)) // element is alive, add 1 to neighbor\n\t\t\t\t\t\t\t\t\t\t// total\n\t\t\t\t\t\t\tnumNeighbors += 1;\n\t\t\t\t\t\telse { // element is not alive, add 1 to its total\n\t\t\t\t\t\t\t\t// number of neighbors\n\t\t\t\t\t\t\tInteger currentNeighbors = (Integer) neighbors\n\t\t\t\t\t\t\t\t\t.elementAt(row + i, col + j);\n\t\t\t\t\t\t\tneighbors.setValue(row + i, col + j,\n\t\t\t\t\t\t\t\t\tcurrentNeighbors + 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tneighbors.setValue(row, col, numNeighbors - 1); // -1 to account\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// for counting\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// itself as a\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// neighbor\n\t\t\t}\n\t\t}\n\t}", "@Override\n public long[ ][ ] count() {\n // precompute common nodes\n for (int x = 0; x < n; x++) {\n for (int n1 = 0; n1 < deg[x]; n1++) {\n int a = adj[x][n1];\n for (int n2 = n1 + 1; n2 < deg[x]; n2++) {\n int b = adj[x][n2];\n Tuple ab = createTuple(a, b);\n common2.put(ab, common2.getOrDefault(ab, 0) + 1);\n for (int n3 = n2 + 1; n3 < deg[x]; n3++) {\n int c = adj[x][n3];\n boolean st = adjacent(adj[a], b) ? (adjacent(adj[a], c) || adjacent(adj[b], c)) :\n (adjacent(adj[a], c) && adjacent(adj[b], c));\n if (!st) continue;\n Tuple abc = createTuple(a, b, c);\n common3.put(abc, common3.getOrDefault(abc, 0) + 1);\n }\n }\n }\n }\n\n // precompute triangles that span over edges\n int[ ] tri = countTriangles();\n\n // count full graphlets\n long[ ] C5 = new long[n];\n int[ ] neigh = new int[n];\n int[ ] neigh2 = new int[n];\n int nn, nn2;\n for (int x = 0; x < n; x++) {\n for (int nx = 0; nx < deg[x]; nx++) {\n int y = adj[x][nx];\n if (y >= x) break;\n nn = 0;\n for (int ny = 0; ny < deg[y]; ny++) {\n int z = adj[y][ny];\n if (z >= y) break;\n if (adjacent(adj[x], z)) {\n neigh[nn++] = z;\n }\n }\n for (int i = 0; i < nn; i++) {\n int z = neigh[i];\n nn2 = 0;\n for (int j = i + 1; j < nn; j++) {\n int zz = neigh[j];\n if (adjacent(adj[z], zz)) {\n neigh2[nn2++] = zz;\n }\n }\n for (int i2 = 0; i2 < nn2; i2++) {\n int zz = neigh2[i2];\n for (int j2 = i2 + 1; j2 < nn2; j2++) {\n int zzz = neigh2[j2];\n if (adjacent(adj[zz], zzz)) {\n C5[x]++;\n C5[y]++;\n C5[z]++;\n C5[zz]++;\n C5[zzz]++;\n }\n }\n }\n }\n }\n }\n\n int[ ] common_x = new int[n];\n int[ ] common_x_list = new int[n];\n int ncx = 0;\n int[ ] common_a = new int[n];\n int[ ] common_a_list = new int[n];\n int nca = 0;\n\n // set up a system of equations relating orbit counts\n for (int x = 0; x < n; x++) {\n for (int i = 0; i < ncx; i++) common_x[common_x_list[i]] = 0;\n ncx = 0;\n\n // smaller graphlets\n orbit[x][0] = deg[x];\n for (int nx1 = 0; nx1 < deg[x]; nx1++) {\n int a = adj[x][nx1];\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = adj[x][nx2];\n if (adjacent(adj[a], b)) orbit[x][3]++;\n else orbit[x][2]++;\n }\n for (int na = 0; na < deg[a]; na++) {\n int b = adj[a][na];\n if (b != x && !adjacent(adj[x], b)) {\n orbit[x][1]++;\n if (common_x[b] == 0) common_x_list[ncx++] = b;\n common_x[b]++;\n }\n }\n }\n\n long f_71 = 0, f_70 = 0, f_67 = 0, f_66 = 0, f_58 = 0, f_57 = 0; // 14\n long f_69 = 0, f_68 = 0, f_64 = 0, f_61 = 0, f_60 = 0, f_55 = 0, f_48 = 0, f_42 = 0, f_41 = 0; // 13\n long f_65 = 0, f_63 = 0, f_59 = 0, f_54 = 0, f_47 = 0, f_46 = 0, f_40 = 0; // 12\n long f_62 = 0, f_53 = 0, f_51 = 0, f_50 = 0, f_49 = 0, f_38 = 0, f_37 = 0, f_36 = 0; // 8\n long f_44 = 0, f_33 = 0, f_30 = 0, f_26 = 0; // 11\n long f_52 = 0, f_43 = 0, f_32 = 0, f_29 = 0, f_25 = 0; // 10\n long f_56 = 0, f_45 = 0, f_39 = 0, f_31 = 0, f_28 = 0, f_24 = 0; // 9\n long f_35 = 0, f_34 = 0, f_27 = 0, f_18 = 0, f_16 = 0, f_15 = 0; // 4\n long f_17 = 0; // 5\n long f_22 = 0, f_20 = 0, f_19 = 0; // 6\n long f_23 = 0, f_21 = 0; // 7\n\n for (int nx1 = 0; nx1 < deg[x]; nx1++) {\n int a = inc[x][nx1]._1, xa = inc[x][nx1]._2;\n\n for (int i = 0; i < nca; i++) common_a[common_a_list[i]] = 0;\n nca = 0;\n for (int na = 0; na < deg[a]; na++) {\n int b = adj[a][na];\n for (int nb = 0; nb < deg[b]; nb++) {\n int c = adj[b][nb];\n if (c == a || adjacent(adj[a], c)) continue;\n if (common_a[c] == 0) common_a_list[nca++] = c;\n common_a[c]++;\n }\n }\n\n // x = orbit-14 (tetrahedron)\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (!adjacent(adj[a], b)) continue;\n for (int nx3 = nx2 + 1; nx3 < deg[x]; nx3++) {\n int c = inc[x][nx3]._1, xc = inc[x][nx3]._2;\n if (!adjacent(adj[a], c) || !adjacent(adj[b], c)) continue;\n orbit[x][14]++;\n f_70 += common3.getOrDefault(createTuple(a, b, c), 0) - 1;\n f_71 += (tri[xa] > 2 && tri[xb] > 2) ? (common3.getOrDefault(createTuple(x, a, b), 0) - 1) : 0;\n f_71 += (tri[xa] > 2 && tri[xc] > 2) ? (common3.getOrDefault(createTuple(x, a, c), 0) - 1) : 0;\n f_71 += (tri[xb] > 2 && tri[xc] > 2) ? (common3.getOrDefault(createTuple(x, b, c), 0) - 1) : 0;\n f_67 += tri[xa] - 2 + tri[xb] - 2 + tri[xc] - 2;\n f_66 += common2.getOrDefault(createTuple(a, b), 0) - 2;\n f_66 += common2.getOrDefault(createTuple(a, c), 0) - 2;\n f_66 += common2.getOrDefault(createTuple(b, c), 0) - 2;\n f_58 += deg[x] - 3;\n f_57 += deg[a] - 3 + deg[b] - 3 + deg[c] - 3;\n }\n }\n\n // x = orbit-13 (diamond)\n for (int nx2 = 0; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (!adjacent(adj[a], b)) continue;\n for (int nx3 = nx2 + 1; nx3 < deg[x]; nx3++) {\n int c = inc[x][nx3]._1, xc = inc[x][nx3]._2;\n if (!adjacent(adj[a], c) || adjacent(adj[b], c)) continue;\n orbit[x][13]++;\n f_69 += (tri[xb] > 1 && tri[xc] > 1) ? (common3.getOrDefault(createTuple(x, b, c), 0) - 1) : 0;\n f_68 += common3.getOrDefault(createTuple(a, b, c), 0) - 1;\n f_64 += common2.getOrDefault(createTuple(b, c), 0) - 2;\n f_61 += tri[xb] - 1 + tri[xc] - 1;\n f_60 += common2.getOrDefault(createTuple(a, b), 0) - 1;\n f_60 += common2.getOrDefault(createTuple(a, c), 0) - 1;\n f_55 += tri[xa] - 2;\n f_48 += deg[b] - 2 + deg[c] - 2;\n f_42 += deg[x] - 3;\n f_41 += deg[a] - 3;\n }\n }\n\n // x = orbit-12 (diamond)\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (!adjacent(adj[a], b)) continue;\n for (int na = 0; na < deg[a]; na++) {\n int c = inc[a][na]._1, ac = inc[a][na]._2;\n if (c == x || adjacent(adj[x], c) || !adjacent(adj[b], c)) continue;\n orbit[x][12]++;\n f_65 += (tri[ac] > 1) ? common3.getOrDefault(createTuple(a, b, c), 0) : 0;\n f_63 += common_x[c] - 2;\n f_59 += tri[ac] - 1 + common2.getOrDefault(createTuple(b, c), 0) - 1;\n f_54 += common2.getOrDefault(createTuple(a, b), 0) - 2;\n f_47 += deg[x] - 2;\n f_46 += deg[c] - 2;\n f_40 += deg[a] - 3 + deg[b] - 3;\n }\n }\n\n // x = orbit-8 (cycle)\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (adjacent(adj[a], b)) continue;\n for (int na = 0; na < deg[a]; na++) {\n int c = inc[a][na]._1, ac = inc[a][na]._2;\n if (c == x || adjacent(adj[x], c) || !adjacent(adj[b], c)) continue;\n orbit[x][8]++;\n f_62 += (tri[ac] > 0) ? common3.getOrDefault(createTuple(a, b, c), 0) : 0;\n f_53 += tri[xa] + tri[xb];\n f_51 += tri[ac] + common2.getOrDefault(createTuple(c, b), 0);\n f_50 += common_x[c] - 2;\n f_49 += common_a[b] - 2;\n f_38 += deg[x] - 2;\n f_37 += deg[a] - 2 + deg[b] - 2;\n f_36 += deg[c] - 2;\n }\n }\n\n // x = orbit-11 (paw)\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (!adjacent(adj[a], b)) continue;\n for (int nx3 = 0; nx3 < deg[x]; nx3++) {\n int c = inc[x][nx3]._1, xc = inc[x][nx3]._2;\n if (c == a || c == b || adjacent(adj[a], c) || adjacent(adj[b], c)) continue;\n orbit[x][11]++;\n f_44 += tri[xc];\n f_33 += deg[x] - 3;\n f_30 += deg[c] - 1;\n f_26 += deg[a] - 2 + deg[b] - 2;\n }\n }\n\n // x = orbit-10 (paw)\n for (int nx2 = 0; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (!adjacent(adj[a], b)) continue;\n for (int nb = 0; nb < deg[b]; nb++) {\n int c = inc[b][nb]._1, bc = inc[b][nb]._2;\n if (c == x || c == a || adjacent(adj[a], c) || adjacent(adj[x], c)) continue;\n orbit[x][10]++;\n f_52 += common_a[c] - 1;\n f_43 += tri[bc];\n f_32 += deg[b] - 3;\n f_29 += deg[c] - 1;\n f_25 += deg[a] - 2;\n }\n }\n\n // x = orbit-9 (paw)\n for (int na1 = 0; na1 < deg[a]; na1++) {\n int b = inc[a][na1]._1, ab = inc[a][na1]._2;\n if (b == x || adjacent(adj[x], b)) continue;\n for (int na2 = na1 + 1; na2 < deg[a]; na2++) {\n int c = inc[a][na2]._1, ac = inc[a][na2]._2;\n if (c == x || !adjacent(adj[b], c) || adjacent(adj[x], c)) continue;\n orbit[x][9]++;\n f_56 += (tri[ab] > 1 && tri[ac] > 1) ? common3.getOrDefault(createTuple(a, b, c), 0) : 0;\n f_45 += common2.getOrDefault(createTuple(b, c), 0) - 1;\n f_39 += tri[ab] - 1 + tri[ac] - 1;\n f_31 += deg[a] - 3;\n f_28 += deg[x] - 1;\n f_24 += deg[b] - 2 + deg[c] - 2;\n }\n }\n\n // x = orbit-4 (path)\n for (int na = 0; na < deg[a]; na++) {\n int b = inc[a][na]._1, ab = inc[a][na]._2;\n if (b == x || adjacent(adj[x], b)) continue;\n for (int nb = 0; nb < deg[b]; nb++) {\n int c = inc[b][nb]._1, bc = inc[b][nb]._2;\n if (c == a || adjacent(adj[a], c) || adjacent(adj[x], c)) continue;\n orbit[x][4]++;\n f_35 += common_a[c] - 1;\n f_34 += common_x[c];\n f_27 += tri[bc];\n f_18 += deg[b] - 2;\n f_16 += deg[x] - 1;\n f_15 += deg[c] - 1;\n }\n }\n\n // x = orbit-5 (path)\n for (int nx2 = 0; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (b == a || adjacent(adj[a], b)) continue;\n for (int nb = 0; nb < deg[b]; nb++) {\n int c = inc[b][nb]._1, bc = inc[b][nb]._2;\n if (c == x || adjacent(adj[a], c) || adjacent(adj[x], c)) continue;\n orbit[x][5]++;\n f_17 += deg[a] - 1;\n }\n }\n\n // x = orbit-6 (claw)\n for (int na1 = 0; na1 < deg[a]; na1++) {\n int b = inc[a][na1]._1, ab = inc[a][na1]._2;\n if (b == x || adjacent(adj[x], b)) continue;\n for (int na2 = na1 + 1; na2 < deg[a]; na2++) {\n int c = inc[a][na2]._1, ac = inc[a][na2]._2;\n if (c == x || adjacent(adj[x], c) || adjacent(adj[b], c)) continue;\n orbit[x][6]++;\n f_22 += deg[a] - 3;\n f_20 += deg[x] - 1;\n f_19 += deg[b] - 1 + deg[c] - 1;\n }\n }\n\n // x = orbit-7 (claw)\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (adjacent(adj[a], b)) continue;\n for (int nx3 = nx2 + 1; nx3 < deg[x]; nx3++) {\n int c = inc[x][nx3]._1, xc = inc[x][nx3]._2;\n if (adjacent(adj[a], c) || adjacent(adj[b], c)) continue;\n orbit[x][7]++;\n f_23 += deg[x] - 3;\n f_21 += deg[a] - 1 + deg[b] - 1 + deg[c] - 1;\n }\n }\n }\n\n // solve equations\n orbit[x][72] = C5[x];\n orbit[x][71] = (f_71 - 12 * orbit[x][72]) / 2;\n orbit[x][70] = (f_70 - 4 * orbit[x][72]);\n orbit[x][69] = (f_69 - 2 * orbit[x][71]) / 4;\n orbit[x][68] = (f_68 - 2 * orbit[x][71]);\n orbit[x][67] = (f_67 - 12 * orbit[x][72] - 4 * orbit[x][71]);\n orbit[x][66] = (f_66 - 12 * orbit[x][72] - 2 * orbit[x][71] - 3 * orbit[x][70]);\n orbit[x][65] = (f_65 - 3 * orbit[x][70]) / 2;\n orbit[x][64] = (f_64 - 2 * orbit[x][71] - 4 * orbit[x][69] - 1 * orbit[x][68]);\n orbit[x][63] = (f_63 - 3 * orbit[x][70] - 2 * orbit[x][68]);\n orbit[x][62] = (f_62 - 1 * orbit[x][68]) / 2;\n orbit[x][61] = (f_61 - 4 * orbit[x][71] - 8 * orbit[x][69] - 2 * orbit[x][67]) / 2;\n orbit[x][60] = (f_60 - 4 * orbit[x][71] - 2 * orbit[x][68] - 2 * orbit[x][67]);\n orbit[x][59] = (f_59 - 6 * orbit[x][70] - 2 * orbit[x][68] - 4 * orbit[x][65]);\n orbit[x][58] = (f_58 - 4 * orbit[x][72] - 2 * orbit[x][71] - 1 * orbit[x][67]);\n orbit[x][57] = (f_57 - 12 * orbit[x][72] - 4 * orbit[x][71] - 3 * orbit[x][70] - 1 * orbit[x][67] - 2 * orbit[x][66]);\n orbit[x][56] = (f_56 - 2 * orbit[x][65]) / 3;\n orbit[x][55] = (f_55 - 2 * orbit[x][71] - 2 * orbit[x][67]) / 3;\n orbit[x][54] = (f_54 - 3 * orbit[x][70] - 1 * orbit[x][66] - 2 * orbit[x][65]) / 2;\n orbit[x][53] = (f_53 - 2 * orbit[x][68] - 2 * orbit[x][64] - 2 * orbit[x][63]);\n orbit[x][52] = (f_52 - 2 * orbit[x][66] - 2 * orbit[x][64] - 1 * orbit[x][59]) / 2;\n orbit[x][51] = (f_51 - 2 * orbit[x][68] - 2 * orbit[x][63] - 4 * orbit[x][62]);\n orbit[x][50] = (f_50 - 1 * orbit[x][68] - 2 * orbit[x][63]) / 3;\n orbit[x][49] = (f_49 - 1 * orbit[x][68] - 1 * orbit[x][64] - 2 * orbit[x][62]) / 2;\n orbit[x][48] = (f_48 - 4 * orbit[x][71] - 8 * orbit[x][69] - 2 * orbit[x][68] - 2 * orbit[x][67] - 2 * orbit[x][64] - 2 * orbit[x][61] - 1 * orbit[x][60]);\n orbit[x][47] = (f_47 - 3 * orbit[x][70] - 2 * orbit[x][68] - 1 * orbit[x][66] - 1 * orbit[x][63] - 1 * orbit[x][60]);\n orbit[x][46] = (f_46 - 3 * orbit[x][70] - 2 * orbit[x][68] - 2 * orbit[x][65] - 1 * orbit[x][63] - 1 * orbit[x][59]);\n orbit[x][45] = (f_45 - 2 * orbit[x][65] - 2 * orbit[x][62] - 3 * orbit[x][56]);\n orbit[x][44] = (f_44 - 1 * orbit[x][67] - 2 * orbit[x][61]) / 4;\n orbit[x][43] = (f_43 - 2 * orbit[x][66] - 1 * orbit[x][60] - 1 * orbit[x][59]) / 2;\n orbit[x][42] = (f_42 - 2 * orbit[x][71] - 4 * orbit[x][69] - 2 * orbit[x][67] - 2 * orbit[x][61] - 3 * orbit[x][55]);\n orbit[x][41] = (f_41 - 2 * orbit[x][71] - 1 * orbit[x][68] - 2 * orbit[x][67] - 1 * orbit[x][60] - 3 * orbit[x][55]);\n orbit[x][40] = (f_40 - 6 * orbit[x][70] - 2 * orbit[x][68] - 2 * orbit[x][66] - 4 * orbit[x][65] - 1 * orbit[x][60] - 1 * orbit[x][59] - 4 * orbit[x][54]);\n orbit[x][39] = (f_39 - 4 * orbit[x][65] - 1 * orbit[x][59] - 6 * orbit[x][56]) / 2;\n orbit[x][38] = (f_38 - 1 * orbit[x][68] - 1 * orbit[x][64] - 2 * orbit[x][63] - 1 * orbit[x][53] - 3 * orbit[x][50]);\n orbit[x][37] = (f_37 - 2 * orbit[x][68] - 2 * orbit[x][64] - 2 * orbit[x][63] - 4 * orbit[x][62] - 1 * orbit[x][53] - 1 * orbit[x][51] - 4 * orbit[x][49]);\n orbit[x][36] = (f_36 - 1 * orbit[x][68] - 2 * orbit[x][63] - 2 * orbit[x][62] - 1 * orbit[x][51] - 3 * orbit[x][50]);\n orbit[x][35] = (f_35 - 1 * orbit[x][59] - 2 * orbit[x][52] - 2 * orbit[x][45]) / 2;\n orbit[x][34] = (f_34 - 1 * orbit[x][59] - 2 * orbit[x][52] - 1 * orbit[x][51]) / 2;\n orbit[x][33] = (f_33 - 1 * orbit[x][67] - 2 * orbit[x][61] - 3 * orbit[x][58] - 4 * orbit[x][44] - 2 * orbit[x][42]) / 2;\n orbit[x][32] = (f_32 - 2 * orbit[x][66] - 1 * orbit[x][60] - 1 * orbit[x][59] - 2 * orbit[x][57] - 2 * orbit[x][43] - 2 * orbit[x][41] - 1 * orbit[x][40]) / 2;\n orbit[x][31] = (f_31 - 2 * orbit[x][65] - 1 * orbit[x][59] - 3 * orbit[x][56] - 1 * orbit[x][43] - 2 * orbit[x][39]);\n orbit[x][30] = (f_30 - 1 * orbit[x][67] - 1 * orbit[x][63] - 2 * orbit[x][61] - 1 * orbit[x][53] - 4 * orbit[x][44]);\n orbit[x][29] = (f_29 - 2 * orbit[x][66] - 2 * orbit[x][64] - 1 * orbit[x][60] - 1 * orbit[x][59] - 1 * orbit[x][53] - 2 * orbit[x][52] - 2 * orbit[x][43]);\n orbit[x][28] = (f_28 - 2 * orbit[x][65] - 2 * orbit[x][62] - 1 * orbit[x][59] - 1 * orbit[x][51] - 1 * orbit[x][43]);\n orbit[x][27] = (f_27 - 1 * orbit[x][59] - 1 * orbit[x][51] - 2 * orbit[x][45]) / 2;\n orbit[x][26] = (f_26 - 2 * orbit[x][67] - 2 * orbit[x][63] - 2 * orbit[x][61] - 6 * orbit[x][58] - 1 * orbit[x][53] - 2 * orbit[x][47] - 2 * orbit[x][42]);\n orbit[x][25] = (f_25 - 2 * orbit[x][66] - 2 * orbit[x][64] - 1 * orbit[x][59] - 2 * orbit[x][57] - 2 * orbit[x][52] - 1 * orbit[x][48] - 1 * orbit[x][40]) / 2;\n orbit[x][24] = (f_24 - 4 * orbit[x][65] - 4 * orbit[x][62] - 1 * orbit[x][59] - 6 * orbit[x][56] - 1 * orbit[x][51] - 2 * orbit[x][45] - 2 * orbit[x][39]);\n orbit[x][23] = (f_23 - 1 * orbit[x][55] - 1 * orbit[x][42] - 2 * orbit[x][33]) / 4;\n orbit[x][22] = (f_22 - 2 * orbit[x][54] - 1 * orbit[x][40] - 1 * orbit[x][39] - 1 * orbit[x][32] - 2 * orbit[x][31]) / 3;\n orbit[x][21] = (f_21 - 3 * orbit[x][55] - 3 * orbit[x][50] - 2 * orbit[x][42] - 2 * orbit[x][38] - 2 * orbit[x][33]);\n orbit[x][20] = (f_20 - 2 * orbit[x][54] - 2 * orbit[x][49] - 1 * orbit[x][40] - 1 * orbit[x][37] - 1 * orbit[x][32]);\n orbit[x][19] = (f_19 - 4 * orbit[x][54] - 4 * orbit[x][49] - 1 * orbit[x][40] - 2 * orbit[x][39] - 1 * orbit[x][37] - 2 * orbit[x][35] - 2 * orbit[x][31]);\n orbit[x][18] = (f_18 - 1 * orbit[x][59] - 1 * orbit[x][51] - 2 * orbit[x][46] - 2 * orbit[x][45] - 2 * orbit[x][36] - 2 * orbit[x][27] - 1 * orbit[x][24]) / 2;\n orbit[x][17] = (f_17 - 1 * orbit[x][60] - 1 * orbit[x][53] - 1 * orbit[x][51] - 1 * orbit[x][48] - 1 * orbit[x][37] - 2 * orbit[x][34] - 2 * orbit[x][30]) / 2;\n orbit[x][16] = (f_16 - 1 * orbit[x][59] - 2 * orbit[x][52] - 1 * orbit[x][51] - 2 * orbit[x][46] - 2 * orbit[x][36] - 2 * orbit[x][34] - 1 * orbit[x][29]);\n orbit[x][15] = (f_15 - 1 * orbit[x][59] - 2 * orbit[x][52] - 1 * orbit[x][51] - 2 * orbit[x][45] - 2 * orbit[x][35] - 2 * orbit[x][34] - 2 * orbit[x][27]);\n }\n\n return orbit;\n }", "public int getNumEdges();", "int getNumberOfEdges();", "public int infectNeighbours(Map map);", "private void countCells() {\n\t\tvisitedCells = 0;\n\t\ttotalCells = 0;\n\t\tfor (int ix = 0; ix < maxCells_x; ix++) {\n\t\t\tfor (int iy = 0; iy < maxCells_y; iy++) {\n\t\t\t\ttotalCells++;\n\t\t\t\tif (cell[ix][iy] == 1) {\n\t\t\t\t\tvisitedCells++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "int getNodeCount();", "int getNodeCount();", "public int neighborCount(int row, int col) {//these are your current positions\n\t\tint neighborCell = 0;\n\t\t//array is zero based index\n\n\t\t//down one or row down one\n\t\tif(cellAt((row + 1) % rowCount, col)) //lets say our arrayCell is arrayCell(4,4)\n\t\t\tneighborCell++;\t\t\t\t\t\t// row here is your current cell(this is where you start and put your cell) and you add + 1 \n\t\t\t\t\t\t\t\t\t\t\t\t//lets say row is 1 then it is 1+1 = 2 \n\t\t\t\t\t\t\t\t\t\t\t\t//then 2 % 4(rowCount is 4) = 2\n\t\t\t\t\t\t\t\t\t\t\t\t//then your row is 2 and column 1\n\t\t\n\t\t//row up one\n\t\tif(cellAt((row + rowCount - 1) % rowCount , col))\n\t\t\tneighborCell++;\n\n\t\t//column right or column + 1\n\t\tif(cellAt(row, (col + 1)% colCount))\n\t\t\tneighborCell++;\n\n\t\t//column left or column -1\n\t\tif(cellAt(row,(col + colCount -1)% colCount))\n\t\t\tneighborCell++;\n\n\t\t//row up one and column right one\n\t\tif(cellAt((row + rowCount - 1) % rowCount,(col + 1)% colCount ))\n\t\t\tneighborCell++;\n\n\t\t//row down one and column right \n\t\tif(cellAt((row + 1) % rowCount,(col + 1)% colCount)) \n\t\t\tneighborCell++;\n\n\t\t//row down one and column left\n\t\tif(cellAt((row + 1) % rowCount,(col + colCount -1)% colCount)) \n\t\t\tneighborCell++;\n\n\t\t//row up one and column left\n\t\tif(cellAt((row + rowCount - 1) % rowCount, (col + colCount -1)% colCount))\n\t\t\tneighborCell++;\n\n\t\treturn neighborCell;\n\n\t}", "private int liveNeighbours(int i,int j) {\n\t\tint count = 0;\n\t\tif (button[i - 1][j - 1].getBackground() == Color.yellow) {\n\t\t\tcount++;\n\t\t}\n\t\tif (button[i - 1][j].getBackground() == Color.yellow) {\n\t\t\tcount++;\n\t\t}\n\t\tif (button[i - 1][j + 1].getBackground() == Color.yellow) {\n\t\t\tcount++;\n\t\t}\n\t\tif (button[i][j - 1].getBackground() == Color.yellow) {\n\t\t\tcount++;\n\t\t}\n\t\tif (button[i][j + 1].getBackground() == Color.yellow){\n\t\t\tcount++;\n\t\t}\n\t\tif (button[i + 1][ j - 1].getBackground() == Color.yellow){\n\t\t\tcount++;\n\t\t}\n\t\tif (button[i + 1][j].getBackground() == Color.yellow) {\n\t\t\tcount++;\n\t\t}\n\t\tif (button[i + 1][j + 1].getBackground() == Color.yellow) {\n\t\t\tcount++;\n\t\t}\n\t\treturn count;\n\t}", "public int numEdges();", "public abstract int neighboursInBlock(Set<Integer> block, int vertexIndex);", "int getNodesCount();", "int getNodesCount();", "public int getNumberOfEdges();", "public int getAdjacentCount(int m, int n){\r\n\t\treturn count[m][n];\r\n\t}", "int getCellsCount();", "public Collection<N> neighbors();", "@Override\n public int getNumNeighboringMines(int row, int col) {\n int count = 0, rowStart = Math.max(row - 1, 0), rowFinish = Math.min(row + 1, grid.length - 1), colStart = Math.max(col - 1, 0), colFinish = Math.min(col + 1, grid[0].length - 1);\n\n for (int curRow = rowStart; curRow <= rowFinish; curRow++) {\n for (int curCol = colStart; curCol <= colFinish; curCol++) {\n if (grid[curRow][curCol].getType() == Tile.MINE) count++;\n }\n }\n return count;\n }", "public void countAdjacentMines()\n {\n adjacentMines = 0;\n for (GameSquare square : getAdjacentSquares())\n {\n if (square.mine)\n {\n adjacentMines++;\n }\n }\n }", "private static int safeLevel(List<Point> neighbor) {\n\t\tint count = 0;\n\t\tfor (Point point : neighbor) {\n\t\t\tif(point.getLabel() != 0)\n\t\t\t\tcount ++;\n\t\t}\n\t\treturn count;\n\t}", "public int getVisitedCells() \r\n\t{\r\n\t\tint lastCell = path.size() - 1;\r\n\t\tint visitedCells = path.get(lastCell).getDiscoveryTime() + 1;\r\n\t\treturn visitedCells;\r\n\t}", "int getIndicesCount();", "private int getNeighbours(Cell cell) {\n\n //Get the X, Y co-ordinates of the cell\n int cellX = cell.getXCord();\n int cellY = cell.getYCord();\n\n // Helper variable initially set to check all neighbours.\n int[][] neighbourCords = allCords;\n\n //Checks what location the cell is and which of its neighbours to check\n //This avoids any array out of bounds issues by trying to look outside the grid\n if (cellX == 0 && cellY == 0) {\n neighbourCords = topLeftCords;\n } else if (cellX == this.width - 1 && cellY == this.height - 1) {\n neighbourCords = bottomRightCords;\n } else if (cellX == this.width - 1 && cellY == 0) {\n neighbourCords = topRightCords;\n } else if (cellX == 0 && cellY == this.height - 1) {\n neighbourCords = bottomLeftCords;\n } else if (cellY == 0) {\n neighbourCords = topCords;\n } else if (cellX == 0) {\n neighbourCords = leftCords;\n } else if (cellX == this.width - 1) {\n neighbourCords = rightCords;\n } else if (cellY == this.height - 1) {\n neighbourCords = bottomCords;\n }\n\n // Return the number of neighbours\n return searchNeighbours(neighbourCords, cellX, cellY);\n }", "int nodeCount();", "public int countAdjacentFlags()\n {\n int adjacentFlags = 0;\n for (GameSquare square : getAdjacentSquares())\n {\n if(square.flagged)\n {\n adjacentFlags++;\n }\n }\n return adjacentFlags;\n }", "public int getEdgeCount(){\r\n HashSet<FlowGraphNode> visited = new HashSet<>();\r\n LinkedList<FlowGraphNode> queue = new LinkedList<>();\r\n queue.add(start);\r\n visited.add(start);\r\n int counter = 0;\r\n while(!queue.isEmpty()){\r\n FlowGraphNode node = queue.pop();\r\n counter += node.outDeg();\r\n for(FlowGraphNode child : node.to){\r\n if(visited.add(child)){\r\n queue.add(child);\r\n }\r\n }\r\n }\r\n return counter;\r\n }", "public int numEdges()\r\n {\r\n\tint s = 0;\r\n\tfor (final EdgeTypeHolder eth : ethMap.values())\r\n\t s += eth.numEdges();\r\n\treturn s;\r\n }", "public abstract int numOfSameTypeNeighbourToReproduce();", "static int displayN(Node node)\r\n {\r\n return node.neighbors.size();\r\n }", "private int numberOfComponents(ArrayList<Integer>[] adj) {\n\t\t\t\t\n\t\tint n = adj.length;\n\t\tvisited = new boolean[n]; //default is false\n\t\tCCnum = new int[n];\n\t\tDFS(adj);\n\t\t\n\t\treturn cc;\n }", "@Override\r\n\tpublic int getNumberOfNodes() {\n\t\tint leftNumber=0;\r\n\t\tint rightNumber=0;\r\n\t\tif(left!=null){\r\n\t\t\tleftNumber=left.getNumberOfNodes();\r\n\t\t}\r\n\t\tif(right!=null)\r\n\t\t\trightNumber=right.getNumberOfNodes();\r\n\t\treturn leftNumber+rightNumber+1;\r\n\t}", "public int edgeCount() {\n\treturn edgeList.size();\n }", "public int getNumEdges()\n\t{\n\t\t//TODO: Implement this method in WEEK 3\n\t\treturn numEdges;\n\t}", "static int numberAmazonTreasureTrucks(int rows, int column,\n\t\t\t\t\t\t\t\t List<List<Integer> > grid)\n {\n // WRITE YOUR CODE HERE\n int count = 0;\n for(int i=0;i<rows;i++) {\n for(int j=0;j<column;j++) {\n if(grid.get(i).get(j) == 1) {\n count++;\n markNeighbours(grid, i, j, rows, column);\n }\n }\n }\n return count;\n }", "private int numEdges()\r\n\t{\r\n\t return eSet.size();\r\n\t}", "int count() {\n\t\tArrayList<Integer> checked = new ArrayList<Integer>();\r\n\t\tint count = 0;\r\n\t\tfor (int x = 0; x < idNode.length; x++) {// Order of N2\r\n\t\t\tint rootX = getRoot(x);\r\n\t\t\tif (!checked.contains(rootX)) {// Order of N Access of Array\r\n\r\n\t\t\t\tSystem.out.println(\"root x is \" + rootX);\r\n\t\t\t\tcount++;\r\n\t\t\t\tchecked.add(rootX);// N Access of Array\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn count;\r\n\t}", "public Object getNumberOfConnectedComponents() {\r\n\t\tConnectivityInspector<Country, DefaultEdge> inspector=new ConnectivityInspector<Country, DefaultEdge>(graph);\r\n\t\treturn inspector.connectedSets().size();\r\n\t}", "int getBlockLocationsCount();", "public int getDegree(){\n\t\treturn neighbours.size();\n\t}", "public int getNodeCount(){\r\n HashSet<FlowGraphNode> visited = new HashSet<>();\r\n LinkedList<FlowGraphNode> queue = new LinkedList<>();\r\n queue.add(start);\r\n visited.add(start);\r\n while(!queue.isEmpty()){\r\n FlowGraphNode node = queue.pop();\r\n for(FlowGraphNode child : node.to){\r\n if(visited.add(child)){\r\n queue.add(child);\r\n }\r\n }\r\n }\r\n return visited.size();\r\n }", "int nbNode() {\n switch (type) {\n\n case EDGE:\n case PATH:\n case EVAL:\n if (edge.getEdgeVariable() == null) {\n return edge.nbNode();\n } else {\n return edge.nbNode() + 1;\n }\n\n case OPT_BIND:\n return size();\n }\n\n return 0;\n }", "int getBlockNumbersCount();", "int sizeOfBridgeElementArray();", "public int getNumberOfLivingNeighbours(int x, int y){\n int living = 0;\n\n for (int i = x - 1; i <= x + 1; i++) {\n for (int j = y - 1; j <= y + 1; j++) {\n if (isAlive(i, j)) {\n living++;\n }\n }\n }\n\n if(isAlive(x, y))\n living--; //Remove 1 from count if orig coordinate\n\n return living;\n }", "int getNumberOfVertexes();", "public ArrayList<Integer> getNeighbours() {\n\t\tArrayList<Integer> result = new ArrayList<Integer>();\n\n\t\tfor (Border curBorder: allBorder) {\n\t\t\tresult.add(curBorder.countryID);\n\t\t}\n\n\t\treturn result;\n\t}", "public int numEdges() {\n int tot = 0;\n\n ListIterator<EdgeList> curEdge = edgeListVector.listIterator();\n while (curEdge.hasNext()) {\n tot += curEdge.next().size();\n }\n\n return tot;\n }", "private long nodesLength(Edge[] E) {\n\t\tlong nodesLength = 0;\n\t\tfor (Edge e:E ) {\n\t\t\tif (e.getTo() > nodesLength) nodesLength = e.getTo();\n\t\t\tif (e.getFrom() > nodesLength) nodesLength = e.getFrom();\n\t\t}\n\t\tnodesLength++;\t\n\t\treturn nodesLength;\t\t\n\t}", "public boolean hasNeighbours() {\n\t\tif (this.eltZero != null || this.eltOne != null || this.eltTwo != null)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "Long getNumberOfElement();", "int getIndexesCount();", "public int getNodeCount() {\n resetAllTouched();\n return recurseNodeCount();\n }", "private int searchNeighbours(int[][] neighbourCords, int cellX, int cellY) {\n int neighbours = 0;\n for (int[] offset : neighbourCords) {\n if (getCell(cellX + offset[0], cellY + offset[1]).isAlive()) {\n neighbours++;\n }\n }\n\n return neighbours;\n }", "private static int getNumTotalEdges(){\r\n\t\t//return getMutMap().keySet().size();\r\n\t\treturn numCols+1;\r\n\t}", "@Override\n\tpublic int numElements() {\n\t\treturn stencil.holes.length;\n\t}", "static int countAdjacent(char[][] seatMap,int row, int col) {\r\n\r\n int occupied = 0;\r\n for (int y = -1; y < 2; y++) {\r\n for (int x = -1; x < 2; x++) {\r\n occupied += checkOccupied(seatMap, row, col, y, x);\r\n }\r\n }\r\n return occupied;\r\n }", "private int numNodes()\r\n\t{\r\n\t return nodeMap.size();\r\n\t}", "public ArrayList<Double> getNeighboursData() {\n\t\tArrayList<Double> result = new ArrayList<Double>();\n\n\t\tfor (Border curBorder: allBorder) {\n\t\t\tresult.add(curBorder.length);\n\t\t}\n\n\t\treturn result;\n\t}", "public int getNumOfNodes() {\n\t\treturn getNumOfNodes(this);\n\t}", "int getXYPairCount();", "protected int count_nbr_in_state ( int state )\r\n {\r\n OSPF_Interface oif;\r\n int count = 0;\r\n int i, j; \r\n int if_no, nbr_no;\r\n \r\n if_no = if_list.size();\r\n for ( i = 0; i < if_no; i++) {\r\n oif = (OSPF_Interface) if_list.elementAt(i);\r\n nbr_no = oif.neighbor_list.size();\r\n for ( j = 0; j < nbr_no; j++) {\r\n OSPF_Neighbor nbr = (OSPF_Neighbor) oif.neighbor_list.elementAt(j);\r\n if (nbr.state == state)\r\n count++;\r\n }\r\n }\r\n return count;\r\n }", "public int getVertexCount();", "public int numberofDistinctIslands(int[][] grid) {\n int rows = grid.length;\n if (rows == 0){\n return 0;\n }\n int cols = grid[0].length;\n int count = 0;\n\n visited = new boolean[rows][cols];\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j < cols; j++) {\n visited[i][j] = false;\n }\n }\n\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j < cols; j++) {\n if (grid[i][j] == 1 && !visited[i][j]){\n dfs(grid, i, j, rows, cols);\n count++;\n }\n }\n }\n\n System.out.println(count);\n return count;\n }", "public Integer numUnknownEdges()\n\t{\n\t\tif (total_edges == null) return null;\n\n\t\tint edges = 0;\n\t\tfor (Node n : nodes.values())\n\t\t{\n\t\t\tedges += n.neighbors.size();\n\t\t}\n\t\t// double-counts edges, so divide\n\t\treturn total_edges - edges / 2;\n\t}", "public TriangleElt3D[] getNeighbours() {\n\t\tint counter = 0;\n\t\tif (this.eltZero != null)\n\t\t\tcounter++;\n\t\tif (this.eltOne != null)\n\t\t\tcounter++;\n\t\tif (this.eltTwo != null)\n\t\t\tcounter++;\n\n\t\tTriangleElt3D[] neighbours = new TriangleElt3D[counter];\n\n\t\tcounter = 0;\n\t\tif (this.eltZero != null) {\n\t\t\tneighbours[counter] = this.eltZero;\n\t\t\tcounter++;\n\t\t}\n\t\tif (this.eltOne != null) {\n\t\t\tneighbours[counter] = this.eltOne;\n\t\t\tcounter++;\n\t\t}\n\t\tif (this.eltTwo != null) {\n\t\t\tneighbours[counter] = this.eltTwo;\n\t\t}\n\n\t\treturn neighbours;\n\t}", "public int getNumberOfElements();", "public abstract Integer getNumberOfElements();", "public int getNeighborCount(final LazyNode2 vertex) {\n return getNeighborCount(neo.getNodeById(vertex.getId()));\n }", "@Override\n public int edgeCount() {\n int count = 0;\n\n for(MyNode n : graphNodes.values()){\n count += n.inDegree();\n }\n\n return count;\n }", "@Override\r\n\tpublic int getNumberOfNodes() {\r\n\t\tint contador = 0;// Contador para el recursivo\r\n\t\treturn getNumberOfNodesRec(contador, raiz);\r\n\t}", "public int countNodes() {\n int leftCount = left == null ? 0 : left.countNodes();\n int rightCount = right == null ? 0 : right.countNodes();\n return 1 + leftCount + rightCount;\n }", "private int neighborBombCount(Tile t) {\r\n int tileRow = t.getRow();\r\n int tileCol = t.getCol();\r\n int bombCount = 0;\r\n for (int r = tileRow - 1; r <= tileRow + 1; r++) {\r\n for (int c = tileCol - 1; c <= tileCol + 1; c++) {\r\n if (r >= 0 && r < gridSize && c >= 0 && c < gridSize) { \r\n if (grid[r][c].isBomb()) {\r\n bombCount++;\r\n } \r\n }\r\n }\r\n }\r\n return bombCount; \r\n }", "public int getEdgeCount() \n {\n return 3;\n }", "private int size() {\n assert _vertices.size() == _edges.size();\n return _edges.size();\n }", "private int surroundingMines(int x, int y) {\r\n int startingX, startingY, endingX, endingY;\r\n int count = 0;\r\n \r\n // putting condition for edges\r\n startingX = startEdgeConditon(x);\r\n startingY = startEdgeConditon(y);\r\n endingX = endEdgeConditon(x);\r\n endingY = endEdgeConditon(y);\r\n \r\n // check surrounding cells\r\n for (int i = startingX; i < endingX; i++) {\r\n for (int j = startingY; j < endingY; j++) {\r\n if (mines[i][j]) {\r\n count++;\r\n }\r\n }\r\n }\r\n return count;\r\n }", "int sizeOfRoadsideArray();", "@Override\n\tpublic int size() {\n\t\tif(top == null) {\n\t\t\treturn 0;\n\t\t}\n\t\tNode<T> tempNode = top;\n\t\tint counter = 1;\n\t\twhile(tempNode.getLink() != null) {\n\t\t\tcounter++;\n\t\t\ttempNode = tempNode.getLink();\n\t\t}\n\t\treturn counter;\n\t}", "public int getHeuristic(){\n\t\tint count = 0;\n\t\tfor (int i = 0; i < getRows(); i++) {\n\t\t\tfor (int j = 0; j < getColumns(); j++) {\n\t\t\t\tif (cells[i][j].getSand() != getK()) \n\t\t\t\t\tcount++;\n\t\t\t}\n\t\t} \n\t\treturn count;\n\t}", "private int nextLineNeighbours(Cell[][] cells, int i, int j) {\n\t\tint no = 0;\n\t\tif (j != 0) {\n\t\t\tif (cells[i][j - 1].isAlive())\n\t\t\t\tno++;\n\t\t\tif (cells[i + 1][j - 1].isAlive())\n\t\t\t\tno++;\n\t\t}\n\t\tif (j != cells.length - 1) {\n\t\t\tif (cells[i][j + 1].isAlive())\n\t\t\t\tno++;\n\t\t\tif (cells[i + 1][j + 1].isAlive())\n\t\t\t\tno++;\n\t\t}\n\t\tif (cells[i + 1][j].isAlive())\n\t\t\tno++;\n\t\treturn no;\n\t}", "public int sameNeighborCount(int x, int y) {\n\t\tint radius = 1;\n\t\tint count = 0;\n\t\tint posX, posY;\n\t\tCell c, me;\n\n\t\tme = cells[x + (y * gridX)];\n\n\t\tfor (int nx = -radius; nx <= radius; nx++) {\n\t\t\tposX = x + nx;\n\t\t\tif (posX < 0 || posX >= gridX) {\n\t\t\t\t// out of bounds\n\t\t\t} else {\n\t\t\t\tfor (int ny = -radius; ny <= radius; ny++) {\n\t\t\t\t\t// skip myself\n\t\t\t\t\tif (nx != 0 && ny != 0) {\n\t\t\t\t\t\tposY = y + ny;\n\t\t\t\t\t\tif (posY < 0 || posY >= gridY) {\n\t\t\t\t\t\t\t// out of bounds\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// valid position\n\t\t\t\t\t\t\t// make sure the cell has the same color and is active\n\t\t\t\t\t\t\tc = cells[posX + (posY * gridX)];\n\t\t\t\t\t\t\tif (c.cellColor == me.cellColor && c.isActive) {\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn count;\n\t}", "public long getEdgeCount() { return edgeCount; }", "private int nonDirectionalEdgesNumber() {\n return selectedNonDirectionalEdges.size();\n }", "public int getNumVertices();", "private int getAliveNeighboursCount (int line, int column) {\n assert isInUniverse(line,column);\n// System.out.println(\"getAliveNeighboursCount for \"+line+column);\n int aliveNeighbours = 0;\n// System.out.println(\"->\"+(line-1)+\"|\"+(column-1));\n if (isInUniverse((line-1),(column-1))) if (getCell((line-1),(column-1))) aliveNeighbours++; // -1/-1\n if (isInUniverse((line-1), column) ) if (getCell((line-1), column)) aliveNeighbours++; // -1/0\n if (isInUniverse((line-1),(column+1))) if (getCell((line-1),(column+1))) aliveNeighbours++; // -1/+1\n if (isInUniverse( line ,(column-1))) if (getCell( line ,(column-1))) aliveNeighbours++; // 0/-1\n if (isInUniverse( line ,(column+1))) if (getCell( line ,(column+1))) aliveNeighbours++; // 0/+1\n if (isInUniverse((line+1),(column-1))) if (getCell((line+1),(column-1))) aliveNeighbours++; // +1/-1\n if (isInUniverse((line+1), column) ) if (getCell((line+1), column)) aliveNeighbours++; // +1/0\n if (isInUniverse((line+1),(column+1))) if (getCell((line+1),(column+1))) aliveNeighbours++; // +1/+1\n// System.out.println(\"getAliveNeighboursCount done\");\n return aliveNeighbours;\n }", "private int visitedNetworksCount() {\n final HashSet<String> visitedNetworksSet = new HashSet<>(mVisitedNetworks);\n return visitedNetworksSet.size();\n }", "public int getNumAdjacentLivingCells(int row, int col) \n {\n int numLiving = 0;\n\n if (row - 1 >= 0 && col - 1 >= 0 && isAlive(getCell(row - 1, col - 1))) \n {\n numLiving++;\n }\n if (row - 1 >= 0 && isAlive(getCell(row - 1, col))) \n {\n numLiving++;\n }\n if (row - 1 >= 0 && col + 1 < getColumns() && isAlive(getCell(row - 1, col + 1))) \n {\n numLiving++;\n }\n if (col - 1 >= 0 && isAlive(getCell(row, col - 1))) \n {\n numLiving++;\n }\n if (col + 1 < getColumns() && isAlive(getCell(row, col + 1))) \n {\n numLiving++;\n }\n if (row + 1 < getRows() && col - 1 >= 0 && isAlive(getCell(row + 1, col - 1))) \n {\n numLiving++;\n }\n if (row + 1 < getRows() && isAlive(getCell(row + 1, col)))\n {\n numLiving++;\n }\n if (row + 1 < getRows() && col + 1 < getColumns() && isAlive(getCell(row + 1, col + 1))) \n {\n numLiving++;\n }\n return numLiving;\n }", "public int sizeOfCornerArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(CORNER$12);\r\n }\r\n }", "int getBlockNumsCount();", "int getBlockNumsCount();", "@Override\n\tpublic int size() {\n\t\tint nr = 0;\n\t\tfor (int i = 0; i < nrb; i++) {\n\t\t\t// pentru fiecare bucket numar in lista asociata acestuia numarul de\n\t\t\t// elemente pe care le detine si le insumez\n\t\t\tfor (int j = 0; j < b.get(i).getEntries().size(); j++) {\n\t\t\t\tnr++;\n\t\t\t}\n\t\t}\n\t\treturn nr;// numaru total de elemente\n\t}", "public int nodeCount(){\r\n\t\treturn size;\r\n\t}" ]
[ "0.74368966", "0.72899306", "0.71964586", "0.7185369", "0.7185346", "0.7087399", "0.7055646", "0.69451356", "0.6943828", "0.6905339", "0.685969", "0.6827346", "0.6767381", "0.6743245", "0.6738916", "0.6738916", "0.6727565", "0.67265654", "0.6709875", "0.6654132", "0.6619433", "0.6619433", "0.6612278", "0.66119576", "0.6606327", "0.6527537", "0.648358", "0.6462657", "0.6461313", "0.64589345", "0.64059156", "0.64014876", "0.63979596", "0.63804406", "0.6374024", "0.63588566", "0.6354941", "0.63487506", "0.6347662", "0.63290185", "0.632318", "0.6321608", "0.63121545", "0.6288884", "0.6287637", "0.6280882", "0.626234", "0.625861", "0.6257379", "0.6252081", "0.6245613", "0.6243651", "0.6241505", "0.6222666", "0.62215453", "0.6217309", "0.62152576", "0.6210605", "0.62030876", "0.61912894", "0.6190281", "0.6189993", "0.6185293", "0.61737174", "0.61722267", "0.61672854", "0.6161823", "0.6158917", "0.6156312", "0.61470866", "0.6146559", "0.6145504", "0.6144816", "0.6137978", "0.6134356", "0.61285126", "0.6127844", "0.61183333", "0.6117991", "0.6115509", "0.61056554", "0.6104044", "0.60946196", "0.60847366", "0.60815537", "0.6076312", "0.6068652", "0.6050842", "0.6047591", "0.60462856", "0.604542", "0.6039361", "0.603401", "0.6031875", "0.6030866", "0.60270184", "0.60232586", "0.60232586", "0.6020465", "0.6011267" ]
0.81260496
0
Tests if this has neighbour elements at all.
public boolean hasNeighbours() { if (this.eltZero != null || this.eltOne != null || this.eltTwo != null) return true; else return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isCellBelowNeighbor() {\r\n return this.neighbors.contains(new Cell(this.x, this.y + 1));\r\n }", "public boolean hasNeighbour(int index) {\n\t\tswitch (index) {\n\t\tcase 0:\n\t\t\treturn this.eltZero != null;\n\t\tcase 1:\n\t\t\treturn this.eltOne != null;\n\t\tcase 2:\n\t\t\treturn this.eltTwo != null;\n\t\tdefault:\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean needsNeighborhood()\r\n\t{\r\n\t\treturn m_needsNeighborhood;\t\r\n\t}", "public boolean areAdjacent() {\n return areAdjacent;\n }", "public boolean percolates(){\n\t\treturn unionFind.connected(virtualBottom, virtualTop);\n\t}", "public boolean isInterior() {\n\t\tif (this.eltZero != null && this.eltOne != null && this.eltTwo != null)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "public boolean percolates() {\n return backwashQuickUnion.connected(virtualTop, virtualBottom);\n }", "public boolean percolates() {\n if (openSitesCount < gridSize) {\n return false;\n }\n\n if (gridSize == 1 && openSitesCount == 1) {\n return true;\n }\n\n return wquf2.connected(virtualTopSiteIndex, virtualBottomSiteIndex);\n }", "private void getNeighbors() {\n\t\tRowIterator iterator = currentGen.iterateRows();\n\t\twhile (iterator.hasNext()) {\n\t\t\tElemIterator elem = iterator.next();\n\t\t\twhile (elem.hasNext()) {\n\t\t\t\tMatrixElem mElem = elem.next();\n\t\t\t\tint row = mElem.rowIndex();\n\t\t\t\tint col = mElem.columnIndex();\n\t\t\t\tint numNeighbors = 0;\n\t\t\t\tfor (int i = -1; i < 2; i++) { // loops through row above,\n\t\t\t\t\t\t\t\t\t\t\t\t// actual row, and row below\n\t\t\t\t\tfor (int j = -1; j < 2; j++) { // loops through column left,\n\t\t\t\t\t\t\t\t\t\t\t\t\t// actual column, coloumn\n\t\t\t\t\t\t\t\t\t\t\t\t\t// right\n\t\t\t\t\t\tif (!currentGen.elementAt(row + i, col + j).equals(\n\t\t\t\t\t\t\t\tfalse)) // element is alive, add 1 to neighbor\n\t\t\t\t\t\t\t\t\t\t// total\n\t\t\t\t\t\t\tnumNeighbors += 1;\n\t\t\t\t\t\telse { // element is not alive, add 1 to its total\n\t\t\t\t\t\t\t\t// number of neighbors\n\t\t\t\t\t\t\tInteger currentNeighbors = (Integer) neighbors\n\t\t\t\t\t\t\t\t\t.elementAt(row + i, col + j);\n\t\t\t\t\t\t\tneighbors.setValue(row + i, col + j,\n\t\t\t\t\t\t\t\t\tcurrentNeighbors + 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tneighbors.setValue(row, col, numNeighbors - 1); // -1 to account\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// for counting\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// itself as a\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// neighbor\n\t\t\t}\n\t\t}\n\t}", "private static boolean AllCellsVisited()\n {\n for (Cell arr[] : cells){\n for (Cell c : arr)\n {\n if (!c.Visited)\n {\n return false;\n }\n }\n }\n return true;\n }", "public boolean percolates() {\n for (int i = 0; i < size; i++) {\r\n if (flowGrid[size * (size - 1) + i] < size) { // if any of the bottom row points at any of the index in the top row\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "public boolean percolates() {\n return unionFind.connected(topRoot, bottomRoot);\n }", "public boolean percolates() {\n\t\tint top = uf.find(0);\n\t\tint bottom = uf.find(size * size + 1);\n\t\treturn top == bottom;\n\t}", "public boolean percolates() {\n return myUF.connected(n*n, n*n + 1);\n }", "private boolean neighborIsBlank(SSheet sheet, int left, int right, int row, int col) {\n\t\tfor (int j = left; j <= right; ++j) {\n\t\t\tif (j == col) continue;\n\t\t\tfinal SCell c = sheet.getCell(row, j);\n\t\t\tif (!c.isNull() && c.getType() != CellType.BLANK) {\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\tCellRegion merged = sheet.getMergedRegion(row, j);\n\t\t\t\tif (merged != null) {\n\t\t\t\t\tint l = merged.getColumn();\n\t\t\t\t\tint t = merged.getRow();\n\t\t\t\t\tfinal SCell c0 = sheet.getCell(t, l);\n\t\t\t\t\tif (!c0.isNull() && c0.getType() != CellType.BLANK) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public boolean allCellsFlooded() {\r\n for (ACell c : this.board) {\r\n if (!c.floodCheck()) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }", "public boolean isOver() {\n for (int i = 0; i < n; i++) {\n for (int j = 0; j < n; j++) {\n if (!matrix[i][j].isClicked()) {\n return false;\n }\n }\n }\n return true;\n }", "public boolean percolates(){\r\n\t\treturn uf.connected(N * N, N * N + 1);\r\n\t}", "@DisplayName(\"Has neighbours?\")\n @Test\n public void testGetNeighbours() {\n Assertions.assertTrue(graph.getNeighbours(0).size() > 1);\n }", "public boolean clashingNeighbourCell(int connec){\n\t\tint thisCell = this.getANeigh();\n\n\t\tboolean ret = false;\n\n\t\tfor(ThresholdDataPoint neigh : getNeighbours(connec)){\n\t\t\tif(!neigh.getNeighbourCellBodies().isEmpty()){\n\t\t\t\tif(!neigh.isWatershed()){\n\t\t\t\t\tif(neigh.getANeigh() != thisCell){\n\t\t\t\t\t\tret = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}", "boolean hasIsBoundaryNodeOf();", "public boolean percolates() {\n return uf.connected(n*n, n*n+1);\r\n }", "public boolean percolates()\n {\n return uf.connected(topVirtualSite, bottomVirtualSite);\n }", "public boolean percolates() {\n return mainUnion.connected(virtualTopId, virtualBottomId);\n }", "public boolean areDisjoint() {\n return !geometry.almostZero(distance);\n }", "public boolean hasNext() {\n return nodeIndex != iterN;\n }", "boolean isEmpty() {\n return (bottom < top.getReference());\n }", "public boolean percolates() {\n\t\treturn cellTree.connected(side * side, side * side + 1);\n\t}", "private boolean allAdjacentUsed(Box box) {\n if (box == null)\n throw new IllegalArgumentException(\"Error. null pointer in allAdjacentUsed(box).\");\n return isNextBoxUsed(box, 0) && isNextBoxUsed(box, 1) && isNextBoxUsed(box, 2) && isNextBoxUsed(box, 3);\n }", "private boolean hasANonneighbourInX(Graph<V, E> g, V v, Set<V> X)\n {\n return X.stream().anyMatch(x -> !g.containsEdge(v, x));\n }", "protected Cell[] getNeighbours() {\r\n\t\treturn this.neighbours;\r\n\t}", "public boolean percolates() {\n for (int i = n * n - n + 1; i <= n * n; i++) {\n if (weightedQuickUnionUF.connected(0, i)) {\n return true;\n }\n }\n return false;\n }", "public boolean isAdjacentTo(final Vertex other){\n\t\tboolean result = false;\n\t\tif(getNeighbours().contains(other))\n\t\t\tresult = true;\n\t\treturn result;\n\t}", "private ArrayList<BooleanProperty> checkSurroundings(int layoutX, int layoutY) {\n\n ArrayList<BooleanProperty> neighbors = new ArrayList<>();\n BooleanProperty[][] gameCells = controller.getGameCells();\n\n for (int i = layoutX - 1; i <= layoutX + 1; i++) {\n for (int j = layoutY - 1; j <= layoutY + 1; j++) {\n\n if (!(i == layoutX && j == layoutY)) {\n if (i < gameCells.length && i > -1 && j < gameCells[i].length && j > -1 && gameCells[i][j].get()) {\n neighbors.add(gameCells[i][j]);\n }\n }\n }\n }\n return neighbors;\n }", "public boolean percolates() {\n \treturn weigtedJoin.connected(N * N, N * N + 1);\n }", "public boolean isNeighbour(Tile tile){\n int x1 = this.getX();\n int y1 = this.getY();\n\n int x2 = tile.getX();\n int y2 = tile.getY();\n return (x1 == x2 && (Math.abs(y1-y2) == 1)) || (y1 == y2 && (Math.abs(x1-x2) == 1));\n }", "public boolean isGameObjectInNeighbourhood(GameObject gO) {\n return Math.abs(this.getGridCoordinates().x - gO.getGridCoordinates().x) == 0 && Math.abs(this.getGridCoordinates().y - gO.getGridCoordinates().y) == 1 ||\n Math.abs(this.getGridCoordinates().x - gO.getGridCoordinates().x) == 1 && Math.abs(this.getGridCoordinates().y - gO.getGridCoordinates().y) == 0;\n }", "public boolean isWatershed(){\n\t\tif(getNeighbourCellBodies().size() > 1){\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean percolates() {\n\t\treturn linearGrid.connected(0, 1);\n\t}", "public boolean percolates() {\n if (wuf.connected(virtTop, virtBottom)) {\n hasPercolated = true;\n return true;\n }\n \n return false;\n }", "public boolean hasNextHop()\n {\n return getHopCount() < route.size()-1;\n }", "@Override\r\n\tpublic boolean isAllHit() {\r\n\t\treturn priorityElements.isEmpty();\r\n\t}", "public boolean isSetNeCell()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(NECELL$24) != 0;\n }\n }", "public boolean percolates(){\n return uf.connected(ufSize - 2, ufSize - 1);\n }", "public boolean percolates() {\n if (mGridSize == 1 && !isOpen(1, 1))\n return false;\n //return mUnionFind.connected(0, mGridSize * mGridSize + 1);\n return mUnionFind.find(0) == mUnionFind.find(mGridSize * mGridSize + 1);\n\n }", "boolean isCellRightNeighbor() {\r\n return this.neighbors.contains(new Cell(this.x + 1, this.y));\r\n }", "public void checkNeighbours(int row, int column)\r\n {\r\n int counter = 0;\r\n //*************************************************\r\n //Following code was adapted from Harry Tang 2015-04-27\r\n for (int columnNeighbours = column - 1; columnNeighbours <= column + 1; columnNeighbours ++)\r\n {\r\n for (int rowNeighbours = row - 1; rowNeighbours <= row + 1; rowNeighbours ++)\r\n {\r\n try \r\n {\r\n if (cellGrid[columnNeighbours][rowNeighbours].isAlive()\r\n && cellGrid[columnNeighbours][rowNeighbours] != cellGrid[column][row])\r\n {\r\n counter ++;\r\n }\r\n }\r\n catch (IndexOutOfBoundsException e)\r\n {\r\n // do nothing\r\n }\r\n } // end of for (int y = indexY - 1; y == indexY; y++)\r\n } // end of for (int x = indexX - 1; x == indexX; x++)\r\n //*************************************************\r\n \r\n decisionOnCellState(counter, row, column);\r\n }", "public boolean percolates() {\n return sitesUF.connected(upSiteIndex, downSiteIndex);\n }", "public Collection<N> neighbors();", "public void checkNeighbour() {\r\n for (int y = 0; y < table.length; y++){\r\n for (int x = 0; x < table.length; x++){\r\n rule(y, x);\r\n }\r\n }\r\n for (int i = 0; i < table.length; i++)\r\n System.arraycopy(temp_table[i], 0, table[i], 0, table.length);\r\n }", "public boolean percolates() throws Exception {\n if (SIZE != 1 && ufVirtual.connected(0, SIZE - 1))\n return true;\n else if (SIZE == 1 && isOpen(1, 1))\n return true;\n return false;\n }", "private boolean isEmptyWest()\r\n\t{\r\n\t\treturn (westElem == 0);\r\n\t}", "public boolean hasNeighbor(Tile tile) {\n if (tile == null) {\n return false;\n }\n\n return (this.tileNorth == tile || this.tileEast == tile || this.tileSouth == tile || this.tileEast == tile);\n }", "private boolean hasAdjacent(int node) {\n for (int i = 0; i < this.matrix[node].length; i++) {\n if (this.matrix[node][i]) {\n return true;\n }\n\n }\n return false;\n }", "public boolean hasFinished(int neighbour){\n\t//System.out.println(\"ATTENTION\");\n\treturn false;\n }", "@Override\n public boolean hasNext() {\n return j < size; // size is field of outer instance\n }", "@Override\n public boolean hasNext()\n {\n Node testNode = getNth(idx);\n if(testNode.getElement() == null)\n {\n return false;\n }\n else\n {\n return true;\n }\n }", "public boolean isFull() {\n if(this.top==(size - 1)) {\n return true;\n }\n return false;\n }", "@Override\n\tpublic boolean notEmpty() {\n\t\treturn count==0&&front==rear?true:false;\n\t}", "public boolean isFull(int i, int j) {\n if (!checkIndex(i, j))\n throw new IndexOutOfBoundsException(\"invalid index i or j for grid site\");\n int idx = xyTo1D(i, j);\n // is virtual top site connected to this site\n //return mUnionFind.connected(0, idx);\n return mUnionFind.find(0) == mUnionFind.find(idx);\n\n }", "public int countNeighbours() {\n\t\tint count = 0;\n\t\tif (this.hasNeighbour(0))\n\t\t\tcount++;\n\t\tif (this.hasNeighbour(1))\n\t\t\tcount++;\n\t\tif (this.hasNeighbour(2))\n\t\t\tcount++;\n\t\treturn count;\n\t}", "public boolean isFull(int i, int j) {\n if (i <= 0 || i > siteDepth || j <= 0 || j > siteDepth)\n throw new IndexOutOfBoundsException();\n\n int element = ((i-1)*siteDepth) + (j-1) + 1;\n\n if (wufFull.connected(element, virtTop))\n return true;\n\n return false;\n }", "public boolean empty(){\n return this.top == -1;\n }", "boolean hasNeighbor(String descrip) {\n return this.neighbors.containsKey(descrip);\n }", "@Override\n\tpublic Boolean isEnd() {\n\t\tfor (int i = 0;i < grid.length;i++){\n\t\t\tfor (int j = 0;j < grid.length;j++){\n\t\t\t\tif(grid[i][j] == null){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "public boolean hasHole() {\n return (_holeLines.size() > 0);\n }", "public boolean isNeighbor(Cell cell){\n \tif((Math.pow(x - cell.getX(), 2) + (Math.pow(y - cell.getY(), 2)) <= 10* 10)){\n\t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic ArrayList<Node<A>> neighbours(){\n\t\t\n\t\tArrayList<Node<A>> output = new ArrayList<Node<A>>();\n\t\t\n\t\tif (g == null) return output;\n\t\t\n\t\tfor (Object o: g.getEdges()){\n\n\t\t\t\n\t\t\tif (((Edge<?>)o).getTo().equals(this)) {\n\t\t\t\t\n\t\t\t\tif (!output.contains(((Edge<?>)o).getFrom()))\n\t\t\t\t\t\toutput.add((Node<A>) ((Edge<?>)o).getFrom());\n\t\t\t\t\n\t\t\t}\n\n\t\t} \n\t\treturn output;\n\t\t\n\t}", "public boolean isInBoundaries() {\n\t return Referee.playfield.isInBoundaries(this);\n }", "public boolean isValidPlacementSpot() {\n return isEmpty() && ! getNeighbours().stream().allMatch(Spot::isEmpty);\n }", "boolean hasGrid();", "public void removeNeighbours(){\n\t\tgetNeighbours().removeAll(getNeighbours());\n\t}", "public boolean hasNonEscapingEdges() {\n return addedEdges != null;\n }", "public boolean areAdjacent(Position vp, Position wp) throws InvalidPositionException;", "public boolean canReproduce() {\r\n ArrayList<Cell> neighbours = getNeighbours(FIRSTLAYER);\r\n\r\n int numOfSameT = 0;\r\n int numOfEmpty = 0;\r\n int numOfFoodC = 0;\r\n\r\n for (Cell cell : neighbours) {\r\n if (isSameType(cell.getInhabit())) {\r\n numOfSameT++;\r\n } else if (cell.getInhabit() == null && isTerrainAccessiable(cell)) {\r\n numOfEmpty++;\r\n } else if (isEdible(cell.getInhabit())) {\r\n numOfFoodC++;\r\n }\r\n }\r\n\r\n return (numOfSameT >= numOfSameTypeNeighbourToReproduce() \r\n && numOfEmpty >= numOfEmptyToReproduce()\r\n && numOfFoodC >= numOfFoodCellToReproduce());\r\n }", "public abstract boolean hasEdge(int from, int to);", "private boolean hasHitEdge() {\n if (!enableClusterExitPurging) {\n return false;\n }\n int lx = (int) location.x, ly = (int) location.y;\n int sx = chip.getSizeX(), sy = chip.getSizeY();\n if (lx < radiusX || lx > sx - radiusX || ly < radiusY || ly > sy - radiusY) {\n if (hitEdgeTime == 0) {\n hitEdgeTime = getLastEventTimestamp();\n return false;\n } else {\n if (getLastEventTimestamp() - hitEdgeTime > 0/* getClusterLifetimeWithoutSupportUs()*/) {\n return true;\n } else {\n return false;\n }\n }\n }\n return false;\n }", "@Override\n\tpublic boolean isEmpty()\n\t{\n\t\treturn nodeList.isEmpty() && edgeList.isEmpty();\n\t}", "@Override\n public boolean isConnected() {\n for (node_data n : G.getV()) {\n bfs(n.getKey());\n for (node_data node : G.getV()) {\n if (node.getTag() == 0)\n return false;\n }\n }\n return true;\n }", "public boolean isAdjecentWithCorners(Cell otherCell)\n\t{\n\t\treturn Math.abs(gridX - otherCell.getGridX()) <= 1 && Math.abs(gridY - otherCell.getGridY()) <= 1;\n\t}", "public boolean percolates() {\n if (this.n == 1) return isOpen(1, 1);\n return this.uf.connected(0, this.n * this.n + 1);\n }", "public boolean isFull(int row, int col) {\n if (0 > row && row > size && 0 > col && col > size) {\n throw new IndexOutOfBoundsException();\n }\n int index = returnIndex(row, col);\n return weightedQuickUnionUF.connected(top, index);\n }", "public boolean percolates(){\n\t //special case for n=1:\n\t if(n==1 && numOpen==0){\n\t return false;\n\t }\n\t //this seems very inefficient.. maybe fix\n\t //way to prevent backwash\n\t for(int i= (n*n -n)+1; i <= n*n; i++){\n\t if(grid.connected(0, i)){\n\t return true;\n\t }\n\t }\n\t\treturn false;\n\t}", "public boolean isAdjacentTo(StandardCoordinate where) {\n\t\treturn where.getAdjacencyList().contains(this);\n\t}", "public boolean percolates() {\n return UF.isConnected(0, getSize() * getSize() + 1);\n }", "public boolean hasNext() {\n for (; pos < elem.length; pos++) {\n if (merges(elem[pos])) {\n elem[pos].setUsed();\n continue;\n }\n\n return true;\n }\n\n return false;\n }", "public boolean isEmpty() {\n return this.top == null;\n }", "public boolean isConnected() {\n\t\tif (vertices.size() == 0)\n\t\t\treturn false;\n\n\t\tif (vertices.size() == 1)\n\t\t\treturn true;\n\n\t\t// determine if it is connected by using a wave\n\t\tHashSet<E> waveFront = new HashSet<>();\n\t\tHashSet<E> waveVisited = new HashSet<>();\n\n\t\t// grab the first element for the start of the wave\n\t\tE first = vertices.iterator().next();\n\t\t\n\n\t\twaveFront.add(first);\n\n\t\t// continue until there are no more elements in the wave front\n\t\twhile (waveFront.size() > 0) {\n\t\t\t// add all of the wave front elements to the visited elements\n\t\t\twaveVisited.addAll(waveFront);\n\t\t\t\n\t\t\t// if done break out of the while\n\t\t\tif (waveVisited.size() == vertices.size())\n\t\t\t\tbreak;\n\n\t\t\t// grab the iterator from the wave front\n\t\t\tIterator<E> front = waveFront.iterator();\n\n\t\t\t// reset the wave front to a new array list\n\t\t\twaveFront = new HashSet<>();\n\n\t\t\t// loop through all of the elements from the front\n\t\t\twhile (front.hasNext()) {\n\t\t\t\tE next = front.next();\n\n\t\t\t\t// grab all of the neighbors to next\n\t\t\t\tList<E> neighbors = neighbors(next);\n\n\t\t\t\t// add them to the wave front if they haven't been visited yet\n\t\t\t\tfor (E neighbor : neighbors) {\n\t\t\t\t\tif (!waveVisited.contains(neighbor))\n\t\t\t\t\t\twaveFront.add(neighbor);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// return whether all of the nodes have been visited or not\n\t\treturn waveVisited.size() == vertices.size();\n\t}", "public boolean percolates() {\n if (grid.length == 1) {\n return isOpen(1, 1);\n }\n return uf.find(grid.length * grid.length) == uf.find(grid.length * grid.length + 1);\n }", "private boolean hasAdjacentWalls(View v){\n\t\tDirection[] allDirections = Direction.values();\n\t\tfor (Direction d : allDirections) {\n\t\t\tif (!v.mayMove(d)) {\n\t\t\t\t//Yes, there is an adjacent wall\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "private void setNeighboringMines(){\n\t\t//cycle the board\n\t\tfor (int r = 0; r < board.length; r++)\n\t\t\tfor (int c = 0; c < board[r].length; c++){\n\t\t\t\tint neighborCount = 0;\n\t\t\t\tif(!board[r][c].isMine()) {\n\t\t\t\t\t//checks if there is mines touching\n\t\t\t\t\tneighborCount = neighboringMines(r, c);\n\t\t\t\t\tif (neighborCount > 0) {\n\t\t\t\t\t\tboard[r][c].setIsNeighboringMine(true);\n\t\t\t\t\t\tboard[r][c].setNumNeighboringMines\n\t\t\t\t\t\t\t\t(neighborCount);\n\t\t\t\t\t} else if (neighborCount == 0) {\n\t\t\t\t\t\tboard[r][c].setNumNeighboringMines(0);\n\t\t\t\t\t\tboard[r][c].setIsNeighboringMine(false);\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public ArrayList<SearchNode> neighbors() {\n ArrayList<SearchNode> neighbors = new ArrayList<SearchNode>();\n // StdOut.println(\"before: \" + this.snBoard);\n Iterable<Board> boards = new ArrayList<Board>();\n boards = this.snBoard.neighbors();\n // StdOut.println(\"after: \" + this.snBoard);\n for (Board b: boards) {\n // StdOut.println(b);\n // StdOut.println(\"checking: \"+b);\n // StdOut.println(\"checking father: \"+this.getPredecessor());\n if (this.getPredecessor() == null) {\n SearchNode sn = new SearchNode(b,\n b.hamming(),\n this,\n b.manhattan(),\n this.moves+1);\n // StdOut.println(\"checking: \"+(this.priority - this.snBoard.hamming()));\n // StdOut.println(\"checking: \"+(this.priority - this.snBoard.hamming()));\n // sn.addMovesToPriority(this.priority - this.snBoard.hamming()+1);\n neighbors.add(sn);\n } else { \n if (!b.equals(this.getPredecessor().snBoard)) {\n SearchNode sn = new SearchNode(b,\n b.hamming(),\n this,\n b.manhattan(),\n this.moves+1);\n neighbors.add(sn);\n }\n }\n \n }\n return neighbors;\n }", "public boolean isEmpty()\r\n {\n return this.top == null;\r\n }", "public boolean isAdjacent(NodeTree location){\n return isAdjacent(this.head, location);\n }", "public boolean percolates(){\n \tif(this.gridLength == 1){\n \t\treturn isOpen(1,1);\n \t}\n \treturn (this.bottom[unionTest.find(0)]);\n }", "@Override\r\n\tpublic boolean isEmtpy() {\r\n\t\tif (this.front == -1) {\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 isFull(int i, int j) {\r\n\t\tif (i > N || i < 1)\r\n\t\t\tthrow new IndexOutOfBoundsException(\"row index i out of bounds\");\r\n\t\tif (j > N || j < 1)\r\n\t\t\tthrow new IndexOutOfBoundsException(\"column index j out of bounds\");\r\n\t\tint q = (i - 1) * N + (j - 1);\r\n\t\treturn uf.connected(N * N, q);\r\n\t}", "private void f0() \n\t{\n\t\tint elements = 0;\n\t\t\n\t\tfor(int i=0;i<f2.length;i++)\n\t\t{\n\t\t\tfor(int j=0;j<f2[0].length;j++)\n\t\t\t{\n\t\t\t\tif(f2[i][j])\n\t\t\t\t\telements++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(elements > 0){\n\t\t\tneighbors = new Neighbor[elements];\n\t\t\tint cy = (f2.length-1)/2; \n\t\t\tint cx = (f2[0].length-1)/2;\n\t\t\tint index=0;\n\t\t\t\n\t\t\tfor(int i=0;i<f2.length;i++)\n\t\t\t{\n\t\t\t\tfor(int j=0;j<f2[0].length;j++)\n\t\t\t\t{\n\t\t\t\t\tif(f2[i][j]){\n\t\t\t\t\t\tneighbors[index++] = new Neighbor(i-cy,j-cx);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//No elements i.e all elements are false in the neighborhood buffer.\n\t\t\tneighbors = null;\n\t\t}\n\t\t\t\n\t}", "public void checkCellStatus()\r\n {\r\n for (int columns = 0; columns < LOWER_BOUND; columns ++)\r\n {\r\n for (int rows = 0; rows < RIGHT_BOUND; rows ++)\r\n {\r\n checkNeighbours(rows, columns);\r\n } // end of for (int rows = 0; rows < RIGHT_BOUND; rows ++)\r\n } // end of for (int columns = 0; columns < LOWER_BOUND; columns ++)\r\n }", "public boolean hasNext(){\n return (index < nElem);\n }" ]
[ "0.7110008", "0.69223195", "0.66988826", "0.65311843", "0.6371466", "0.6358252", "0.62769794", "0.6269253", "0.6251037", "0.62377626", "0.61795866", "0.6172644", "0.61724555", "0.6092657", "0.6089833", "0.6087916", "0.6075481", "0.60726035", "0.60706586", "0.60526574", "0.60455006", "0.60417986", "0.60417956", "0.60339487", "0.6029368", "0.60293", "0.6025375", "0.60088795", "0.59665287", "0.59644604", "0.5961328", "0.59524685", "0.5951482", "0.59425724", "0.59372723", "0.59284526", "0.59162194", "0.59109366", "0.59082633", "0.5892687", "0.58710337", "0.58608466", "0.5855194", "0.5846839", "0.5844853", "0.5838355", "0.583432", "0.58279425", "0.581716", "0.5814259", "0.58130056", "0.5809705", "0.5809344", "0.57982427", "0.57961667", "0.57938313", "0.5781827", "0.57781917", "0.57723486", "0.5771584", "0.57631546", "0.5762477", "0.5746837", "0.574683", "0.5738404", "0.5735081", "0.57310045", "0.57289463", "0.572533", "0.572055", "0.57131964", "0.57129866", "0.57068187", "0.5705142", "0.5705131", "0.5693772", "0.5691851", "0.5687227", "0.5686882", "0.5685246", "0.56685334", "0.5667435", "0.5666715", "0.5661458", "0.5655161", "0.564524", "0.5631275", "0.56190854", "0.56183034", "0.56179696", "0.5613679", "0.5610344", "0.5607677", "0.5607599", "0.5602624", "0.56022364", "0.5599697", "0.5595169", "0.5592376", "0.55917674" ]
0.84457487
0
Tests if this is an interior element it has two neighbours.
public boolean isInterior() { if (this.eltZero != null && this.eltOne != null && this.eltTwo != null) return true; else return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean hasNeighbours() {\n\t\tif (this.eltZero != null || this.eltOne != null || this.eltTwo != null)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "public boolean interiorContains(int i, int j) {\n\t\treturn i > 0 && j > 0 && i < width() - 1 && j < height() - 1;\n\t}", "boolean isCellBelowNeighbor() {\r\n return this.neighbors.contains(new Cell(this.x, this.y + 1));\r\n }", "public boolean isNeighbour(Tile tile){\n int x1 = this.getX();\n int y1 = this.getY();\n\n int x2 = tile.getX();\n int y2 = tile.getY();\n return (x1 == x2 && (Math.abs(y1-y2) == 1)) || (y1 == y2 && (Math.abs(x1-x2) == 1));\n }", "public boolean hasNeighbour(int index) {\n\t\tswitch (index) {\n\t\tcase 0:\n\t\t\treturn this.eltZero != null;\n\t\tcase 1:\n\t\t\treturn this.eltOne != null;\n\t\tcase 2:\n\t\t\treturn this.eltTwo != null;\n\t\tdefault:\n\t\t\treturn false;\n\t\t}\n\t}", "public abstract boolean isInterior();", "boolean isCellRightNeighbor() {\r\n return this.neighbors.contains(new Cell(this.x + 1, this.y));\r\n }", "public boolean areAdjacent() {\n return areAdjacent;\n }", "public boolean isAdjecentWithCorners(Cell otherCell)\n\t{\n\t\treturn Math.abs(gridX - otherCell.getGridX()) <= 1 && Math.abs(gridY - otherCell.getGridY()) <= 1;\n\t}", "public boolean isInterior() {\n return true;\n }", "default boolean isEdge(int x, int y) {\n return getNeighbors(x).contains(y);\n }", "public boolean isAdjacentTo(final Vertex other){\n\t\tboolean result = false;\n\t\tif(getNeighbours().contains(other))\n\t\t\tresult = true;\n\t\treturn result;\n\t}", "public boolean boundaryContains(int i, int j) {\n\t\treturn !interiorContains(i, j);\n\t}", "public boolean isInterior() {\n return false;\n }", "private boolean hasTwo()\r\n\t\t{\r\n\t\t\treturn getLeftChild() != null && getRightChild() != null;\r\n\t\t}", "public boolean hasNeighbor(Tile tile) {\n if (tile == null) {\n return false;\n }\n\n return (this.tileNorth == tile || this.tileEast == tile || this.tileSouth == tile || this.tileEast == tile);\n }", "public abstract boolean hasEdge(int from, int to);", "private boolean isInside(int i, int j) {\n\t\tif (i < 0 || j < 0 || i > side || j > side)\n\t\t\treturn false;\n\t\treturn true;\n\t}", "default boolean isAdjacent(Interval other) {\n return getStart() == other.getEnd() || getEnd() == other.getStart();\n }", "public boolean isGameObjectInNeighbourhood(GameObject gO) {\n return Math.abs(this.getGridCoordinates().x - gO.getGridCoordinates().x) == 0 && Math.abs(this.getGridCoordinates().y - gO.getGridCoordinates().y) == 1 ||\n Math.abs(this.getGridCoordinates().x - gO.getGridCoordinates().x) == 1 && Math.abs(this.getGridCoordinates().y - gO.getGridCoordinates().y) == 0;\n }", "public boolean takesTwoCells() {\r\n\t\treturn takesTwoCells;\r\n\t}", "public boolean isInEdge(int width, int height, Position position);", "boolean hasIsBoundaryNodeOf();", "public boolean percolates(){\n\t\treturn unionFind.connected(virtualBottom, virtualTop);\n\t}", "public boolean isNeighbor(Cell cell){\n \tif((Math.pow(x - cell.getX(), 2) + (Math.pow(y - cell.getY(), 2)) <= 10* 10)){\n\t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n }", "public boolean percolates() {\n\t\treturn cellTree.connected(side * side, side * side + 1);\n\t}", "public boolean isAdjecent(Cell otherCell)\n\t{\n\t\treturn (Math.abs(gridX - otherCell.getGridX()) == 1 && Math.abs(gridY - otherCell.getGridY()) == 0)\n\t\t\t\t|| (Math.abs(gridX - otherCell.getGridX()) == 0 && Math.abs(gridY - otherCell.getGridY()) == 1);\n\t}", "public boolean clashingNeighbourCell(int connec){\n\t\tint thisCell = this.getANeigh();\n\n\t\tboolean ret = false;\n\n\t\tfor(ThresholdDataPoint neigh : getNeighbours(connec)){\n\t\t\tif(!neigh.getNeighbourCellBodies().isEmpty()){\n\t\t\t\tif(!neigh.isWatershed()){\n\t\t\t\t\tif(neigh.getANeigh() != thisCell){\n\t\t\t\t\t\tret = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}", "boolean isCellAlive(int x, int y);", "public void checkNeighbours(int row, int column)\r\n {\r\n int counter = 0;\r\n //*************************************************\r\n //Following code was adapted from Harry Tang 2015-04-27\r\n for (int columnNeighbours = column - 1; columnNeighbours <= column + 1; columnNeighbours ++)\r\n {\r\n for (int rowNeighbours = row - 1; rowNeighbours <= row + 1; rowNeighbours ++)\r\n {\r\n try \r\n {\r\n if (cellGrid[columnNeighbours][rowNeighbours].isAlive()\r\n && cellGrid[columnNeighbours][rowNeighbours] != cellGrid[column][row])\r\n {\r\n counter ++;\r\n }\r\n }\r\n catch (IndexOutOfBoundsException e)\r\n {\r\n // do nothing\r\n }\r\n } // end of for (int y = indexY - 1; y == indexY; y++)\r\n } // end of for (int x = indexX - 1; x == indexX; x++)\r\n //*************************************************\r\n \r\n decisionOnCellState(counter, row, column);\r\n }", "private boolean isNeighborAt(int x, int y, Assignment assignment){\n\t\tif(x >= 0 && x < this.dimension && y >= 0 && y < this.dimension)\n\t\t\tif(assignment.holds(this.board[x][y]))\n\t\t\t\treturn true;\n\n\t\treturn false;\n\t}", "public boolean canMove2() {\n\t\tGrid<Actor> gr = getGrid(); \n\t\tif (gr == null) {\n\t\t\treturn false; \n\t\t}\n\t\t\n\t\tLocation loc = getLocation(); \n\t\tLocation next = loc.getAdjacentLocation(getDirection());\n\t\tLocation next2 = next.getAdjacentLocation(getDirection());\n\t\tif (!gr.isValid(next)) {\n\t\t\treturn false;\n\t\t}\n\t\tif (!gr.isValid(next2)) {\n\t\t\treturn false;\n\t\t}\n\t\tActor neighbor = gr.get(next2); \n\t\treturn (neighbor == null) || (neighbor instanceof Flower); \n\t}", "private boolean isCorner(int x, int y)\n {\n return x-1 >= 0 && x+1 < LoadMap.MAPWIDTHINTILES && y-1 >= 0 && y+1 < LoadMap.MAPHEIGHTINTILES && (\n (connectedTiles[y][x+1] != null && (connectedTiles[y+1][x] != null || connectedTiles[y-1][x] != null))\n || (connectedTiles[y][x-1] != null && (connectedTiles[y+1][x] != null || connectedTiles[y-1][x] != null)));\n }", "public boolean[] hasNeighbor(Coord coord) {\n\t\t// first index repreests the vertical neighbors and the second\n\t\t// index represents the horizontal neighbors\n\t\tboolean[] hasAdj = new boolean[2];\n\t\tint r = coord.getRow();\n\t\tint c = coord.getCol();\n\t\t// check if a letter exists above or below the given coordinate\n\t\tif ((r - 1 >= 0 && board[r - 1][c].getLetter() != null)\n\t\t\t\t|| (r + 1 < len && board[r + 1][c].getLetter() != null))\n\t\t\thasAdj[0] = true;\n\t\t// check if a letter exists left or right of the given coordinate\n\t\tif ((c - 1 >= 0 && board[r][c - 1].getLetter() != null)\n\t\t\t\t|| (c + 1 < len && board[r][c + 1].getLetter() != null))\n\t\t\thasAdj[1] = true;\n\t\treturn hasAdj;\n\t}", "private boolean neighborIsBlank(SSheet sheet, int left, int right, int row, int col) {\n\t\tfor (int j = left; j <= right; ++j) {\n\t\t\tif (j == col) continue;\n\t\t\tfinal SCell c = sheet.getCell(row, j);\n\t\t\tif (!c.isNull() && c.getType() != CellType.BLANK) {\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\tCellRegion merged = sheet.getMergedRegion(row, j);\n\t\t\t\tif (merged != null) {\n\t\t\t\t\tint l = merged.getColumn();\n\t\t\t\t\tint t = merged.getRow();\n\t\t\t\t\tfinal SCell c0 = sheet.getCell(t, l);\n\t\t\t\t\tif (!c0.isNull() && c0.getType() != CellType.BLANK) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public boolean percolates() {\n if (openSitesCount < gridSize) {\n return false;\n }\n\n if (gridSize == 1 && openSitesCount == 1) {\n return true;\n }\n\n return wquf2.connected(virtualTopSiteIndex, virtualBottomSiteIndex);\n }", "private static boolean isCellAlive(int[][] coordinates, int row, int column) {\n\t\tboolean cellAlive = coordinates[row][column] == 1;\r\n\t\tint numberOfNeighbours = 0;\r\n\t\t//check one to the right of col\r\n\t\tif (coordinates[row].length > column + 1) {\r\n\t\t\tif (coordinates[row][column + 1] == 1) {\r\n\t\t\t\tnumberOfNeighbours++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//check one to the left of col\r\n\t\tif (coordinates[row].length > column - 1 && column - 1 >= 0) {\r\n\t\t\tif (coordinates[row][column - 1] == 1) {\r\n\t\t\t\tnumberOfNeighbours++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//check one above col\r\n\t\tif (coordinates.length > row - 1 && row - 1 >= 0) {\r\n\t\t\tif (coordinates[row - 1][column] == 1) {\r\n\t\t\t\tnumberOfNeighbours++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//check one below col\r\n\t\tif (coordinates.length > row + 1) {\r\n\t\t\tif (coordinates[row + 1][column] == 1) {\r\n\t\t\t\tnumberOfNeighbours++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//check one top left diagonal to col\r\n\t\tif (coordinates.length > row - 1 && coordinates[row].length > column - 1 && row - 1 >= 0 && column - 1 >= 0) {\r\n\t\t\tif (coordinates[row - 1][column - 1] == 1) {\r\n\t\t\t\tnumberOfNeighbours++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//check one top right diagonal to col\r\n\t\tif (coordinates.length > row - 1 && coordinates[row].length > column + 1 && row - 1 >= 0) {\r\n\t\t\tif (coordinates[row - 1][column + 1] == 1) {\r\n\t\t\t\tnumberOfNeighbours++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//check one bottom left diagonal to col\r\n\t\tif (coordinates.length > row + 1 && coordinates[row].length > column - 1 && column - 1 >= 0) {\r\n\t\t\tif (coordinates[row + 1][column - 1] == 1) {\r\n\t\t\t\tnumberOfNeighbours++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//check one bottom right diagonal to col\r\n\t\tif (coordinates.length > row + 1 && coordinates[row].length > column + 1) {\r\n\t\t\tif (coordinates[row + 1][column + 1] == 1) {\r\n\t\t\t\tnumberOfNeighbours++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t System.out.println(\"Number of neighbours for \" + row + \", \" + column\r\n\t\t + \" was \" + numberOfNeighbours);\r\n\t\t//if the number of neighbours was 2 or 3, the cell is alive\r\n\t\tif ((numberOfNeighbours == 2) && cellAlive) {\r\n\t\t\treturn true;\r\n\t\t} else if (numberOfNeighbours == 3) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean hasBlockAdjacent(int x, int y) {\n\t\treturn \tgetBlock(x, y + 1).canBePlaced(Direction.DOWN, 0, x, y + 1, this) || \n\t\t\tgetBlock(x, y - 1).canBePlaced(Direction.UP, 0, x, y - 1, this) || \n\t\t\tgetBlock(x + 1, y).canBePlaced(Direction.LEFT, 0, x + 1, y, this) || \n\t\t\tgetBlock(x - 1, y).canBePlaced(Direction.RIGHT, 0, x - 1, y, this);\n\t}", "private boolean isInsideBoard(int i, int j) {\n return i >= 0 && i < BOARD_WIDTH && j >= 0 && j < BOARD_HEIGHT\n && mapCells[j][i] != 0;\n }", "public boolean isFull(int i, int j) {\n if (!checkIndex(i, j))\n throw new IndexOutOfBoundsException(\"invalid index i or j for grid site\");\n int idx = xyTo1D(i, j);\n // is virtual top site connected to this site\n //return mUnionFind.connected(0, idx);\n return mUnionFind.find(0) == mUnionFind.find(idx);\n\n }", "public boolean isOvert() {\n\t\t// Even columns indices are overts in the upper half of the board\n\t\treturn (row + column) % 2 != 0;\n\t}", "public boolean isAdjacentTo(StandardCoordinate where) {\n\t\treturn where.getAdjacencyList().contains(this);\n\t}", "private static Boolean checkForContinuousConnectivity()\n\t{\n\t\tint row=0;\n\t\tint column=0;\n\t\tBoolean floorFound=false;\n\n\t\tfor(int i=0; i<board.length; i++)\n\t\t{\n\t\t\tfor(int j=0; j<board[i].length; j++)\n\t\t\t{\n\t\t\t\tif(board[i][j]==Cells.FLOOR)\n\t\t\t\t{\n\t\t\t\t\trow=i;\n\t\t\t\t\tcolumn=j;\n\t\t\t\t\tfloorFound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (floorFound)\n\t\t\t\tbreak;\n\t\t}\n\n\t\tfor(int i=0; i<board.length; i++)\n\t\t{\n\t\t\tfor(int j=0; j<board[i].length; j++)\n\t\t\t{\n\t\t\t\tif(board[i][j]==Cells.FLOOR && !(_PF.canFindAWay(column, row, j, i)))\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "public boolean isConnectedPort() {\n for (Tile t : getTile().getSurroundingTiles(1)) {\n if (!t.isLand() && t.isHighSeasConnected()) return true;\n }\n return false;\n }", "public Boolean adjacentShipCheck(int i, int j) {\r\n\t\tBoolean shipPresence = false;\r\n\t\tint m, n;\r\n\t\tint[] ith = { 0, 1, 1, -1, 0, -1, -1, 1 };\r\n\t\tint[] jth = { 1, 0, 1, 0, -1, -1, 1, -1 };\r\n\t\tfor (int k = 0; k < 8; k++) {\r\n\t\t\tm = i + ith[k];\r\n\t\t\tn = j + jth[k];\r\n\t\t\tif (isValid(i + ith[k], j + jth[k])) {\r\n\t\t\t\tif (randomGrid[m][n] == 1) {\r\n\t\t\t\t\tshipPresence = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn shipPresence;\r\n\t}", "public boolean hasEdge(int i,int j){\n return Matrix[i][j];\n }", "public boolean percolates(){\n return uf.connected(ufSize - 2, ufSize - 1);\n }", "public boolean isNeighbour(Territory territory) {\n\t\tfor (Territory neighbour : neighbours) {\n\t\t\tif (neighbour.territoryID == territory.territoryID) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean percolates() {\n\t\tint top = uf.find(0);\n\t\tint bottom = uf.find(size * size + 1);\n\t\treturn top == bottom;\n\t}", "public boolean isEdge(int i,int j){\r\n\t\treturn matrix[i][j]!=0;\r\n\t}", "public boolean percolates() {\n return unionFind.connected(topRoot, bottomRoot);\n }", "boolean isDrawInterior(DrawContext dc, Object shape);", "public abstract boolean isOneCell();", "private boolean hasAdjacent(int node) {\n for (int i = 0; i < this.matrix[node].length; i++) {\n if (this.matrix[node][i]) {\n return true;\n }\n\n }\n return false;\n }", "public boolean percolates() {\n return mainUnion.connected(virtualTopId, virtualBottomId);\n }", "public boolean percolates(){\n \tif(this.gridLength == 1){\n \t\treturn isOpen(1,1);\n \t}\n \treturn (this.bottom[unionTest.find(0)]);\n }", "private boolean isInnerNode(WAVLNode x) {\n \t\tif(x.left!=EXT_NODE&&x.right!=EXT_NODE) {\r\n \t\t\treturn true;\r\n \t\t}\r\n \t\treturn false;\r\n \t}", "@JsMethod(name = \"interiorContainsPoint\")\n public boolean interiorContains(double p) {\n return p > lo && p < hi;\n }", "private boolean checkSurroundedByWalls(int x, int y) {\n \n int neighborsCount = 0;\n \n if (x > 0) {\n \n if (!gameboard.checkIfSquareIsEmpty(x - 1, y) &&\n gameboard.getObjectAtSquare(x - 1, y, 0).isType(\"wall\")){\n \n neighborsCount++;\n \n }\n \n }\n \n if (x < gameboard.getSize()) {\n \n if (!gameboard.checkIfSquareIsEmpty(x + 1, y) &&\n gameboard.getObjectAtSquare(x + 1, y, 0).isType(\"wall\")){\n \n neighborsCount++;\n \n }\n \n }\n \n if (y > 0) {\n \n if (!gameboard.checkIfSquareIsEmpty(x, y - 1) &&\n gameboard.getObjectAtSquare(x, y - 1, 0).isType(\"wall\")){\n \n neighborsCount++;\n \n }\n \n }\n \n if (y < gameboard.getSize()) {\n \n if (!gameboard.checkIfSquareIsEmpty(x, y + 1) &&\n gameboard.getObjectAtSquare(x, y + 1, 0).isType(\"wall\")){\n \n neighborsCount++;\n \n }\n \n }\n \n return neighborsCount == 4;\n \n }", "public boolean isWatershed(){\n\t\tif(getNeighbourCellBodies().size() > 1){\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean percolates() {\n return backwashQuickUnion.connected(virtualTop, virtualBottom);\n }", "private boolean adjacent(Location a, Location b)\n {\n for (Location loc: getAdjacentLocations(a))\n {\n if (loc.equals(b))\n return true;\n }\n return false;\n }", "public boolean isBipartite(){\n int pos = 0;// two colors 1 and 0\n return colorGraph(pos,1);\n }", "private ArrayList<BooleanProperty> checkSurroundings(int layoutX, int layoutY) {\n\n ArrayList<BooleanProperty> neighbors = new ArrayList<>();\n BooleanProperty[][] gameCells = controller.getGameCells();\n\n for (int i = layoutX - 1; i <= layoutX + 1; i++) {\n for (int j = layoutY - 1; j <= layoutY + 1; j++) {\n\n if (!(i == layoutX && j == layoutY)) {\n if (i < gameCells.length && i > -1 && j < gameCells[i].length && j > -1 && gameCells[i][j].get()) {\n neighbors.add(gameCells[i][j]);\n }\n }\n }\n }\n return neighbors;\n }", "public boolean percolates()\n {\n return uf.connected(topVirtualSite, bottomVirtualSite);\n }", "private boolean hasANonneighbourInX(Graph<V, E> g, V v, Set<V> X)\n {\n return X.stream().anyMatch(x -> !g.containsEdge(v, x));\n }", "public boolean hasCollided(float _x, float _y, float _width, float _height) \r\n {\n\t \t \tfloat leftA = _x;\r\n\t \t \tfloat rightA = _x + _width;\r\n\t \t \tfloat topA = _y;\r\n\t \t \tfloat bottomA = _y + _height;\r\n\t \t \r\n\t \t //Calculate the sides of leaf\r\n\t \t \tfloat leftB = x;\r\n\t \t \tfloat rightB = x + width;\r\n\t \t \tfloat topB = y;\r\n\t \t \tfloat bottomB = y + height;\r\n\t \t \r\n\t\r\n\t \t //If any of the sides from A are outside of B\r\n\t \t if( bottomA <= topB || topA >= bottomB || rightA <= leftB || leftA >= rightB)\r\n\t \t {\r\n\t \t return false;\r\n\t \t }\r\n\t \t else\r\n\t \t {\r\n\t \t \t//If none of the sides from A are outside B\r\n\t \t \treturn true;\r\n\t \t }\r\n\t\r\n\t \t \r\n\t \r\n \t \t\r\n }", "public boolean isAdjacent(int firstID, int secondID) {\n\t\tfor( int i : Constants.ADJACENT[firstID]) {\n\t\t\tif(i == secondID)\n\t\t\t\treturn true;\n\t\t}\t\n\t\treturn false;\n\t}", "boolean checkCreatureInAdjacentCells(CreatureType creatureType);", "public boolean percolates() {\n if (mGridSize == 1 && !isOpen(1, 1))\n return false;\n //return mUnionFind.connected(0, mGridSize * mGridSize + 1);\n return mUnionFind.find(0) == mUnionFind.find(mGridSize * mGridSize + 1);\n\n }", "public boolean isEdge(int i, int j) {\n\t\n\treturn\n\t\t((Linkable)Network.node[i].getProtocol(protocolID)\n\t\t).contains(Network.node[j]) &&\n\t\tNetwork.node[j].isUp() &&\n\t\tNetwork.node[i].isUp();\n}", "public boolean neighborOf(Index other, int dist) {\n\t \t\t\n\t \t\tassert(dist >= 0);\n\t \t\n\t \t\treturn Math.abs(other.i - this.i) <= dist && Math.abs(other.j - this.j) <= dist;\n\t \t}", "public abstract boolean isConnected(N n1, E e, N n2);", "public boolean areAdjacent(Position vp, Position wp) throws InvalidPositionException;", "private static boolean checkOutside(float [][] myBox, float[][] otherBox)\n {\n vloop:\n for (int v = 0; v < 4; v++)\n {\n int v1 = (v + 1) & 3; // wrap at 4 back to 0\n float edgeX = myBox[v][0] - myBox[v1][0];\n float edgeY = myBox[v][1] - myBox[v1][1];\n float reX = -edgeY;\n float reY = edgeX;\n \n if (reX == 0.0 && reY == 0.0)\n {\n continue vloop;\n }\n \n for (int e = 0; e < 4; e++)\n {\n float scalar = reX * (otherBox[e][0] - myBox[v1][0])\n + reY * (otherBox[e][1] - myBox[v1][1]);\n if (scalar < 0)\n {\n continue vloop;\n }\n }\n \n // If we got here, we have an edge with all vertexes from the\n // other rect on the outside:\n return true;\n }\n \n return false;\n }", "private boolean overlappingGateways(BpmnShape s1, BpmnShape s2) {\n\t\tdouble firstHeight = s1.getBounds().getHeight() / 2;\n\t\tdouble firstWidth = s1.getBounds().getWidth() / 2;\n\t\tdouble firstX = s1.getBounds().getX() + firstWidth;\n\t\tdouble firstY = s1.getBounds().getY() + firstHeight;\n\t\tdouble firstApothem = (s1.getBounds().getHeight() * Math.sqrt(2)) / 2;\n\n\t\tdouble secondWidth = s2.getBounds().getWidth() / 2;\n\t\tdouble secondHeight = s2.getBounds().getHeight() / 2;\n\t\tdouble secondX = s2.getBounds().getX();\n\t\tdouble secondY = s2.getBounds().getY() + secondHeight;\n\t\tdouble secondApothem = (s2.getBounds().getHeight() * Math.sqrt(2)) / 2;\n\t\t\n\t\tif (firstX > secondX && firstY > secondY){\n\t\t\tif ((firstX - firstWidth < secondX + secondWidth && firstY - firstHeight < secondY + secondHeight) &&\n\t\t\t\t(firstX - firstApothem < secondX + secondApothem || firstY - firstApothem < secondY + secondApothem))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX > secondX && firstY < secondY){\n\t\t\tif ((firstX - firstWidth < secondX + secondWidth && firstY + firstHeight > secondY - secondHeight) &&\n\t\t\t\t(firstX - firstApothem < secondX + secondApothem || firstY + firstApothem > secondY - secondApothem))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY > secondY){\n\t\t\tif ((firstX + firstWidth > secondX - secondWidth && firstY - firstHeight < secondY + secondHeight) &&\n\t\t\t\t(firstX + firstApothem > secondX - secondApothem || firstY - firstApothem < secondY + secondApothem))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY < secondY){\n\t\t\tif ((firstX - firstWidth < secondX + secondWidth && firstY + firstHeight > secondY - secondHeight) &&\n\t\t\t\t(firstX - firstApothem < secondX + secondApothem || firstY + firstApothem > secondY - secondApothem))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX == secondX && firstY == secondY)\n\t\t\t\treturn true;\n\t\t\n\t\tif (firstX == secondX && firstY > secondY){\n\t\t\tif (firstY - firstHeight < secondY + secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX > secondX && firstY == secondY){\n\t\t\tif (firstX - firstWidth < secondX + secondWidth)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX == secondX && firstY < secondY){\n\t\t\tif (firstY + firstHeight > secondY - secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY == secondY){\n\t\t\tif (firstX + firstWidth > secondX - secondWidth)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\treturn false;\n\t}", "public boolean isInBoundaries() {\n\t return Referee.playfield.isInBoundaries(this);\n }", "public boolean percolates() {\n return myUF.connected(n*n, n*n + 1);\n }", "public static boolean areAdjacent(HantoCoordinate from, HantoCoordinate to){\n\n\t\treturn HantoUtil.getAllNeighbors(from).contains(to);\n\t}", "private boolean isCrossroad(int x, int y)\n {\n byte count = 0;\n count += x + 1 < LoadMap.MAPWIDTHINTILES ? (connectedTiles[y][x + 1] != null ? 1 : 0) : 0;\n count += x - 1 >= 0 ? (connectedTiles[y][x - 1] != null ? 1 : 0) : 0;\n count += y + 1 < LoadMap.MAPHEIGHTINTILES ? (connectedTiles[y + 1][x] != null ? 1 : 0) : 0;\n count += y - 1 >= 0 ? (connectedTiles[y - 1][x] != null ? 1 : 0) : 0;\n return count > 2;\n }", "public abstract boolean getEdge(Point a, Point b);", "public boolean percolates() {\n return uf.connected(n*n, n*n+1);\r\n }", "boolean isThereNeighborIntersection(int nEntry, int nExit, int W, int H){\n\n int[] entryNeighbors = new int[4];\n\n for(int i = 0; i < H; i++){\n if(nEntry == i*W)\n entryNeighbors[0] = -1;\n if(nEntry == i*W + W-1)\n entryNeighbors[1] = -1;\n }\n\n if(entryNeighbors[0] != -1)\n entryNeighbors[0] = nEntry - 1;\n\n if(entryNeighbors[1] != -1)\n entryNeighbors[1] = nEntry + 1;\n\n entryNeighbors[2] = nEntry - W;\n entryNeighbors[3] = nEntry + W;\n \n\n int[] exitNeighbors = new int[4];\n\n for(int i = 0; i < H; i++){\n if(exit == i*W)\n exitNeighbors[0] = -1;\n if(exit == i*(W+1) -1)\n exitNeighbors[1] = -1;\n }\n\n if(nExitNeighbors[0] != -1)\n exitNeighbors[0] = nExit - 1;\n\n if(nExitNeighbors[1] != -1)\n exitNeighbors[1] = nExit + 1;\n\n exitNeighbors[2] = nExit - W;\n exitNeighbors[3] = nExit + W;\n\n\n for(int i = 0; i < 4; i++)\n for(int j = 0; j < 4; j++)\n if( entryNeighbors[i] == exitNeighbors[j] && entryNeighbors[i] > 0 )\n return true;\n }", "@Override\r\n public boolean collocated(Space other) {\r\n return this.row == other.getRow() &&\r\n this.col == other.getCol();\r\n }", "@DisplayName(\"Has neighbours?\")\n @Test\n public void testGetNeighbours() {\n Assertions.assertTrue(graph.getNeighbours(0).size() > 1);\n }", "public boolean percolates(){\n\t //special case for n=1:\n\t if(n==1 && numOpen==0){\n\t return false;\n\t }\n\t //this seems very inefficient.. maybe fix\n\t //way to prevent backwash\n\t for(int i= (n*n -n)+1; i <= n*n; i++){\n\t if(grid.connected(0, i)){\n\t return true;\n\t }\n\t }\n\t\treturn false;\n\t}", "public boolean percolates() {\n if (grid.length == 1) {\n return isOpen(1, 1);\n }\n return uf.find(grid.length * grid.length) == uf.find(grid.length * grid.length + 1);\n }", "public abstract boolean isConnectedInDirection(N n1, N n2);", "public abstract boolean isOutOfBounds(int x, int y);", "public boolean isFull(int i, int j) {\n if (i <= 0 || i > siteDepth || j <= 0 || j > siteDepth)\n throw new IndexOutOfBoundsException();\n\n int element = ((i-1)*siteDepth) + (j-1) + 1;\n\n if (wufFull.connected(element, virtTop))\n return true;\n\n return false;\n }", "public void checkCellStatus()\r\n {\r\n for (int columns = 0; columns < LOWER_BOUND; columns ++)\r\n {\r\n for (int rows = 0; rows < RIGHT_BOUND; rows ++)\r\n {\r\n checkNeighbours(rows, columns);\r\n } // end of for (int rows = 0; rows < RIGHT_BOUND; rows ++)\r\n } // end of for (int columns = 0; columns < LOWER_BOUND; columns ++)\r\n }", "public boolean isFull(int i, int j){\n \tif(i<=0 || i>this.gridLength || j<=0 || j>this.gridLength){\n\t\t\tthrow new IndexOutOfBoundsException();\n\t\t}\n \tif(isOpen(i, j)){\n \t\treturn unionTest.connected(0, (i-1)*this.gridLength + j);\n \t}\n \treturn false;\n }", "public boolean isFull(int i, int j) {\n\t\tvalidate(i, j);\n\t\treturn linearGridNoBackwash.connected(0, xyTo1D(i, j));\n\t}", "private boolean subGridCheck() {\n\t\tint sqRt = (int)Math.sqrt(dimension);\n\t\tfor(int i = 0; i < sqRt; i++) {\n\t\t\tint increment = i * sqRt;\n\t\t\tfor(int val = 1; val <= dimension; val++) {\n\t\t\t\tint valCounter = 0;\n\t\t\t\tfor(int row = 0 + increment; row < sqRt + increment; row++) {\n\t\t\t\t\tfor(int col = 0 + increment; col < sqRt + increment; col++) {\n\t\t\t\t\t\tif(puzzle[row][col] == val)\n\t\t\t\t\t\t\tvalCounter++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(valCounter >= 2)\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public final boolean checkIfInZone(int x, int y) { return (getSiege(x, y) != null); }", "public abstract boolean isConnectedInDirection(N n1, E edgeValue, N n2);", "public boolean percolates() {\n\t\treturn linearGrid.connected(0, 1);\n\t}", "private boolean isInBounds(int i, int j)\n {\n if (i < 0 || i > size-1 || j < 0 || j > size-1)\n {\n return false;\n }\n return true;\n }", "public boolean needsNeighborhood()\r\n\t{\r\n\t\treturn m_needsNeighborhood;\t\r\n\t}", "private boolean hasTwoChildren(int i) {\n\t\tint left=left(i);\n\t\tint right=right(i);\n\t\tint sizee=heap.size();\n\t\tif(left<sizee-1 && right<sizee-1){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}" ]
[ "0.7907969", "0.7149168", "0.69235855", "0.6737603", "0.67119145", "0.66904026", "0.65910655", "0.6409039", "0.63860786", "0.6379816", "0.63522476", "0.62935257", "0.6211575", "0.6197488", "0.61307424", "0.61187345", "0.6108418", "0.608919", "0.6074662", "0.60740334", "0.60617816", "0.60515827", "0.6049396", "0.6037625", "0.60326946", "0.5997121", "0.5997068", "0.5979915", "0.5959631", "0.5945271", "0.594315", "0.5941762", "0.5920846", "0.5918845", "0.59098434", "0.58967006", "0.58831537", "0.5873356", "0.5852704", "0.58326656", "0.58267194", "0.5811349", "0.5804568", "0.5800352", "0.57893103", "0.5786", "0.5784111", "0.5778826", "0.577044", "0.57629687", "0.575399", "0.57522917", "0.5748169", "0.5739912", "0.57302195", "0.5727793", "0.57245034", "0.5703285", "0.5702384", "0.5692949", "0.5667135", "0.56620944", "0.5656266", "0.5653406", "0.56509936", "0.5648738", "0.5648308", "0.5646519", "0.56422496", "0.563831", "0.56175363", "0.5616347", "0.56140697", "0.56123096", "0.5595978", "0.5594138", "0.5593404", "0.55895853", "0.558872", "0.55816054", "0.55740404", "0.55739444", "0.5572436", "0.55719", "0.5557957", "0.5553461", "0.5550273", "0.554882", "0.55484414", "0.5547869", "0.55472946", "0.55416745", "0.5537515", "0.5519277", "0.55166286", "0.5514094", "0.5513847", "0.5510887", "0.55088705", "0.55023605" ]
0.7612845
1
Sets the neighbour for the given index. Index 0 neighbour opposite to P0, Index 1 neighbour opposite to P1, Index 2 neighbour opposite to P2.
public boolean setNeighbour(int index, TriangleElt3D element) { switch (index) { case 0: this.eltZero = element; return true; case 1: this.eltOne = element; return true; case 2: this.eltTwo = element; return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void changingNeighbor() {\n }", "public void flipIndexes() {\n int temp = index1;\n index1 = index2;\n index2 = temp;\n }", "public void toggleChosenState(int index) {\n\n for (int i = 0; i < cells.size(); i++) {\n if (cells.get(i) == CellState.Chosen) {\n cells.set(i, CellState.Tower);\n }\n }\n cells.set(index, CellState.Chosen);\n }", "private void setNeighbors() {\n\t\tfor (int i = 0; i < getNumRows(); i++) {\n\t\t\tfor (int j = 0; j < getNumCols(); j++) {\n\t\t\t\tCell c = getCurrentGrid()[i][j];\n\t\t\t\tsetNeighborsForCell(c);\n\t\t\t}\n\t\t}\n\t}", "protected void alter_for_neighbour_switch() {\n\t\tint this_l, tother_l, ns_i, ns_j, ns_n;\n\t\t\n\t\t// Let the user know...\n\t\tSystem.out.println(\" H THIS IS IN N_SWITCH (nn comparison) mode, for structure \"+INIT_NPHASE);\n\t\tSystem.out.println(\" H en_shift = \"+EN_SHIFT);\n\t\t\n\t\t// Check that there is room at the inn:\n\t\tif( n > MAX_NNS ) {\n\t\t\tthrow( new LSSimException(LSSimException.PARAM,\n\t\t\t\"neighbour switch needs \"+n+\" neighbours in MAX_NNS!\\n\"));\n\t\t}\n\t\t\n\t\t// Make both structures the same:\n\t\tthis_l = INIT_NPHASE;\n\t\ttother_l = 1 - this_l;\n\t\tfor( ns_i = 0; ns_i < n; ns_i++ ) {\n\t\t\tlatt[tother_l][ns_i].x = latt[this_l][ns_i].x;\n\t\t\tlatt[tother_l][ns_i].y = latt[this_l][ns_i].y;\n\t\t\tlatt[tother_l][ns_i].z = latt[this_l][ns_i].z;\n\t\t\t// copy nn lists as well!\n\t\t\tns_n = 0; ns_j = nns[this_l][ns_i][ns_n];\n\t\t\twhile ( ns_j != NO_MORE_NNS ) {\n\t\t\t\tnns[tother_l][ns_i][ns_n] = nns[this_l][ns_i][ns_n];\n\t\t\t\tns_n++; ns_j = nns[this_l][ns_i][ns_n];\n\t\t\t}\n\t\t\tnns[tother_l][ns_i][ns_n] = NO_MORE_NNS;\n\t\t}\n\t\t\n\t\t// Alter the neighbour list for structure 1;\n\t\tmake_it_order_n_squared(1);\n\t}", "public void setAdj(Tile adjTile, int sideIndex){\r\n adjTiles[sideIndex] = adjTile;\r\n }", "public void swap(int index1, int index2)\n\t{\n\t\tthis.grid.swap(index1, index2);\n\t}", "private void addNeighbours(int index, int[] neighbours, List<Box> boxes){\n index=index - 1;\n for(int neighbour : neighbours) {\n neighbour=neighbour-1;\n boxes.get(index).addNeighbours(boxes.get(neighbour));\n }\n }", "public void kill(int index) {\n\t\tint currentIndex = index;\t\t\t\t\t\t\t\t\t\t\t\t\t\t//start with random cell\n\t\t\n\t\twhile(true) {\n\t\t\tcells[currentIndex].visited = true;\n\t\t\n\t\t\tint nextIndex = getRandomUnvisitedNeighbourIndex(currentIndex);\n\t\t\n\t\t\tif(nextIndex == NOT_EXIST) {\n\t\t\t\thunt(); \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//if there is NO neighbors [DEAD END]\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse if(currentIndex - nextIndex == -1) {\n\t\t\t\tcells[currentIndex].border[EAST] = NO_WALL; \t\t\t\t\t\t\t//neighbor is on the right \n\t\t\t\tcells[nextIndex].border[WEST] = NO_WALL;\n\t\t\t}\n\t\t\telse if(currentIndex - nextIndex == width) {\n\t\t\t\tcells[currentIndex].border[NORTH] = NO_WALL;\t\t\t\t\t\t\t//neighbor is up\n\t\t\t\tcells[nextIndex].border[SOUTH] = NO_WALL;\n\t\t\t}\n\t\t\telse if(currentIndex - nextIndex == -width) {\t\t\t\t\t\t\t\t\n\t\t\t\tcells[currentIndex].border[SOUTH] = NO_WALL;\t\t\t\t\t\t\t//neighbor is down\n\t\t\t\tcells[nextIndex].border[NORTH] = NO_WALL;\n\t\t\t}\n\t\t\telse if(currentIndex - nextIndex == 1) {\t\t\t\t\t\t\t\t\t\n\t\t\t\tcells[currentIndex].border[WEST] = NO_WALL;\t\t\t\t\t\t\t\t//neighbor is left\n\t\t\t\tcells[nextIndex].border[EAST] = NO_WALL;\n\t\t\t}\n\t\t\tcurrentIndex = nextIndex;\n\t\t}\n\t}", "public void setIndexNextBoard(int index) throws IllegalArgumentException;", "public void setNeighbors(){\t\t\t\t\n\t\tint row = position[0];\n\t\tint column = position[1];\t\t\n\t\tif(column+1 < RatMap.SIDELENGTH){\n\t\t\teastCell = RatMap.getMapCell(row,column+1);\t\t\t\n\t\t}else{\n\t\t\teastCell = null;\n\t\t}\t\n\t\tif(row+1 < RatMap.SIDELENGTH){\n\t\t\tnorthCell = RatMap.getMapCell(row+1,column);\n\t\t}else{\n\t\t\tnorthCell = null;\n\t\t}\t\n\t\tif(column-1 > -1){\n\t\t\twestCell = RatMap.getMapCell(row, column-1);\t\t\t\n\t\t}else{\n\t\t\twestCell = null;\n\t\t}\n\t\tif(row-1 > -1){\n\t\t\tsouthCell = RatMap.getMapCell(row-1, column);\n\t\t}else{\n\t\t\tsouthCell = null;\n\t\t}\n\t}", "public abstract int getNeighboursNumber(int index);", "private void _setPoint(int index, DataPoint point) {\n ntree.set(index, point);\n ensureDistances();\n }", "protected void setNeighbours(Cell[] neighbours) throws IllegalArgumentEvent {\r\n\t\tif(neighbours.length != 6){\r\n\t\t\tthrow new IllegalArgumentEvent(\"incorrect number of neighbours\");\r\n\t\t}\r\n\t\tthis.neighbours = neighbours;\r\n\t}", "public void setIndex(int index) { this.index = index; }", "@Override\n protected KPMPSolution nextNeighbour() {\n List<KPMPSolutionWriter.PageEntry> edgePartition = bestSolution.getEdgePartition().stream().map(KPMPSolutionWriter.PageEntry::clone).collect(toCollection(ArrayList::new));\n KPMPSolution neighbourSolution = new KPMPSolution(bestSolution.getSpineOrder(), edgePartition, bestSolution.getNumberOfPages());\n edge = edgePartition.get(index);\n originalPageIndex = edge.page;\n newPageIndex = pageCounter;\n edgePartition.get(index).page = newPageIndex;\n index++;\n numberOfIterations++;\n return neighbourSolution;\n }", "public void set(int index, GPoint point) {\n\t\tif (index == points.size()) {\n\t\t\tpoints.add(new GPoint(point));\n\t\t} else {\n\t\t\tpoints.get(index).set(point);\n\t\t}\n\t}", "public void setNeighbor(Directions dir, Field neighbor){\n neighbors[dir.ordinal()] = neighbor;\n }", "public abstract LinkedList<Integer> getNeighbours(int index);", "public abstract void setIndex(int i, boolean b);", "void setIdx(int i);", "private void setIndex(int index){\n\t\tthis.index = index;\n\t}", "public void setPindex(Integer pindex) {\n this.pindex = pindex;\n }", "public void setPindex(Integer pindex) {\n this.pindex = pindex;\n }", "public void setIndex(int index) {\n nativeSetDCChangeSpeedLevel2Index(index);\n }", "public void setNeighbours(ArrayList<ThresholdDataPoint> neighbours, int connec) {\n\t\tif(connec == 8){\n\t\t\tthis.eightNeighbours = neighbours;\n\t\t} else if(connec == 4){\n\t\t\tthis.fourNeighbours = neighbours;\n\t\t} else {\n\t\t\tthrow new IllegalArgumentException(\"Invalid number of neighbours\");\n\t\t}\n\t}", "public void setPindex(Integer pindex) {\n\t\tthis.pindex = pindex;\n\t}", "private void setNeighbors()\r\n {\r\n for (int x = 0; x < length+2; ++x)\r\n {\r\n for (int y = 0; y < width+2; ++y)\r\n {\r\n // North\r\n if (!this.board[x][y].northwall)\r\n {\r\n this.board[x][y].neighbors.add(this.board[x][y-1]);\r\n }\r\n // South\r\n if (!this.board[x][y].southwall)\r\n {\r\n this.board[x][y].neighbors.add(this.board[x][y+1]);\r\n }\r\n // East\r\n if (!this.board[x][y].eastwall)\r\n {\r\n this.board[x][y].neighbors.add(this.board[x+1][y]);\r\n }\r\n // West\r\n if (!this.board[x][y].westwall)\r\n {\r\n this.board[x][y].neighbors.add(this.board[x-1][y]);\r\n }\r\n }\r\n }\r\n }", "public void setIndex(int index){\r\n \tthis.index = index;\r\n }", "private void swap(int index1, int index2){\r\n ListNode c = head;\r\n ListNode swapNode = head;\r\n \r\n E tmp = null, tmp1 = null;\r\n \r\n for(int i = 0; i < index1; i++) c = c.getLink();\r\n tmp = (E) c.getData();\r\n \r\n for(int i = 0; i < index2; i++) swapNode = swapNode.getLink();\r\n tmp1 = (E) swapNode.getData();\r\n c.setData(tmp1);\r\n swapNode.setData(tmp);\r\n }", "public void set_neighbors(Cell[] neighbors)\n\t{\n\t\tthis.neighbors = neighbors;\n\t}", "protected void ReplaceIndividual(int index) {\r\n \r\n Individual newInd, oldInd;\r\n \r\n oldInd = this.P.get(index);\r\n\r\n double[] features = new double[this.D];\r\n for(int j = 0; j < this.D; j++){\r\n features[j] = this.rndGenerator.nextDouble(this.f.min(this.D), this.f.max(this.D));\r\n } \r\n newInd = new Individual(oldInd.id, features, this.f.fitness(features));\r\n this.isBest(newInd);\r\n this.isActualBest(newInd);\r\n this.P.remove(index);\r\n this.P.add(index, newInd);\r\n this.FES++;\r\n this.writeHistory();\r\n \r\n }", "public void setNeighbour(Direction direction, Room neighbour) {\r\n\t\tthis.neighbours.put(direction, neighbour);\r\n\t\tthis.doors.put(direction, (Boolean) (neighbour != null));\r\n\t}", "public void setIndex(int index) {\n _index = index;\n }", "public boolean hasNeighbour(int index) {\n\t\tswitch (index) {\n\t\tcase 0:\n\t\t\treturn this.eltZero != null;\n\t\tcase 1:\n\t\t\treturn this.eltOne != null;\n\t\tcase 2:\n\t\t\treturn this.eltTwo != null;\n\t\tdefault:\n\t\t\treturn false;\n\t\t}\n\t}", "public void setNeighbors(Cell n, Cell s, Cell w, Cell e) {\n setNeiNorth(n);\n setNeiSouth(s);\n setNeiWest(w);\n setNeiEast(e);\n }", "public void setInterFlag(int index, boolean value){\r\n\t\tif (index < 0 || index >= this.interVec.length)\r\n\t\t\t;\r\n\t\telse\r\n\t\t\tthis.interVec[index] = value;\r\n\t}", "public void updateNeighbours(int i) {\n if (currentState[i] != 0) {\n int ix0 = (i - STEPX) & MASKX;\n int iy0 = (i - STEPY) & MASKY;\n int iz0 = (i - STEPZ) & MASKZ;\n\n int ix1 = (i) & MASKX;\n int iy1 = (i) & MASKY;\n int iz1 = (i) & MASKZ;\n\n int ix2 = (i + STEPX) & MASKX;\n int iy2 = (i + STEPY) & MASKY;\n int iz2 = (i + STEPZ) & MASKZ;\n\n ++nextState[ix0 | iy0 | iz0];\n ++nextState[ix0 | iy0 | iz1];\n ++nextState[ix0 | iy0 | iz2];\n ++nextState[ix0 | iy1 | iz0];\n ++nextState[ix0 | iy1 | iz1];\n ++nextState[ix0 | iy1 | iz2];\n ++nextState[ix0 | iy2 | iz0];\n ++nextState[ix0 | iy2 | iz1];\n ++nextState[ix0 | iy2 | iz2];\n\n ++nextState[ix1 | iy0 | iz0];\n ++nextState[ix1 | iy0 | iz1];\n ++nextState[ix1 | iy0 | iz2];\n ++nextState[ix1 | iy1 | iz0];\n\n //!\t\t++nextState[ix1|iy1|iz1];\n ++nextState[ix1 | iy1 | iz2];\n ++nextState[ix1 | iy2 | iz0];\n ++nextState[ix1 | iy2 | iz1];\n ++nextState[ix1 | iy2 | iz2];\n\n ++nextState[ix2 | iy0 | iz0];\n ++nextState[ix2 | iy0 | iz1];\n ++nextState[ix2 | iy0 | iz2];\n ++nextState[ix2 | iy1 | iz0];\n ++nextState[ix2 | iy1 | iz1];\n ++nextState[ix2 | iy1 | iz2];\n ++nextState[ix2 | iy2 | iz0];\n ++nextState[ix2 | iy2 | iz1];\n ++nextState[ix2 | iy2 | iz2];\n }\n }", "public TopoDS_Wire Notch(int index) {\n return new TopoDS_Wire(OCCwrapJavaJNI.ShapeAnalysis_FreeBoundData_Notch(swigCPtr, this, index), true);\n }", "public void setIndex(int ind){\n\t\tindex = ind;\n\t}", "public void setNeighbors(Field[] neighbors) {\n this.neighbors = neighbors;\n }", "private void setRight(int index, Node n) {\n \t\t// TODO Complete this method!\n \t\tsetNode(getRightOf(index), n);\n \t}", "private void swap(int index1, int index2) {\n E element1 = getElement(index1);\n E element2 = getElement(index2);\n setElement(index2, element1);\n setElement(index1, element2);\n }", "public void setNeighbourCellBodies(Set<Integer> neighbourCellBodies) {\n\t\tthis.neighbourCellBodies = neighbourCellBodies;\n\t}", "public void setIndex(int index){\n\t\tthis.index = index;\n\t}", "public void setIndex(int index) {\r\n this.index = index;\r\n }", "public void removeNeighbours(){\n\t\tgetNeighbours().removeAll(getNeighbours());\n\t}", "public void toggleCellAtPoint(Point pt) {\n int cx = cellFromDistance(pt.x);\n int cy = cellFromDistance(pt.y);\n if (cx >= 0 && cy >= 0) {\n Point cpt = new Point(cx, cy);\n if (!foundCells.contains(cpt)) {\n foundCells.add(cpt);\n try {\n board.setCell(cx, cy, !board.getCell(cx, cy));\n } catch (ArrayIndexOutOfBoundsException e) {\n }\n repaint();\n }\n }\n }", "protected void setIndex(int index) {\n\t\tthis.index = index;\n\t}", "public void flip(int bitIndex);", "private void setInitialDirection(int index) {\n for (int i = 0; i <= index; i += 1) {\n ArrayList<String> init = new ArrayList<>();\n init.add(\"Both\");\n _directions.put(i, init);\n }\n }", "public void setIndex(Integer index) {\n this.index = index;\n }", "public void setIndex(Integer index) {\n this.index = index;\n }", "public void setJointIndex(int index) {\r\n\t\tthis.jointIndex = index;\r\n\t}", "public void setXY(int index, PVector v) {\n\t\tpoints.get(index).setXY(v);\n\t}", "void onNodeNeighbourChange(World world, BlockPos pos, BlockPos neighbourPos);", "public void setHolder(int pIndex) {\n this.pIndex = pIndex;\n }", "public void set(int index, int o) {\n\t\tif(index == 0) return;\n\t\tr[index] = o;\n\t}", "public void swap(int index1, int index2) {\n \n }", "public void setIndex(int index)\n/* */ {\n/* 39 */ this.index = index;\n/* */ }", "public void set(int i, int j, int w) {\n if (i != j || !_isInteracting) {\n _weights[i][j] = w;\n if (_isInteracting) {\n _weights[j][i] = w;\n }\n } else {\n /* Self-interaction disallowed in hopfield networks*/\n _weights[i][j] = 0;\n }\n }", "public void removeNeuron(int index){\n for (Connection con:neurons.get(index).getUpStream()) {\n con.getFromNeuron().removeDownStream(con);\n }\n for (Connection con:neurons.get(index).getDownStream()) {\n con.getToNeuron().removeUpStream(con);\n }\n neurons.remove(index);\n }", "public TriangleElt3D getNeighbour(int index) {\n\t\tswitch (index) {\n\t\tcase 0:\n\t\t\treturn this.eltZero;\n\t\tcase 1:\n\t\t\treturn this.eltOne;\n\t\tcase 2:\n\t\t\treturn this.eltTwo;\n\t\tdefault:\n\t\t\treturn null;\n\t\t}\n\t}", "public void addNeighbour() {\n for (int i = 0; i < getNumberPoney(); i++) {\n if (i == 0) {\n System.out.println(this.getPoney()[0].getPoneyColor());\n this.getPoney()[i].addVoisin(this.getPoney()[i + 1]);\n } else if (i == getNumberPoney() - 1) {\n this.getPoney()[i].addVoisin(this.getPoney()[i - 1]);\n } else {\n this.getPoney()[i].addVoisin(this.getPoney()[i + 1]);\n this.getPoney()[i].addVoisin(this.getPoney()[i - 1]);\n }\n }\n }", "private void swap(int index1, int index2) {\n \t\tNode node1 = getNode(index1);\n \t\tNode node2 = getNode(index2);\n \t\tthis.contents.set(index1, node2);\n \t\tthis.contents.set(index2, node1);\n \t}", "public void trocarPokemon(Integer pokIndex) {\n\n\t\tPokemon auxPok = pokemons[0]; // Primeiro Pokemons é sempre o ativo\n\t\tpokemons[0].isActive = false;\n\t\tpokemons[0] = pokemons[pokIndex];\n\t\tpokemons[pokIndex].isActive = true;\n\t\tpokemons[pokIndex] = auxPok;\n\t\t\n\t}", "private ArrayList<Integer> setUnvisitedNeighbors(int currentIndex) {\n\t\t\n\t\tint row = currentIndex / width;\t\t\t\t\t\t\t\t\t\t\t\t//number of row\n\t\tint column = currentIndex % width;\t\t\t\t\t\t\t\t\t\t\t//number of column\n\t\t\n\t\tArrayList<Integer> neighbors = new ArrayList<Integer>();\n\t\t\n\t\tif(row != 0 && !cells[currentIndex - width].visited ) {\t\t\t\t\t\t// cell has upper neighbor\n\t\t\tint upperIndex = ((row - 1) * width) + column;\n\t\t\tneighbors.add(upperIndex);\n\t\t}\n\t\tif(row != height - 1 && !cells[currentIndex + width].visited ) {\t\t\t//cell has lower neighbor\n\t\t\tint lowerIndex = ((row + 1) * width) + column;\n\t\t\tneighbors.add(lowerIndex);\n\t\t}\n\t\tif(column != 0 && !cells[currentIndex - 1].visited) {\t\t\t\t\t\t//cell has left neighbor\n\t\t\tint leftIndex = currentIndex - 1;\n\t\t\tneighbors.add(leftIndex);\n\t\t}\n\t\tif(column != width - 1 && !cells[currentIndex + 1].visited) {\t\t\t\t//cell has right neighbor\n\t\t\tint rightIndex = currentIndex + 1;\n\t\t\tneighbors.add(rightIndex);\n\t\t}\n\t\treturn neighbors;\n\t}", "public void setMark(int neighbour, boolean mark){\n\tedgMark[neighbour] = mark;\n }", "private List<CellIndex> getNeighbours( CellIndex index )\r\n {\n List<CellIndex> neighbours = new ArrayList<World.CellIndex>();\r\n if( index.x % EnvSettings.getMAX_X() != 0 )\r\n {\r\n neighbours.add( new CellIndex( index.x - 1, index.y, index.z ) );\r\n }\r\n if( index.x % EnvSettings.getMAX_X() != EnvSettings.getMAX_X() - 1 )\r\n {\r\n neighbours.add( new CellIndex( index.x + 1, index.y, index.z ) );\r\n }\r\n if( index.y % EnvSettings.getMAX_Y() != 0 )\r\n {\r\n neighbours.add( new CellIndex( index.x, index.y - 1, index.z ) );\r\n }\r\n if( index.y % EnvSettings.getMAX_Y() != EnvSettings.getMAX_Y() - 1 )\r\n {\r\n neighbours.add( new CellIndex( index.x, index.y + 1, index.z ) );\r\n }\r\n if( index.z % EnvSettings.getMAX_Z() != 0 )\r\n {\r\n neighbours.add( new CellIndex( index.x, index.y, index.z - 1 ) );\r\n }\r\n if( index.z % EnvSettings.getMAX_Z() != EnvSettings.getMAX_Z() - 1 )\r\n {\r\n neighbours.add( new CellIndex( index.x, index.y, index.z + 1 ) );\r\n }\r\n return neighbours;\r\n }", "private void swim(int index)\r\n\t{\n\t\twhile (index > 1)\r\n\t\t{\r\n\t\t\tint parentIndex = index / 2;\r\n\t\t\t\r\n\t\t\tif (data[index].compareTo(data[parentIndex]) < 0)\r\n\t\t\t{\r\n\t\t\t\tswap(index, parentIndex);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tindex = parentIndex;\r\n\t\t}\r\n\t}", "static protected int changeElimState(int index)\n\t{\n\t\treturn -index - 2;\n\t}", "private void setNeighboringMines(){\n\t\t//cycle the board\n\t\tfor (int r = 0; r < board.length; r++)\n\t\t\tfor (int c = 0; c < board[r].length; c++){\n\t\t\t\tint neighborCount = 0;\n\t\t\t\tif(!board[r][c].isMine()) {\n\t\t\t\t\t//checks if there is mines touching\n\t\t\t\t\tneighborCount = neighboringMines(r, c);\n\t\t\t\t\tif (neighborCount > 0) {\n\t\t\t\t\t\tboard[r][c].setIsNeighboringMine(true);\n\t\t\t\t\t\tboard[r][c].setNumNeighboringMines\n\t\t\t\t\t\t\t\t(neighborCount);\n\t\t\t\t\t} else if (neighborCount == 0) {\n\t\t\t\t\t\tboard[r][c].setNumNeighboringMines(0);\n\t\t\t\t\t\tboard[r][c].setIsNeighboringMine(false);\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void setImageIndex(int index)\n\t{\n\t\tthis.drawer.setImageIndex(index);\n\t}", "public Builder setWaypoints(\n int index, google.maps.fleetengine.v1.TripWaypoint value) {\n if (waypointsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureWaypointsIsMutable();\n waypoints_.set(index, value);\n onChanged();\n } else {\n waypointsBuilder_.setMessage(index, value);\n }\n return this;\n }", "public void addToNeighbours(Tile N) {\n \r\n neighbours.add(N);\r\n }", "public void set(long index);", "public void setIndex(int i) {\n\t\t\n\t}", "synchronized protected void removePoint(final int index) {\n \t\t// check preconditions:\n \t\tif (index < 0) {\n \t\t\treturn;\n \t\t} else if (n_points - 1 == index) {\n \t\t\t//last point out\n \t\t\tn_points--;\n \t\t} else {\n \t\t\t//one point out (but not the last)\n \t\t\t--n_points;\n \n \t\t\t// shift all points after 'index' one position to the left:\n \t\t\tfor (int i=index; i<n_points; i++) {\n \t\t\t\tp[0][i] = p[0][i+1];\t\t//the +1 doesn't fail ever because the n_points has been adjusted above, but the arrays are still the same size. The case of deleting the last point is taken care above.\n \t\t\t\tp[1][i] = p[1][i+1];\n \t\t\t\tp_layer[i] = p_layer[i+1];\n \t\t\t}\n \t\t}\n \n \t\t// Reset or fix autotracing records\n \t\tif (index < last_autotrace_start && n_points > 0) {\n \t\t\tlast_autotrace_start--;\n \t\t} else last_autotrace_start = -1;\n \n \t\t//update in database\n \t\tupdateInDatabase(\"points\");\n \t}", "public void set(int index, PVector v, String label) {\n\t\tif (index == points.size()) {\n\t\t\tpoints.add(new GPoint(v, label));\n\t\t} else {\n\t\t\tpoints.get(index).set(v, label);\n\t\t}\n\t}", "public void set(int i, PdVector value)\n {\n switch(i)\n {\n case 0: p1 = value; break;\n case 1: p2 = value; break;\n case 2: p3 = value; break;\n default: throw new IndexOutOfBoundsException(\"Triangle indices should be in range [0, 2].\");\n }\n }", "private void changeVlaue(int p1, int p2, int value) {\n if (p1 > count() || p1 < 1) { // range exception\n throw new IllegalArgumentException(\"out of N range\");\n }\n if (p2 > count() || p2 < 1) { // range exception\n throw new IllegalArgumentException(\"out of N range\");\n }\n if (value > 1 || value < 0) { // range exception\n throw new IllegalArgumentException(\"out of N range\");\n }\n\n id[p1 - 1][p2 - 1] = value; // set a node to 1 or 0\n }", "public void setNeighborsWall(String neighbor, int value){\n\t\ttry{\t\t\t\t\n\t\t\tif(neighbor.equalsIgnoreCase(\"east\") && (value == 0 || value == 1)){\t\t\t\t\n\t\t\t\teastCell.westWall = value;\n\t\t\t}else if(neighbor.equalsIgnoreCase(\"north\") && (value == 0 || value == 1)){\t\t\t\t\n\t\t\t\tnorthCell.southWall = value;\n\t\t\t}else if(neighbor.equalsIgnoreCase(\"west\") && (value == 0 || value == 1)){\t\t\t\t\n\t\t\t\twestCell.eastWall = value;\n\t\t\t}else if(neighbor.equalsIgnoreCase(\"south\") && (value == 0 || value == 1)){\t\t\t\t\n\t\t\t\tsouthCell.northWall = value;\n\t\t\t}\n\t\t}catch(NullPointerException np){\n\t\t\treturn;\n\t\t}catch(Exception e){\n\t\t\treturn;\n\t\t}\n\t}", "static void setExample(int n) throws Exception {\n int j=n-1;\n PetriNet net = new PetriNet(n);\n PetriNet.setNet(net);\n \n int[] eins=new int[n]; \n Arrays.fill(eins, 1);\n m0 = new Marking(eins);\n \n int[] zwei=new int[n]; \n Arrays.fill(zwei, 2); \n mF = new Marking(zwei);\n \n for (int i = 0; i < n; i++) {\n int[] tmin = new int[n]; \n int[] tdelta = new int[n]; \n Arrays.fill(tmin, 1);\n Arrays.fill(tdelta, -1); \n tdelta[i]=n-1;\n if(i==j) tdelta[i]=n;\n PNTransition t = new PNTransition(tmin, tdelta);\n net.addTransition(t);\n }\n int[] temp=new int[n]; \n Arrays.fill(temp, -n-1); \n temp[j]=-n;\n Inequality ineq=new Inequality(temp);\n boolean findC = ineq.findC();\n System.out.println(\"check-k for: \"+n+\": \"+findC);\n System.out.println(ineq.toString());\n\n }", "public Position opposite(Position vp, Position ep) throws InvalidPositionException;", "public void open(int i, int j) throws Exception { \n validation(i, j);\n if (!isOpen(i, j)) { // mark the site as open\n int xyTo1DTemp = xyTo1D(i, j);\n lattice[xyTo1DTemp] = true;\n \n // links the site in question to its open neighbors\n if (xyTo1DTemp % number != 0) // leftneighbor\n if (isOpen(i, j - 1)) { \n ufVirtual.union(xyTo1DTemp, xyTo1DTemp - 1);\n ufTrue.union(xyTo1DTemp, xyTo1DTemp - 1);\n }\n if ((xyTo1DTemp + 1) % number != 0) // right neighbor\n if (isOpen(i, j + 1)) { \n ufVirtual.union(xyTo1DTemp, xyTo1DTemp + 1);\n ufTrue.union(xyTo1DTemp, xyTo1DTemp + 1);\n }\n if (xyTo1DTemp - number >= 0) // up neighbor\n if (isOpen(i - 1, j)) { \n ufVirtual.union(xyTo1DTemp, xyTo1DTemp - number);\n ufTrue.union(xyTo1DTemp, xyTo1DTemp - number);\n }\n if (xyTo1DTemp + number <= SIZE - 1) // beneath neighbor\n if (isOpen(i + 1, j)) { \n ufVirtual.union(xyTo1DTemp, xyTo1DTemp + number);\n ufTrue.union(xyTo1DTemp, xyTo1DTemp + number);\n }\n }\n }", "void changeSetting(int idx) {\n currentIdx = idx;\n }", "public void setXY(int index, float x, float y) {\n\t\tpoints.get(index).setXY(x, y);\n\t}", "public void RemovePoint(int index) {\n if (index > PointArray.length - 1 || index < 0) {\n return;\n }\n double temp[] = new double[PointArray.length - 2];\n for (int i = 0; i <= PointArray.length - 1; i += 2) {\n if (i / 2 == index) {\n continue;\n }\n temp[i] = PointArray[i];\n temp[i + 1] = PointArray[i + 1];\n }\n }", "public void setNetworth(int value);", "private void setNode(int index, Node n) {\n \t\twhile (index + 1 >= contents.size()) {\n \t\t\tcontents.add(null);\n \t\t}\n \t\tcontents.set(index, n);\n \t}", "void diplayNeighborPoints() {\n\t\tfor (int i = 0; i < amount; i++) {\n\t\t\tif (point[i].position.dist(P) < 10) {\n\t\t\t\tmyParent.pushStyle();\n\t\t\t\tmyParent.fill(255, 255, 0);\n\t\t\t\tmyParent.text(i, point[i].x + 10, point[i].y + 5); // draw\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// selected\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// point\n\t\t\t\tmyParent.text(\"left neighbor\", point[neighbor(i)[0]].x, point[neighbor(i)[0]].y);\n\t\t\t\tmyParent.text(\"right neighbor\", point[neighbor(i)[1]].x, point[neighbor(i)[1]].y);\n\t\t\t\tmyParent.text(\"opposite\", point[neighbor(i)[2]].x, point[neighbor(i)[2]].y);\n\t\t\t\t// neighbor(int sourcePointId)\n\t\t\t\tmyParent.noFill();\n\t\t\t\tmyParent.popStyle();\n\t\t\t}\n\t\t}\n\n\t\tif (state == State.SCALE_PORPORTIONALLY_POINT || state == State.SCALE_FREE_POINT)\n\t\t\tdisplayLineBetweenCurrentAndOppositePoints();\n\t}", "public void setInversiones(int n){\r\n\t\tinversiones = n;\r\n\t}", "public void setEdge(int n1, int n2){\n\t\tif(outOfBounds(n1) || outOfBounds(n2))// if node indexes are bad return\n\t\t\treturn ;\n\t\t\n if((dGraph.getElement(n1, n2)) == 1){\n\t\t\treturn;\n\t}\n\t\tdGraph.setElement(n1, n2, 1); //shows that there is an edge going from n1 to n2\n\t\tdGraphin.setElement(n2, n1, 1);// show the edges going into n2\n\t\toutdegree[n1]++;\n\t\tindegree[n2]++;\n\t\t\n\t}", "@Override\r\n\tpublic void setZIndex(int index) {\n\t\t\r\n\t}", "public static void setBlocked(int i, int j) {\n\tgrid[i][j] = null;\n//\tSystem.out.println(\"end\");\n}", "void removeNeighbor(IsisNeighbor isisNeighbor);", "public Builder setWaypoints(\n int index, google.maps.fleetengine.v1.TripWaypoint.Builder builderForValue) {\n if (waypointsBuilder_ == null) {\n ensureWaypointsIsMutable();\n waypoints_.set(index, builderForValue.build());\n onChanged();\n } else {\n waypointsBuilder_.setMessage(index, builderForValue.build());\n }\n return this;\n }", "public void swap(int childIndex,int parentIndex);", "public void assignNeighbors(Vertex v) {\r\n\t\t\r\n\t\tif (v.y != 0) {\r\n\t\t\tv.neighbors.add(graph[v.x][v.y - 1]);\r\n\t\t}\r\n\r\n\t\t\r\n\t\tif (v.y != (mazeSize - 1)) {\r\n\t\t\tv.neighbors.add(graph[v.x][v.y + 1]);\r\n\t\t}\r\n\r\n\t\t\r\n\t\tif (v.x != 0) {\r\n\t\t\tv.neighbors.add(graph[v.x - 1][v.y]);\r\n\t\t}\r\n\r\n\t\t\r\n\t\tif (v.x != mazeSize - 1) {\r\n\t\t\tv.neighbors.add(graph[v.x + 1][v.y]);\r\n\t\t}\r\n\t}", "void setRoadsideArray(int i, org.landxml.schema.landXML11.RoadsideDocument.Roadside roadside);" ]
[ "0.5430579", "0.54230815", "0.54222167", "0.53956556", "0.53955764", "0.53357685", "0.5320428", "0.52732897", "0.52055025", "0.5185004", "0.51684153", "0.5111924", "0.511104", "0.510421", "0.5102252", "0.50897425", "0.50779575", "0.5060934", "0.50597847", "0.5051118", "0.50463015", "0.50292146", "0.50172794", "0.50172794", "0.50061417", "0.49981716", "0.49833286", "0.49825183", "0.4972441", "0.49624968", "0.4959693", "0.4941278", "0.4939224", "0.492511", "0.49247307", "0.49131274", "0.4911961", "0.49058548", "0.49031252", "0.4889744", "0.4881981", "0.48587584", "0.48558328", "0.48451895", "0.48444244", "0.48395765", "0.48380542", "0.48370233", "0.48307127", "0.48218092", "0.48166853", "0.481515", "0.481515", "0.4804791", "0.48036015", "0.47972763", "0.47905874", "0.47691405", "0.4766216", "0.47649276", "0.47528577", "0.47511172", "0.4749285", "0.47432888", "0.47396374", "0.4737072", "0.4728153", "0.47226506", "0.47132808", "0.47075307", "0.47067988", "0.47064808", "0.47048226", "0.4695442", "0.46927702", "0.4691654", "0.46798706", "0.46582985", "0.46513316", "0.4633743", "0.46271884", "0.4625705", "0.4623308", "0.46161094", "0.46147332", "0.46135464", "0.46107748", "0.46029007", "0.46026012", "0.45939204", "0.45860294", "0.45796874", "0.45779073", "0.4577097", "0.4576241", "0.45726445", "0.4566389", "0.45628783", "0.45588708", "0.45528984" ]
0.6136257
0
Sets the neighbour for corresponding index to null. Returns index for removed neighbour information or 1 if given element was not neighbour.
public int setNeighbourNull(TriangleElt3D element, ScalarOperator sop) { if (this.getNeighbour(0) != null && this.getNeighbour(0).isGeometryEquivalent(element, sop)) { this.setNeighbour(0, null); return 0; } if (this.getNeighbour(1) != null && this.getNeighbour(1).isGeometryEquivalent(element, sop)) { this.setNeighbour(1, null); return 1; } if (this.getNeighbour(2) != null && this.getNeighbour(2).isGeometryEquivalent(element, sop)) { this.setNeighbour(2, null); return 2; } return -1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean setNeighbour(int index, TriangleElt3D element) {\n\t\tswitch (index) {\n\t\tcase 0:\n\t\t\tthis.eltZero = element;\n\t\t\treturn true;\n\t\tcase 1:\n\t\t\tthis.eltOne = element;\n\t\t\treturn true;\n\t\tcase 2:\n\t\t\tthis.eltTwo = element;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public abstract int getNeighboursNumber(int index);", "@Override\n public void set(E e) throws NullPointerException\n {\n if(canRemove = true)\n {\n if(forward = true)\n {\n Node theNode = getNth(idx - 1);\n theNode.data = e;\n }\n else\n {\n Node theNode = getNth(idx);\n theNode.data = e;\n }\n }\n else\n {\n throw new IllegalArgumentException();\n }\n }", "private void setAdjacentUnknown(Cell cell) {\n\t\tint count = 0;\n\t\tPoint pos = cell.getPosition();\n\t\tfor (Point adjPos : pos.allAdjacent()) {\n\t\t\tif (!map.containsKey(adjPos)) {\n\t\t\t\tCell adjacent = createCell(adjPos, CellType.UNSAFE_UNKNOWN);\n\t\t\t\tmap.put(adjPos, adjacent);\n\t\t\t\t++count;\n\t\t\t}\n\t\t}\n\t\tLOG.trace(\"added {} cell(s) of type around cell at {}\", count, CellType.UNSAFE_UNKNOWN, pos);\n\t}", "public boolean hasNeighbour(int index) {\n\t\tswitch (index) {\n\t\tcase 0:\n\t\t\treturn this.eltZero != null;\n\t\tcase 1:\n\t\t\treturn this.eltOne != null;\n\t\tcase 2:\n\t\t\treturn this.eltTwo != null;\n\t\tdefault:\n\t\t\treturn false;\n\t\t}\n\t}", "private void setNeighboringMines(){\n\t\t//cycle the board\n\t\tfor (int r = 0; r < board.length; r++)\n\t\t\tfor (int c = 0; c < board[r].length; c++){\n\t\t\t\tint neighborCount = 0;\n\t\t\t\tif(!board[r][c].isMine()) {\n\t\t\t\t\t//checks if there is mines touching\n\t\t\t\t\tneighborCount = neighboringMines(r, c);\n\t\t\t\t\tif (neighborCount > 0) {\n\t\t\t\t\t\tboard[r][c].setIsNeighboringMine(true);\n\t\t\t\t\t\tboard[r][c].setNumNeighboringMines\n\t\t\t\t\t\t\t\t(neighborCount);\n\t\t\t\t\t} else if (neighborCount == 0) {\n\t\t\t\t\t\tboard[r][c].setNumNeighboringMines(0);\n\t\t\t\t\t\tboard[r][c].setIsNeighboringMine(false);\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void setNull(){\n for (int i = 0; i < Nodes.size(); i++){\n this.References.add(null);\n }\n }", "public void unsetNeCell()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(NECELL$24, 0);\n }\n }", "public boolean hasNeighbours() {\n\t\tif (this.eltZero != null || this.eltOne != null || this.eltTwo != null)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "public int nextNeighbour(int i) {\r\n for (int j = 0; j < vertexNum; j++) {\r\n if (adjacencyMatrix[i][j] != 0 && !vertexList.get(j).isVisited) {\r\n return j;\r\n }\r\n }\r\n return -1;\r\n }", "private final void relaxNeighbors(_Node unsettledNode)\r\n {\r\n for (_Edge destinationEdge : map.getDestinations(unsettledNode))\r\n {\r\n \tif (isSettled(destinationEdge.getEndNode())) continue;\r\n \tint shortDist = getShortestDistance(unsettledNode) + destinationEdge.getWeight();// map.getDistance(unsettledNode, destinationEdge.getEndNode());\r\n if (shortDist <= getShortestDistance(destinationEdge.getEndNode()))\r\n {\r\n setShortestDistance(destinationEdge.getEndNode(), shortDist);\r\n setPredecessor(destinationEdge.getEndNode(),unsettledNode);\r\n }\r\n } \r\n }", "private ArrayList<Integer> setUnvisitedNeighbors(int currentIndex) {\n\t\t\n\t\tint row = currentIndex / width;\t\t\t\t\t\t\t\t\t\t\t\t//number of row\n\t\tint column = currentIndex % width;\t\t\t\t\t\t\t\t\t\t\t//number of column\n\t\t\n\t\tArrayList<Integer> neighbors = new ArrayList<Integer>();\n\t\t\n\t\tif(row != 0 && !cells[currentIndex - width].visited ) {\t\t\t\t\t\t// cell has upper neighbor\n\t\t\tint upperIndex = ((row - 1) * width) + column;\n\t\t\tneighbors.add(upperIndex);\n\t\t}\n\t\tif(row != height - 1 && !cells[currentIndex + width].visited ) {\t\t\t//cell has lower neighbor\n\t\t\tint lowerIndex = ((row + 1) * width) + column;\n\t\t\tneighbors.add(lowerIndex);\n\t\t}\n\t\tif(column != 0 && !cells[currentIndex - 1].visited) {\t\t\t\t\t\t//cell has left neighbor\n\t\t\tint leftIndex = currentIndex - 1;\n\t\t\tneighbors.add(leftIndex);\n\t\t}\n\t\tif(column != width - 1 && !cells[currentIndex + 1].visited) {\t\t\t\t//cell has right neighbor\n\t\t\tint rightIndex = currentIndex + 1;\n\t\t\tneighbors.add(rightIndex);\n\t\t}\n\t\treturn neighbors;\n\t}", "public void setNeighbour(Direction direction, Room neighbour) {\r\n\t\tthis.neighbours.put(direction, neighbour);\r\n\t\tthis.doors.put(direction, (Boolean) (neighbour != null));\r\n\t}", "public void hunt() {\n\t\tfor(int i = 0; i < N; i++) {\n\t\t\tif(cells[i].visited == false) {\n\t\t\t\t\n\t\t\t\tint currentIndex = i;\n\t\t\t\t\n\t\t\t\tArrayList<Integer> neighbors = setVisitedNeighbors(i);\n\t\t\t\tint nextIndex = getRandomVisitedNeighborIndex(neighbors);\n\t\t\t\t\t\t\t\t\n\t\t\t\tif(neighbors.size() != 0 ) {\n\t\t\t\t\tcells[currentIndex].visited = true;\n\t\t\t\t\t\n\t\t\t\t\tif(nextIndex == NOT_EXIST) {\n\t\t\t\t\t\tbreak; \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//if there is NO not visited neighbors \n\t\t\t\t\t}\n\t\t\t\t\telse if(currentIndex - nextIndex == -1) {\n\t\t\t\t\t\tcells[currentIndex].border[EAST] = NO_WALL; \t\t\t\t\t\t\t//neighbor is right \n\t\t\t\t\t\tcells[nextIndex].border[WEST] = NO_WALL;\n\t\t\t\t\t}\n\t\t\t\t\telse if(currentIndex - nextIndex == width) {\n\t\t\t\t\t\tcells[currentIndex].border[NORTH] = NO_WALL;\t\t\t\t\t\t\t//neighbor is up\n\t\t\t\t\t\tcells[nextIndex].border[SOUTH] = NO_WALL;\n\t\t\t\t\t}\n\t\t\t\t\telse if(currentIndex - nextIndex == -width) {\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tcells[currentIndex].border[SOUTH] = NO_WALL;\t\t\t\t\t\t\t//neighbor is down\n\t\t\t\t\t\tcells[nextIndex].border[NORTH] = NO_WALL;\n\t\t\t\t\t}\n\t\t\t\t\telse if(currentIndex - nextIndex == 1) {\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tcells[currentIndex].border[WEST] = NO_WALL;\t\t\t\t\t\t\t\t//neighbor is left\n\t\t\t\t\t\tcells[nextIndex].border[EAST] = NO_WALL;\n\t\t\t\t\t}\n\t\t\t\t\tkill(nextIndex);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void removeNeighbours(){\n\t\tgetNeighbours().removeAll(getNeighbours());\n\t}", "public void kill(int index) {\n\t\tint currentIndex = index;\t\t\t\t\t\t\t\t\t\t\t\t\t\t//start with random cell\n\t\t\n\t\twhile(true) {\n\t\t\tcells[currentIndex].visited = true;\n\t\t\n\t\t\tint nextIndex = getRandomUnvisitedNeighbourIndex(currentIndex);\n\t\t\n\t\t\tif(nextIndex == NOT_EXIST) {\n\t\t\t\thunt(); \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//if there is NO neighbors [DEAD END]\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse if(currentIndex - nextIndex == -1) {\n\t\t\t\tcells[currentIndex].border[EAST] = NO_WALL; \t\t\t\t\t\t\t//neighbor is on the right \n\t\t\t\tcells[nextIndex].border[WEST] = NO_WALL;\n\t\t\t}\n\t\t\telse if(currentIndex - nextIndex == width) {\n\t\t\t\tcells[currentIndex].border[NORTH] = NO_WALL;\t\t\t\t\t\t\t//neighbor is up\n\t\t\t\tcells[nextIndex].border[SOUTH] = NO_WALL;\n\t\t\t}\n\t\t\telse if(currentIndex - nextIndex == -width) {\t\t\t\t\t\t\t\t\n\t\t\t\tcells[currentIndex].border[SOUTH] = NO_WALL;\t\t\t\t\t\t\t//neighbor is down\n\t\t\t\tcells[nextIndex].border[NORTH] = NO_WALL;\n\t\t\t}\n\t\t\telse if(currentIndex - nextIndex == 1) {\t\t\t\t\t\t\t\t\t\n\t\t\t\tcells[currentIndex].border[WEST] = NO_WALL;\t\t\t\t\t\t\t\t//neighbor is left\n\t\t\t\tcells[nextIndex].border[EAST] = NO_WALL;\n\t\t\t}\n\t\t\tcurrentIndex = nextIndex;\n\t\t}\n\t}", "@Override\n\tpublic List<Integer> getNeighbours(int v) {\n\t\treturn null;\n\t}", "@Override\n\t\tpublic Community set(int index, Community element) {\n\t\t\treturn null;\n\t\t}", "public void setEmpty(int index);", "public TriangleElt3D getNeighbour(int index) {\n\t\tswitch (index) {\n\t\tcase 0:\n\t\t\treturn this.eltZero;\n\t\tcase 1:\n\t\t\treturn this.eltOne;\n\t\tcase 2:\n\t\t\treturn this.eltTwo;\n\t\tdefault:\n\t\t\treturn null;\n\t\t}\n\t}", "public abstract LinkedList<Integer> getNeighbours(int index);", "public int getNextUnvisitedNeighbor (int v){\n for (int j=0; j<nVerts; j++) {\n if (adjMat[v][j] == 1 && vertextList[j].wasVisited == false) \n return j\n return -1; // none found\n }\n }", "private void setElement(int index, E element) {\n// if (getElement(index) != null) {\n// setContents.remove(getElement(index));\n// }\n while (index >= contents.size()) {\n contents.add(null);\n }\n contents.set(index, element);\n// contents.put(index, element);\n backwards.put(element, index);\n\n// if (element != null) {\n// setContents.add(getElement(index));\n// }\n }", "void removeNeighbor(IsisNeighbor isisNeighbor);", "private void setNode(int index, Node n) {\n \t\twhile (index + 1 >= contents.size()) {\n \t\t\tcontents.add(null);\n \t\t}\n \t\tcontents.set(index, n);\n \t}", "public void setNeighbourCellBodies(Set<Integer> neighbourCellBodies) {\n\t\tthis.neighbourCellBodies = neighbourCellBodies;\n\t}", "private int setFirstFree(final T element) {\r\n\t\tfinal int idx = firstFree;\r\n\t\tserializer.setRandomAccess(idx, element);\r\n\t\tfirstFree = getNextPointer(idx);\r\n\t\t// the pointer will be 0 if it was not unlinked before\r\n\t\tif (firstFree == 0) {\r\n\t\t\tfirstFree = idx + 1;\r\n\t\t}\r\n\t\treturn idx;\r\n\t}", "public void setNeighbors(){\t\t\t\t\n\t\tint row = position[0];\n\t\tint column = position[1];\t\t\n\t\tif(column+1 < RatMap.SIDELENGTH){\n\t\t\teastCell = RatMap.getMapCell(row,column+1);\t\t\t\n\t\t}else{\n\t\t\teastCell = null;\n\t\t}\t\n\t\tif(row+1 < RatMap.SIDELENGTH){\n\t\t\tnorthCell = RatMap.getMapCell(row+1,column);\n\t\t}else{\n\t\t\tnorthCell = null;\n\t\t}\t\n\t\tif(column-1 > -1){\n\t\t\twestCell = RatMap.getMapCell(row, column-1);\t\t\t\n\t\t}else{\n\t\t\twestCell = null;\n\t\t}\n\t\tif(row-1 > -1){\n\t\t\tsouthCell = RatMap.getMapCell(row-1, column);\n\t\t}else{\n\t\t\tsouthCell = null;\n\t\t}\n\t}", "public void setNeighbor(Directions dir, Field neighbor){\n neighbors[dir.ordinal()] = neighbor;\n }", "protected void removeNode (int seq, int neighbourIndex)\n {\n Node currentNode = adjacencySequences[seq];\n Node previousNode = null;\n while (currentNode != null && currentNode.neighbourIndex != neighbourIndex)\n {\n previousNode = currentNode;\n currentNode = currentNode.nextNode;\n }\n\n if (currentNode != null)\n {\n if (previousNode != null)\n previousNode.nextNode = currentNode.nextNode;\n else\n adjacencySequences[seq] = currentNode.nextNode;\n }\n }", "@Override\t\n\tpublic void innKoe(T element){\n\t\t\tLinearNode<T> nyNode= new LinearNode<T>(element);\n\t\t\t\n\t\t\tif(erTom()){\n\t\t\t\tfront = nyNode;\n\t\t\t\n\t\t\t}else{\n\t\t\t\tbak.setNeste(nyNode);\n\t\t\t}\n\t\t\tbak = nyNode;\n\t\t\tantall++;\n\t\t\t}", "public void asignar_Nodo(Nodo e) {\n\t\tthis.elem = e;\n\t}", "@Override\n public void addNearestNeighbours(@Nonnull Element element) {\n if (element == null) {\n throw new IllegalArgumentException(\"An element must be specified.\");\n }\n\n if (element instanceof Person || element instanceof SoftwareSystem) {\n super.addNearestNeighbours(element, Person.class);\n super.addNearestNeighbours(element, SoftwareSystem.class);\n } else {\n throw new IllegalArgumentException(\"A person or software system must be specified.\");\n }\n }", "@Override\n protected KPMPSolution nextNeighbour() {\n List<KPMPSolutionWriter.PageEntry> edgePartition = bestSolution.getEdgePartition().stream().map(KPMPSolutionWriter.PageEntry::clone).collect(toCollection(ArrayList::new));\n KPMPSolution neighbourSolution = new KPMPSolution(bestSolution.getSpineOrder(), edgePartition, bestSolution.getNumberOfPages());\n edge = edgePartition.get(index);\n originalPageIndex = edge.page;\n newPageIndex = pageCounter;\n edgePartition.get(index).page = newPageIndex;\n index++;\n numberOfIterations++;\n return neighbourSolution;\n }", "public void setNeighbours(ArrayList<ThresholdDataPoint> neighbours, int connec) {\n\t\tif(connec == 8){\n\t\t\tthis.eightNeighbours = neighbours;\n\t\t} else if(connec == 4){\n\t\t\tthis.fourNeighbours = neighbours;\n\t\t} else {\n\t\t\tthrow new IllegalArgumentException(\"Invalid number of neighbours\");\n\t\t}\n\t}", "void removeBridgeElement(int i);", "public void changingNeighbor() {\n }", "void onNodeNeighbourChange(World world, BlockPos pos, BlockPos neighbourPos);", "protected void alter_for_neighbour_switch() {\n\t\tint this_l, tother_l, ns_i, ns_j, ns_n;\n\t\t\n\t\t// Let the user know...\n\t\tSystem.out.println(\" H THIS IS IN N_SWITCH (nn comparison) mode, for structure \"+INIT_NPHASE);\n\t\tSystem.out.println(\" H en_shift = \"+EN_SHIFT);\n\t\t\n\t\t// Check that there is room at the inn:\n\t\tif( n > MAX_NNS ) {\n\t\t\tthrow( new LSSimException(LSSimException.PARAM,\n\t\t\t\"neighbour switch needs \"+n+\" neighbours in MAX_NNS!\\n\"));\n\t\t}\n\t\t\n\t\t// Make both structures the same:\n\t\tthis_l = INIT_NPHASE;\n\t\ttother_l = 1 - this_l;\n\t\tfor( ns_i = 0; ns_i < n; ns_i++ ) {\n\t\t\tlatt[tother_l][ns_i].x = latt[this_l][ns_i].x;\n\t\t\tlatt[tother_l][ns_i].y = latt[this_l][ns_i].y;\n\t\t\tlatt[tother_l][ns_i].z = latt[this_l][ns_i].z;\n\t\t\t// copy nn lists as well!\n\t\t\tns_n = 0; ns_j = nns[this_l][ns_i][ns_n];\n\t\t\twhile ( ns_j != NO_MORE_NNS ) {\n\t\t\t\tnns[tother_l][ns_i][ns_n] = nns[this_l][ns_i][ns_n];\n\t\t\t\tns_n++; ns_j = nns[this_l][ns_i][ns_n];\n\t\t\t}\n\t\t\tnns[tother_l][ns_i][ns_n] = NO_MORE_NNS;\n\t\t}\n\t\t\n\t\t// Alter the neighbour list for structure 1;\n\t\tmake_it_order_n_squared(1);\n\t}", "private Integer getRandomUnvisitedNeighbourIndex(int currentIndex) {\n\t\t\n\t\tArrayList<Integer> neighbors = setUnvisitedNeighbors(currentIndex);\n\t\t\n\t\tRandom random = new Random();\n\t\t\t\t\n\t\treturn neighbors.size() == 0 ? NOT_EXIST : neighbors.get(random.nextInt(neighbors.size())); \n\t}", "public void addToNeighbours(Tile N) {\n \r\n neighbours.add(N);\r\n }", "void removeNeighbors();", "@Override\n public T set(int index, T element) {\n if (indexCheck(index)) {\n T previousValue = (T) data[index];\n data[index] = element;\n return previousValue;\n }\n return null;\n }", "private static int safeLevel(List<Point> neighbor) {\n\t\tint count = 0;\n\t\tfor (Point point : neighbor) {\n\t\t\tif(point.getLabel() != 0)\n\t\t\t\tcount ++;\n\t\t}\n\t\treturn count;\n\t}", "private Coordinate getNeighbour(boolean locked) {\n\t\tSet<Coordinate> set = locked ? lockedNeighbours : unlockedNeighbours;\n\t\tif (set.isEmpty()) return null;\n\t\treturn (Coordinate) set.toArray()[new Random().nextInt(set.size())];\n\t}", "public void checkNeighbour() {\r\n for (int y = 0; y < table.length; y++){\r\n for (int x = 0; x < table.length; x++){\r\n rule(y, x);\r\n }\r\n }\r\n for (int i = 0; i < table.length; i++)\r\n System.arraycopy(temp_table[i], 0, table[i], 0, table.length);\r\n }", "public Object set(int index, Object element) {\r\n return deref(refs.set(index, new WeakReference(element)));\r\n }", "public int set(int index, int element);", "public void resetNodo()\r\n {\r\n this.nodo = null;\r\n }", "void oracle(){\n if (this.neighbors < 1){\n if (!isAlive()){\n observer.deleteCell(id);\n }\n }\n }", "protected void setNeighbours(Cell[] neighbours) throws IllegalArgumentEvent {\r\n\t\tif(neighbours.length != 6){\r\n\t\t\tthrow new IllegalArgumentEvent(\"incorrect number of neighbours\");\r\n\t\t}\r\n\t\tthis.neighbours = neighbours;\r\n\t}", "private void findNeighbour(int offset) {\n TreeNodeImpl node = (TreeNodeImpl) projectTree.getLastSelectedPathComponent();\n TreePath parentPath = projectTree.getSelectionPath().getParentPath();\n NodeList list = (NodeList) node.getParent().children();\n\n for (int i = 0; i < list.size(); ++i) {\n if (list.get(i).equals(node)) {\n if (offset > 0 && i < list.size() - offset) {\n projectTree.setSelectionPath(parentPath.pathByAddingChild(list.get(i + offset)));\n break;\n }\n if (offset < 0 && i >= offset) {\n projectTree.setSelectionPath(parentPath.pathByAddingChild(list.get(i + offset)));\n break;\n }\n }\n }\n }", "private void setSeenInfo(\n int index, SeenInfo value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureSeenInfoIsMutable();\n seenInfo_.set(index, value);\n }", "protected int findNonEmptyPosition() {\n\t\t\twhile (!set.bv[++indice]) {\n\t\t\t}\n\t\t\treturn indice;\n\t\t}", "public void updateNeighbours(int i) {\n if (currentState[i] != 0) {\n int ix0 = (i - STEPX) & MASKX;\n int iy0 = (i - STEPY) & MASKY;\n int iz0 = (i - STEPZ) & MASKZ;\n\n int ix1 = (i) & MASKX;\n int iy1 = (i) & MASKY;\n int iz1 = (i) & MASKZ;\n\n int ix2 = (i + STEPX) & MASKX;\n int iy2 = (i + STEPY) & MASKY;\n int iz2 = (i + STEPZ) & MASKZ;\n\n ++nextState[ix0 | iy0 | iz0];\n ++nextState[ix0 | iy0 | iz1];\n ++nextState[ix0 | iy0 | iz2];\n ++nextState[ix0 | iy1 | iz0];\n ++nextState[ix0 | iy1 | iz1];\n ++nextState[ix0 | iy1 | iz2];\n ++nextState[ix0 | iy2 | iz0];\n ++nextState[ix0 | iy2 | iz1];\n ++nextState[ix0 | iy2 | iz2];\n\n ++nextState[ix1 | iy0 | iz0];\n ++nextState[ix1 | iy0 | iz1];\n ++nextState[ix1 | iy0 | iz2];\n ++nextState[ix1 | iy1 | iz0];\n\n //!\t\t++nextState[ix1|iy1|iz1];\n ++nextState[ix1 | iy1 | iz2];\n ++nextState[ix1 | iy2 | iz0];\n ++nextState[ix1 | iy2 | iz1];\n ++nextState[ix1 | iy2 | iz2];\n\n ++nextState[ix2 | iy0 | iz0];\n ++nextState[ix2 | iy0 | iz1];\n ++nextState[ix2 | iy0 | iz2];\n ++nextState[ix2 | iy1 | iz0];\n ++nextState[ix2 | iy1 | iz1];\n ++nextState[ix2 | iy1 | iz2];\n ++nextState[ix2 | iy2 | iz0];\n ++nextState[ix2 | iy2 | iz1];\n ++nextState[ix2 | iy2 | iz2];\n }\n }", "public closest(){\n\t\tthis.pnt = null;\n\t}", "public E set(int index, E element);", "@Override\r\n\tpublic void delete(int el) {\n\t\tif (!isEmpty()) {\r\n\t\t\tif (tail.next == tail && el == tail.info) {\r\n\t\t\t\ttail = null;\r\n\t\t\t} else if (el == tail.next.info) {\r\n\t\t\t\ttail.next = tail.next.next;\r\n\t\t\t} else {\r\n\t\t\t\tIntCLNode pred, tmp;\r\n\t\t\t\tfor (pred = tail.next, tmp = tail.next.next; tmp != null\r\n\t\t\t\t\t\t&& tmp.info != el; pred = pred.next, tmp = tmp.next)\r\n\t\t\t\t\t;\r\n\t\t\t\tif (tmp != null) {\r\n\t\t\t\t\tpred.next = tmp.next;\r\n\t\t\t\t\tif (tmp == tail) {\r\n\t\t\t\t\t\ttail = pred;\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}", "@Override\n\tpublic E set(int index, E element) {\n\t\tNode<E> node = node(index);\n\t\tE old = node.elementE;\n\t\tnode.elementE = element;\n\t\treturn old;\n\t}", "private void addUndirectedEdge(int i, int j) {\n\t\tNode first = nodeList.get(i-1);\r\n\t\tNode second = nodeList.get(j-1);\r\n//\t\tSystem.out.println(first.name);\r\n//\t\tSystem.out.println(second.name);\r\n\t\tfirst.getNeighbors().add(second);//Neighbour of first is second. Store it.\r\n\t\tsecond.getNeighbors().add(first);\r\n\t}", "public void settInn(T element){\n Node temp = new Node(element);\n temp.neste = hode.neste;\n temp.neste.forrige = temp;\n temp.forrige = hode;\n hode.neste = temp;\n elementer++;\n\n\n }", "public void set_neighbors(Cell[] neighbors)\n\t{\n\t\tthis.neighbors = neighbors;\n\t}", "void set(int index, Object element);", "@Override\n public void add(Integer element) {\n if (this.contains(element) != -1) {\n return;\n }\n // when already in use\n int index = this.getIndex(element);\n if(this.data[index] != null && this.data[index] != this.thumbstone){\n int i = index + 1;\n boolean foundFreePlace = false;\n while(!foundFreePlace && i != index){\n if(this.data[i] == null && this.data[i] == this.thumbstone){\n foundFreePlace = true;\n }else{\n if(i == this.data.length - 1){\n // start at beginning.\n i = 0;\n }else{\n i++;\n }\n }\n }\n if(foundFreePlace){\n this.data[i] = element;\n }else{\n throw new IllegalStateException(\"Data Structre Full\");\n }\n }\n }", "public void setNeighbors(Field[] neighbors) {\n this.neighbors = neighbors;\n }", "@Override\n public void nullstill() {\n Node<T> curr= hode;\n while (curr!=null){\n Node<T> p= curr.neste;\n curr.forrige=curr.neste= null;\n curr.verdi= null;\n curr= p;\n }\n hode= hale= null;\n endringer++;\n antall=0;\n }", "void removeNi(int node) {\n neighbors.remove(node);\n }", "public void set(int index, T element) {\n\t\tif (index < 0 || index >= size)\n\t\t\tthrow new ArrayIndexOutOfBoundsException();\n\t\tNode<T> curNode = head;\n\t\twhile (index != -1) {\n\t\t\tif (index == 0) {\n\t\t\t\tcurNode.value = element;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tcurNode = curNode.next;\n\t\t\tindex--;\n\t\t}\n\t\tthrow new ArrayIndexOutOfBoundsException();\n\t}", "public HashSet<Position> getNeighborPos() { return neighborPos; }", "private LinkedList<int[]> neighborFinder(){\n LinkedList<int[]> neighborhood= new LinkedList<>();\n int[] curr_loc = blankFinder();\n int x = curr_loc[0];\n int y = curr_loc[1];\n if(x >0){\n neighborhood.add(new int[]{x-1, y});\n }\n if(x < n-1){\n neighborhood.add(new int[]{x+1, y});\n }\n if(y > 0){\n neighborhood.add(new int[]{x, y-1});\n }\n if(y < n-1) {\n neighborhood.add(new int[]{x, y+1});\n }\n\n\n return neighborhood;\n }", "private void f0() \n\t{\n\t\tint elements = 0;\n\t\t\n\t\tfor(int i=0;i<f2.length;i++)\n\t\t{\n\t\t\tfor(int j=0;j<f2[0].length;j++)\n\t\t\t{\n\t\t\t\tif(f2[i][j])\n\t\t\t\t\telements++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(elements > 0){\n\t\t\tneighbors = new Neighbor[elements];\n\t\t\tint cy = (f2.length-1)/2; \n\t\t\tint cx = (f2[0].length-1)/2;\n\t\t\tint index=0;\n\t\t\t\n\t\t\tfor(int i=0;i<f2.length;i++)\n\t\t\t{\n\t\t\t\tfor(int j=0;j<f2[0].length;j++)\n\t\t\t\t{\n\t\t\t\t\tif(f2[i][j]){\n\t\t\t\t\t\tneighbors[index++] = new Neighbor(i-cy,j-cx);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//No elements i.e all elements are false in the neighborhood buffer.\n\t\t\tneighbors = null;\n\t\t}\n\t\t\t\n\t}", "public void findNeighbours(ArrayList<int[]> visited , Grid curMap) {\r\n\t\tArrayList<int[]> visitd = visited;\r\n\r\n\t\t//System.out.println(\"FROM FIND NEIGHBOURS cur pos:\" +Arrays.toString(nodePos));\r\n\t\t//for(int j=0; j<visitd.size();j++) {\r\n\t\t\t//System.out.println(\"FROM FIND NEIGHBOURS\" +Arrays.toString(visited.get(j)));\r\n\t\t\t//System.out.println(\"FROM FIND NEIGHBOURS getvstd\" +Arrays.toString(visited.get(j)));\r\n\t\t//}\r\n\t\t//System.out.println(\"FROM FIND NEIGHBOURS\" +visited);\r\n\t\tCell left=curMap.getCell(0, 0);\r\n\t\tCell right=curMap.getCell(0, 0);\r\n\t\tCell upper=curMap.getCell(0, 0);\r\n\t\tCell down=curMap.getCell(0, 0);\r\n\t\t//the getStart() method returns x,y coordinates representing the point in x,y axes\r\n\t\t//so if either of [0] or [1] coordinate is zero then we have one less neighbor\r\n\t\tif (nodePos[1]> 0) {\r\n\t\t\tupper=curMap.getCell(nodePos[0], nodePos[1]-1) ; \r\n\t\t}\r\n\t\tif (nodePos[1] < M-1) {\r\n\t\t\tdown=curMap.getCell(nodePos[0], nodePos[1]+1);\r\n\t\t}\r\n\t\tif (nodePos[0] > 0) {\r\n\t\t\tleft=curMap.getCell(nodePos[0] - 1, nodePos[1]);\r\n\t\t}\r\n\t\tif (nodePos[0] < N-1) {\r\n\t\t\tright=curMap.getCell(nodePos[0]+1, nodePos[1]);\r\n\t\t}\r\n\t\t//for(int i=0;i<visitd.size();i++) {\r\n\t\t\t//System.out.println(Arrays.toString(visitd.get(i)));\t\r\n\t\t//}\r\n\t\t\r\n\t\t//check if the neighbor is wall,if its not add to the list\r\n\t\tif(nodePos[1]>0 && !upper.isWall() && (!exists(visitd,new int[] {nodePos[0], nodePos[1] - 1}))) {\r\n\t\t\t//Node e=new Node(this , this.N , this.M , new int[] {nodePos[0], nodePos[1] - 1},curMap);\r\n\t\t\t//if(e.getVisited()!=true) {\r\n\t\t\tNodeChildren.add(new Node(this , this.N , this.M , new int[] {nodePos[0], nodePos[1] - 1}, curMap)); // father of the new nodes is this node\r\n\t\t\t//}\r\n\t\t}\r\n\t\tif(nodePos[1]<M-1 &&!down.isWall() && (!exists(visitd,new int[] {nodePos[0], nodePos[1] + 1}))){\r\n\t\t\tNodeChildren.add(new Node(this , this.N , this.M , new int[] {nodePos[0], nodePos[1] + 1}, curMap));\r\n\t\t}\r\n\t\tif(nodePos[0]>0 && !left.isWall() && (!exists(visitd,new int[] {nodePos[0] - 1, nodePos[1]}))) {\r\n\t\t\tNodeChildren.add(new Node(this , this.N , this.M , new int[] {nodePos[0] - 1, nodePos[1]}, curMap));\r\n\t\t}\r\n\t\tif(nodePos[0]<N-1 && !right.isWall() && (!exists(visitd,new int[] {nodePos[0] + 1, nodePos[1]}))) {\r\n\t\t\tNodeChildren.add(new Node(this , this.N , this.M , new int[] {nodePos[0] + 1, nodePos[1]}, curMap));\r\n\t\t}\r\n\t\t//for(int i=0; i<NodeChildren.size();i++) {\r\n\t\t\t//System.out.println(\"Paidia sth find:\" + Arrays.toString(NodeChildren.get(i).getNodePos()));\r\n\t\t//}\r\n\t\t\t\t\t\t\r\n\t}", "private Cell searchEmptySurrounding(){\n List <Cell> blocks = getSurroundingCells(currentWorm.position.x, currentWorm.position.y);\n for (Cell block : blocks){\n if(!isCellOccupied(block)) return block;\n }\n return null;\n }", "public void updateIndex() {\n int i = this.index;\n if (i == -1 || i > HashBiMap.this.size || !Objects.equal(HashBiMap.this.keys[this.index], this.key)) {\n this.index = HashBiMap.this.findEntryByKey(this.key);\n }\n }", "private void asignNeighbours(String split [], String planetName){\n\t\tdouble length = Double.parseDouble(split[1]);\n\t\tboolean danger = Boolean.parseBoolean(split[2]);\n\t\t\n\t\tif(factoryMap.containsKey(planetName)&&factoryMap.containsKey(split[0])){\n\t\t\tfactoryMap.get(planetName).addNeghbour(new Path(length, factoryMap.get(split[0]), danger));\t\n\t\t}\n\t\tif(factoryMap.containsKey(planetName) && galaxy.containsKey(split[0])){\n\t\t\tfactoryMap.get(planetName).addNeghbour(new Path(length, galaxy.get(split[0]), danger));\t\n\t\t}\n\t\tif(galaxy.containsKey(planetName) && factoryMap.containsKey(split[0])){\n\t\t\tgalaxy.get(planetName).addNeghbour(new Path(length, factoryMap.get(split[0]), danger));\t\n\t\t}\n\t\tif(galaxy.containsKey(planetName) && galaxy.containsKey(split[0])){\n\t\t\tgalaxy.get(planetName).addNeghbour(new Path(length, galaxy.get(split[0]), danger));\n\t\t}\n\t}", "private void setNeighbors() {\n\t\tfor (int i = 0; i < getNumRows(); i++) {\n\t\t\tfor (int j = 0; j < getNumCols(); j++) {\n\t\t\t\tCell c = getCurrentGrid()[i][j];\n\t\t\t\tsetNeighborsForCell(c);\n\t\t\t}\n\t\t}\n\t}", "public @Override E set(int index, E element) {\n \tNode n = getNode(index);\n \tE result = n.data;\n \tn.data = element;\n \treturn result;\n }", "private void getNeighbors() {\n\t\tRowIterator iterator = currentGen.iterateRows();\n\t\twhile (iterator.hasNext()) {\n\t\t\tElemIterator elem = iterator.next();\n\t\t\twhile (elem.hasNext()) {\n\t\t\t\tMatrixElem mElem = elem.next();\n\t\t\t\tint row = mElem.rowIndex();\n\t\t\t\tint col = mElem.columnIndex();\n\t\t\t\tint numNeighbors = 0;\n\t\t\t\tfor (int i = -1; i < 2; i++) { // loops through row above,\n\t\t\t\t\t\t\t\t\t\t\t\t// actual row, and row below\n\t\t\t\t\tfor (int j = -1; j < 2; j++) { // loops through column left,\n\t\t\t\t\t\t\t\t\t\t\t\t\t// actual column, coloumn\n\t\t\t\t\t\t\t\t\t\t\t\t\t// right\n\t\t\t\t\t\tif (!currentGen.elementAt(row + i, col + j).equals(\n\t\t\t\t\t\t\t\tfalse)) // element is alive, add 1 to neighbor\n\t\t\t\t\t\t\t\t\t\t// total\n\t\t\t\t\t\t\tnumNeighbors += 1;\n\t\t\t\t\t\telse { // element is not alive, add 1 to its total\n\t\t\t\t\t\t\t\t// number of neighbors\n\t\t\t\t\t\t\tInteger currentNeighbors = (Integer) neighbors\n\t\t\t\t\t\t\t\t\t.elementAt(row + i, col + j);\n\t\t\t\t\t\t\tneighbors.setValue(row + i, col + j,\n\t\t\t\t\t\t\t\t\tcurrentNeighbors + 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tneighbors.setValue(row, col, numNeighbors - 1); // -1 to account\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// for counting\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// itself as a\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// neighbor\n\t\t\t}\n\t\t}\n\t}", "private int getIndex(T element) {\n int index = -1;\n for (int i = 0; i < this.container.length; i++) {\n if (this.container[i] != null && this.container[i].equals(element)) {\n index = i;\n break;\n }\n }\n return index;\n }", "@Override\n\tpublic int indexOf(E element) {\n\t\tif (element == null) {\n\t\t\tNode<E> node = first;\n\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\tif (node.elementE == null)return i;\n\t\t\t\tnode.next = node;\n\t\t\t}\n\t\t}else {\n\t\t\tNode<E> node = first;\n\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\tif (element.equals(node.elementE)) return i;\n\t\t\t\tnode.next = node;\n\t\t\t}\n\t\t}\n\t\treturn ELEMENT_NOT_FOUND;\n\t}", "void renewNeighbourClusters() {\n neighbourClusters = new HashMap<Cluster, Integer>();\n\n for (Person p : members) {\n for (Person x : p.getFriends()) {\n if (!members.contains(x)) {\n Cluster xC = x.getCluster();\n if (!neighbourClusters.containsKey(xC)) {\n neighbourClusters.put(xC, 1);\n } else {\n neighbourClusters.put(xC, neighbourClusters.get(xC) + 1);\n }\n }\n }\n }\n\n }", "static int nullNode() {\n\t\treturn -1;\n\t}", "public void unsetNwCell()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(NWCELL$26, 0);\n }\n }", "private void setNeighbors()\r\n {\r\n for (int x = 0; x < length+2; ++x)\r\n {\r\n for (int y = 0; y < width+2; ++y)\r\n {\r\n // North\r\n if (!this.board[x][y].northwall)\r\n {\r\n this.board[x][y].neighbors.add(this.board[x][y-1]);\r\n }\r\n // South\r\n if (!this.board[x][y].southwall)\r\n {\r\n this.board[x][y].neighbors.add(this.board[x][y+1]);\r\n }\r\n // East\r\n if (!this.board[x][y].eastwall)\r\n {\r\n this.board[x][y].neighbors.add(this.board[x+1][y]);\r\n }\r\n // West\r\n if (!this.board[x][y].westwall)\r\n {\r\n this.board[x][y].neighbors.add(this.board[x-1][y]);\r\n }\r\n }\r\n }\r\n }", "public Cell hunt() {\n for (int i = 0; i < height; i++) {\n for (int j = 0; j < width; j++) {\n if (cells[i][j].isVisited() == false && getNeighbors(cells[i][j], true).length >= 1) {\n //mark the found cell as visited\n cells[i][j].visit();\n //find all visited neighbors\n Cell[] visitedNeighbors = getNeighbors(cells[i][j], true);\n //connect this cell and one of the visited neighbors (choose randomly)\n cells[i][j].carveThrough(visitedNeighbors[numberGenerator.nextInt(visitedNeighbors.length)]);\n return cells[i][j];\n }\n }\n }\n return null;\n }", "public void removeNeighbour(final Vertex neighbour){\n\t\tif(getNeighbours().contains(neighbour))\n\t\t\tgetNeighbours().remove(neighbour);\n\t}", "public abstract int neighboursInBlock(Set<Integer> block, int vertexIndex);", "public void setElement(Pair<Integer, Integer> cell, int n){\n\t\tnumbers[cell.getFirst()][cell.getSecond()] = n;\n\t}", "private void updateEdgeInfor(int index, int preWordIndex, String word, String preWord) {\n \tif (index == preWordIndex || word == preWord)\n \t\treturn;\n if (!nodes.get(index).inlinks.containsKey(preWordIndex))\n nodes.get(index).inlinks.put(preWordIndex, 1);\n else {\n \tint vOld = nodes.get(index).inlinks.get(preWordIndex);\n \tnodes.get(index).inlinks.put(preWordIndex, vOld + 1);\n }\n if (!nodes.get(preWordIndex).outlinks.containsKey(index))\n nodes.get(preWordIndex).outlinks.put(index, 1);\n else {\n \tint vOld = nodes.get(preWordIndex).outlinks.get(index);\n \tnodes.get(preWordIndex).outlinks.put(index, vOld + 1);\n }\n nodes.get(index).inlinkCount++;\n nodes.get(preWordIndex).outlinkCount++;\n }", "public void Reset() \r\n {\r\n _index = -1;\r\n }", "public Collection<IntPair> findEmptyNeighbors(int x, int y);", "private void addAllNeighbours(@NonNull final Location searchLoc) {\n for (int x = -1; x < 2; x++) {\n for (int y = -1; y < 2; y++) {\n if ((x == 0) && (y == 0)) {\n continue;\n }\n final long foundKey = Location.getKey(searchLoc.getScX() + x, searchLoc.getScY() + y,\n searchLoc.getScZ());\n synchronized (unchecked) {\n if (!unchecked.contains(foundKey)) {\n unchecked.add(foundKey);\n }\n }\n }\n }\n \n final long foundKey = Location.getKey(searchLoc.getScX(), searchLoc.getScY(), searchLoc.getScZ() + 1);\n synchronized (unchecked) {\n if (!unchecked.contains(foundKey)) {\n unchecked.add(foundKey);\n }\n }\n }", "public Thing neighbor ( Animal animal, int direction ) {\n\n\t\tif ( direction == Direction.NONE ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tint drow = rowChange(direction), dcol = colChange(direction);\n\t\ttry {\n\n\t\t\treturn at(animal.getRow() + drow,animal.getColumn() + dcol);\n\n\t\t} catch ( ArrayIndexOutOfBoundsException e ) {\n\t\t\treturn null;\n\t\t}\n\t}", "private void e_Neighbours(int u){ \n int edgeDistance = -1; \n int newDistance = -1; \n \n // All the neighbors of v \n for (int i = 0; i < adj.get(u).size(); i++) { \n Node v = adj.get(u).get(i); \n \n // If current node hasn't already been processed \n if (!settled.contains(v.node)) { \n edgeDistance = v.cost; \n newDistance = dist[u] + edgeDistance; \n \n // If new distance is cheaper in cost \n if (newDistance < dist[v.node]) \n dist[v.node] = newDistance; \n \n // Add the current node to the queue \n pq.add(new Node(v.node, dist[v.node])); \n } \n } \n }", "public E set(int index, E data) \n throws IndexOutOfBoundsException,NullPointerException\n {\n if(index > size() || index < 0)\n {\n throw new IndexOutOfBoundsException();\n }\n Node currNode = getNth(index);\n if(data == null)\n {\n throw new NullPointerException();\n }\n currNode.data = data;\n return currNode.data; \n }", "public void setMark(int neighbour, boolean mark){\n\tedgMark[neighbour] = mark;\n }", "@Override\r\n public E set(int index, E element) {\r\n if (index < 0 || index >= size()) {\r\n throw new IndexOutOfBoundsException();\r\n }\r\n\r\n for (int i = 0; i < size; i++) {\r\n if (get(i).equals(element)) {\r\n throw new IllegalArgumentException();\r\n }\r\n }\r\n\r\n LinkedListIterator it = new LinkedListIterator(index);\r\n \r\n E replaced = it.next(); \r\n it.set(element);\r\n return replaced;\r\n }", "void removeRoadside(int i);", "private void addNeighbours(int index, int[] neighbours, List<Box> boxes){\n index=index - 1;\n for(int neighbour : neighbours) {\n neighbour=neighbour-1;\n boxes.get(index).addNeighbours(boxes.get(neighbour));\n }\n }", "public void uncover ()\n {\n for (DancingNode i=this.U; i!=this; i=i.U) // go up the column\n {\n for (DancingNode j=i.L; j!=i; j=j.L) // go left across the row \n {\n j.C.size++;\n j.relinkUD();\n }\n }\n this.relinkLR();\n }" ]
[ "0.5902664", "0.5496953", "0.5372908", "0.52925277", "0.526297", "0.5262245", "0.52225363", "0.520025", "0.5196459", "0.51382864", "0.51206076", "0.5104583", "0.5104214", "0.50994927", "0.50906616", "0.5090599", "0.5072099", "0.5042577", "0.50041556", "0.4983499", "0.4952428", "0.49352822", "0.4912204", "0.48936868", "0.48893827", "0.48724484", "0.48679492", "0.48376107", "0.48296443", "0.48248866", "0.48159483", "0.47863054", "0.4765764", "0.47616348", "0.47513616", "0.4744905", "0.47408694", "0.47142506", "0.47121054", "0.4694551", "0.46927872", "0.46889332", "0.4678888", "0.4671006", "0.46644783", "0.46633765", "0.46604472", "0.4659023", "0.46552303", "0.46547973", "0.46392092", "0.4636208", "0.4632354", "0.46316996", "0.46236587", "0.46228176", "0.46226797", "0.4610429", "0.46084744", "0.46057647", "0.4600605", "0.45939744", "0.459136", "0.45909178", "0.45821634", "0.45752168", "0.45748076", "0.4570996", "0.4570611", "0.45668834", "0.45578998", "0.45551026", "0.45525503", "0.45491272", "0.45441663", "0.4539525", "0.45373058", "0.45357218", "0.45224294", "0.45195115", "0.45121622", "0.45074645", "0.45007053", "0.449264", "0.44890815", "0.44877687", "0.44874525", "0.4485497", "0.4482701", "0.447423", "0.44675758", "0.4456213", "0.44560647", "0.44519722", "0.4449315", "0.44446984", "0.44442624", "0.44439727", "0.44414037", "0.44360775" ]
0.66428685
0
Returns the neighbour for the given index.
public TriangleElt3D getNeighbour(int index) { switch (index) { case 0: return this.eltZero; case 1: return this.eltOne; case 2: return this.eltTwo; default: return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract int getNeighboursNumber(int index);", "public abstract LinkedList<Integer> getNeighbours(int index);", "private List<CellIndex> getNeighbours( CellIndex index )\r\n {\n List<CellIndex> neighbours = new ArrayList<World.CellIndex>();\r\n if( index.x % EnvSettings.getMAX_X() != 0 )\r\n {\r\n neighbours.add( new CellIndex( index.x - 1, index.y, index.z ) );\r\n }\r\n if( index.x % EnvSettings.getMAX_X() != EnvSettings.getMAX_X() - 1 )\r\n {\r\n neighbours.add( new CellIndex( index.x + 1, index.y, index.z ) );\r\n }\r\n if( index.y % EnvSettings.getMAX_Y() != 0 )\r\n {\r\n neighbours.add( new CellIndex( index.x, index.y - 1, index.z ) );\r\n }\r\n if( index.y % EnvSettings.getMAX_Y() != EnvSettings.getMAX_Y() - 1 )\r\n {\r\n neighbours.add( new CellIndex( index.x, index.y + 1, index.z ) );\r\n }\r\n if( index.z % EnvSettings.getMAX_Z() != 0 )\r\n {\r\n neighbours.add( new CellIndex( index.x, index.y, index.z - 1 ) );\r\n }\r\n if( index.z % EnvSettings.getMAX_Z() != EnvSettings.getMAX_Z() - 1 )\r\n {\r\n neighbours.add( new CellIndex( index.x, index.y, index.z + 1 ) );\r\n }\r\n return neighbours;\r\n }", "public java.util.List<Integer> getNeighbors(int index);", "public int nextNeighbour(int i) {\r\n for (int j = 0; j < vertexNum; j++) {\r\n if (adjacencyMatrix[i][j] != 0 && !vertexList.get(j).isVisited) {\r\n return j;\r\n }\r\n }\r\n return -1;\r\n }", "public boolean hasNeighbour(int index) {\n\t\tswitch (index) {\n\t\tcase 0:\n\t\t\treturn this.eltZero != null;\n\t\tcase 1:\n\t\t\treturn this.eltOne != null;\n\t\tcase 2:\n\t\t\treturn this.eltTwo != null;\n\t\tdefault:\n\t\t\treturn false;\n\t\t}\n\t}", "@NotNull\r\n public Collection<Index> getNeighbors(@NotNull final Index index){\r\n Collection<Index> list = new ArrayList<>();\r\n int extracted = -1;\r\n try{\r\n extracted = primitiveMatrix[index.row+1][index.column]; //down\r\n list.add(new Index(index.row+1,index.column));\r\n }catch (ArrayIndexOutOfBoundsException ignored){}\r\n try{\r\n extracted = primitiveMatrix[index.row][index.column+1];//right\r\n list.add(new Index(index.row,index.column+1));\r\n }catch (ArrayIndexOutOfBoundsException ignored){}\r\n try{\r\n extracted = primitiveMatrix[index.row-1][index.column];//up\r\n list.add(new Index(index.row-1,index.column));\r\n }catch (ArrayIndexOutOfBoundsException ignored){}\r\n try{\r\n extracted = primitiveMatrix[index.row][index.column-1];//left\r\n list.add(new Index(index.row,index.column-1));\r\n }catch (ArrayIndexOutOfBoundsException ignored){}\r\n return list;\r\n }", "public ArrayList<Integer> getNeighbors(int index){\n\t\tArrayList<Integer> neighbors = new ArrayList<>();\n\t\tfor (Edge edge: edges) {\n\t\t\tif (edge.isVertexOfEdge(vertices.get(index))) {\n\t\t\t\tVertex n = edge.getAdjVertex(vertices.get(index));\n\t\t\t\tneighbors.add(vertices.indexOf(n));\n\t\t\t}\n\t\t}\n\t\treturn neighbors;\n\t}", "public IntArrayList getNeighbourCluster(int index) {\n\n /**List for storing the indexes of the cells in the cluster containing\n * the given index */\n cellCluster = new IntArrayList();\n\n /**The label of the cluster */\n int clusterLabel = (int) labelledVolume.value(index);\n\n /**Clear the linked list for the use of this algorithm */\n voxelStack.clear();\n voxelStack.push(imageMask.indexToGrid(index));\n\n /**Use iteration and recursion to get all the cells\n * within the cluster */\n while (voxelStack.size() > 0) {\n Index3D center = voxelStack.pop();\n getNeighbouringCells(center, center, clusterLabel);\n }\n return cellCluster;\n }", "PACKET getIndex(int index);", "private LinkedList<int[]> neighborFinder(){\n LinkedList<int[]> neighborhood= new LinkedList<>();\n int[] curr_loc = blankFinder();\n int x = curr_loc[0];\n int y = curr_loc[1];\n if(x >0){\n neighborhood.add(new int[]{x-1, y});\n }\n if(x < n-1){\n neighborhood.add(new int[]{x+1, y});\n }\n if(y > 0){\n neighborhood.add(new int[]{x, y-1});\n }\n if(y < n-1) {\n neighborhood.add(new int[]{x, y+1});\n }\n\n\n return neighborhood;\n }", "private Integer getRandomUnvisitedNeighbourIndex(int currentIndex) {\n\t\t\n\t\tArrayList<Integer> neighbors = setUnvisitedNeighbors(currentIndex);\n\t\t\n\t\tRandom random = new Random();\n\t\t\t\t\n\t\treturn neighbors.size() == 0 ? NOT_EXIST : neighbors.get(random.nextInt(neighbors.size())); \n\t}", "private Node getNode(int index) {\n \tif (index < 0 || index >= size)\n \t\tthrow new IndexOutOfBoundsException();\n \tNode result = sentinel;\n \t// invariant for both loops: result = this[i]\n \tif (index < size / 2)\n \t\tfor (int i = -1; i < index; i++)\n \t\t\tresult = result.succ;\n \telse\n \t\tfor (int i = this.size; i > index; i--)\n \t\t\tresult = result.pred;\n \treturn result;\n }", "protected abstract List<Integer> getNeighbors(int vertex);", "@Override\n protected KPMPSolution nextNeighbour() {\n List<KPMPSolutionWriter.PageEntry> edgePartition = bestSolution.getEdgePartition().stream().map(KPMPSolutionWriter.PageEntry::clone).collect(toCollection(ArrayList::new));\n KPMPSolution neighbourSolution = new KPMPSolution(bestSolution.getSpineOrder(), edgePartition, bestSolution.getNumberOfPages());\n edge = edgePartition.get(index);\n originalPageIndex = edge.page;\n newPageIndex = pageCounter;\n edgePartition.get(index).page = newPageIndex;\n index++;\n numberOfIterations++;\n return neighbourSolution;\n }", "private Node getNode(int index) {\n\t\treturn getNode(index, 0, size() - 1);\n\t}", "protected Node<U> getNodeAtIndex(int index) {\n\t\t\tNode<U> currNode;\n\n\t\t\tif (index < Math.ceil(mLength / 2)) {\n\t\t\t\tcurrNode = mHead;\n\t\t\t\tfor (int i = 0; i < index; ++i) {\n\t\t\t\t\tcurrNode = currNode.getNext();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcurrNode = mTail;\n\t\t\t\tfor (int i = mLength - 1; i > index; --i) {\n\t\t\t\t\tcurrNode = currNode.getPrev();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn currNode;\n\t\t}", "private Node findNode(int index){\n Node current = start;\n for(int i = 0; i < index; i++){\n current = current.getNext();\n }\n return current;\n }", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "public abstract int neighboursInBlock(Set<Integer> block, int vertexIndex);", "public int getIndex();", "public int getIndex();", "public int getIndex();", "private static String findNode(int index){\n return indexTable.get(index);\n }", "@Override\n\tpublic List<Integer> getNeighbours(int v) {\n\t\treturn null;\n\t}", "public Room neighbour(Direction direction) {\r\n\t\treturn this.neighbours.get(direction);\r\n\t}", "public ListNode findIndexNode(int index)\n {\n //should probably hande this by throwing an exception when head == null rather than using the if statement.\n if (head != null)\n {\n int counter = 0;\n ListNode iteratorNode = head;\n do\n { \n if (counter + 1 == index)\n {\n return iteratorNode;\n }\n if (iteratorNode.getNext() != null)\n {\n iteratorNode = iteratorNode.getNext();\n counter++;\n }\n } while(counter + 1 <= size);\n }\n return head;\n }", "public int getSideIndex(Tile adjacent){\r\n for(int i = 0; i < adjTiles.length; i++){\r\n if(adjTiles[i] == adjacent) return i;\r\n }\r\n return -1;\r\n }", "private static int getNodeIndex(int index, int depth) {\n return (index >>> depth) & 0x1F;\n }", "uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureNode getNode(int index);", "public int getNextUnvisitedNeighbor (int v){\n for (int j=0; j<nVerts; j++) {\n if (adjMat[v][j] == 1 && vertextList[j].wasVisited == false) \n return j\n return -1; // none found\n }\n }", "private Node getNodeAt(int index) {\n\t\tNode node = head;\n\t\t// follow the links between nodes until it counts off the right number\n\t\tfor (int i = 0; i < index; i++) {\n\t\t\tif (node == null) {\n\t\t\t\t// In case we run out of nodes before we get up to the desired index, return null\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tnode = node.getNext();\n\t\t}\n\t\treturn node;\n\t}", "PositionVector getWaypoint(int index);", "public boolean neighborOf(Index other, int dist) {\n\t \t\t\n\t \t\tassert(dist >= 0);\n\t \t\n\t \t\treturn Math.abs(other.i - this.i) <= dist && Math.abs(other.j - this.j) <= dist;\n\t \t}", "public Thing neighbor ( Animal animal, int direction ) {\n\n\t\tif ( direction == Direction.NONE ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tint drow = rowChange(direction), dcol = colChange(direction);\n\t\ttry {\n\n\t\t\treturn at(animal.getRow() + drow,animal.getColumn() + dcol);\n\n\t\t} catch ( ArrayIndexOutOfBoundsException e ) {\n\t\t\treturn null;\n\t\t}\n\t}", "public Tile getAdj(int sideIndex){\r\n return adjTiles[sideIndex];\r\n }", "private void findNeighbour(int offset) {\n TreeNodeImpl node = (TreeNodeImpl) projectTree.getLastSelectedPathComponent();\n TreePath parentPath = projectTree.getSelectionPath().getParentPath();\n NodeList list = (NodeList) node.getParent().children();\n\n for (int i = 0; i < list.size(); ++i) {\n if (list.get(i).equals(node)) {\n if (offset > 0 && i < list.size() - offset) {\n projectTree.setSelectionPath(parentPath.pathByAddingChild(list.get(i + offset)));\n break;\n }\n if (offset < 0 && i >= offset) {\n projectTree.setSelectionPath(parentPath.pathByAddingChild(list.get(i + offset)));\n break;\n }\n }\n }\n }", "private Coordinate getNeighbour(boolean locked) {\n\t\tSet<Coordinate> set = locked ? lockedNeighbours : unlockedNeighbours;\n\t\tif (set.isEmpty()) return null;\n\t\treturn (Coordinate) set.toArray()[new Random().nextInt(set.size())];\n\t}", "public long getNodeIndex();", "private Node<T> find(int index) throws IndexException {\n if (!isValid(index)) {\n throw new IndexException();\n }\n\n Node<T> node = head;\n int counter = 0;\n while (node != null && counter < index) {\n node = node.next;\n counter = counter + 1;\n }\n return node;\n }", "private DoublyNode find(int index) {\r\n\t\tDoublyNode curr = head;\r\n\r\n\t\t// due to the dummy head, we skip nodes for index times\r\n\t\tfor (int skip = 1; skip <= index; skip++) {\r\n\t\t\tcurr = curr.getNext();\r\n\t\t}\r\n\t\treturn curr;\r\n\t}", "protected Hole getHoleByIndex(int index){\n return getHoles()[index];\n }", "public int getNodeIndexAt(int index)\n {\n if (index < 0 || index > 1)\n {\n throw new IllegalArgumentException();\n }\n \n return this.nodeList[index];\n }", "int getCell(int x, int y) {\n try {\n return hiddenGrid[x][y];\n } catch (IndexOutOfBoundsException hiddenIndex) {}\n return hiddenGrid[x][y];\n }", "int node(final int index) {\r\n\t\tif (index < (size >> 1)) {\r\n\t\t\tint x = first;\r\n\t\t\tfor (long l = 0; l < index; l++) {\r\n\t\t\t\tx = getNextPointer(x);\r\n\t\t\t}\r\n\t\t\treturn x;\r\n\t\t} else {\r\n\t\t\tint x = last;\r\n\t\t\tfor (int i = size - 1; i > index; i--) {\r\n\t\t\t\tx = getPrevPointer(x);\r\n\t\t\t}\r\n\t\t\treturn x;\r\n\t\t}\r\n\t}", "public Node getNode(int index) {\r\n\t\tif (index < 1 || index > this.size()) {\r\n\t\t\ttry {\r\n\t\t\t\tthrow new IllegalIndexException(\"Exception: the index's out of boundary!\");\r\n\t\t\t} catch (IllegalIndexException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (index == 1) {\r\n\t\t\treturn head;\r\n\t\t}else if (index == this.size()) {\r\n\t\t\treturn tail;\r\n\t\t}else {\r\n\t\t\tint pointerIndex = 1;\r\n\t\t\tpointer = head;\r\n\t\t\twhile (pointerIndex < index) {\r\n\t\t\t\tpointer = pointer.getNext();\r\n\t\t\t\tpointerIndex++;\r\n\t\t\t}\r\n\t\t\treturn pointer;\r\n\t\t}\r\n\t}", "public int getIndex(int position);", "public MapCell getNeighbor(String neighbor){\n\t\tMapCell neighborCell = null;\n\t\ttry {\n\t\t\tif(neighbor.equalsIgnoreCase(\"east\")){\t\t\t\t\n\t\t\t\tneighborCell = eastCell;\n\t\t\t}else if(neighbor.equalsIgnoreCase(\"north\")){\t\t\t\t\n\t\t\t\tneighborCell = northCell;\n\t\t\t}else if(neighbor.equalsIgnoreCase(\"west\")){\t\t\t\t\n\t\t\t\tneighborCell = westCell;\n\t\t\t}else if(neighbor.equalsIgnoreCase(\"south\")){\t\t\t\t\n\t\t\t\tneighborCell = southCell;\n\t\t\t}\n\t\t}catch(NullPointerException np){\n\t\t\treturn neighborCell;\n\t\t}catch(Exception e){\n\t\t\treturn neighborCell;\n\t\t}\n\t\treturn neighborCell;\n\t}", "public int getIteratorByIndex(int index) {\n int current = 0;\n for (int j = 0; j < numberOfBlocks; ++j) {\n if (current + endOfBlock[j] - (len * j << 1) > index) {\n int indexInData = (len * j << 1) + (index - current);\n return indexInData;\n } else current += endOfBlock[j] - (len * j << 1);\n }\n return NO_ELEMENT;\n }", "private Node find(int index)\n {\n Node curr = head;\n for(int i = 0; i < index; i++)\n {\n curr = curr.next;\n }\n return curr;\n }", "private int getParentOf(int index) {\n // TODO: YOUR CODE HERE\n return index / 2;\n }", "public int[] getNeighborRowIndex() {\n return neighborRowIndex;\n }", "private int getNearestNode(LatLng vic) {\n\t\tint node = 0;\n\t\tfor(int j=0; j<nodeList.size()-1; j++){\n\t\t\tdouble dist1 = getWeight(vic, nodeList.get(node));\n\t\t\tdouble dist2 = getWeight(vic, nodeList.get(j));\n\t\t\tif(dist1 > dist2){\n\t\t\t\tnode = j;\n\t\t\t}\n\t\t}\n\t\treturn node;\n\t}", "protected Cell[] getNeighbours() {\r\n\t\treturn this.neighbours;\r\n\t}", "public Field getNeighbor(Directions dir) {\n return neighbors[dir.ordinal()];\n }", "private static Point GetRandomNeighbour(Point current)\n {\n List<Cell> neighbours = new ArrayList<Cell>();\n\n int cX = current.X;\n int cY = current.Y;\n\n //right\n if (cX + 1 <= Size - 1)\n {\n neighbours.add(cells[cX + 1][cY]);\n }\n //left\n if (cX - 1 >= 0)\n {\n neighbours.add(cells[cX - 1][ cY]);\n }\n //Upper\n if (cY - 1 >= 0)\n {\n neighbours.add(cells[cX][cY - 1]);\n }\n //Lower\n if (cY + 1 <= Size - 1)\n {\n neighbours.add(cells[cX][cY + 1]);\n }\n\n\n //Declare and initialize a new list called toRemove\n //We then run a foreach loop that iterates over every Cell in neighbours\n //If Cell n is already visited, add it to toRemove list\n List<Cell> toRemove = new ArrayList<>();\n\n for (Cell n : neighbours)\n {\n if (n.Visited)\n {\n toRemove.add(n);\n }\n }\n //After the foreach loop, remove all cells in neighbours that matches the cells in toRemove\n //We need to do it this way because Java doesn't like to change a list while we iterate over it\n neighbours.removeAll(toRemove);\n\n //Check if neighbours list is empty, if not then return a randomly chosen neighbour\n if (neighbours.size() > 0)\n {\n return neighbours.get(RandomNum.Next(0, neighbours.size())).Point;\n }\n\n return null;\n }", "int index();", "public LinkedList<Integer> getNeighbors(int v) {\n return adjList.get(v);\n }", "protected final int clueFromIndex(final int index) {\n\t\treturn clueFromOffset(index - head());\n\t}", "List<Integer> getNeighbors(int x);", "private Solution getNeighbourSolution(int size) {\n Solution solution = new Solution(currentSol);\n // Choose a random item to take/leave\n int index = generator.nextInt(size);\n solution.set(index, Math.abs(currentSol.get(index) - 1));\n\n return solution;\n }", "public int getPosition(int index);", "public List<Integer> getNeighbourIds() {\n List<Integer> neighbours = new ArrayList<>();\n // get references from the neighbouring cells.\n for (VoronoiHalfEdge halfEdge : halfEdges) {\n VoronoiEdge edge = halfEdge.getEdge();\n if (edge.getLeftSite() != null && edge.getLeftSite().getIdentifier() != site.getIdentifier()) {\n neighbours.add(edge.getLeftSite().getIdentifier());\n } else if (edge.getRightSite() != null && edge.getRightSite().getIdentifier() != site.getIdentifier()) {\n neighbours.add(edge.getRightSite().getIdentifier());\n }\n }\n return neighbours;\n }", "@Override\n\tpublic List<Location> getNeighbors(Location vertex) {\n\n\t\tArrayList<Location> neighbors = new ArrayList<Location>();\n\n\t\tfor (Path p : getOutEdges(vertex))\n\t\t\tneighbors.add(p.getDestination());\n\n\t\treturn neighbors;\n\n\n\t}", "private int[] getNeighbourSolution(int[] solution, int index1, int index2){\n int[] neighbourSolution = new int[solution.length];\n int swapCityAux = 0;\n\n for(int i = 0; i <= neighbourSolution.length - 1; i++){\n neighbourSolution[i] = solution[i];\n }\n\n swapCityAux = neighbourSolution[index1];\n neighbourSolution[index1] = neighbourSolution[index2];\n neighbourSolution[index2] = swapCityAux;\n\n return neighbourSolution;\n }", "private Node getNodeAt(int index){\n // first check if index is within valid index range [0,size]:\n if(index<0 || index>size) \n throw new IndexOutOfBoundsException(\"Faild to perfomr getNode() because the \"+ index +\" index that you have specified is way out of bounds!\");\n Node temp = first;\n while(index>=0) {\n temp = temp.next; // advance the reference to the next node in the list\n index--;\n }\n return temp;\n }", "public int getIndex(\n )\n {return index;}", "public Location getNeighbor(int direction)\n\t{\n\t\tint\tnewX = mX;\n\t\tint newY = mY;\n\t\t\n\t\tswitch (direction)\n\t\t{\n\t\t\tcase NORTH: newY--; break;\n\t\t\tcase NORTHEAST: newX++; newY--; break;\n\t\t\tcase EAST: newX++; break;\n\t\t\tcase SOUTHEAST: newX++; newY++; break;\n\t\t\tcase SOUTH: newY++; break;\n\t\t\tcase SOUTHWEST: newX--; newY++; break;\n\t\t\tcase WEST: newX--; break;\n\t\t\tcase NORTHWEST: newX--; newY--; break;\n\t\t\tdefault: throw new IllegalArgumentException(\"No such direction\");\n\t\t}\n\t\t\n\t\treturn new Location(newX, newY);\n\t}", "private Node<AnyType> getNode(int index) throws IndexOutOfBoundsException {\n \n /**\n * -------------------------------------------\n * TODO: You fully implement this method\n * \n * Your implementation MUST do the following link traversals:\n * \n * 1) If the index location is <= floor( size/2 ), start traversal from head node\n * 2) if the index location is > floor( size/2), start traversal from tail node\n * \n * Your code will be reviewed by instructor to ensure the two conditions\n * are fully meet by your solution.\n * \n */\n \n if ( index < 0 || index >= size ) {\n \n throw new IndexOutOfBoundsException();\n \n }\n \n Node<AnyType> node = null;\n \n if ( index <= Math.floor( ((double)size)/2.0 ) ) {\n \n node = headNode;\n \n for ( int i=1; i<=index; i++ ) {\n \n node = node.getNextNode();\n \n }\n \n } else {\n \n node = tailNode;\n \n for ( int i=(size-1); i>index; i-- ) {\n \n node = node.getPreviousNode();\n \n }\n \n }\n \n return node;\n \n }", "protected int[] getNeighbourSolution(int[] solution){\n int randomIndex1 = random.nextInt(solution.length - 1);\n int randomIndex2 = random.nextInt(solution.length - 1);\n\n return getNeighbourSolution(solution, randomIndex1, randomIndex2);\n }", "public List<Location> neighbors (Location pos);", "private CommunicationLink getNodeByIndex(int index)\n {\n if (allNodes.size() == 0)\n {\n return null;\n }\n try\n {\n return allNodes.get(nodeIds.get(index));\n } catch (Exception e)\n {\n return null;\n }\n }", "private Node<T> getNodeAtIndex(int index) {\r\n if (index < 0 || size() <= index) {\r\n throw new IndexOutOfBoundsException(\"No element exists at \"\r\n + index);\r\n }\r\n Node<T> current = head.next(); // as we have a sentinel node\r\n for (int i = 0; i < index; i++) {\r\n current = current.next();\r\n }\r\n return current;\r\n }", "public SubCell neighbor(Direction dir) {\n switch (dir) {\n case N:\n return new SubCell(x(), y() - 1);\n case E:\n return new SubCell(x() + 1, y());\n case S:\n return new SubCell(x(), y() + 1);\n case W:\n return new SubCell(x() - 1, y());\n default:\n return new SubCell(x(), y());\n }\n }", "public Set<Pair<V,V>> neighbourEdgesOf(V vertex);", "public Neurone getConnexion(int index) {\n\t\treturn connexions.get(index);\n\t}", "public Iterator<Integer> neighbors(int i)\n {\n return adjList[i].iterator();\n }", "public Collection<N> neighbors();", "private int getNeighbours(Container[][][] buffer) {\n int neighbours = 0;\n if (indexPosition.x + 1 < buffer.length && buffer[(int) indexPosition.x + 1][(int) indexPosition.y][(int) indexPosition.z] != null) {\n neighbours++;\n }\n if (indexPosition.x - 1 >= 0 && buffer[(int) indexPosition.x - 1][(int) indexPosition.y][(int) indexPosition.z] != null) {\n neighbours++;\n }\n if (indexPosition.y + 1 < buffer[0].length && buffer[(int) indexPosition.x][(int) indexPosition.y + 1][(int) indexPosition.z] != null) {\n neighbours++;\n }\n if (indexPosition.y - 1 >= 0 && buffer[(int) indexPosition.x][(int) indexPosition.y - 1][(int) indexPosition.z] != null) {\n neighbours++;\n }\n if (indexPosition.z + 1 < buffer[0][0].length && buffer[(int) indexPosition.x][(int) indexPosition.y][(int) indexPosition.z + 1] != null) {\n neighbours++;\n }\n if (indexPosition.z - 1 >= 0 && buffer[(int) indexPosition.x][(int) indexPosition.y][(int) indexPosition.z - 1] != null) {\n neighbours++;\n }\n return neighbours;\n }", "private int findNthElement(int index) {\n if (head == null)\n return 0;\n ListNode pointer1 = head;\n ListNode pointer2 = head;\n int count = 0;\n while (count < index) {\n pointer1 = pointer1.next;\n count++;\n }\n while (pointer1.next != null) {\n pointer1 = pointer1.next;\n pointer2 = pointer2.next;\n }\n return pointer2.data;\n }", "Expression getIndexExpr();", "private DoublyLinkedNode<E> getNodeAt(int index) {\n if (index >= 0 && index <= size && !this.isEmpty()) {\n DoublyLinkedNode<E> iter = head.getNext();\n for (int i = 0; i < index; i++) {\n iter = iter.getNext();\n }\n\n return iter;\n }\n else {\n throw new IndexOutOfBoundsException();\n }\n }", "private Node getNth(int index) \n { \n int currIndex = 0;\n Node currNode = this.head.next;\n while(currIndex < index)\n {\n currNode = currNode.getNext();\n currIndex++;\n }\n return currNode;\n }", "private ListNode nodeAt(int index) {\n\t\tListNode current = front;\n\t\tfor (int i = 0; i < index; i++) {\n\t\t\tcurrent = current.next;\n\t\t}\n\t\treturn current;\n\t}", "public abstract int getIndex();", "public Node getNodeFromGivenIndex(int index){\n //Index validation\n checkIndex(index);\n\n int i = 0;\n Node current = head;\n while (i<index){\n current = current.next;\n i++;\n }\n return current;\n }", "public int getIndex() {\n\t\treturn index & 0xffff;\n\t}", "public final int getIndex(){\n return index_;\n }" ]
[ "0.7974736", "0.7486516", "0.7235851", "0.7221478", "0.6592574", "0.6481458", "0.6399151", "0.6376532", "0.62697256", "0.6242164", "0.62239826", "0.62037265", "0.6109961", "0.6063069", "0.60347486", "0.6027249", "0.6012993", "0.60018975", "0.59813976", "0.59813976", "0.59813976", "0.59813976", "0.59813976", "0.59813976", "0.59813976", "0.59813976", "0.59813976", "0.59813976", "0.59813976", "0.59813976", "0.59813976", "0.5946539", "0.58721465", "0.58721465", "0.58721465", "0.5866951", "0.58561635", "0.5849728", "0.58477354", "0.58461577", "0.5836571", "0.5827838", "0.58232456", "0.581667", "0.5809927", "0.5807408", "0.57935447", "0.57795125", "0.57770103", "0.5770664", "0.57568794", "0.5748335", "0.57461727", "0.5745483", "0.57155335", "0.57143855", "0.57050407", "0.5704621", "0.56827265", "0.56816846", "0.56804717", "0.56778926", "0.56778735", "0.5674867", "0.56736016", "0.56712234", "0.5660812", "0.5655853", "0.5646751", "0.56439936", "0.56330657", "0.5630761", "0.56193656", "0.561716", "0.5611787", "0.56099004", "0.5608961", "0.5601844", "0.5585053", "0.55850476", "0.5583556", "0.5580599", "0.5577917", "0.55747133", "0.5570909", "0.5566487", "0.556638", "0.5561975", "0.55605525", "0.55572414", "0.5538721", "0.55309236", "0.55293304", "0.55195636", "0.5517713", "0.5513289", "0.55117846", "0.5510137", "0.5505581", "0.5502123" ]
0.74970245
1
Returns the neighbours as array (of size of neighbours count).
public TriangleElt3D[] getNeighbours() { int counter = 0; if (this.eltZero != null) counter++; if (this.eltOne != null) counter++; if (this.eltTwo != null) counter++; TriangleElt3D[] neighbours = new TriangleElt3D[counter]; counter = 0; if (this.eltZero != null) { neighbours[counter] = this.eltZero; counter++; } if (this.eltOne != null) { neighbours[counter] = this.eltOne; counter++; } if (this.eltTwo != null) { neighbours[counter] = this.eltTwo; } return neighbours; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected Cell[] getNeighbours() {\r\n\t\treturn this.neighbours;\r\n\t}", "public int[] getNeighborhoodArray()\n\t{\n\t\treturn neighborhoodArray;\n\t}", "public ArrayList<Double> getNeighboursData() {\n\t\tArrayList<Double> result = new ArrayList<Double>();\n\n\t\tfor (Border curBorder: allBorder) {\n\t\t\tresult.add(curBorder.length);\n\t\t}\n\n\t\treturn result;\n\t}", "private ArrayList<int[]> getAllNeighbours(int[] solution){\n ArrayList<int[]> neighbours = new ArrayList<int[]>();\n\n for(int i = 0; i <= solution.length - 1; i++){\n for(int j = solution.length - 1; j > i; j--){\n neighbours.add(getNeighbourSolution(solution, i, j));\n }\n }\n\n this.numberOfNeighbours = neighbours.size();\n return neighbours;\n }", "public Collection<N> neighbors();", "public int[] getNeighbours(int node) {\n ArrayList ns = new ArrayList(10);// should be plenty\n for (int i = 0; i < nodeCount; i++)\n if (roads[node][i] > 0)\n ns.add(Integer.valueOf(i));\n int[] nbs = new int[ns.size()];\n for (int i = 0; i < ns.size(); i++)\n nbs[i] = ((Integer) ns.get(i)).intValue();\n return nbs;\n }", "public abstract List<AStarNode> getNeighbours();", "public ArrayList<Node> getNeighbors(){\n ArrayList<Node> result = new ArrayList<Node>();\n for(Edge edge: edges){\n result.add(edge.end());\n }\n return result;\n }", "public int[] getUnderlyingNeighbours(int node) {\n ArrayList ns = new ArrayList(10);// should be plenty\n for (int i = 0; i < nodeCount; i++)\n if (roads[node][i] > 0 || roads[i][node] > 0)\n ns.add(Integer.valueOf(i));\n int[] nbs = new int[ns.size()];\n for (int i = 0; i < ns.size(); i++)\n nbs[i] = ((Integer) ns.get(i)).intValue();\n return nbs;\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic ArrayList<Node<A>> neighbours(){\n\t\t\n\t\tArrayList<Node<A>> output = new ArrayList<Node<A>>();\n\t\t\n\t\tif (g == null) return output;\n\t\t\n\t\tfor (Object o: g.getEdges()){\n\n\t\t\t\n\t\t\tif (((Edge<?>)o).getTo().equals(this)) {\n\t\t\t\t\n\t\t\t\tif (!output.contains(((Edge<?>)o).getFrom()))\n\t\t\t\t\t\toutput.add((Node<A>) ((Edge<?>)o).getFrom());\n\t\t\t\t\n\t\t\t}\n\n\t\t} \n\t\treturn output;\n\t\t\n\t}", "public MapCell[] getNeighbors(){\n\t\tMapCell[] neighbors = new MapCell[4];\n\t\tneighbors[0] = getNeighbor(\"east\");\n\t\tneighbors[1] = getNeighbor(\"north\");;\n\t\tneighbors[2] = getNeighbor(\"west\");\n\t\tneighbors[3] = getNeighbor(\"south\");\n\t\treturn neighbors;\n\t}", "public ArrayList<Integer> getNeighbours() {\n\t\tArrayList<Integer> result = new ArrayList<Integer>();\n\n\t\tfor (Border curBorder: allBorder) {\n\t\t\tresult.add(curBorder.countryID);\n\t\t}\n\n\t\treturn result;\n\t}", "public List<Tile> getNeighbours() {\n \r\n return neighbours;\r\n }", "public ArrayList<Integer> getNeighbors() {\n\t\treturn neighbors;\n\t}", "public Vector getNeighbors()\n\t{\n\t\tVector neighbors = new Vector(8);\n\t\t\n\t\tneighbors.addElement(getNeighbor(NORTH));\n\t\tneighbors.addElement(getNeighbor(NORTHEAST));\n\t\tneighbors.addElement(getNeighbor(EAST));\n\t\tneighbors.addElement(getNeighbor(SOUTHEAST));\n\t\tneighbors.addElement(getNeighbor(SOUTH));\n\t\tneighbors.addElement(getNeighbor(SOUTHWEST));\n\t\tneighbors.addElement(getNeighbor(WEST));\n\t\tneighbors.addElement(getNeighbor(NORTHWEST));\n\n\t\treturn neighbors;\n\t}", "protected int[] GetConnectedJunctions() {\n\t\tint Size = this.JunctionsConnectedList.length;\n\t\tint[] ReturnArray = new int[Size];\n\n\t\tfor(int i=0; i<Size; i++) {\n\t\t\tReturnArray[i] = this.JunctionsConnectedList[i][0];\n\t\t}\n\n\t\treturn ReturnArray;\n\t}", "public ArrayList<Territory> getNeighbours() {\n\t\treturn neighbours;\n\t}", "public Collection<MyNode> getNeighbors(){\r\n return new ArrayList<>(this.neighbors);\r\n }", "public List<Integer> getNeighbourIds() {\n List<Integer> neighbours = new ArrayList<>();\n // get references from the neighbouring cells.\n for (VoronoiHalfEdge halfEdge : halfEdges) {\n VoronoiEdge edge = halfEdge.getEdge();\n if (edge.getLeftSite() != null && edge.getLeftSite().getIdentifier() != site.getIdentifier()) {\n neighbours.add(edge.getLeftSite().getIdentifier());\n } else if (edge.getRightSite() != null && edge.getRightSite().getIdentifier() != site.getIdentifier()) {\n neighbours.add(edge.getRightSite().getIdentifier());\n }\n }\n return neighbours;\n }", "public ArrayList<Integer> neighNumbers() {\n ArrayList<Integer> neighNumbers = new ArrayList<Integer>();\n if(isValid(this.frame-10)) { neighNumbers.add(this.frame-10); }\n if(isValid(this.frame+10)) { neighNumbers.add(this.frame+10); }\n\n //Right edge\n if(this.frame % 10 == 0) {\n if(isValid(this.frame+9)) { neighNumbers.add(this.frame+9); }\n if(isValid(this.frame-1)) { neighNumbers.add(this.frame-1); }\n if(isValid(this.frame-11)) { neighNumbers.add(this.frame-11); }\n\n }\n\n //Left edge\n else if((this.frame -1) % 10 == 0) {\n if(isValid(this.frame-9)) { neighNumbers.add(this.frame-9); }\n if(isValid(this.frame+1)) { neighNumbers.add(this.frame+1); }\n if(isValid(this.frame+11)) { neighNumbers.add(this.frame+11); }\n }\n\n else {\n if(isValid(this.frame-11)) { neighNumbers.add(this.frame-11); }\n if(isValid(this.frame+11)) { neighNumbers.add(this.frame+11); }\n if(isValid(this.frame-1)) { neighNumbers.add(this.frame-1); }\n if(isValid(this.frame+1)) { neighNumbers.add(this.frame+1); }\n if(isValid(this.frame-9)) { neighNumbers.add(this.frame-9); }\n if(isValid(this.frame+9)) { neighNumbers.add(this.frame+9); }\n }\n\n return neighNumbers;\n }", "public java.util.List<Integer> getNeighbors(int index);", "private LinkedList<int[]> neighborFinder(){\n LinkedList<int[]> neighborhood= new LinkedList<>();\n int[] curr_loc = blankFinder();\n int x = curr_loc[0];\n int y = curr_loc[1];\n if(x >0){\n neighborhood.add(new int[]{x-1, y});\n }\n if(x < n-1){\n neighborhood.add(new int[]{x+1, y});\n }\n if(y > 0){\n neighborhood.add(new int[]{x, y-1});\n }\n if(y < n-1) {\n neighborhood.add(new int[]{x, y+1});\n }\n\n\n return neighborhood;\n }", "public ArrayList<Collidable> getNeighbors();", "List<Integer> getNeighbors(int x);", "public int[] getNodeIndicesArray() {\n \t\tginy_nodes.trimToSize();\n \t\treturn giny_nodes.elements();\n \t}", "public int[] neighbors(int a){\n int[] neighbors = new int[size];\n \n for(int i=0;i<size;i++){\n neighbors[i] = (-1);\n }\n\n int iter =0, i=0;\n while(i<size){\n if(adjMatrix[a][i]==1){\n neighbors[iter] = i;\n iter++;\n }\n i++;\n }\n return neighbors;\n }", "public Cell[] getNeighbors(Cell cell) {\n int index = 0;\n Cell neighbors[] = new Cell[4];\n //check top neighbour\n if (cell.getRow() > 0) {\n neighbors[index] = cells[cell.getRow() - 1][cell.getColumn()];\n index++;\n }\n //check left neighbor\n if (cell.getColumn() > 0) {\n neighbors[index] = cells[cell.getRow()][cell.getColumn()-1];\n index++;\n }\n //check bottom neighbor\n if (cell.getRow() < height - 1) {\n neighbors[index] = cells[cell.getRow() + 1][cell.getColumn()];\n index++;\n }\n //check right neighbor\n if (cell.getColumn() < width - 1) {\n neighbors[index] = cells[cell.getRow()][cell.getColumn()+1];\n index++;\n }\n\n //if there are only 3 neighbor cells, copy cells into smaller array\n if (index == 3) {\n Cell neighbors2[] = new Cell[3];\n for (int i = 0; i < neighbors2.length; i++) {\n neighbors2[i] = neighbors[i];\n }\n return neighbors2;\n //if there are only 2 neighbor cells, copy cells into smaller array\n } else if (index == 2) {\n Cell neighbors2[] = new Cell[2];\n for (int i = 0; i < neighbors2.length; i++) {\n neighbors2[i] = neighbors[i];\n }\n return neighbors2;\n }\n return neighbors;\n }", "public int[] getEdgeIndicesArray() {\n \t\tginy_edges.trimToSize();\n \t\treturn giny_edges.elements();\n \t}", "public Iterable<Board> neighbors() {\n LinkedList<Board> states = new LinkedList<>();\n LinkedList<int[]> neighbors = neighborFinder();\n int[] curr_loc = blankFinder();\n\n for(int[] temp : neighbors){\n tiles[curr_loc[0]][curr_loc[1]] = tiles[temp[0]][temp[1]];\n tiles[temp[0]][temp[1]] = 0;\n states.add(new Board(deepCopy(tiles)));\n tiles[temp[0]][temp[1]] = tiles[curr_loc[0]][curr_loc[1]];\n tiles[curr_loc[0]][curr_loc[1]] = 0;\n\n }\n return states;\n }", "public abstract int getNeighboursNumber(int index);", "public List<Cell> getNeighbors() {\n return this.neighbors;\n }", "public abstract ArrayList<String> neighbours(String vertLabel);", "java.util.List<rina.object.gpb.Neighbour_t.neighbor_t> \n getNeighborList();", "public int[] getFinalNodes() {\n return IntStream.range(0, links.length)\n .filter(i -> getNextNodes(i).length == 0)\n .toArray();\n }", "public List<Point> getPossibleNeighbours() {\n List<Point> points = new ArrayList<>();\n int x = point.getX();\n int y = point.getY();\n Arrays.asList(x - 1, x, x + 1).forEach(i -> {\n Arrays.asList(y - 1, y, y + 1).forEach(j -> {\n points.add(new Point(i, j));\n });\n });\n // remove self\n points.remove(new Point(x, y));\n return points;\n }", "private int getNeighbours(Container[][][] buffer) {\n int neighbours = 0;\n if (indexPosition.x + 1 < buffer.length && buffer[(int) indexPosition.x + 1][(int) indexPosition.y][(int) indexPosition.z] != null) {\n neighbours++;\n }\n if (indexPosition.x - 1 >= 0 && buffer[(int) indexPosition.x - 1][(int) indexPosition.y][(int) indexPosition.z] != null) {\n neighbours++;\n }\n if (indexPosition.y + 1 < buffer[0].length && buffer[(int) indexPosition.x][(int) indexPosition.y + 1][(int) indexPosition.z] != null) {\n neighbours++;\n }\n if (indexPosition.y - 1 >= 0 && buffer[(int) indexPosition.x][(int) indexPosition.y - 1][(int) indexPosition.z] != null) {\n neighbours++;\n }\n if (indexPosition.z + 1 < buffer[0][0].length && buffer[(int) indexPosition.x][(int) indexPosition.y][(int) indexPosition.z + 1] != null) {\n neighbours++;\n }\n if (indexPosition.z - 1 >= 0 && buffer[(int) indexPosition.x][(int) indexPosition.y][(int) indexPosition.z - 1] != null) {\n neighbours++;\n }\n return neighbours;\n }", "public Point[] neighbors (Point p) {\n Point[] pointsAround = this.pointsAround(p);\n ArrayList<Point> neighbors = new ArrayList<Point>();\n for (Point p2 : pointsAround)\n if (this.adjacence(p, p2))\n neighbors.add(p2);\n return neighbors.toArray(new Point[neighbors.size()]);\n }", "public ArrayList<Cell> getNeighbours(int radius) {\r\n return locateCell.getAdjacentCells(radius);\r\n }", "public ArrayList<ThresholdDataPoint> getNeighbours(int connec) {\n\t\tif(connec == 8){\n\t\t\treturn eightNeighbours;\n\t\t} else if(connec == 4){\n\t\t\treturn fourNeighbours;\n\t\t} else {\n\t\t\tthrow new IllegalArgumentException(\"Invalid number of neighbours\");\n\t\t}\n\t}", "public ArrayList<CoordinateTile> getListOfNeighbours(int i, int j)\n\t{\n\t\tArrayList<CoordinateTile> allNeighbours = new ArrayList<CoordinateTile>();\n\t\tif(this.checkValidCoordinate(i, j+1))\n\t\t{\n\t\t\tallNeighbours.add(this.board[i][j+1]);\n\t\t}\n\t\tif(this.checkValidCoordinate(i, j-1))\n\t\t{\n\t\t\tallNeighbours.add(this.board[i][j-1]);\n\t\t}\n\t\tif(this.checkValidCoordinate(i+1, j))\n\t\t{\n\t\t\tallNeighbours.add(this.board[i+1][j]);\n\t\t}\n\t\tif(this.checkValidCoordinate(i-1, j))\n\t\t{\n\t\t\tallNeighbours.add(this.board[i-1][j]);\n\t\t}\n\t\treturn allNeighbours;\n\t}", "public ArrayList<Variable> getNeighbours(Variable X) {\n\t\tArrayList<Variable> neighbours = new ArrayList<Variable>();\n\t\tfor (int i = 0; i < X.arcs.size(); i++) {\n\t\t\tneighbours.add(X.arcs.get(i).Y);\n\t\t}\n\t\treturn neighbours;\n\t}", "private double[] getNeighbors(double[] row) {\n\n double[] neighbors = {0};\n return neighbors;\n }", "ArrayList<PathFindingNode> neighbours(PathFindingNode node);", "public List<Edge> getNeighbors() {\n\t\treturn neighbors;\n\t}", "private List<CellIndex> getNeighbours( CellIndex index )\r\n {\n List<CellIndex> neighbours = new ArrayList<World.CellIndex>();\r\n if( index.x % EnvSettings.getMAX_X() != 0 )\r\n {\r\n neighbours.add( new CellIndex( index.x - 1, index.y, index.z ) );\r\n }\r\n if( index.x % EnvSettings.getMAX_X() != EnvSettings.getMAX_X() - 1 )\r\n {\r\n neighbours.add( new CellIndex( index.x + 1, index.y, index.z ) );\r\n }\r\n if( index.y % EnvSettings.getMAX_Y() != 0 )\r\n {\r\n neighbours.add( new CellIndex( index.x, index.y - 1, index.z ) );\r\n }\r\n if( index.y % EnvSettings.getMAX_Y() != EnvSettings.getMAX_Y() - 1 )\r\n {\r\n neighbours.add( new CellIndex( index.x, index.y + 1, index.z ) );\r\n }\r\n if( index.z % EnvSettings.getMAX_Z() != 0 )\r\n {\r\n neighbours.add( new CellIndex( index.x, index.y, index.z - 1 ) );\r\n }\r\n if( index.z % EnvSettings.getMAX_Z() != EnvSettings.getMAX_Z() - 1 )\r\n {\r\n neighbours.add( new CellIndex( index.x, index.y, index.z + 1 ) );\r\n }\r\n return neighbours;\r\n }", "int[] getOutEdges(int... nodes);", "public Iterable<Board> neighbors() {\n int[] pos = zeroPosition();\n int x = pos[0];\n int y = pos[1];\n\n Stack<Board> q = new Stack<>();\n if (x > 0) {\n q.push(twinBySwitching(x, y, x-1, y));\n }\n\n if (x < dimension() - 1) {\n q.push(twinBySwitching(x, y, x+1, y));\n }\n\n if (y > 0) {\n q.push(twinBySwitching(x, y, x, y-1));\n }\n\n if (y < dimension() - 1) {\n q.push(twinBySwitching(x, y, x, y+1));\n }\n\n return q;\n }", "public List<Location> neighbors (Location pos);", "public Iterable<Board> neighbors() {\n int emptyRow = -1; // Row of the empty tile\n int emptyCol = -1; // Column of the empty tile\n\n // Iterate through each tile in the board, searching for empty tile\n search:\n for (int row = 0; row < N; row++) // For each row in the board\n for (int col = 0; col < N; col++) // For each column in the row\n if (tiles[row][col] == 0) { // If the current tile is empty (value of 0)\n emptyRow = row; // Store the row of the empty tile\n emptyCol = col; // Store the column of the empty tile\n break search; // Break from search\n }\n\n Stack<Board> neighbors = new Stack<Board>(); // Initialize a stack of neighboring board states\n\n if (emptyRow - 1 >= 0) // If there is a row of tiles above the empty tile\n neighbors.push(swap(emptyRow, emptyCol, emptyRow - 1, emptyCol)); // Swap empty tile with the above adjacent tile and add to neighbors stack\n\n if (emptyRow + 1 < N) // If there is a row of tiles below the empty tile\n neighbors.push(swap(emptyRow, emptyCol, emptyRow + 1, emptyCol)); // Swap empty tile with the below adjacent tile and add to neighbors stack\n\n if (emptyCol - 1 >= 0) // If there is a column of tiles to the left of the empty tile\n neighbors.push(swap(emptyRow, emptyCol, emptyRow, emptyCol - 1)); // Swap empty tile with the left adjacent tile and add to neighbors stack\n\n if (emptyCol + 1 < N) // If there is a column of tiles to the right of the empty tile\n neighbors.push(swap(emptyRow, emptyCol, emptyRow, emptyCol + 1)); // Swap empty tile with the right adjacent tile and add to neighbors stack\n\n return neighbors; // Return iterable stack of neighboring board states\n }", "private List<Cell> getNeighbours(int row,int col){\n List<Cell> neighbours = new ArrayList<Cell>();\n for(int i = row -1 ; i <= row+1 ; i++ )\n for(int j = col -1 ; j <= col+1 ; j++)\n if(i>=0 && i<cells.length && j>=0 && j<cells[0].length)\n neighbours.add(cells[i][j]);\n return neighbours;\n }", "public abstract LinkedList<Integer> getNeighbours(int index);", "private void getNeighbors() {\n\t\tRowIterator iterator = currentGen.iterateRows();\n\t\twhile (iterator.hasNext()) {\n\t\t\tElemIterator elem = iterator.next();\n\t\t\twhile (elem.hasNext()) {\n\t\t\t\tMatrixElem mElem = elem.next();\n\t\t\t\tint row = mElem.rowIndex();\n\t\t\t\tint col = mElem.columnIndex();\n\t\t\t\tint numNeighbors = 0;\n\t\t\t\tfor (int i = -1; i < 2; i++) { // loops through row above,\n\t\t\t\t\t\t\t\t\t\t\t\t// actual row, and row below\n\t\t\t\t\tfor (int j = -1; j < 2; j++) { // loops through column left,\n\t\t\t\t\t\t\t\t\t\t\t\t\t// actual column, coloumn\n\t\t\t\t\t\t\t\t\t\t\t\t\t// right\n\t\t\t\t\t\tif (!currentGen.elementAt(row + i, col + j).equals(\n\t\t\t\t\t\t\t\tfalse)) // element is alive, add 1 to neighbor\n\t\t\t\t\t\t\t\t\t\t// total\n\t\t\t\t\t\t\tnumNeighbors += 1;\n\t\t\t\t\t\telse { // element is not alive, add 1 to its total\n\t\t\t\t\t\t\t\t// number of neighbors\n\t\t\t\t\t\t\tInteger currentNeighbors = (Integer) neighbors\n\t\t\t\t\t\t\t\t\t.elementAt(row + i, col + j);\n\t\t\t\t\t\t\tneighbors.setValue(row + i, col + j,\n\t\t\t\t\t\t\t\t\tcurrentNeighbors + 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tneighbors.setValue(row, col, numNeighbors - 1); // -1 to account\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// for counting\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// itself as a\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// neighbor\n\t\t\t}\n\t\t}\n\t}", "int[] getInEdges(int... nodes);", "@Override\n public Iterable<WorldState> neighbors() {\n Queue<WorldState> neighbor = new ArrayDeque<>();\n int xDim = 0, yDim = 0;\n int[][] tiles = new int[_N][_N];\n\n for (int i = 0; i < _N; i++) {\n for (int j = 0; j < _N; j++) {\n tiles[i][j] = _tiles[i][j];\n if (_tiles[i][j] == 0) {\n xDim = i;\n yDim = j;\n }\n }\n }\n\n for (int i = 0; i < _N; i++) {\n for (int j = 0; j < _N; j++) {\n if (Math.abs(i - xDim) + Math.abs(j - yDim) == 1) {\n tiles[i][j] = _tiles[xDim][yDim];\n tiles[xDim][yDim] = _tiles[i][j];\n neighbor.add(new Board(tiles));\n // System.out.println(new Board(tiles));\n tiles[xDim][yDim] = _tiles[xDim][yDim];\n tiles[i][j] = _tiles[i][j];\n }\n }\n }\n return neighbor;\n }", "int[] neighbor(int sourceId) {\n\t\tint opposite = ((sourceId + 2) > amount - 1) ? (sourceId + 2) - amount : sourceId + 2; // needed\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// for\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 2\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// ir\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 3\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// array\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// points\n\t\tint neighborLeft = ((sourceId + 1) > amount - 1) ? (sourceId + 1) - amount : sourceId + 1; // neede\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// only\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// for\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 3\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// array\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// point\n\t\tint neighborRight = ((sourceId - 1) < 0) ? amount + (sourceId - 1) : sourceId - 1; // neede\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// only\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// for\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 0\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// array\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// pointer\n\t\tint[] neighbors = { neighborLeft, neighborRight, opposite // 0, 1, 2\n\t\t};\n\t\treturn neighbors;\n\t}", "@Override\r\n public List<INavMeshAtom> getNeighbours(NavMesh mesh) { \r\n List<INavMeshAtom> neighbours = new ArrayList<INavMeshAtom>();\r\n \r\n if(pId > 0) neighbours.add(new NavMeshPolygon(pId));\r\n \r\n for(OffMeshEdge oe : outgoingEdges) {\r\n neighbours.add(oe.getTo());\r\n }\r\n \r\n return neighbours;\r\n }", "protected abstract List<Integer> getNeighbors(int vertex);", "public Set<V> getNeighbours(V vertex);", "public ArrayList<? extends Puzzle> getNeighbors();", "public synchronized LinkedList[] getKHopNeighbors()\r\n {\r\n return kHopNeighbors;\r\n }", "int[] getEdgesIncidentTo(int... nodes);", "public List<Tile> getNeighbors() {\n List<Tile> list = new ArrayList<Tile>();\n\n if (this.tileNorth != null) {\n list.add(this.tileNorth);\n }\n\n if (this.tileEast != null) {\n list.add(this.tileEast);\n }\n\n if (this.tileSouth != null) {\n list.add(this.tileSouth);\n }\n\n if (this.tileWest != null) {\n list.add(this.tileWest);\n }\n\n return list;\n }", "public abstract int getNumberOfLivingNeighbours(int x, int y);", "public Square[] adjacentCells() {\n\t\tArrayList<Square> cells = new ArrayList <Square>();\n\t\tSquare aux;\n\t\tfor (int i = -1;i <= 1; i++) {\n\t\t\tfor (int j = -1; j <= 1 ; j++) {\n\t\t\t\taux = new Square(tractor.getRow()+i, tractor.getColumn()+j); \n\t\t\t\tif (isInside(aux) && abs(i+j) == 1) { \n\t\t\t\t\tcells.add(getSquare(aux));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn cells.toArray(new Square[cells.size()]);\n\t}", "public Cell[] getNeighbors(Cell cell, boolean visited) {\n //get all neighbors\n Cell neighbors[] = getNeighbors(cell);\n //visited-Counter\n int visitedNeighborCounter = 0;\n //count visited neighbors\n for (int i = 0; i < neighbors.length;i++) {\n if (neighbors[i].isVisited()) {\n visitedNeighborCounter++;\n }\n }\n //if visited==true\n if (visited == true) {\n Cell neighbors2[] = new Cell[visitedNeighborCounter];\n for (int i = 0; i < neighbors2.length; i++) {\n if (neighbors[i].isVisited()) {\n neighbors2[i] = neighbors[i];\n }\n }\n return neighbors2;\n }\n //if visited==false\n Cell neighbors2[] = new Cell[neighbors.length - visitedNeighborCounter];\n for (int i = 0; i < neighbors2.length; i++) {\n if (neighbors[i].isVisited() == false) {\n neighbors2[i] = neighbors[i];\n }\n }\n return neighbors2;\n }", "public int countNeighbours() {\n\t\tint count = 0;\n\t\tif (this.hasNeighbour(0))\n\t\t\tcount++;\n\t\tif (this.hasNeighbour(1))\n\t\t\tcount++;\n\t\tif (this.hasNeighbour(2))\n\t\t\tcount++;\n\t\treturn count;\n\t}", "public List<Piece> getEdges() {\n List<Piece> result = new ArrayList<>();\n result.add(_board[0][1]);\n result.add(_board[1][0]);\n result.add(_board[1][2]);\n result.add(_board[2][1]);\n return result;\n }", "public ArrayList<PuzzleState> getNeighbors() {\n\t\tArrayList<PuzzleState> neighbors = new ArrayList<PuzzleState>();\n\t\tPuzzleState neighbor;\n\t\t//System.out.println(\"getting neighbors.\");\n\t\tfor (String act: ACTIONS) {\n\t\t\tif (current.validAction(act)){\n\t\t\t\t//System.out.println(\"Action: \" + act + \" on \" + current.getString());\n\t\t\t\tneighbor = new PuzzleState(current.getString(current.getState()),\n\t\t\t\t\t\t\t\t\t\t\tcurrent.getString(current.getGoalState()));\n\t\t\t\tsearchCost++;\n\t\t\t\tneighbor.act(act);\n\t\t\t\tneighbors.add(neighbor);\n\t\t\t}\t\n\t\t}\n\t\treturn neighbors;\n\t}", "public E[] getNeighbours (E vertex) throws IllegalArgumentException\n {\n int index = this.indexOf (vertex);\n\n // Check if the vertex exists in the graph\n if (index < 0)\n throw new IllegalArgumentException (vertex + \" was not found!\");\n\n\n Node node = this.adjacencySequences[index];\n int countNeighbours = 0;\n while(node != null)\n {\n countNeighbours++;\n node = node.nextNode;\n }\n\n E[] neighbours = (E[]) new Object[countNeighbours];\n node = this.adjacencySequences[index];\n int neighbourIndex = 0;\n \n while(node != null)\n {\n neighbours[neighbourIndex++] = vertices[node.neighbourIndex];\n node = node.nextNode;\n }\n\n return neighbours;\n }", "public Set<Integer> getNeighbors() {\n HashSet<Integer> retSet = new HashSet<Integer>();\n retSet.addAll(this.getActiveNeighbors());\n retSet.addAll(this.purgedNeighbors);\n\n return retSet;\n }", "public int getDegree(){\n\t\treturn neighbours.size();\n\t}", "public int[] getNeighborRowIndex() {\n return neighborRowIndex;\n }", "public List neighbors(int vertex) {\n// your code here\n LinkedList<Integer> result = new LinkedList<>();\n LinkedList<Edge> list = adjLists[vertex];\n for (Edge a : list) {\n result.add(a.to());\n }\n//List<Integer> list = new List<Integer>();\n return result;\n }", "org.landxml.schema.landXML11.LanesDocument.Lanes[] getLanesArray();", "public ArrayList<ArrayList<Pokemon>> getlistOfNeighborhoods()\n\t{\n\t\treturn ((ArrayList<ArrayList<Pokemon>>)(listOfNeighborhoods.clone()));\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[][] getRoads() {\n ArrayList rs = new ArrayList(nodeCount * 4);\n for (int i = 0; i < nodeCount; i++)\n for (int j = i + 1; j < nodeCount; j++)\n if (roads[i][j] > 0 || roads[j][i] > 0) {\n rs.add(Integer.valueOf(j));\n rs.add(Integer.valueOf(i));\n }\n int[][] rds = new int[rs.size() / 2][2];\n for (int i = 0; i < rs.size(); i += 2) {\n rds[i / 2][0] = ((Integer) rs.get(i)).intValue();\n rds[i / 2][1] = ((Integer) rs.get(i + 1)).intValue();\n }\n return rds;\n }", "protected ArrayList emptyNeighbors()\n {\n // Get all the neighbors of this fish, empty or not.\n ArrayList nbrs = environment().neighborsOf(location());\n\n // Figure out which neighbors are empty and add those to a new list.\n ArrayList emptyNbrs = new ArrayList();\n for ( int index = 0; index < nbrs.size(); index++ )\n {\n Location loc = (Location) nbrs.get(index);\n if ( environment().isEmpty(loc) )\n emptyNbrs.add(loc);\n }\n\n return emptyNbrs;\n }", "private ArrayList<GridPiece> getDirectNeighbors(GridPiece piece) {\n neighbors.clear();\n\n //Top\n if (game.gridMap.size() > piece.row + 1) {\n neighbors.add(game.gridMap.get(piece.row + 1).get(piece.column));\n }\n //Bottom\n if (piece.row > 0) {\n neighbors.add(game.gridMap.get(piece.row - 1).get(piece.column));\n }\n\n //Right\n if (game.gridMap.get(0).size() > piece.column + 1) {\n neighbors.add(game.gridMap.get(piece.row).get(piece.column + 1));\n }\n\n //Left\n if (piece.column > 0) {\n neighbors.add(game.gridMap.get(piece.row).get(piece.column - 1));\n }\n\n return neighbors;\n }", "private int[][] genBlackAdjacentTilesCount(char[][] lobby) {\n int[][] neighborsCount = new int[lobby.length][lobby[0].length];\n\n for (int i = 0; i < lobby.length; i++) {\n for (int j = 0; j < lobby[0].length; j++) {\n List<AxialCoordinates> neighbors = findNeighbors(i, j);\n int blackCount = 0;\n for (AxialCoordinates coo : neighbors) {\n if (coo.rAxialCoordinate > 0 && coo.qAxialCoordinate > 0\n && coo.qAxialCoordinate < lobby.length && coo.rAxialCoordinate < lobby[0].length) {\n if (lobby[coo.qAxialCoordinate][coo.rAxialCoordinate] == 'b') {\n blackCount++;\n }\n }\n }\n neighborsCount[i][j] = blackCount;\n }\n// System.out.println();\n }\n return neighborsCount;\n }", "@Override\n\tpublic List<Integer> getNeighbours(int v) {\n\t\treturn null;\n\t}", "public abstract int[] getConnected(int vertexIndex);", "List<Integer> getNeighboursOf(int node) {\n\t\treturn adjList.get(node);\n\t}", "public Collection<Integer> getNeighbours(int i) {\n\t\n\tLinkable lble=(Linkable)Network.node[i].getProtocol(protocolID);\n\tArrayList<Integer> al = new ArrayList<Integer>(lble.degree());\n\tif( Network.node[i].isUp() )\n\t{\t\n\t\tfor(int j=0; j<lble.degree(); ++j)\n\t\t{\n\t\t\tfinal Node n = lble.getNeighbor(j);\n\t\t\t// if accessible, we include it\n\t\t\tif(n.isUp()) al.add(Integer.valueOf(n.getIndex()));\n\t\t}\n\t}\n\treturn Collections.unmodifiableList(al);\n}", "public Set<TCell> getNBGrays() {\n\tSet<TCell> grays = new HashSet<TCell>();\n\tfor(TCell c : Cells) {\n\t grays.addAll((Collection<TCell>) c.getNBGrays());\n\t}\n\treturn grays;\n }", "Set<MacAddress> neighbors();", "public ArrayList<Integer> getOutNeighbors (int nodeId) {\r\n\t\tArrayList<Integer> outNeighbors = new ArrayList<Integer>();\r\n\t\t// the set of outgoing edge ids\r\n\t\tSet<Integer> edgeSet = mOutEdges.get(nodeId);\r\n\t\tfor(Integer edgeId: edgeSet) {\r\n\t\t\toutNeighbors.add( getEdge(edgeId).getToId() );\r\n\t\t}\r\n\t\treturn outNeighbors;\r\n\t}", "public int getNumEdges();", "Set<E> getForwardNeighbors();", "protected static int countNeighbours(int i, int j, byte[][] currentGen){\n int count = 0;\n \n for(int x = i-1; x<i+2; x++){\n count+=checkBorders(x, j-1, currentGen);\n count+=checkBorders(x, j+1, currentGen);\n }\n count+=checkBorders(i-1, j, currentGen);\n count+=checkBorders(i+1, j, currentGen);\n\n return count;\n }", "public HashMap<Integer, edge_data> getNeighborEdges() {\n return this.neighborEdges;\n }", "public int getVisitedCells() \r\n\t{\r\n\t\tint lastCell = path.size() - 1;\r\n\t\tint visitedCells = path.get(lastCell).getDiscoveryTime() + 1;\r\n\t\treturn visitedCells;\r\n\t}", "public int[] getNeighborsWeights(){\n\t\tint[] weights = new int[4];\n\t\tweights[0] = getNeighbor(\"east\").weight;\n\t\tweights[1] = getNeighbor(\"north\").weight;\n\t\tweights[2] = getNeighbor(\"west\").weight;\n\t\tweights[3] = getNeighbor(\"south\").weight;\t\t\n\t\treturn weights;\n\t}", "private static int[] nodes(graph g) {\n int size = g.nodeSize();\n Collection<node_data> V = g.getV();\n node_data[] nodes = new node_data[size];\n V.toArray(nodes); // O(n) operation\n int[] ans = new int[size];\n for(int i=0;i<size;i++) {ans[i] = nodes[i].getKey();}\n Arrays.sort(ans);\n return ans;\n }", "public abstract List<GraphNode<N, E>> getNeighborNodes(N value);", "public List<Integer> neighbors(int vertex) {\r\n \tArrayList<Integer> vertices = new ArrayList<Integer>();\r\n \tLinkedList<Edge> testList = myAdjLists[vertex];\r\n int counter = 0;\r\n while (counter < testList.size()) {\r\n \tvertices.add(testList.get(counter).myTo);\r\n \tcounter++;\r\n }\r\n return vertices;\r\n }", "@NotNull\r\n public Collection<Index> getNeighbors(@NotNull final Index index){\r\n Collection<Index> list = new ArrayList<>();\r\n int extracted = -1;\r\n try{\r\n extracted = primitiveMatrix[index.row+1][index.column]; //down\r\n list.add(new Index(index.row+1,index.column));\r\n }catch (ArrayIndexOutOfBoundsException ignored){}\r\n try{\r\n extracted = primitiveMatrix[index.row][index.column+1];//right\r\n list.add(new Index(index.row,index.column+1));\r\n }catch (ArrayIndexOutOfBoundsException ignored){}\r\n try{\r\n extracted = primitiveMatrix[index.row-1][index.column];//up\r\n list.add(new Index(index.row-1,index.column));\r\n }catch (ArrayIndexOutOfBoundsException ignored){}\r\n try{\r\n extracted = primitiveMatrix[index.row][index.column-1];//left\r\n list.add(new Index(index.row,index.column-1));\r\n }catch (ArrayIndexOutOfBoundsException ignored){}\r\n return list;\r\n }", "public org.landxml.schema.landXML11.CornerDocument.Corner[] getCornerArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n java.util.List targetList = new java.util.ArrayList();\r\n get_store().find_all_element_users(CORNER$12, targetList);\r\n org.landxml.schema.landXML11.CornerDocument.Corner[] result = new org.landxml.schema.landXML11.CornerDocument.Corner[targetList.size()];\r\n targetList.toArray(result);\r\n return result;\r\n }\r\n }", "public ArrayList<SearchNode> neighbors() {\n ArrayList<SearchNode> neighbors = new ArrayList<SearchNode>();\n // StdOut.println(\"before: \" + this.snBoard);\n Iterable<Board> boards = new ArrayList<Board>();\n boards = this.snBoard.neighbors();\n // StdOut.println(\"after: \" + this.snBoard);\n for (Board b: boards) {\n // StdOut.println(b);\n // StdOut.println(\"checking: \"+b);\n // StdOut.println(\"checking father: \"+this.getPredecessor());\n if (this.getPredecessor() == null) {\n SearchNode sn = new SearchNode(b,\n b.hamming(),\n this,\n b.manhattan(),\n this.moves+1);\n // StdOut.println(\"checking: \"+(this.priority - this.snBoard.hamming()));\n // StdOut.println(\"checking: \"+(this.priority - this.snBoard.hamming()));\n // sn.addMovesToPriority(this.priority - this.snBoard.hamming()+1);\n neighbors.add(sn);\n } else { \n if (!b.equals(this.getPredecessor().snBoard)) {\n SearchNode sn = new SearchNode(b,\n b.hamming(),\n this,\n b.manhattan(),\n this.moves+1);\n neighbors.add(sn);\n }\n }\n \n }\n return neighbors;\n }", "private ArrayList<Pixel> getNeightbors(Pixel pixel)\n {\n ArrayList<Pixel> neighbors = new ArrayList<Pixel>();\n\n for(int i=-1;i<=1;i++)\n {\n int n_w=pixel.p+i;\n if(n_w<0 || n_w==this.image.getWidth()) continue;\n for(int j=-1;j<=1;j++)\n {\n int n_h=pixel.q+j;\n if(n_h<0 || n_h==this.image.getHeight()) continue;\n if(i==0 && j==0) continue;\n neighbors.add( new Pixel(n_w, n_h) );\n }//end for j\n }//end for i\n\n return neighbors;\n }" ]
[ "0.7474783", "0.73686016", "0.7258196", "0.7215506", "0.7102106", "0.70584714", "0.70424014", "0.70067614", "0.6956225", "0.688654", "0.68485504", "0.6820033", "0.67093897", "0.6633452", "0.658812", "0.6577339", "0.65107864", "0.64879644", "0.647332", "0.6468778", "0.6455526", "0.6445256", "0.64423037", "0.63517517", "0.6351749", "0.633736", "0.632168", "0.6321365", "0.6320756", "0.6305193", "0.6276085", "0.62702376", "0.62578464", "0.62553114", "0.6250236", "0.62415427", "0.62056273", "0.61839646", "0.61793333", "0.61784357", "0.6177605", "0.61726063", "0.6172556", "0.6170823", "0.6170173", "0.61657107", "0.6149382", "0.61469775", "0.6143661", "0.6134053", "0.6099115", "0.6070496", "0.6031208", "0.6029937", "0.6028575", "0.5999928", "0.59955245", "0.5992038", "0.5981217", "0.59741503", "0.5940745", "0.59327143", "0.59245044", "0.58987325", "0.5891572", "0.58905625", "0.5878988", "0.58713734", "0.58626324", "0.5854721", "0.5813652", "0.58123535", "0.5798055", "0.579034", "0.5724941", "0.57209927", "0.5718695", "0.571822", "0.57089853", "0.570026", "0.5697651", "0.5689385", "0.56874985", "0.5682758", "0.56808215", "0.5677348", "0.5674685", "0.5667614", "0.5659498", "0.5654118", "0.5643236", "0.56366163", "0.5625465", "0.5619452", "0.5607416", "0.5601901", "0.5596554", "0.55923325", "0.55911225", "0.55900717" ]
0.7227275
3
Returns the enclosing net.
TriangleNet3D getNet() { return comp.getNet(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public PetriNet getOwnerNet() {\r\n\t\treturn ownerNet;\r\n\t}", "public Network network() {\n return network;\n }", "public Network getNetwork() {\r\n \t\treturn network;\r\n \t}", "public Node getNetworkNode() {\r\n return network;\r\n }", "CyNetwork getGroupNetwork();", "public CyNetwork getNetwork () {\n return network;\n }", "CyRootNetwork getRootNetwork();", "public NetworkManager getNetwork()\n {\n return network;\n }", "Net findNet(){\n\t\tIterator iterator = gc.getIterator();\r\n\t\twhile(iterator.hasNext()){\r\n\t\t\tGameObject g = iterator.getNext();\r\n\t\t\tif (g instanceof Net)return (Net)g;\r\n\t\t}\r\n\treturn nullNet;\r\n\t}", "@Link Network network();", "public final String getNetId( )\r\n {\r\n return netId;\r\n }", "public NetworkEditor getNetworkEditor() {\n return panel.getNetworkEditor();\n }", "public String networkName() {\n return this.innerProperties() == null ? null : this.innerProperties().networkName();\n }", "@Required\n public NetworkResource getNetwork() {\n return network;\n }", "public String getNetworkReference() {\n return networkReference;\n }", "public com.google.cloud.networkmanagement.v1beta1.NetworkInfo.Builder getNetworkBuilder() {\n return getNetworkFieldBuilder().getBuilder();\n }", "public OwNetworkContext getContext();", "public NetInterface.NetHandler getNetProxy() {\n return (NetInterface.NetHandler) self;\n }", "public NetworkConfiguration getNetworkConfiguration() {\n return this.networkConfiguration;\n }", "public NetworkConfiguration getNetworkConfiguration() {\n return this.networkConfiguration;\n }", "public MonetaryAmount getTotalNet() {\n\t\treturn this.totalNet;\n\t}", "public String targetNetworkId() {\n return this.targetNetworkId;\n }", "public boolean isNetwork() {\r\n \t\treturn (network != null);\r\n \t}", "public String getNetworkType() {\n return this.mNetInfo.getTypeName();\n }", "public String getNetwork() {\n initNetwork();\n NetworkInfo networkInfo =\n connectivityManager.getNetworkInfo(ConnectivityManager.TYPE_WIFI);\n if (networkInfo != null &&\n networkInfo.getState() == NetworkInfo.State.CONNECTED) {\n Logger.d(\"Current Network: WIFI\");\n return NETWORK_WIFI;\n } else {\n return getTelephonyNetworkType();\n }\n }", "NetNode representative() {\n\t\t\tfor (NetNode n : members) {\n\t\t\t\tif (!n.varAddress && !n.varMask)\n\t\t\t\t\treturn n;\n\t\t\t}\n\t\t\treturn members.iterator().next();\n\t\t}", "public String getParentNode()\r\n\t{\r\n\t\tif (roadBelongingType.equals(\"inbound\"))\r\n\t\t{\r\n\t\t\treturn endNode;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn startNode;\r\n\t\t}\r\n\t}", "public String getNetPayable()\n\t{\n\t\twaitForVisibility(netPayable);\n\t\treturn netPayable.getText();\n\t}", "public java.lang.String getNetAddress() {\n\t\t return netAddress;\n\t }", "public SubnetInner subnet() {\n return this.subnet;\n }", "@Override\n\tpublic Long getNetId() {\n\t\treturn null;\n\t}", "public HierarchicalNet getHierarchicalNet(HierarchicalInstance head, String name) {\n HierarchicalInstance parentNode = null;\n String netName = null;\n if (name.indexOf(_separator) < 0 && !_includeRootName) {\n // this net is in the top instance\n parentNode = head;\n netName = name;\n } else {\n int splitPoint = name.lastIndexOf(_separator);\n String instanceName = name.substring(0, splitPoint);\n netName = name.substring(splitPoint + 1, name.length());\n parentNode = getHierarchicalInstance(head, instanceName);\n }\n if (parentNode == null)\n return null;\n HierarchicalNet matchingNet = null;\n for (HierarchicalNet hierarchicalNet : parentNode.getHierarchicalNets()) {\n if (netName.equals(hierarchicalNet.getOriginalNetName())) {\n matchingNet = hierarchicalNet;\n break;\n }\n }\n return matchingNet;\n }", "public int getNetWorkId() {\n\t\treturn (mWifiInfo == null) ? 0 : mWifiInfo.getNetworkId();\n\t}", "public String getNetwork() {\n String[] ipOctets = ipAddress.split(\"\\\\.\");\n String[] subnetOctets = subnetMask.split(\"\\\\.\");\n String[] result = ipOctets;\n\n for (int i = 0; i < 4; i++) {\n if (!\"255\".equals(subnetOctets[i])) {\n int sub = Integer.parseInt(subnetOctets[i]);\n int ip = Integer.parseInt(ipOctets[i]);\n result[i] = String.format(\"%s\", (ip & sub));\n }\n }\n\n return String.join(\".\", result);\n }", "public BigDecimal getNET_INVEST_OUTSTANDING() {\r\n return NET_INVEST_OUTSTANDING;\r\n }", "@java.lang.Override\n public com.google.cloud.networkmanagement.v1beta1.NetworkInfoOrBuilder getNetworkOrBuilder() {\n if ((stepInfoCase_ == 17) && (networkBuilder_ != null)) {\n return networkBuilder_.getMessageOrBuilder();\n } else {\n if (stepInfoCase_ == 17) {\n return (com.google.cloud.networkmanagement.v1beta1.NetworkInfo) stepInfo_;\n }\n return com.google.cloud.networkmanagement.v1beta1.NetworkInfo.getDefaultInstance();\n }\n }", "public java.lang.String getNETSP() {\n return NETSP;\n }", "@java.lang.Override\n public com.google.cloud.networkmanagement.v1beta1.NetworkInfo getNetwork() {\n if (networkBuilder_ == null) {\n if (stepInfoCase_ == 17) {\n return (com.google.cloud.networkmanagement.v1beta1.NetworkInfo) stepInfo_;\n }\n return com.google.cloud.networkmanagement.v1beta1.NetworkInfo.getDefaultInstance();\n } else {\n if (stepInfoCase_ == 17) {\n return networkBuilder_.getMessage();\n }\n return com.google.cloud.networkmanagement.v1beta1.NetworkInfo.getDefaultInstance();\n }\n }", "private DefaultCniNetworkProperties innerProperties() {\n return this.innerProperties;\n }", "public com.google.cloud.datafusion.v1beta1.NetworkConfig.Builder getNetworkConfigBuilder() {\n bitField0_ |= 0x00000040;\n onChanged();\n return getNetworkConfigFieldBuilder().getBuilder();\n }", "public Inet4Address getNetworkAddress() {\n\t\treturn subnetAddress;\n\t}", "public Scope getOuterMostEnclosingScope() {\n\t\tScope s = this;\n\t\twhile (s.getEnclosingScope() != null) {\n\t\t\ts = s.getEnclosingScope();\n\t\t}\n\t\treturn s;\n\t}", "@java.lang.Override\n public com.google.cloud.networkmanagement.v1beta1.NetworkInfoOrBuilder getNetworkOrBuilder() {\n if (stepInfoCase_ == 17) {\n return (com.google.cloud.networkmanagement.v1beta1.NetworkInfo) stepInfo_;\n }\n return com.google.cloud.networkmanagement.v1beta1.NetworkInfo.getDefaultInstance();\n }", "@java.lang.Override\n public com.google.cloud.networkmanagement.v1beta1.NetworkInfo getNetwork() {\n if (stepInfoCase_ == 17) {\n return (com.google.cloud.networkmanagement.v1beta1.NetworkInfo) stepInfo_;\n }\n return com.google.cloud.networkmanagement.v1beta1.NetworkInfo.getDefaultInstance();\n }", "public long getNetWS() {\r\n/* 191 */ return this._netWS;\r\n/* */ }", "public NetworkInfo getActiveNetworkInfo() {\n\treturn null;\r\n}", "protected LWWindowPeer getWindowPeerOrSelf() {\n return getWindowPeer();\n }", "public Ent getParent(){\n\t\treturn (Ent)bound.getParent();\n\t}", "public String getNetworkname() {\n return networkname;\n }", "public String getNetworkId() {\n return this.networkId;\n }", "public String getNetby() {\r\n return netby;\r\n }", "public String[] getIntefaceNetwork() {\n\t\treturn null;\n\t}", "public com.google.cloud.datafusion.v1beta1.NetworkConfig getNetworkConfig() {\n if (networkConfigBuilder_ == null) {\n return networkConfig_ == null\n ? com.google.cloud.datafusion.v1beta1.NetworkConfig.getDefaultInstance()\n : networkConfig_;\n } else {\n return networkConfigBuilder_.getMessage();\n }\n }", "public double getNetBalance() {\r\n\t\treturn netBalance;\r\n\t}", "public final Node getOther() {\n Flow f = getFlow();\n return f.isInternal()\n ? isSend()\n ? f.getTarget()\n : f.getSource()\n : ( (ExternalFlow) f ).getConnector();\n }", "Window getParent();", "public NetworkProfile networkProfile() {\n return this.networkProfile;\n }", "public Long getNetworkId() {\n return networkId;\n }", "Scope getEnclosingScope();", "public String getNetworkName () {\n return network.getRow(network).get(CyNetwork.NAME, String.class);\n }", "public MMDecimal getNetAmount() {\r\n if (this.netAmount == null) {\r\n return getGrossAmount();\r\n }\r\n return this.netAmount;\r\n }", "public OwObject getParent()\r\n {\r\n return m_Parent;\r\n }", "public String getBoxNetHost();", "Reference owner();", "Inner getInner(){\n Outer.this.toString();\n return this.new Inner();\n }", "public DefaultCniNetworkInner() {\n }", "@java.lang.Override\n public com.google.cloud.datafusion.v1beta1.NetworkConfig getNetworkConfig() {\n return networkConfig_ == null\n ? com.google.cloud.datafusion.v1beta1.NetworkConfig.getDefaultInstance()\n : networkConfig_;\n }", "public Object getParent()\n {\n return traversalStack.get(traversalStack.size() - 2);\n }", "public final NetBIOSSocket getSocket() {\n return m_sessSock;\n }", "NetworkFactory getNetworkFactory();", "public BigInteger getNetworkId() {\n return networkId;\n }", "public TriangleNet3DComp getNetComponent() {\n\t\treturn comp;\n\t}", "public Instance getParent() {\r\n \t\treturn parent;\r\n \t}", "public NetObject getObject();", "public String getNetAmount() {\n\t\treturn this.token.get(\"netAmount\").toString();\n\t}", "@VisibleForTesting\n public SurfaceControl getWindowingLayer() {\n return this.mWindowingLayer;\n }", "public java.lang.String getNetStatus() {\r\n return localNetStatus;\r\n }", "@SuppressLint(\"MissingPermission\")\n private NetworkInfo getActiveNetworkInfo(){\n ConnectivityManager connectivityManager = (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE);\n return connectivityManager == null ? null : connectivityManager.getActiveNetworkInfo();\n }", "public Inet4Address getNetMask() {\n\t\t//TODO hardcoding it with assumption that it's 255.255.255.0\n\t\tbyte[] netmask = new byte[]{(byte) 255,(byte) 255,(byte) 255,0};\n\t\ttry {\n\t\t\treturn (Inet4Address) Inet4Address.getByAddress(netmask);\n\t\t} catch (UnknownHostException e) {\n\t\t\t//Weird shouldn't happen\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "public java.util.List<Network> getNetworksList() {\n return networks_;\n }", "public com.google.cloud.datafusion.v1beta1.NetworkConfigOrBuilder getNetworkConfigOrBuilder() {\n if (networkConfigBuilder_ != null) {\n return networkConfigBuilder_.getMessageOrBuilder();\n } else {\n return networkConfig_ == null\n ? com.google.cloud.datafusion.v1beta1.NetworkConfig.getDefaultInstance()\n : networkConfig_;\n }\n }", "@objid (\"aaf16daa-ed28-496e-bee1-ebf665987a0e\")\n LinkEnd getOppositeOwner();", "public java.util.List<Network> getNetworksList() {\n if (networksBuilder_ == null) {\n return java.util.Collections.unmodifiableList(networks_);\n } else {\n return networksBuilder_.getMessageList();\n }\n }", "Object getParent();", "public ApiEntityReference subnet() {\n return this.subnet;\n }", "@Nonnull\n NetworkState getNetworkState();", "@Nullable\r\n List<Network> getNetwork();", "public CoreComponentTypes.apis.ebay.BasicAmountType getNetAmount() {\r\n return netAmount;\r\n }", "public java.util.List<? extends NetworkOrBuilder> getNetworksOrBuilderList() {\n if (networksBuilder_ != null) {\n return networksBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(networks_);\n }\n }", "public Network.Builder addNetworksBuilder() {\n return getNetworksFieldBuilder().addBuilder(Network.getDefaultInstance());\n }", "public @Nullable\n JFrame getOuterFrame() {\n if (null == outerFrame) {\n outerFrame = searchForOuterFrame();\n }\n return outerFrame;\n }", "public ArrayList<Network> getMyNetworks() {\n\t\treturn myNetworks;\n\t}", "int netid() {\n\t\t\treturn address & (-1 << mask);\n\t\t}", "@Override\n\tpublic String getNamespace() {\n\t\treturn InfInnerMsg.class.getName();\n\t}", "InternalRoad getOutEgde(){\r\n\t\tSet out = this.getOutEdges();\r\n\t\tIterator iter = out.iterator();\r\n\t\treturn (InternalRoad)iter.next();\r\n\t}", "public DatagramSocket getInSocket()\n\t{\n\t\treturn inSocket;\n\t}", "protected final LWWindowPeer getWindowPeer() {\n return windowPeer;\n }", "public NetworkInterfaceIpConfigurationInner ipConfiguration() {\n return this.ipConfiguration;\n }", "@Override\n public void buildNetwork() {\n }", "public abstract Node getBoundingNode();" ]
[ "0.70562774", "0.666904", "0.6661643", "0.6564118", "0.6439518", "0.6398756", "0.63328475", "0.63283545", "0.63259447", "0.6250663", "0.6123431", "0.60534614", "0.5953717", "0.59089714", "0.58897585", "0.58391273", "0.58177626", "0.58020705", "0.5789487", "0.5789487", "0.57107884", "0.5689555", "0.56878674", "0.56726867", "0.5668418", "0.5658961", "0.56572455", "0.5639251", "0.5636778", "0.56232744", "0.5617182", "0.5611809", "0.5580077", "0.5559052", "0.5550182", "0.5546149", "0.55227995", "0.55227804", "0.55221015", "0.55190814", "0.5506831", "0.5498873", "0.5497326", "0.5495265", "0.5493238", "0.54879373", "0.54706925", "0.5459881", "0.5459077", "0.54326683", "0.54322034", "0.5430786", "0.5428931", "0.5426853", "0.54266995", "0.53994054", "0.53526664", "0.5329371", "0.53245115", "0.5323402", "0.5314551", "0.5313573", "0.5304906", "0.52551216", "0.52214575", "0.5217408", "0.52165145", "0.5210691", "0.5200066", "0.5193454", "0.5191468", "0.5182168", "0.5179436", "0.5178128", "0.5176765", "0.5173304", "0.51681054", "0.5163172", "0.5159681", "0.51578474", "0.51513773", "0.5141049", "0.5138394", "0.51373005", "0.5127789", "0.51170963", "0.5109818", "0.51023614", "0.5098607", "0.5095818", "0.50919336", "0.5088279", "0.5080709", "0.5077109", "0.50720656", "0.5072012", "0.5070935", "0.50699383", "0.5064205", "0.50575924" ]
0.59437543
13
Returns the enclosing net component
public TriangleNet3DComp getNetComponent() { return comp; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected Node getComponentNode() {\n return componentNode;\n }", "public PetriNet getOwnerNet() {\r\n\t\treturn ownerNet;\r\n\t}", "public ILexComponent getParent();", "public IPSComponent peekParent();", "UIComponent getParent();", "public NetworkEditor getNetworkEditor() {\n return panel.getNetworkEditor();\n }", "TriangleNet3D getNet() {\n\t\treturn comp.getNet();\n\t}", "private CFComponent getOwner() {\n\t\treturn owner;\n\t}", "public AccessibleElement getParent();", "public Node getNetworkNode() {\r\n return network;\r\n }", "@VTID(9)\n @ReturnValue(type=NativeType.Dispatch)\n com4j.Com4jObject getParent();", "@VTID(9)\n @ReturnValue(type=NativeType.Dispatch)\n com4j.Com4jObject getParent();", "@VTID(9)\n @ReturnValue(type=NativeType.Dispatch)\n com4j.Com4jObject getParent();", "@VTID(9)\n @ReturnValue(type=NativeType.Dispatch)\n com4j.Com4jObject getParent();", "@VTID(9)\r\n @ReturnValue(type=NativeType.Dispatch)\r\n com4j.Com4jObject getParent();", "public Entity getComponent() {\n return component;\n }", "@Override\n\tpublic ElementView getComponent() {\n\t\treturn jc;\n\t}", "@DISPID(150)\n @PropGet\n com4j.Com4jObject getParent();", "@DISPID(150)\n @PropGet\n com4j.Com4jObject getParent();", "public CyNetwork getNetwork () {\n return network;\n }", "public Ent getParent(){\n\t\treturn (Ent)bound.getParent();\n\t}", "public String getComponent() {\r\n\t\treturn component;\r\n\t}", "CoreElement coreGetParentElement();", "private com.tangosol.coherence.Component get_Module()\n {\n return this.get_Parent();\n }", "private com.tangosol.coherence.Component get_Module()\n {\n return this.get_Parent();\n }", "private com.tangosol.coherence.Component get_Module()\n {\n return this.get_Parent();\n }", "private com.tangosol.coherence.Component get_Module()\n {\n return this.get_Parent();\n }", "private com.tangosol.coherence.Component get_Module()\n {\n return this.get_Parent();\n }", "private com.tangosol.coherence.Component get_Module()\n {\n return this.get_Parent();\n }", "private com.tangosol.coherence.Component get_Module()\n {\n return this.get_Parent().get_Parent();\n }", "private com.tangosol.coherence.Component get_Module()\n {\n return this.get_Parent().get_Parent();\n }", "private com.tangosol.coherence.Component get_Module()\n {\n return this.get_Parent().get_Parent();\n }", "private com.tangosol.coherence.Component get_Module()\n {\n return this.get_Parent().get_Parent();\n }", "public Network network() {\n return network;\n }", "public Optional<ComponentSymbol> getComponent() {\r\n if (!this.getEnclosingScope().getSpanningSymbol().isPresent()) {\r\n return Optional.empty();\r\n }\r\n if (!(this.getEnclosingScope().getSpanningSymbol().get() instanceof ComponentSymbol)) {\r\n return Optional.empty();\r\n }\r\n return Optional.of((ComponentSymbol) this.getEnclosingScope().getSpanningSymbol().get());\r\n }", "CyNetwork getGroupNetwork();", "CyRootNetwork getRootNetwork();", "public Object getComponentEditPart() {\n\t\treturn componentEditPart;\n\t}", "public Network getNetwork() {\r\n \t\treturn network;\r\n \t}", "public JComponent getComponent() {\n return itsComp;\n }", "Window getParent();", "public @Nullable\n JFrame getOuterFrame() {\n if (null == outerFrame) {\n outerFrame = searchForOuterFrame();\n }\n return outerFrame;\n }", "public String getComponent() {\n return this.component;\n }", "public OwNetworkContext getContext();", "private SchemaComponent findOutermostParentElement(){\n SchemaComponent element = null;\n //go up the tree and look for the last instance of <element>\n\tSchemaComponent sc = getParent();\n while(sc != null){\n if(sc instanceof Element){\n element = sc;\n }\n\t sc = sc.getParent();\n }\n return element;\n }", "public JComponent getWidget() {\n return itsComp;\n }", "public JPanel getPanel() { return gate; }", "private Window getParentWindow(Component paramComponent) {\n/* 192 */ Window window = null;\n/* */ \n/* 194 */ if (paramComponent instanceof Window) {\n/* 195 */ window = (Window)paramComponent;\n/* */ }\n/* 197 */ else if (paramComponent != null) {\n/* 198 */ window = SwingUtilities.getWindowAncestor(paramComponent);\n/* */ } \n/* 200 */ if (window == null) {\n/* 201 */ window = new DefaultFrame();\n/* */ }\n/* 203 */ return window;\n/* */ }", "public GridPanel getCurrentGraphPanel()\n\t{\n\t\tfor (Component comp : this.getComponents()) {\n\t\t\tif (comp.isVisible()) {\n\t\t\t\treturn (GridPanel) comp;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public EMAComponentSymbol getComponent() {\n return (EMAComponentSymbol) this.getEnclosingScope().getSpanningSymbol().get();\n }", "public NetworkManager getNetwork()\n {\n return network;\n }", "<T extends Component> T getOwner();", "public JComponent getWrappedComponent()\n {\n return field;\n }", "Reference owner();", "@VisibleForTesting\n public SurfaceControl computeImeParent() {\n WindowState windowState = this.mInputMethodTarget;\n if (windowState == null || windowState.mAppToken == null || this.mInputMethodTarget.getWindowingMode() != 1 || !this.mInputMethodTarget.mAppToken.matchParentBounds()) {\n return this.mWindowingLayer;\n }\n return this.mInputMethodTarget.mAppToken.getSurfaceControl();\n }", "public final Element getContainer() {\n\t\treturn impl.getContainer();\n }", "Component getLocalVisualComponent(CallPeer peer)\n throws OperationFailedException;", "Object getParent();", "public Component getComponent() {\n\treturn component;\n}", "public Component getParentComponent() {\r\n\t\tif (parentComponent == null) {\r\n\t\t\tif (view != null)\r\n\t\t\t\tparentComponent = view.getComponent(parentComponentName);\r\n\t\t}\r\n\t\treturn parentComponent;\r\n\t}", "private DefaultCniNetworkProperties innerProperties() {\n return this.innerProperties;\n }", "public OwObject getParent()\r\n {\r\n return m_Parent;\r\n }", "public ClientDashboardFrame getClientDashboardFrame() {\n return (ClientDashboardFrame) getParent() //JPanel\n .getParent() //JLayeredPanel\n .getParent() //JRootPanel\n .getParent(); //JFrame\n }", "Component getParent(Component c) {\n return hierarchy.getParent(c);\n }", "public java.awt.Frame getOwner() {\n return null;\n\n }", "Net findNet(){\n\t\tIterator iterator = gc.getIterator();\r\n\t\twhile(iterator.hasNext()){\r\n\t\t\tGameObject g = iterator.getNext();\r\n\t\t\tif (g instanceof Net)return (Net)g;\r\n\t\t}\r\n\treturn nullNet;\r\n\t}", "public static java.awt.Frame getParent() {\n return parent;\n}", "protected final LWContainerPeer<?, ?> getContainerPeer() {\n return containerPeer;\n }", "public PApplet getParent() {\n\t\treturn this.parent;\n\t}", "public ProductContainer getParent();", "@JsProperty\n Element getParentElement();", "public Instance getParent() {\r\n \t\treturn parent;\r\n \t}", "@NoProxy\n @NoWrap\n @NoDump\n public BwEvent getParent() {\n return parent;\n }", "public JLabel getCommunicationLabel() {\n\t\treturn this.lblCommunication;\n\t}", "public final Node getOther() {\n Flow f = getFlow();\n return f.isInternal()\n ? isSend()\n ? f.getTarget()\n : f.getSource()\n : ( (ExternalFlow) f ).getConnector();\n }", "public Component getComponent() {\n return component;\n }", "SeleniumComponent parent();", "@Override\n public DEObject getParent()\n {\n if (subject.getOwner() instanceof DeltaReplacedConstituent)\n return getEngine().locateObject(subject.getOwner().getOwner());\n return getEngine().locateObject(subject.getOwner());\n }", "TMNodeModelComposite getParent() {\n return parent;\n }", "protected LWWindowPeer getWindowPeerOrSelf() {\n return getWindowPeer();\n }", "public JawbComponent getMainComponent () {\n return null;\n }", "protected LttlComponent getHostComponent()\n\t{\n\t\tif (hostCompId < 0) return null;\n\t\treturn Lttl.scenes.findComponentByIdAllScenes(hostCompId);\n\t}", "public ProtocolProviderServiceRssImpl getParentProvider()\n {\n return this.parentProvider;\n }", "protected final Component getComponent()\n\t{\n\t\treturn component;\n\t}", "public ProtocolProviderService getParentProvider()\n {\n return provider;\n }", "public String getParentNode()\r\n\t{\r\n\t\tif (roadBelongingType.equals(\"inbound\"))\r\n\t\t{\r\n\t\t\treturn endNode;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn startNode;\r\n\t\t}\r\n\t}", "@DISPID(-2147418104)\n @PropGet\n ms.html.IHTMLElement parentElement();", "public final String getNetId( )\r\n {\r\n return netId;\r\n }", "@Override\n\tpublic Component getComponent() {\n\t\treturn this;\n\t}", "private Frame getFrameParent() {\r\n Frame parent;// = new Frame();\r\n Container container = this;\r\n\r\n while (!(container.getParent() instanceof Frame)) {\r\n container = container.getParent();\r\n }\r\n parent = (Frame) container.getParent();\r\n\r\n return parent;\r\n }", "@Override\n\tpublic Component getComponent() {\n\t\treturn toolbox;\n\t}", "private Component getDocked(Component c) {\r\n\t\tif (c instanceof DefaultDockingPort)\r\n\t\t\treturn ((DefaultDockingPort) c).getDockedComponent();\r\n\t\treturn c;\r\n\t}", "public String getOwningPart() {\n return this.owningPart;\n }", "public Object getParent() {\r\n return this.parent;\r\n }", "RegistryNode getParentNode() {\n return parentNode;\n }", "public abstract Node getBoundingNode();", "public String getNetPayable()\n\t{\n\t\twaitForVisibility(netPayable);\n\t\treturn netPayable.getText();\n\t}", "public Object getParent() {\n return this.parent;\n }", "public Object getParent() {\n return this.parent;\n }", "public Object getParent() {\n return this.parent;\n }" ]
[ "0.6414828", "0.62773156", "0.62505174", "0.6217689", "0.61619323", "0.6073559", "0.5998143", "0.5981141", "0.594978", "0.58951116", "0.5893349", "0.5893349", "0.5893349", "0.5893349", "0.58930594", "0.5885165", "0.5880288", "0.58488923", "0.58488923", "0.5831596", "0.5812583", "0.58005977", "0.57895374", "0.57694054", "0.57694054", "0.57694054", "0.57694054", "0.57694054", "0.57694054", "0.5751773", "0.5751773", "0.5751773", "0.5751773", "0.57469296", "0.5742521", "0.57263464", "0.57212377", "0.5714964", "0.5712205", "0.5704551", "0.5696789", "0.5694624", "0.5684593", "0.56700206", "0.5641449", "0.562939", "0.5626667", "0.5605021", "0.5595497", "0.55842876", "0.55801797", "0.55724216", "0.555715", "0.55531126", "0.5550726", "0.5538831", "0.5532172", "0.55218107", "0.5511762", "0.5508928", "0.55024827", "0.5495481", "0.54794407", "0.5468308", "0.54663247", "0.54655224", "0.54560053", "0.54446834", "0.5430741", "0.54264635", "0.5423101", "0.541365", "0.54082024", "0.54053134", "0.53890735", "0.53846747", "0.5383898", "0.53792405", "0.53706145", "0.5365158", "0.5364269", "0.5347311", "0.5344453", "0.5329746", "0.53282356", "0.5311674", "0.5288518", "0.5281521", "0.5280329", "0.52780825", "0.52658814", "0.5265819", "0.52620274", "0.5246824", "0.52392477", "0.52323973", "0.523113", "0.5226045", "0.5226045", "0.5226045" ]
0.6497864
0
Sets the reference to the enclosing net component.
public void setNetComponent(TriangleNet3DComp net3D) { comp = net3D; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setReference(Reference ref)\n {\n this.ref = ref;\n }", "public void setReference (SoftReference ref)\r\n {\r\n _reference = ref;\r\n }", "protected void reference(H outerRef, C childRef) {\n\t\tthis.outerRef = outerRef;\n\t\tthis.THIS = childRef;\n\t}", "protected void setNet(BigDecimal net){\n\t\tsynchronized(this){\n\t\t\tthis.net = net;\n\t\t}\n\t}", "public void set(final Object ref) {\n synchronized (lock) {\n if (set) { throw new IllegalStateException(\"Reference has already been set\"); }\n\n if ((!allowsNull()) && (ref == null)) { throw new IllegalArgumentException(\n \"This instance cannot hold a null reference value\"); }\n\n set = true;\n this.ref = ref;\n }\n }", "public void elSetReference(Object bean);", "void setReference(String reference);", "public void setReference(javax.xml.namespace.QName reference)\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(REFERENCE$0, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(REFERENCE$0);\n }\n target.setQNameValue(reference);\n }\n }", "public void setReference(String reference);", "public void xsetReference(org.apache.xmlbeans.XmlQName reference)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlQName target = null;\n target = (org.apache.xmlbeans.XmlQName)get_store().find_element_user(REFERENCE$0, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlQName)get_store().add_element_user(REFERENCE$0);\n }\n target.set(reference);\n }\n }", "private void setCrossRef(CrossRef crossRef) { this.crossRef = crossRef; }", "public Binding setReference(IDatatype theValue) {\n\t\tmyReference = theValue;\n\t\treturn this;\n\t}", "protected void setParentReference(BSTNode cur, BSTNode nw) {\n\t\tassert (cur != null);\n\t\tassert (cur.parent != null);\n\t\tassert (nw != null);\n\n\t\tif (cur == cur.parent.left) {\n\t\t\tcur.parent.left = nw;\n\t\t} else if (cur == cur.parent.right) {\n\t\t\tcur.parent.right = nw;\n\t\t} else {\n\t\t\tassert (false);\n\t\t}\n\t}", "void setRef(java.lang.String ref);", "protected void setNeuralNetwork(NeuralNetwork nnet) {\n\t\tthis.nnet = nnet;\n\t}", "void setPointOfReference(String url)\n throws IOException, SoapException;", "public void setObjectReferenceImpl(ObjectReferenceImpl objectReferenceImpl) {\n this.objectReference = objectReferenceImpl;\n }", "private void setReference(String ref) {\n Set<String> allRefs = getAllReferenceNames();\n if (!allRefs.contains(ref) && allRefs.contains(\"chr\" + ref)) {\n ref = \"chr\" + ref;\n }\n currentReference = ref;\n Genome loadedGenome = GenomeController.getInstance().getGenome();\n setMaxRange(new Range(1, loadedGenome.getLength()));\n setRange(1, Math.min(1000, loadedGenome.getLength()));\n }", "public void setComponent(ElementView jc) {\n\t\tthis.jc = jc;\n\t}", "public final void setNetId( String id) //final doesn't allow new rules or ways in door\r\n {\r\n netId = id; //only place I can do it in set methods\r\n }", "public void setReferenceSize() {\n transformManager.setReferenceSize();\n scaledComponentLayout.saveSwingComponentCoordinates( 1.0 );\n setScale( 1.0 );\n\n // Set the canvas size\n determineCanvasSize();\n\n if ( DEBUG_OUTPUT_ENABLED ) {\n System.out.println( \"ApparatusPanel2.setReferenceBounds: referenceBounds=\" + transformManager.getReferenceBounds() );\n }\n }", "@Override\n public void setCurSharedRef(MPlaceholder arg0)\n {\n \n }", "protected void setNetlister(final Netlister netlister) {\n\t\tthis.netlister = netlister;\n\t}", "public void setOuterFrame(JFrame outerFrame) {\n this.outerFrame = outerFrame;\n }", "protected void setComponent(Component newComponent) {\n\tcomponent = newComponent;\n}", "public void setOwner(RMParentShape anObj) { _owner = anObj; }", "public void setVisualReference(VisualReferenceOutput visualReference) {\n this.visualReference = visualReference;\n }", "public String getNetworkReference() {\n return networkReference;\n }", "public void setComponent(AppEngineComponent component) {\n\t\tthis.parent = component;\n\t\tthis.cmpCtx = parent.getComponentContext();\n\t\t// initiate the Message Factory\n\t\tif (cmpCtx instanceof ComponentContextImpl) {\n\t\t\tmessageFactory = new MessageFactory((ComponentContextImpl) cmpCtx);\n\t\t} else {\n\t\t\t// logger.warn(\"Can't initiate the Message Factory!\");\n\t\t}\n\t\ttry {\n\t\t\tthis.channel = this.cmpCtx.getDeliveryChannel();\n\t\t} catch (MessagingException e) {\n\t\t\t// logger.warn(\"Can't get the Delivery Channel\", e);\n\t\t}\n\t}", "public void setParentLayer(EObject newValue);", "public void addReference() {\r\n mReferenced = true;\r\n }", "void setParent(WidgetParent ip) {\n this.m_parent = ip;\n }", "public static void setCurrentClient(Client c){\r\n currClient = c;\r\n }", "public void xsetRoadwayRef(org.landxml.schema.landXML11.RoadwayNameRef roadwayRef)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.landxml.schema.landXML11.RoadwayNameRef target = null;\r\n target = (org.landxml.schema.landXML11.RoadwayNameRef)get_store().find_attribute_user(ROADWAYREF$16);\r\n if (target == null)\r\n {\r\n target = (org.landxml.schema.landXML11.RoadwayNameRef)get_store().add_attribute_user(ROADWAYREF$16);\r\n }\r\n target.set(roadwayRef);\r\n }\r\n }", "public void saveParent( NetDot p ) {\n\t\tparent = p;\n\t}", "public void setReferencedLink(EObject newValue);", "private void setConnection (TwGateway newCxn) {\n boolean connected = (newCxn != null);\n closeXn.setEnabled (connected);\n openXn.setEnabled (!connected);\n getWksp.setEnabled (connected);\n KbWorkspace[] showingWorkspaces = multiWkspView.getWorkspaces ();\n System.out.println (\"Removing \" + showingWorkspaces.length + \" workspaces!\");\n for (int i=0; i<showingWorkspaces.length; i++)\n multiWkspView.removeWorkspace (showingWorkspaces[i]);\n Rectangle frameRect = getCurrentFrame().getBounds ();\n getCurrentFrame().setBounds(frameRect.x, frameRect.y,\n\t\t\t\tframeRect.width + 1, frameRect.height + 1);\n connection = newCxn;\n }", "public void setNode(ResidentNode node) {\r\n\t\tthis.node = node;\r\n//\t\tif (this.node != null && this.node.getMFrag() != null) {\r\n//\t\t\tthis.mebn = this.node.getMFrag().getMultiEntityBayesianNetwork();\r\n//\t\t}\r\n\t}", "public final void setReference(final String newReference) {\n reference = newReference;\n }", "public void setIsInnerClassReference(boolean nis) {\n this.isInnerClassReference = nis;\n }", "public void setContents(Network network) {\r\n \t\tthis.actor = null;\r\n \t\tthis.broadcast = null;\r\n \t\tthis.network = network;\r\n \t\tthis.serdes = null;\r\n \t}", "public void xsetIntersectingRoadwayRef(org.landxml.schema.landXML11.RoadwayNameRef intersectingRoadwayRef)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.landxml.schema.landXML11.RoadwayNameRef target = null;\r\n target = (org.landxml.schema.landXML11.RoadwayNameRef)get_store().find_attribute_user(INTERSECTINGROADWAYREF$20);\r\n if (target == null)\r\n {\r\n target = (org.landxml.schema.landXML11.RoadwayNameRef)get_store().add_attribute_user(INTERSECTINGROADWAYREF$20);\r\n }\r\n target.set(intersectingRoadwayRef);\r\n }\r\n }", "Reference owner();", "private void setNode(DefaultMutableTreeNode node){\n\t\t\n\t\tthis.node = node;\n\t\t\n\t}", "public void setParent(Concept _parent) { parent = _parent; }", "public void setReference(String reference) {\n this.reference = reference;\n }", "public void setReference(String reference) {\n this.reference = reference;\n }", "public abstract void setParent(UIComponent parent);", "IViewerBinding setContent(EObject object, EReference reference);", "void setParent(UIComponent parent);", "public static void setActorRef(Object actorRefObj) {\n actorRef = actorRefObj;\n }", "public void setOriginalRef(Reference originalRef) {\n this.originalRef = originalRef;\n }", "public void setSubNet(PetriNetModel m) {\n //subModel = m;\n }", "public void setParent(State aParent);", "public void setParent(ILexComponent parent);", "protected void setIssue(Issue issue) {\n\t\tthis.issue = new WeakReference<>(issue);\n\t}", "public void linkUp(){\n\t\tsocket.setGame(game);\n//\t\tframe.setSocket(socket);\n\t}", "public void setOwner(ListenerOwner owner)\n {\n super.setOwner(owner);\n if (owner != null)\n this.fieldChanged(DBConstants.DISPLAY, DBConstants.INIT_MOVE); // Do this\n }", "public void ref() {\n\n\t}", "@Override\r\n\tpublic void setParent(Refactoring emfRefactoring) {\r\n\t\tthis.parent = emfRefactoring;\r\n\t}", "public void setReferences(org.purl.dc.elements.x11.SimpleLiteral references)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.purl.dc.elements.x11.SimpleLiteral target = null;\r\n target = (org.purl.dc.elements.x11.SimpleLiteral)get_store().find_element_user(REFERENCES$0, 0);\r\n if (target == null)\r\n {\r\n target = (org.purl.dc.elements.x11.SimpleLiteral)get_store().add_element_user(REFERENCES$0);\r\n }\r\n target.set(references);\r\n }\r\n }", "protected void setRefList( ReferenceList refList )\n {\n _refList = refList;\n }", "public void setIntersectingRoadwayRef(java.lang.String intersectingRoadwayRef)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(INTERSECTINGROADWAYREF$20);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(INTERSECTINGROADWAYREF$20);\r\n }\r\n target.setStringValue(intersectingRoadwayRef);\r\n }\r\n }", "NetworkActivity (Context setContext){\n this.context = setContext;\n }", "public void setHostRef(Reference hostRef) {\n this.hostRef = hostRef;\n }", "public void setParentComponent(Component _component) {\r\n\t\tparentComponent = _component;\r\n\t}", "public static void setParent(java.awt.Frame newParent) {\n parent = newParent;\n}", "public void setNodeElement(NodeElement element) {\n this.nodeElement = element;\n this.sourceConnections = this.nodeElement.getSourceConnections();\n this.targetConnections = this.nodeElement.getTargetConnections();\n }", "public void setEjbLocalRef(org.apache.geronimo.xbeans.geronimo.naming.GerEjbLocalRefType ejbLocalRef)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.geronimo.xbeans.geronimo.naming.GerEjbLocalRefType target = null;\n target = (org.apache.geronimo.xbeans.geronimo.naming.GerEjbLocalRefType)get_store().find_element_user(EJBLOCALREF$0, 0);\n if (target == null)\n {\n target = (org.apache.geronimo.xbeans.geronimo.naming.GerEjbLocalRefType)get_store().add_element_user(EJBLOCALREF$0);\n }\n target.set(ejbLocalRef);\n }\n }", "public void setInternetRadioStationOwner(Contact value) {\r\n\t\tBase.set(this.model, this.getResource(), INTERNETRADIOSTATIONOWNER, value);\r\n\t}", "public synchronized void setGameDrawingComponent(Component comp) {\n this.gameDrawingComponent = comp;\n }", "final void setParent(ShapeParent newParent)\n {\n this.parent = newParent;\n }", "public SetOnceRef(Object ref) {\n this(ref, false, true);\n }", "public abstract void setNodes();", "void setParent(IGLProperty parent);", "public void setTreeNode(TreeNode treeNode) {\n this.treeNode = treeNode;\n }", "public void setInheritRefs(boolean value) {\n inheritRefs = value;\n }", "public void setCOMStatus (TCPClient conn, boolean bbCanSend)\r\n\t{\r\n\t\tsynchronized (this)\r\n\t\t{\r\n\t\t\t_roboCOM=conn;\r\n\t\t\t_bbCanSend= (conn!=null) && bbCanSend;\r\n\t\t}\r\n\t}", "public void setReferencePosition(Position referencePosition)\n {\n this.referencePosition = referencePosition;\n this.reset();\n }", "@Override\n\t\tprotected boolean fixReferences(EObject object) {\n\t\t\tsuper.fixReferences(object);\n\t\t\tEObject container = object.eContainer();\n\t\t\t\n\t\t\tif( ZDLUtil.isZDLConcept(object, CCMNames.INTERFACE_PORT)) {\n\t\t\t\t\n\t\t\t\tEObject fixedRole = null; // Old port reference that needs to be updated\n\t\t\t\t\n\t\t\t\tfor( TreeIterator<EObject> iter = object.eResource().getAllContents(); iter.hasNext(); ) {\n\t\t\t\t\tEObject next = iter.next();\n\t\t\t\t\t\n\t\t\t\t\tif( next instanceof ConnectorEnd ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tConnectorEnd ce = (ConnectorEnd)next;\n\t\t\t\t\t\tif( fixableInterfacePort(object, ce, container)) {\n\t\t\t\t\t\t\tfixedRole = ce.getRole();\n\t\t\t\t\t\t\tce.setRole((Port)object);\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor( TreeIterator<EObject> iter = object.eResource().getAllContents(); iter.hasNext(); ) {\n\t\t\t\t\tEObject next = iter.next();\n\t\t\t\t\t\n\t\t\t\t\tif( next instanceof Node ) {\n\t\t\t\t\t\tNode node = (Node)next;\n\t\t\t\t\t\tif( node.getElement() instanceof Port ) {\n\t\t\t\t\t\t\tPort nodeElement = (Port)node.getElement();\n\t\t\t\t\t\t\tif( nodeElement == fixedRole ) {\n\t\t\t\t\t\t\t\tnode.setElement(object);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn true;\n\t\t}", "private void innerSendOpennetRef(long xferUID, byte[] padded, PeerNode peer, ByteCounter ctr) throws NotConnectedException {\n\t\tByteArrayRandomAccessThing raf = new ByteArrayRandomAccessThing(padded);\n\t\traf.setReadOnly();\n\t\tPartiallyReceivedBulk prb =\n\t\t\tnew PartiallyReceivedBulk(node.usm, padded.length, Node.PACKET_SIZE, raf, true);\n\t\ttry {\n\t\t\tBulkTransmitter bt =\n\t\t\t\tnew BulkTransmitter(prb, peer, xferUID, true, ctr, true);\n\t\t\tbt.send();\n\t\t} catch (DisconnectedException e) {\n\t\t\tthrow new NotConnectedException(e);\n\t\t}\n\t}", "public void setRoadwayRef(java.lang.String roadwayRef)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ROADWAYREF$16);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(ROADWAYREF$16);\r\n }\r\n target.setStringValue(roadwayRef);\r\n }\r\n }", "<E extends CtElement> E setParent(E parent);", "public void bindToThread() {\n\t\tthis.oldTransactionInfo = transactionInfoHolder.get();\n\t\ttransactionInfoHolder.set(this);\n\t}", "public void setReference(boolean isReference) {\n ModelEvent<?> event = new ModelEventBuilder( ModelEventType.REFERENCE_FLAG_MODIFIED, this )\n .setOldValue( this.isReference ).setNewValue( isReference ).buildEvent();\n\n this.isReference = isReference;\n publishEvent( event );\n }", "public void setReferencedSuit(Suit referencedSuit) {\n this.referencedSuit = referencedSuit;\n }", "public void setParent(Instance parent) {\r\n \t\tthis.parent = parent;\r\n \t}", "public void sendOpennetRef(boolean isReply, long uid, PeerNode peer, byte[] noderef, ByteCounter ctr) throws NotConnectedException {\n\t\tbyte[] padded = new byte[paddedSize(noderef.length)];\n\t\tif(noderef.length > padded.length) {\n\t\t\tLogger.error(this, \"Noderef too big: \"+noderef.length+\" bytes\");\n\t\t\treturn;\n\t\t}\n\t\tnode.fastWeakRandom.nextBytes(padded); // FIXME implement nextBytes(buf,offset, length)\n\t\tSystem.arraycopy(noderef, 0, padded, 0, noderef.length);\n\t\tlong xferUID = node.random.nextLong();\n\t\tMessage msg2 = isReply ? DMT.createFNPOpennetConnectReplyNew(uid, xferUID, noderef.length, padded.length) :\n\t\t\tDMT.createFNPOpennetConnectDestinationNew(uid, xferUID, noderef.length, padded.length);\n\t\tpeer.sendAsync(msg2, null, ctr);\n\t\tinnerSendOpennetRef(xferUID, padded, peer, ctr);\n\t}", "public cSerial5(cProtocol3 owner) {\n oParent=owner;\n }", "public void setInheritrefs(boolean b) {\r\n this.inheritRefs = b;\r\n }", "protected void setParent(CodeItem codeItem) {\n this.parent = codeItem;\n }", "public void setSocket(SocketWrapper socket);", "public void setCnode(Node<T1> cNode) {\r\n\t\tthis.cnode = cNode;\r\n\t\tcheckRep();\r\n\t}", "public void setInternetRadioStationOwner( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(this.model, this.getResource(), INTERNETRADIOSTATIONOWNER, value);\r\n\t}", "public void setParent(RMParentShape aShape) { _parent = aShape; }", "@Override\n\tpublic void setRef(int parameterIndex, Ref x) throws SQLException {\n\t\t\n\t}", "private void setNet(String rawText){\n\t\tBigDecimal num = new BigDecimal(Double.parseDouble(rawText));\n\t\tsynchronized(this){\n\t\t\tthis.net = num;\n\t\t}\n\t}", "public void setOOComponentHandle(OOComponentHelper ooComponent) {\n ooDocument = ooComponent;\n }", "public void setAgentRef(CondominioAgent agentRef){\n\t\tagentName = agentRef;\n\t}", "public void setParent(PlasticClassPool parent) \n {\n this.parent = parent;\n parent.children.add(this);\n }" ]
[ "0.64506793", "0.62290335", "0.60806656", "0.5864893", "0.5750319", "0.5745874", "0.56976986", "0.5688037", "0.56395376", "0.5598706", "0.5483119", "0.54123443", "0.540397", "0.54023224", "0.5375573", "0.5354803", "0.5351447", "0.53446066", "0.53075457", "0.52558523", "0.5248693", "0.5225521", "0.5212709", "0.52116877", "0.5188403", "0.51676315", "0.51531166", "0.5137961", "0.5137894", "0.51240534", "0.5118554", "0.51119196", "0.5090436", "0.5074717", "0.5053634", "0.5020729", "0.50207084", "0.50199723", "0.50147206", "0.50085473", "0.5007594", "0.500599", "0.50053245", "0.49834594", "0.497683", "0.4972771", "0.4972771", "0.4972325", "0.49508685", "0.49503514", "0.49400404", "0.49009472", "0.48994005", "0.48978356", "0.48893216", "0.48666048", "0.48514256", "0.48492453", "0.4838962", "0.48365948", "0.48355454", "0.48336", "0.48334578", "0.48289043", "0.48219326", "0.4816218", "0.48035035", "0.48027003", "0.48002535", "0.47985512", "0.47969192", "0.479608", "0.47785157", "0.4774879", "0.4771247", "0.4770008", "0.47633544", "0.474868", "0.47473013", "0.4744537", "0.47440955", "0.47440392", "0.47437766", "0.4742301", "0.47413176", "0.47404566", "0.47361878", "0.47327656", "0.47287357", "0.47232047", "0.47212896", "0.4717878", "0.47154754", "0.47093123", "0.47058412", "0.47025663", "0.47002754", "0.46979913", "0.46929842", "0.46926" ]
0.5604583
9
Sets the id to given value
public void setID(int i) { this.id = i; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 }", "private void setId(int value) {\n \n id_ = value;\n }", "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 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(int value) {\n this.id = value;\n }", "public void setId(String value) {\n \tif (value==null)\n \t\tthis.id = \"\";\n \telse\n \t\tthis.id = value;\n }", "public void setId(Integer value) {\n this.id = value;\n }", "public void setId(Integer value) {\n this.id = value;\n }", "public void setId(Integer value) {\n this.id = value;\n }", "public void setId(long value) {\r\n this.id = value;\r\n }", "public void setId(long value) {\r\n this.id = value;\r\n }", "public void setId(long value) {\n this.id = value;\n }", "public void setId(long value) {\n this.id = value;\n }", "public void setId(long value) {\n this.id = value;\n }", "public void setId(long value) {\n this.id = value;\n }", "public void setId(long value) {\n this.id = value;\n }", "public void setId(long value) {\n this.id = value;\n }", "public void setId(long value) {\n this.id = value;\n }", "private void setID(gw.pl.persistence.core.Key value) {\n __getInternalInterface().setFieldValue(ID_PROP.get(), value);\n }", "private void setID(gw.pl.persistence.core.Key value) {\n __getInternalInterface().setFieldValue(ID_PROP.get(), value);\n }", "private void setID(gw.pl.persistence.core.Key value) {\n __getInternalInterface().setFieldValue(ID_PROP.get(), value);\n }", "public void setId(java.lang.String value) {\n this.id = value;\n }", "public void setId(java.lang.String value) {\n this.id = value;\n }", "public void setId(java.lang.String value) {\n this.id = value;\n }", "public void setID(int value) {\n this.id = value;\n }", "public void setId(java.lang.Integer value) {\n this.id = value;\n }", "public void setID(int value) {\r\n\t\tid = value;\r\n\t}", "public void setId(Long value) {\r\n this.id = value;\r\n }", "public void setId(Integer value) {\n set(0, value);\n }", "public void setId(Long value) {\n this.id = value;\n }", "void setId(int val);", "private void setAId(int value) {\n \n aId_ = value;\n }", "public void setId(java.lang.Long value) {\n this.id = value;\n }", "public void setId(String key, Object value) {\n // remove ID, if empty/0/null\n // if we only skipped it, the existing entry will stay although someone changed it to empty.\n String v = String.valueOf(value);\n if (\"\".equals(v) || \"0\".equals(v) || \"null\".equals(v)) {\n ids.remove(key);\n }\n else {\n ids.put(key, value);\n }\n firePropertyChange(key, null, value);\n\n // fire special events for our well known IDs\n if (Constants.TMDB.equals(key) || Constants.IMDB.equals(key) || Constants.TVDB.equals(key) || Constants.TRAKT.equals(key)) {\n firePropertyChange(key + \"Id\", null, value);\n }\n }", "public void setID(String value) {\r\n \t\t_id = value;\r\n \r\n \t}", "public void setId(java.lang.Long value) {\r\n\t\tthis.id = value;\r\n\t}", "public void setID(java.lang.Integer value);", "public void setID(long value) {\n this.id = value;\n }", "public Builder setId(long value) {\n \n id_ = value;\n onChanged();\n return this;\n }", "public Builder setId(int value) {\n \n id_ = value;\n onChanged();\n return this;\n }", "public Builder setId(int value) {\n \n id_ = value;\n onChanged();\n return this;\n }", "public Builder setId(int value) {\n \n id_ = value;\n onChanged();\n return this;\n }", "void setID(int val)\n throws RemoteException;", "public void setID(gw.pl.persistence.core.Key value) {\n __getInternalInterface().setFieldValue(ID_PROP.get(), value);\n }", "public void setID(gw.pl.persistence.core.Key value) {\n __getInternalInterface().setFieldValue(ID_PROP.get(), value);\n }", "public void setID(gw.pl.persistence.core.Key value) {\n __getInternalInterface().setFieldValue(ID_PROP.get(), value);\n }", "@Override\n\tpublic void setId(long value) {\n super.setId(value);\n }", "public void setValue_id(java.lang.String value_id) {\n this.value_id = value_id;\n }", "public Builder setId(long value) {\n\n id_ = value;\n onChanged();\n return this;\n }", "public Builder setId(long value) {\n\n id_ = value;\n onChanged();\n return this;\n }", "public Builder setId(long value) {\n\n id_ = value;\n onChanged();\n return this;\n }", "public Builder setId(long value) {\n\n id_ = value;\n onChanged();\n return this;\n }", "public Builder setId(int value) {\n bitField0_ |= 0x00000001;\n id_ = value;\n \n return this;\n }", "public Builder setId(int value) {\n bitField0_ |= 0x00000002;\n id_ = value;\n onChanged();\n return this;\n }", "public void assignId(int id);", "public void setValueId(Integer valueId) {\n this.valueId = valueId;\n }", "public void setValueId(Integer valueId) {\n this.valueId = valueId;\n }", "public void setId(Object id) {\n this.id = id;\n }", "public void setId(Object id) {\n this.id = id;\n }", "public Builder setId(int value) {\n bitField0_ |= 0x00000001;\n id_ = value;\n onChanged();\n return this;\n }", "public Builder setId(int value) {\n bitField0_ |= 0x00000001;\n id_ = value;\n onChanged();\n return this;\n }", "public Builder setId(int value) {\n bitField0_ |= 0x00000001;\n id_ = value;\n onChanged();\n return this;\n }", "public Builder setId(int value) {\n bitField0_ |= 0x00000001;\n id_ = value;\n onChanged();\n return this;\n }", "public Builder setId(int value) {\n bitField0_ |= 0x00000001;\n id_ = value;\n onChanged();\n return this;\n }", "public Builder setId(int value) {\n bitField0_ |= 0x00000001;\n id_ = value;\n onChanged();\n return this;\n }", "public Builder setId(int value) {\n bitField0_ |= 0x00000001;\n id_ = value;\n onChanged();\n return this;\n }", "public Builder setId(int value) {\n bitField0_ |= 0x00000001;\n id_ = value;\n onChanged();\n return this;\n }", "public Builder setId(int value) {\n bitField0_ |= 0x00000001;\n id_ = value;\n onChanged();\n return this;\n }", "public Builder setId(int value) {\n bitField0_ |= 0x00000001;\n id_ = value;\n onChanged();\n return this;\n }", "public Builder setId(int value) {\n bitField0_ |= 0x00000001;\n id_ = value;\n onChanged();\n return this;\n }", "public Builder setId(int value) {\n bitField0_ |= 0x00000001;\n id_ = value;\n onChanged();\n return this;\n }", "public Builder setId(int value) {\n bitField0_ |= 0x00000001;\n id_ = value;\n onChanged();\n return this;\n }", "public void setId(byte value) {\r\n this.id = value;\r\n }", "public Builder setId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n id_ = value;\n onChanged();\n return this;\n }", "public Builder setId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n id_ = value;\n onChanged();\n return this;\n }", "public Builder setId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n id_ = value;\n onChanged();\n return this;\n }", "public Builder setId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n id_ = value;\n onChanged();\n return this;\n }", "public Builder setId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n id_ = value;\n onChanged();\n return this;\n }", "public void setId(final String value)\n\t{\n\t\tsetId( getSession().getSessionContext(), value );\n\t}", "public Builder setId(long value) {\n \n id_ = value;\n onChanged();\n return this;\n }", "public Builder setId(long value) {\n \n id_ = value;\n onChanged();\n return this;\n }", "public Builder setId(final String value) {\n _id = value;\n return this;\n }", "public Builder setId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n id_ = value;\n onChanged();\n return this;\n }", "public Builder setId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n id_ = value;\n onChanged();\n return this;\n }", "public Builder setId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n id_ = value;\n onChanged();\n return this;\n }", "public Builder setId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n id_ = value;\n onChanged();\n return this;\n }" ]
[ "0.86705583", "0.8667396", "0.8527222", "0.8527222", "0.8527222", "0.8527222", "0.8527222", "0.8527222", "0.8527222", "0.8296651", "0.82762337", "0.8270551", "0.8270551", "0.8270551", "0.8270551", "0.8270551", "0.8270551", "0.8270551", "0.8270551", "0.8270551", "0.81388927", "0.8129463", "0.8129463", "0.81121004", "0.8108338", "0.8108338", "0.80946183", "0.80946183", "0.80946183", "0.80946183", "0.80946183", "0.80946183", "0.80946183", "0.8037353", "0.8037353", "0.8037353", "0.796295", "0.796295", "0.796295", "0.7954664", "0.7926952", "0.7878658", "0.78644764", "0.7834424", "0.7832643", "0.7782229", "0.7720028", "0.7666839", "0.7666702", "0.766583", "0.7654691", "0.7647223", "0.7606279", "0.760517", "0.7603399", "0.7603399", "0.7603399", "0.76005805", "0.7590721", "0.7590721", "0.7590721", "0.7562769", "0.7547892", "0.7535271", "0.7535271", "0.7535271", "0.7535271", "0.7484191", "0.7463442", "0.7462681", "0.745379", "0.745379", "0.74529505", "0.74529505", "0.7434632", "0.7434632", "0.7434632", "0.7434632", "0.7434632", "0.7434632", "0.7434632", "0.7434632", "0.7434632", "0.7434632", "0.7434526", "0.74329036", "0.74329036", "0.7418626", "0.7399058", "0.7399058", "0.7399058", "0.7399058", "0.7399058", "0.73852015", "0.7381867", "0.7381867", "0.73779726", "0.73651254", "0.73651254", "0.73651254", "0.73651254" ]
0.0
-1
Returns the type of this as a SimpleGeoObj.
public byte getType() { return SimpleGeoObj.TRIANGLE_ELT_3D; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public GeoJsonType getType() {\n return this.type;\n }", "public String getType() {\n return getGeometryType();\n }", "public Type<O> getObjectType()\n\t{\n\t\treturn this.getSettings().getObjectType();\n\t}", "public FreeColGameObjectType getType() {\n return this;\n }", "public GeoObject getGeoObject(String _uid)\n {\n return null;\n }", "public ShapeType getType() {\n\t\t\treturn type.get();\n\t\t}", "public ObjectProperty<ShapeType> typeProperty() {\n\t\t\treturn type;\n\t\t}", "@Override\n public Class<?> getObjectType() {\n return this.type;\n }", "@Dump(compound = true)\n public BwGeo getGeo() {\n return geo;\n }", "@Override\n\tpublic Type getType() {\n\t\treturn heldObj.getType();\n\t}", "public short getObjtype() {\n\treturn objtype;\n}", "public Class<? extends T> getDistanceObjectClass();", "public Report.LocationOuterClass.Location.LocationType getLocationtype() {\n Report.LocationOuterClass.Location.LocationType result = Report.LocationOuterClass.Location.LocationType.valueOf(locationtype_);\n return result == null ? Report.LocationOuterClass.Location.LocationType.UNRECOGNIZED : result;\n }", "public Report.LocationOuterClass.Location.LocationType getLocationtype() {\n Report.LocationOuterClass.Location.LocationType result = Report.LocationOuterClass.Location.LocationType.valueOf(locationtype_);\n return result == null ? Report.LocationOuterClass.Location.LocationType.UNRECOGNIZED : result;\n }", "public SoyType getType() {\n return getTypeWrapper().getType();\n }", "ShapeType getShapeType();", "public java.lang.Object getAnyType() {\n return localAnyType;\n }", "LocationType getLocationType() {\r\n\t\treturn type;\r\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic Class getObjectType()\n\t{\n\t\tObject obj = getObject();\n\t\tif (obj == null)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\treturn obj.getClass();\n\t}", "public ObjType getType () {\n\t\tif (type == null) {\n\t\t\ttype = Virtue.getInstance().getConfigProvider().getObjTypes().list(id);\n\t\t}\n\t\treturn type;\n\t}", "public LocationType getLocationType(){\n\t\treturn type;\n\t}", "@Override\r\n\tpublic int getConstructionType() {\r\n\t\treturn GeoConstruction.GEOCONS_TYPE_ROTATED_POINT;\r\n\t}", "protected SimpleTypeImpl getSimpleCollection() {\n // Single property collection retrieve\n SimpleTypeImpl simpleCollectionString = new SimpleTypeImpl(\"simpleNameSpace\", SIMPLE_TYPE_NAME, null, true, null, null, null);\n return simpleCollectionString;\n }", "public LocationType getLocationType() {\n\t\treturn locationType;\n\t}", "public String getLocationType() {\n return locationType;\n }", "EDataType getBasicType()\n {\n ExtendedMetaData extendedMetaData = getExtendedMetaData();\n for (EDataType eDataType = getEcoreDataType(); eDataType != null; eDataType = extendedMetaData.getBaseType(eDataType))\n {\n String namespace = extendedMetaData.getNamespace(eDataType);\n if (EcorePackage.eNS_URI.equals(namespace) || XMLTypePackage.eNS_URI.equals(namespace))\n {\n return eDataType;\n }\n }\n \n String instanceClassName = getEcoreDataType().getInstanceClassName();\n for (EClassifier eClassifier : EcorePackage.eINSTANCE.getEClassifiers())\n {\n if (eClassifier instanceof EDataType && eClassifier.getInstanceClassName().equals(instanceClassName))\n {\n EDataType eDataType = (EDataType)eClassifier;\n if (eDataType.isSerializable())\n {\n return eDataType;\n }\n }\n }\n return null;\n }", "public Type getType1() {\n\t\treturn this.data.getType1();\n\t}", "public Object getType()\r\n {\r\n\treturn type;\r\n }", "public Type getType();", "public SimpleGeometricObject() {\r\n this.dateCreated = new java.util.Date();\r\n }", "PSObject getTypeReference();", "public ViewObjectImpl gettypeVO1() {\n return (ViewObjectImpl)findViewObject(\"typeVO1\");\n }", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public ViewObjectImpl gettype1() {\n return (ViewObjectImpl)findViewObject(\"type1\");\n }", "public String getType() {\n\t\treturn gfType;\n\t}", "public Rule type()\n \t{\n \t\treturn firstOf(simpleMapType(), nonSimpleMapTypes());\n \t}", "public String getShapeType(){\n\t\treturn shapeType;\n\t}", "public java.lang.String getLocationtype() throws java.rmi.RemoteException;", "public Map<Integer, String> getGeometryType() throws SQLException {\n return retrieveExpected(createNativeGeometryTypeStatement(), STRING);\n }", "public JavaType getType() { return _type; }", "public String getType() {\r\n return this.getClass().getName();\r\n }", "public String objectTypeName()\r\n {\r\n return mObjectTypeName;\r\n }", "public type getType() {\r\n\t\treturn this.Type;\r\n\t}", "public IType getType();", "MapVisualizationType getVisualizationType();", "String getSType();", "public abstract String getObjectType();", "XClass getType();", "public tudresden.ocl20.core.jmi.ocl.commonmodel.Classifier toOclType() {\n if ( this instanceof DataType ) {\n String name = getNameA().toLowerCase();\n if ( name.equals(\"int\") || \n name.toLowerCase().equals(\"integer\") ||\n name.toLowerCase().equals(\"long\") ||\n name.toLowerCase().equals(\"byte\")\n ) {\n return this.getOclLibrary().getOclInteger(); \n } else if ( \n name.equals(\"double\") ||\n name.toLowerCase().equals(\"float\") ||\n name.toLowerCase().equals(\"real\") \n ) {\n return this.getOclLibrary().getOclReal(); \n } else if (\n name.equals(\"string\") ||\n name.equals(\"String\")\n ) {\n return this.getOclLibrary().getOclString(); \n } else if ( \n name.equals(\"bool\") ||\n name.equals(\"boolean\")\n ) {\n return this.getOclLibrary().getOclBoolean(); \n }\n else return this;\n } else {\n String name = getNameA().toLowerCase();\n if ( name.endsWith(\"string\") ) {\n String pathName = this.getPathNameA();\n // use endsWith instead of equals, since the top package also\n // has a name \n if ( pathName.endsWith(\"java::lang::String\") \n\t\t\t\t| pathName.endsWith(\"UML_OCL::String\")\n\t\t\t\t| pathName.endsWith(\"oclLib::String\")) {\n return this.getOclLibrary().getOclString();\n }\n }\n return this;\n }\n }", "public Class<?> getType() {\n switch (this.aggregate) {\n case COUNT_BIG:\n return DataTypeManager.DefaultDataClasses.LONG;\n case COUNT:\n return COUNT_TYPE;\n case SUM:\n Class<?> expressionType = this.getArg(0).getType();\n return SUM_TYPES.get(expressionType);\n case AVG:\n expressionType = this.getArg(0).getType();\n return AVG_TYPES.get(expressionType);\n case ARRAY_AGG:\n if (this.getArg(0) == null) {\n return null;\n }\n return DataTypeManager.getArrayType(this.getArg(0).getType());\n case TEXTAGG:\n return DataTypeManager.DefaultDataClasses.BLOB;\n case JSONARRAY_AGG:\n return DataTypeManager.DefaultDataClasses.JSON;\n case USER_DEFINED:\n case STRING_AGG:\n return super.getType();\n case PERCENT_RANK:\n case CUME_DIST:\n return DataTypeManager.DefaultDataClasses.DOUBLE;\n }\n if (isBoolean()) {\n return DataTypeManager.DefaultDataClasses.BOOLEAN;\n }\n if (isEnhancedNumeric()) {\n return DataTypeManager.DefaultDataClasses.DOUBLE;\n }\n if (isRanking()) {\n return super.getType();\n }\n if (this.getArgs().length == 0) {\n return null;\n }\n return this.getArg(0).getType();\n }", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "public final native String getType() /*-{\n return this.getType();\n }-*/;", "public Class<?> getObjectType() {\n return objectType;\n }", "TypeRef getType();", "public String getType() {\n return (String) getObject(\"type\");\n }", "public final String getType() {\n return this.getClass().getName();\n }", "public String type();", "protected SimpleTypeImpl getSimpleNoCollection() {\n return new SimpleTypeImpl(\"simpleNameSpace\", SIMPLE_TYPE_NAME, null);\n }", "type getType();", "FeatureType getType();", "Type getForPersistentMapping_Type() {\n return type;\n }", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();" ]
[ "0.7366818", "0.68397367", "0.6138805", "0.6106014", "0.6003584", "0.59682786", "0.5948608", "0.59148824", "0.5863761", "0.57821465", "0.5770927", "0.57643294", "0.57626474", "0.5761922", "0.5759458", "0.57330996", "0.5727387", "0.572522", "0.57206357", "0.57197297", "0.57112134", "0.5694201", "0.5690387", "0.5687873", "0.56560063", "0.5652055", "0.5639642", "0.5638992", "0.56025004", "0.5601311", "0.5592635", "0.5590135", "0.55815107", "0.55815107", "0.55815107", "0.55815107", "0.55815107", "0.55815107", "0.55815107", "0.55815107", "0.55815107", "0.55815107", "0.55815107", "0.55815107", "0.55815107", "0.5553902", "0.55413735", "0.55401236", "0.553608", "0.55247045", "0.5523761", "0.5520622", "0.55064744", "0.5501521", "0.5501484", "0.5496393", "0.54883456", "0.54860914", "0.54817295", "0.5470644", "0.54706055", "0.5467554", "0.5465541", "0.5465541", "0.5465541", "0.5465541", "0.5465541", "0.5465541", "0.5465541", "0.5465541", "0.5465541", "0.5465541", "0.5465541", "0.54491806", "0.5442869", "0.5440922", "0.54359174", "0.5433474", "0.54253525", "0.54146147", "0.54128623", "0.5412414", "0.53960097", "0.5393585", "0.5393585", "0.5393585", "0.5393585", "0.5393585", "0.5393585", "0.5393585", "0.5393585", "0.5393585", "0.5393585", "0.5393585", "0.5393585", "0.5393585", "0.5393585", "0.5393585", "0.5393585", "0.5393585" ]
0.5443873
74
Checks whether neighbours of this have already been visited, makes them orientation consistent if not.
public void makeNeighboursOrientationConsistent(ScalarOperator sop, FlagMap flags) { Stack<Object[]> upcoming = new Stack<Object[]>(); TriangleElt3D current = this; do { // set visited status flags.add(current); for (int i = 0; i < 3; i++) { TriangleElt3D nb = current.getNeighbour(i); if (nb != null && (!flags.check(nb))) { upcoming.push(new Object[] { i, nb, current }); } } Object[] nbObj = null; try { nbObj = upcoming.pop(); } catch (EmptyStackException ese) { // do nothing } int index = -1; TriangleElt3D nb = null; TriangleElt3D current2 = null; if (nbObj != null) { index = (Integer) nbObj[0]; nb = (TriangleElt3D) nbObj[1]; current2 = (TriangleElt3D) nbObj[2]; } if ((nb != null) && (!flags.check(nb))) { // if not already visited // point indices of common edge (common edge has (in this) // direction p1->p2) int p1 = (index + 1) % 3; int p2 = (index + 2) % 3; int j = 0; // find nb's index j for opposite point of common edge for (j = 0; j < 3; j++) if (!(current2.getPoint(p1).isEqual(nb.getPoint(j), sop) || current2 .getPoint(p2).isEqual(nb.getPoint(j), sop))) break; // nb's index for first point of common edge j = (j + 1) % 3; if (current2.getPoint(p1).isEqual(nb.getPoint(j), sop)) nb.invertOrientation(); // orientNeighbours for nb } current = nb; } while (upcoming.size() != 0 || current != null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean hasNeighbours() {\n\t\tif (this.eltZero != null || this.eltOne != null || this.eltTwo != null)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "public boolean percolates(){\n\t\treturn unionFind.connected(virtualBottom, virtualTop);\n\t}", "public boolean percolates() {\n if (openSitesCount < gridSize) {\n return false;\n }\n\n if (gridSize == 1 && openSitesCount == 1) {\n return true;\n }\n\n return wquf2.connected(virtualTopSiteIndex, virtualBottomSiteIndex);\n }", "public boolean percolates() {\n return backwashQuickUnion.connected(virtualTop, virtualBottom);\n }", "private static boolean AllCellsVisited()\n {\n for (Cell arr[] : cells){\n for (Cell c : arr)\n {\n if (!c.Visited)\n {\n return false;\n }\n }\n }\n return true;\n }", "private void addAllNeighbours(@NonNull final Location searchLoc) {\n for (int x = -1; x < 2; x++) {\n for (int y = -1; y < 2; y++) {\n if ((x == 0) && (y == 0)) {\n continue;\n }\n final long foundKey = Location.getKey(searchLoc.getScX() + x, searchLoc.getScY() + y,\n searchLoc.getScZ());\n synchronized (unchecked) {\n if (!unchecked.contains(foundKey)) {\n unchecked.add(foundKey);\n }\n }\n }\n }\n \n final long foundKey = Location.getKey(searchLoc.getScX(), searchLoc.getScY(), searchLoc.getScZ() + 1);\n synchronized (unchecked) {\n if (!unchecked.contains(foundKey)) {\n unchecked.add(foundKey);\n }\n }\n }", "public boolean percolates() {\n return mainUnion.connected(virtualTopId, virtualBottomId);\n }", "private void checkEdges() {\n\n //Check for alive cells on right hand side\n for (int y = 0; y < height; y++) {\n if (getCell(this.width - 1, y).isAlive()) {\n grid = increaseWidthRight(grid);\n break;\n }\n }\n\n //Check for alive cells on left side\n for (int y = 0; y < height; y++) {\n if (getCell(0, y).isAlive()) {\n grid = increaseWidthLeft(grid);\n break;\n }\n }\n\n // Check for alive cells at bottom\n for (int x = 0; x < width; x++) {\n if (getCell(x, this.height - 1).isAlive()) {\n grid = increaseHeightBottom(grid);\n break;\n }\n }\n\n //Check for alive cells at top\n for (int x = 0; x < width; x++) {\n if (getCell(x, 0).isAlive()) {\n grid = increaseHeightTop(grid);\n break;\n }\n }\n\n }", "public boolean percolates()\n {\n return uf.connected(topVirtualSite, bottomVirtualSite);\n }", "public boolean percolates() {\n if (mGridSize == 1 && !isOpen(1, 1))\n return false;\n //return mUnionFind.connected(0, mGridSize * mGridSize + 1);\n return mUnionFind.find(0) == mUnionFind.find(mGridSize * mGridSize + 1);\n\n }", "public void findNeighbours(ArrayList<int[]> visited , Grid curMap) {\r\n\t\tArrayList<int[]> visitd = visited;\r\n\r\n\t\t//System.out.println(\"FROM FIND NEIGHBOURS cur pos:\" +Arrays.toString(nodePos));\r\n\t\t//for(int j=0; j<visitd.size();j++) {\r\n\t\t\t//System.out.println(\"FROM FIND NEIGHBOURS\" +Arrays.toString(visited.get(j)));\r\n\t\t\t//System.out.println(\"FROM FIND NEIGHBOURS getvstd\" +Arrays.toString(visited.get(j)));\r\n\t\t//}\r\n\t\t//System.out.println(\"FROM FIND NEIGHBOURS\" +visited);\r\n\t\tCell left=curMap.getCell(0, 0);\r\n\t\tCell right=curMap.getCell(0, 0);\r\n\t\tCell upper=curMap.getCell(0, 0);\r\n\t\tCell down=curMap.getCell(0, 0);\r\n\t\t//the getStart() method returns x,y coordinates representing the point in x,y axes\r\n\t\t//so if either of [0] or [1] coordinate is zero then we have one less neighbor\r\n\t\tif (nodePos[1]> 0) {\r\n\t\t\tupper=curMap.getCell(nodePos[0], nodePos[1]-1) ; \r\n\t\t}\r\n\t\tif (nodePos[1] < M-1) {\r\n\t\t\tdown=curMap.getCell(nodePos[0], nodePos[1]+1);\r\n\t\t}\r\n\t\tif (nodePos[0] > 0) {\r\n\t\t\tleft=curMap.getCell(nodePos[0] - 1, nodePos[1]);\r\n\t\t}\r\n\t\tif (nodePos[0] < N-1) {\r\n\t\t\tright=curMap.getCell(nodePos[0]+1, nodePos[1]);\r\n\t\t}\r\n\t\t//for(int i=0;i<visitd.size();i++) {\r\n\t\t\t//System.out.println(Arrays.toString(visitd.get(i)));\t\r\n\t\t//}\r\n\t\t\r\n\t\t//check if the neighbor is wall,if its not add to the list\r\n\t\tif(nodePos[1]>0 && !upper.isWall() && (!exists(visitd,new int[] {nodePos[0], nodePos[1] - 1}))) {\r\n\t\t\t//Node e=new Node(this , this.N , this.M , new int[] {nodePos[0], nodePos[1] - 1},curMap);\r\n\t\t\t//if(e.getVisited()!=true) {\r\n\t\t\tNodeChildren.add(new Node(this , this.N , this.M , new int[] {nodePos[0], nodePos[1] - 1}, curMap)); // father of the new nodes is this node\r\n\t\t\t//}\r\n\t\t}\r\n\t\tif(nodePos[1]<M-1 &&!down.isWall() && (!exists(visitd,new int[] {nodePos[0], nodePos[1] + 1}))){\r\n\t\t\tNodeChildren.add(new Node(this , this.N , this.M , new int[] {nodePos[0], nodePos[1] + 1}, curMap));\r\n\t\t}\r\n\t\tif(nodePos[0]>0 && !left.isWall() && (!exists(visitd,new int[] {nodePos[0] - 1, nodePos[1]}))) {\r\n\t\t\tNodeChildren.add(new Node(this , this.N , this.M , new int[] {nodePos[0] - 1, nodePos[1]}, curMap));\r\n\t\t}\r\n\t\tif(nodePos[0]<N-1 && !right.isWall() && (!exists(visitd,new int[] {nodePos[0] + 1, nodePos[1]}))) {\r\n\t\t\tNodeChildren.add(new Node(this , this.N , this.M , new int[] {nodePos[0] + 1, nodePos[1]}, curMap));\r\n\t\t}\r\n\t\t//for(int i=0; i<NodeChildren.size();i++) {\r\n\t\t\t//System.out.println(\"Paidia sth find:\" + Arrays.toString(NodeChildren.get(i).getNodePos()));\r\n\t\t//}\r\n\t\t\t\t\t\t\r\n\t}", "public boolean percolates() {\n return unionFind.connected(topRoot, bottomRoot);\n }", "public boolean percolates() {\n\t\treturn cellTree.connected(side * side, side * side + 1);\n\t}", "public void removeNeighbours(){\n\t\tgetNeighbours().removeAll(getNeighbours());\n\t}", "public void checkNeighbours(int row, int column)\r\n {\r\n int counter = 0;\r\n //*************************************************\r\n //Following code was adapted from Harry Tang 2015-04-27\r\n for (int columnNeighbours = column - 1; columnNeighbours <= column + 1; columnNeighbours ++)\r\n {\r\n for (int rowNeighbours = row - 1; rowNeighbours <= row + 1; rowNeighbours ++)\r\n {\r\n try \r\n {\r\n if (cellGrid[columnNeighbours][rowNeighbours].isAlive()\r\n && cellGrid[columnNeighbours][rowNeighbours] != cellGrid[column][row])\r\n {\r\n counter ++;\r\n }\r\n }\r\n catch (IndexOutOfBoundsException e)\r\n {\r\n // do nothing\r\n }\r\n } // end of for (int y = indexY - 1; y == indexY; y++)\r\n } // end of for (int x = indexX - 1; x == indexX; x++)\r\n //*************************************************\r\n \r\n decisionOnCellState(counter, row, column);\r\n }", "private ArrayList<Integer> setUnvisitedNeighbors(int currentIndex) {\n\t\t\n\t\tint row = currentIndex / width;\t\t\t\t\t\t\t\t\t\t\t\t//number of row\n\t\tint column = currentIndex % width;\t\t\t\t\t\t\t\t\t\t\t//number of column\n\t\t\n\t\tArrayList<Integer> neighbors = new ArrayList<Integer>();\n\t\t\n\t\tif(row != 0 && !cells[currentIndex - width].visited ) {\t\t\t\t\t\t// cell has upper neighbor\n\t\t\tint upperIndex = ((row - 1) * width) + column;\n\t\t\tneighbors.add(upperIndex);\n\t\t}\n\t\tif(row != height - 1 && !cells[currentIndex + width].visited ) {\t\t\t//cell has lower neighbor\n\t\t\tint lowerIndex = ((row + 1) * width) + column;\n\t\t\tneighbors.add(lowerIndex);\n\t\t}\n\t\tif(column != 0 && !cells[currentIndex - 1].visited) {\t\t\t\t\t\t//cell has left neighbor\n\t\t\tint leftIndex = currentIndex - 1;\n\t\t\tneighbors.add(leftIndex);\n\t\t}\n\t\tif(column != width - 1 && !cells[currentIndex + 1].visited) {\t\t\t\t//cell has right neighbor\n\t\t\tint rightIndex = currentIndex + 1;\n\t\t\tneighbors.add(rightIndex);\n\t\t}\n\t\treturn neighbors;\n\t}", "@Override\n\tpublic boolean isConnected() {\n\t\tif(this.GA.nodeSize() ==1 || this.GA.nodeSize()==0) return true;\n\t\tgraph copied = this.copy();\n\t\ttagZero(copied);\n\t\tCollection<node_data> s = copied.getV();\n\t\tIterator it = s.iterator();\n\t\tnode_data temp = (node_data) it.next();\n\t\tDFSUtil(copied,temp);\n\t\tfor (node_data node : s) {\n\t\t\tif (node.getTag() == 0) return false;\n\t\t}\n\t\ttransPose(copied);\n\t\ttagZero(copied);\n\t Collection<node_data> s1 = copied.getV();\n\t\tIterator it1 = s1.iterator();\n\t\tnode_data temp1 = (node_data) it1.next();\n\t\tDFSUtil(copied,temp1);\n\t\tfor (node_data node1 : s1) {\n\t\t\tif (node1.getTag() == 0) return false;\n\t\t}\n\n\t\treturn true;\n\t}", "boolean isCellBelowNeighbor() {\r\n return this.neighbors.contains(new Cell(this.x, this.y + 1));\r\n }", "public void checkNeighbour() {\r\n for (int y = 0; y < table.length; y++){\r\n for (int x = 0; x < table.length; x++){\r\n rule(y, x);\r\n }\r\n }\r\n for (int i = 0; i < table.length; i++)\r\n System.arraycopy(temp_table[i], 0, table[i], 0, table.length);\r\n }", "private void setNeighboringMines(){\n\t\t//cycle the board\n\t\tfor (int r = 0; r < board.length; r++)\n\t\t\tfor (int c = 0; c < board[r].length; c++){\n\t\t\t\tint neighborCount = 0;\n\t\t\t\tif(!board[r][c].isMine()) {\n\t\t\t\t\t//checks if there is mines touching\n\t\t\t\t\tneighborCount = neighboringMines(r, c);\n\t\t\t\t\tif (neighborCount > 0) {\n\t\t\t\t\t\tboard[r][c].setIsNeighboringMine(true);\n\t\t\t\t\t\tboard[r][c].setNumNeighboringMines\n\t\t\t\t\t\t\t\t(neighborCount);\n\t\t\t\t\t} else if (neighborCount == 0) {\n\t\t\t\t\t\tboard[r][c].setNumNeighboringMines(0);\n\t\t\t\t\t\tboard[r][c].setIsNeighboringMine(false);\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public boolean percolates() {\n\t\tint top = uf.find(0);\n\t\tint bottom = uf.find(size * size + 1);\n\t\treturn top == bottom;\n\t}", "private static boolean updateHoleStates(int holeID, HoleState newState, HoleState state[], boolean rowMatrix[][], boolean colMatrix[][], boolean rowColMatrix[][], HashSet<Integer> visitedRows, HashSet<Integer> visitedCols)\r\n {\n \r\n int ids[];\r\n state[holeID-1]=newState;\r\n if(isHoleInRow(holeID))\r\n {\r\n ids = getHolesInRow(getRowIDFromHoleID(holeID));\r\n } else {\r\n ids = getHolesInColumn(getColumnIDFromHoleID(holeID));\r\n }\r\n \r\n for(int i=0; i<ids.length; i++)\r\n {\r\n state[ids[i]-1]=newState;\r\n }\r\n \r\n if(isHoleInRow(holeID))\r\n {\r\n int rid = getRowIDFromHoleID(holeID);\r\n visitedRows.add(rid);\r\n \r\n //Utility.alert(\"ROWID=\"+rid);\r\n \r\n // scan row-connections\r\n for(int i=0; i<rowMatrix[rid-1].length; i++)\r\n {\r\n if(i==rid-1) continue;\r\n if(rowMatrix[rid-1][i])\r\n {\r\n // has connection to (i+1)-th row \r\n if(!visitedRows.contains(i+1))\r\n {\r\n int frid = getFirstHoleIDInRow(i+1);\r\n updateHoleStates(frid, newState, state, rowMatrix, colMatrix, rowColMatrix, visitedRows, visitedCols);\r\n }\r\n }\r\n }\r\n \r\n // scan row-col connections\r\n for(int i=0; i<rowColMatrix[rid-1].length; i++)\r\n {\r\n if(rowColMatrix[rid-1][i])\r\n {\r\n //Utility.alert(\"ROW has connection to \"+(i+1)+\" col\");\r\n // has connection to (i+1)-th col\r\n if(!visitedCols.contains(i+1))\r\n {\r\n //Utility.alert(\"NOT VISITED\");\r\n \r\n visitedCols.add(i+1);\r\n int fcid = getFirstHoleIDInColumn(i+1);\r\n updateHoleStates(fcid, newState, state, rowMatrix, colMatrix, rowColMatrix, visitedRows, visitedCols);\r\n }\r\n }\r\n }\r\n } else {\r\n int cid = getColumnIDFromHoleID(holeID);\r\n visitedCols.add(cid);\r\n \r\n for(int i=0; i<colMatrix[cid-1].length; i++)\r\n {\r\n if(i==cid-1) continue;\r\n if(colMatrix[cid-1][i])\r\n {\r\n // has connection to (i+1)-th column \r\n if(!visitedCols.contains(i+1))\r\n {\r\n int fcid = getFirstHoleIDInColumn(i+1);\r\n updateHoleStates(fcid, newState, state, rowMatrix, colMatrix, rowColMatrix, visitedRows, visitedCols);\r\n }\r\n }\r\n }\r\n \r\n // scan row-col connections\r\n for(int i=0; i<rowColMatrix.length; i++)\r\n {\r\n if(rowColMatrix[i][cid-1])\r\n {\r\n // has connection to (i+1)-th row \r\n if(!visitedRows.contains(i+1))\r\n {\r\n visitedRows.add(i+1);\r\n int frid = getFirstHoleIDInRow(i+1);\r\n updateHoleStates(frid, newState, state, rowMatrix, colMatrix, rowColMatrix, visitedRows, visitedCols);\r\n }\r\n }\r\n }\r\n }\r\n \r\n return true;\r\n }", "public void checkCellStatus()\r\n {\r\n for (int columns = 0; columns < LOWER_BOUND; columns ++)\r\n {\r\n for (int rows = 0; rows < RIGHT_BOUND; rows ++)\r\n {\r\n checkNeighbours(rows, columns);\r\n } // end of for (int rows = 0; rows < RIGHT_BOUND; rows ++)\r\n } // end of for (int columns = 0; columns < LOWER_BOUND; columns ++)\r\n }", "public void uncover ()\n {\n for (DancingNode i=this.U; i!=this; i=i.U) // go up the column\n {\n for (DancingNode j=i.L; j!=i; j=j.L) // go left across the row \n {\n j.C.size++;\n j.relinkUD();\n }\n }\n this.relinkLR();\n }", "public boolean percolates() {\n return uf.connected(n*n, n*n+1);\r\n }", "public boolean percolates(){\r\n\t\treturn uf.connected(N * N, N * N + 1);\r\n\t}", "public boolean percolates(){\n return uf.connected(ufSize - 2, ufSize - 1);\n }", "public boolean percolates() {\n if (wuf.connected(virtTop, virtBottom)) {\n hasPercolated = true;\n return true;\n }\n \n return false;\n }", "public boolean percolates() {\n return myUF.connected(n*n, n*n + 1);\n }", "public boolean percolates() throws Exception {\n if (SIZE != 1 && ufVirtual.connected(0, SIZE - 1))\n return true;\n else if (SIZE == 1 && isOpen(1, 1))\n return true;\n return false;\n }", "private ArrayList<BooleanProperty> checkSurroundings(int layoutX, int layoutY) {\n\n ArrayList<BooleanProperty> neighbors = new ArrayList<>();\n BooleanProperty[][] gameCells = controller.getGameCells();\n\n for (int i = layoutX - 1; i <= layoutX + 1; i++) {\n for (int j = layoutY - 1; j <= layoutY + 1; j++) {\n\n if (!(i == layoutX && j == layoutY)) {\n if (i < gameCells.length && i > -1 && j < gameCells[i].length && j > -1 && gameCells[i][j].get()) {\n neighbors.add(gameCells[i][j]);\n }\n }\n }\n }\n return neighbors;\n }", "public boolean percolates() {\n return sitesUF.connected(upSiteIndex, downSiteIndex);\n }", "void renewNeighbourClusters() {\n neighbourClusters = new HashMap<Cluster, Integer>();\n\n for (Person p : members) {\n for (Person x : p.getFriends()) {\n if (!members.contains(x)) {\n Cluster xC = x.getCluster();\n if (!neighbourClusters.containsKey(xC)) {\n neighbourClusters.put(xC, 1);\n } else {\n neighbourClusters.put(xC, neighbourClusters.get(xC) + 1);\n }\n }\n }\n }\n\n }", "public boolean areAdjacent() {\n return areAdjacent;\n }", "public boolean percolates() {\n for (int i = 0; i < size; i++) {\r\n if (flowGrid[size * (size - 1) + i] < size) { // if any of the bottom row points at any of the index in the top row\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "private void recalculateNeighbours(int x, int y) {\r\n\t\tTile t = map.getTile(x, y + 1, 0);\r\n\t\tif (t != null) {\r\n\t\t\tt.toMap(this, x, y + 1, false);\r\n\t\t}\r\n\t\tt = map.getTile(x + 1, y, 0);\r\n\t\tif (t != null) {\r\n\t\t\tt.toMap(this, x + 1, y, false);\r\n\t\t}\r\n\t\tt = map.getTile(x, y - 1, 0);\r\n\t\tif (t != null) {\r\n\t\t\tt.toMap(this, x, y - 1, false);\r\n\t\t}\r\n\t\tt = map.getTile(x - 1, y, 0);\r\n\t\tif (t != null) {\r\n\t\t\tt.toMap(this, x - 1, y, false);\r\n\t\t}\r\n\t}", "public boolean percolates() {\n // The system percolates if top and bottom are connected\n return UF.connected(top, bottom);\n }", "public final boolean isAcyclic() {\n return this.topologicalSort().size() == this.sizeNodes();\n }", "public boolean percolates() {\n if (this.n == 1) return isOpen(1, 1);\n return this.uf.connected(0, this.n * this.n + 1);\n }", "private static boolean isCellAlive(int[][] coordinates, int row, int column) {\n\t\tboolean cellAlive = coordinates[row][column] == 1;\r\n\t\tint numberOfNeighbours = 0;\r\n\t\t//check one to the right of col\r\n\t\tif (coordinates[row].length > column + 1) {\r\n\t\t\tif (coordinates[row][column + 1] == 1) {\r\n\t\t\t\tnumberOfNeighbours++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//check one to the left of col\r\n\t\tif (coordinates[row].length > column - 1 && column - 1 >= 0) {\r\n\t\t\tif (coordinates[row][column - 1] == 1) {\r\n\t\t\t\tnumberOfNeighbours++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//check one above col\r\n\t\tif (coordinates.length > row - 1 && row - 1 >= 0) {\r\n\t\t\tif (coordinates[row - 1][column] == 1) {\r\n\t\t\t\tnumberOfNeighbours++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//check one below col\r\n\t\tif (coordinates.length > row + 1) {\r\n\t\t\tif (coordinates[row + 1][column] == 1) {\r\n\t\t\t\tnumberOfNeighbours++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//check one top left diagonal to col\r\n\t\tif (coordinates.length > row - 1 && coordinates[row].length > column - 1 && row - 1 >= 0 && column - 1 >= 0) {\r\n\t\t\tif (coordinates[row - 1][column - 1] == 1) {\r\n\t\t\t\tnumberOfNeighbours++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//check one top right diagonal to col\r\n\t\tif (coordinates.length > row - 1 && coordinates[row].length > column + 1 && row - 1 >= 0) {\r\n\t\t\tif (coordinates[row - 1][column + 1] == 1) {\r\n\t\t\t\tnumberOfNeighbours++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//check one bottom left diagonal to col\r\n\t\tif (coordinates.length > row + 1 && coordinates[row].length > column - 1 && column - 1 >= 0) {\r\n\t\t\tif (coordinates[row + 1][column - 1] == 1) {\r\n\t\t\t\tnumberOfNeighbours++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//check one bottom right diagonal to col\r\n\t\tif (coordinates.length > row + 1 && coordinates[row].length > column + 1) {\r\n\t\t\tif (coordinates[row + 1][column + 1] == 1) {\r\n\t\t\t\tnumberOfNeighbours++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t System.out.println(\"Number of neighbours for \" + row + \", \" + column\r\n\t\t + \" was \" + numberOfNeighbours);\r\n\t\t//if the number of neighbours was 2 or 3, the cell is alive\r\n\t\tif ((numberOfNeighbours == 2) && cellAlive) {\r\n\t\t\treturn true;\r\n\t\t} else if (numberOfNeighbours == 3) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean isConnected() {\n if (this.isEmpty()) return true;\n\n if (this.directed) {\n Deque<Node> toVisit = new LinkedList<>();\n for (Node s : this.nodes.values()) {\n Node current;\n toVisit.addLast(s);\n while (!toVisit.isEmpty()) {\n current = toVisit.removeLast();\n current.setFlag(\"_visited\");\n for (Edge edge : current.getNeighbours()) {\n Node n = edge.getEnd();\n if (!n.getFlag(\"_visited\")) toVisit.addLast(n);\n }\n }\n\n //Check if all nodes have been visited and remove flags\n boolean allVisited = true;\n for (Node n : nodes.values()) {\n allVisited = allVisited && n.getFlag(\"_visited\");\n n.unsetFlag(\"_visited\");\n }\n if (!allVisited) return false;\n }\n return true;\n }\n else {\n //Perform a DFS from a random start node marking nodes as visited\n Node current;\n Deque<Node> toVisit = new LinkedList<>();\n toVisit.addLast(this.nodes.values().iterator().next());\n while (!toVisit.isEmpty()) {\n current = toVisit.removeLast();\n current.setFlag(\"_visited\");\n for (Edge edge : current.getNeighbours()) {\n Node n = edge.getEnd();\n if (!n.getFlag(\"_visited\")) toVisit.addLast(n);\n }\n }\n\n //Check if all nodes have been visited and remove flags\n boolean allVisited = true;\n for (Node n : nodes.values()) {\n allVisited = allVisited && n.getFlag(\"_visited\");\n n.unsetFlag(\"_visited\");\n }\n\n return allVisited;\n }\n }", "public boolean percolates(){\n\t //special case for n=1:\n\t if(n==1 && numOpen==0){\n\t return false;\n\t }\n\t //this seems very inefficient.. maybe fix\n\t //way to prevent backwash\n\t for(int i= (n*n -n)+1; i <= n*n; i++){\n\t if(grid.connected(0, i)){\n\t return true;\n\t }\n\t }\n\t\treturn false;\n\t}", "private void getNeighbors() {\n\t\tRowIterator iterator = currentGen.iterateRows();\n\t\twhile (iterator.hasNext()) {\n\t\t\tElemIterator elem = iterator.next();\n\t\t\twhile (elem.hasNext()) {\n\t\t\t\tMatrixElem mElem = elem.next();\n\t\t\t\tint row = mElem.rowIndex();\n\t\t\t\tint col = mElem.columnIndex();\n\t\t\t\tint numNeighbors = 0;\n\t\t\t\tfor (int i = -1; i < 2; i++) { // loops through row above,\n\t\t\t\t\t\t\t\t\t\t\t\t// actual row, and row below\n\t\t\t\t\tfor (int j = -1; j < 2; j++) { // loops through column left,\n\t\t\t\t\t\t\t\t\t\t\t\t\t// actual column, coloumn\n\t\t\t\t\t\t\t\t\t\t\t\t\t// right\n\t\t\t\t\t\tif (!currentGen.elementAt(row + i, col + j).equals(\n\t\t\t\t\t\t\t\tfalse)) // element is alive, add 1 to neighbor\n\t\t\t\t\t\t\t\t\t\t// total\n\t\t\t\t\t\t\tnumNeighbors += 1;\n\t\t\t\t\t\telse { // element is not alive, add 1 to its total\n\t\t\t\t\t\t\t\t// number of neighbors\n\t\t\t\t\t\t\tInteger currentNeighbors = (Integer) neighbors\n\t\t\t\t\t\t\t\t\t.elementAt(row + i, col + j);\n\t\t\t\t\t\t\tneighbors.setValue(row + i, col + j,\n\t\t\t\t\t\t\t\t\tcurrentNeighbors + 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tneighbors.setValue(row, col, numNeighbors - 1); // -1 to account\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// for counting\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// itself as a\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// neighbor\n\t\t\t}\n\t\t}\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic ArrayList<Node<A>> neighbours(){\n\t\t\n\t\tArrayList<Node<A>> output = new ArrayList<Node<A>>();\n\t\t\n\t\tif (g == null) return output;\n\t\t\n\t\tfor (Object o: g.getEdges()){\n\n\t\t\t\n\t\t\tif (((Edge<?>)o).getTo().equals(this)) {\n\t\t\t\t\n\t\t\t\tif (!output.contains(((Edge<?>)o).getFrom()))\n\t\t\t\t\t\toutput.add((Node<A>) ((Edge<?>)o).getFrom());\n\t\t\t\t\n\t\t\t}\n\n\t\t} \n\t\treturn output;\n\t\t\n\t}", "public boolean percolates() {\n if (grid.length == 1) {\n return isOpen(1, 1);\n }\n return uf.find(grid.length * grid.length) == uf.find(grid.length * grid.length + 1);\n }", "public boolean percolates() {\n\t\treturn linearGrid.connected(0, 1);\n\t}", "private void setAllUnvisited(){\n\t\tfor(int i = 0; i < this.getDimension(); i++)\n\t\t\tthis.getGraph().setUnvisited(i);\n\t\tthis.visited = 0;\n\t}", "@Override\r\n public boolean shouldRevive(int i, int j) {\r\n return (!getCell(i, j).isAlive())\r\n && (numberOfNeighborhoodAliveCells(i, j) == 3 || numberOfNeighborhoodAliveCells(i, j) == 6);\r\n }", "public boolean percolates() {\n for (int i = n * n - n + 1; i <= n * n; i++) {\n if (weightedQuickUnionUF.connected(0, i)) {\n return true;\n }\n }\n return false;\n }", "public boolean percolates() {\n return UF.isConnected(0, getSize() * getSize() + 1);\n }", "public void checkAll() {\n for (int i = 0; i < size * size; i++) {\r\n if (flowGrid[i]!=size*size) {\r\n if ((flowGrid[i] != flowGrid[flowGrid[i]]) || i != flowGrid[i]) {\r\n flowGrid[i] = flowGrid[flowGrid[i]];\r\n if (flowGrid[i] < size) {\r\n grid[i / size][i % size] = 2;\r\n }\r\n }\r\n }\r\n }\r\n\r\n }", "public boolean percolates(){\n \tif(this.gridLength == 1){\n \t\treturn isOpen(1,1);\n \t}\n \treturn (this.bottom[unionTest.find(0)]);\n }", "Set<Edge> getIncomingNeighborEdges(boolean onUpwardPass) {\n//\t\t\tif(_outgoingEdges.size() == 0) { // only compute if we have to\n\t\t\t\tSet<Edge> outgoingEdges = new HashSet<Edge>();\n\t\t\t\tIterator<Edge> it = _neighborEdges.keySet().iterator();\n\t\t\t\twhile(it.hasNext()) {\n\t\t\t\t\tEdge e = it.next();\n\t\t\t\t\tVertex v = e.getOtherVertex(this);\n\t\t\t\t\tif(this._orderID == UNMARKED) {\n\t\t\t\t\t\tSystem.err.println(\"whoops i am unmarked\");\n\t\t\t\t\t}\n\t\t\t\t\tif(v._orderID == UNMARKED) {\n\t\t\t\t\t\tSystem.err.println(\"whoops neighbor unmarked\");\n\t\t\t\t\t}\n\t\t\t\t\tif(this._orderID < v._orderID) {\n\t\t\t\t\t\toutgoingEdges.add(e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t_outgoingEdges = outgoingEdges;\n//\t\t\t}\n//\t\t\treturn _outgoingEdges;\n\t\t\t\treturn outgoingEdges;\n\t\t}", "public boolean percolates() {\n return mainObject.connected(vsite1, vsite2);\n }", "public boolean allCellsFlooded() {\r\n for (ACell c : this.board) {\r\n if (!c.floodCheck()) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }", "@Override\n public Iterable<WorldState> neighbors() {\n Queue<WorldState> neighbor = new ArrayDeque<>();\n int xDim = 0, yDim = 0;\n int[][] tiles = new int[_N][_N];\n\n for (int i = 0; i < _N; i++) {\n for (int j = 0; j < _N; j++) {\n tiles[i][j] = _tiles[i][j];\n if (_tiles[i][j] == 0) {\n xDim = i;\n yDim = j;\n }\n }\n }\n\n for (int i = 0; i < _N; i++) {\n for (int j = 0; j < _N; j++) {\n if (Math.abs(i - xDim) + Math.abs(j - yDim) == 1) {\n tiles[i][j] = _tiles[xDim][yDim];\n tiles[xDim][yDim] = _tiles[i][j];\n neighbor.add(new Board(tiles));\n // System.out.println(new Board(tiles));\n tiles[xDim][yDim] = _tiles[xDim][yDim];\n tiles[i][j] = _tiles[i][j];\n }\n }\n }\n return neighbor;\n }", "public void resetVisited() {\n\t\tthis.visited = new HashSet<Point>();\n\t}", "private void clearVisited(){\r\n\t\tfor(int i=0; i<graphSize; i++){\r\n\t\t\tmyGraph[i].visited = false;\r\n\t\t\tAdjVertex vert = myGraph[i].adjVertexHead;\r\n\t\t\twhile(vert != null){\r\n\t\t\t\tvert.visited = false;\r\n\t\t\t\tvert= vert.next;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n public boolean isConnected() { //i got help from the site https://www.geeksforgeeks.org/shortest-path-unweighted-graph/\n if(this.ga.edgeSize()<this.ga.nodeSize()-1) return false;\n initializeInfo();//initialize all the info fields to be null for the algorithm to work\n if(this.ga.nodeSize()==0||this.ga.nodeSize()==1) return true;//if there is not node or one its connected\n WGraph_DS copy = (WGraph_DS) (copy());//create a copy graph that the algorithm will on it\n LinkedList<node_info> qValues = new LinkedList<>();//create linked list that will storage all nodes that we didn't visit yet\n int firstNodeKey = copy.getV().iterator().next().getKey();//first key for get the first node(its doesnt matter which node\n node_info first = copy.getNode(firstNodeKey);//get the node\n qValues.add(first);//without limiting generality taking the last node added to graph\n int counterVisitedNodes = 0;//counter the times we change info of node to \"visited\"\n while (qValues.size() != 0) {\n node_info current = qValues.removeFirst();\n if (current.getInfo() != null) continue;//if we visit we can skip to the next loop because we have already marked\n current.setInfo(\"visited\");//remark the info\n counterVisitedNodes++;\n\n Collection<node_info> listNeighbors = copy.getV(current.getKey());//create a collection for the neighbors list\n LinkedList<node_info> Neighbors = new LinkedList<>(listNeighbors);//create the neighbors list\n if (Neighbors == null) continue;\n for (node_info n : Neighbors) {\n if (n.getInfo() == null) {//if there is a node we didn't visited it yet, we will insert it to the linkedList\n qValues.add(n);\n }\n }\n }\n if (this.ga.nodeSize() != counterVisitedNodes) return false;//check that we visited all of the nodes\n\n return true;\n }", "@Override\n public boolean isConnected() {\n for (node_data n : G.getV()) {\n bfs(n.getKey());\n for (node_data node : G.getV()) {\n if (node.getTag() == 0)\n return false;\n }\n }\n return true;\n }", "public void seekWalls() {\n\t\t for (int j=0; j<visited[0].length; j++){\n\t\t\tfor (int i=visited.length-1; i>=0; i--) {\t\t\t\n\t\t\t\tif (i!=0 && j!= visited[0].length-1) {//general position\n\t\t\t\t\tif (map.get(visited[i][j]) + map.get(visited[i-1][j]) == maxComb && !isFree(i,j,2)) {\n\t\t\t\t\t\twallRow = i+1;\n\t\t\t\t\t\twallCol = j+1;\n\t\t\t\t\t\twallSide = 'N';\n\t\t\t\t\t\treturn;//not break!!!!! return to exit !\n\t\t\t\t\t}\n\n\t\t\t\t\tif (map.get(visited[i][j]) + map.get(visited[i][j+1]) == maxComb && !isFree(i,j,4)) {\n\t\t\t\t\t\twallRow = i+1;\n\t\t\t\t\t\twallCol = j+1;\n\t\t\t\t\t\twallSide = 'E';\t\n\t\t\t\t\t\treturn;\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if (i==0 && j!= visited[0].length-1) {\n\t\t\t\t\tif (map.get(visited[i][j]) + map.get(visited[i][j+1]) == maxComb && !isFree(i,j,4)) {\n\t\t\t\t\t\twallRow = i+1;\n\t\t\t\t\t\twallCol = j+1;\n\t\t\t\t\t\twallSide = 'E';\t\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\telse if (i!=0 && j== visited[0].length-1) {\n\t\t\t\t\tif (map.get(visited[i][j]) + map.get(visited[i-1][j]) == maxComb && !isFree(i,j,2)) {\n\t\t\t\t\t\twallRow = i+1;\n\t\t\t\t\t\twallCol = j+1;\n\t\t\t\t\t\twallSide = 'N';\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\telse {//if (i==0 && j== visited[0].length-1) {\n\t\t\t\t\t//no solution\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void updateNodes(){\n ArrayList<Node> tempBoard = new ArrayList<>();\n\n for(int i = 0; i < board.size(); i++){\n Node node = new Node(board.get(i).getCoordinates());\n\n tempBoard.add(node);\n }\n\n\n //check each node for number of live nodes next to it to determine next iteration\n for(int i = 0; i < board.size(); i++){\n int liveCount = 0;\n\n Coordinate current = board.get(i).getCoordinates();\n\n Coordinate above = new Coordinate(current.getX(), current.getY() - 1);\n if(searchBoard(above) != -1){\n Node aboveNode = board.get(searchBoard(above));\n if(aboveNode.getState()){\n liveCount++;\n }\n }\n\n Coordinate bellow = new Coordinate(current.getX(), current.getY() + 1);\n if(searchBoard(bellow) != -1){\n Node bellowNode = board.get(searchBoard(bellow));\n if(bellowNode.getState()){\n liveCount++;\n }\n }\n\n Coordinate right = new Coordinate(current.getX() + 1, current.getY());\n if(searchBoard(right) != -1){\n Node rightNode = board.get(searchBoard(right));\n if(rightNode.getState()){\n liveCount++;\n }\n }\n\n Coordinate left = new Coordinate(current.getX() - 1, current.getY());\n if(searchBoard(left) != -1){\n Node leftNode = board.get(searchBoard(left));\n if(leftNode.getState()){\n liveCount++;\n }\n }\n\n Coordinate topLeft = new Coordinate(current.getX() - 1, current.getY() - 1);\n if(searchBoard(topLeft) != -1){\n Node topLeftNode = board.get(searchBoard(topLeft));\n if(topLeftNode.getState()){\n liveCount++;\n }\n }\n\n Coordinate topRight = new Coordinate(current.getX() + 1, current.getY() - 1);\n if(searchBoard(topRight) != -1){\n Node topRightNode = board.get(searchBoard(topRight));\n if(topRightNode.getState()){\n liveCount++;\n }\n }\n\n Coordinate bottomLeft = new Coordinate(current.getX() - 1, current.getY() + 1);\n if(searchBoard(bottomLeft) != -1){\n Node bottomLeftNode = board.get(searchBoard(bottomLeft));\n if(bottomLeftNode.getState()){\n liveCount++;\n }\n }\n\n Coordinate bottomRight = new Coordinate(current.getX() + 1, current.getY() + 1);\n if(searchBoard(bottomRight) != -1){\n Node bottomRightNode = board.get(searchBoard(bottomRight));\n if(bottomRightNode.getState()){\n liveCount++;\n }\n }\n\n //determine if node is alive or dead in next frame\n if(board.get(i).getState()){\n if(liveCount <= 1){\n tempBoard.get(i).setState(false);\n } else if(liveCount >= 3){\n tempBoard.get(i).setState(false);\n } else {\n tempBoard.get(i).setState(true);\n }\n } else {\n if(liveCount == 3){\n tempBoard.get(i).setState(true);\n } else {\n tempBoard.get(i).setState(false);\n }\n }\n }\n\n //update current board with new states\n for(int i = 0; i < tempBoard.size(); i++){\n board.get(i).setState(tempBoard.get(i).getState());\n }\n }", "private void setCellVisited(Cell cell) {\n\n\t\tif (!isIn(cell))\n\t\t\treturn;\n\n\t\tint r = cell.r;\n\t\tint c = cell.c;\n\t\tif (maze.type == HEX) {\n\t\t\tc = c - (r + 1) / 2;\n\t\t}\n\t\ttry {\n\t\t\tvisited[r][c] = true;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public boolean isVisited () {\n if (this.equals(SquareType.VISITED))\n return true;\n else\n return false;\n }", "private void setNeighbors()\r\n {\r\n for (int x = 0; x < length+2; ++x)\r\n {\r\n for (int y = 0; y < width+2; ++y)\r\n {\r\n // North\r\n if (!this.board[x][y].northwall)\r\n {\r\n this.board[x][y].neighbors.add(this.board[x][y-1]);\r\n }\r\n // South\r\n if (!this.board[x][y].southwall)\r\n {\r\n this.board[x][y].neighbors.add(this.board[x][y+1]);\r\n }\r\n // East\r\n if (!this.board[x][y].eastwall)\r\n {\r\n this.board[x][y].neighbors.add(this.board[x+1][y]);\r\n }\r\n // West\r\n if (!this.board[x][y].westwall)\r\n {\r\n this.board[x][y].neighbors.add(this.board[x-1][y]);\r\n }\r\n }\r\n }\r\n }", "public boolean percolates() {\n \treturn weigtedJoin.connected(N * N, N * N + 1);\n }", "public boolean needsNeighborhood()\r\n\t{\r\n\t\treturn m_needsNeighborhood;\t\r\n\t}", "private void checkAndConnect(int srcIndex, int dstRow, int dstCol) {\n if (isInGrid(dstRow, dstCol) && isOpen(dstRow, dstCol)) {\n final int dstIndex = convertRowColToIndex(dstRow, dstCol);\n gridGraphVirtualTop.union(srcIndex, dstIndex);\n gridGraphVirtualTopBottom.union(srcIndex, dstIndex);\n }\n }", "public void printVisitedCells()\r\n\t{\r\n\t\tSystem.out.print(\"+ +\");\r\n\t\tfor (int i = 1; i < this.getWidth(); i++)\r\n\t\t{\r\n\t\t\tSystem.out.print(\"-+\");\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\r\n\t\tfor (int i = 0; i < this.getHeight(); i++)\r\n\t\t{\r\n\t\t\t\r\n\t\t\tfor (int j = 0; j < this.getWidth(); j++)\r\n\t\t\t{\r\n\t\t\t\tCell c = this.getCellAt(i, j);\r\n\t\t\t\t// if cells are connected, no wall is printed in between them\r\n\t\t\t\tif (c.hasDoorwayTo(Cell.WEST))\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(\"|\");\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif(c.getDiscoveryTime() != -1)\r\n\t\t\t\t\tSystem.out.print(c.getDiscoveryTime() % 10);\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"|\");\r\n\t\t\t\r\n\t\t\tfor (int j = 0; j < this.getWidth(); j++)\r\n\t\t\t{\r\n\t\t\t\tCell c = this.getCellAt(i, j);\r\n\t\t\t\tSystem.out.print(\"+\");\r\n\r\n\t\t\t\tif (c.hasDoorwayTo(Cell.SOUTH) || c == this.getCellAt(getHeight()-1, getWidth()-1))\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(\"-\");\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"+\");\r\n\t\t}\r\n\t}", "public void markAllNodesAsUnvisited() {\r\n visitedToken++;\r\n }", "public void init(){\n visited = new boolean[length+2][width+2];\r\n for( int i = 0; i < length+2 ; i++){\r\n visited[i][0] = true;\r\n visited[i][length+1] = true;\r\n }\r\n for ( int i = 0; i < width+2; i++){\r\n visited[0][i] = true;\r\n visited[width+1][i] = true;\r\n }\r\n\r\n // initialze all walls as present\r\n for(int i=0;i< length+2;i++){\r\n for(int j=0;j< width+2;j++){\r\n this.board[i][j].northwall = true;\r\n this.board[i][j].eastwall = true;\r\n this.board[i][j].southwall = true;\r\n this.board[i][j].westwall = true;\r\n }\r\n }\r\n\r\n }", "public boolean percolates() {\n // bottom row (grid[n - 1][0] ... grid[n - 1][n - 1])\n for (int j = 1; j <= size; j++) {\n // StdOut.println(\"j: \"+j+\" isOpen: \"+ isOpen(size, j) +\n // \" isFull: \" + isFull(size, j));\n if (isFull(size, j)) {\n return true;\n }\n }\n return false;\n }", "public void updateNeighbours(int i) {\n if (currentState[i] != 0) {\n int ix0 = (i - STEPX) & MASKX;\n int iy0 = (i - STEPY) & MASKY;\n int iz0 = (i - STEPZ) & MASKZ;\n\n int ix1 = (i) & MASKX;\n int iy1 = (i) & MASKY;\n int iz1 = (i) & MASKZ;\n\n int ix2 = (i + STEPX) & MASKX;\n int iy2 = (i + STEPY) & MASKY;\n int iz2 = (i + STEPZ) & MASKZ;\n\n ++nextState[ix0 | iy0 | iz0];\n ++nextState[ix0 | iy0 | iz1];\n ++nextState[ix0 | iy0 | iz2];\n ++nextState[ix0 | iy1 | iz0];\n ++nextState[ix0 | iy1 | iz1];\n ++nextState[ix0 | iy1 | iz2];\n ++nextState[ix0 | iy2 | iz0];\n ++nextState[ix0 | iy2 | iz1];\n ++nextState[ix0 | iy2 | iz2];\n\n ++nextState[ix1 | iy0 | iz0];\n ++nextState[ix1 | iy0 | iz1];\n ++nextState[ix1 | iy0 | iz2];\n ++nextState[ix1 | iy1 | iz0];\n\n //!\t\t++nextState[ix1|iy1|iz1];\n ++nextState[ix1 | iy1 | iz2];\n ++nextState[ix1 | iy2 | iz0];\n ++nextState[ix1 | iy2 | iz1];\n ++nextState[ix1 | iy2 | iz2];\n\n ++nextState[ix2 | iy0 | iz0];\n ++nextState[ix2 | iy0 | iz1];\n ++nextState[ix2 | iy0 | iz2];\n ++nextState[ix2 | iy1 | iz0];\n ++nextState[ix2 | iy1 | iz1];\n ++nextState[ix2 | iy1 | iz2];\n ++nextState[ix2 | iy2 | iz0];\n ++nextState[ix2 | iy2 | iz1];\n ++nextState[ix2 | iy2 | iz2];\n }\n }", "public boolean resetEdges();", "public boolean percolates() {\n if(numberOfOpenSites() < length) {\n return false;\n }\n if(isPercolating) return true;\n for(int i = 0; i < length; i++) {\n if( isOpen(0, i) ) {\n for(int j = 0; j < length; j++) {\n if(isOpen(length - 1, j) && percolation.connected(translate(length-1,j),translate(0,i))) {\n isPercolating = true;\n return true;\n }\n }\n }\n }\n return false;\n }", "public void clearVisited()\n {\n visited = false;\n }", "Set<Edge> getUpwardOutgoingNeighborEdges() {\n\t\t\tif(!_bumpOnUpwardPass) {\n\t\t\t\tSystem.err.println(\"calling upward pass neighbor method on downward pass!\");\n\t\t\t}\n//\t\t\tif(_outgoingEdges.size() == 0) { // only compute if we have to\n\t\t\t\tSet<Edge> outgoingEdges = new HashSet<Edge>();\n\t\t\t\tIterator<Edge> it = _neighborEdges.keySet().iterator();\n\t\t\t\twhile(it.hasNext()) {\n\t\t\t\t\tEdge e = it.next();\n\t\t\t\t\tVertex v = e.getOtherVertex(this);\n\t\t\t\t\tif(this._orderID == UNMARKED) {\n\t\t\t\t\t\tSystem.err.println(\"whoops i am unmarked\");\n\t\t\t\t\t}\n\t\t\t\t\tif(v._orderID == UNMARKED) {\n\t\t\t\t\t\tSystem.err.println(\"whoops neighbor unmarked\");\n\t\t\t\t\t}\n\t\t\t\t\tif(this._orderID > v._orderID) {\n\t\t\t\t\t\toutgoingEdges.add(e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t_outgoingEdges = outgoingEdges;\n//\t\t\t}\n//\t\t\treturn outgoingEdges;\n\t\t\t\tSystem.out.println(this.toString()+\"'s outgoing edges:\\n\"+ outgoingEdges);\n\t\t\t\treturn outgoingEdges;\n\t\t}", "private void setNextGeneration() {\n\t\tRowIterator iterator = neighbors.iterateRows();\n\t\twhile (iterator.hasNext()) {\n\t\t\tElemIterator elem = iterator.next();\n\t\t\twhile (elem.hasNext()) {\n\t\t\t\tMatrixElem mElem = elem.next();\n\t\t\t\tint row = mElem.rowIndex();\n\t\t\t\tint col = mElem.columnIndex();\n\t\t\t\tInteger numNeighbors = (Integer) neighbors.elementAt(row, col);\n\t\t\t\tif (numNeighbors == 0 || numNeighbors == 1) { // dies if\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// neighbors are\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 0 or 1\n\t\t\t\t\tnextGen.setValue(row, col, false);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (numNeighbors >= 4) { // dies if neighbors are 4 or more\n\t\t\t\t\tnextGen.setValue(row, col, false);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (numNeighbors == 3) { // lives if neighbors are 3\n\t\t\t\t\tnextGen.setValue(row, col, true);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (numNeighbors == 2) { // if neighbors are 2, lives or dies\n\t\t\t\t\tif (!currentGen.elementAt(row, col).equals(false)) { // currently\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// alive\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// so\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// lives\n\t\t\t\t\t\tnextGen.setValue(row, col, true);\n\t\t\t\t\t} else { // currently dead so stays dead\n\t\t\t\t\t\tnextGen.setValue(row, col, false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcurrentGen = nextGen; // set current to next\n\t\tnextGen = new MySparseArray(false); // reset next\n\t\tneighbors = new MySparseArray(0); // reset neighbors\n\t}", "private void updateGrid() {\n\t\tfor (Neighbor neighbor : upsetNeighbors) {\n\t\t\tClear vacated_cell = new Clear(neighbor.getCoordsX(), neighbor.getCoordsY());\n\t\t\tgrid.setGridIndex(vacated_cell, vacated_cell.getCoordsX(), vacated_cell.getCoordsY());\n\t\t\tCell new_location = availableSpaces.get((int) (Math.random() * (availableSpaces.size() - 1)));\n\t\t\tint new_x = new_location.getCoordsX();\n\t\t\tint new_y = new_location.getCoordsY();\n\t\t\tif (neighbor.getClass().equals(Group1.class))\n\t\t\t\tgrid.setGridIndex(new Group1(new_x, new_y, percentSimilar), new_x, new_y);\n\t\t\telse\n\t\t\t\tgrid.setGridIndex(new Group2(new_x, new_y, percentSimilar), new_x, new_y);\n\t\t\tavailableSpaces.remove(new_location);\n\t\t\tavailableSpaces.add(vacated_cell);\n\t\t}\n\t}", "public boolean WasVisited() { return _visited; }", "public boolean percolates() {\n return uf.connected(source, sink);\n }", "public static void wallsAndGates(int[][] rooms) {\n if (rooms.length == 0 || rooms[0].length == 0) {\n return;\n }\n\n int m = rooms.length;\n int n = rooms[0].length;\n\n Queue<int[]> queue = new LinkedList();\n boolean[][] visited = new boolean[m][n];\n for (int i = 0; i < m; i++) {\n for (int j = 0; j < n; j++) {\n if (rooms[i][j] == 0) {\n queue.add(new int[] {i, j});\n }\n }\n }\n\n int level = 1;\n while (!queue.isEmpty()) {\n int size = queue.size();\n for (int i = 0; i < size; i++) {\n int[] cur = queue.poll();\n int currow = cur[0];\n int curcol = cur[1];\n\n int row;\n int col;\n\n //up\n row = currow-1;\n col = curcol;\n if (row >= 0) {\n if (rooms[row][col] == Integer.MAX_VALUE && !visited[row][col]) {\n visited[row][col] = true;\n rooms[row][col] = level;\n queue.add(new int[] {row, col});\n }\n }\n\n //down\n row = currow+1;\n if (row < m) {\n if (rooms[row][col] == Integer.MAX_VALUE && !visited[row][col]) {\n visited[row][col] = true;\n rooms[row][col] = level;\n queue.add(new int[] {row, col});\n }\n }\n\n //left\n row = currow;\n col = curcol-1;\n if (col >= 0) {\n if (rooms[row][col] == Integer.MAX_VALUE && !visited[row][col]) {\n visited[row][col] = true;\n rooms[row][col] = level;\n queue.add(new int[] {row, col});\n }\n }\n\n //right\n row = currow;\n col = curcol + 1;\n if (col < n) {\n if (rooms[row][col] == Integer.MAX_VALUE && !visited[row][col]) {\n visited[row][col] = true;\n rooms[row][col] = level;\n queue.add(new int[] {row, col});\n }\n }\n }\n level++;\n }\n\n }", "private void countCells() {\n\t\tvisitedCells = 0;\n\t\ttotalCells = 0;\n\t\tfor (int ix = 0; ix < maxCells_x; ix++) {\n\t\t\tfor (int iy = 0; iy < maxCells_y; iy++) {\n\t\t\t\ttotalCells++;\n\t\t\t\tif (cell[ix][iy] == 1) {\n\t\t\t\t\tvisitedCells++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private LinkedList<int[]> neighborFinder(){\n LinkedList<int[]> neighborhood= new LinkedList<>();\n int[] curr_loc = blankFinder();\n int x = curr_loc[0];\n int y = curr_loc[1];\n if(x >0){\n neighborhood.add(new int[]{x-1, y});\n }\n if(x < n-1){\n neighborhood.add(new int[]{x+1, y});\n }\n if(y > 0){\n neighborhood.add(new int[]{x, y-1});\n }\n if(y < n-1) {\n neighborhood.add(new int[]{x, y+1});\n }\n\n\n return neighborhood;\n }", "public void updateFrontKnown() {\n\t\tfrontKnown = new ArrayList<int[]>();\n\t\tfor (int i = 0; i < maxX; i++) {\n\t\t\tfor (int j = 0; j < maxY; j++) {\n\t\t\t\tif (coveredMap[i][j] != SIGN_UNKNOWN && coveredMap[i][j] != SIGN_MARK && findAdjacentUnknown(new int[]{i, j}).size() > 0) {\n\t\t\t\t\tfrontKnown.add(new int[]{i,j});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void updateNewState() {\n Integer aliveCount = 0;\n for (final Cell neighbor : this.neighbors) {\n if (neighbor.isAlive()) {\n aliveCount++;\n }\n }\n\n if (aliveCount < 2) {\n this.setNewState(false);\n } else if (!this.isAlive() && aliveCount == 3) {\n this.setNewState(true);\n } else if (aliveCount > 3) {\n this.setNewState(false);\n }\n }", "protected void alter_for_neighbour_switch() {\n\t\tint this_l, tother_l, ns_i, ns_j, ns_n;\n\t\t\n\t\t// Let the user know...\n\t\tSystem.out.println(\" H THIS IS IN N_SWITCH (nn comparison) mode, for structure \"+INIT_NPHASE);\n\t\tSystem.out.println(\" H en_shift = \"+EN_SHIFT);\n\t\t\n\t\t// Check that there is room at the inn:\n\t\tif( n > MAX_NNS ) {\n\t\t\tthrow( new LSSimException(LSSimException.PARAM,\n\t\t\t\"neighbour switch needs \"+n+\" neighbours in MAX_NNS!\\n\"));\n\t\t}\n\t\t\n\t\t// Make both structures the same:\n\t\tthis_l = INIT_NPHASE;\n\t\ttother_l = 1 - this_l;\n\t\tfor( ns_i = 0; ns_i < n; ns_i++ ) {\n\t\t\tlatt[tother_l][ns_i].x = latt[this_l][ns_i].x;\n\t\t\tlatt[tother_l][ns_i].y = latt[this_l][ns_i].y;\n\t\t\tlatt[tother_l][ns_i].z = latt[this_l][ns_i].z;\n\t\t\t// copy nn lists as well!\n\t\t\tns_n = 0; ns_j = nns[this_l][ns_i][ns_n];\n\t\t\twhile ( ns_j != NO_MORE_NNS ) {\n\t\t\t\tnns[tother_l][ns_i][ns_n] = nns[this_l][ns_i][ns_n];\n\t\t\t\tns_n++; ns_j = nns[this_l][ns_i][ns_n];\n\t\t\t}\n\t\t\tnns[tother_l][ns_i][ns_n] = NO_MORE_NNS;\n\t\t}\n\t\t\n\t\t// Alter the neighbour list for structure 1;\n\t\tmake_it_order_n_squared(1);\n\t}", "public void setNodesToUnvisited(){\n for(GraphNode node: graphNode){\n if(node.visited){\n node.visited = false;\n }\n }\n }", "private void evaluateNeighborhood(List<Sequence> neighbors) {\n Sequence current = sequence;\n\t\tfor (Sequence s : neighbors) {\n\t\t\tapplySequence(s);\n\t\t\tif (isValid()) {\n\t\t\t\tevaluate();\n\t\t\t\ts.setScore(this.getScore());\n\t\t\t}\n\t\t}\n // restore sequence\n applySequence(current); \n }", "private int liveNeighbours(int i,int j) {\n\t\tint count = 0;\n\t\tif (button[i - 1][j - 1].getBackground() == Color.yellow) {\n\t\t\tcount++;\n\t\t}\n\t\tif (button[i - 1][j].getBackground() == Color.yellow) {\n\t\t\tcount++;\n\t\t}\n\t\tif (button[i - 1][j + 1].getBackground() == Color.yellow) {\n\t\t\tcount++;\n\t\t}\n\t\tif (button[i][j - 1].getBackground() == Color.yellow) {\n\t\t\tcount++;\n\t\t}\n\t\tif (button[i][j + 1].getBackground() == Color.yellow){\n\t\t\tcount++;\n\t\t}\n\t\tif (button[i + 1][ j - 1].getBackground() == Color.yellow){\n\t\t\tcount++;\n\t\t}\n\t\tif (button[i + 1][j].getBackground() == Color.yellow) {\n\t\t\tcount++;\n\t\t}\n\t\tif (button[i + 1][j + 1].getBackground() == Color.yellow) {\n\t\t\tcount++;\n\t\t}\n\t\treturn count;\n\t}", "public void dfs() {\n\t\tfor (Vertice v : vertices) {\n\t\t\tv.setVisited(false);\n\t\t}\n\t\tfor (Vertice v : vertices) {\n\t\t\tif (!v.getVisited()) {\n\t\t\t\tVisitar(v, -1);\n\t\t\t}\n\t\t}\n\t}", "public boolean percolates(){\n\t\tif(isPathological)\n\t\t\treturn isOpen(1,1);\n\t\t//System.out.println(\"Root top: \"+ quickUnion.find(N+2));\n\t\t\n\t\treturn (quickUnion.find(N*N+1) == quickUnion.find(0)); \t\n\t}", "protected Cell[] getNeighbours() {\r\n\t\treturn this.neighbours;\r\n\t}", "private boolean isCellVisited(Cell cell) {\n\t\tboolean result;\n\t\t// Return true to skip it if cell is null\n\t\tif (!isIn(cell))\n\t\t\treturn true;\n\n\t\tint r = cell.r;\n\t\tint c = cell.c;\n\t\tif (maze.type == HEX) {\n\t\t\tc = c - (r + 1) / 2;\n\t\t}\n\t\ttry {\n\t\t\tresult = visited[r][c];\n\t\t} catch (Exception e) {\n\t\t\tresult = true;\n\t\t}\n\n\t\treturn result;\n\t}", "@DisplayName(\"Has neighbours?\")\n @Test\n public void testGetNeighbours() {\n Assertions.assertTrue(graph.getNeighbours(0).size() > 1);\n }", "protected static int countNeighbours(int i, int j, byte[][] currentGen){\n int count = 0;\n \n for(int x = i-1; x<i+2; x++){\n count+=checkBorders(x, j-1, currentGen);\n count+=checkBorders(x, j+1, currentGen);\n }\n count+=checkBorders(i-1, j, currentGen);\n count+=checkBorders(i+1, j, currentGen);\n\n return count;\n }", "public void progressCells() {\n\t\tint[][] newMatrix = new int[width][height];\n\t\t\n\t\tfor(int x = 0; x < width; x++) {\n\t\t\tfor(int y = 0; y < height; y++) {\n\t\t\t\tint neighbourCount = countLivingNeighbours(x, y);\n\t\t\t\tboolean wasAlive = cellMatrix[x][y] == 1;\n\t\t\t\t\n\t\t\t\tif(wasAlive) {\n\t\t\t\t\tnewMatrix[x][y] = neighbourCount >= deathLimit ? 1 : 0;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tnewMatrix[x][y] = neighbourCount > birthLimit ? 1 : 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcellMatrix = newMatrix;\n\t}", "private boolean checkM(){\n if(currentLocation.x == previousLocation.x && currentLocation.y == previousLocation.y) {\n return false;\n }\n // Is outside the border\n if(currentLocation.x < size || currentLocation.y < size || currentLocation.x > map.numRows - size || currentLocation.y > map.numCols - size) {\n return false;\n }\n // Is on the land\n double angle2 = 0;\n while (angle2 < 6.3) {\n if (map.getTerrainGrid()[currentLocation.x + (int) (size/2 * cos(angle2))][currentLocation.y + (int) (size/2 * sin(angle2))] == Colors.OCEAN) {\n return false;\n }\n angle2 += 0.3;\n }\n return true;\n }", "public void setAdjacent()\r\n {\n \t\r\n adjacentTiles = new Tile[6];\r\n \r\n \r\n //Driver.map[VERT][HOR]\r\n \r\n if(verticalPos < Driver.map.length && horizontalPos > 1) //topleft\r\n {\r\n \ttopLeft = Driver.map[verticalPos + 1][horizontalPos - 1];\r\n }\r\n else\r\n {\r\n \ttopLeft = null;\r\n }\r\n \r\n if(verticalPos < Driver.map.length - 2) //top\r\n {\r\n \ttop = Driver.map[verticalPos + 2][horizontalPos];\r\n }\r\n else\r\n {\r\n \ttop = null;\r\n }\r\n \r\n if(verticalPos < Driver.map.length && horizontalPos < Driver.map[0].length) //topright\r\n {\r\n \ttopRight = Driver.map[verticalPos + 1][horizontalPos + 1];\r\n }\r\n else\r\n {\r\n \ttopRight = null;\r\n }\r\n \r\n if(verticalPos > 1 && horizontalPos < Driver.map[0].length) //bottomright\r\n {\r\n \tbottomRight = Driver.map[verticalPos - 1][horizontalPos + 1];\r\n }\r\n else\r\n {\r\n \tbottomRight = null;\r\n }\r\n \r\n if(verticalPos > 2) //bottom\r\n {\r\n \tbottom = Driver.map[verticalPos - 2][horizontalPos];\r\n }\r\n else\r\n {\r\n \tbottom = null;\r\n }\r\n \r\n if(verticalPos > 1 && horizontalPos > 1) //botttomLeft\r\n {\r\n \tbottomLeft = Driver.map[verticalPos - 1][horizontalPos - 1];\r\n }\r\n else\r\n {\r\n \tbottomLeft = null;\r\n }\r\n \t\r\n \r\n adjacentTiles[0] = topLeft;\r\n adjacentTiles[1] = top;\r\n adjacentTiles[2] = topRight;\r\n adjacentTiles[3] = bottomRight;\r\n adjacentTiles[4] = bottom;\r\n adjacentTiles[5] = bottomLeft;\r\n \r\n \r\n// System.out.print(\"main tile \" + getHor() + \", \" + getVert() + \" \");\r\n// for(int i = 0; i < adjacentTiles.length; i++)\r\n// {\r\n// \tif( adjacentTiles[i] != null)\r\n// \t\tSystem.out.print(adjacentTiles[i].getHor() + \", \" + adjacentTiles[i].getVert() + \" | \");\r\n// \telse\r\n// \t\tSystem.out.print(\"null \");\r\n// }\r\n// System.out.println();\r\n \r\n }", "public void setVisited()\n {\n visited = true;\n }" ]
[ "0.64045006", "0.61292344", "0.61105484", "0.60825866", "0.60631657", "0.6061054", "0.6046803", "0.6041535", "0.6004567", "0.59938395", "0.5947241", "0.59415", "0.59130985", "0.5904908", "0.58912885", "0.5870891", "0.5867923", "0.58196443", "0.58142525", "0.58116686", "0.580691", "0.5802938", "0.58004475", "0.5780351", "0.5738567", "0.572345", "0.5715928", "0.57154715", "0.5704093", "0.5694936", "0.56734663", "0.5644745", "0.5640967", "0.5629311", "0.56289697", "0.55708987", "0.55656207", "0.55634326", "0.55572045", "0.5555738", "0.5537826", "0.5536217", "0.55109787", "0.55095154", "0.5501243", "0.5481481", "0.54506683", "0.5443224", "0.54151183", "0.5409686", "0.5407809", "0.54031277", "0.5397325", "0.5396877", "0.53886855", "0.5386376", "0.53853285", "0.5378671", "0.53719807", "0.5361728", "0.5348966", "0.5348181", "0.534581", "0.5337204", "0.53346914", "0.53118896", "0.5299843", "0.529366", "0.52885437", "0.52882344", "0.52876085", "0.52770483", "0.5276914", "0.5276305", "0.5274976", "0.52738726", "0.52698165", "0.52692", "0.5269172", "0.52681476", "0.5265597", "0.52628946", "0.5243953", "0.5242695", "0.523309", "0.52309734", "0.5222575", "0.5217863", "0.5216383", "0.52163094", "0.5207693", "0.51997167", "0.5199237", "0.5199135", "0.5180176", "0.51768994", "0.51756424", "0.5175394", "0.5173866", "0.5168014" ]
0.62727726
1
Inverts the orientation of the vertices. Overrides invertOrientation method of Triangle3D in addition to the orientation inversion it inverts the neighbours.
public void invertOrientation() { Point3D temp = getPoint(2); setPoint(2, getPoint(1)); setPoint(1, temp); TriangleElt3D temp2 = getNeighbour(2); setNeighbour(2, getNeighbour(1)); setNeighbour(1, temp2); if (this.getNetComponent() != null) this.getNetComponent().setOriented(false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void invert() throws NoninvertibleTransform3DException {\r\n\t\tthis.set(getInverse());\r\n\t}", "@Override\n public void Invert() {\n\t \n }", "public void invert() {\n \n float[] result = new float[16];\n System.arraycopy(IDENTITY, 0, result, 0, 16);\n \n for(int i = 0; i < 4; i++){\n int i4 = i*4;\n \n // make sure[i,i] is != 0\n \n for(int j = 0; matrix[i4+i] == 0 && j < 4; j++){\n if(j != i && matrix[j*4+i] != 0){\n transform(i, 1, j, matrix, result);\n }\n }\n \n // ensure tailing 0s\n \n for(int j = 0; j < i; j++){\n if(matrix[i4+j] != 0){\n transform(i, -matrix[i4+j]/matrix[j*4+j], j, matrix, result);\n }\n }\n\n if(matrix[i4+i] == 0){\n throw new IllegalArgumentException(\"Not invertable\");\n }\n\n // dump(\"row \"+i+\" leading zeros\", matrix, result);\n }\n \n for(int i = 3; i >= 0; i--){\n int i4 = i*4;\n if(matrix[i4+i] != 1){\n float f = matrix[i4+i];\n matrix[i4+i] = 1;\n for(int j = 0; j < 4; j++){\n result[i4+j] /= f;\n if(j > i){\n matrix[i4+j] /= f;\n }\n }\n }\n\n// dump(\"row \"+i+\" leading 1\", matrix, result);\n \n for(int j = i+1; j < 4; j++){\n if(matrix[i*4+j] != 0){\n transform(i, -matrix[i*4+j], j, matrix, result);\n }\n }\n\n// dump(\"row \"+i+\" tailing 0\", matrix, result);\n\n }\n\n matrix = result;\n }", "public void invertNormals() {\n mCubeNormalData = new float[]\n {\n // Front face\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n // Right face\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n // Back face\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n // Left face\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n // Top face\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n // Bottom face\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f\n };\n mCubeNormals.put(mCubeNormalData).position(0);\n\n }", "public void invert() {\n\t\tthis.vector.setXYZ(-this.vector.x(), -this.vector.y(), -this.vector.z());\n\t\tthis.energy = -this.energy;\n\t}", "protected void initTransforms() {\n for (int i = 0; i < cornerCount; i++) {\n int index = cornerOffset + i;\n identityVertexMatrix[index] = new idx3d_Matrix();\n }\n\n // 0:urf\n identityVertexMatrix[cornerOffset + 0].rotate(0, -HALF_PI, 0);\n // 1:dfr\n identityVertexMatrix[cornerOffset + 1].rotate(0, 0, PI);\n // 2:ubr\n identityVertexMatrix[cornerOffset + 2].rotate(0, PI, 0);\n // 3:drb\n identityVertexMatrix[cornerOffset + 3].rotate(0, 0, PI);\n identityVertexMatrix[cornerOffset + 3].rotate(0, -HALF_PI, 0);\n // 4:ulb\n identityVertexMatrix[cornerOffset + 4].rotate(0, HALF_PI, 0);\n // 5:dbl\n identityVertexMatrix[cornerOffset + 5].rotate(PI, 0, 0);\n // 6:ufl\n //--no transformation---\n // 7:dlf\n identityVertexMatrix[cornerOffset + 7].rotate(0, HALF_PI, 0);\n identityVertexMatrix[cornerOffset + 7].rotate(PI, 0, 0);\n //\n // We can clone the normalmatrix here form the vertex matrix, because\n // the vertex matrix consists of rotations only.\n for (int i = 0; i < cornerCount; i++) {\n identityNormalMatrix[i] = identityVertexMatrix[i].getClone();\n }\n\n /**\n * Edges\n */\n // Move all edge parts to front up (fu) and then rotate them in place\n for (int i = 0; i < edgeCount; i++) {\n int index = edgeOffset + i;\n idx3d_Matrix vt = new idx3d_Matrix();\n idx3d_Matrix nt = new idx3d_Matrix();\n identityVertexMatrix[index] = vt;\n identityNormalMatrix[index] = nt;\n // The vertex matrix is the same as the normal matrix, but with\n // an additional shift, which is made before the rotation.\n if (i >= 12) {\n switch ((i - 12) % 24) {\n case 12:\n case 13:\n case 2:\n case 3:\n case 4:\n case 17:\n case 6:\n case 19:\n case 20:\n case 21:\n case 10:\n case 11:\n vt.shift(PART_LENGTH*((i+12)/24), 0f, 0f);\n break;\n default:\n vt.shift(-PART_LENGTH*((i+12)/24), 0f, 0f);\n break;\n }\n }\n // Now we do the rotation with the normal matrix only\n switch (i % 12) {\n case 0: // ur\n nt.rotate(0, HALF_PI, 0f);\n nt.rotate(0, 0, HALF_PI);\n break;\n case 1: // rf\n nt.rotate(0, -HALF_PI, 0);\n nt.rotate(HALF_PI, 0, 0);\n break;\n case 2: // dr\n nt.rotate(0, -HALF_PI, HALF_PI);\n break;\n case 3: // bu\n nt.rotate(0, PI, 0);\n break;\n case 4: // rb\n nt.rotate(0, 0, HALF_PI);\n nt.rotate(0, -HALF_PI, 0);\n break;\n case 5: // bd\n nt.rotate(PI, 0, 0);\n break;\n case 6: // ul\n nt.rotate(-HALF_PI, -HALF_PI, 0);\n break;\n case 7: // lb\n nt.rotate(0, 0, -HALF_PI);\n nt.rotate(0, HALF_PI, 0);\n break;\n case 8: // dl\n nt.rotate(HALF_PI, HALF_PI, 0);\n break;\n case 9: // fu\n //--no transformation--\n break;\n case 10: // lf\n nt.rotate(0, 0, HALF_PI);\n nt.rotate(0, HALF_PI, 0);\n break;\n case 11: // fd\n nt.rotate(0, 0, PI);\n break;\n }\n // Finally, we concatenate the rotation to the vertex matrix\n vt.transform(nt);\n }\n /* Sides\n */\n // Move all side parts to the front side and rotate them into place\n for (int i = 0; i < sideCount; i++) {\n int index = sideOffset + i;\n idx3d_Matrix vt = new idx3d_Matrix();\n idx3d_Matrix nt = new idx3d_Matrix();\n identityVertexMatrix[index] = vt;\n identityNormalMatrix[index] = nt;\n // The vertex matrix is the same as the normal matrix, but with\n // an additional shift, which is made before the rotation.\n switch (i / 6) {\n // central part\n case 0 :\n // vt.shift(0, 0, 0);\n break;\n // inner ring\n case 1:\n vt.shift(-PART_LENGTH, -PART_LENGTH, 0);\n break;\n case 2:\n vt.shift(-PART_LENGTH, PART_LENGTH, 0);\n break;\n case 3:\n vt.shift(PART_LENGTH, PART_LENGTH, 0);\n break;\n case 4:\n vt.shift(PART_LENGTH, -PART_LENGTH, 0);\n break;\n case 5:\n vt.shift(0, -PART_LENGTH, 0);\n break;\n case 6:\n vt.shift(-PART_LENGTH, 0, 0);\n break;\n case 7:\n vt.shift(0, PART_LENGTH, 0);\n break;\n case 8:\n vt.shift(PART_LENGTH, 0, 0);\n break;\n // outer ring corners\n /*\n * +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+\n * | .0 | .2 | .3 | .1 |\n * + +---+---+---+---+---+ + +---+---+---+---+---+ + +---+---+---+---+---+ + +---+---+---+---+---+ +\n * | |75 |129|81 |105|57 | | |62 |140|92 |116|68 | | |66 |144|96 |120|72 | | |59 |137|89 |113|65 | |\n * + +---+---+---+---+---+ + +---+---+---+---+---+ + +---+---+---+---+---+ + +---+---+---+---+---+ +\n * | |123|27 |33 | 9 |135| | |110|14 |44 |20 |146| | |114|18 |48 |24 |126| | |107|11 |41 |17 |143| |\n * + +---+---+---+---+---+ + +---+---+---+---+---+ + +---+---+---+---+---+ + +---+---+---+---+---+ +\n * | .3|99 |51 | 3 |39 |87 |.1 | .1|86 |38 | 2 |50 |98 |.3 | .2|90 |42 | 0 |30 |78 |.0 | .0|83 |35 | 5 |47 |95 |.2 |\n * + +---+---+---+---+---+ + +---+---+---+---+---+ + +---+---+---+---+---+ + +---+---+---+---+---+ +\n * | |147|21 |45 |15 |111| | |134| 8 |32 |26 |122| | |138|12 |36 | 6 |102| | |131|29 |53 |23 |119| |\n * + +---+---+---+---+---+ + +---+---+---+---+---+ + +---+---+---+---+---+ + +---+---+---+---+---+ +\n * | |69 |117|93 |141|63 | | |56 |104|80 |128|74 | | |60 |108|84 |132|54 | | |77 |125|101|149|71 | |\n * + +---+---+---+---+---+ + +---+---+---+---+---+ + +---+---+---+---+---+ + +---+---+---+---+---+ +\n * | .2 | .0 | .1 | .3 |\n * +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+\n */\n case 9:\n vt.shift(-2f*PART_LENGTH, -2f*PART_LENGTH, 0);\n break;\n case 10:\n vt.shift(-2f*PART_LENGTH, 2f*PART_LENGTH, 0);\n break;\n case 11:\n vt.shift(2f*PART_LENGTH, 2f*PART_LENGTH, 0);\n break;\n case 12:\n vt.shift(2f*PART_LENGTH, -2f*PART_LENGTH, 0);\n break;\n // outer ring central edges\n case 13:\n vt.shift(0, -2f*PART_LENGTH, 0);\n break;\n case 14:\n vt.shift(-2f*PART_LENGTH, 0, 0);\n break;\n case 15:\n vt.shift(0, 2f*PART_LENGTH, 0);\n break;\n case 16:\n vt.shift(2f*PART_LENGTH, 0, 0);\n break;\n // outer ring clockwise shifted edges\n case 17:\n vt.shift(-PART_LENGTH, -2f*PART_LENGTH, 0);\n break;\n case 18:\n vt.shift(-2f*PART_LENGTH, PART_LENGTH, 0);\n break;\n case 19:\n vt.shift(PART_LENGTH, 2f*PART_LENGTH, 0);\n break;\n case 20:\n vt.shift(2f*PART_LENGTH, -PART_LENGTH, 0);\n break;\n // outer ring counter-clockwise shifted edges\n case 21:\n vt.shift(PART_LENGTH, -2f*PART_LENGTH, 0);\n break;\n case 22:\n vt.shift(-2f*PART_LENGTH, -PART_LENGTH, 0);\n break;\n case 23:\n vt.shift(-PART_LENGTH, 2f*PART_LENGTH, 0);\n break;\n case 24:\n vt.shift(2f*PART_LENGTH, PART_LENGTH, 0);\n break;\n\n }\n\n switch (i % 6) {\n case 0 : // r\n nt.rotate(0f, 0f, -HALF_PI);\n nt.rotate(0f, -HALF_PI, 0f);\n break;\n case 1 : // u\n nt.rotate(0f, 0f, HALF_PI);\n nt.rotate(-HALF_PI, 0f, 0f);\n break;\n case 2 : // f\n //--no transformation--\n break;\n case 3 : // l\n nt.rotate(0f, 0f, PI);\n nt.rotate(0f, HALF_PI, 0f);\n break;\n case 4 : // d\n nt.rotate(0f, 0f, PI);\n nt.rotate(HALF_PI, 0f, 0f);\n break;\n case 5 : // b\n nt.rotate(0f, 0f, HALF_PI);\n nt.rotate(0f, PI, 0f);\n break;\n }\n // Finally, we concatenate the rotation to the vertex matrix\n vt.transform(nt);\n }\n\n\n // Center part\n identityVertexMatrix[centerOffset] = new idx3d_Matrix();\n identityNormalMatrix[centerOffset] = new idx3d_Matrix();\n\n // copy all vertex locationTransforms into the normal locationTransforms.\n // create the locationTransforms\n for (int i = 0; i < partCount; i++) {\n\n locationTransforms[i] = new idx3d_Group();\n locationTransforms[i].matrix.set(identityVertexMatrix[i]);\n locationTransforms[i].normalmatrix.set(identityNormalMatrix[i]);\n\n explosionTransforms[i] = new idx3d_Group();\n explosionTransforms[i].addChild(parts[i]);\n locationTransforms[i].addChild(explosionTransforms[i]);\n }\n }", "public final void invert(Matrix3f m1) {\n\tset(m1);\n\tinvert();\n }", "public JamMatrix invert() {\n RealMatrix apacheUT = decomposition.getUT();\n RealMatrix apacheV = decomposition.getV();\n RealMatrix apacheDinv = getApacheDinv();\n\n return JamMatrix.wrap(apacheV.multiply(apacheDinv.multiply(apacheUT)).getData());\n }", "public final void invert(Matrix4rad toInvert) {\r\n\t\tthis.set(toInvert);\r\n\t\tinvert();\r\n\t}", "public Vector3 invert()\n {\n this.scale(-1);\n return this;\n }", "public void invert() {\n int len= currentIm.getRows() * currentIm.getCols();\n \n // invert all pixels (leave alpha/transparency value alone)\n \n // invariant: pixels 0..p-1 have been complemented.\n for (int p= 0; p < len; p= p+1) {\n int rgb= currentIm.getPixel(p);\n int red= 255 - DM.getRed(rgb);\n int blue= 255 - DM.getBlue(rgb);\n int green= 255 - DM.getGreen(rgb);\n int alpha= DM.getAlpha(rgb);\n currentIm.setPixel(p,\n (alpha << 24) | (red << 16) | (green << 8) | blue);\n }\n }", "public final void invert() {\n\tdouble s = determinant();\n\tif (s == 0.0)\n\t return;\n\ts = 1/s;\n\t// alias-safe way.\n\tset(\n\t m11*m22 - m12*m21, m02*m21 - m01*m22, m01*m12 - m02*m11,\n\t m12*m20 - m10*m22, m00*m22 - m02*m20, m02*m10 - m00*m12,\n\t m10*m21 - m11*m20, m01*m20 - m00*m21, m00*m11 - m01*m10\n\t );\n\tmul((float)s);\n }", "public Index invert() {\n \t\tint n=length();\n \t\tIndex ni=new Index(n);\n \t\tfor (int i=0; i<n; i++) {\n \t\t\tni.set(this.get(i), i);\n \t\t}\n \t\treturn ni;\n \t}", "Direction invert() {\n switch (this) {\n case NORTH: return SOUTH;\n case SOUTH: return NORTH;\n case EAST: return WEST;\n case WEST: return EAST;\n case NORTH_EAST: return SOUTH_WEST;\n case NORTH_WEST: return SOUTH_EAST;\n case SOUTH_EAST: return NORTH_WEST;\n case SOUTH_WEST: return NORTH_EAST;\n default: return NULL;\n }\n }", "public void invert()\n {\n assert isComplete;\n \n isInverted = !isInverted;\n }", "@Override\n public void invert() {\n getInvertibles().parallelStream().forEach(Invertible::invert);\n }", "Edge inverse() {\n return bond.inverse().edge(u, v);\n }", "public final void invert() {\r\n\t\tRadical1 s = determinant();\r\n\t\tif (s.equals(Radical1.ZERO))\r\n\t\t\treturn;\r\n\r\n\t\tif (!s.equals(Radical1.ONE))\r\n\t\t\tthrow new ArithmeticException(\"can't invert radical expressions that have non-1 determinant (i.e. that rescale)\");\r\n\r\n\t\t// see Matrix4f.invert for an explination\r\n\r\n\t\tl1.setZero();\r\n\t\tl2.setZero();\r\n\t\tl3.setZero();\r\n\t\tl4.setZero();\r\n\t\tl5.setZero();\r\n\t\tl6.setZero();\r\n\t\tl7.setZero();\r\n\t\tl8.setZero();\r\n\t\tl9.setZero();\r\n\t\tl10.setZero();\r\n\t\tl11.setZero();\r\n\t\tl12.setZero();\r\n\t\tl13.setZero();\r\n\t\tl14.setZero();\r\n\t\tl15.setZero();\r\n\t\tl16.setZero();\r\n\r\n\t\tcalcPartInverse(5, 10, 15, 11, 14, op1, op2, op3, op4, l1);\r\n\t\tcalcPartInverse(6, 11, 13, 9, 15, op1, op2, op3, op4, l1);\r\n\t\tcalcPartInverse(7, 9, 14, 10, 13, op1, op2, op3, op4, l1);\r\n\r\n\t\tcalcPartInverse(9, 2, 15, 3, 14, op1, op2, op3, op4, l2);\r\n\t\tcalcPartInverse(10, 3, 13, 1, 15, op1, op2, op3, op4, l2);\r\n\t\tcalcPartInverse(11, 1, 14, 2, 13, op1, op2, op3, op4, l2);\r\n\r\n\t\tcalcPartInverse(13, 2, 7, 3, 6, op1, op2, op3, op4, l3);\r\n\t\tcalcPartInverse(14, 3, 5, 1, 7, op1, op2, op3, op4, l3);\r\n\t\tcalcPartInverse(15, 1, 6, 2, 5, op1, op2, op3, op4, l3);\r\n\r\n\t\tcalcPartInverse(1, 7, 10, 6, 11, op1, op2, op3, op4, l4);\r\n\t\tcalcPartInverse(2, 5, 11, 7, 9, op1, op2, op3, op4, l4);\r\n\t\tcalcPartInverse(3, 6, 9, 5, 10, op1, op2, op3, op4, l4);\r\n\r\n\t\tcalcPartInverse(6, 8, 15, 11, 12, op1, op2, op3, op4, l5);\r\n\t\tcalcPartInverse(7, 10, 12, 8, 14, op1, op2, op3, op4, l5);\r\n\t\tcalcPartInverse(4, 11, 14, 10, 15, op1, op2, op3, op4, l5);\r\n\r\n\t\tcalcPartInverse(10, 0, 15, 3, 12, op1, op2, op3, op4, l6);\r\n\t\tcalcPartInverse(11, 2, 12, 0, 14, op1, op2, op3, op4, l6);\r\n\t\tcalcPartInverse(8, 3, 14, 2, 15, op1, op2, op3, op4, l6);\r\n\r\n\t\tcalcPartInverse(14, 0, 7, 3, 4, op1, op2, op3, op4, l7);\r\n\t\tcalcPartInverse(15, 2, 4, 0, 6, op1, op2, op3, op4, l7);\r\n\t\tcalcPartInverse(12, 3, 6, 2, 7, op1, op2, op3, op4, l7);\r\n\r\n\t\tcalcPartInverse(2, 7, 8, 4, 11, op1, op2, op3, op4, l8);\r\n\t\tcalcPartInverse(3, 4, 10, 6, 8, op1, op2, op3, op4, l8);\r\n\t\tcalcPartInverse(0, 6, 11, 7, 10, op1, op2, op3, op4, l8);\r\n\r\n\t\tcalcPartInverse(7, 8, 13, 9, 12, op1, op2, op3, op4, l9);\r\n\t\tcalcPartInverse(4, 9, 15, 11, 13, op1, op2, op3, op4, l9);\r\n\t\tcalcPartInverse(5, 11, 12, 8, 15, op1, op2, op3, op4, l9);\r\n\r\n\t\tcalcPartInverse(11, 0, 13, 1, 12, op1, op2, op3, op4, l10);\r\n\t\tcalcPartInverse(8, 1, 15, 3, 13, op1, op2, op3, op4, l10);\r\n\t\tcalcPartInverse(9, 3, 12, 0, 15, op1, op2, op3, op4, l10);\r\n\r\n\t\tcalcPartInverse(15, 0, 5, 1, 4, op1, op2, op3, op4, l11);\r\n\t\tcalcPartInverse(12, 1, 7, 3, 5, op1, op2, op3, op4, l11);\r\n\t\tcalcPartInverse(13, 3, 4, 0, 7, op1, op2, op3, op4, l11);\r\n\r\n\t\tcalcPartInverse(3, 5, 8, 4, 9, op1, op2, op3, op4, l12);\r\n\t\tcalcPartInverse(0, 7, 9, 5, 11, op1, op2, op3, op4, l12);\r\n\t\tcalcPartInverse(1, 4, 11, 7, 8, op1, op2, op3, op4, l12);\r\n\r\n\t\tcalcPartInverse(4, 10, 13, 9, 14, op1, op2, op3, op4, l13);\r\n\t\tcalcPartInverse(5, 8, 14, 10, 12, op1, op2, op3, op4, l13);\r\n\t\tcalcPartInverse(6, 9, 12, 8, 13, op1, op2, op3, op4, l13);\r\n\r\n\t\tcalcPartInverse(8, 2, 13, 1, 14, op1, op2, op3, op4, l14);\r\n\t\tcalcPartInverse(9, 0, 14, 2, 12, op1, op2, op3, op4, l14);\r\n\t\tcalcPartInverse(10, 1, 12, 0, 13, op1, op2, op3, op4, l14);\r\n\r\n\t\tcalcPartInverse(12, 2, 5, 1, 6, op1, op2, op3, op4, l15);\r\n\t\tcalcPartInverse(13, 0, 6, 2, 4, op1, op2, op3, op4, l15);\r\n\t\tcalcPartInverse(14, 1, 4, 0, 5, op1, op2, op3, op4, l15);\r\n\r\n\t\tcalcPartInverse(0, 5, 10, 6, 9, op1, op2, op3, op4, l16);\r\n\t\tcalcPartInverse(1, 6, 8, 4, 10, op1, op2, op3, op4, l16);\r\n\t\tcalcPartInverse(2, 4, 9, 5, 8, op1, op2, op3, op4, l16);\r\n\r\n\t\tvalues[0].set(l1);\r\n\t\tvalues[1].set(l2);\r\n\t\tvalues[2].set(l3);\r\n\t\tvalues[3].set(l4);\r\n\t\tvalues[4].set(l5);\r\n\t\tvalues[5].set(l6);\r\n\t\tvalues[6].set(l7);\r\n\t\tvalues[7].set(l8);\r\n\t\tvalues[8].set(l9);\r\n\t\tvalues[9].set(l10);\r\n\t\tvalues[10].set(l11);\r\n\t\tvalues[11].set(l12);\r\n\t\tvalues[12].set(l13);\r\n\t\tvalues[13].set(l14);\r\n\t\tvalues[14].set(l15);\r\n\t\tvalues[15].set(l16);\r\n\r\n\t\tif (s.equals(Radical1.MINUS_ONE))\r\n\t\t\tnegate();\r\n\t}", "public final native Mat4 inverse() /*-{\n return $wnd.mat4.inverse(this, $wnd.mat4.create());\n }-*/;", "public void flipV() {\r\n int tmp, sym;\r\n for (int col = 0; col < pixels.length; ++col) {\r\n for (int row = 0; row < pixels[col].length / 2; ++row) {\r\n // find the column index of the vertically symmetric pixel\r\n sym = pixels[col].length - 1 - row;\r\n // swap the pixel value between the two\r\n tmp = pixels[col][row];\r\n pixels[col][row] = pixels[col][sym];\r\n pixels[col][sym] = tmp;\r\n }\r\n }\r\n this.pix2img();\r\n }", "public CubieCube inverseCube() {\n\n CubieCube clone = this.clone();\n for (int i = 0; i < edgesValues.length; i++) {\n clone.eo[i] = this.eo[clone.ep[i]];\n }\n for (int i = 0; i < cornerValues.length; i++) {\n char ori = this.co[clone.cp[i]];\n if (ori >= 3)\n clone.co[i] = ori;\n else {\n clone.co[i] = (char) -ori;\n if (clone.co[i] < 0)\n clone.co[i] += 3;\n }\n }\n return clone;\n }", "void orientation(double xOrientation, double yOrientation, double zOrientation);", "public void rotate(){\n\t\t\n\t\tfor(Vertex v : vertices){\n\n\t\t\tMatrix m = ViewSettings.getRotationMatrix4().multiply(v);\n\n\t\t\tv.setX(m.getValue(0, 0));\n\t\t\tv.setY(m.getValue(1, 0));\n\t\t\tv.setZ(m.getValue(2, 0));\n\t\t\tv.setW(m.getValue(3, 0));\n\t\t}\n\t}", "public void setInvert (boolean invert) {\r\n\t\tthis.invert = invert;\r\n\t}", "public InvertedIndex() {\n\t\tthis.invertedIndex = new TreeMap<>();\n\t\tthis.counts = new TreeMap<>();\n\t}", "protected AbstractMatrix3D vRowFlip() {\n\tif (rows>0) {\n\t\trowZero += (rows-1)*rowStride;\n\t\trowStride = -rowStride;\n\t\tthis.isNoView = false;\n\t}\n\treturn this;\n}", "public void normaliseVertexColors()\r\n\t{\r\n\t for(int i=0; i<3; i++)\r\n vertices[i].normaliseVertexColor();\r\n\t}", "public void setInverted(boolean invert) {\r\n inverted = invert;\r\n }", "public static Shader invert( Shader shader ) {\n return new InvertedShader( shader );\n }", "public RMTransform getTransformInverse() { return getTransform().invert(); }", "private void defineVertexes(String orientation){\n if(\"down\".equals(orientation)){\n y2 = y1-height;\n y3 = y1-height;\n \n x2 = x1 - height/2;\n x3 = x1 + height/2;\n }else if(orientation.equals(\"up\")){\n y2 = y1+height;\n y3 = y1+height;\n x2 = x1 - height/2;\n x3 = x1 + height/2;\n }else if(orientation.equals(\"left\")){\n x2 = x1-height;\n y2 = y1+height/2;\n x3 = x1;\n y3 = y1+height;\n }else if(orientation.equals(\"right\")){\n x2 = x1+height;\n y2 = y1+height/2;\n x3 = x1;\n y3 = y1+height;\n }\n }", "public void rotateY90() {\n\t\tfor (int v = 0; v < vertexCount; v++) {\n\t\t\tint x_ = vertexX[v];\n\t\t\tvertexX[v] = vertexZ[v];\n\t\t\tvertexZ[v] = -x_;\n\t\t}\n\t}", "public void invert(boolean direction){\n intake.setInverted(direction);\n }", "public void setInverted(boolean inv) {\n/* 69 */ int dat = getData() & 0x7;\n/* 70 */ if (inv) {\n/* 71 */ dat |= 0x8;\n/* */ }\n/* 73 */ setData((byte)dat);\n/* */ }", "Matrix InverseT()\n {\n Matrix ad = new Matrix( y.cross(z), z.cross(x), x.cross(y) );\n float inv_det = 1.0f / ( x.dot( ad.x ) );\n ad.timesEqual( inv_det );\n return ad;\n }", "private void rotate() {\n byte tmp = topEdge;\n topEdge = leftEdge;\n leftEdge = botEdge;\n botEdge = rightEdge;\n rightEdge = tmp;\n tmp = reversedTopEdge;\n reversedTopEdge = reversedLeftEdge;\n reversedLeftEdge = reversedBotEdge;\n reversedBotEdge = reversedRightEdge;\n reversedRightEdge = tmp;\n tmp = ltCorner;\n ltCorner = lbCorner;\n lbCorner = rbCorner;\n rbCorner = rtCorner;\n rtCorner = tmp;\n\n }", "public void ensureInverted() {\r\n\t\tif (textureHeight > 0) {\r\n\t\t\ttextureY = textureY + textureHeight;\r\n\t\t\ttextureHeight = -textureHeight;\r\n\t\t}\r\n\t}", "public AffineTransform3D getInverse()\r\n\t\t\tthrows NoninvertibleTransform3DException {\r\n\t\tAffineTransform3D inverseMat = new AffineTransform3D();\r\n\t\tdouble Det = getDeterminant();\r\n\r\n\t\tif (Det == 0) {\r\n\t\t\tthrow new NoninvertibleTransform3DException();\r\n\t\t}\r\n\t\tAffineTransform3D rv = new AffineTransform3D();\r\n\t\trv.M11 = (M23 * M34 * M42) - (M24 * M33 * M42) + (M24 * M32 * M43)\r\n\t\t\t\t- (M22 * M34 * M43) - (M23 * M32 * M44) + (M22 * M33 * M44);\r\n\t\trv.M12 = (M14 * M33 * M42) - (M13 * M34 * M42) - (M14 * M32 * M43)\r\n\t\t\t\t+ (M12 * M34 * M43) + (M13 * M32 * M44) - (M12 * M33 * M44);\r\n\t\trv.M13 = (M13 * M24 * M42) - (M14 * M23 * M42) + (M14 * M22 * M43)\r\n\t\t\t\t- (M12 * M24 * M43) - (M13 * M22 * M44) + (M12 * M23 * M44);\r\n\t\trv.M14 = (M14 * M23 * M32) - (M13 * M24 * M32) - (M14 * M22 * M33)\r\n\t\t\t\t+ (M12 * M24 * M33) + (M13 * M22 * M34) - (M12 * M23 * M34);\r\n\t\trv.M21 = (M24 * M33 * M41) - (M23 * M34 * M41) - (M24 * M31 * M43)\r\n\t\t\t\t+ (M21 * M34 * M43) + (M23 * M31 * M44) - (M21 * M33 * M44);\r\n\t\trv.M22 = (M13 * M34 * M41) - (M14 * M33 * M41) + (M14 * M31 * M43)\r\n\t\t\t\t- (M11 * M34 * M43) - (M13 * M31 * M44) + (M11 * M33 * M44);\r\n\t\trv.M23 = (M14 * M23 * M41) - (M13 * M24 * M41) - (M14 * M21 * M43)\r\n\t\t\t\t+ (M11 * M24 * M43) + (M13 * M21 * M44) - (M11 * M23 * M44);\r\n\t\trv.M24 = (M13 * M24 * M31) - (M14 * M23 * M31) + (M14 * M21 * M33)\r\n\t\t\t\t- (M11 * M24 * M33) - (M13 * M21 * M34) + (M11 * M23 * M34);\r\n\t\trv.M31 = (M22 * M34 * M41) - (M24 * M32 * M41) + (M24 * M31 * M42)\r\n\t\t\t\t- (M21 * M34 * M42) - (M22 * M31 * M44) + (M21 * M32 * M44);\r\n\t\trv.M32 = (M14 * M32 * M41) - (M12 * M34 * M41) - (M14 * M31 * M42)\r\n\t\t\t\t+ (M11 * M34 * M42) + (M12 * M31 * M44) - (M11 * M32 * M44);\r\n\t\trv.M33 = (M12 * M24 * M41) - (M14 * M22 * M41) + (M14 * M21 * M42)\r\n\t\t\t\t- (M11 * M24 * M42) - (M12 * M21 * M44) + (M11 * M22 * M44);\r\n\t\trv.M34 = (M14 * M22 * M31) - (M12 * M24 * M31) - (M14 * M21 * M32)\r\n\t\t\t\t+ (M11 * M24 * M32) + (M12 * M21 * M34) - (M11 * M22 * M34);\r\n\t\trv.M41 = (M23 * M32 * M41) - (M22 * M33 * M41) - (M23 * M31 * M42)\r\n\t\t\t\t+ (M21 * M33 * M42) + (M22 * M31 * M43) - (M21 * M32 * M43);\r\n\t\trv.M42 = (M12 * M33 * M41) - (M13 * M32 * M41) + (M13 * M31 * M42)\r\n\t\t\t\t- (M11 * M33 * M42) - (M12 * M31 * M43) + (M11 * M32 * M43);\r\n\t\trv.M43 = (M13 * M22 * M41) - (M12 * M23 * M41) - (M13 * M21 * M42)\r\n\t\t\t\t+ (M11 * M23 * M42) + (M12 * M21 * M43) - (M11 * M22 * M43);\r\n\t\trv.M44 = (M12 * M23 * M31) - (M13 * M22 * M31) + (M13 * M21 * M32)\r\n\t\t\t\t- (M11 * M23 * M32) - (M12 * M21 * M33) + (M11 * M22 * M33);\r\n\r\n\t\tDet = (1 / getDeterminant());\r\n\t\tinverseMat = ScalarMult(new AffineTransform3D(), Det); // MatrixScaling4(VectorInput(Det,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Det, Det),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Det)\r\n\t\trv = MatrixMult(rv, inverseMat);\r\n\t\treturn rv;\r\n\t}", "public Vertex toVertex() {\n return new Vertex(\n getX(),\n getY(),\n getZ()\n );\n }", "public static Transform inverse(Transform t) {\n\t\tfloat inv_det = 1.0f / (t.a * t.d - t.c * t.b);\n\t\treturn transpose(t.d * inv_det, -t.c * inv_det, (t.c * t.ty - t.tx * t.d) * inv_det, -t.b * inv_det,\n\t\t\t\t\t\t t.a * inv_det, (t.tx * t.b - t.a * t.ty) * inv_det);\n\t}", "@Override\n public void clearVertices()\n {\n // Shouldn't clear vertices\n }", "private void normalizeOrientation() {\n\t\twhile (this.orientation >= 2 * Math.PI) {\n\t\t\torientation -= 2 * Math.PI;\n\t\t}\n\t\twhile (this.orientation < 0) {\n\t\t\torientation += 2 * Math.PI;\n\t\t}\n\t}", "public void flip() {\n float tx = x1;\n float ty = y1;\n x1 = x2;\n y1 = y2;\n x2 = tx;\n y2 = ty;\n nx = -nx;\n ny = -ny;\n }", "public CVertex oppositeVertex(CEdge e){\n\t\tif(!e.containsPoint(p1)) \treturn (CVertex)p1;\n\t\tif(!e.containsPoint(p2)) \treturn (CVertex)p2;\n\t\telse\t\t\t\t\t\treturn (CVertex)p3;\n\t}", "public Matrix inverse(){\r\n \tint n = this.nrow;\r\n \tif(n!=this.ncol)throw new IllegalArgumentException(\"Matrix is not square\");\r\n \tdouble[] col = new double[n];\r\n \tdouble[] xvec = new double[n];\r\n \tMatrix invmat = new Matrix(n, n);\r\n \tdouble[][] invarray = invmat.getArrayReference();\r\n \tMatrix ludmat;\r\n\r\n\t \tludmat = this.luDecomp();\r\n \tfor(int j=0; j<n; j++){\r\n \t\tfor(int i=0; i<n; i++)col[i]=0.0D;\r\n \t\tcol[j]=1.0;\r\n \t\txvec=ludmat.luBackSub(col);\r\n \t\tfor(int i=0; i<n; i++)invarray[i][j]=xvec[i];\r\n \t}\r\n \t\treturn invmat;\r\n \t}", "@Override\n\tpublic String toString() {\n\t\treturn \"(Triangle \"+verts+\")\" ;\n\t}", "public static void invert(int[] a) {\r\n\t\tint n = a.length;\r\n\t\tint j = n - 1;\r\n\t\tfor (int i = 0; i < j; i++) {\r\n\t\t\tint tmp = a[i];\r\n\t\t\ta[i] = a[j];\r\n\t\t\ta[j] = tmp;\r\n\t\t\tj--;\r\n\t\t}\r\n\t}", "public Matrix inverse() {\n\t\tMatrix a = copy();\n\t\tif (a.M != a.N) {\n\t\t\tthrow new RuntimeException(\"This matrix is not square!\");\n\t\t}\n\t\tMatrix i = identity(a.N);\n\t\tMatrix ai = a.augment(i);\n\t\tai = ai.specialrref();\n\t\tMatrix[] split = ai.split(a.N);\n\t\tif (split[0].equals(i)) {\n\t\t\treturn split[1];\n\t\t} else {\n\t\t\tthrow new RuntimeException(\"This matrix is not invertible!\");\n\t\t}\n\t}", "public void flipVertical() {\n\t\t\tthis.data = flipGridVertical(data);\n\t\t\tcomputeHashes();\n\t\t}", "public Direction invertAll(){\n switch(this){\n case STAY:\n return STAY;\n case SPIN_BACK:\n return SPIN_BACK;\n case FORWARD:\n return BACKWARD;\n case BACKWARD:\n return FORWARD;\n case SPIN_LEFT:\n return SPIN_RIGHT; \n case SPIN_RIGHT:\n return SPIN_LEFT;\n case ARC_LEFT:\n return ARC_RIGHT;\n case ARC_RIGHT:\n return ARC_LEFT; \n default:\n return this; \n }\n }", "void computeTriangleNormals();", "public static native void Inverse(long lpjFbxDualQuaternion);", "public void inverse(Projection projection);", "public boolean isInverted() {\n return this.inverted;\n }", "public void flipNormal() {\n int i, j;\n\n for (i = 0; i < nr_of_segments; i++) {\n for (j = 0; j < points_per_segment; j++) {\n points[i][j].z = -points[i][j].z;\n }\n }\n\n for (i = 0; i < (int) ((double) nr_of_segments / step); i++) {\n for (j = 0; j < (int) ((double) points_per_segment / step); j++) {\n evaluated_points[i][j].z = -evaluated_points[i][j].z;\n }\n }\n\n }", "public static Transform rigidInverse(Transform t) {\n\t\treturn transpose(t.d, -t.c, (t.c * t.ty - t.tx * t.d), -t.b, t.a, (t.tx * t.b - t.a * t.ty));\n\t}", "public void triangulate() {\n // Save the outline and calculate normals\n outline = new Vector<PlanarEdge>();\n for (PlanarEdge e : subdivision.getEdges()) {\n if (e.isRealEdge()) {\n outline.add(e);\n }\n }\n // Calculate outline normals\n outline_normals = new Vector3f[outline.size()];\n for (PlanarEdge e : outline) {\n TriangulationVertex vert = (TriangulationVertex) e.getDestination();\n // Normal 1\n Vector3f normal1 = new Vector3f(vert.getOutGoingEdge()\n .getDestination().getPoint())\n .subtractLocal(vert.getPoint()).normalizeLocal();\n // Vector3f normal1 = new\n // Vector3f(vert.getOutGoingEdge().getDestination().getPoint()).subtractLocal(vert.getPoint());\n normal1.z = -normal1.x;\n normal1.x = normal1.y;\n normal1.y = normal1.z;\n normal1.z = 0;\n // Normal 2\n Vector3f normal2 = new Vector3f(vert.getPoint()).subtractLocal(\n vert.getInGoingEdge().getOrigin().getPoint())\n .normalizeLocal();\n // Vector3f normal2 = new\n // Vector3f(vert.getPoint()).subtractLocal(vert.getInGoingEdge().getOrigin().getPoint());\n normal2.z = -normal2.x;\n normal2.x = normal2.y;\n normal2.y = normal2.z;\n normal2.z = 0;\n normal1.addLocal(normal2).normalizeLocal();\n\n outline_normals[vert.getIndex()] = normal1;\n }\n\n // Calculate the triangulation of the surface.\n surface = subdivision.triangulate();\n }", "public void setVertices(E3DTexturedVertex[] vertices) {\r\n\t\tthis.vertices = vertices;\r\n\t\tneedNormalRecalc = true;\r\n\t\tneedPlaneEquationRecalc = true;\r\n\r\n\t}", "public void setInvertChildren(boolean invertChildren) {\n\tthis.invertChildren = invertChildren;\n }", "public void invert() {\n \n for(T first : getFirstDimension()) {\n \n for(T second : getMatches(first)) {\n \n Double sim = get(first, second);\n \n if(sim!=null && sim > 0.0) {\n set(first, second, 1.0/sim);\n }\n \n }\n \n }\n }", "static void determineOrientation(Triangulator triRef, int ind) {\n\tdouble area;\n\n\t// compute the polygon's signed area, i.e., its orientation.\n\tarea = polygonArea(triRef, ind);\n\n\t// adjust the orientation (i.e., make it CCW)\n\tif (area < 0.0) {\n\t triRef.swapLinks(ind);\n\t triRef.ccwLoop = false;\n\t}\n\n }", "boolean ignoreExistingVertices();", "public Matrix inverse() throws JPARSECException {\n return solve(identity(m,m));\n }", "void rotateInv() {\n startAnimation(allSubCubes(), Axis.Y, Direction.ANTICLOCKWISE);\n rotateCubeSwap();\n rotateCubeSwap();\n rotateCubeSwap();\n }", "public ArrayList<Triangle> getOccluderVertexData();", "public HexDirection opposite() {\n return values()[(ordinal() + 3) % 6];\n }", "public static Direction inverse(Direction direction) {\n if (direction.isHorizontal()) {\n if (direction.equals(Direction.EAST))\n return Direction.WEST;\n else\n return Direction.EAST;\n } else {\n if (direction.equals(Direction.NORTH))\n return Direction.SOUTH;\n else\n return Direction.NORTH;\n }\n }", "public Direction invertTurns(){\n switch(this){\n case SPIN_BACK:\n return SPIN_BACK;\n case SPIN_LEFT:\n return SPIN_RIGHT; \n case SPIN_RIGHT:\n return SPIN_LEFT;\n case ARC_LEFT:\n return ARC_RIGHT;\n case ARC_RIGHT:\n return ARC_LEFT; \n default:\n return this; \n }\n }", "public void recalculateVertices() {\n\t\tfinal Image image = this.image.get();\n\t\tvertices[0].setSample(image.getWidth() * 1 / 2,\n\t\t image.getHeight() * 3 / 10,\n\t\t image.getWidth() / 10,\n\t\t image.getHeight() / 10,\n\t\t image.getWidth(), image.getHeight());\n\t\tvertices[1].setSample(image.getWidth() * 3 / 10,\n\t\t image.getHeight() * 7 / 10,\n\t\t image.getWidth() / 10,\n\t\t image.getHeight() / 10,\n\t\t image.getWidth(), image.getHeight());\n\t\tvertices[2].setSample(image.getWidth() * 7 / 10,\n\t\t image.getHeight() * 7 / 10,\n\t\t image.getWidth() / 10,\n\t\t image.getHeight() / 10,\n\t\t image.getWidth(), image.getHeight());\n\t}", "public Squarelotron inverseDiagonalFlip(int ring);", "private void processOrientation(Quaternion raw) {\r\n\t\tfloat t = 1.0f - (raw.x * raw.x) - (raw.y * raw.y) - (raw.z * raw.z);\r\n\t\tif (t < 0.0f) raw.w = 0.0f;\r\n\t\telse raw.w = -(FastMath.sqrt(t));\r\n\t}", "public abstract Vector4fc normalize3();", "public void setToIdentity() {\r\n\t\tthis.set(new AffineTransform3D());\r\n\t}", "Matrix inverse(Matrix m){\r\n Matrix mtemp = new Matrix(m.M);\r\n Matrix miden = new Matrix(m.rows,m.cols);\r\n miden = miden.identity();\r\n for(int i=0;i<mtemp.rows-1;i++){\r\n for(int j=i+1; j<mtemp.rows; j++){\r\n if(mtemp.M[i][i]<mtemp.M[j][i]){\r\n swapRow(mtemp,i,j);\r\n swapRow(miden,i,j);\r\n }\r\n }\r\n for(int k=i+1; k<mtemp.rows; k++){\r\n double ratio = mtemp.M[k][i]/mtemp.M[i][i];\r\n for(int j=0;j<mtemp.cols;j++){\r\n mtemp.M[k][j] -= ratio*mtemp.M[i][j];\r\n miden.M[k][j] -= ratio*miden.M[i][j];\r\n }\r\n\r\n }\r\n\r\n }\r\n for(int i=mtemp.rows-1;i>0;i--){\r\n for(int k=i-1; k>-1; k--){\r\n double ratio = mtemp.M[k][i]/mtemp.M[i][i];\r\n for(int j=mtemp.cols-1;j>-1;j--){\r\n mtemp.M[k][j] -= ratio*mtemp.M[i][j];\r\n miden.M[k][j] -= ratio*miden.M[i][j];\r\n }\r\n\r\n }\r\n\r\n }\r\n \r\n\r\n for(int i=0; i<mtemp.rows; i++){\r\n for(int j=0; j<mtemp.cols; j++){\r\n miden.M[i][j] /= mtemp.M[i][i];\r\n }\r\n }\r\n return miden;\r\n\r\n }", "public void flipIndexes() {\n int temp = index1;\n index1 = index2;\n index2 = temp;\n }", "<T> void inverse(final T[] array);", "public Vertex3D() {\n this(0.0, 0.0, 0.0);\n }", "public void setVertices(){\n\t\tvertices = new ArrayList<V>();\n\t\tfor (E e : edges){\n\t\t\tV v1 = e.getOrigin();\n\t\t\tV v2 = e.getDestination();\n\t\t\tif (!vertices.contains(v1))\n\t\t\t\tvertices.add(v1);\n\t\t\tif (!vertices.contains(v2))\n\t\t\t\tvertices.add(v2);\n\t\t}\n\t}", "public StreamEdge setInverted(boolean inverted) {\n\n this.inverted = inverted;\n\n return this;\n }", "public void compact() {\n\t\tint n = vertices.size();\n\t\t// ids utilizados de 1 a n\n\t\tint[] small = new int[n + 1];\n\t\tVertice[] big = new Vertice[n];\n\n\t\tint qbig = 0;\n\t\tfor (Vertice v1 : vertices.values()) {\n\t\t\tif (v1.id <= n)\n\t\t\t\tsmall[v1.id] = 1;\n\t\t\telse\n\t\t\t\tbig[qbig++] = v1;\n\t\t}\n\n\t\tint i = 1;\n\t\tfor (int pairs = 0; pairs < qbig; i++) {\n\t\t\tif (small[i] == 0)\n\t\t\t\tsmall[pairs++] = i;\n\t\t}\n\n\t\tfor (i = 0; i < qbig; i++) {\n\t\t\tint old_id = big[i].id;\n\t\t\tbig[i].id = small[i];\n\n\t\t\tvertices.remove(old_id);\n\t\t\tvertices.put(big[i].id, big[i]);\n\n\t\t\tfor (Vertice v1 : vertices.values()) {\n\t\t\t\tif (v1.vizinhos.get(old_id) != null) {\n\t\t\t\t\tv1.vizinhos.remove(old_id);\n\t\t\t\t\tv1.vizinhos.put(big[i].id, big[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "Vec3[] getInvRot()\n {\n Vec3[] pvRot = new Vec3[3];\n pvRot[0] = m.<Vec4>getColumn(0).getXYZ();\n pvRot[1] = m.<Vec4>getColumn(1).getXYZ();\n pvRot[2] = m.<Vec4>getColumn(2).getXYZ();\n return pvRot;\n }", "@NotNull\n private Coordinate flipV() {\n angle = -angle;\n Coordinate nextCenterPointCoordinate = new Coordinate(this.centerPointCoordinate.getXCoordinate(),\n this.centerPointCoordinate.getYCoordinate() + (Constants.BULLET_SPEED * Math.sin(Math.toRadians(90 - angle))));\n return nextCenterPointCoordinate;\n }", "public void removeVertex();", "protected AbstractMatrix3D vSliceFlip() {\n\tif (slices>0) {\n\t\tsliceZero += (slices-1)*sliceStride;\n\t\tsliceStride = -sliceStride;\n\t\tthis.isNoView = false;\n\t}\n\treturn this;\n}", "public Matrix inverse() {\n int n = L.getNrows();\n Matrix inv = Matrix.identity(n);\n solve(inv);\n return inv;\n }", "public DirectedGraph getTranspose() {\n\t\tDirectedGraph newGraph = new DirectedGraph(V);\n\t\tfor (int v = 0; v < V; v++) {\n\t\t\t// Recur for all the vertices adjacent to this vertex\n\t\t\tIterator<Integer> i = this.getAdjacents(v).iterator();\n\t\t\twhile (i.hasNext())\n\t\t\t\tnewGraph.adj[i.next()].add(v);\n\n\t\t}\n\t\treturn newGraph;\n\t}", "public Rect flip(boolean vert, boolean hor) {\n\t\tif(!vert && !hor) return this;\n\t\tRect ret;\n\t\tif(vert && hor) {\n\t\t\tret = new Rect(new Vertex(v2.x,v2.y),new Vertex(v1.x,v1.y));\n\t\t} else if(vert) {\n\t\t\tret = new Rect(new Vertex(v2.x,v1.y),new Vertex(v1.x,v2.y));\n\t\t} else {\n\t\t\tret = new Rect(new Vertex(v1.x,v2.y),new Vertex(v2.x,v1.y));\n\t\t}\n\t\treturn ret;\n\t}", "default void negate()\n {\n getAxis().negate();\n setAngle(-getAngle());\n }", "public static final Vector3f generateFaceNormal(Vector3f vert1, Vector3f vert2, Vector3f vert3) {\r\n\t\t\r\n\t\tVector3f v1 = new Vector3f(vert2);\r\n\t\tv1.sub(vert1);\r\n\t\t\r\n\t\tVector3f v2 = new Vector3f(vert3);\r\n\t\tv2.sub(vert1);\r\n\t\tv2.cross(v2, v1);\r\n\t\tv2.normalize();\r\n\t\t\r\n\t\treturn v2;\r\n\t}", "private void setVertices(Vertex[] vs){\n\t\t\n\t\tvertices = new ArrayList<>();\n\t\toriginalVertices = new ArrayList<>();\n\t\tdouble scalar = ViewSettings.getScalar4();\n\n\t\tfor(Vertex v : vs){\n\t\t\tvertices.add(new Vertex(v.getX() * scalar, v.getY() * scalar, v.getZ() * scalar, v.getW() * scalar));\n\t\t\toriginalVertices.add(new Vertex(v.getX(), v.getY(), v.getZ(), v.getW()));\n\t\t}\n\t}", "public Vector3 negateLocal () {\n return negate(this);\n }", "@Override\n\tpublic void setOrientation(Vector3 orient) {\n\n\t}", "void reverseDirection();", "@Override\n\tpublic void setOrientation(Vector o)\n\t{\n\t\tsuper.setOrientation(o);\n\t\tif (position != null && normal != null)\n\t\t{\n\t\t\toX = o.dup().norm();\n\t\t\toY = normal.cross(oX).norm();\n\t\t\toX = oY.cross(normal).norm();\n\t\t}\n\t}", "public Triangle (int tipX, int tipY, int height, String orientation){\n super.points = new ArrayList();\n x1 = tipX;\n y1 = tipY;\n this.height = height;\n defineVertexes(orientation);\n definePoints();\n }", "public Fp12_2Over3Over2 inverse() {\n final Fp6_3Over2 t0 = c0.square();\n final Fp6_3Over2 t1 = c1.square();\n final Fp6_3Over2 t2 = t0.sub(mulByNonResidue(t1));\n final Fp6_3Over2 t3 = t2.inverse();\n\n return new Fp12_2Over3Over2(c0.mul(t3), c1.mul(t3).negate(), Fp12Parameters);\n }", "public void convertInTriangles(final @NotNull Vertex... polygon)\n {\n if ((polygon == null) || (polygon.length < 3))\n {\n return;\n }\n\n final int length = polygon.length;\n final Vertex first = polygon[0];\n\n for (int i = 2; i < length; i++)\n {\n this.triangles.add(new Triangle(first, polygon[i - 1], polygon[i]));\n }\n }", "private void makeInverse() {\n if (_map != null) {\n for (Map.Entry<Integer, Integer> e : _map.entrySet()) {\n _inverse.put(e.getValue(), e.getKey());\n }\n }\n }", "public void invertFastEqual()\r\n\t{\r\n\t\tE3DMatrix4x4F scratchMatrix = new E3DMatrix4x4F();\r\n\t\t\r\n//\t\tscratchMatrix.matrix4x4[0][0] = scratchMatrix.matrix4x4[]\r\n\t\tscratchMatrix.matrix4x4[0][1] = matrix4x4[1][0];\r\n\t\tscratchMatrix.matrix4x4[0][2] = matrix4x4[2][0];\r\n\t\tscratchMatrix.matrix4x4[1][0] = matrix4x4[0][1];\r\n//\t\tscratchMatrix.matrix4x4[1][1] = \r\n\t\tscratchMatrix.matrix4x4[1][2] = matrix4x4[2][1];\r\n\t\tscratchMatrix.matrix4x4[2][0] = matrix4x4[0][2];\r\n\t\tscratchMatrix.matrix4x4[2][1] = matrix4x4[1][2];\r\n//\t\tscratchMatrix.matrix4x4[2][2] =\r\n\t\t\r\n\t\tmatrix4x4[0][1] = scratchMatrix.matrix4x4[0][1];\r\n\t\tmatrix4x4[0][2] = scratchMatrix.matrix4x4[0][2];\r\n\t\tmatrix4x4[1][0] = scratchMatrix.matrix4x4[1][0];\r\n\t\tmatrix4x4[1][2] = scratchMatrix.matrix4x4[1][2];\r\n\t\tmatrix4x4[2][0] = scratchMatrix.matrix4x4[2][0];\r\n\t\tmatrix4x4[2][1] = scratchMatrix.matrix4x4[2][1];\r\n\t}", "public Vector[] getVerts() {\n\t\treturn this.verts;\n\t}" ]
[ "0.670248", "0.621566", "0.6076324", "0.5999977", "0.5867311", "0.5787099", "0.5762671", "0.57492447", "0.57111675", "0.56483334", "0.56348616", "0.56269413", "0.5563083", "0.55394095", "0.5463566", "0.5421687", "0.54070354", "0.5358619", "0.53129905", "0.52652276", "0.5261856", "0.5208169", "0.5205295", "0.52032655", "0.5189626", "0.5175776", "0.5162231", "0.51286644", "0.5113073", "0.51129436", "0.505648", "0.5053457", "0.5050241", "0.50017816", "0.4971529", "0.4966063", "0.49650466", "0.49580634", "0.4938338", "0.49340266", "0.49171424", "0.48557392", "0.48526517", "0.4850158", "0.48496622", "0.48482737", "0.48139188", "0.4811674", "0.48077962", "0.47926047", "0.47888747", "0.4780104", "0.47648063", "0.47638702", "0.4760733", "0.47533756", "0.47511944", "0.47353333", "0.4731319", "0.47197947", "0.4690232", "0.46810496", "0.4673956", "0.46455672", "0.46294853", "0.46170306", "0.46164554", "0.4599837", "0.45959234", "0.45914596", "0.45887157", "0.45875055", "0.4584722", "0.45785484", "0.4573667", "0.45704097", "0.45634896", "0.45626992", "0.45558655", "0.45490995", "0.45476854", "0.45454645", "0.45433068", "0.45419088", "0.4535853", "0.45357847", "0.45329896", "0.4532415", "0.45202893", "0.45128393", "0.44970816", "0.4489829", "0.4489679", "0.4487846", "0.44848815", "0.44844148", "0.44826558", "0.44813412", "0.4472133", "0.44690678" ]
0.82304907
0
Generates the default game map
@Override protected void generateMap() { //read map from tmx map = null; final String tmx = "res/tiles/map.tmx"; try { TMXMapReader mapReader = new TMXMapReader(); map = mapReader.readMap(tmx); } catch(Exception e) { e.printStackTrace(); } TileLayer layer = (TileLayer)map.getLayer(0); tiles = new PropertyTile[layer.getWidth()][layer.getHeight()]; for(int x=0; x<layer.getWidth(); x++) { for(int y=0; y<layer.getHeight(); y++) { Tile tile = layer.getTileAt(x, y); String type = (String)tile.getProperties().get("type"); tiles[x][y] = new PropertyTile(tile, TileType.valueOf(type.toUpperCase())); tiles[x][y].setImage(tile.getImage()); } } //generate animated tiles from river tileset TileSet riverset = map.getTileSets().get(1); List<AnimatedTile> animatedTiles = new ArrayList<>(); for(int i=0; i<5; i++) { Tile[] frames = new Tile[3]; Iterator<Tile> iterator = riverset.iterator(); while(iterator.hasNext()) { Tile tile = iterator.next(); int rtile = Integer.parseInt(tile.getProperties().getProperty("tile")); int frame = Integer.parseInt(tile.getProperties().getProperty("frame")); if(rtile == i+1) { frames[frame-1] = tile; } } AnimatedTile aTile = new AnimatedTile(frames); animatedTiles.add(aTile); } //replace tiles in map with animated tiles // for(int x=0; x<layer.getWidth(); x++) { // for(int y=0; y<layer.getHeight(); y++) { // Tile tile = layer.getTileAt(x, y); // if(tile.getProperties().containsKey("animated")) { // int rtile = Integer.parseInt(tile.getProperties().getProperty("tile")); // layer.setTileAt(x, y, animatedTiles.get(rtile-1)); // } // } // } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void generate()\r\n {\r\n mapPieces = myMap.Generate3();\r\n mapWidth = myMap.getMapWidth();\r\n mapHeight = myMap.getMapHeight();\r\n }", "private void createMaps() {\r\n\t\tint SIZE = 100;\r\n\t\tint x = 0, y = -1;\r\n\t\tfor (int i = 0; i < SIZE; i++) {\r\n\t\t\tif (i % 10 == 0) {\r\n\t\t\t\tx = 0;\r\n\t\t\t\ty = y + 1;\r\n\t\t\t}\r\n\t\t\tshipStateMap.put(new Point(x, y), 0);\r\n\t\t\tshipTypeMap.put(new Point(x, y), 0);\r\n\t\t\tx++;\r\n\t\t}\r\n\t}", "private void generateMap() {\n\n\t\t//Used to ensure unique locations of each Gameboard element\n\t\tboolean[][] spaceUsed = new boolean[12][12];\n\n\t\t//A running total of fences generated\n\t\tint fencesGenerated = 0;\n\n\t\t//A running total of Mhos generated\n\t\tint mhosGenerated = 0;\n\n\t\t//Fill the board with spaces and spikes on the edge\n\t\tfor (int i = 0; i < 12; i++) {\n\t\t\tfor (int j = 0; j < 12; j++) {\n\t\t\t\tmap[i][j] = new BlankSpace(i, j, board);\n\t\t\t\tif (i == 0 || i == 11 || j ==0 || j == 11) {\n\t\t\t\t\tmap[i][j] = new Fence(i, j, board);\n\t\t\t\t\tspaceUsed[i][j] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//Generate 20 spikes in unique locations\n\t\twhile (fencesGenerated < 20) {\n\t\t\tint x = 1+(int)(Math.random()*10);\n\t\t\tint y = 1+(int)(Math.random()*10);\n\n\t\t\tif(spaceUsed[x][y]==false) {\n\t\t\t\tmap[x][y] = new Fence(x, y, board);\n\t\t\t\tspaceUsed[x][y] = true;\n\t\t\t\tfencesGenerated++;\n\t\t\t}\n\t\t}\n\n\t\t//Generate 12 mhos in unique locations\n\t\twhile (mhosGenerated < 12) {\n\t\t\tint x = 1+(int)(Math.random()*10);\n\t\t\tint y = 1+(int)(Math.random()*10);\n\n\t\t\tif(spaceUsed[x][y]==false) {\n\t\t\t\tmap[x][y] = new Mho(x, y, board);\n\n\t\t\t\tmhoLocations.add(x);\n\t\t\t\tmhoLocations.add(y);\n\n\t\t\t\tspaceUsed[x][y] = true;\n\n\t\t\t\tmhosGenerated++;\n\t\t\t}\n\t\t}\n\n\t\t//Generate a player in a unique location\n\t\twhile (true) {\n\t\t\tint x = 1+(int)(Math.random()*10);\n\t\t\tint y = 1+(int)(Math.random()*10);\n\n\t\t\tif(spaceUsed[x][y]==false) {\n\t\t\t\tmap[x][y] = new Player(x, y, board);\n\t\t\t\tplayerLocation[0] = x;\n\t\t\t\tplayerLocation[1] = y;\n\t\t\t\tnewPlayerLocation[0] = x;\n\t\t\t\tnewPlayerLocation[1] = y;\n\t\t\t\tspaceUsed[x][y] = true;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}", "public void generateRandomMap() {\n\n\t}", "public abstract void createMap(Game game) throws FreeColException;", "public abstract void createMap(Game game) throws FreeColException;", "public void createMap() {\n\t\tArrayList<String>boardMap = new ArrayList<String>(); //boardmap on tiedostosta ladattu maailman malli\n\t\t\n\t\t//2. try catch blocki, ei jaksa laittaa metodeja heittämään poikkeuksia\n\t\ttry {\n\t\t\tboardMap = loadMap(); //ladataan data boardMap muuttujaan tiedostosta\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\t\t\n\t\t\n\t\t// 3. j=rivit, i=merkit yksittäisellä rivillä\n\t\tfor(int j=0; j<boardMap.size();j++){ \t\t//..rivien lkm (boardMap.size) = alkioiden lkm. \n\t\t\tfor(int i=0; i<boardMap.get(j).length(); i++){\t\t//..merkkien lkm rivillä (alkion Stringin pituus .length)\n\t\t\t\tCharacter hexType = boardMap.get(j).charAt(i);\t//tuodaan tietyltä riviltä, yksittäinen MERKKI hexType -muuttujaan\n\t\t\t\tworld.add(new Hex(i, j, hexType.toString()));\t//Luodaan uusi HEXa maailmaan, Character -merkki muutetaan Stringiksi että Hex konstructori hyväksyy sen.\n\t\t\t}\n\t\t}\n\t\tconvertEmptyHex();\n\t}", "private void setupDefaultTerrainMap() {\n defaultTerrainKindMap.put(getHashCodeofPair(-7,1), TerrainKind.SMALL_FISHERY);\n defaultTerrainKindMap.put(getHashCodeofPair(7,1), TerrainKind.SMALL_FISHERY);\n defaultTerrainKindMap.put(getHashCodeofPair(-7,-1), TerrainKind.SMALL_FISHERY);\n defaultTerrainKindMap.put(getHashCodeofPair(7,-1), TerrainKind.SMALL_FISHERY);\n defaultTerrainKindMap.put(getHashCodeofPair(0,4), TerrainKind.SMALL_FISHERY);\n defaultTerrainKindMap.put(getHashCodeofPair(2,4), TerrainKind.SMALL_FISHERY);\n\n defaultTerrainKindMap.put(getHashCodeofPair(0,-2), TerrainKind.BIG_FISHERY);\n defaultTerrainKindMap.put(getHashCodeofPair(-3,-3), TerrainKind.FIELDS);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(1,-3), TerrainKind.HILLS);\n \t \tdefaultTerrainKindMap.put(getHashCodeofPair(3,-3), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-4,-2), TerrainKind.FOREST);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-2,-2), TerrainKind.MOUNTAINS);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-1,-3), TerrainKind.PASTURE);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(2,-2), TerrainKind.PASTURE);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(4,-2), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-5,-1), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-3,-1), TerrainKind.HILLS);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-1,-1), TerrainKind.PASTURE);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(1,-1), TerrainKind.MOUNTAINS);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(3,-1), TerrainKind.FIELDS);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(5,-1), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-6,0), TerrainKind.HILLS);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-4,0), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-2,0), TerrainKind.FOREST);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(0,0), TerrainKind.FOREST);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(2,0), TerrainKind.PASTURE);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(4,0), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(6,0), TerrainKind.HILLS);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-5,1), TerrainKind.MOUNTAINS);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-3,1), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-1,1), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(1,1), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(3,1), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(5,1), TerrainKind.GOLDFIELD);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-4,2), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-2,2), TerrainKind.GOLDFIELD);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(0,2), TerrainKind.FIELDS);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(2,2), TerrainKind.PASTURE);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(4,2), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-3,3), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-1,3), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(1,3), TerrainKind.MOUNTAINS);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(3,3), TerrainKind.SEA);\n\t}", "protected void createMaps() {\n\t\tBlueSchellingCell bCell = new BlueSchellingCell();\n\t\tOrangeSchellingCell oCell = new OrangeSchellingCell();\n\t\tEmptyCell eCell = new EmptyCell();\n\t\tTreeCell tCell = new TreeCell();\n\t\tBurningTreeCell bTCell = new BurningTreeCell();\n\t\tEmptyLandCell eLCell = new EmptyLandCell();\n\n\t\tLiveCell lCell = new LiveCell();\n\t\tDeadCell dCell = new DeadCell();\n\t\tGreenRPSCell gcell = new GreenRPSCell();\n\t\tRedRPSCell rcell = new RedRPSCell();\n\t\tBlueRPSCell blcell = new BlueRPSCell();\n\t\tWhiteRPSCell wcell = new WhiteRPSCell();\n\n\t\tFishCell fCell = new FishCell();\n\t\tSharkCell sCell = new SharkCell();\n\n\t\tAntGroupCell aCell = new AntGroupCell();\n\n\t\tsegregation.put('b', bCell);\n\t\tsegregation.put('o', oCell);\n\t\tsegregation.put('e', eCell);\n\n\t\tgameOfLife.put('l', lCell);\n\t\tgameOfLife.put('d', dCell);\n\n\t\trps.put('g', gcell);\n\t\trps.put('r', rcell);\n\t\trps.put('b', blcell);\n\t\trps.put('w', wcell);\n\n\t\tspreadingWildfire.put('t', tCell);\n\t\tspreadingWildfire.put('b', bTCell);\n\t\tspreadingWildfire.put('e', eLCell);\n\n\t\twaTor.put('f', fCell);\n\t\twaTor.put('s', sCell);\n\t\twaTor.put('e', eCell);\n\n\t\tforagingAnts.put('a', aCell);\n\t\tforagingAnts.put('e', eCell);\n\t\tinitExportMap();\n\n\t\tinitCountMap();\n\t}", "public void createWorldMap() {\r\n\t\tdo {\r\n\t\t\t//\t\t@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Recursive map generation method over here@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r\n\t\t\t//Generation loop 1 *ADDS VEIN STARTS AND GRASS*\r\n\r\n\t\t\tfor (int i = 0; i < tileMap.length; i++) {\r\n\t\t\t\tfor (int j = 0; j < tileMap[i].length; j++) {\r\n\r\n\t\t\t\t\tif (Math.random()*10000>9999) { //randomly spawn a conore vein start\r\n\t\t\t\t\t\ttileMap[i][j] = new ConoreTile (conore, true);\r\n\t\t\t\t\t\tconoreCount++;\r\n\t\t\t\t\t}else if (Math.random()*10000>9999){\r\n\t\t\t\t\t\ttileMap[i][j] = new KannaiteTile(kanna, true);\r\n\t\t\t\t\t\tkannaiteCount++;\r\n\t\t\t\t\t}else if(Math.random()*10000>9999){\r\n\t\t\t\t\t\ttileMap[i][j] = new FuelTile(fuel, true);\r\n\t\t\t\t\t\tfuelCount++;\r\n\t\t\t\t\t}else if(Math.random()*10000>9999) {\r\n\t\t\t\t\t\ttileMap[i][j] = new ForestTile(forest, true);\r\n\t\t\t\t\t\tforestCount++;\r\n\t\t\t\t\t}else if(Math.random()*10000>9999){\r\n\t\t\t\t\t\ttileMap[i][j] = new OilTile(oil,true);\r\n\t\t\t\t\t}else if(Math.random()*10000>9997) {\r\n\t\t\t\t\t\ttileMap[i][j] = new MountainTile(mountain, true);\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\ttileMap[i][j] = new GrassTile(dirt);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} // End for loop \r\n\t\t\t} // End for loop\r\n\t\t\t//End generation loop 1\r\n\r\n\t\t\t//Generation loop 2 *EXPANDS ON THE VEINS*\r\n\t\t\tdo {\r\n\t\t\t\tif (conoreCount<6) {\r\n\t\t\t\t\ttileMap[(int)Math.random()*200][(int)Math.random()*200] = new ConoreTile (conore,true);\r\n\t\t\t\t\tconoreCount++;\r\n\t\t\t\t}else {\r\n\t\t\t\t\tconorePass = true;\r\n\t\t\t\t}\r\n\t\t\t\tif (kannaiteCount<6) {\r\n\t\t\t\t\ttileMap[(int)Math.random()*200][(int)Math.random()*200] = new KannaiteTile (kanna,true);\r\n\t\t\t\t\tkannaiteCount++;\r\n\t\t\t\t}else {\r\n\t\t\t\t\tkannaitePass = true;\r\n\t\t\t\t}\r\n\t\t\t\tif (fuelCount<6) {\r\n\t\t\t\t\ttileMap[(int)Math.random()*200][(int)Math.random()*200] = new FuelTile (fuel,true);\r\n\t\t\t\t\tfuelCount++;\r\n\t\t\t\t}else {\r\n\t\t\t\t\tfuelPass = true;\r\n\t\t\t\t}\r\n\t\t\t\tif (forestCount<6) {\r\n\t\t\t\t\ttileMap[(int)Math.random()*200][(int)Math.random()*200] = new ForestTile (forest,true);\r\n\t\t\t\t\tforestCount++;\r\n\t\t\t\t}else {\r\n\t\t\t\t\tforestPass = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tSystem.out.println(\"Conore: \" + conoreCount + \" - \" + conorePass);\r\n\t\t\t\tSystem.out.println(\"Kannaite: \" + kannaiteCount + \" - \" + kannaitePass);\r\n\t\t\t\tSystem.out.println(\"Fuel: \" + fuelCount + \" - \" + fuelPass);\r\n\t\t\t\tSystem.out.println(\"Forest: \" + forestCount + \" - \" + forestPass);\r\n\t\t\t\tSystem.out.println(\"\");\r\n\t\t\t}while(!conorePass || !kannaitePass || !fuelPass || !forestPass);\r\n\r\n\t\t\tfor (int i = 0; i < tileMap.length; i++) {\r\n\t\t\t\tfor (int j = 0; j < tileMap[i].length; j++) {\r\n\t\t\t\t\tbuildConore(i,j);\r\n\t\t\t\t\tbuildKannaite(i,j);\r\n\t\t\t\t\tbuildFuel(i,j);\r\n\t\t\t\t\tbuildForest(i,j);\r\n\t\t\t\t}//End of for loop\r\n\t\t\t}//End of for loop\r\n\t\t\t//End of generation loop 2\r\n\r\n\t\t\t//Generation loop 3 *COUNT ORES*\r\n\t\t\tint loop3Count = 0;\r\n\t\t\tconorePass = false;\r\n\t\t\tkannaitePass = false;\r\n\t\t\tfuelPass = false;\r\n\t\t\tforestPass = false;\r\n\t\t\tdo {\r\n\t\t\t\tconoreCount = 0;\r\n\t\t\t\tkannaiteCount = 0;\r\n\t\t\t\tfuelCount = 0;\r\n\t\t\t\tforestCount = 0;\r\n\t\t\t\tfor (int i = 0; i < tileMap.length; i++) {\r\n\t\t\t\t\tfor (int j = 0; j < tileMap[i].length; j++) {\r\n\t\t\t\t\t\tif (tileMap[i][j] instanceof ConoreTile) {\r\n\t\t\t\t\t\t\tconoreCount++;\r\n\t\t\t\t\t\t}else if(tileMap[i][j] instanceof KannaiteTile) {\r\n\t\t\t\t\t\t\tkannaiteCount++;\r\n\t\t\t\t\t\t}else if(tileMap[i][j] instanceof FuelTile) {\r\n\t\t\t\t\t\t\tfuelCount++;\r\n\t\t\t\t\t\t}else if(tileMap[i][j] instanceof ForestTile) {\r\n\t\t\t\t\t\t\tforestCount++;\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\tfor (int i = 0; i < tileMap.length; i++) {\r\n\t\t\t\t\tfor (int j = 0; j < tileMap[i].length; j++) {\r\n\t\t\t\t\t\tif (conoreCount < 220) {\r\n\t\t\t\t\t\t\tbuildConore(i,j);\r\n\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\tconorePass = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (kannaiteCount < 220) {\r\n\t\t\t\t\t\t\tbuildKannaite(i,j);\r\n\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\tkannaitePass = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (fuelCount< 220) {\r\n\t\t\t\t\t\t\tbuildFuel(i,j);\r\n\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\tfuelPass = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (forestCount < 220) {\r\n\t\t\t\t\t\t\tbuildForest(i,j);\r\n\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\tforestPass = true;\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\tSystem.out.println(\"Conore: \" + conoreCount + \" - \" + conorePass);\r\n\t\t\t\tSystem.out.println(\"Kannaite: \" + kannaiteCount + \" - \" + kannaitePass);\r\n\t\t\t\tSystem.out.println(\"Fuel: \" + fuelCount + \" - \" + fuelPass);\r\n\t\t\t\tSystem.out.println(\"Forest: \" + forestCount + \" - \" + forestPass);\r\n\t\t\t\tSystem.out.println(\"\");\r\n\t\t\t\tloop3Count++;\r\n\t\t\t\tif (loop3Count > 100) {\r\n\t\t\t\t\tSystem.out.println(\"map generation failed! restarting\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}while(!conorePass || !kannaitePass || !fuelPass || !forestPass);\r\n\t\t\t//END OF LOOP 3\r\n\r\n\t\t\t//LOOP 4: THE MOUNTAIN & OIL LOOP\r\n\t\t\tfor (int i = 0; i < tileMap.length; i++) {\r\n\t\t\t\tfor (int j = 0; j < tileMap[i].length; j++) {\r\n\t\t\t\t\tbuildMountain(i,j);\r\n\t\t\t\t\tbuildOil(i,j);\r\n\t\t\t\t}\r\n\t\t\t}//End of THE Mountain & OIL LOOP\r\n\r\n\t\t\t//ADD MINIMUM AMOUNT OF ORES\r\n\r\n\t\t\t//Generation Loop 5 *FINAL SETUP*\r\n\t\t\tfor (int i = 0; i < tileMap.length; i++) {\r\n\t\t\t\tfor (int j = 0; j < tileMap[i].length; j++) {\r\n\r\n\t\t\t\t\tif(i == 1 || j == 1 || i == tileMap.length-2 || j == tileMap[i].length-2) {\r\n\t\t\t\t\t\ttileMap[i][j] = new DesertTile(desert);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (i == 0 || j == 0 || i == tileMap.length-1 || j == tileMap[i].length-1) {\r\n\t\t\t\t\t\ttileMap[i][j] = new WaterTile(water);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}//End of for loop\r\n\t\t\t}//End of for loop\r\n\t\t\t//End of generation loop 5\r\n\t\t\t//mapToString();//TEST RUN\r\n\t\t} while(!conorePass || !kannaitePass || !fuelPass || !forestPass); // End createWorldMap method\r\n\t}", "public MapGen()//Collect images, create Platform list, create grassy array and generate a random integer as the map wideness\n\t{\n\t\tblocksWide= ThreadLocalRandom.current().nextInt(32, 64 + 1);\n\t\tclouds=kit.getImage(\"Resources/SkyBackground.jpg\");\n\t\tdirt=kit.getImage(\"Resources/Dirt.png\");\n\t\tgrass[0]=kit.getImage(\"Resources/Grass.png\");\n\t\tgrass[1]=kit.getImage(\"Resources/Grass1.png\");\n\t\tgrass[2]=kit.getImage(\"Resources/Grass2.png\");\n\t\tplatforms=new ArrayList<Platform>();\n\t\tgrassy=new int[blocksWide];\n\t\tgrassT=new int[blocksWide];\n\t\tgenerateTerrain();\n\t\t\n\t\t\n\t\t\n\t}", "public void defaultGame() {\n //CREATE A BOARD\n Board board = new Board(10, 10, 0);\n ArrayList<Boat> boats = createDefaultBoatArray();\n //CREATE A GAME\n GameData game = new GameData(board, boats, false);\n //POSITION BOATS\n randomPosBoats(game);\n\n //!!tile matrix is empty\n Game.getInstance().setGameData(game);\n Game.getInstance().setEnded(false);\n }", "@Override\n\tpublic void init() {\n\t\tworld = new World(gsm);\n\t\tworld.init();\n\t\t\n\t\tif(worldName == null){\n\t\t\tworldName = \"null\";\n\t\t\tmap_name = \"map\";\n\t\t} \n\t\tworld.generate(map_name);\n\t}", "private void generateMap(){\n int[] blockStepX = {X_STEP, 0, -X_STEP, -X_STEP, 0, X_STEP};\n int[] blockStepY = {Y_STEP_ONE, Y_STEP_TWO, Y_STEP_ONE, -Y_STEP_ONE, -Y_STEP_TWO, -Y_STEP_ONE};\n int blockSpecialValue = 0;\n int cellSpecial = 0;\n\n mapCells[origin.x/10][origin.y/10] = new EschatonCell(new CellPosition(0, 0, 0),\n new Point(origin.x, origin.y), blockSpecialValue);\n\n cellGrid[0][0][0] = new EschatonCell(new CellPosition(0, 0, 0),\n new Point(origin.x, origin.y), blockSpecialValue);\n\n for (int distanceFromOrigin = 0; distanceFromOrigin < config.getSizeOfMap();\n distanceFromOrigin++){\n\n int[] blockXVals = {origin.x,\n origin.x + X_STEP * distanceFromOrigin,\n origin.x + X_STEP * distanceFromOrigin,\n origin.x,\n origin.x - X_STEP * distanceFromOrigin,\n origin.x - X_STEP * distanceFromOrigin};\n\n int[] blockYVals = {origin.y - Y_STEP_TWO * distanceFromOrigin,\n origin.y - Y_STEP_ONE * distanceFromOrigin,\n origin.y + Y_STEP_ONE * distanceFromOrigin,\n origin.y + Y_STEP_TWO * distanceFromOrigin,\n origin.y + Y_STEP_ONE * distanceFromOrigin,\n origin.y - Y_STEP_ONE * distanceFromOrigin};\n\n blockSpecialValue = getRandomNumber(distanceFromOrigin, 0, 0);\n\n for (int block = 0; block < NUMBER_OF_BLOCKS; block ++){\n\n int blockXOrdinal = blockXVals[block];\n int blockYOrdinal = blockYVals[block];\n\n for (int blockSize = 0; blockSize < distanceFromOrigin; blockSize++){\n if(blockSpecialValue == blockSize){\n cellSpecial = getRandomNumber(2, 1, 1);\n }else {\n cellSpecial = 0;\n }\n cellGrid [distanceFromOrigin][block+1][blockSize+1] = makeNewCell(\n new CellPosition(distanceFromOrigin,block+1, blockSize+1),\n new Point(blockXOrdinal + blockStepX[block] * (blockSize + 1),\n blockYOrdinal + blockStepY[block] * (blockSize + 1)), cellSpecial);\n }\n }\n }\n }", "public static void createMap()\n\t\t\t{\n\t\t\tmap = new Vector<Location>(4);\n\t\n\t\t\tLocation location1 = new Location(\"the southwest room.\",\"You see doors to the north and east.\");\n\t\t\tLocation location2 = new Location(\"the southeast room.\",\"You see doors to the north and west.\");\n\t\t\tLocation location3 = new Location(\"the northwest room.\",\"You see doors to the south and east.\");\n\t\t\tLocation location4 = new Location(\"the northeast room.\",\"You see doors to the south and west.\");\n\n\t\t\tmap.addElement(location1);\n\t\t\tmap.addElement(location2);\n\t\t\tmap.addElement(location3);\n\t\t\tmap.addElement(location4);\n\t\t\t\n\t\t\t// This section defines the exits found in each location and the \n\t\t\t// locations to which they lead.\n\t\t\tlocation1.addExit(new Exit(Exit.north, location3));\n\t\t\tlocation1.addExit(new Exit(Exit.east, location2));\n\t\t\tlocation2.addExit(new Exit(Exit.north, location4));\n\t\t\tlocation2.addExit(new Exit(Exit.west, location1));\n\t\t\tlocation3.addExit(new Exit(Exit.south, location1));\n\t\t\tlocation3.addExit(new Exit(Exit.east, location4));\n\t\t\tlocation4.addExit(new Exit(Exit.west, location3));\n\t\t\tlocation4.addExit(new Exit(Exit.south, location2));\n\t\t\t\n\t\t\tcurrentLocation = location1;\t\t\t\t\n\t\t\t}", "public interface MapGenerator {\n\n /**\n * Creates the map with the current set options\n */\n public abstract void createMap(Game game) throws FreeColException;\n\n /**\n * Creates a <code>Map</code> for the given <code>Game</code>.\n *\n * The <code>Map</code> is added to the <code>Game</code> after\n * it is created.\n *\n * @param game The game.\n * @param landMap Determines whether there should be land\n * or ocean on a given tile. This array also\n * specifies the size of the map that is going\n * to be created.\n * @see net.sf.freecol.common.model.Map\n */\n public abstract void createEmptyMap(Game game, boolean[][] landMap);\n\n /**\n * Gets the options used when generating the map.\n * @return The <code>MapGeneratorOptions</code>.\n */\n public abstract OptionGroup getMapGeneratorOptions();\n\n}", "public MapGenerator(GameMap map) {\n\n gameMap = map;\n setGuiHashMap();\n firstCountryFlag=true;\n validator = new MapValidator(gameMap);\n }", "public void initializeMap() {\n\t\tgameMap = new GameMap(GameMap.MAP_HEIGHT, GameMap.MAP_WIDTH);\n\t\tgameMap.initializeFields();\n\t}", "public abstract void createEmptyMap(Game game, boolean[][] landMap);", "public abstract void createEmptyMap(Game game, boolean[][] landMap);", "public interface MapGenerator {\n\n /**\n * Creates the map with the current set options\n *\n * @param game a <code>Game</code> value\n * @exception FreeColException if an error occurs\n */\n public abstract void createMap(Game game) throws FreeColException;\n\n /**\n * Creates a <code>Map</code> for the given <code>Game</code>.\n *\n * The <code>Map</code> is added to the <code>Game</code> after\n * it is created.\n *\n * @param game The game.\n * @param landMap Determines whether there should be land\n * or ocean on a given tile. This array also\n * specifies the size of the map that is going\n * to be created.\n * @see net.sf.freecol.common.model.Map\n */\n public abstract void createEmptyMap(Game game, boolean[][] landMap);\n\n /**\n * Gets the options used when generating the map.\n * @return The <code>MapGeneratorOptions</code>.\n */\n public abstract OptionGroup getMapGeneratorOptions();\n\n}", "@Override\r\n\tpublic void gameInit() \r\n\t{\r\n\t\tfont = new Font(\"Courier\", Font.BOLD, 14);\r\n\t\tfontInfo = this.getFontMetrics(font);\r\n\t\tkeys = new KeyValues();\r\n\t\t\r\n\t\tbackground.loadImage(\"/images/sky.png\");\r\n\t\ttileset = new TileSet(10,10,32,32);\r\n\t\ttileset.loadTiles(\"/images/test_tiles.png\");\r\n\t\tmap = new Map(tileset, 20, 50);\r\n\t\tmap.readMap(\"res/maps/testmap2.txt\");\r\n\t\t\r\n\t\tcamera.setDimensions(getScreenWidth(), getScreenHeight());\r\n\t\tcamera.setXRange(0, map.getWidth() - getScreenWidth());\r\n\t\tcamera.setYRange(0, map.getHeight() - getScreenHeight());\r\n\t}", "public static Tile[][] setUpMap() {\n\n Tile[][] tiles = new Tile[5][9];\n String[][] defaultMapLayout = GameMap.getMapLayout();\n\n for (int i = 0; i < 5; i++) {\n\n for (int j = 0; j < 9; j++) {\n\n String tileType = defaultMapLayout[i][j];\n\n if (tileType.equals(\"P\")) {\n Tile newTileName = new Plain();\n tiles[i][j] = newTileName;\n\n } else if (tileType.equals(\"R\")) {\n Tile newTileName = new River();\n tiles[i][j] = newTileName;\n\n } else if (tileType.equals(\"M1\")) {\n Tile newTileName = new Mountain1();\n tiles[i][j] = newTileName;\n\n } else if (tileType.equals(\"M2\")) {\n Tile newTileName = new Mountain2();\n tiles[i][j] = newTileName;\n\n } else if (tileType.equals(\"M3\")) {\n Tile newTileName = new Mountain3();\n tiles[i][j] = newTileName;\n\n } else if (tileType.equals(\"SM\")) {\n Tile newTileName = new SwampMonster();\n tiles[i][j] = newTileName;\n\n } else if (tileType.equals(\"O\")) {\n Tile newTileName = new Ocean();\n tiles[i][j] = newTileName;\n\n } else if (tileType.equals(\"G\")) {\n Tile newTileName = new Grass();\n tiles[i][j] = newTileName;\n\n } else if (tileType.equals(\"V\")) {\n Tile newTileName = new Volcano();\n tiles[i][j] = newTileName;\n\n }else {\n Tile newTileName = new Plain();\n tiles[i][j] = newTileName;\n newTileName.setOwner(null);\n }\n\n }\n }\n return tiles;\n }", "public void buildEmptyMap() {\n this.emptyMap = new BufferedImage(this.boulderDashModel.getArea().getDimensionWidth() * zoom, this.boulderDashModel.getArea().getDimensionHeight() * zoom, BufferedImage.TYPE_INT_RGB);\n final Graphics2D graphics = (Graphics2D) this.emptyMap.getGraphics();\n graphics.drawImage(this.boulderDashModel.getArea().getImage(), 0, 0, this.boulderDashModel.getArea().getDimensionWidth() * zoom, this.boulderDashModel.getArea().getDimensionHeight() * zoom, null);\n }", "public void makeMap(){\r\n\t\tint m =1;\r\n\t\t//EnvironObj temp = new EnvironObj(null, 0, 0);\r\n\t\tfor(int i=0; i<map.size(); i++){\r\n\t\t\tfor(int j =0; j<map.get(i).size(); j++){\r\n\t\t\t\tString o = map.get(i).get(j);\r\n\t\t\t\t//System.out.println(\"grabbing o from map, o = \" + o);\r\n\t\t\t\tif(o.equals(\"t\")){\r\n\t\t\t\t\ttemp = new EnvironObj(\"treee.png\", j+m, i*20);\r\n\t\t\t\t\tobjectList.add(temp);\r\n\t\t\t\t\tm+=10;\r\n\t\t\t\t\t//System.out.println(\"objectList: \" + objectList);\r\n\t\t\t\t}else if(o.equals(\"p\")){\r\n\t\t\t\t\ttemp = new EnvironObj(\"path.png\", j+m, i*20, true);\r\n\t\t\t\t\t//dont need to add to obj list bc its always in back\r\n\t\t\t\t\twalkables.add(temp);\r\n\r\n\t\t\t\t}else if(o.equals(\"h\")){\r\n\t\t\t\t\ttemp = new EnvironObj(\"house.png\", j+m, i*20);\r\n\t\t\t\t\tobjectList.add(temp);\r\n\t\t\t\t}else if(o.equals(\"g\")){\r\n\t\t\t\t\tm+=10;\r\n\t\t\t\t}\r\n\t\t\t\telse if(!o.equals(\"g\")){\r\n\t\t\t\t\tString fn = o +\".txt\";\r\n\t\t\t\t\tSystem.out.println(\"filename for NPC: \" + fn);\r\n\t\t\t\t\tnp = new NPC(o, fn, j+m, i*20);\r\n\t\t\t\t\tm+=10;\r\n\t\t\t\t\tcharacters.add(np);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tm=0;\r\n\t\t}\r\n\t}", "public static void generateCustomGameConfiguration() {\n // GameConfig.getInstance().setMapWidthX(20);\n // GameConfig.getInstance().setMapHeightY(20);\n // GameConfig.getInstance().setMaxEnergyPirateValue(100);\n // GameConfig.getInstance().setMonkeyErraticSpeed(1000);\n // GameConfig.getInstance().setMonkeyHunterSpeed(750);\n // GameConfig.getInstance().setRumEnergyValue(10);\n // GameConfig.getInstance().setTimeRumVisibility(10000);\n // GameConfig.getInstance().setRumList(Brain.getInstance().getObjectManager().getRumList());\n // GameConfig.getInstance().setSquaresList(Brain.getInstance().getMapManager().getMap().getSquareList());\n // ArrayList<Monkey> monkeyArrayList = new ArrayList<Monkey>();\n // for(int i=0;i<10;i++) {\n // if (i % 2 == 0) {\n // monkeyArrayList.add(new Monkey(PositionUtils.getSpawnPosition(\n // Map.getInstance().getGroundSquareList(),\n // CharacterManager.getInstance(Brain.getInstance()).getCharacterList(),\n // ObjectManager.getInstance(Brain.getInstance()).getObjectList()\n // ), Monkey.MonkeyType.ERRATIC));\n // } else {\n // monkeyArrayList.add(new Monkey(PositionUtils.getSpawnPosition(\n // Map.getInstance().getGroundSquareList(),\n // CharacterManager.getInstance(Brain.getInstance()).getCharacterList(),\n // ObjectManager.getInstance(Brain.getInstance()).getObjectList()\n // ), Monkey.MonkeyType.HUNTER));\n // }\n // }\n // GameConfig.getInstance().setMonkeyList(monkeyArrayList);\n // for(int i=0;i< Brain.getInstance().getMapManager().getMap().getSquareList().size();i++) {\n // for (int j = 0; j < Brain.getInstance().getMapManager().getMap().getSquareList().get(i).size(); j++) {\n // if (i == 0 || j==0 || i == GameConfig.getInstance().getMapWidthX()-1\n // || j == GameConfig.getInstance().getMapHeightY()-1) {\n // Brain.getInstance().getMapManager().getMap().getSquareList().get(i).get(j)\n // .setSquareType(Square.SquareType.SEA);\n // }else{\n // Brain.getInstance().getMapManager().getMap().getSquareList().get(i).get(j)\n // .setSquareType(Square.SquareType.GROUND);\n // }\n // }\n // }\n // GameConfig.getInstance().setSquaresList(Brain.getInstance().getMapManager().getMap().getSquareList());\n // saveGameConfiguration();\n }", "private void initialiseMap(ArrayList<Sprite> allSprites){\n\t\tint x = (allSprites.get(0).getXOffset()*-2) + App.COLUMNS;\n\t\tint y = (allSprites.get(0).getYOffset()*-2) + App.ROWS;\n\t\t\n\t\tgameMap = new MapCell[x][y];\n\t\t\n\t\t//initialise the gameMap\n\t\tfor (int i = 0; i < x; i++) {\n\t\t\tfor( int j = 0; j < y; j++) {\n\t\t\t\tthis.gameMap[i][j] = new MapCell();\n\t\t\t}\n\t\t}\n\t}", "public TiledMap createMap() {\n map_inter = new MapTile[g_logic.MAP_WIDTH][g_logic.MAP_HEIGHT];\n \n //drawing stuff\n tiles = new Texture(Gdx.files.internal(\"packed/terrain.png\"));\n TextureRegion[][] splitTiles = TextureRegion.split(tiles, 54, 54);\n map = new TiledMap();\n MapLayers layers = map.getLayers();\n TiledMapTileLayer new_layer = new TiledMapTileLayer(g_logic.MAP_WIDTH, g_logic.MAP_HEIGHT, g_logic.ISO_WIDTH, g_logic.ISO_HEIGHT);\n \n //actual generation\n for (int x = 0; x < g_logic.MAP_WIDTH; x++) \n {\n for (int y = 0; y < g_logic.MAP_HEIGHT; y++) \n {\n char chara = '.';\n int ty = 0;\n int tx;\n if (x == 0 || x == g_logic.MAP_WIDTH-1)\n {\n tx = 1;\n chara = '#';\n }\n else\n {\n tx = 0; \n chara = '.';\n }\n \n //set up map tiles\n MapTile tile = new MapTile(x, y, tx, ty, chara);\n Gdx.app.log(\"Map gen\", \"Created a map tile @\" + x + \",\" + y + \" \" + tx + \" \" + ty + \" \" + chara);\n \n //put them in the internal map\n putInterMap(tile, x, y);\n \n //set up renderer cells\n TiledMapTileLayer.Cell cell = new TiledMapTileLayer.Cell();\n //y,x\n cell.setTile(new StaticTiledMapTile(splitTiles[tile.getTextureY()][tile.getTextureX()]));\n new_layer.setCell(x, y, cell);\n }\n }\n \n \n float y_off = g_logic.getYOffset();\n new_layer.setOffsetY(y_off);\n layers.add(new_layer);\n \n g_logic.setInterMap(map_inter);\n\n return map;\n }", "public abstract void createMap();", "private void setupDefaultDiceMap() {\n defaultDiceNumberMap.put(getHashCodeofPair(0,-2), 0);\n defaultDiceNumberMap.put(getHashCodeofPair(-7,1), 6);\n defaultDiceNumberMap.put(getHashCodeofPair(7,1), 8);\n defaultDiceNumberMap.put(getHashCodeofPair(-7,-1), 5);\n defaultDiceNumberMap.put(getHashCodeofPair(7,-1), 9);\n defaultDiceNumberMap.put(getHashCodeofPair(0,4), 4);\n defaultDiceNumberMap.put(getHashCodeofPair(2,4), 10);\n\n defaultDiceNumberMap.put(getHashCodeofPair(-3,-3), 6);\n defaultDiceNumberMap.put(getHashCodeofPair(-1,-3), 10);\n defaultDiceNumberMap.put(getHashCodeofPair(1,-3), 8);\n defaultDiceNumberMap.put(getHashCodeofPair(3,-3), 0);\n defaultDiceNumberMap.put(getHashCodeofPair(-4,-2), 5);\n defaultDiceNumberMap.put(getHashCodeofPair(-2,-2), 3);\n\t\tdefaultDiceNumberMap.put(getHashCodeofPair(2,-2), 2);\n\t\tdefaultDiceNumberMap.put(getHashCodeofPair(4,-2), 0);\n\t\tdefaultDiceNumberMap.put(getHashCodeofPair(-5,-1), 0);\n\t\tdefaultDiceNumberMap.put(getHashCodeofPair(-3,-1), 11);\n\t\tdefaultDiceNumberMap.put(getHashCodeofPair(-1,-1), 9);\n\t\tdefaultDiceNumberMap.put(getHashCodeofPair(1,-1), 5);\n\t\tdefaultDiceNumberMap.put(getHashCodeofPair(3,-1), 4);\n\t\tdefaultDiceNumberMap.put(getHashCodeofPair(5,-1), 0);\n\t\tdefaultDiceNumberMap.put(getHashCodeofPair(-6,0), 10);\n\t\tdefaultDiceNumberMap.put(getHashCodeofPair(-4,0), 0);\n\t\tdefaultDiceNumberMap.put(getHashCodeofPair(-2,0), 8);\n\t\tdefaultDiceNumberMap.put(getHashCodeofPair(0,0), 10);\n\t\tdefaultDiceNumberMap.put(getHashCodeofPair(2,0), 6);\n\t\tdefaultDiceNumberMap.put(getHashCodeofPair(4,0), 0);\n\t\tdefaultDiceNumberMap.put(getHashCodeofPair(6,0), 12);\n\t\tdefaultDiceNumberMap.put(getHashCodeofPair(-5,1), 8);\n\t\tdefaultDiceNumberMap.put(getHashCodeofPair(-3,1), 0);\n\t\tdefaultDiceNumberMap.put(getHashCodeofPair(-1,1), 0);\n\t\tdefaultDiceNumberMap.put(getHashCodeofPair(1,1), 0);\n\t\tdefaultDiceNumberMap.put(getHashCodeofPair(3,1), 0);\n\t\tdefaultDiceNumberMap.put(getHashCodeofPair(5,1), 5);\n\t\tdefaultDiceNumberMap.put(getHashCodeofPair(-4,2), 0);\n\t\tdefaultDiceNumberMap.put(getHashCodeofPair(-2,2), 4);\n\t\tdefaultDiceNumberMap.put(getHashCodeofPair(0,2), 3);\n\t\tdefaultDiceNumberMap.put(getHashCodeofPair(2,2), 4);\n\t\tdefaultDiceNumberMap.put(getHashCodeofPair(4,2), 0);\n\t\tdefaultDiceNumberMap.put(getHashCodeofPair(-3,3),0);\n\t\tdefaultDiceNumberMap.put(getHashCodeofPair(-1,3), 0);\n\t\tdefaultDiceNumberMap.put(getHashCodeofPair(1,3), 9);\n\t\tdefaultDiceNumberMap.put(getHashCodeofPair(3,3), 0);\n\t}", "private void createMapOfFirstType() {\n\n this.typeOfMap=1;\n matrixOfSquares[0][0] = createSquare( ColorOfFigure_Square.BLUE, true, 0, 0);\n matrixOfSquares[0][1] = createSquare( ColorOfFigure_Square.BLUE, false, 0, 1);\n matrixOfSquares[0][2] = createSquare(true, ColorOfFigure_Square.BLUE, true,0,2);\n matrixOfSquares[0][3] = null;\n matrixOfSquares[1][1] = createSquare( ColorOfFigure_Square.RED, true,1,1);\n matrixOfSquares[1][0] = createSquare(true, ColorOfFigure_Square.RED, true,1,0);\n matrixOfSquares[1][2] = createSquare( ColorOfFigure_Square.RED, true,1,2);\n matrixOfSquares[1][3] = createSquare( ColorOfFigure_Square.YELLOW, true,1,3);\n matrixOfSquares[2][0] = null;\n matrixOfSquares[2][1] = createSquare( ColorOfFigure_Square.GREY, true,2,1);\n matrixOfSquares[2][2] = createSquare( ColorOfFigure_Square.GREY, true,2,2);\n matrixOfSquares[2][3] = createSquare(true, ColorOfFigure_Square.YELLOW, true,2,3);\n\n }", "public void loadMap() {\n\n try {\n new File(this.mapName).mkdir();\n FileUtils.copyDirectory(\n new File(this.plugin.getDataFolder() + \"/maps/\" + this.mapName), new File(this.mapName));\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n WorldCreator wc = new WorldCreator(this.mapName);\n World world = wc.createWorld();\n world.setAutoSave(false);\n world.setPVP(false);\n world.setDifficulty(Difficulty.PEACEFUL);\n world.setGameRuleValue(\"doDaylightCycle\", \"false\");\n world.setGameRuleValue(\"mobGriefing\", \"false\");\n world.setGameRuleValue(\"doMobSpawning\", \"false\");\n world.setGameRuleValue(\"doFireTick\", \"false\");\n world.setGameRuleValue(\"keepInventory\", \"true\");\n world.setGameRuleValue(\"commandBlockOutput\", \"false\");\n world.setSpawnFlags(false, false);\n\n try {\n final JsonParser parser = new JsonParser();\n final FileReader reader =\n new FileReader(this.plugin.getDataFolder() + \"/maps/\" + this.mapName + \"/config.json\");\n final JsonElement element = parser.parse(reader);\n this.map = JumpyJumpMap.fromJson(element.getAsJsonObject());\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }", "private void createMapOfFourthType() {\n\n this.typeOfMap=4;\n matrixOfSquares[0][0] = createSquare( ColorOfFigure_Square.RED, true,0,0);\n matrixOfSquares[0][1] = createSquare( ColorOfFigure_Square.BLUE, true,0,1);\n matrixOfSquares[0][2] = createSquare(true, ColorOfFigure_Square.BLUE, true,0,2);\n matrixOfSquares[0][3] = null;\n matrixOfSquares[1][0] = createSquare(true, ColorOfFigure_Square.RED, true,1,0);\n matrixOfSquares[1][1] = createSquare( ColorOfFigure_Square.PURPLE, true,1,1);\n matrixOfSquares[1][2] = createSquare( ColorOfFigure_Square.PURPLE, true,1,2);\n matrixOfSquares[1][3] = createSquare( ColorOfFigure_Square.YELLOW, true,1,3);\n matrixOfSquares[2][0] = createSquare( ColorOfFigure_Square.GREY, true,2,0);\n matrixOfSquares[2][1] = createSquare( ColorOfFigure_Square.GREY, true,2,1);\n matrixOfSquares[2][2] = createSquare( ColorOfFigure_Square.GREY, true,2,2);\n matrixOfSquares[2][3] = createSquare(true, ColorOfFigure_Square.YELLOW, true,2,3);\n }", "private void setDefaultMonsterCords()\n {\n this.xBeginMap=0;\n this.yBeginMap=0;\n this.xEndMap=16;\n this.yEndMap=16;\n\n this.xBeginSrc=0;\n this.yBeginSrc=0;\n this.xEndSrc=0;\n this.yEndSrc=0;\n\n }", "private void generateMaps() {\r\n\t\tthis.tablesLocksMap = new LinkedHashMap<>();\r\n\t\tthis.blocksLocksMap = new LinkedHashMap<>();\r\n\t\tthis.rowsLocksMap = new LinkedHashMap<>();\r\n\t\tthis.waitMap = new LinkedHashMap<>();\r\n\t}", "public void setMap()\n {\n gameManager.setMap( savedFilesFrame.getCurrent_index() );\n }", "public void createMap(boolean randomNumbers, boolean randomHexes, boolean randomPorts) {\n\t\t\n\t\tif (randomNumbers)\n\t\t\tplaceRandomNumbers();\n\t\telse\n\t\t\tplaceDefaultnumbers();\n\t\t\n\t\tif (randomHexes) {\n\t\t\t\n\t\t\thexGrid.setRandomTypes();\n\t\t\trobber = hexGrid.getDesertLocation();\n\t\t}\n\t\t\t\n\t\telse {\n\t\t\n\t\t\thexGrid.setDefaultTypes();\n//\t\t\trobber = new HexLocation(0, -2);\n\t\t}\n\t\tif (randomPorts)\n\t\t\tcreateRandomPorts();\n\t\telse\n\t\t\tcreateDefaultPorts();\n\t}", "private void viewMap() {\r\n \r\n // Get the current game \r\n theGame = cityofaaron.CityOfAaron.getTheGame();\r\n \r\n // Get the map \r\n Map map = theGame.getMap();\r\n Location locations = null;\r\n \r\n // Print the map's title\r\n System.out.println(\"\\n*** Map: CITY OF AARON and Surrounding Area ***\\n\");\r\n // Print the column numbers \r\n System.out.println(\" 1 2 3 4 5\");\r\n // for every row:\r\n for (int i = 0; i < max; i++){\r\n // Print a row divider\r\n System.out.println(\" -------------------------------\");\r\n // Print the row number\r\n System.out.print((i + 1) + \" \");\r\n // for every column:\r\n for(int j = 0; j<max; j++){\r\n // Print a column divider\r\n System.out.print(\"|\");\r\n // Get the symbols and locations(row, column) for the map\r\n locations = map.getLocation(i, j);\r\n System.out.print(\" \" + locations.getSymbol() + \" \");\r\n }\r\n // Print the ending column divider\r\n System.out.println(\"|\");\r\n }\r\n // Print the ending row divider\r\n System.out.println(\" -------------------------------\\n\");\r\n \r\n // Print a key for the map\r\n System.out.println(\"Key:\\n\" + \"|=| - Temple\\n\" + \"~~~ - River\\n\" \r\n + \"!!! - Farmland\\n\" + \"^^^ - Mountains\\n\" + \"[*] - Playground\\n\" \r\n + \"$$$ - Capital \" + \"City of Aaron\\n\" + \"### - Chief Judge/Courthouse\\n\" \r\n + \"YYY - Forest\\n\" + \"TTT - Toolshed\\n\" +\"xxx - Pasture with \"\r\n + \"Animals\\n\" + \"+++ - Storehouse\\n\" +\">>> - Undeveloped Land\\n\");\r\n }", "private void createBitMap() {\n bitMap = bitMap.copy(bitMap.getConfig(), true);\n Canvas canvas = new Canvas(bitMap);\n Paint paint = new Paint();\n paint.setAntiAlias(true);\n paint.setColor(Color.BLACK);\n paint.setStyle(Paint.Style.STROKE);\n paint.setStrokeWidth(4.5f);\n canvas.drawCircle(50, 50, 30, paint);\n winningBitMap = winningBitMap.copy(winningBitMap.getConfig(), true);\n Canvas canvas2 = new Canvas(winningBitMap);\n paint.setAntiAlias(true);\n paint.setColor(Color.GREEN);\n paint.setStyle(Paint.Style.FILL);\n paint.setStrokeWidth(4.5f);\n canvas2.drawCircle(50, 50, 30, paint);\n bitMapWin = winningBitMap.copy(winningBitMap.getConfig(), true);\n Canvas canvas3 = new Canvas(bitMapWin);\n paint.setAntiAlias(true);\n paint.setColor(Color.MAGENTA);\n paint.setStyle(Paint.Style.FILL);\n paint.setStrokeWidth(4.5f);\n canvas3.drawCircle(50, 50, 30, paint);\n bitMapCat = winningBitMap.copy(winningBitMap.getConfig(), true);\n Canvas canvas4 = new Canvas(bitMapCat);\n paint.setAntiAlias(true);\n paint.setColor(Color.DKGRAY);\n paint.setStyle(Paint.Style.FILL);\n paint.setStrokeWidth(4.5f);\n canvas4.drawCircle(50, 50, 30, paint);\n }", "MAP createMAP();", "public void initMap(String path) {\n \tgameState = StateParser.makeGame(path);\n\t\tintel = gameState.getCtrlIntel();\t\n\t\tsnakes = gameState.getSnake();\n\t\tmap = gameState.getMap();\n }", "public void initMap() {\n\t\tmap = new Map();\n\t\tmap.clear();\n\t\tphase = new Phase();\n\t\tmap.setPhase(phase);\n\t\tmapView = new MapView();\n\t\tphaseView = new PhaseView();\n\t\tworldDomiView = new WorldDominationView();\n\t\tcardExchangeView = new CardExchangeView();\n\t\tphase.addObserver(phaseView);\n\t\tphase.addObserver(cardExchangeView);\n\t\tmap.addObserver(worldDomiView);\n\t\tmap.addObserver(mapView);\n\t}", "public void generateGame() {\n clearGame();\n\n //generate new game\n SudokuGenerator generator = new FullGenerator();\n generator.generateSudoku(this);\n\n //set start locations\n for (int i = 0; i < size; i++) {\n for (int j = 0; j < size; j++) {\n int value = board.getSquareValue(i, j);\n if (value != 0) { // startlocation\n startLocations.add(new int[] {i, j});\n }\n }\n }\n }", "@Override\n\tpublic HashMap<Position, Node> generate(){\n\t\tNode tempNode;\n\t\tPosition tempPosition;\n\t\tif(map != null && map.isEmpty()){\n\t\t\tfor(int y=0; y<numNodesY; y++){\n\t\t\t\tfor(int x=0; x<numNodesX; x++){\n\t\t\t\t\ttempPosition = new Position(x*nodeDistance, \n\t\t\t\t\t\t\ty*nodeDistance);\n\t\t\t\t\ttempNode = new Node(field, tempPosition,\n\t\t\t\t\t\t\tnodeSignalStrength,\n\t\t\t\t\t\t\tagentLife,\n\t\t\t\t\t\t\trequestLife);\n\t\t\t\t\tmap.put(tempPosition, tempNode);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn new HashMap<Position, Node>(map);\n\t}", "public void SetupMap()\n {\n mMap.setMyLocationEnabled(true);\n\n // GAME LatLng\n LatLng latLng = new LatLng(53.227668, -0.540038);\n\n // Create instantiate Marker\n MarkerOptions markerOptions = new MarkerOptions();\n markerOptions.position(latLng);\n markerOptions.draggable(false);\n markerOptions.title(\"GAME\");\n\n MapsInitializer.initialize(getActivity());\n // Create Marker at pos\n mMap.addMarker(markerOptions);\n // Position Map Camera to pos\n mMap.moveCamera(CameraUpdateFactory.newCameraPosition(new CameraPosition(latLng, 100, 0, 0)));\n }", "public static Map generateRandomMapWithPath(){\n\t\tMap map = new Map(20,20,(int)System.currentTimeMillis(),0.25); // x size, y size\n\n\t\ttry {\n\t\t\tQueue<int[]> corners = new LinkedList<int[]>();\n\n\t\t\t// add corners to the queue\n\t\t\t// lines between corners must be strictly vertical or horizontal\n\t\t\t// it is assumed that such filtering will be done during gametime\n\t\t\t// by restricting player's input\n\t\t\t// otherwise, no path will be drawn on the map\n\t\t\tcorners.add(new int[] {0,3});\n\t\t\tcorners.add(new int[] {15,3});\n\t\t\tcorners.add(new int[] {15,15});\n\t\t\tcorners.add(new int[] {6,15});\n\t\t\tcorners.add(new int[] {6,8});\n\t\t\tcorners.add(new int[] {2,8});\n\n\t\t\t// build path\n\t\t\tmap.buildNewPath(corners);\n\t\t} catch (PathException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn map;\n\t}", "private void createGameMode() {\n GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();\n Rectangle fullScreenBounds = ge.getDefaultScreenDevice().getDefaultConfiguration().getBounds();\n boolean fs = ge.getDefaultScreenDevice().isFullScreenSupported();\n \n setTitle(gameName);\n setName(gameName);\n setDefaultCloseOperation(EXIT_ON_CLOSE);\n \n map = new UAVMap(this, UAVModes.GAME, fs);\n \n if (fs) {\n fullScreen = new Window(this);\n fullScreen.add(map.getCanvas());\n ge.getDefaultScreenDevice().setFullScreenWindow(fullScreen);\n } else {\n this.setSize((int)(.9 * fullScreenBounds.width), (int)(.9 * fullScreenBounds.height));\n this.setLocation(fullScreenBounds.x + (int) (.05 * fullScreenBounds.width), \n fullScreenBounds.y + (int) (.05 * fullScreenBounds.height));\n Container content = getContentPane();\n content.setLayout(new GridBagLayout());\n GridBagConstraints c = new GridBagConstraints();\n c.fill = GridBagConstraints.BOTH;\n c.weightx = 1;\n c.weighty = 1;\n content.add(map.getCanvas(), c);\n setVisible(true);\n }\n map.initializeGame();\n map.startTimer(); \n }", "public void addDefaultLayers()\n\t{\n\t\t/**\n\t\t\t// Default OSM layers\n\t\t\tOSM mapnikOSM = OSM.Mapnik(\"Mapnik\");\n\t\t\tOSM cycleOSM = OSM.CycleMap(\"CycleMap\");\n\t\t\tmapnikOSM.setIsBaseLayer(true);\n\t\t\tcycleOSM.setIsBaseLayer(true);\n\t\t\tthis.openLayersMap.getMap().addLayer(mapnikOSM);\n\t\t this.openLayersMap.getMap().addLayer(cycleOSM);\n\t\t*/\n\t\t\n\t\t/**\n\t\t // Google Maps Tiles\n\t\t\t// Also in Blipnip.html insert: <script src=\"http://maps.google.com/maps/api/js?v=3&sensor=false\"></script>\n\t\t\t// or <script src=\"http://maps.google.com/maps/api/js?&sensor=false\"></script>\n\t\t\t// Keep in mind: http://gis.stackexchange.com/questions/51992/how-to-obtain-to-max-zoom-levels-for-google-layer-using-open-layers\n\t\t\t// and http://gis.stackexchange.com/questions/5964/how-to-apply-custom-google-map-style-in-openlayers\n\t\t\tGoogleV3Options gNormalOptions = new GoogleV3Options();\n\t\t\tgNormalOptions.setIsBaseLayer(true);\n\t\t\tgNormalOptions.setSmoothDragPan(false);\n\t\t\tgNormalOptions.setNumZoomLevels(17);\n\t\t\tgNormalOptions.setType(GoogleV3MapType.G_NORMAL_MAP);\n\t\t\tGoogleV3 gNormal = new GoogleV3(\"Google Normal\", gNormalOptions);\n\t this.openLayersMap.getMap().addLayer(gNormal);\n */\n\t\t\n\t\t/** \n\t\t // MapQuest - MapQuest-OSM Tiles - These are also free - Very good free alternative\n\t XYZOptions mapQuestOption = new XYZOptions();\n\t mapQuestOption.setIsBaseLayer(true);\n\t mapQuestOption.setNumZoomLevels(17);\n\t mapQuestOption.setSphericalMercator(true);\n\t String[] tiles = new String[4];\n\t tiles[0] = \"http://otile1.mqcdn.com/tiles/1.0.0/map/${z}/${x}/${y}.png\";\n\t tiles[1] = \"http://otile2.mqcdn.com/tiles/1.0.0/map/${z}/${x}/${y}.png\";\n\t tiles[2] = \"http://otile3.mqcdn.com/tiles/1.0.0/map/${z}/${x}/${y}.png\";\n\t tiles[3] = \"http://otile4.mqcdn.com/tiles/1.0.0/map/${z}/${x}/${y}.png\";\n\t XYZ mapQuest = new XYZ(\"mapQuest\",tiles, mapQuestOption);\n\t this.openLayersMap.getMap().addLayer(mapQuest);\n */\n\t\t\n\t\t/**\n // Openlayers, OpenStreetMaps blank and white - Free but do not zoom close enough\n\t XYZOptions bwOSMOption = new XYZOptions();\n\t bwOSMOption.setIsBaseLayer(true);\n\t bwOSMOption.setSphericalMercator(true);\n\t bwOSMOption.setNumZoomLevels(15);\n\t String[] bwOSMtiles = new String[2];\n\t bwOSMtiles[0] = \"http://a.www.toolserver.org/tiles/bw-mapnik/${z}/${x}/${y}.png\"; \n\t bwOSMtiles[1] = \"http://b.www.toolserver.org/tiles/bw-mapnik/${z}/${x}/${y}.png\";\n\t XYZ bwOSM = new XYZ(\"bwOSM\",bwOSMtiles, bwOSMOption);\n\t this.openLayersMap.getMap().addLayer(bwOSM); \n */\n\t\t\n\t\t/**\n\t\t\t// Unfortunately their policy has changed and will start charging from May 1st\n // CloudMade Tiles - Very good paid alternative, free 500,000 tile loads\n\t\t\t//String osmAtrribution = \"&copy; 2014 <a href=\\\"http://openstreetmap.org\\\">OpenStreetMap</a> contributors\";\n\t\t\t//String cloudMadeAttribution = \"Map data \" + osmAtrribution + \", &copy; 2014 <a href=\\\"http://cloudmade.com\\\">CloudMade</a>\";\n\t XYZOptions cloudMadeOption = new XYZOptions();\n\t cloudMadeOption.setIsBaseLayer(true);\n\t cloudMadeOption.setSphericalMercator(true);\n\t cloudMadeOption.setNumZoomLevels(19);\n\t cloudMadeOption.setTransitionEffect(TransitionEffect.RESIZE);\n\t //cloudMadeOption.setAttribution(cloudMadeAttribution);\n\t String[] cloudMadetiles = new String[3];\n\t cloudMadetiles[0] = \"http://a.tile.cloudmade.com/3295ec94195346989f8d67502c88e0ab/120472/256/${z}/${x}/${y}.png\"; //TODO - 256 for desktops, 64 for mobiles\n\t cloudMadetiles[1] = \"http://b.tile.cloudmade.com/3295ec94195346989f8d67502c88e0ab/120472/256/${z}/${x}/${y}.png\"; \n\t cloudMadetiles[2] = \"http://c.tile.cloudmade.com/3295ec94195346989f8d67502c88e0ab/120472/256/${z}/${x}/${y}.png\"; \n\t XYZ cloudMade = new XYZ(\"cloudMade\",cloudMadetiles, cloudMadeOption);\n\t this.openLayersMap.getMap().addLayer(cloudMade); \n\t */\n\t\t\n\t // MapBox is free for 3000 map loads - paid for more. Switching to this due to CloudMade's upcoming change of policy.\n\t\t\t// Nice and fairly cheap alternative. TileMill seems to be an awesome tool for complete map re-styling which\n\t\t\t// is a huge +. \n\t XYZOptions mapBoxOption = new XYZOptions();\n\t mapBoxOption.setIsBaseLayer(true);\n\t mapBoxOption.setSphericalMercator(true);\n\t mapBoxOption.setNumZoomLevels(19);\n\t mapBoxOption.setTransitionEffect(TransitionEffect.RESIZE);\n\t //mapBoxOption.setAttribution(cloudMadeAttribution);\n\t String[] mapBoxtiles = new String[3];\n\t mapBoxtiles[0] = \"http://a.tiles.mapbox.com/v3/thanos.hh91dmii/${z}/${x}/${y}.png\"; \n\t mapBoxtiles[1] = \"http://b.tiles.mapbox.com/v3/thanos.hh91dmii/${z}/${x}/${y}.png\"; \n\t mapBoxtiles[2] = \"http://c.tiles.mapbox.com/v3/thanos.hh91dmii/${z}/${x}/${y}.png\"; \n\t XYZ mapBox = new XYZ(\"mapBox\",mapBoxtiles, mapBoxOption);\n\t this.openLayersMap.getMap().addLayer(mapBox); \n\t \n\t \n\t}", "private void generateMap () {\n for (int i = 0 ; i < n ; i++) {\n mapCoordinate[i] = new CoordinateInfo(100 * random.nextFloat(), 100 * random.nextFloat());\n\n for (int j = 0 ; j <= i ; j++) {\n mapDistance[i][j] = mapDistance[j][i] = getDistance(mapCoordinate[i], mapCoordinate[j]);\n }\n }\n }", "public void populateMap(int playerNumber){\n\t\tint factor = 1;\n\t\t\n\t\t\n\t}", "private static Map generateCharacterMappings() {\n Log.debug(\"Generating default character mappings\");\n Map map = new HashMap();\n Iterator iter = keycodes.keySet().iterator();\n while (iter.hasNext()) {\n Object key = iter.next();\n map.put(keycodes.get(key), key);\n }\n return map;\n }", "public void buildMap(){\n map =mapFactory.createMap(level);\n RefLinks.SetMap(map);\n }", "public MapGenerator(GameLogic logic) {\n g_logic = logic;\n }", "private void fillImageMap() {\n Image shipImage;\n try {\n shipImage = ImageIO.read(getClass().getResource(\"img/patrol_boat.png\"));\n imageMap.put(ShipType.PATROL_BOAT, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/patrol_boat_sunken.png\"));\n imageMap.put(ShipType.PATROL_BOAT_SUNKEN, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/cruiser_horizontal.gif\"));\n imageMap.put(ShipType.CRUISER_HORIZONTAL, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/cruiser_horizontal_sunken.gif\"));\n imageMap.put(ShipType.CRUISER_HORIZONTAL_SUNKEN, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/cruiser_vertical.gif\"));\n imageMap.put(ShipType.CRUISER_VERTICAL, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/cruiser_vertical_sunken.gif\"));\n imageMap.put(ShipType.CRUISER_VERTICAL_SUNKEN, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/submarine_horizontal.gif\"));\n imageMap.put(ShipType.SUBMARINE_HORIZONTAL, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/submarine_horizontal_sunken.gif\"));\n imageMap.put(ShipType.SUBMARINE_HORIZONTAL_SUNKEN, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/submarine_vertical.gif\"));\n imageMap.put(ShipType.SUBMARINE_VERTICAL, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/submarine_vertical_sunken.gif\"));\n imageMap.put(ShipType.SUBMARINE_VERTICAL_SUNKEN, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/battleship_horizontal.gif\"));\n imageMap.put(ShipType.BATTLESHIP_HORIZONTAL, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/battleship_horizontal_sunken.gif\"));\n imageMap.put(ShipType.BATTLESHIP_HORIZONTAL_SUNKEN, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/battleship_vertical.gif\"));\n imageMap.put(ShipType.BATTLESHIP_VERTICAL, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/battleship_vertical_sunken.gif\"));\n imageMap.put(ShipType.BATTLESHIP_VERTICAL_SUNKEN, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/aircraft_carrier_horizontal.gif\"));\n imageMap.put(ShipType.AIRCRAFT_CARRIER_HORIZONTAL, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/aircraft_carrier_horizontal_sunken.gif\"));\n imageMap.put(ShipType.AIRCRAFT_CARRIER_HORIZONTAL_SUNKEN, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/aircraft_carrier_vertical.gif\"));\n imageMap.put(ShipType.AIRCRAFT_CARRIER_VERTICAL, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/aircraft_carrier_vertical_sunken.gif\"));\n imageMap.put(ShipType.AIRCRAFT_CARRIER_VERTICAL_SUNKEN, shipImage);\n } catch(IOException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void create() {\n theMap = new ObjectSet<>(2048, 0.5f);\n generate();\n }", "public Game(String customMapName) {\n genericWorldMap = new GenericWorldMap(customMapName);\n players = new LinkedList<Player>();\n dice = new Dice();\n observers = new LinkedList<>();\n gameState = GameState.MESSAGE;\n }", "public static void generateDefaults() {\n Building temp = BuildingList.getBuilding(0);\n SubAreas temp2 = temp.getSubArea(1);\n temp2.createFireSensor();\n temp2.createMotionSensor();\n temp2 = temp.getSubArea(2);\n temp2.createMotionSensor();\n temp2 = temp.getSubArea(3);\n temp2.createMotionSensor();\n temp2.createFireSensor();\n temp2 = temp.getSubArea(5);\n temp2.createFireSensor();\n temp2 = temp.getSubArea(6);\n temp2.createFireSensor();\n temp2.createMotionSensor();\n }", "void randomBlock() {\n\t\t// map generate (int map)\n\t\tfor (int i = 0; i < mapX; i += 2) {\n\t\t\tfor (int j = 0; j < mapY; j += 2) {\n\t\t\t\tint r = (int) Math.random() * 4;\n\t\t\t\tif (r == 0) {\n\t\t\t\t\ttileMap[i][j] = new Tile(i, j, 1);\n\t\t\t\t\ttileMap[i + 1][j] = new Tile(i + 1, j, 1);\n\t\t\t\t\ttileMap[i][j + 1] = new Tile(i, j + 1, 1);\n\t\t\t\t\ttileMap[i + 1][j + 1] = new Tile(i + 1, j + 1, 1);\n\n\t\t\t\t} else {\n\t\t\t\t\ttileMap[i][j] = new Tile(i, j, 0);\n\t\t\t\t\ttileMap[i + 1][j] = new Tile(i + 1, j, 0);\n\t\t\t\t\ttileMap[i][j + 1] = new Tile(i, j + 1, 0);\n\t\t\t\t\ttileMap[i + 1][j + 1] = new Tile(i + 1, j + 1, 0);\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void fillMap() {\n\t\tObject tile = new Object();\n\t\tfor(int x = 0; x < map.length; x++) {\n\t\t\tfor(int y = 0; y < map.length; y++) {\n\t\t\t\tmap[x][y] = tile;\n\t\t\t}\n\t\t}\n\t}", "public void createMap(int game_id) {\n\t\tSQLiteDatabase database = getWritableDatabase();\n\n\t\tContentValues mapVals = new ContentValues();\n\t\tmapVals.put(\"game_id\", game_id);\n\n\t\tdatabase.insert(\"map\", null, mapVals);\n\t}", "public void InitMap() {\n for (int i=0; i<m_mapSize; i++) {\n SetColour(i, null);\n }\n }", "public void printMap(GameMap map);", "public void setMap01(){\n\t\tmapSelect = \"map01.txt\";\n\t\treloadMap(mapSelect);\n\t\tsetImg(mapSelect);\n\t}", "public static void main(String[] args) {\n\t\tGnomenWald map = new GnomenWald();\n\t\tVillage v1 = new Village(\"Rochester\");\n\t\tGnome v1g1 = new Gnome(\"Thomas\", \"Red\", 1);\n\t\tGnome v1g2 = new Gnome(\"Jerry\", \"Blue\", 0);\n\t\tGnome v1g3 = new Gnome(\"Jordan\", \"Yellow\", 2);\n\t\tGnome v1g4 = new Gnome(\"Philips\", \"Purple\", 1);\n\t\tv1.addGnomes(v1g1); v1.addGnomes(v1g2); v1.addGnomes(v1g3); v1.addGnomes(v1g4);\n\t\tVillage v2 = new Village(\"Syracuse\");\n\t\tGnome v2g1 = new Gnome(\"Sarah\", \"Pink\", 3);\n\t\tGnome v2g2 = new Gnome(\"John\", \"Black\", 2);\n\t\tGnome v2g3 = new Gnome(\"Yelson\", \"White\", 1);\n\t\tGnome v2g4 = new Gnome(\"Jeremy\", \"Lightblue\", 4);\n\t\tv2.addGnomes(v2g1); v2.addGnomes(v2g2); v2.addGnomes(v2g3); v2.addGnomes(v2g4);\n\t\tVillage v3 = new Village(\"Ithaca\");\n\t\tGnome v3g1 = new Gnome(\"Frank\", \"Jet black\", 0);\n\t\tGnome v3g2 = new Gnome(\"Mark\", \"Brown\", 3);\n\t\tGnome v3g3 = new Gnome(\"Alan\", \"Cyan\", 0);\n\t\tGnome v3g4 = new Gnome(\"Ray\", \"Red\", 0);\n\t\tv3.addGnomes(v3g1); v3.addGnomes(v3g2); v3.addGnomes(v3g3); v3.addGnomes(v3g4);\n\t\tVillage v4 = new Village(\"New York\");\n\t\tGnome v4g1 = new Gnome(\"Jimmy\", \"White\", 2);\n\t\tGnome v4g2 = new Gnome(\"Joseph\", \"Red\", 2);\n\t\tGnome v4g3 = new Gnome(\"Amy\", \"Yellow\", 3);\n\t\tGnome v4g4 = new Gnome(\"Greenwich\", \"Green\", 1);\n\t\tv4.addGnomes(v4g1); v4.addGnomes(v4g2); v4.addGnomes(v4g3); v4.addGnomes(v4g4);\n\t\tVillage v5 = new Village(\"San Francisco\");\n\t\tGnome v5g1 = new Gnome(\"Bob\", \"Green\", 4);\n\t\tGnome v5g2 = new Gnome(\"Paul\", \"Pink\", 4);\n\t\tGnome v5g3 = new Gnome(\"Staple\", \"Jet Black\", 3);\n\t\tGnome v5g4 = new Gnome(\"Mary\", \"Purple\", 1);\n\t\tv5.addGnomes(v5g1); v5.addGnomes(v5g2); v5.addGnomes(v5g3); v5.addGnomes(v5g4);\n\t\t\n\t\tmap.addVillage(v1);\n\t\tmap.addVillage(v2);\n\t\tmap.addVillage(v3);\n\t\tmap.addVillage(v4);\n\t\tmap.addVillage(v5);\n\t\t\n\t\tmap.printVillages();\n\t\tv1.printGnomes();\n\t}", "public void Define() {\n manager = new Manager(); // Initialize other classes\n save = new Save();\n store = new Store();\n menu = new Menu();\n postgame = new PostGame();\n\n map = new ImageIcon(\"res/map.png\").getImage(); // Load background image\n \t\n \n // Load the track image\n track = new ImageIcon(\"res/TrackCorner.png\").getImage(); // Initialize the track image file\n \n // Load images for the towers\n tileset_towers[0] = new ImageIcon(\"res/redlasertower.png\").getImage();\n tileset_towers[1] = new ImageIcon(\"res/blueLaserTower.png\").getImage();\n tileset_towers[2] = new ImageIcon(\"res/goldLaserTower.png\").getImage();\n \n // Load images for the indicators\n tileset_indicators[0] = new ImageIcon(\"res/button.png\").getImage();\n tileset_indicators[1] = new ImageIcon(\"res/money.png\").getImage();\n tileset_indicators[2] = new ImageIcon(\"res/heart.png\").getImage();\n \n // Load images for the buttons\n tileset_buttons[0] = new ImageIcon(\"res/redLaserTower.png\").getImage();\n tileset_buttons[1] = new ImageIcon(\"res/blueLaserTower.png\").getImage();\n tileset_buttons[2] = new ImageIcon(\"res/goldLaserTower.png\").getImage();\n tileset_buttons[3] = new ImageIcon(\"res/trash.png\").getImage();\n \n // Load images for the solider\n tileset_soldier[0] = new ImageIcon(\"res/enemyD1.png\").getImage();\n tileset_soldier[1] = new ImageIcon(\"res/enemyD2.png\").getImage();\n \n tileset_soldier[2] = new ImageIcon(\"res/enemyR1.png\").getImage();\n tileset_soldier[3] = new ImageIcon(\"res/enemyR2.png\").getImage();\n \n tileset_soldier[4] = new ImageIcon(\"res/enemyL1.png\").getImage();\n tileset_soldier[5] = new ImageIcon(\"res/enemyL2.png\").getImage();\n \n tileset_soldier[6] = new ImageIcon(\"res/enemyU1.png\").getImage();\n tileset_soldier[7] = new ImageIcon(\"res/enemyU2.png\").getImage();\n \n // Save the configuration of the track\n save.loadSave(new File(\"save/mission.txt\"));\n save.loadHighScore();\n \n // Initialize enemy objects\n for(int i = 0; i < enemies.length; i++) {\n \tenemies[i] = new Enemy();\n }\n \n }", "public void printMiniMap() { }", "public void generateTerrain()\n\t{\n\t\tint rand;\n\t\tint starting=(int)(blocksWide*0.45);//Choose the first grass block\n\t\tblocksTall=(int)(blocksWide*0.6);\n\t\tfor(int i=0;i<blocksWide;i++)\n\t\t{\n\t\t\t//Determine whether the next block will go up a level, down a level or stay the same (55% chance of staying the same)\n\t\t\trand=ThreadLocalRandom.current().nextInt(0,3);\t\n\t\t\tif(rand!=0)\n\t\t\t{\n\t\t\t\trand=ThreadLocalRandom.current().nextInt(-1,2);\n\t\t\t}\n\t\t\tif(starting+rand<blocksTall-2 && starting+rand>4)\t//Make sure new position isn't too close to the top or bottom\n\t\t\t{\n\t\t\t\tstarting+=rand;\n\t\t\t}\n\t\t\tgrassy[i]=starting;\n\t\t\tgrassT[i]=ThreadLocalRandom.current().nextInt(0,3);\n\t\t\t//Generate a platform to allow for collision detection\n\t\t\tplatforms.add(new Platform((double)i/blocksWide,(double)starting/blocksTall,1.0/blocksWide,1.0/blocksWide));\n\t\t}\n\t\tplatforms.add(new Platform(0.0,0.0,0.0,0.0));\n\t}", "public void loadMap(Player player) {\r\n\tregionChucks = RegionBuilder.findEmptyChunkBound(8, 8); \r\n\tRegionBuilder.copyAllPlanesMap(235, 667, regionChucks[0], regionChucks[1], 8);\r\n\t\r\n\t}", "private void setUpMap() {\n if (points.size()>2) {\n drawCircle();\n }\n\n\n }", "private void startGame() {\r\n\t\tthis.gameMap.startGame();\r\n\t}", "public void newGame()\n\t{\n\t\tmap = new World(3, viewSize, playerFactions);\n\t\tview = new WorldView(map, viewSize, this);\n\t\tbar = new Sidebar(map, barSize);\n\t}", "private static void createMap()\r\n {\r\n position = new String[8][8];\r\n for(int i=0;i<8;i++)\r\n {\r\n int z=0;\r\n for(int j=72;j>=65;j--)\r\n {\r\n position[i][z]=(char)j+\"\"+(i+1); //uses ascii char placement for letters\r\n z++;\r\n }\r\n }\r\n \r\n }", "Map(int width, int height, long tileWidth, Boolean[][] clip, String[][] hooks)\n {\n this.width = width;\n this.height = height;\n this.tileWidth = tileWidth;\n this.clip = clip;\n this.hooks = hooks;\n\n hookCurrent = \"default_map\";\n hookSpawn = \"spawn\";\n }", "private static void initializeMaps()\n\t{\n\t\taddedPoints = new HashMap<String,String[][][]>();\n\t\tpopulatedList = new HashMap<String,Boolean>();\n\t\tloadedAndGenerated = new HashMap<String,Boolean>();\n\t}", "private void generateFirstMap(Node parent, int[] board, int player){\n\t\tint qCount = 0, i = -1;\n\t\ttry{\n\t\t\tint[][] queenPos = new int[4][2];\n\t\t\tfor(i = 0; i < board.length; i++){\n\t\t\t\tif(board[i] == player){\n\t\t\t\t\tqueenPos[qCount][0] = i%10; // X\n\t\t\t\t\tqueenPos[qCount][1] = i/10; // Y\n\t\t\t\t\tgenQueenMovesMap(generateFirstMapList[qCount++], board, i);\n\t\t\t\t\tif(qCount > 3){break;}\n\t\t\t\t}\n\t\t\t}\n\t\t\tint count = 0;\n\t\t\tfor(int[] movemap : generateFirstMapList){\n\t\t\t\tboard[queenPos[count][1]*GRID+queenPos[count][0]] = 0;\n\t\t\t\tfor(int x = 0; x <= 9; x++){\n\t\t\t\t\tfor(int y = 0; y <= 9; y++){\n\t\t\t\t\t\tif(movemap[y*GRID+x] != 0){\n\t\t\t\t\t\t\tgenShotMap(shotMapGlob, board, x, y);\n\t\t\t\t\t\t\tmultiply_shotmap(parent,movemap[y*GRID+x],shotMapGlob);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tboard[queenPos[count][1]*GRID+queenPos[count][0]] = player;\n\t\t\t\tcount++;\n\t\t\t}\n\t\t} catch (Exception e){\n\t\t\tSystem.out.println(\"q \"+qCount+\" i\"+i);\n\t\t\t//System.out.println(printMap(board));\n\t\t}\n\t}", "private void mapSetUp() {\n\t\tfor (int i = 0; i < allChar.length; i++) {\n\t\t\tmap.put(allChar[i], shuffledChar[i]);\n\t\t}\n\t}", "public GameField() { //generation of maze size and more\n for (int i = 0; i < 18; i++) {\n for (int j = 0; j < 18; j++) {\n System.out.print(\" \" + Map[i][j] + \" \");\n }\n System.out.println();\n }\n width = height = 40;\n }", "public void drawMap() {\n\t\tRoad[] roads = map.getRoads();\r\n\t\tfor (Road r : roads) {\r\n\t\t\tif (r.turn) {\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road = true;\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_vert = true;\r\n\t\t\t} else if (r.direction == Direction.NORTH)\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_north = true;\r\n\t\t\telse if (r.direction == Direction.SOUTH)\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_south = true;\r\n\t\t\telse if (r.direction == Direction.WEST)\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_west = true;\r\n\t\t\telse if (r.direction == Direction.EAST)\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_east = true;\r\n\t\t\ttry {\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].updateImage();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void createMapOfSecondType(){\n\n this.typeOfMap=2;\n matrixOfSquares[0][0] = createSquare( ColorOfFigure_Square.BLUE, true,0,0);\n matrixOfSquares[0][1] = createSquare( ColorOfFigure_Square.BLUE, false,0,1);\n matrixOfSquares[0][2] = createSquare(true, ColorOfFigure_Square.BLUE, true,0,2);\n matrixOfSquares[0][3] = createSquare( ColorOfFigure_Square.GREEN, true,0,3);\n matrixOfSquares[1][0] = createSquare(true, ColorOfFigure_Square.RED, true,1,0);\n matrixOfSquares[1][1] = createSquare( ColorOfFigure_Square.RED, true,1,1);\n matrixOfSquares[1][2] = createSquare( ColorOfFigure_Square.YELLOW, true,1,2);\n matrixOfSquares[1][3] = createSquare( ColorOfFigure_Square.YELLOW, true,1,3);\n matrixOfSquares[2][0] = null;\n matrixOfSquares[2][1] = createSquare( ColorOfFigure_Square.GREY, true,2,1);\n matrixOfSquares[2][2] = createSquare( ColorOfFigure_Square.YELLOW, true,2,2);\n matrixOfSquares[2][3] = createSquare(true, ColorOfFigure_Square.YELLOW, false,2,3);\n\n\n }", "public void buildMap() {\n // CUBES ENGINE INITIALIZATION MOVED TO APPSTATE METHOD\n // Here we init cubes engine\n CubesTestAssets.registerBlocks();\n CubesSettings blockSettings = CubesTestAssets.getSettings(this.app);\n blockSettings.setBlockSize(5);\n //When blockSize = 5, global coords should be multiplied by 3 \n this.blockScale = 3.0f;\n this.halfBlockStep = 0.5f;\n \n testTerrain = new BlockTerrainControl(CubesTestAssets.getSettings(this.app), new Vector3Int(4, 1, 4));\n testNode = new Node();\n int wallHeight = 3;\n //testTerrain.setBlockArea(new Vector3Int(0, 0, 0), new Vector3Int(32, 1, 64), CubesTestAssets.BLOCK_STONE);\n this.testTerrain.setBlockArea( new Vector3Int(3,0,43), new Vector3Int(10,1,10), CubesTestAssets.BLOCK_STONE); // Zone 1 Floor\n this.testTerrain.setBlockArea( new Vector3Int(3,1,43), new Vector3Int(10,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // South Wall\n this.testTerrain.setBlockArea( new Vector3Int(3,1,52), new Vector3Int(10,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // North Wall\n this.testTerrain.setBlockArea( new Vector3Int(3,1,43), new Vector3Int(1,wallHeight,10), CubesTestAssets.BLOCK_WOOD); // West Wall\n this.testTerrain.setBlockArea( new Vector3Int(12,1,43), new Vector3Int(1,wallHeight,10), CubesTestAssets.BLOCK_WOOD); // East Wall\n \n this.testTerrain.removeBlockArea( new Vector3Int(12,1,46), new Vector3Int(1,wallHeight,4)); // Door A\n \n this.testTerrain.setBlockArea( new Vector3Int(12,0,45), new Vector3Int(13,1,6), CubesTestAssets.BLOCK_STONE); // Zone 2 Floor A\n this.testTerrain.setBlockArea( new Vector3Int(12,1,45), new Vector3Int(8,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // South Wall\n this.testTerrain.setBlockArea( new Vector3Int(12,1,50), new Vector3Int(13,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // North Wall\n this.testTerrain.setBlockArea(new Vector3Int(19,0,42), new Vector3Int(6,1,3), CubesTestAssets.BLOCK_STONE); // Zone 2 Floor B\n this.testTerrain.setBlockArea( new Vector3Int(19,1,42), new Vector3Int(1,wallHeight,3), CubesTestAssets.BLOCK_WOOD); //\n this.testTerrain.setBlockArea( new Vector3Int(24,1,42), new Vector3Int(1,wallHeight,9), CubesTestAssets.BLOCK_WOOD); //\n \n this.testTerrain.setBlockArea( new Vector3Int(15,0,26), new Vector3Int(18,1,17), CubesTestAssets.BLOCK_STONE); // Zone 3 Floor\n this.testTerrain.setBlockArea( new Vector3Int(15,1,42), new Vector3Int(18,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // South Wall\n this.testTerrain.setBlockArea( new Vector3Int(15,1,26), new Vector3Int(18,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // North Wall\n this.testTerrain.setBlockArea( new Vector3Int(15,1,26), new Vector3Int(1,wallHeight,17), CubesTestAssets.BLOCK_WOOD); // West Wall\n this.testTerrain.setBlockArea( new Vector3Int(32,1,26), new Vector3Int(1,wallHeight,17), CubesTestAssets.BLOCK_WOOD); // East Wall\n \n this.testTerrain.removeBlockArea( new Vector3Int(20,1,42), new Vector3Int(4,wallHeight,1)); // Door B\n this.testTerrain.removeBlockArea( new Vector3Int(15,1,27), new Vector3Int(1,wallHeight,6)); // Door C\n \n this.testTerrain.setBlockArea( new Vector3Int(10,0,26), new Vector3Int(5,1,8), CubesTestAssets.BLOCK_STONE); // Zone 4 Floor A\n this.testTerrain.setBlockArea( new Vector3Int(10,1,26), new Vector3Int(5,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // South Wall\n this.testTerrain.setBlockArea( new Vector3Int(3,0,18), new Vector3Int(8,1,16), CubesTestAssets.BLOCK_STONE); // Zone 4 Floor B\n this.testTerrain.setBlockArea( new Vector3Int(3,1,18), new Vector3Int(1,wallHeight,16), CubesTestAssets.BLOCK_WOOD); // East Wall\n this.testTerrain.setBlockArea( new Vector3Int(10,1,18), new Vector3Int(1,wallHeight,9), CubesTestAssets.BLOCK_WOOD); // West Wall\n this.testTerrain.setBlockArea( new Vector3Int(3,1,33), new Vector3Int(13,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // North Wall\n \n this.testTerrain.setBlockArea( new Vector3Int(1,0,5), new Vector3Int(26,1,14), CubesTestAssets.BLOCK_STONE); // Zone 5\n this.testTerrain.setBlockArea( new Vector3Int(1,1,18), new Vector3Int(26,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // South Wall\n this.testTerrain.setBlockArea( new Vector3Int(1,1,5), new Vector3Int(26,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // North Wall\n this.testTerrain.setBlockArea( new Vector3Int(1,1,5), new Vector3Int(1,wallHeight,14), CubesTestAssets.BLOCK_WOOD); // West Wall\n this.testTerrain.setBlockArea( new Vector3Int(26,1,5), new Vector3Int(1,wallHeight,14), CubesTestAssets.BLOCK_WOOD); // East Wall\n \n this.testTerrain.removeBlockArea( new Vector3Int(4,1,18), new Vector3Int(6,wallHeight,1)); // Door E\n \n // Populate the world with spawn points\n this.initSpawnPoints();\n \n //Add voxel world/map to collisions\n testTerrain.addChunkListener(new BlockChunkListener(){\n @Override\n public void onSpatialUpdated(BlockChunkControl blockChunk){\n Geometry optimizedGeometry = blockChunk.getOptimizedGeometry_Opaque();\n phyTerrain = optimizedGeometry.getControl(RigidBodyControl.class);\n if(phyTerrain == null){\n phyTerrain = new RigidBodyControl(0);\n optimizedGeometry.addControl(phyTerrain);\n bulletAppState.getPhysicsSpace().add(phyTerrain);\n }\n phyTerrain.setCollisionShape(new MeshCollisionShape(optimizedGeometry.getMesh()));\n }\n });\n \n testNode.addControl(testTerrain);\n rootNode.attachChild(testNode);\n }", "private Map<String, Object> createDefaultMap() {\n Map<String, Object> result = new LinkedHashMap<>();\n result.put(\"stream_speed0\", 1);\n result.put(\"stream_start0\", 0);\n result.put(\"stream_end0\", 7);\n result.put(\"stream_speed1\", -2);\n result.put(\"stream_start1\", 15);\n result.put(\"stream_end1\", 19);\n\n result.put(\"fish_quantity\", numFishes);\n result.put(\"fish_reproduction\", 3);\n result.put(\"fish_live\", 10);\n result.put(\"fish_speed\", 2);\n result.put(\"fish_radius\", 4);\n\n result.put(\"shark_quantity\", numSharks);\n result.put(\"shark_live\", 20);\n result.put(\"shark_hungry\", 7);\n result.put(\"shark_speed\", 2);\n result.put(\"shark_radius\", 5);\n\n return result;\n }", "public GameMapHashMap() {\n HashMap<String, HashMap<String, String>> temporaryMap = new HashMap<>();\n instantiateIndividualRooms();\n\n temporaryMap.put(\"Atrium\", atrium);\n temporaryMap.put(\"Breakfast Nook\", breakfastNook);\n temporaryMap.put(\"Menagerie\", menagerie);\n temporaryMap.put(\"Conservatory\", conservatory);\n temporaryMap.put(\"Panic Room\", panicRoom);\n\n temporaryMap.put(\"Fire Swamps\", fireSwamps);\n temporaryMap.put(\"Hall\", hall);\n temporaryMap.put(\"Dining Room\", diningRoom);\n temporaryMap.put(\"Arcade\", arcade);\n temporaryMap.put(\"Observatory\", observatory);\n\n temporaryMap.put(\"Courtyard\", courtyard);\n temporaryMap.put(\"Library\", library);\n temporaryMap.put(\"Garden\", garden);\n temporaryMap.put(\"Laboratory\", laboratory);\n temporaryMap.put(\"Kitchen\", kitchen);\n\n rooms = Collections.unmodifiableMap(temporaryMap);\n }", "private JButton defaultMap() {\n JButton defaultMap = new JButton(\"Default maps\");\n defaultMap.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n builder.defaultMap();\n window.setVisible(false);\n }\n });\n return defaultMap;\n }", "public void initializeMaps() {\n\t\t//can use any map\n\n\t\t//left map\n\t int x = 0, y = 0;\n\t int Lvalue;\n\t \n\t try {\n\t \t//***change to your local path for the map you want to test\n\t \tBufferedReader input = new BufferedReader(new FileReader(\"/Users/NeeCee/Classes/4444/MirrorUniverse/maps/g6maps/lessEasyLeft.txt\"));\n\t \tString line;\n\t \twhile((line = input.readLine()) != null) {\n\t \t\tString[] vals = line.split(\" \");\n\t \t\tfor(String str : vals) {\n\t \t\t\tLvalue = Integer.parseInt(str);\n\t \t\t\tleftMap[x][y] = Lvalue;\n\t \t\t\t++y;\n\t \t\t}\n\t \t\t\n\t \t\t++x;\n\t \t\ty = 0;\n\t \t}\n\t \t\n\t \tinput.close();\n\t } catch (IOException ioex) {\n\t \tSystem.out.println(\"error reading in map for testing\");\n\t }\n\t \n\t //right map\n\t x = 0;\n\t y = 0;\n\t int Rvalue;\n\t \n\t try {\n\t \t//***change to your local path for the map you want to test\n\t \t//change to map you want to test\n\t \tBufferedReader input = new BufferedReader(new FileReader(\"/Users/NeeCee/Classes/4444/MirrorUniverse/maps/g6maps/lessEasyRight.txt\"));\n\t \tString line;\n\t \twhile((line = input.readLine()) != null) {\n\t \t\tString[] vals = line.split(\" \");\n\t \t\tfor(String str : vals) {\n\t \t\t\tRvalue = Integer.parseInt(str);\n\t \t\t\trightMap[x][y] = Rvalue;\n\t \t\t\t++y;\n\t \t\t}\n\t \t\t++x;\n\t \t\ty = 0;\n\t \t}\n\t \t\n\t \tinput.close();\n\t } catch (IOException ioex) {\n\t \tSystem.out.println(\"error reading in map for testing\");\n\t }\n\t \n\t //print each map for testing\n\t for(int i = 0; i < leftMap.length; i++ )\n\t \tfor(int j = 0; j < leftMap[i].length; j++ )\n\t \t\tSystem.out.println(leftMap[i][j]);\n\t System.out.println(\"*-----------------*\");\n\t for(int i = 0; i < rightMap.length; i++ )\n\t \tfor(int j = 0; j < rightMap[i].length; j++ )\n\t \t\tSystem.out.println(rightMap[i][j]);\n\t}", "private void setupDefaultHarbourMap() {\n defaultHarbourMap.put(getHashCodeofPair(-3,-11), HarbourKind.SPECIAL_BRICK);\n defaultHarbourMap.put(getHashCodeofPair(-2,-10), HarbourKind.SPECIAL_BRICK);\n defaultHarbourMap.put(getHashCodeofPair(0,-10), HarbourKind.GENERIC);\n defaultHarbourMap.put(getHashCodeofPair(1,-11), HarbourKind.GENERIC);\n defaultHarbourMap.put(getHashCodeofPair(2,-10), HarbourKind.SPECIAL_ORE);\n defaultHarbourMap.put(getHashCodeofPair(2,-8), HarbourKind.SPECIAL_ORE);\n defaultHarbourMap.put(getHashCodeofPair(-5,-7), HarbourKind.SPECIAL_WOOD);\n defaultHarbourMap.put(getHashCodeofPair(-4,-8), HarbourKind.SPECIAL_WOOD);\n defaultHarbourMap.put(getHashCodeofPair(-5,-5), HarbourKind.GENERIC);\n defaultHarbourMap.put(getHashCodeofPair(-4,-4), HarbourKind.GENERIC);\n defaultHarbourMap.put(getHashCodeofPair(3,-5), HarbourKind.SPECIAL_GRAIN);\n defaultHarbourMap.put(getHashCodeofPair(4,-4), HarbourKind.SPECIAL_GRAIN);\n defaultHarbourMap.put(getHashCodeofPair(-2,2), HarbourKind.SPECIAL_WOOL);\n defaultHarbourMap.put(getHashCodeofPair(-1,1), HarbourKind.SPECIAL_WOOL);\n defaultHarbourMap.put(getHashCodeofPair(1,1), HarbourKind.GENERIC);\n defaultHarbourMap.put(getHashCodeofPair(2,2), HarbourKind.GENERIC);\n }", "public void setUp() throws IOException \n\t{\n\t\tMapSelectionView mapSelectionView = new MapSelectionView();\n\t\tplayerNumber = mapSelectionView.print(4);\t//4 max players\n\t\tmap.setPlayers(playerNumber);\n\t\tHashMap<Integer, String> possibleStrategies = new HashMap<Integer, String>();\n\t\tpossibleStrategies.put(1, \"Aggressive\");\n\t\tpossibleStrategies.put(2, \"Benevolent\");\n\t\tpossibleStrategies.put(3, \"Random\");\n\t\tpossibleStrategies.put(4, \"Cheater\");\n\t\t\n\t\tfor(Player p : map.players) {\n\t\t\tint strat = mapSelectionView.askTournamentStrategy(p.getNumber(), possibleStrategies);\n\t\t\t\n\t\t\tswitch(strat) {\n\t\t\t\tcase 1:\n\t\t\t\t\tp.setStrategy(new Aggressive());\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tp.setStrategy(new Benevolent());\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tp.setStrategy(new Random());\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tp.setStrategy(new Cheater());\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tpossibleStrategies.remove(strat);\n\t\t}\n\t\tplayers = map.players;\t//Memorizing players of the tournament\n\t\t\n\t\tint mapNumber = mapSelectionView.askMapNumber();\n\t\t\n\t\tfor(int i = 1; i <= mapNumber; i++) {\n\t\t\tString mapFilePath = mapSelectionView.selectMap();\n\t\t\tMap map = new Map();\n\t\t\tmap.setPlayers(playerNumber);\n\t\t\tmap.load(mapFilePath);\t//Check if map is correct\n\t\t\tmaps.add(mapFilePath);\n\t\t}\n\t\t\n\t\tgamesNumber = mapSelectionView.askGameNumber();\n\t\tmaximumTurns = mapSelectionView.askGameMaxTurns();\n\t}", "private void createMapOfThirdType(){\n\n this.typeOfMap=3;\n matrixOfSquares[0][0] = createSquare( ColorOfFigure_Square.RED, true,0,0);\n matrixOfSquares[0][1] = createSquare( ColorOfFigure_Square.BLUE, true,0,1);\n matrixOfSquares[0][2] = createSquare(true, ColorOfFigure_Square.BLUE, true,0,2);\n matrixOfSquares[0][3] = createSquare( ColorOfFigure_Square.GREEN, true,0,3);\n matrixOfSquares[1][0] = createSquare(true, ColorOfFigure_Square.RED, true,1,0);\n matrixOfSquares[1][1] = createSquare( ColorOfFigure_Square.PURPLE, true,1,1);\n matrixOfSquares[1][2] = createSquare( ColorOfFigure_Square.YELLOW, true,1,2);\n matrixOfSquares[1][3] = createSquare( ColorOfFigure_Square.YELLOW, true,1,3);\n matrixOfSquares[2][0] = createSquare( ColorOfFigure_Square.GREY, true,2,0);\n matrixOfSquares[2][1] = createSquare( ColorOfFigure_Square.GREY, true,2,1);\n matrixOfSquares[2][2] = createSquare( ColorOfFigure_Square.YELLOW, true,2,2);\n matrixOfSquares[2][3] = createSquare(true, ColorOfFigure_Square.YELLOW, false,2,3);\n\n }", "public void generateLevel() {\n\t\tfor (int y = 0; y < this.height; y++) {\n\t\t\tfor (int x = 0; x < this.width; x++) {\n\t\t\t\tif (x * y % 10 < 5)\n\t\t\t\t\ttiles[x + y * width] = Tile.GRASS.getId();\n\t\t\t\telse\n\t\t\t\t\ttiles[x + y * width] = Tile.STONE.getId();\n\t\t\t}\n\t\t}\n\t}", "@SuppressWarnings(\"unchecked\")\r\n private void newMap() throws IOException, ClassNotFoundException {\r\n this.music_map.clear();\r\n if (needNewMap()) {\r\n if (!save_file.exists()) {\r\n System.out.println(\"DIZIONARIO NON PRESENTE\");\r\n System.out.println(\"CREAZIONE NUOVO DIZIONARIO IN CORSO...\");\r\n\r\n this.setTarget();\r\n\r\n this.recoursiveMapCreation(this.music_root);\r\n this.saveMap();\r\n } else {\r\n System.out.println(\"DIZIONARIO NON AGGIORNATO\");\r\n if (!UtilFunctions.newDictionaryRequest(this.save_file, this.music_root)) {\r\n System.out.println(\"AGGIORNAMENTO DIZIONARIO RIFIUTATO\");\r\n FileInputStream f = new FileInputStream(this.save_file);\r\n ObjectInputStream o = new ObjectInputStream(f);\r\n this.music_map.putAll((Map<String, String[]>) o.readObject());\r\n current.set(ProgressDialog.TOTAL.get());\r\n } else {\r\n System.out.println(\"CREAZIONE NUOVO DIZIONARIO IN CORSO...\");\r\n this.setTarget();\r\n this.recoursiveMapCreation(this.music_root);\r\n this.saveMap();\r\n }\r\n }\r\n } else {\r\n System.out.println(\"DIZIONARIO GIA' PRESENTE\");\r\n FileInputStream f = new FileInputStream(this.save_file);\r\n ObjectInputStream o = new ObjectInputStream(f);\r\n this.music_map.putAll((Map<String, String[]>) o.readObject());\r\n current.set(ProgressDialog.TOTAL.get());\r\n }\r\n }", "public void drawMap() {\r\n\t\tfor (int x = 0; x < map.dimensionsx; x++) {\r\n\t\t\tfor (int y = 0; y < map.dimensionsy; y++) {\r\n\t\t\t\tRectangle rect = new Rectangle(x * scalingFactor, y * scalingFactor, scalingFactor, scalingFactor);\r\n\t\t\t\trect.setStroke(Color.BLACK);\r\n\t\t\t\tif (islandMap[x][y]) {\r\n\t\t\t\t\tImage isl = new Image(\"island.jpg\", 50, 50, true, true);\r\n\t\t\t\t\tislandIV = new ImageView(isl);\r\n\t\t\t\t\tislandIV.setX(x * scalingFactor);\r\n\t\t\t\t\tislandIV.setY(y * scalingFactor);\r\n\t\t\t\t\troot.getChildren().add(islandIV);\r\n\t\t\t\t} else {\r\n\t\t\t\t\trect.setFill(Color.PALETURQUOISE);\r\n\t\t\t\t\troot.getChildren().add(rect);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void createNewGame() {\n\t\tfor(int n = 0; n < 8; n++){\n\t\t\tfor(int j = 0; j < 8; j++){\n\t\t\t\tif ( n % 2 == j % BLACK_PAWN ) {\n\t\t\t\t\tif (n < 3)\n\t\t\t\t\t\tarr[n][j] = RED_PAWN;\n\t\t\t\t\telse if (n > 4)\n\t\t\t\t\t\tarr[n][j] = BLACK_PAWN;\n\t\t\t\t\telse\n\t\t\t\t\t\tarr[n][j] = EMPTY;\n\t\t } \n\t\t\t\telse\n\t\t\t\t\tarr[n][j] = EMPTY;\n\t\t\t}\n\t\t}\n\t}", "private item[][] newMap() \r\n\t{\n\t\tinitialItems=50;\r\n\t\t\r\n\t\titem cReg = new item(\"cash register\");\r\n\t\titem door = new item(\"door\");\r\n\t\t\r\n\t\titem[][] array = new item[][] {\r\n\t\t {wall(), wall(), wall(), wall(), wall(), wall(), wall(), wall(), wall(), wall()},\r\n\t\t {wall(), path(), path(), path(), path(), path(), path(), path(), path(), wall()},\r\n\t\t {wall(), path(), hPhn(), hPhn(), hPhn(), hPhn(), hPhn(), hPhn(), path(), wall()},\r\n\t\t {wall(), path(), path(), path(), path(), path(), path(), path(), path(), wall()},\r\n\t\t {wall(), path(), hPhn(), hPhn(), hPhn(), hPhn(), hPhn(), hPhn(), path(), wall()},\r\n\t\t {wall(), path(), path(), path(), path(), path(), path(), path(), path(), wall()},\r\n\t\t {wall(), path(), path(), path(), hPhn(), path(), hPhn(), path(), hPhn(), wall()},\r\n\t\t {wall(), path(), path(), path(), hPhn(), path(), hPhn(), path(), hPhn(), wall()},\r\n\t\t {wall(), cReg, cReg, path(), path(), path(), hPhn(), path(), hPhn(), wall()},\r\n\t\t {wall(), wall(), wall(), wall(), wall(), wall(), wall(), door, wall(), wall()},\r\n\t\t {wall(), wall(), wall(), wall(), wall(), wall(), wall(), wall(), wall(), wall()},\r\n\t\t};\r\n\t\t\r\n\t\tdoorX=7;\r\n\t\tdoorY=9;\r\n\t\t\r\n\t\treturn array;\r\n\t}", "Graph<Integer, DefaultEdge> buildMap();", "private void createTurtleMap () {\n turtleInstructions.put(\"Forward\", new TurtleForward());\n turtleInstructions.put(\"Backward\", new TurtleBackward());\n turtleInstructions.put(\"Right\", new TurtleRight());\n turtleInstructions.put(\"Left\", new TurtleLeft());\n turtleInstructions.put(\"SetHeading\", new TurtleSetHeading());\n turtleInstructions.put(\"SetTowards\", new TurtleSetTowards());\n turtleInstructions.put(\"SetPosition\", new TurtleSetPosition());\n turtleInstructions.put(\"PenUp\", new TurtlePenUp());\n turtleInstructions.put(\"PenDown\", new TurtlePenDown());\n turtleInstructions.put(\"ShowTurtle\", new TurtleShowTurtle());\n turtleInstructions.put(\"HideTurtle\", new TurtleHideTurtle());\n turtleInstructions.put(\"Home\", new TurtleHome());\n turtleInstructions.put(\"ClearScreen\", new TurtleClearScreen());\n turtleInstructions.put(\"XCoordinate\", new TurtleXCor());\n turtleInstructions.put(\"YCoordinate\", new TurtleYCor());\n turtleInstructions.put(\"Heading\", new TurtleHeading());\n turtleInstructions.put(\"IsPenDown\", new TurtleIsPenDown());\n turtleInstructions.put(\"IsShowing\", new TurtleIsShowing()); \n displayInstructions.put(\"SetBackground\", new DisplaySetBackground());\n displayInstructions.put(\"SetPenColor\", new DisplaySetPenColor());\n displayInstructions.put(\"SetPenSize\", new DisplaySetPenSize());\n displayInstructions.put(\"SetShape\", new DisplaySetShape());\n displayInstructions.put(\"SetPalette\", new DisplaySetPalette());\n displayInstructions.put(\"GetPenColor\", new DisplayPenColor());\n displayInstructions.put(\"GetShape\", new DisplayShape());\n displayInstructions.put(\"Stamp\", new DisplayStamp());\n displayInstructions.put(\"ClearStamps\", new DisplayClearStamps());\n multiTurtleInstructions.put(\"ID\", new TurtleID());\n multiTurtleInstructions.put(\"Turtles\", new TurtleTurtles());\n multiTurtleInstructions.put(\"Tell\", new TurtleTellMulti());\n // multiTurtleInstructions.put(\"Ask\", new TurtleAsk());\n //multiTurtleInstructions.put(\"AskWith\", new TurtleAskWith());\n }", "private void generateMap(){\n if(currDirections != null){\n\n\t \tPoint edge = new Point(mapPanel.getWidth(), mapPanel.getHeight());\n \tmapPanel.paintImmediately(0, 0, edge.x, edge.y);\n\t \t\n\t \t\n\t \t// setup advanced graphics object\n\t Graphics2D g = (Graphics2D)mapPanel.getGraphics();\n\t g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n\t g.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE);\n\n\t \n\t Route rt = currDirections.getRoute();\n\t\n\t boolean singleStreet = rt.getGeoSegments().size() == 1;\n\t Route contextRoute = (!singleStreet ? rt : \n\t \t\tnew Route( virtualGPS.findFullSegment(rt.getEndingGeoSegment()) ) );\n\t \n\t // calculate the longitude and latitude bounds\n\t int[] bounds = calculateCoverage( contextRoute , edge);\n\t \n\t Collection<StreetSegment> map = virtualGPS.getContext(bounds, contextRoute);\n\t \n\t \n\t // draw every segment of the map\n\t g.setColor(Color.GRAY);\n\t for(GeoSegment gs : map){\n\t \tdrawSegment(g, bounds, edge, gs);\n\t }\n\t \n\t // draw the path over the produced map in BLUE\n\t g.setColor(Color.BLUE);\n\t for(GeoFeature gf : rt.getGeoFeatures()){\n\t for(GeoSegment gs : gf.getGeoSegments()){\n\t\t \tdrawSegment(g, bounds, edge, gs);\n\t }\n\t Point start = derivePoint(bounds, edge, gf.getStart());\n\t Point end = derivePoint(bounds, edge, gf.getEnd());\n\t \n\t int dX = (int)(Math.abs(start.x - end.x) / 2.0);\n\t int dY = (int)(Math.abs(start.y - end.y) / 2.0);\n\n if(!jCheckBoxHideStreetNames.isSelected()){\n \tg.setFont(new Font(g.getFont().getFontName(), Font.BOLD, g.getFont().getSize()));\n \tg.drawString(gf.getName(), start.x + (start.x<end.x ? dX : -dX),\n \t\t\tstart.y + (start.y<end.y ? dY : -dY));\n }\n\t }\n }\n }", "public void resetMap() {\n for (int x = 0; x < cells; x++) {\n for (int y = 0; y < cells; y++) {\n Node current = map[x][y];\n if (current.getType() == 4 || current.getType() == 5)\n map[x][y] = new Node(3, x, y);\n }\n }\n\n if (startx > -1 && starty > -1) { //RESET THE START AND FINISH\n map[startx][starty] = new Node(0, startx, starty);\n map[startx][starty].setJumps(0);\n }\n\n if (finishx > -1 && finishy > -1)\n map[finishx][finishy] = new Node(1, finishx, finishy);\n\n reset(); //RESET SOME VARIABLES\n }", "public GameMap map() {\n\t\treturn map;\n\t}", "private void updateMap() {\n\t\tfor (int i = 0; i < 12; i++) {\n\t\t\tfor (int j = 0; j < 12; j++) {\n\t\t\t\tif (newMap[i][j] instanceof Player) {\n\t\t\t\t\tmap[i][j] = new Player(i, j, board);\n\t\t\t\t} else if (newMap[i][j] instanceof BlankSpace) {\n\t\t\t\t\tmap[i][j] = new BlankSpace(i, j, board);\n\t\t\t\t} else if (newMap[i][j] instanceof Mho) {\n\t\t\t\t\tmap[i][j] = new Mho(i, j, board);\n\t\t\t\t} else if (newMap[i][j] instanceof Fence) {\n\t\t\t\t\tmap[i][j] = new Fence(i, j, board);\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tprotected void generateTiles() {\n\t}", "public GameLogic(){\n\t\tplayerPosition = new HashMap<Integer, int[]>();\n\t\tcollectedGold = new HashMap<Integer, Integer>();\n\t\tmap = new Map();\n\t}" ]
[ "0.75134027", "0.72928447", "0.724776", "0.7236694", "0.7073214", "0.7073214", "0.69724613", "0.6925908", "0.6899871", "0.68670744", "0.686013", "0.68100226", "0.6735718", "0.6729454", "0.6720266", "0.65923816", "0.65782934", "0.6572377", "0.6546378", "0.6546378", "0.6486732", "0.646567", "0.64443326", "0.6433214", "0.6423923", "0.6421612", "0.63894355", "0.63703054", "0.63332385", "0.6318018", "0.6317849", "0.63153356", "0.63039654", "0.62704176", "0.6240724", "0.6239718", "0.62235194", "0.6204527", "0.61852306", "0.616929", "0.61456037", "0.6142375", "0.6139179", "0.6135557", "0.6134173", "0.6119617", "0.61189926", "0.61178476", "0.61098284", "0.6083181", "0.60814714", "0.6077775", "0.60561824", "0.6041111", "0.602463", "0.6023887", "0.60231805", "0.60214984", "0.60146695", "0.6009047", "0.59994787", "0.5998901", "0.5996567", "0.59930426", "0.59673876", "0.59585553", "0.5954548", "0.59350926", "0.59288013", "0.5918649", "0.5918371", "0.5910435", "0.5907436", "0.5898365", "0.58820736", "0.5879945", "0.5873419", "0.5867836", "0.5862961", "0.58516634", "0.5849333", "0.5843522", "0.58379537", "0.5828744", "0.5822876", "0.5820667", "0.5807886", "0.57999325", "0.57992715", "0.57957053", "0.57845384", "0.5779511", "0.5777342", "0.57709986", "0.5768728", "0.575769", "0.57560396", "0.575364", "0.5752245", "0.57521105" ]
0.6118829
47
Created by Himanshu on 4/4/2017.
public interface ProfileContactView { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "public final void mo51373a() {\n }", "private stendhal() {\n\t}", "@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 bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "private void poetries() {\n\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void mo38117a() {\n }", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n protected void getExras() {\n }", "private void m50366E() {\n }", "@Override\n public int describeContents() { return 0; }", "public void mo4359a() {\n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n public int retroceder() {\n return 0;\n }", "public void gored() {\n\t\t\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\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\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n public void init() {\n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n void init() {\n }", "@Override\n protected void initialize() {\n\n \n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@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 }", "@Override\n public void init() {}", "@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 initialize() \n {\n \n }", "@Override\r\n\tpublic void init() {}", "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 dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void nefesAl() {\n\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 protected void init() {\n }", "private void kk12() {\n\n\t}", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "private void init() {\n\n\t}", "@Override public int describeContents() { return 0; }", "private void strin() {\n\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}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void m23075a() {\n }", "@Override\r\n\tpublic void just() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "public void mo12628c() {\n }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n public int getSize() {\n return 1;\n }", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tpublic void init() {\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n public int getOrder() {\n return 4;\n }", "@Override\n public int getOrder() {\n return 0;\n }" ]
[ "0.607878", "0.5884346", "0.58755845", "0.5868029", "0.58413374", "0.5813396", "0.5792164", "0.5792164", "0.57469076", "0.5722884", "0.5682739", "0.5660527", "0.5654825", "0.56512237", "0.5648515", "0.56455004", "0.56296796", "0.5583237", "0.5580984", "0.5573534", "0.5572057", "0.55594987", "0.5535858", "0.5529834", "0.5520054", "0.55199206", "0.5515002", "0.5506516", "0.5497757", "0.54841924", "0.5483873", "0.5483873", "0.5483873", "0.5483873", "0.5483873", "0.5478726", "0.547494", "0.5457723", "0.5431916", "0.5421552", "0.5415391", "0.5408972", "0.53967386", "0.53943866", "0.5390703", "0.53893", "0.53883004", "0.53883004", "0.53825724", "0.5377678", "0.53675425", "0.5353533", "0.5353533", "0.5353533", "0.5353533", "0.5353533", "0.5353533", "0.53486186", "0.5347096", "0.5347096", "0.5347096", "0.5346124", "0.53418297", "0.5339127", "0.5339127", "0.5339127", "0.5339127", "0.5339127", "0.5339127", "0.5339127", "0.53368294", "0.53368294", "0.5333875", "0.5332388", "0.5325572", "0.5325572", "0.5325572", "0.53176826", "0.5316285", "0.53141767", "0.5309688", "0.5309688", "0.53094834", "0.5308989", "0.5304695", "0.5304299", "0.5304299", "0.5304299", "0.5303347", "0.5299378", "0.5297745", "0.5285593", "0.52828753", "0.52757967", "0.52731377", "0.5271094", "0.52691317", "0.526463", "0.5264487", "0.52562946", "0.525134" ]
0.0
-1
/ access modifiers changed from: protected
@Override // com.android.systemui.statusbar.policy.SignalController public WifiState cleanState() { return new WifiState(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "private abstract void privateabstract();", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\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 ligar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void smell() {\n\t\t\n\t}", "public abstract Object mo26777y();", "protected void h() {}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "protected abstract Set method_1559();", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public abstract void mo70713b();", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "protected Doodler() {\n\t}", "public abstract void mo27386d();", "@Override\n\tprotected void getExras() {\n\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}", "private PropertyAccess() {\n\t\tsuper();\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public abstract void mo56925d();", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void init() {\n }", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void emprestimo() {\n\n\t}", "public abstract void mo27385c();", "@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}", "@Override\n public void memoria() {\n \n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void smthAbstr() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tpublic void dosomething() {\n\t\t\n\t}", "protected boolean func_70814_o() { return true; }", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "public abstract void mo30696a();", "abstract int pregnancy();", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n void init() {\n }", "private TMCourse() {\n\t}", "@Override\n\tpublic void leti() \n\t{\n\t}", "public abstract void mo35054b();", "@Override\n public void init() {\n }", "@Override\n\tpublic void buscar() {\n\t\t\n\t}", "private Infer() {\n\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void erstellen() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public final void mo51373a() {\n }", "protected FanisamBato(){\n\t}", "protected void method_3848() {\r\n super.method_3848();\r\n }", "public abstract Object mo1771a();", "public abstract void m15813a();", "@Override\n public void get() {}", "public void gored() {\n\t\t\n\t}", "@Override\n\tpublic void dibuja() {\n\t\t\n\t}", "@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 }", "private Get() {}", "private Get() {}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "public abstract void mo27464a();", "public abstract String mo41079d();", "@Override\n\tpublic void classroom() {\n\t\t\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\n\tpublic void verkaufen() {\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void logic() {\n\n\t}", "public abstract void mo102899a();", "@SuppressWarnings(\"unused\")\n private void _read() {\n }", "public abstract void mo42329d();", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "public void method_4270() {}", "public abstract void mo6549b();", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void function() {\n\t\t\n\t}", "public abstract String mo118046b();" ]
[ "0.7375959", "0.70425177", "0.69218665", "0.6908857", "0.68462455", "0.68293995", "0.6805953", "0.6583417", "0.65397364", "0.65014184", "0.6491877", "0.6491877", "0.6472813", "0.64386034", "0.6432003", "0.6432003", "0.64291835", "0.6425716", "0.6419082", "0.6409203", "0.6406647", "0.6401983", "0.6399918", "0.63980156", "0.63775325", "0.637381", "0.6371243", "0.63685536", "0.6354125", "0.63342035", "0.6326444", "0.6326444", "0.6326272", "0.63074166", "0.6279543", "0.62711143", "0.62517804", "0.6225546", "0.6221585", "0.6214133", "0.62042844", "0.6195285", "0.6182919", "0.6176472", "0.61582804", "0.6138921", "0.6122121", "0.6118945", "0.6118614", "0.61002874", "0.60924006", "0.60924006", "0.60867274", "0.6084558", "0.6070018", "0.6070004", "0.60676074", "0.60570544", "0.6047126", "0.6047071", "0.6034709", "0.6031872", "0.6025553", "0.6020158", "0.60166955", "0.6015039", "0.6011175", "0.5995864", "0.59951955", "0.599483", "0.5992563", "0.59914196", "0.5985271", "0.59848785", "0.59677714", "0.5967113", "0.5967113", "0.5967113", "0.5967113", "0.5967113", "0.5967113", "0.5966056", "0.5966056", "0.59610426", "0.59567136", "0.5953479", "0.59491515", "0.5945194", "0.594085", "0.59344965", "0.5932654", "0.5932434", "0.59303945", "0.5929808", "0.5926648", "0.5924341", "0.59239006", "0.5923369", "0.59223837", "0.59204763", "0.59188694" ]
0.0
-1
/ access modifiers changed from: packageprivate
public void refreshLocale() { this.mWifiTracker.refreshLocale(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n protected void prot() {\n }", "public void method_4270() {}", "@Override\n public void func_104112_b() {\n \n }", "private void m50366E() {\n }", "private void kk12() {\n\n\t}", "public final void mo51373a() {\n }", "@Override\n public void perish() {\n \n }", "public abstract void mo70713b();", "public void m23075a() {\n }", "public void mo38117a() {\n }", "private MApi() {}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public abstract void mo56925d();", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "public void mo21779D() {\n }", "public abstract void mo27386d();", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "void m1864a() {\r\n }", "public abstract Object mo26777y();", "public void mo21825b() {\n }", "protected boolean func_70814_o() { return true; }", "public final void mo91715d() {\n }", "public abstract void mo27385c();", "public void mo97908d() {\n }", "public void mo21782G() {\n }", "private TMCourse() {\n\t}", "private test5() {\r\n\t\r\n\t}", "private Util() { }", "protected void mo6255a() {\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "private abstract void privateabstract();", "public void mo21877s() {\n }", "public void mo21787L() {\n }", "private MigrationInstantiationUtil() {\n\t\tthrow new IllegalAccessError();\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "private Utils() {}", "private Utils() {}", "private Utils() {}", "private Utils() {}", "public void mo21791P() {\n }", "private MetallicityUtils() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "public void mo55254a() {\n }", "public abstract void mo6549b();", "public void mo23813b() {\n }", "@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 }", "public void mo44053a() {\n }", "public void smell() {\n\t\t\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 }", "public void mo115190b() {\n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "public void mo21785J() {\n }", "public void mo21793R() {\n }", "public void mo21878t() {\n }", "public void mo56167c() {\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public abstract String mo118046b();", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "public void mo115188a() {\n }", "private SourcecodePackage() {}", "public abstract String mo41079d();", "void mo57277b();", "public void mo6944a() {\n }", "public abstract void mo42329d();", "public abstract void mo30696a();", "private final zzgy zzgb() {\n }", "protected boolean func_70041_e_() { return false; }", "private Utils() {\n\t}", "private Utils() {\n\t}", "zzafe mo29840Y() throws RemoteException;", "private Singletion3() {}", "public abstract void mo42331g();", "public abstract String mo13682d();", "public abstract void mo35054b();", "public void mo21786K() {\n }", "public void mo3376r() {\n }", "public void mo3749d() {\n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public void mo21794S() {\n }", "public void mo12628c() {\n }", "private Infer() {\n\n }", "public void mo9848a() {\n }", "public abstract void mo27464a();", "private OMUtil() { }", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "public void mo2740a() {\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 NativeSupport() {\n\t}", "@Override\n public boolean isPrivate() {\n return true;\n }" ]
[ "0.71516633", "0.66861993", "0.6557671", "0.64844686", "0.64307094", "0.63860685", "0.63849354", "0.6347811", "0.63300216", "0.62775", "0.6263697", "0.6250632", "0.623687", "0.6232753", "0.6229871", "0.61984533", "0.61984533", "0.6195501", "0.6184757", "0.6180239", "0.61578304", "0.6153741", "0.6152476", "0.61176836", "0.6109759", "0.6109044", "0.6088962", "0.60828936", "0.60719246", "0.6070167", "0.60564125", "0.6056111", "0.6055323", "0.60524994", "0.6050629", "0.60480267", "0.6043975", "0.60367846", "0.60236895", "0.60236895", "0.60236895", "0.60236895", "0.6020544", "0.6019258", "0.6018533", "0.60168415", "0.6006017", "0.60033923", "0.5999393", "0.5997694", "0.59972477", "0.5995712", "0.5991592", "0.5991592", "0.5991592", "0.5991592", "0.5991592", "0.5991592", "0.5991592", "0.5991073", "0.5986796", "0.5986796", "0.59851515", "0.5983399", "0.5973699", "0.5959469", "0.5957937", "0.59529465", "0.5952122", "0.5947705", "0.5946681", "0.59460294", "0.5943831", "0.5940968", "0.59386706", "0.5938424", "0.59269255", "0.59263015", "0.5925614", "0.5925614", "0.5914091", "0.59093624", "0.59058833", "0.5905594", "0.590547", "0.5900196", "0.58974063", "0.58947027", "0.5893353", "0.58907384", "0.5882495", "0.58781415", "0.587773", "0.58772564", "0.58755565", "0.58733183", "0.5867433", "0.5866107", "0.5866107", "0.5865901", "0.58642817" ]
0.0
-1
/ access modifiers changed from: private
public void handleStatusUpdated() { copyWifiStates(); notifyListenersIfNecessary(); }
{ "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: packageprivate
public boolean isCarrierMergedWifi(int i) { T t = this.mCurrentState; return ((WifiState) t).isDefault && ((WifiState) t).isCarrierMerged && ((WifiState) t).subId == i; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n protected void prot() {\n }", "public void method_4270() {}", "@Override\n public void func_104112_b() {\n \n }", "private void m50366E() {\n }", "private void kk12() {\n\n\t}", "public final void mo51373a() {\n }", "@Override\n public void perish() {\n \n }", "public abstract void mo70713b();", "public void m23075a() {\n }", "public void mo38117a() {\n }", "private MApi() {}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public abstract void mo56925d();", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "public void mo21779D() {\n }", "public abstract void mo27386d();", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "void m1864a() {\r\n }", "public abstract Object mo26777y();", "public void mo21825b() {\n }", "protected boolean func_70814_o() { return true; }", "public final void mo91715d() {\n }", "public abstract void mo27385c();", "public void mo97908d() {\n }", "public void mo21782G() {\n }", "private TMCourse() {\n\t}", "private test5() {\r\n\t\r\n\t}", "private Util() { }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "protected void mo6255a() {\n }", "private abstract void privateabstract();", "public void mo21877s() {\n }", "public void mo21787L() {\n }", "private MigrationInstantiationUtil() {\n\t\tthrow new IllegalAccessError();\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "private Utils() {}", "private Utils() {}", "private Utils() {}", "private Utils() {}", "private MetallicityUtils() {\n\t\t\n\t}", "public void mo21791P() {\n }", "public void mo4359a() {\n }", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "public void mo55254a() {\n }", "public abstract void mo6549b();", "public void mo23813b() {\n }", "@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 }", "public void mo44053a() {\n }", "public void smell() {\n\t\t\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 }", "public void mo115190b() {\n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "public void mo21785J() {\n }", "public void mo21793R() {\n }", "public void mo21878t() {\n }", "public void mo56167c() {\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "public abstract String mo118046b();", "public void mo115188a() {\n }", "private SourcecodePackage() {}", "public abstract String mo41079d();", "void mo57277b();", "public void mo6944a() {\n }", "public abstract void mo42329d();", "public abstract void mo30696a();", "private final zzgy zzgb() {\n }", "private Utils() {\n\t}", "private Utils() {\n\t}", "protected boolean func_70041_e_() { return false; }", "zzafe mo29840Y() throws RemoteException;", "private Singletion3() {}", "public abstract void mo42331g();", "public abstract void mo35054b();", "public abstract String mo13682d();", "public void mo21786K() {\n }", "public void mo3376r() {\n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public void mo3749d() {\n }", "public void mo21794S() {\n }", "public void mo12628c() {\n }", "private Infer() {\n\n }", "public void mo9848a() {\n }", "private OMUtil() { }", "public abstract void mo27464a();", "@Override\n\tpublic void ligar() {\n\t\t\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}", "private NativeSupport() {\n\t}", "public void mo2740a() {\n }", "@Override\n public boolean isPrivate() {\n return true;\n }" ]
[ "0.71513015", "0.6686406", "0.6558315", "0.6482832", "0.6430476", "0.63856333", "0.63838816", "0.63487375", "0.6330605", "0.62764114", "0.626384", "0.62509346", "0.6237325", "0.62340367", "0.6228612", "0.6197973", "0.6197973", "0.61952", "0.6183631", "0.61797863", "0.6157397", "0.6152618", "0.61521906", "0.6116792", "0.61100185", "0.61080855", "0.6088319", "0.6082373", "0.6072587", "0.60691696", "0.60570836", "0.60564214", "0.6056027", "0.60505396", "0.6050144", "0.60472345", "0.6044647", "0.6036982", "0.6024398", "0.6024398", "0.6024398", "0.6024398", "0.6020334", "0.60201526", "0.6018423", "0.6016204", "0.6005956", "0.6002279", "0.5999404", "0.59974486", "0.59964895", "0.5995736", "0.5991695", "0.5991695", "0.5991695", "0.5991695", "0.5991695", "0.5991695", "0.5991695", "0.599113", "0.5987661", "0.5987661", "0.5984926", "0.5983099", "0.5973421", "0.59589046", "0.5958243", "0.5953439", "0.59510964", "0.59475076", "0.5946366", "0.5943994", "0.59424007", "0.59403396", "0.5937576", "0.59374106", "0.5926433", "0.59263766", "0.59263766", "0.5925841", "0.5913479", "0.5910542", "0.59044325", "0.5904201", "0.59039", "0.58995575", "0.58967894", "0.5894089", "0.58939654", "0.58905286", "0.5882918", "0.58785903", "0.58777314", "0.5876467", "0.5876147", "0.587332", "0.58671093", "0.58671093", "0.58666575", "0.5866619", "0.58632815" ]
0.0
-1
/ access modifiers changed from: packageprivate
@VisibleForTesting public void setActivity(int i) { T t = this.mCurrentState; boolean z = false; ((WifiState) t).activityIn = i == 3 || i == 1; WifiState wifiState = (WifiState) t; if (i == 3 || i == 2) { z = true; } wifiState.activityOut = z; notifyListenersIfNecessary(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n protected void prot() {\n }", "public void method_4270() {}", "@Override\n public void func_104112_b() {\n \n }", "private void m50366E() {\n }", "private void kk12() {\n\n\t}", "public final void mo51373a() {\n }", "@Override\n public void perish() {\n \n }", "public abstract void mo70713b();", "public void m23075a() {\n }", "public void mo38117a() {\n }", "private MApi() {}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public abstract void mo56925d();", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "public void mo21779D() {\n }", "public abstract void mo27386d();", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "void m1864a() {\r\n }", "public abstract Object mo26777y();", "public void mo21825b() {\n }", "protected boolean func_70814_o() { return true; }", "public final void mo91715d() {\n }", "public abstract void mo27385c();", "public void mo97908d() {\n }", "public void mo21782G() {\n }", "private TMCourse() {\n\t}", "private test5() {\r\n\t\r\n\t}", "private Util() { }", "protected void mo6255a() {\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "private abstract void privateabstract();", "public void mo21877s() {\n }", "public void mo21787L() {\n }", "private MigrationInstantiationUtil() {\n\t\tthrow new IllegalAccessError();\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "private Utils() {}", "private Utils() {}", "private Utils() {}", "private Utils() {}", "private MetallicityUtils() {\n\t\t\n\t}", "public void mo21791P() {\n }", "public void mo4359a() {\n }", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "public void mo55254a() {\n }", "public abstract void mo6549b();", "public void mo23813b() {\n }", "@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 }", "public void mo44053a() {\n }", "public void smell() {\n\t\t\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 }", "public void mo115190b() {\n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "public void mo21785J() {\n }", "public void mo21793R() {\n }", "public void mo21878t() {\n }", "public void mo56167c() {\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "public abstract String mo118046b();", "private SourcecodePackage() {}", "public void mo115188a() {\n }", "public abstract String mo41079d();", "void mo57277b();", "public void mo6944a() {\n }", "public abstract void mo30696a();", "public abstract void mo42329d();", "private final zzgy zzgb() {\n }", "private Utils() {\n\t}", "private Utils() {\n\t}", "protected boolean func_70041_e_() { return false; }", "zzafe mo29840Y() throws RemoteException;", "private Singletion3() {}", "public abstract void mo42331g();", "public abstract void mo35054b();", "public abstract String mo13682d();", "public void mo21786K() {\n }", "public void mo3376r() {\n }", "public void mo3749d() {\n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public void mo21794S() {\n }", "public void mo12628c() {\n }", "private Infer() {\n\n }", "public void mo9848a() {\n }", "private OMUtil() { }", "public abstract void mo27464a();", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "public void mo2740a() {\n }", "private NativeSupport() {\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 public boolean isPrivate() {\n return true;\n }" ]
[ "0.7152233", "0.6686829", "0.6558018", "0.648256", "0.64300925", "0.63854086", "0.6384126", "0.6348419", "0.63299996", "0.6276555", "0.62636447", "0.6250764", "0.62378335", "0.6232745", "0.6228846", "0.6198551", "0.6198551", "0.61952055", "0.61837465", "0.6179672", "0.6157414", "0.6152555", "0.61523587", "0.61157763", "0.6109625", "0.61080974", "0.608838", "0.6082551", "0.60731167", "0.6071059", "0.60570306", "0.6055614", "0.60551304", "0.605308", "0.6050354", "0.60475636", "0.6045684", "0.6036653", "0.6024332", "0.6024332", "0.6024332", "0.6024332", "0.60207534", "0.6020305", "0.60180783", "0.60160035", "0.6005778", "0.6002304", "0.59990394", "0.5998443", "0.5996965", "0.59950954", "0.59914786", "0.59914786", "0.59914786", "0.59914786", "0.59914786", "0.59914786", "0.59914786", "0.59905356", "0.5986785", "0.5986785", "0.59849143", "0.59827864", "0.59736896", "0.5959213", "0.59566647", "0.5952066", "0.5951192", "0.5947762", "0.59474814", "0.5944141", "0.59429127", "0.59405786", "0.59377867", "0.59377337", "0.5926827", "0.59266293", "0.59266293", "0.5924699", "0.59134245", "0.5909999", "0.59049", "0.59044355", "0.59040415", "0.58995473", "0.58966243", "0.58939487", "0.58929414", "0.58903736", "0.58822435", "0.5878963", "0.5877594", "0.5876535", "0.5876486", "0.58728", "0.5866836", "0.5866774", "0.5865642", "0.5865642", "0.5865402" ]
0.0
-1
/ access modifiers changed from: protected
@Override // com.android.settingslib.SignalIcon$State public void toString(StringBuilder sb) { super.toString(sb); sb.append(",ssid="); sb.append(this.ssid); sb.append(",isTransient="); sb.append(this.isTransient); sb.append(",isDefault="); sb.append(this.isDefault); sb.append(",statusLabel="); sb.append(this.statusLabel); sb.append(",isCarrierMerged="); sb.append(this.isCarrierMerged); sb.append(",subId="); sb.append(this.subId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "private abstract void privateabstract();", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\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 ligar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void smell() {\n\t\t\n\t}", "public abstract Object mo26777y();", "protected void h() {}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "protected abstract Set method_1559();", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public abstract void mo70713b();", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "protected Doodler() {\n\t}", "public abstract void mo27386d();", "@Override\n\tprotected void getExras() {\n\n\t}", "private PropertyAccess() {\n\t\tsuper();\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 gravarBd() {\n\t\t\n\t}", "public abstract void mo56925d();", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void init() {\n }", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void emprestimo() {\n\n\t}", "public abstract void mo27385c();", "@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}", "@Override\n public void memoria() {\n \n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void smthAbstr() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tpublic void dosomething() {\n\t\t\n\t}", "protected boolean func_70814_o() { return true; }", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "public abstract void mo30696a();", "abstract int pregnancy();", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n void init() {\n }", "private TMCourse() {\n\t}", "@Override\n\tpublic void leti() \n\t{\n\t}", "public abstract void mo35054b();", "@Override\n public void init() {\n }", "@Override\n\tpublic void buscar() {\n\t\t\n\t}", "private Infer() {\n\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void erstellen() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public final void mo51373a() {\n }", "protected void method_3848() {\r\n super.method_3848();\r\n }", "protected FanisamBato(){\n\t}", "public abstract Object mo1771a();", "public abstract void m15813a();", "@Override\n public void get() {}", "public void gored() {\n\t\t\n\t}", "@Override\n\tpublic void dibuja() {\n\t\t\n\t}", "private Get() {}", "private Get() {}", "@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 }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "public abstract void mo27464a();", "public abstract String mo41079d();", "@Override\n\tpublic void classroom() {\n\t\t\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\n\tpublic void verkaufen() {\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "public abstract void mo102899a();", "@SuppressWarnings(\"unused\")\n private void _read() {\n }", "public abstract void mo42329d();", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "public void method_4270() {}", "public abstract void mo6549b();", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void function() {\n\t\t\n\t}", "public abstract String mo118046b();" ]
[ "0.7374581", "0.704046", "0.6921078", "0.6907657", "0.68447137", "0.68278503", "0.68051183", "0.6581499", "0.65379775", "0.65013164", "0.64906055", "0.64906055", "0.6471428", "0.64376146", "0.64308655", "0.64308655", "0.6427683", "0.6424486", "0.64190304", "0.640871", "0.64053404", "0.6400181", "0.63988847", "0.6397776", "0.6377783", "0.6372898", "0.63703156", "0.6366763", "0.63532007", "0.6333713", "0.6325645", "0.63249475", "0.63249475", "0.6305955", "0.62785715", "0.6270012", "0.6250164", "0.62232584", "0.62212026", "0.6211955", "0.6203344", "0.61942434", "0.6181467", "0.6174815", "0.61573285", "0.61370647", "0.6121865", "0.61183035", "0.6117989", "0.6099771", "0.60917133", "0.60917133", "0.6085753", "0.60845906", "0.60690045", "0.60688764", "0.6064975", "0.60543966", "0.60454184", "0.6045176", "0.60337836", "0.60292566", "0.60245013", "0.6018325", "0.60145676", "0.6013568", "0.6010313", "0.5994281", "0.5994048", "0.59938633", "0.59918624", "0.5990596", "0.5983826", "0.59835196", "0.596629", "0.5964607", "0.5964607", "0.5964553", "0.5964553", "0.5964553", "0.5964553", "0.5964553", "0.5964553", "0.59601754", "0.5955775", "0.5953048", "0.5947975", "0.5944416", "0.59391934", "0.59318924", "0.59317297", "0.5931352", "0.59298736", "0.59288", "0.5924899", "0.5924048", "0.5923699", "0.5922455", "0.5919852", "0.59191453", "0.5918418" ]
0.0
-1
TODO Autogenerated method stub
@Override public void onCenterSlide(float paramFloat) { Log.d(LOGTAG, "onCenterSlide"); Log.d(LOGTAG, "onCenterSlide paramFloat>>>"+paramFloat); Log.d(LOGTAG, "onCenterSlide paramFloat>>>"+(int)paramFloat); Log.d(LOGTAG, "onCenterSlide progress>>>"+mediaController.getSeekBar().getProgress()); long seekTime; //long seekTime = duration / 1000 * mediaController.seekBar.getProgress() + 1000; if(paramFloat > 0) seekTime = mediaController.mediaPlayerControl.getCurrentPosition() + 1000 * 1; else seekTime = mediaController.mediaPlayerControl.getCurrentPosition() - 1000 * 1; mediaController.mediaPlayerControl.seekTo(seekTime); String time = StringUtils.generateTime(seekTime); //if(mediaController.mediaPlayerControl.getCurrentDecoder().equals("SW")) mediaController.setScreenCenterMsg(time, 1500L); mediaController.getCurrentPlayTime().setText(time); // mediaController.seekBar.setProgress(mediaController.seekBar.getProgress() + (int)paramFloat); // mediaController.seekBarListener.onProgressChanged(mediaController.seekBar, mediaController.seekBar.getProgress() + 1, true); //mediaController.mediaPlayerControl.seekTo(seekTime); }
{ "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
parse json, depending on which url was hit
public String parseJSON(String urlString, String zipString, JsonElement root){ String Data = "nullJSONData"; JsonObject rootobj = root.getAsJsonObject(); //May be an array, may be an object. // if url string is for zipcode website // parse rootobj for zipcode if (urlString == "http://freegeoip.net/json/"){ String zipcode = rootobj.get("zip_code").getAsString(); //just grab the zipcode Data = "The zipcode is " + zipcode; } // if message from user contained a zip code // parse rootobj for weather data if (zipString != "null Zip"){ String message = rootobj.get("message").getAsString(); //just grab the message Double listCount = rootobj.get("cnt").getAsDouble(); //just grab the message JsonArray JSONdataArray = rootobj.get("list").getAsJsonArray(); //grab list array, which is // the first item in the array is a JSON Object // this first object has the tempurate stored in a nested object called main JsonObject firstObject = JSONdataArray.get(0).getAsJsonObject(); JsonObject mainObject = firstObject.get("main").getAsJsonObject(); String temperature = mainObject.get("temp").getAsString(); Data = "The tempurature is " + temperature + " degrees Fahrenheit."; } // parse rootobj for number of humans in space if (urlString == "http://api.open-notify.org/astros.json/"){ String number = rootobj.get("number").getAsString(); //just grab the message Data = "There are currently " + number + " humans ins space."; } return Data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void processUrl() {\n try {\n\n JsonNode rootNode = getJsonRootNode(getJsonFromURL()); // todo: pass url in this method (to support multi-urls)\n getValuesFromJsonNodes(rootNode);\n setAndFormatValues();\n\n } catch (Exception e) {\n System.out.println(\"ERROR: caught error in processUrl()\");\n e.printStackTrace();\n }\n }", "private void parseJSON(String response)\n {\n try\n {\n // Using orj.json, get the file string and convert it to an object\n JSONObject object = (JSONObject) new JSONTokener(response).nextValue();\n\n // The Winnipeg Transit JSON results usually have nested values\n // We can identify the request by the first key of the first level\n\n // The method names() will retrieve an JSONArray with the key names\n JSONArray objectNames = object.names();\n\n // Retrieve the first key of the first level\n String firstKey = objectNames.getString(0);\n\n if (firstKey.equals(\"status\"))\n {\n parseStatus(object.getJSONObject(firstKey));\n }\n else if (firstKey.equals(\"stop-schedule\"))\n {\n parseStopSchedule(object.getJSONObject(firstKey));\n }\n }\n catch (JSONException e)\n {\n e.printStackTrace();\n }\n }", "HashMap<Location, String> pullLocations(String url){\n\t\tif (url.length() == 0) {\n\t\t\t// Pull from default url\n\t\t} else {\n\t\t\t// Pull from provided url\n\t\t}\n\t\t// Parse JSON array into location objects and store in hashmap\n\t\t// Return hashmap\n\t\treturn null;\n\t}", "private static JsonObject getJsonObject(String request_url) {\n JsonObject jsonResponse = new JsonParser().parse(NetworkUtils.getResponseBody(request_url)).getAsJsonObject();\n return jsonResponse;\n }", "public void getDetalJson(String url) {\n String kw = \"flag\";\n client = new OkHttpClient();\n final Request request = new Request.Builder()\n .url(url)\n .build();\n Call call = client.newCall(request);\n call.enqueue(new Callback() {\n @Override\n public void onFailure(Call call, IOException e) {\n System.out.println(e);\n }\n\n @Override\n public void onResponse(Call call, Response response) throws IOException {\n String htmlStr = response.body().string();\n //System.out.println(\"this is json of detail\" + htmlStr);\n try {\n detail_json = new JSONObject(htmlStr);\n //parsePageJson(json);\n //System.out.println(detail_json);\n } catch (Exception e) {\n System.out.println(\"error again\");\n }\n Intent intent = new Intent(getActivity(), FavDetailViewPagerActivity.class);\n intent.putExtra(\"detail_json_str\",htmlStr);\n startActivity(intent);\n }\n });\n }", "protected JSONObject doInBackground(String...url){\n String MYURL = \" http://thevisitapp.com/api/destinations/read?identifiers=10011\";\n\n HttpRequest request = new HttpRequest();\n return request.getJSONFromUrl(MYURL);\n }", "protected JSONObject getJSONObject(String url) throws IOException, JSONException {\n Log.d(this.TAG, \"Loading JSON Object: \" + url);\n return new JSONObject(this.fetchJSON(url));\n }", "@Override\r\n\tpublic void parseJson(JSONObject json) {\n\t\tif(json == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\ttry {\r\n\t\t\ttype = getInt(json,d_type);\r\n\t\t} catch(Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private JSONObject readJsonFromUrl(String url) throws IOException, JSONException {\r\n\t\tInputStream is = new URL(url).openStream();\r\n\t\ttry {\r\n\t\t\tBufferedReader rd = new BufferedReader(new InputStreamReader(is, Charset.forName(\"UTF-8\")));\r\n\t\t\tString jsonText = readAll(rd);\r\n\t\t\tJSONObject json = new JSONObject(jsonText);\r\n\t\t\treturn json;\r\n\t\t} finally { //finally will always execute, if an try block exists. Doesnt matter if there is an Exception or not.\r\n\t\t\tis.close();\r\n\t\t}\r\n\t}", "public native Object parse( Object json );", "public void loadJson(){\n new DownloadJsonTask().execute(URL3);\n// new DownloadJsonTask().execute(URL2);\n }", "public static JsonNode get(String url) {\n try {\n URL u = new URL(url);\n HttpURLConnection c = (HttpURLConnection) u.openConnection();\n c.setRequestMethod(\"GET\");\n c.setRequestProperty(\"Content-length\", \"0\");\n c.setUseCaches(false);\n c.setAllowUserInteraction(false);\n c.connect();\n int status = c.getResponseCode();\n switch (status) {\n case 200:\n case 201:\n BufferedReader br = new BufferedReader(new InputStreamReader(c.getInputStream()));\n StringBuilder sb = new StringBuilder();\n String line;\n while ((line = br.readLine()) != null) {\n sb.append(line+\"\\n\");\n }\n br.close();\n return Json.parse(sb.toString());\n }\n\n } catch (MalformedURLException e) {\n Logger.error(e.getMessage());\n e.printStackTrace();\n } catch (IOException e) {\n Logger.error(e.getMessage());\n e.printStackTrace();\n }\n return null;\n }", "private void parseJSON(Map<String,Object> map, String baseName, JSONArray toParse) {\n\t\tObject jObj;\n\t\t\n\t\tfor(int objI=0; objI < toParse.length(); objI++) \n\t\t{\n\t\t\tjObj = parseJSONVal(toParse.get(objI));\n\t\t\t\n\t\t\tif(jObj instanceof JSONObject)\n\t\t\t\tparseJSON(map, baseName+objI+StringParser.DELIMITER, (JSONObject) jObj);\n\t\t\telse if(jObj instanceof JSONArray)\n\t\t\t\tparseJSON(map, baseName+objI+StringParser.DELIMITER, (JSONArray) jObj);\n\t\t\telse\n\t\t\t\tmap.put(baseName+objI, jObj);\n\t\t}\n\t}", "public interface ResponseParser {\r\n\t\r\n\tList<Place> parseSearchResponse(String rawJson) throws Exception;\r\n\t\r\n\tList<Place> parseFilteredSearchResponse(String rawJson) throws Exception;\r\n\r\n}", "private void parseData(String url, String response) {\n\n if (response.isEmpty()) {\n if (!mErrorMessage.isEmpty()) {\n alertParseErrorAndFinish(mErrorMessage);\n } else {\n renderData();\n }\n } else {\n if (mItemTotal == 0) {\n //---------------------------------------------------------------------------------\n // 목록 파싱하기 - 아메바 블로그의 HTML 코드가 변경됨. 파서 다시 만들어야 함. 2016-09-10\n //---------------------------------------------------------------------------------\n switch (mSiteData.getId()) {\n case Config.BLOG_ID_AKB48_TEAM8:\n Akb48Parser akb48Parser = new Akb48Parser();\n akb48Parser.parseTeam8ReportList(response, mNewDataList);\n break;\n case Config.BLOG_ID_SKE48_SELECTED:\n case Config.BLOG_ID_NMB48_OFFICIAL:\n BaseParser parser = new BaseParser();\n parser.parseAmebaList(response, mNewDataList);\n mItemTotal = mNewDataList.size();\n break;\n case Config.BLOG_ID_NGT48_MANAGER:\n Ngt48Parser ngt48manager = new Ngt48Parser();\n ngt48manager.parseLineBlogList(response, mNewDataList);\n //Collections.sort(mNewDataList);\n //Collections.sort(mNewDataList, Collections.reverseOrder());\n break;\n case Config.BLOG_ID_NGT48_PHOTOLOG:\n Ngt48Parser ngt48photo = new Ngt48Parser();\n ngt48photo.parseMemberBlogList(response, mNewDataList);\n //Collections.sort(mNewDataList);\n Collections.sort(mNewDataList, Collections.reverseOrder());\n break;\n }\n }\n\n //-------------------------------\n // 항목별 사진 파싱하기\n //-------------------------------\n if (mItemTotal > 0) { // && mItemTotal >= mItemCount) {\n if (mItemCount > 0) {\n BaseParser parser = new BaseParser();\n String[] array = parser.parseAmebaArticle(response);\n\n WebData webData = mNewDataList.get(mItemCount - 1);\n webData.setContent(array[0]);\n webData.setImageUrl(array[1]);\n }\n\n if (mItemCount < mItemTotal) {\n WebData webData = mNewDataList.get(mItemCount);\n String reqUrl = webData.getUrl();\n String reqAgent = Config.USER_AGENT_MOBILE;\n\n requestData(reqUrl, reqAgent);\n updateProgress();\n\n mItemCount++;\n } else {\n mItemTotal = 0;\n mItemCount = 0;\n mPbLoadingHorizontalMore.setProgress(0);\n }\n }\n\n if (mItemTotal == 0) {\n renderData();\n }\n }\n }", "TorrentJsonParser getJsonParser();", "public interface FrequentlyRelatedItemHttpResponseParser {\n public FrequentlyRelatedItemSearchResponse[] parse(String json);\n}", "public void parseJSONData(Object JSONdata){\n\n\t}", "@Override\n public void onResponse(String response) {\n parseData(url, response);\n }", "@Nullable\n protected JSONObject fetchObjectForURL(URL url) throws IOException, JSONException {\n HttpURLConnection conn = getConnection(url);\n BufferedReader in = null;\n if (conn == null) return null;\n try {\n in = new BufferedReader(new InputStreamReader(conn.getInputStream()));\n StringBuilder buffer = new StringBuilder();\n String line;\n while ((line = in.readLine()) != null) {\n buffer.append(line);\n }\n return new JSONObject(buffer.toString());\n } finally {\n if (in != null) try { in.close(); } catch (IOException ex) {\n Log.e(\"aqx1010\", \"can not close input stream\", ex);\n }\n }\n\n }", "private static JSONObject readJsonFromUrl(String url) throws IOException, JSONException {\n\t\tInputStream is = new URL(url).openStream();\n\t\ttry {\n\t\t\tBufferedReader rd = new BufferedReader(new InputStreamReader(is, Charset.forName(\"UTF-8\")));\n\t\t\tString jsonText = readAll(rd);\n\t\t\tJSONObject json = new JSONObject(jsonText);\n\t\t\treturn json;\n\t\t} finally {\n\t\t\tis.close();\n\t\t}\n\t}", "private void processPrdDetails(String url,boolean firstTime )\n {\n ResponseEntity<?> responseEntity = processRequest(url, HttpMethod.GET, getRepoPrTypRef());\n List<GitRepoDetails> prlist = (List<GitRepoDetails>) responseEntity.getBody();\n String relLink=getRelLink(responseEntity.getHeaders(),firstTime);\n if(firstTime && !\"Not Found\".equalsIgnoreCase(relLink))\n { responseCount +=calulatedCount;}\n else\n {responseCount +=prlist.size();}\n firstTime=false;\n if(!\"Not Found\".equalsIgnoreCase(relLink)){\n processPrdDetails(relLink,firstTime);\n }\n }", "public void getJSON() throws JSONException {\n url = setUrl();\n System.out.println(\"after setAsyncUrl url = \" + url);\n OkHttpClient client = new OkHttpClient();\n Request request = new Request.Builder()\n .url(url)\n .build();\n client.newCall(request).enqueue(new Callback() {\n @Override\n public void onFailure(Call call, IOException e) {\n e.printStackTrace();\n }\n\n @Override\n public void onResponse(Call call, Response response) throws IOException {\n if(response.isSuccessful()){\n jString = new String(response.body().string());\n if(V)System.out.println(\"jString = \" + jString);\n try {\n addSearchFragment(jString); // add retrieved search fragments to screen\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }\n });\n }", "void extractDataFromJson(String commentData);", "@Override\n public void onSucceed(int what, Response response) {\n gson = new Gson();\n try {\n switch (what) {\n case 0x021://获取城市\n\n //企查查城市数据解法\n// String jstring = (String) response.get();\n// map = gson.fromJson(jstring, new TypeToken<Map<String, Object>>() {\n// }.getType());\n// List<DataManager.citys> list = gson.fromJson(((Map<String, Object>) map.get(\"data\")).get(\"Result\").toString(), new TypeToken<List<DataManager.citys>>() {\n// }.getType());\n// DataManager.citysList = list;\n\n //真实城市数据解法————zlh手解json\n String jstring = (String) response.get();\n map = gson.fromJson(jstring, new TypeToken<Map<String, Object>>() {\n }.getType());\n if (((LinkedTreeMap) map.get(\"data\")).size() != 0) {\n List<LinkedTreeMap> list = (List<LinkedTreeMap>) ((Map<String, Object>) map.get(\"data\")).get(\"city\");\n for (int i = 0; i < list.size(); i++) {\n DataManager.citys temp1 = new DataManager.citys();\n temp1.c_name = (String) list.get(i).get(\"c_name\");\n temp1.c_code = (String) list.get(i).get(\"c_code\");\n temp1.citycode = new ArrayList<>();\n List<LinkedTreeMap> templist = (List<LinkedTreeMap>) list.get(i).get(\"citycode\");\n for (int j = 0; j < templist.size(); j++) {\n DataManager.citycode temp2 = new DataManager.citycode();\n temp2.c_code = (String) templist.get(j).get(\"c_code\");\n temp2.c_name = (String) templist.get(j).get(\"c_name\");\n temp1.citycode.add(temp2);\n }\n DataManager.citysList.add(temp1);\n }\n }\n break;\n case 0x110://获取APP最新版本\n jsonString = (String) response.get();\n DataManager.MyNewAppS = gson.fromJson(jsonString, DataManager.MyNewApp.class);\n WelcomeActivity.handler.sendEmptyMessage(1);\n break;\n case 0x111://获取新闻\n jsonString = (String) response.get();\n DataManager.MyNewsS = gson.fromJson(jsonString, DataManager.MyNews.class);\n if (DataManager.MyNewsS.data.Newslist != null && DataManager.MyNewsS.data.Newslist.size() > 0) {\n MainActivity.MyNewsList = DataManager.MyNewsS.data.Newslist;\n }\n WelcomeActivity.handler.sendEmptyMessage(10);\n break;\n case 0x1111://获取更多新闻\n jsonString = (String) response.get();\n DataManager.MyNewsSMore = gson.fromJson(jsonString, DataManager.MyNews.class);\n if (DataManager.MyNewsSMore.data.Newslist != null && DataManager.MyNewsSMore.data.Newslist.size() > 0) {\n for (int i = 0; i < DataManager.MyNewsSMore.data.Newslist.size(); i++) {\n MainActivity.MyNewsList.add(DataManager.MyNewsSMore.data.Newslist.get(i));\n }\n MainActivity.handler.sendEmptyMessage(0);\n } else {\n MainActivity.handler.sendEmptyMessage(101);\n }\n break;\n case 0x112://获取APP首页轮播图\n jsonString = (String) response.get();\n DataManager.LBimgS = gson.fromJson(jsonString, DataManager.LBimg.class);\n WelcomeActivity.handler.sendEmptyMessage(0);\n break;\n case 0x113://获取最新认领\n jsonString = (String) response.get();\n DataManager.MyClaimUtilsModel = gson.fromJson(jsonString, DataManager.MyClaimUtils.class);\n if (DataManager.MyClaimUtilsModel.data.Claimlist != null && DataManager.MyClaimUtilsModel.data.Claimlist.size() > 0) {\n MainActivity.MyCliamList = DataManager.MyClaimUtilsModel.data.Claimlist;\n if (MainActivity.handler != null) {\n MainActivity.handler.sendEmptyMessage(7);\n }\n }\n break;\n case 0x1131://获取最新认领(more)\n jsonString = (String) response.get();\n DataManager.MyClaimUtilsModel = gson.fromJson(jsonString, DataManager.MyClaimUtils.class);\n if (DataManager.MyClaimUtilsModel.data.Claimlist != null && DataManager.MyClaimUtilsModel.data.Claimlist.size() > 0) {\n Main_NewCliam_MoreListActivity.MyCliamListMore = DataManager.MyClaimUtilsModel.data.Claimlist;\n MainActivity.handler.sendEmptyMessage(11);\n }\n break;\n case 0x114://获取热点\n jsonString = (String) response.get();\n DataManager.MyHotS = gson.fromJson(jsonString, DataManager.MyHot.class);\n if (DataManager.MyHotS.data != null && DataManager.MyHotS.data.HotspotAnalysis != null && DataManager.MyHotS.data.HotspotAnalysis.size() > 0) {\n MainActivity.MyHotsList = DataManager.MyHotS.data.HotspotAnalysis;\n }\n break;\n case 0x022://搜索结果\n String searchstr = (String) response.get();\n //test\n //searchstr=\"{\\\"message\\\":\\\"true\\\",\\\"status\\\":1,\\\"data\\\":{\\\"Result\\\":[{\\\"PRIPID\\\":\\\"3601032011041300098564\\\",\\\"entname\\\":\\\"江西智容科技有限公司\\\",\\\"REGNO\\\":\\\"360103210025958\\\",\\\"REGORG_CN\\\":\\\"南昌高新技术产业开发区\\\",\\\"NAME\\\":\\\"万杏娥\\\",\\\"OPFROM\\\":\\\"2011-04-28\\\",\\\"OPTO\\\":\\\"2031-04-27\\\",\\\"REGSTATE_CN\\\":\\\"存续(在营、开业、在册)\\\",\\\"C_PROVINCE\\\":\\\"36\\\",\\\"D_ADDTIME\\\":\\\"2016-03-17\\\",\\\"C_STATE\\\":\\\"1\\\",\\\"UNISCID\\\":\\\"null\\\",\\\"REGCAP\\\":\\\"5000.0\\\",\\\"ENTTYPE_CN\\\":\\\"有限责任公司(自然人投资或控股)\\\",\\\"DOM\\\":\\\"江西省南昌市高新技术产业开发区高新区高新二路建昌工业园金庐软件园海外大厦北楼306室\\\",\\\"INDUSTRYPHY\\\":\\\"I\\\",\\\"INDUSTRYPHY_NAME\\\":\\\"信息传输、软件和信息技术服务业\\\",\\\"OPSCOPE\\\":\\\"计算机软件系统开发;办公自动化设备销售;计算机系统集成;国内广告的设计、制作、发布、代理;会展服务(以上项目国家有专项规定的除外)\\\"},{\\\"PRIPID\\\":\\\"20160127091814206993\\\",\\\"entname\\\":\\\"江西智容科技有限公司南昌分公司\\\",\\\"REGNO\\\":\\\"360105220000025\\\",\\\"REGORG_CN\\\":\\\"null\\\",\\\"NAME\\\":\\\"罗川\\\",\\\"OPFROM\\\":\\\"2016-02-04\\\",\\\"OPTO\\\":\\\"null\\\",\\\"REGSTATE_CN\\\":\\\"存续(在营、开业、在册)\\\",\\\"C_PROVINCE\\\":\\\"36\\\",\\\"D_ADDTIME\\\":\\\"2016-03-17\\\",\\\"C_STATE\\\":\\\"null\\\",\\\"UNISCID\\\":\\\"91360105MA35GGBY60\\\",\\\"REGCAP\\\":\\\"null\\\",\\\"ENTTYPE_CN\\\":\\\"有限责任公司分公司(自然人投资或控股)\\\",\\\"DOM\\\":\\\"红星村原红星乡财政所\\\",\\\"INDUSTRYPHY\\\":\\\"L\\\",\\\"INDUSTRYPHY_NAME\\\":\\\"租赁和商业服务业\\\",\\\"OPSCOPE\\\":\\\"餐饮企业管理服务;食堂(主食、热菜、早点)(卫生许可证有效期至2011年5月13日止)(以上项目国家有专项规定的除外)\\\"}],\\\"Paging\\\":{\\\"PageSize\\\":40,\\\"PageIndex\\\":0,\\\"TotalRecords\\\":2}}}\";\n map = gson.fromJson(searchstr, new TypeToken<Map<String, Object>>() {\n }.getType());\n// List<DataManager.search> searchstrlist2 = gson.fromJson(((Map<String, Object>) map.get(\"data\")).get(\"Result\").toString(), new TypeToken<List<DataManager.search>>() {\n// }.getType());\n// DataManager.searchList = searchstrlist2;\n baging = gson.fromJson(((Map<String, Object>) map.get(\"data\")).get(\"Paging\").toString(), DataManager.baging.class);\n List<LinkedTreeMap> searchstrlist2 = (List<LinkedTreeMap>) ((Map<String, Object>) map.get(\"data\")).get(\"Result\");//余思\n if (DataManager.searchList.size() != 0) {\n DataManager.searchList.clear();\n }\n if (DataManager.searchListMore.size() != 0) {\n DataManager.searchListMore.clear();\n }\n for (LinkedTreeMap temp : searchstrlist2) {\n DataManager.search serchtemp = new DataManager.search();\n\n serchtemp.ENTTYPE = (String) temp.get(\"ENTTYPE\");\n\n serchtemp.PRIPID = (String) temp.get(\"PRIPID\");\n serchtemp.ENTNAME = (String) temp.get(\"ENTNAME\");\n serchtemp.REGNO = (String) temp.get(\"REGNO\");\n serchtemp.REGORG_CN = (String) temp.get(\"REGORG_CN\");\n serchtemp.NAME = (String) temp.get(\"NAME\");\n serchtemp.OPFROM = (String) temp.get(\"ESTDATE\");//以前是OPFROM后来无缘无故变成ESTDATE\n serchtemp.OPTO = (String) temp.get(\"OPTO\");\n serchtemp.REGSTATE_CN = (String) temp.get(\"REGSTATE_CN\");\n serchtemp.C_PROVINCE = (String) temp.get(\"C_PROVINCE\");\n serchtemp.D_ADDTIME = (Object) temp.get(\"D_ADDTIME\");\n serchtemp.C_STATE = (String) temp.get(\"C_STATE\");\n if (String.valueOf(temp.get(\"REGCAP\")) == \"null\") {\n serchtemp.REGCAP = \"0\";\n }\n if (((String) temp.get(\"REGCAP\")).contains(\".\")) {\n serchtemp.REGCAP = ((String) temp.get(\"REGCAP\")).substring(0, ((String) temp.get(\"REGCAP\")).indexOf(\".\"));//查企业,品牌和失信判定是否有小数点\n } else {\n serchtemp.REGCAP = (String) temp.get(\"REGCAP\");\n }\n serchtemp.ENTTYPE_CN = (String) temp.get(\"ENTTYPE_CN\");\n serchtemp.DOM = (String) temp.get(\"DOM\");\n serchtemp.INDUSTRYPHY = (String) temp.get(\"INDUSTRYPHY\");\n serchtemp.INDUSTRYPHY_NAME = (String) temp.get(\"INDUSTRYPHY_NAME\");\n serchtemp.OPSCOPE = (String) temp.get(\"OPSCOPE\");\n DataManager.searchList.add(serchtemp);\n }\n if (DataManager.searchList != null && DataManager.searchList.size() > 0) {\n SearchFirmActivty.handler.sendEmptyMessage(0);\n } else {\n SearchFirmActivty.handler.sendEmptyMessage(500);\n }\n break;\n case 0x0221://搜索加载更多\n jsonString = (String) response.get();\n map = gson.fromJson(jsonString, new TypeToken<Map<String, Object>>() {\n }.getType());\n baging = gson.fromJson(((Map<String, Object>) map.get(\"data\")).get(\"Paging\").toString(), DataManager.baging.class);\n List<LinkedTreeMap> searchstrlist22 = (List<LinkedTreeMap>) ((Map<String, Object>) map.get(\"data\")).get(\"Result\");\n if (DataManager.searchListMore.size() != 0) {\n DataManager.searchListMore.clear();\n }\n for (LinkedTreeMap temp : searchstrlist22) {\n DataManager.search serchtemp = new DataManager.search();\n serchtemp.ENTTYPE = (String) temp.get(\"ENTTYPE\");\n serchtemp.PRIPID = (String) temp.get(\"PRIPID\");\n serchtemp.ENTNAME = (String) temp.get(\"ENTNAME\");\n serchtemp.REGNO = (String) temp.get(\"REGNO\");\n serchtemp.REGORG_CN = (String) temp.get(\"REGORG_CN\");\n serchtemp.NAME = (String) temp.get(\"NAME\");\n serchtemp.OPFROM = (String) temp.get(\"ESTDATE\");//以前是OPFROM后来无缘无故变成ESTDATE\n serchtemp.OPTO = (String) temp.get(\"OPTO\");\n serchtemp.REGSTATE_CN = (String) temp.get(\"REGSTATE_CN\");\n serchtemp.C_PROVINCE = (String) temp.get(\"C_PROVINCE\");\n serchtemp.D_ADDTIME = (Object) temp.get(\"D_ADDTIME\");\n serchtemp.C_STATE = (String) temp.get(\"C_STATE\");\n if (String.valueOf(temp.get(\"REGCAP\")) == \"null\") {\n serchtemp.REGCAP = \"0\";\n }\n if (((String) temp.get(\"REGCAP\")).contains(\".\")) {\n serchtemp.REGCAP = ((String) temp.get(\"REGCAP\")).substring(0, ((String) temp.get(\"REGCAP\")).indexOf(\".\"));//查企业,品牌和失信去小数点\n } else {\n serchtemp.REGCAP = (String) temp.get(\"REGCAP\");\n }\n\n serchtemp.ENTTYPE_CN = (String) temp.get(\"ENTTYPE_CN\");\n serchtemp.DOM = (String) temp.get(\"DOM\");\n serchtemp.INDUSTRYPHY = (String) temp.get(\"INDUSTRYPHY\");\n serchtemp.INDUSTRYPHY_NAME = (String) temp.get(\"INDUSTRYPHY_NAME\");\n serchtemp.OPSCOPE = (String) temp.get(\"OPSCOPE\");\n DataManager.searchListMore.add(serchtemp);\n }\n if (DataManager.searchListMore != null && DataManager.searchListMore.size() > 0) {\n SearchFirmActivty.handler.sendEmptyMessage(0);\n } else {\n SearchFirmActivty.handler.sendEmptyMessage(500);\n }\n break;\n case 0x023://预留获取行业\n// gson = new Gson();\n// String str3 = (String) response.get();\n// map = gson.fromJson(str3, new TypeToken<Map<String, Object>>() {\n// }.getType());\n// List<LinkedTreeMap> listtemp = (List<LinkedTreeMap>) map.get(\"data\");\n// String jsonstradd = gson.toJson(listtemp);\n// List<DataManager.industryData> listtemps = gson.fromJson(jsonstradd, new TypeToken<List<DataManager.Data>>() {\n// }.getType());\n// DataManager.dataList = listtemps;\n// for (DataManager.industryData dt : DataManager.dataList) {\n// DataManager.SubyList = dt.SubIndustryList;\n// }\n /*DataManager.industry industry1 = null;\n String industry = (String) response.get();*/\n\n /* try {\n JSONObject a=new JSONObject(industry);\n JSONArray array=a.getJSONArray(\"data\");\n for(int i=0;i<array.length();i++){\n JSONObject b=array.getJSONObject(i);\n DataManager.industry.Name= (String) b.get(\"Name\");\n DataManager.industry.Code=(String) b.get(\"Code\");\n DataManager.industry.Desc=(String) b.get(\"Desc\");\n JSONArray array1=b.getJSONArray(\"SubIndustryList\");\n for(int j=0;j<array1.length();j++){\n JSONObject c =(JSONObject) array1.get(j);\n DataManager.industry.SubIndustryList.add((String) c.get(\"Name\"));\n }\n DataManager.industryList.add(industry1);\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }*/\n String str3 = (String) response.get();\n map = gson.fromJson(str3, new TypeToken<Map<String, Object>>() {\n }.getType());\n if (((LinkedTreeMap) map.get(\"data\")).size() != 0) {\n List<LinkedTreeMap> list4 = (List<LinkedTreeMap>) ((Map<String, Object>) map.get(\"data\")).get(\"industry\");\n if (DataManager.industryDataList.size() != 0) {\n DataManager.industryDataList.clear();\n }\n for (LinkedTreeMap tempTree : list4) {\n DataManager.industryData industryData = new DataManager.industryData();\n industryData.EC_VALUE = (String) tempTree.get(\"EC_VALUE\");\n industryData.EC_NAME = (String) tempTree.get(\"EC_NAME\");\n DataManager.industryDataList.add(industryData);\n }\n }\n\n break;\n case 0x024://获取企业详情24宫格等\n jsonString = (String) response.get();\n try {\n map = gson.fromJson(jsonString, new TypeToken<Map<String, Object>>() {\n }.getType());\n List<LinkedTreeMap> lists2 = null;\n if (map.get(\"data\") != null && !map.get(\"data\").equals(null) && ((Map<String, Object>) map.get(\"data\")).get(\"allcount\") != null && !((Map<String, Object>) map.get(\"data\")).get(\"allcount\").equals(null)) {\n lists2 = (List<LinkedTreeMap>) ((Map<String, Object>) map.get(\"data\")).get(\"allcount\");\n }\n List<LinkedTreeMap> lists3 = (List<LinkedTreeMap>) ((Map<String, Object>) map.get(\"data\")).get(\"baseinfo\");\n if (DataManager.allcountsList != null) {\n DataManager.allcountsList.clear();\n }\n if (DataManager.BaseinfoList != null) {\n DataManager.BaseinfoList.clear();\n }\n\n if (lists2 != null && lists2.size() > 0) {\n for (LinkedTreeMap temp : lists2) {\n DataManager.allcount cfo = new DataManager.allcount();\n cfo.EnterAddtionID = temp.get(\"EnterAddtionID\").toString();\n cfo.IsFavorite = temp.get(\"IsFavorite\").toString();\n cfo.HonorCount = temp.get(\"HonorCount\").toString();\n cfo.JudiciaryCount = temp.get(\"JudiciaryCount\").toString();\n cfo.PledgeCount = temp.get(\"PledgeCount\").toString();\n cfo.CopyrightCount = temp.get(\"CopyrightCount\").toString();\n cfo.AnnualCount = temp.get(\"AnnualCount\").toString();\n cfo.AdvertisementCount = temp.get(\"AdvertisementCount\").toString();\n cfo.BaseInfoCount = temp.get(\"BaseInfoCount\").toString();\n cfo.ApprovalCount = temp.get(\"ApprovalCount\").toString();\n cfo.PunishCount = temp.get(\"PunishCount\").toString();\n cfo.WarningCount = temp.get(\"WarningCount\").toString();\n cfo.TrademarkCount = temp.get(\"TrademarkCount\").toString();\n cfo.AbnormityCount = temp.get(\"AbnormityCount\").toString();\n cfo.CreditCount = temp.get(\"CreditCount\").toString();\n cfo.SupportCount = temp.get(\"SupportCount\").toString();\n cfo.MortgagorCount = temp.get(\"MortgagorCount\").toString();\n cfo.PatentCount = temp.get(\"PatentCount\").toString();\n cfo.PageView = temp.get(\"PageView\").toString();\n cfo.IsClaim = temp.get(\"IsClaim\").toString();\n cfo.EntShowCount = temp.get(\"EntShowCount\").toString();//++\n cfo.BiddingCount = temp.get(\"BiddingCount\").toString();\n cfo.JobCount = temp.get(\"JobCount\").toString();\n cfo.EntNewCount = temp.get(\"EntNewCount\").toString();\n DataManager.allcountsList.add(cfo);\n }\n }\n if (lists3 != null && lists3.size() > 0) {\n for (LinkedTreeMap temp : lists3) {\n DataManager.Baseinfo cfo = new DataManager.Baseinfo();\n cfo.REGSTATE = temp.get(\"REGSTATE\").toString();\n cfo.REGNO = temp.get(\"REGNO\").toString();\n cfo.NAME = temp.get(\"NAME\").toString();\n cfo.REGCAP = temp.get(\"REGCAP\").toString();\n cfo.ESTDATE = temp.get(\"ESTDATE\").toString();\n cfo.ENTTYPE_CN = temp.get(\"ENTTYPE_CN\").toString();\n cfo.ENTNAME = temp.get(\"ENTNAME\").toString();\n cfo.REGSTATE_CN = temp.get(\"REGSTATE_CN\").toString();\n cfo.UNISCID = temp.get(\"UNISCID\").toString();\n cfo.PRIPID = temp.get(\"PRIPID\").toString();\n cfo.ENTTYPE = temp.get(\"ENTTYPE\").toString();\n DataManager.BaseinfoList.add(cfo);\n }\n }\n if (DataManager.allcountsList != null && DataManager.allcountsList.size() > 0) {\n SearchFirmActivty.handler.sendEmptyMessage(5);\n } else {\n SearchFirmActivty.handler.sendEmptyMessage(500);\n }\n } catch (NullPointerException e) {\n e.printStackTrace();\n Toast.show(\"该企业暂无数据\");\n SearchFirmActivty.pd.dismiss();\n }\n break;\n case 0x025://我的关注跳公司详情界面的请求\n jsonString = (String) response.get();\n map = gson.fromJson(jsonString, new TypeToken<Map<String, Object>>() {\n }.getType());\n List<LinkedTreeMap> lists25 = (List<LinkedTreeMap>) ((Map<String, Object>) map.get(\"data\")).get(\"allcount\");\n List<LinkedTreeMap> lists35 = (List<LinkedTreeMap>) ((Map<String, Object>) map.get(\"data\")).get(\"baseinfo\");\n if (DataManager.allcountsList != null) {\n DataManager.allcountsList.clear();\n }\n if (DataManager.BaseinfoList != null) {\n DataManager.BaseinfoList.clear();\n }\n if (lists25 != null && lists25.size() > 0) {\n for (LinkedTreeMap temp : lists25) {\n DataManager.allcount cfo = new DataManager.allcount();\n cfo.EnterAddtionID = temp.get(\"EnterAddtionID\").toString();\n cfo.IsFavorite = temp.get(\"IsFavorite\").toString();\n cfo.HonorCount = temp.get(\"HonorCount\").toString();\n cfo.JudiciaryCount = temp.get(\"JudiciaryCount\").toString();\n cfo.PledgeCount = temp.get(\"PledgeCount\").toString();\n cfo.CopyrightCount = temp.get(\"CopyrightCount\").toString();\n cfo.AnnualCount = temp.get(\"AnnualCount\").toString();\n cfo.AdvertisementCount = temp.get(\"AdvertisementCount\").toString();\n cfo.BaseInfoCount = temp.get(\"BaseInfoCount\").toString();\n cfo.ApprovalCount = temp.get(\"ApprovalCount\").toString();\n cfo.PunishCount = temp.get(\"PunishCount\").toString();\n cfo.WarningCount = temp.get(\"WarningCount\").toString();\n cfo.TrademarkCount = temp.get(\"TrademarkCount\").toString();\n cfo.AbnormityCount = temp.get(\"AbnormityCount\").toString();\n cfo.CreditCount = temp.get(\"CreditCount\").toString();\n cfo.SupportCount = temp.get(\"SupportCount\").toString();\n cfo.MortgagorCount = temp.get(\"MortgagorCount\").toString();\n cfo.PatentCount = temp.get(\"PatentCount\").toString();\n cfo.PageView = temp.get(\"PageView\").toString();\n cfo.IsClaim = temp.get(\"IsClaim\").toString();\n cfo.EntShowCount = temp.get(\"EntShowCount\").toString();//++\n cfo.BiddingCount = temp.get(\"BiddingCount\").toString();\n cfo.JobCount = temp.get(\"JobCount\").toString();\n cfo.EntNewCount = temp.get(\"EntNewCount\").toString();\n DataManager.allcountsList.add(cfo);\n }\n }\n if (lists35 != null && lists35.size() > 0) {\n for (LinkedTreeMap temp : lists35) {\n DataManager.Baseinfo cfo = new DataManager.Baseinfo();\n cfo.REGSTATE = temp.get(\"REGSTATE\").toString();\n cfo.REGNO = temp.get(\"REGNO\").toString();\n cfo.NAME = temp.get(\"NAME\").toString();\n cfo.REGCAP = temp.get(\"REGCAP\").toString();\n cfo.ESTDATE = temp.get(\"ESTDATE\").toString();\n cfo.ENTTYPE_CN = temp.get(\"ENTTYPE_CN\").toString();\n cfo.ENTNAME = temp.get(\"ENTNAME\").toString();\n cfo.REGSTATE_CN = temp.get(\"REGSTATE_CN\").toString();\n cfo.UNISCID = temp.get(\"UNISCID\").toString();\n cfo.PRIPID = temp.get(\"PRIPID\").toString();\n cfo.ENTTYPE = temp.get(\"ENTTYPE\").toString();\n DataManager.BaseinfoList.add(cfo);\n }\n }\n if (DataManager.allcountsList != null && DataManager.allcountsList.size() > 0) {\n MyconcernActivity.handler.sendEmptyMessage(1);\n } else {\n SearchFirmActivty.handler.sendEmptyMessage(500);\n }\n break;\n case 0x026://主界面 跳公司详情\n jsonString = (String) response.get();\n map = gson.fromJson(jsonString, new TypeToken<Map<String, Object>>() {\n }.getType());\n List<LinkedTreeMap> lists26 = (List<LinkedTreeMap>) ((Map<String, Object>) map.get(\"data\")).get(\"allcount\");\n List<LinkedTreeMap> lists261 = (List<LinkedTreeMap>) ((Map<String, Object>) map.get(\"data\")).get(\"baseinfo\");\n if (DataManager.allcountsList != null) {\n DataManager.allcountsList.clear();\n }\n if (DataManager.BaseinfoList != null) {\n DataManager.BaseinfoList.clear();\n }\n if (lists26 != null && lists26.size() > 0) {\n for (LinkedTreeMap temp : lists26) {\n DataManager.allcount cfo = new DataManager.allcount();\n cfo.EnterAddtionID = temp.get(\"EnterAddtionID\").toString();\n cfo.IsFavorite = temp.get(\"IsFavorite\").toString();\n cfo.HonorCount = temp.get(\"HonorCount\").toString();\n cfo.JudiciaryCount = temp.get(\"JudiciaryCount\").toString();\n cfo.PledgeCount = temp.get(\"PledgeCount\").toString();\n cfo.CopyrightCount = temp.get(\"CopyrightCount\").toString();\n cfo.AnnualCount = temp.get(\"AnnualCount\").toString();\n cfo.AdvertisementCount = temp.get(\"AdvertisementCount\").toString();\n cfo.BaseInfoCount = temp.get(\"BaseInfoCount\").toString();\n cfo.ApprovalCount = temp.get(\"ApprovalCount\").toString();\n cfo.PunishCount = temp.get(\"PunishCount\").toString();\n cfo.WarningCount = temp.get(\"WarningCount\").toString();\n cfo.TrademarkCount = temp.get(\"TrademarkCount\").toString();\n cfo.AbnormityCount = temp.get(\"AbnormityCount\").toString();\n cfo.CreditCount = temp.get(\"CreditCount\").toString();\n cfo.SupportCount = temp.get(\"SupportCount\").toString();\n cfo.MortgagorCount = temp.get(\"MortgagorCount\").toString();\n cfo.PatentCount = temp.get(\"PatentCount\").toString();\n cfo.PageView = temp.get(\"PageView\").toString();\n cfo.IsClaim = temp.get(\"IsClaim\").toString();\n cfo.EntShowCount = temp.get(\"EntShowCount\").toString();//++\n cfo.BiddingCount = temp.get(\"BiddingCount\").toString();\n cfo.JobCount = temp.get(\"JobCount\").toString();\n cfo.EntNewCount = temp.get(\"EntNewCount\").toString();\n DataManager.allcountsList.add(cfo);\n }\n }\n if (lists261 != null && lists261.size() > 0) {\n for (LinkedTreeMap temp : lists261) {\n DataManager.Baseinfo cfo = new DataManager.Baseinfo();\n cfo.REGSTATE = temp.get(\"REGSTATE\").toString();\n cfo.REGNO = temp.get(\"REGNO\").toString();\n cfo.NAME = temp.get(\"NAME\").toString();\n cfo.REGCAP = temp.get(\"REGCAP\").toString();\n cfo.ESTDATE = temp.get(\"ESTDATE\").toString();\n cfo.ENTTYPE_CN = temp.get(\"ENTTYPE_CN\").toString();\n cfo.ENTNAME = temp.get(\"ENTNAME\").toString();\n cfo.REGSTATE_CN = temp.get(\"REGSTATE_CN\").toString();\n cfo.UNISCID = temp.get(\"UNISCID\").toString();\n cfo.PRIPID = temp.get(\"PRIPID\").toString();\n cfo.ENTTYPE = temp.get(\"ENTTYPE\").toString();\n DataManager.BaseinfoList.add(cfo);\n }\n }\n if (DataManager.allcountsList != null && DataManager.allcountsList.size() > 0) {\n MainActivity.handler.sendEmptyMessage(8);\n }\n break;\n case 0x000://工商信息\n /*DataManager.Data0List.clear();\n String jstring0 = (String) response.get();\n DataManager.Root0 jsonRoot0 = gson.fromJson(jstring0, new TypeToken<DataManager.Root0>() {\n }.getType());\n DataManager.Data0 dt = jsonRoot0.data;\n DataManager.Data0List.add(dt);\n if (DataManager.Data0List != null && DataManager.Data0List.size() > 0) {\n CompanyDetailsActivity.handler.sendEmptyMessage(0);\n } else {\n CompanyDetailsActivity.handler.sendEmptyMessage(500);\n }*/\n\n jsonString = (String) response.get();\n DataManager.gsxx = gson.fromJson(jsonString, DataManager.GSXX.class);\n if (DataManager.gsxx != null) {\n CompanyDetailsActivity.handler.sendEmptyMessage(0);\n } else {\n CompanyDetailsActivity.handler.sendEmptyMessage(500);\n }\n\n break;\n case 0x001://行政信息\n String jstring1 = (String) response.get();\n map = gson.fromJson(jstring1, new TypeToken<Map<String, Object>>() {\n }.getType());\n\n List<LinkedTreeMap> list1 = (List<LinkedTreeMap>) ((Map<String, Object>) map.get(\"data\")).get(\"administrative\");\n List<LinkedTreeMap> list221 = (List<LinkedTreeMap>) ((Map<String, Object>) map.get(\"data\")).get(\"other\");\n if (DataManager.ad_List != null) {\n DataManager.ad_List.clear();\n }\n if (DataManager.admin_other_List != null) {\n DataManager.admin_other_List.clear();\n }\n if (list1 != null && list1.size() > 0) {\n for (LinkedTreeMap temp : list1) {\n DataManager.administraton cfo = new DataManager.administraton();\n cfo.PRIPID = (String) temp.get(\"PRIPID\");\n cfo.LICNAME = (String) temp.get(\"LICNAME\");\n cfo.LICNO = (String) temp.get(\"LICNO\");\n cfo.VALFROM = (String) temp.get(\"VALFROM\");\n cfo.LICANTH = (String) temp.get(\"LICANTH\");\n cfo.VALTO = (String) temp.get(\"VALTO\");\n DataManager.ad_List.add(cfo);\n }\n }\n if (list221 != null && list221.size() > 0) {\n for (LinkedTreeMap temp : list221) {\n DataManager.admin_other cfo = new DataManager.admin_other();\n cfo.LICANTH = (String) temp.get(\"LICANTH\");\n cfo.REGNO = (String) temp.get(\"REGNO\");\n cfo.VALFROM = (String) temp.get(\"VALFROM\");\n cfo.LICNAME_CN = (String) temp.get(\"LICNAME_CN\");\n cfo.LICID = (String) temp.get(\"LICID\");\n cfo.ENTNAME = (String) temp.get(\"ENTNAME\");\n cfo.LICNO = (String) temp.get(\"LICNO\");\n cfo.VALTO = (String) temp.get(\"VALTO\");\n cfo.PRIPID = (String) temp.get(\"PRIPID\");\n cfo.TYPE = (String) temp.get(\"TYPE\");\n cfo.LICITEM = (String) temp.get(\"LICITEM\");\n DataManager.admin_other_List.add(cfo);\n }\n }\n if (DataManager.ad_List != null || DataManager.admin_other_List != null) {\n CompanyDetailsActivity.handler.sendEmptyMessage(1);\n } else {\n CompanyDetailsActivity.handler.sendEmptyMessage(500);\n }\n\n break;\n case 0x002://荣誉信息\n String jstring2 = (String) response.get();\n// map = gson.fromJson(jstring2, new TypeToken<Map<String, Object>>() {\n// }.getType());\n// List<DataManager.honorInfo> list2 = gson.fromJson(((Map<String, Object>) map.get(\"data\")).get(\"chattel\").toString().trim(), new TypeToken<List<DataManager.honorInfo>>() {\n// }.getType());\n// DataManager.honorInfoList = list2;\n// 以下代码解决空格问题c\n map = gson.fromJson(jstring2, new TypeToken<Map<String, Object>>() {\n }.getType());\n List<LinkedTreeMap> list2 = (List<LinkedTreeMap>) ((Map<String, Object>) map.get(\"data\")).get(\"chattel\");\n\n if (DataManager.honorInfoList != null) {\n DataManager.honorInfoList.clear();\n }\n if (list2 != null && list2.size() > 0) {\n for (LinkedTreeMap temp : list2) {\n DataManager.honorInfo cfo = new DataManager.honorInfo();\n cfo.HONORID = (String) temp.get(\"HONORID\");\n cfo.HONORNAME = (String) temp.get(\"HONORNAME\");\n cfo.HONORCONTENT = (String) temp.get(\"HONORCONTENT\");\n cfo.ORGAN = (String) temp.get(\"ORGAN\");\n cfo.C_UNIQUE_CODE = (String) temp.get(\"C_UNIQUE_CODE\");\n\n DataManager.honorInfoList.add(cfo);\n }\n }\n\n if (DataManager.honorInfoList != null && DataManager.honorInfoList.size() > 0) {\n CompanyDetailsActivity.handler.sendEmptyMessage(2);\n } else {\n CompanyDetailsActivity.handler.sendEmptyMessage(500);\n }\n\n break;\n case 0x003://企业扶持信息\n String jstring3 = (String) response.get();\n DataManager.supportInfoS = gson.fromJson(jstring3, DataManager.supportInfo.class);\n if (DataManager.supportInfoS != null) {\n CompanyDetailsActivity.handler.sendEmptyMessage(3);\n } else {\n CompanyDetailsActivity.handler.sendEmptyMessage(500);\n }\n\n break;\n case 0x004://抵押信息/动产\n jsonString = (String) response.get();\n DataManager.MychattelS = gson.fromJson(jsonString, DataManager.Mychattel.class);\n break;\n case 0x0041://抵押信息/不动产\n jsonString = (String) response.get();\n DataManager.MyrealEstateS = gson.fromJson(jsonString, DataManager.MyrealEstate.class);\n CompanyDetailsActivity.handler.sendEmptyMessage(4);\n break;\n case 0x005://出质信息\n String jstring5 = (String) response.get();\n DataManager.Root5 jsonRoot5 = gson.fromJson(jstring5, new TypeToken<DataManager.Root5>() {\n }.getType());\n DataManager.pledgeInfoList = jsonRoot5.data;\n if (DataManager.pledgeInfoList != null && DataManager.pledgeInfoList.size() > 0) {\n CompanyDetailsActivity.handler.sendEmptyMessage(5);\n } else {\n CompanyDetailsActivity.handler.sendEmptyMessage(500);\n }\n\n break;\n case 0x006://司法信息\n String jstring6 = (String) response.get();\n map = gson.fromJson(jstring6, new TypeToken<Map<String, Object>>() {\n }.getType());\n /**\n * json报错解析方法\n */\n// List<DataManager.JudicialDocuments> list61 = gson.fromJson(((Map<String, Object>) map.get(\"data\")).get(\"judicialDocuments\").toString(), new TypeToken<List<DataManager.JudicialDocuments>>() {\n// }.getType());\n// List<DataManager.CrackCredit> list62 = gson.fromJson(((Map<String, Object>) map.get(\"data\")).get(\"crackCredit\").toString(), new TypeToken<List<DataManager.CrackCredit>>() {\n// }.getType());\n// List<DataManager.ShareholderInformationChange> list63 = gson.fromJson(((Map<String, Object>) map.get(\"data\")).get(\"shareholderInformationChange\").toString(), new TypeToken<List<DataManager.ShareholderInformationChange>>() {\n// }.getType());\n// List<DataManager.FrozenInformation> list64 = gson.fromJson(((Map<String, Object>) map.get(\"data\")).get(\"frozenInformation\").toString(), new TypeToken<List<DataManager.FrozenInformation>>() {\n// }.getType());\n List<LinkedTreeMap> list61 = (List<LinkedTreeMap>) ((Map<String, Object>) map.get(\"data\")).get(\"judicialDocuments\");\n List<LinkedTreeMap> list62 = (List<LinkedTreeMap>) ((Map<String, Object>) map.get(\"data\")).get(\"crackCredit\");\n List<LinkedTreeMap> list63 = (List<LinkedTreeMap>) ((Map<String, Object>) map.get(\"data\")).get(\"shareholderInformationChange\");\n List<LinkedTreeMap> list64 = (List<LinkedTreeMap>) ((Map<String, Object>) map.get(\"data\")).get(\"frozenInformation\");\n /**\n * 司法文书信息\n */\n if (DataManager.JudicialDocumentsList != null) {\n DataManager.JudicialDocumentsList.clear();\n }\n if (list61 != null && list61.size() > 0) {\n for (LinkedTreeMap temp : list61) {\n DataManager.JudicialDocuments jud = new DataManager.JudicialDocuments();\n jud.CASENUM = (String) temp.get(\"CASENUM\");\n jud.REDECORG_CN = (String) temp.get(\"REDECORG_CN\");\n jud.SENTENCECONMENT = (String) temp.get(\"SENTENCECONMENT\");\n jud.SENTENCEDATE = (String) temp.get(\"SENTENCEDATE\");\n jud.SUPDEPARTMENT = (String) temp.get(\"SUPDEPARTMENT\");\n DataManager.JudicialDocumentsList.add(jud);\n }\n }\n /**\n * 失信被执行人信息\n */\n if (DataManager.CrackCreditList != null) {\n DataManager.CrackCreditList.clear();\n }\n if (list62 != null && list62.size() > 0) {\n for (LinkedTreeMap temp : list62) {\n DataManager.CrackCredit cra = new DataManager.CrackCredit();\n cra.COURT_NAME = (String) temp.get(\"COURT_NAME\");\n cra.COURTCASEID = (String) temp.get(\"COURTCASEID\");\n cra.DISREPUT_TYPE_NAME = (String) temp.get(\"DISREPUT_TYPE_NAME\");\n cra.GIST_CID = (String) temp.get(\"GIST_CID\");\n cra.PERFORMANCE = (String) temp.get(\"PERFORMANCE\");\n cra.REG_DATE = (String) temp.get(\"REG_DATE\");\n cra.DUTY = (String) temp.get(\"DUTY\");\n DataManager.CrackCreditList.add(cra);\n }\n }\n /**\n * 股东变更信息\n */\n if (DataManager.ShareholderInformationChangeList != null) {\n DataManager.ShareholderInformationChangeList.clear();\n }\n if (list63 != null && list63.size() > 0) {\n for (LinkedTreeMap temp : list63) {\n DataManager.ShareholderInformationChange sha = new DataManager.ShareholderInformationChange();\n sha.ALIEN = (String) temp.get(\"ALIEN\");\n sha.FROAM = (Double) temp.get(\"FROAM\");\n sha.FROAUTH = (String) temp.get(\"FROAUTH\");\n sha.INV = (String) temp.get(\"INV\");\n sha.REGNO = (String) temp.get(\"REGNO\");\n DataManager.ShareholderInformationChangeList.add(sha);\n }\n }\n /**\n * 股权冻结信息\n */\n if (DataManager.FrozenInformationList != null) {\n DataManager.FrozenInformationList.clear();\n }\n if (list64 != null && list64.size() > 0) {\n for (LinkedTreeMap temp : list64) {\n DataManager.FrozenInformation fro = new DataManager.FrozenInformation();\n fro.FROAM = (String) temp.get(\"FROAM\");\n fro.FROAUTH = (String) temp.get(\"FROAUTH\");\n fro.FROFROM = (String) temp.get(\"FROFROM\");\n fro.FROID = (String) temp.get(\"FROID\");\n fro.FROZDEADLINE = (String) temp.get(\"FROZDEADLINE\");\n fro.INVTYPE_CN = (String) temp.get(\"INVTYPE_CN\");\n DataManager.FrozenInformationList.add(fro);\n }\n }\n\n// DataManager.JudicialDocumentsList = list61;//司法文书信息\n// DataManager.CrackCreditList = list62;//失信被执行人信息\n// DataManager.ShareholderInformationChangeList = list63;//股东变更信息\n// DataManager.FrozenInformationList = list64;//股权冻结信息\n\n CompanyDetailsActivity.handler.sendEmptyMessage(6);\n break;\n case 0x007://预警信息zlh\n String jsonstring = (String) response.get();\n DataManager.AlertInfoS = gson.fromJson(jsonstring, DataManager.AlertInfo.class);\n if (DataManager.AlertInfoS.data.size() > 0 && DataManager.AlertInfoS != null) {\n CompanyDetailsActivity.handler.sendEmptyMessage(7);\n } else {\n CompanyDetailsActivity.handler.sendEmptyMessage(500);\n }\n\n break;\n case 0x008://行政处罚\n String jstring8 = (String) response.get();\n DataManager.Root8 jsonRoot8 = gson.fromJson(jstring8, new TypeToken<DataManager.Root8>() {\n }.getType());\n DataManager.punishInfoList = jsonRoot8.data;\n if (DataManager.punishInfoList.size() > 0 && DataManager.punishInfoList != null) {\n CompanyDetailsActivity.handler.sendEmptyMessage(8);\n } else {\n CompanyDetailsActivity.handler.sendEmptyMessage(500);\n }\n\n break;\n case 0x009://经营异常信息\n jsonString = (String) response.get();\n// map = gson.fromJson(jstring9, new TypeToken<Map<String, Object>>() {\n// }.getType());\n// List<DataManager.abnormalInfo> list9 = gson.fromJson(((Map<String, Object>) map.get(\"data\")).get(\"abNormal\").toString(), new TypeToken<List<DataManager.abnormalInfo>>() {\n// }.getType());\n// map = gson.fromJson(jstring9, new TypeToken<Map<String, Object>>() {\n// }.getType());\n// List<LinkedTreeMap> list9 = (List<LinkedTreeMap>) ((Map<String, Object>) map.get(\"data\")).get(\"abNormal\");\n//\n// if (DataManager.abnormalInfoList != null) {\n// DataManager.abnormalInfoList.clear();\n// }\n// if (list9 != null && list9.size() > 0) {\n// for (LinkedTreeMap temp : list9) {\n// DataManager.abnormalInfo cfo = new DataManager.abnormalInfo();\n// cfo.BUSEXCLIST = (String) temp.get(\"BUSEXCLIST\");\n// cfo.SPECAUSE_CN = (String) temp.get(\"SPECAUSE_CN\");\n// cfo.ABNTIME = (String) temp.get(\"ABNTIME\");\n// cfo.DECORG_CN = (String) temp.get(\"DECORG_CN\");\n// cfo.REMEXCPRES_CN = (String) temp.get(\"REMEXCPRES_CN\");\n// cfo.REMDATE = (String) temp.get(\"REMDATE\");\n// cfo.REDECORG_CN = (String) temp.get(\"REDECORG_CN\");\n// DataManager.abnormalInfoList.add(cfo);\n// }\n\n DataManager.abnormalInfoS = gson.fromJson(jsonString, DataManager.abnormalInfo.class);\n CompanyDetailsActivity.handler.sendEmptyMessage(9);\n\n break;\n case 0x010://专利信息\n jsonString = (String) response.get();\n DataManager.PatentInfoS = gson.fromJson(jsonString, DataManager.PatentInfo.class);\n if (DataManager.PatentInfoS.data.patentInfo != null) {\n CompanyDetailsActivity.handler.sendEmptyMessage(10);\n } else {\n CompanyDetailsActivity.handler.sendEmptyMessage(500);\n }\n\n break;\n case 0x01012://专利信息(加载更多)\n jsonString = (String) response.get();\n DataManager.PatentInfoS = gson.fromJson(jsonString, DataManager.PatentInfo.class);\n if (DataManager.PatentInfoS.data.patentInfo != null) {\n PatentActivity.handler.sendEmptyMessage(0);\n }\n\n break;\n case 0x011://商标信息\n jsonString = (String) response.get();\n DataManager.trademarkModelS = gson.fromJson(jsonString, DataManager.trademarkModel.class);\n if (DataManager.trademarkModelS.data.trademark.size() > 0 && DataManager.trademarkModelS.data.trademark != null) {\n CompanyDetailsActivity.handler.sendEmptyMessage(11);\n } else {\n CompanyDetailsActivity.handler.sendEmptyMessage(500);\n }\n break;\n case 0x01112://商标信息(加载更多)\n jsonString = (String) response.get();\n DataManager.trademarkModelS = gson.fromJson(jsonString, DataManager.trademarkModel.class);\n if (DataManager.trademarkModelS.data.trademark.size() > 0 && DataManager.trademarkModelS.data.trademark != null) {\n TrademarkActivity.handler.sendEmptyMessage(0);\n }\n break;\n case 0x012://著作信息\n String jstrin12 = (String) response.get();\n map = gson.fromJson(jstrin12, new TypeToken<Map<String, Object>>() {\n }.getType());\n List<LinkedTreeMap> list112 = (List<LinkedTreeMap>) ((Map<String, Object>) map.get(\"data\")).get(\"patentInfo\");\n List<LinkedTreeMap> list112_1 = (List<LinkedTreeMap>) ((Map<String, Object>) map.get(\"data\")).get(\"patentInfoSoftwore\");\n ;\n\n\n if (DataManager.copyrightInfoeList != null) {\n DataManager.copyrightInfoeList.clear();\n }\n\n if (list112 != null && list112.size() > 0) {\n for (LinkedTreeMap temp : list112) {\n DataManager.copyrightInfo cfo = new DataManager.copyrightInfo();\n cfo.ID = (String) temp.get(\"ID\");\n cfo.REGISTERDATA = (String) temp.get(\"REGISTERDATA\");\n cfo.REGISTERID = (String) temp.get(\"REGISTERID\");\n\n cfo.WORKNAME = (String) temp.get(\"WORKNAME\");\n cfo.WORKCLASS = (String) temp.get(\"WORKCLASS\");\n cfo.FINISHDATE = (String) temp.get(\"FINISHDATE\");\n cfo.FIRSTDATE = (String) temp.get(\"FIRSTDATE\");\n DataManager.copyrightInfoeList.add(cfo);\n }\n }\n if (list112_1 != null && list112_1.size() > 0) {\n for (LinkedTreeMap temp : list112_1) {\n DataManager.copyrightInfo cfo = new DataManager.copyrightInfo();\n cfo.ID = (String) temp.get(\"ID\");\n cfo.REGISTERDATA = (String) temp.get(\"REGISTERDATA\");\n cfo.REGISTERID = (String) temp.get(\"REGISTERID\");\n\n cfo.WORKCLASS = \"软件\";//额外附加值\n\n cfo.SOFTWARENAME = (String) temp.get(\"SOFTWARENAME\");\n cfo.SOFTWARESHORT = (String) temp.get(\"SOFTWARESHORT\");\n cfo.STARTINGDATE = (String) temp.get(\"STARTINGDATE\");\n DataManager.copyrightInfoeList.add(cfo);\n }\n }\n\n if (DataManager.copyrightInfoeList != null && DataManager.copyrightInfoeList.size() > 0) {\n CompanyDetailsActivity.handler.sendEmptyMessage(12);\n } else {\n CompanyDetailsActivity.handler.sendEmptyMessage(500);\n }\n\n break;\n case 0x013://广告资质\n String jstring13 = (String) response.get();\n// map = gson.fromJson(jstring13, new TypeToken<Map<String, Object>>() {\n// }.getType());\n// List<DataManager.advertisementInfo> list13 = gson.fromJson(((Map<String, Object>) map.get(\"data\")).get(\"advertising\").toString(), new TypeToken<List<DataManager.advertisementInfo>>() {\n// }.getType());\n// DataManager.advertisementInfoList = list13;\n\n map = gson.fromJson(jstring13, new TypeToken<Map<String, Object>>() {\n }.getType());\n List<LinkedTreeMap> list13 = (List<LinkedTreeMap>) ((Map<String, Object>) map.get(\"data\")).get(\"advertising\");\n\n if (DataManager.advertisementInfoList != null) {\n DataManager.advertisementInfoList.clear();\n }\n if (list13 != null && list13.size() > 0) {\n for (LinkedTreeMap temp : list13) {\n DataManager.advertisementInfo cfo = new DataManager.advertisementInfo();\n cfo.ADVERTID = (String) temp.get(\"ADVERTID\");\n cfo.C_LEVEL = (String) temp.get(\"C_LEVEL\");\n cfo.CATEGORY = (String) temp.get(\"CATEGORY\");\n cfo.IDENTIFYDATE = (String) temp.get(\"IDENTIFYDATE\");\n cfo.VALFORM = (String) temp.get(\"VALFORM\");\n cfo.VALTO = (String) temp.get(\"VALTO\");\n cfo.IDENTIFYORGANS = (String) temp.get(\"IDENTIFYORGANS\");\n DataManager.advertisementInfoList.add(cfo);\n }\n }\n\n if (DataManager.advertisementInfoList != null && DataManager.advertisementInfoList.size() > 0) {\n CompanyDetailsActivity.handler.sendEmptyMessage(13);\n } else {\n CompanyDetailsActivity.handler.sendEmptyMessage(500);\n }\n\n break;\n case 0x014://守合同重信用信息\n String jstring14 = (String) response.get();\n// map = gson.fromJson(jstring14, new TypeToken<Map<String, Object>>() {\n// }.getType());\n// List<DataManager.obeyedInfo> list14 = gson.fromJson(((Map<String, Object>) map.get(\"data\")).get(\"contractInfo\").toString(), new TypeToken<List<DataManager.obeyedInfo>>() {\n// }.getType());\n// DataManager.obeyedInfoList = list14;\n map = gson.fromJson(jstring14, new TypeToken<Map<String, Object>>() {\n }.getType());\n List<LinkedTreeMap> list14 = (List<LinkedTreeMap>) ((Map<String, Object>) map.get(\"data\")).get(\"contractInfo\");\n\n if (DataManager.obeyedInfoList != null) {\n DataManager.obeyedInfoList.clear();\n }\n if (list14 != null && list14.size() > 0) {\n for (LinkedTreeMap temp : list14) {\n DataManager.obeyedInfo cfo = new DataManager.obeyedInfo();\n cfo.PRIPID = (String) temp.get(\"PRIPID\");\n cfo.ENTNAME = (String) temp.get(\"ENTNAME\");\n cfo.REGNO = (String) temp.get(\"REGNO\");\n cfo.UNISCID = (String) temp.get(\"UNISCID\");\n cfo.CONTENT = (String) temp.get(\"CONTENT\");\n cfo.IDENTIFYDATE = (String) temp.get(\"IDENTIFYDATE\");\n cfo.IDENTIFYORGANS = (String) temp.get(\"IDENTIFYORGANS\");\n cfo.STATE = (String) temp.get(\"STATE\");\n DataManager.obeyedInfoList.add(cfo);\n }\n }\n if (DataManager.obeyedInfoList != null && DataManager.obeyedInfoList.size() > 0) {\n CompanyDetailsActivity.handler.sendEmptyMessage(14);\n } else {\n CompanyDetailsActivity.handler.sendEmptyMessage(500);\n }\n\n break;\n case 0x015://自主公示zlh\n jsonString = (String) response.get();\n map = gson.fromJson(jsonString, new TypeToken<Map<String, Object>>() {\n }.getType());\n if ((List<LinkedTreeMap>) map.get(\"data\") != null) {\n List<LinkedTreeMap> listtemp = (List<LinkedTreeMap>) map.get(\"data\");\n\n for (int i = 0; i < listtemp.size(); i++) {\n switch (listtemp.get(i).get(\"type\").toString()) {\n case \"企业年报\":\n if (listtemp.get(i).get(\"data\") != null) {\n /*DataManager.reportList = gson.fromJson(listtemp.get(i).get(\"data\").toString(), new TypeToken<List<DataManager.report>>() {\n }.getType());*/\n if (DataManager.reportList.size() > 0 || DataManager.reportList != null) {\n DataManager.reportList.clear();\n }\n for (LinkedTreeMap r : (List<LinkedTreeMap>) listtemp.get(i).get(\"data\")) {\n DataManager.report report = new DataManager.report();\n report.ANCHEDATE = (String) r.get(\"ANCHEDATE\");\n report.ANCHEID = (String) r.get(\"ANCHEID\");\n report.ANCHEYEAR = (String) r.get(\"ANCHEYEAR\");\n DataManager.reportList.add(report);\n }\n\n }\n break;\n case \"股东及出资信息\":\n if (listtemp.get(i).get(\"data\") != null) {\n /*DataManager.fundedList = gson.fromJson(listtemp.get(i).get(\"data\").toString(), new TypeToken<List<DataManager.funded>>() {\n }.getType());*/\n if (DataManager.fundedList.size() > 0 || DataManager.fundedList != null) {\n DataManager.fundedList.clear();\n }\n for (LinkedTreeMap r : (List<LinkedTreeMap>) listtemp.get(i).get(\"data\")) {\n DataManager.funded funded = new DataManager.funded();\n funded.ACCONAM = (double) r.get(\"ACCONAM\");\n funded.ACCONDATE = (String) r.get(\"ACCONDATE\");\n funded.ACCONFORM = (String) r.get(\"ACCONFORM\");\n funded.ACCONFORM_CN = (String) r.get(\"ACCONFORM_CN\");\n funded.CONDATE = (String) r.get(\"CONDATE\");\n funded.CONFORM = (String) r.get(\"CONFORM\");\n funded.CONFORM_CN = (String) r.get(\"CONFORM_CN\");\n funded.INV = (String) r.get(\"INV\");\n funded.PUBLICDATE = (String) r.get(\"PUBLICDATE\");\n funded.SUBCONAM = (double) r.get(\"SUBCONAM\");\n funded.ACPUBLICDATE = (String) r.get(\"ACPUBLICDATE\");\n DataManager.fundedList.add(funded);\n\n }\n }\n break;\n case \"股权变更信息\":\n if (listtemp.get(i).get(\"data\") != null) {\n /*DataManager.stockList = gson.fromJson(listtemp.get(i).get(\"data\").toString(), new TypeToken<List<DataManager.stock>>() {\n }.getType());*/\n if (DataManager.stockList.size() > 0 || DataManager.stockList != null) {\n DataManager.stockList.clear();\n }\n for (LinkedTreeMap r : (List<LinkedTreeMap>) listtemp.get(i).get(\"data\")) {\n DataManager.stock stock = new DataManager.stock();\n stock.REGNO = (String) r.get(\"REGNO\");\n stock.ALTAF = (String) r.get(\"ALTAF\");\n stock.ENTNAME = (String) r.get(\"ENTNAME\");\n stock.INVUID = (String) r.get(\"INVUID\");\n stock.UNISCID = (String) r.get(\"UNISCID\");\n stock.PRIPID = (String) r.get(\"PRIPID\");\n stock.ALITEM = (String) r.get(\"ALITEM\");\n stock.ALTDATE = (String) r.get(\"ALTDATE\");\n stock.ALTBE = (String) r.get(\"ALTBE\");\n DataManager.stockList.add(stock);\n }\n }\n break;\n case \"行政许可信息\":\n if (listtemp.get(i).get(\"data\") != null) {\n /*DataManager.permitList = gson.fromJson(listtemp.get(i).get(\"data\").toString(), new TypeToken<List<DataManager.permit>>() {\n }.getType());*/\n if (DataManager.permitList.size() > 0 || DataManager.permitList != null) {\n DataManager.permitList.clear();\n }\n for (LinkedTreeMap r : (List<LinkedTreeMap>) listtemp.get(i).get(\"data\")) {\n DataManager.permit permit = new DataManager.permit();\n permit.invalidDate = (String) r.get(\"invalidDate\");\n permit.LICANTH = (String) r.get(\"LICANTH\");\n permit.LICITEM = (String) r.get(\"LICITEM\");\n permit.LICNAME_CN = (String) r.get(\"LICNAME_CN\");\n permit.LICNO = (String) r.get(\"LICNO\");\n permit.PUBLICDATE = (String) r.get(\"PUBLICDATE\");\n permit.VALFROM = (String) r.get(\"VALFROM\");\n permit.VALTO = (String) r.get(\"VALTO\");\n DataManager.permitList.add(permit);\n }\n }\n break;\n case \"知识产权登记信息\":\n if (listtemp.get(i).get(\"data\") != null) {\n /*DataManager.loreList = gson.fromJson(listtemp.get(i).get(\"data\").toString(), new TypeToken<List<DataManager.lore>>() {\n }.getType());*/\n if (DataManager.loreList.size() > 0 || DataManager.loreList != null) {\n DataManager.loreList.clear();\n }\n for (LinkedTreeMap r : (List<LinkedTreeMap>) listtemp.get(i).get(\"data\")) {\n DataManager.lore lore = new DataManager.lore();\n lore.TYPENAME = (String) r.get(\"TYPENAME\");\n lore.TMNAME = (String) r.get(\"TMNAME\");\n lore.INVALIDDATE = (String) r.get(\"INVALIDDATE\");\n lore.PLEREGPERFROM = (String) r.get(\"PLEREGPERFROM\");\n lore.EQUPLECANREA = (String) r.get(\"EQUPLECANREA\");\n lore.CANDATE = (String) r.get(\"CANDATE\");\n lore.UNISCID = (String) r.get(\"UNISCID\");\n lore.KINDS = (String) r.get(\"KINDS\");\n lore.PLEREGPERTO = (String) r.get(\"PLEREGPERTO\");\n lore.REGNO = (String) r.get(\"REGNO\");\n lore.TMREGNO = (String) r.get(\"TMREGNO\");\n lore.PLEDGOR = (String) r.get(\"PLEDGOR\");\n lore.PLEID = (String) r.get(\"PLEID\");\n lore.ENTNAME = (String) r.get(\"ENTNAME\");\n lore.INVALIDREA = (String) r.get(\"INVALIDREA\");\n lore.PRIPID = (String) r.get(\"PRIPID\");\n lore.PUBLICDATE = (String) r.get(\"PUBLICDATE\");\n lore.IMPORG = (String) r.get(\"IMPORG\");\n lore.TYPE = (String) r.get(\"TYPE\");\n DataManager.loreList.add(lore);\n }\n\n }\n break;\n case \"行政处罚信息\":\n if (listtemp.get(i).get(\"data\") != null) {\n /*DataManager.punishList = gson.fromJson(listtemp.get(i).get(\"data\").toString(), new TypeToken<List<DataManager.punish>>() {\n }.getType());*/\n if (DataManager.punishList.size() > 0 || DataManager.punishList != null) {\n DataManager.punishList.clear();\n }\n for (LinkedTreeMap r : (List<LinkedTreeMap>) listtemp.get(i).get(\"data\")) {\n DataManager.punish punish = new DataManager.punish();\n punish.PENTYPE_CN = (String) r.get(\"PENTYPE_CN\");\n punish.REMARK = (String) r.get(\"REMARK\");\n punish.UNISCID = (String) r.get(\"UNISCID\");\n punish.PENDECISSDATE = (String) r.get(\"PENDECISSDATE\");\n punish.PENAM = (Double) r.get(\"PENAM\");\n punish.CASEID = (String) r.get(\"CASEID\");\n punish.REGNO = (String) r.get(\"REGNO\");\n punish.JUDAUTH = (String) r.get(\"JUDAUTH\");\n punish.ENTNAME = (String) r.get(\"ENTNAME\");\n punish.PENDECNO = (String) r.get(\"PENDECNO\");\n punish.PENTYPE = (String) r.get(\"PENTYPE\");\n punish.FORFAM = (Double) r.get(\"FORFAM\");\n punish.ILLEGACTTYPE = (String) r.get(\"ILLEGACTTYPE\");\n punish.PENCONTENT = (String) r.get(\"PENCONTENT\");\n punish.PRIPID = (String) r.get(\"PRIPID\");\n punish.PUBLICDATE = (String) r.get(\"PUBLICDATE\");\n DataManager.punishList.add(punish);\n }\n }\n break;\n default:\n break;\n }\n\n }\n CompanyDetailsActivity.handler.sendEmptyMessage(15);\n } else {\n CompanyDetailsActivity.handler.sendEmptyMessage(500);\n }\n break;\n case 0x101://关注企业\n jsonString = (String) response.get();\n DataManager.FavotiteS = gson.fromJson(jsonString, DataManager.Favotite.class);\n CompanyDetailsActivity.handler.sendEmptyMessage(22);\n break;\n case 0x102://取消关注企业\n jsonString = (String) response.get();\n DataManager.FavotiteS = gson.fromJson(jsonString, DataManager.Favotite.class);\n CompanyDetailsActivity.handler.sendEmptyMessage(23);\n break;\n case 0x103://我的关注列表\n jsonString = (String) response.get();\n DataManager.FavotiteListS = gson.fromJson(jsonString, DataManager.FavotiteList.class);\n MainActivity.handler.sendEmptyMessage(5);\n break;\n case 0x201://评论\n jsonString = (String) response.get();\n DataManager.MyCommentlistrS = gson.fromJson(jsonString, DataManager.MyCommentlistr.class);\n if (DataManager.MyCommentlistrS.data.userreview != null && DataManager.MyCommentlistrS.data.userreview.size() > 0) {\n CommentListActivity.handler.sendEmptyMessage(0);\n } else {\n CommentListActivity.handler.sendEmptyMessage(500);\n }\n break;\n case 0x202://点赞\n String jstring202 = (String) response.get();\n DataManager.Root202 jsonRoot202 = gson.fromJson(jstring202, new TypeToken<DataManager.Root202>() {\n }.getType());\n DataManager.Data202 d202 = jsonRoot202.data;\n DataManager.Result = d202.result;\n// if (DataManager.Result.equals(\"1\")) {\n// CommentListDetailsActivity.handler.sendEmptyMessage(2);\n// }\n break;\n case 0x203://差评\n String jstring203 = (String) response.get();\n DataManager.Root202 jsonRoot203 = gson.fromJson(jstring203, new TypeToken<DataManager.Root202>() {\n }.getType());\n DataManager.Data202 d203 = jsonRoot203.data;\n DataManager.Result = d203.result;\n// if (DataManager.Result.equals(\"1\")) {\n// CommentListDetailsActivity.handler.sendEmptyMessage(2);\n// }\n break;\n case 0x204://发表评论\n String jstring204 = (String) response.get();\n DataManager.Root202 jsonRoot204 = gson.fromJson(jstring204, new TypeToken<DataManager.Root202>() {\n }.getType());\n DataManager.Data202 d204 = jsonRoot204.data;\n DataManager.Result = d204.result;\n if (DataManager.Result.equals(\"success\")) {\n ToCommentActivity.handler.sendEmptyMessage(1);\n } else {\n ToCommentActivity.handler.sendEmptyMessage(2);\n }\n break;\n case 0x205://回复评论\n String jstring205 = (String) response.get();\n DataManager.Root202 jsonRoot205 = gson.fromJson(jstring205, new TypeToken<DataManager.Root202>() {\n }.getType());\n DataManager.Data202 d205 = jsonRoot205.data;\n DataManager.Result = d205.result;\n if (DataManager.Result.equals(\"success\")) {\n CommentListDetailsActivity.handler.sendEmptyMessage(1);\n } else {\n CommentListDetailsActivity.handler.sendEmptyMessage(2);\n }\n break;\n case 0x206://我的评价\n jsonString = (String) response.get();\n DataManager.MyComms = gson.fromJson(jsonString, DataManager.MyComm.class);\n MainActivity.handler.sendEmptyMessage(1);\n break;\n case 0x301://提交认领s\n jsonString = (String) response.get();\n DataManager.ClaimUtilsModel = gson.fromJson(jsonString, DataManager.ClaimUtils.class);\n if (DataManager.ClaimUtilsModel.data.result.equals(\"success\")) {\n ToClaimActivity.handler.sendEmptyMessage(1);\n } else {\n ToClaimActivity.handler.sendEmptyMessage(500);\n }\n break;\n case 0x302://提交认领附件\n jsonString = (String) response.get();\n DataManager.ClaimUtilsModel = gson.fromJson(jsonString, DataManager.ClaimUtils.class);\n if (DataManager.ClaimUtilsModel.data.result.equals(\"success\")) {\n ToClaimActivity.handler.sendEmptyMessage(2);\n } else {\n ToClaimActivity.handler.sendEmptyMessage(500);\n }\n break;\n case 0x303://我的认领列表\n jsonString = (String) response.get();\n DataManager.MyClaimUtilsModel = gson.fromJson(jsonString, DataManager.MyClaimUtils.class);\n MainActivity.handler.sendEmptyMessage(6);\n break;\n case 0x3031://我的认领列表{副}\n jsonString = (String) response.get();\n DataManager.MyClaimUtilsModel = gson.fromJson(jsonString, DataManager.MyClaimUtils.class);\n MyClaimActivity.handler.sendEmptyMessage(2);\n break;\n case 0x304://我的认领详情\n jsonString = (String) response.get();\n DataManager.MyClaimUtilsModel = gson.fromJson(jsonString, DataManager.MyClaimUtils.class);\n// MyClaimActivity.handler.sendEmptyMessage(6);\n break;\n case 0x305://取消认领\n jsonString = (String) response.get();\n DataManager.ClaimUtilsModel = gson.fromJson(jsonString, DataManager.ClaimUtils.class);\n if (DataManager.ClaimUtilsModel.data.result.equals(\"success\") || DataManager.ClaimUtilsModel.data.result.equals(\"fail\")) {\n MyClaimActivity.handler.sendEmptyMessage(1);\n } else {\n MyClaimActivity.handler.sendEmptyMessage(500);\n }\n break;\n case 0x401://修改个人资料{\"message\":\"Success\",\"status\":\"1\",\"version\":\"v1.0\"}\n jsonString = (String) response.get();\n DataManager.user = gson.fromJson(jsonString, DataManager.User.class);\n if (DataManager.user.message.equals(\"success\")) {\n csp.putUser(DataManager.user);\n UserSetActivity.handler.sendEmptyMessage(1);\n MainActivity.loginImg(csp.getICONSTEAM());\n } else {\n UserSetActivity.handler.sendEmptyMessage(2);\n }\n break;\n case 0x4011://个人资料字典\n jsonString = (String) response.get();\n DataManager.ZdianS = gson.fromJson(jsonString, DataManager.Zdian.class);\n if (DataManager.ZdianS.data.dictionarie != null && DataManager.ZdianS.data.dictionarie.size() > 0) {\n UserSetActivity.handler.sendEmptyMessage(3);\n }\n break;\n case 0x501://修改密码\n jsonString = (String) response.get();\n DataManager.user = gson.fromJson(jsonString, DataManager.User.class);\n if (DataManager.user.message.equals(\"Success\")) {\n PassWordActivity.handler.sendEmptyMessage(1);\n } else if (DataManager.user.message.equals(\"原始密码错误\")) {\n PassWordActivity.handler.sendEmptyMessage(3);\n } else {\n PassWordActivity.handler.sendEmptyMessage(2);\n }\n\n break;\n case 0x601://二维码名片\n jsonString = (String) response.get();\n DataManager.TwoDimSli = gson.fromJson(jsonString, DataManager.TwoDim.class);\n if (DataManager.TwoDimSli.message.equals(\"success\")) {\n CompanyDetailsActivity.waitDialog.dismiss();\n CompanyDetailsActivity.handler.sendEmptyMessage(25);\n } else {\n CompanyDetailsActivity.handler.sendEmptyMessage(500);\n }\n break;\n case 0x701://信用报告1\n jsonString = (String) response.get();\n if (jsonString.equals(DataManager.BaseinfoList.get(0).ENTNAME + \".pdf\")) {\n DataManager.ReportText = jsonString;\n ReportActivity.handler.sendEmptyMessage(0);\n } else {\n ReportActivity.handler.sendEmptyMessage(1);\n }\n break;\n case 0x702://信用报告2\n jsonString = (String) response.get();\n if (jsonString.equals(\"success\")) {\n ReportActivity.handler.sendEmptyMessage(3);\n } else {\n ReportActivity.handler.sendEmptyMessage(2);\n }\n break;\n case 0x999://登入\n jsonString = (String) response.get();\n map = gson.fromJson(jsonString, new TypeToken<Map<String, Object>>() {\n }.getType());\n\n if (!map.get(\"status\").equals(\"1\")) {//登入失败谁动了我的账号,给我站出来\n Toast.show(map.get(\"message\").toString());\n LoginActivity.wd.dismiss();\n } else {//登入成功\n DataManager.user = gson.fromJson(jsonString, DataManager.User.class);\n csp.putUser(DataManager.user);\n csp.putLoginStatus(true);\n Toast.show(\"登录成功\");\n if (csp.getALIASNAME().equals(\"\")) {\n csp.putALIASNAME(\"用户12138\");\n }\n if (!csp.getALIASNAME().equals(\"\")) {\n MainActivity.UserSz.setText(csp.getALIASNAME());\n } else {\n MainActivity.UserSz.setText(csp.getUSERNAME());\n }\n if (!csp.getICONSTEAM().equals(\"\")) {\n MainActivity.loginImg(csp.getICONSTEAM());\n }\n LoginActivity.handler.sendEmptyMessage(0);\n LoginActivity.wd.dismiss();\n }\n break;\n case 0x998://注册\n jsonString = (String) response.get();\n map = gson.fromJson(jsonString, new TypeToken<Map<String, Object>>() {\n }.getType());\n if (!map.get(\"status\").equals(\"1\")) {//注册失败\n RegisterActivity.pd.dismiss();\n Toast.show(\"注册失败\" + map.get(\"message\").toString());\n } else {//注册成功\n\n RegisterActivity.handler.sendEmptyMessage(0);\n }\n break;\n case 0x997://个人中心获取投诉列表\n jsonString = (String) response.get();\n DataManager.myComplaint = gson.fromJson(jsonString, DataManager.MyComplaint.class);\n MainActivity.handler.sendEmptyMessage(2);\n\n break;\n case 0x9971://个人中心获取投诉列表\n jsonString = (String) response.get();\n DataManager.myComplaint = gson.fromJson(jsonString, DataManager.MyComplaint.class);\n MycomplaintsListActivity.handler.sendEmptyMessage(21);\n\n break;\n\n case 0x996://个人中心取消投诉请求\n jsonString = (String) response.get();\n map = gson.fromJson(jsonString, new TypeToken<Map<String, Object>>() {\n }.getType());\n if (!map.get(\"status\").equals(\"1\")) {//取消失败\n MycomplaintsListActivity.pd.dismiss();\n Toast.show(\"取消失败\" + map.get(\"message\").toString());\n } else {//取消成功\n MycomplaintsListActivity.handler.sendEmptyMessage(1);\n }\n break;\n case 0x995://获取投诉详情\n jsonString = (String) response.get();\n DataManager.complaintDetail = gson.fromJson(jsonString, DataManager.ComplaintDetail.class);\n MycomplaintsListActivity.handler.sendEmptyMessage(3);\n break;\n case 0x994://获取企业投诉列表\n jsonString = (String) response.get();\n DataManager.myComplaint = gson.fromJson(jsonString, DataManager.MyComplaint.class);\n if (CompanyDetailsActivity.waitDialog != null) {\n CompanyDetailsActivity.waitDialog.dismiss();\n }\n CompanyDetailsActivity.handler.sendEmptyMessage(24);\n break;\n case 0x9941://获取企业投诉列表更多\n jsonString = (String) response.get();\n DataManager.myComplaint = gson.fromJson(jsonString, DataManager.MyComplaint.class);\n if (CompanyDetailsActivity.waitDialog != null) {\n CompanyDetailsActivity.waitDialog.dismiss();\n }\n MycomplaintsListActivity.handler.sendEmptyMessage(6);\n break;\n\n case 0x993://提交企业投诉\n jsonString = (String) response.get();\n DataManager.toComplain = gson.fromJson(jsonString, DataManager.ToComplain.class);\n /*map=gson.fromJson(jsonString,new TypeToken<Map<String, Object>>() {\n }.getType());*/\n if (!DataManager.toComplain.status.equals(\"1\")) {//返回提交投诉失败\n Toast.show(\"提交投诉失败\" + map.get(\"message\"));\n } else {//成功\n ToComplaintActivity.handler.sendEmptyMessage(1);\n\n }\n break;\n case 0x992://提交投诉附件\n jsonString = (String) response.get();\n map = gson.fromJson(jsonString, new TypeToken<Map<String, Object>>() {\n }.getType());\n if (!map.get(\"status\").equals(\"1\")) {//返回提交投诉失败\n Toast.show(\"提交投诉图片失败\" + map.get(\"message\"));\n } else {//成功\n ToComplaintActivity.handler.sendEmptyMessage(0);\n\n }\n break;\n case 0x991://提交投诉后刷新企业投诉\n jsonString = (String) response.get();\n DataManager.myComplaint = gson.fromJson(jsonString, DataManager.MyComplaint.class);\n MycomplaintsListActivity.handler.sendEmptyMessage(5);\n break;\n case 0x12138://记录24宫格\n jsonString = (String) response.get();\n break;\n case 0x1001://商标查询\n jsonString = (String) response.get();\n DataManager.sb_searchS = gson.fromJson(jsonString, DataManager.sb_search.class);\n if (DataManager.sb_searchS.data.trademark.size() > 0) {\n Main_SearchActivity.handler.sendEmptyMessage(0);\n } else {\n Main_SearchActivity.handler.sendEmptyMessage(500);\n }\n break;\n case 0x1002://首页专利查询\n jsonString = (String) response.get();\n DataManager.zl_searchS = gson.fromJson(jsonString, DataManager.zl_search.class);\n if (DataManager.zl_searchS.data.patentInfo.size() > 0 && DataManager.zl_searchS.data.patentInfo != null) {\n Main_SearchActivity.handler.sendEmptyMessage(1);\n } else {\n Main_SearchActivity.handler.sendEmptyMessage(500);\n }\n break;\n case 0x1003://首页商标查询(上下拉事件)\n jsonString = (String) response.get();\n DataManager.sb_searchS = gson.fromJson(jsonString, DataManager.sb_search.class);\n if (DataManager.sb_searchS.data.trademark.size() > 0) {\n Main_Search_ListActivity.handler.sendEmptyMessage(0);\n }\n break;\n case 0x1004://专利查询(上下拉事件)\n jsonString = (String) response.get();\n DataManager.zl_searchS = gson.fromJson(jsonString, DataManager.zl_search.class);\n if (DataManager.zl_searchS.data.patentInfo.size() > 0 && DataManager.zl_searchS.data.patentInfo != null) {\n Main_Search_ListActivity.handler.sendEmptyMessage(1);\n }\n break;\n case 0x1005://失信查询\n jsonString = (String) response.get();\n DataManager.MyDishonestyS = gson.fromJson(jsonString, DataManager.MyDishonesty.class);\n if (DataManager.MyDishonestyS.data.Courtcaseinfo.size() > 0 && DataManager.MyDishonestyS.data.Courtcaseinfo != null) {\n Main_SearchActivity.handler.sendEmptyMessage(2);\n }\n break;\n case 0x1006://失信查询(上下拉事件)\n jsonString = (String) response.get();\n DataManager.MyDishonestyS = gson.fromJson(jsonString, DataManager.MyDishonesty.class);\n if (DataManager.MyDishonestyS.data.Courtcaseinfo.size() > 0 && DataManager.MyDishonestyS.data.Courtcaseinfo != null) {\n Main_Search_ListActivity.handler.sendEmptyMessage(2);\n }\n break;\n default:\n break;\n }\n } catch (NullPointerException e) {\n showdisplay(what);\n Toast.show(\"后台数据空返回!\");\n } catch (IndexOutOfBoundsException e) {\n showdisplay(what);\n Toast.show(\"后台数据结构变更下标越界!\");\n } catch (ClassCastException e) {\n showdisplay(what);\n Toast.show(\"后台数据变更类型转换出错!\");\n } catch (NumberFormatException e) {\n showdisplay(what);\n Toast.show(\"字符串转换为数字异常!\");\n } catch (JsonSyntaxException e) {\n showdisplay(what);\n Toast.show(\"后台数据变更json解析出错!\");\n }\n }", "private void parseJSON(Map<String,Object> map, String baseName, JSONObject toParse) {\n\t\ttoParse.keys().forEachRemaining(key -> {\n\t\t\tObject value = parseJSONVal(toParse.get(key));\n\t\t\t\n\t\t\tif(value instanceof JSONObject)\n\t\t\t\tparseJSON(map, baseName+key+StringParser.DELIMITER, (JSONObject) value);\n\t\t\telse if(value instanceof JSONArray) \n\t\t\t\tparseJSON(map, baseName+key+StringParser.DELIMITER, (JSONArray) value);\n\t\t\telse\n\t\t\t\tmap.put(baseName+key, value);\n\t\t});\n\t}", "Map<String, Object> parseToMap(String json);", "@Override\r\n\tpublic boolean parseJson(JSONObject jo) {\n\t\tif (jo == null) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tthis.card_imageurl = JsonUtility.getString(jo, \"card_imageurl\", \"\");\r\n\t\tthis.image_url = JsonUtility.getString(jo, \"image_url\", \"\");\r\n\t\tthis.received_name = JsonUtility.getString(jo, \"received_name\", \"\");\r\n\t\tthis.content = Utility.decodeUnicode(JsonUtility.getString(jo, \"content\", \"\"));\r\n\t\tthis.from_name = JsonUtility.getString(jo, \"from_name\", \"\");\r\n\t\tthis.praise = JsonUtility.getString(jo, \"praise\", \"\");\r\n\r\n\t\treturn true;\r\n\t}", "public static String getJsonByUrl(String url) {\r\n\r\n\t\tString json = null;\r\n\t\ttry {\r\n\t\t\tjson = encryptBeforegetHtml(url, 20);\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tif (null == json || json.length() == 0) {\r\n\t\t\t\tjson = encryptBeforegetHtml(url, 20);\r\n\t\t\t}\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn json;\r\n\t}", "public interface JSONParserService extends Service {\r\n\r\n /**\r\n * Parses from json to map\r\n *\r\n * @param json data\r\n * @return Map<String, Object> or null, if json equals null\r\n */\r\n Map<String, Object> parseToMap(String json);\r\n\r\n /**\r\n * Parses from map to json\r\n *\r\n * @param data map with data\r\n * @return json or null, if map equals null\r\n */\r\n String parseMapToJson(Map<String, Object> data);\r\n\r\n /**\r\n * Parses from object to json\r\n *\r\n * @param obj object that will be parsed to json\r\n * @return json or null if invalid data\r\n */\r\n String parseObjectToJson(Object obj);\r\n\r\n /**\r\n * Parses from json to object of T class\r\n *\r\n * @param json string of json with data object\r\n * @param classObject type object\r\n *\r\n * @return T object or null, if transferred incorrect data\r\n */\r\n <T> T parseToObject(Object json, Class<T> classObject);\r\n\r\n /**\r\n * Parses from json to collection of object's T class\r\n *\r\n * @param json string of json with data objects\r\n * @param typeClass type of objects collection\r\n *\r\n * @return collection of object's T class or null, if transferred incorrect data\r\n */\r\n <T> Collection<T> parseToCollectionObjects(Object json, Type typeClass);\r\n\r\n\r\n}", "void shouldParseTheJsonPostData() {\n }", "public JSONObject getJSONFromUrl(String url) {\n\n\t\t// Making HTTP request\n\t\ttry {\n\t\t\t// defaultHttpClient\n\t\t\tDefaultHttpClient httpClient = new DefaultHttpClient();\n\t\t\tHttpPost httpPost = new HttpPost(url);\n\n\t\t\tHttpResponse httpResponse = httpClient.execute(httpPost);\n\t\t\tHttpEntity httpEntity = httpResponse.getEntity();\n\t\t\tis = httpEntity.getContent();\t\t\t\n\n\t\t} catch (UnsupportedEncodingException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (ClientProtocolException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(\n\t\t\t\t\tis, \"iso-8859-1\"), 8);\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tString line = null;\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tsb.append(line + \"\\n\");\n\t\t\t}\n\t\t\tis.close();\n\t\t\tjson = sb.toString();\n\t\t} catch (Exception e) {\n\t\t\tLog.e(\"Buffer Error\", \"Error converting result \" + e.toString());\n\t\t}\n\n\t\t// try parse the string to a JSON object\n\t\ttry {\n\t\t\tjObj = new JSONObject(json);\n\t\t} catch (JSONException e) {\n\t\t\tLog.e(\"JSON Parser\", \"Error parsing data \" + e.toString());\n\t\t}\n\n\t\t// return JSON String\n\t\treturn jObj;\n\n\t}", "public JSONObject URLGet(String link) throws JSONException {\r\n\t\t\r\n\t\tJSONObject json = null;\r\n\t\tif(isHttps(link))\r\n\t\t\tjson = HttpsGet(link);\r\n\t\telse\r\n\t\t\tjson = HttpGet(link);\r\n\t\treturn json;\r\n\t}", "@Override\n protected String doInBackground(String... arg0) {\n jobj = jsonparser.makeHttpRequest(url);\n try {\n metadata = jobj.getString(TAG_METADATA);\n } catch (Exception e) {\n e.printStackTrace();\n }\n return metadata;\n }", "@Override\n\t\t\t\t\tpublic void handleResponse(String jsonResult,\n\t\t\t\t\t\t\tEHttpError error) {\n\t\t\t\t\t\tMap<String, Object> wishes;\n\t\t\t\t\t\tif (jsonResult != null\n\t\t\t\t\t\t\t\t&& error == EHttpError.KErrorNone) {\n\t\t\t\t\t\t\tGson gson = new Gson();\n\t\t\t\t\t\t\tType type = new TypeToken<Map<String, Object>>() {\n\t\t\t\t\t\t\t}.getType();\n\t\t\t\t\t\t\twishes = gson.fromJson(jsonResult, type);\n\t\t\t\t\t\t\tList<Map<String, Object>> list = (List<Map<String, Object>>) wishes\n\t\t\t\t\t\t\t\t\t.get(\"comments\");\n\t\t\t\t\t\t\tthis.completeListener.onQueryComplete(GETCOMMENT,\n\t\t\t\t\t\t\t\t\tlist, error);\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "public interface JsonDeserializer {\n\n /**\n * Parses and deserializes a Gist object from the provided JSON text. This\n * Gist object does not contain all comments on said Gist, as obtaining a\n * given Gist's comments requires a completely separate Github API call.\n *\n * @param json JSON text to parse\n * @return Gist object with related attributes and objects\n */\n Gist deserializeGistFromJson(String json);\n\n /**\n * Parses and deserializes a List of Gist objects from the provided JSON\n * text. If there is an error with parsing the JSON, null is returned.\n *\n * @param json JSON text to parse\n * @return List of Gist objects\n */\n List<Gist> deserializeGistsFromJson(String json);\n\n /**\n * Parses and deserializes a GistComment object from the provided JSON text.\n *\n * @param json JSON text to parse\n * @return GistComment corresponding to some Gist\n */\n GistComment deserializeCommentFromJson(String json);\n\n /**\n * Parses and deserializes a List of GistComment objects from the provided\n * JSON text. If there is an error with parsing the JSON, null is returned.\n *\n * @param json JSON text to parse\n * @return List of GistComment objects\n */\n List<GistComment> deserializeCommentsFromJson(String json);\n\n /**\n * Parses and deserializes an expanded GistUser object from the provided\n * JSON text. This user contains all fields contained in the \"user\" objects\n * found in standard Gist JSON responses, in addition to more fields found\n * in User JSON responses. If certain fields are present, namely\n * \"private_gists\" and \"total_private_repos\", then this must be the\n * currently authenticated user.\n *\n * @param json JSON text to parse\n * @return GistUser corresponding to some Github user\n */\n GistUser deserializeUserFromJson(String json);\n\n}", "private JSONObject getJSONFromUrl(String url) {\n\t\tInputStream inputStream = null;\n\t\tString jsonString = \"\";\n\t\tJSONObject jsonObject = null;\n\t\tboolean sendMessageError = false;\n\t\t\n\t\ttry {\n DefaultHttpClient httpClient = new DefaultHttpClient();\n HttpPost httpPost = new HttpPost(url);\n\n HttpResponse httpResponse = httpClient.execute(httpPost);\n HttpEntity httpEntity = httpResponse.getEntity();\n inputStream = httpEntity.getContent();\n\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n sendMessageError = true;\n } catch (ClientProtocolException e) {\n e.printStackTrace();\n sendMessageError = true;\n } catch (IOException e) {\n e.printStackTrace();\n sendMessageError = true;\n }\n\t\t\n\t\ttry {\n BufferedReader reader = new BufferedReader(new InputStreamReader(\n \t\tinputStream, \"iso-8859-1\"), 8);\n StringBuilder stringbuilder = new StringBuilder();\n String line = null;\n while ((line = reader.readLine()) != null) {\n \tstringbuilder.append(line + \"\\n\");\n }\n jsonString = stringbuilder.toString();\n } catch (Exception e) {\n \te.printStackTrace();\n \tsendMessageError = true;\n }\n\t\t\n\t\ttry {\n\t\t\tinputStream.close();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tsendMessageError = true;\n\t\t}\n\n\t\ttry {\n\t\t\tjsonObject = new JSONObject(jsonString);\n } catch (Exception e) {\n \te.printStackTrace();\n \tsendMessageError = true;\n }\n\t\t\n\t\tif (sendMessageError)\n\t\t\tsendMessageToObservers(new MessageErrorOccurred());\n\t\t\n\t\treturn jsonObject;\n\t}", "private void getJSONResponse(){\r\n String jsonResponse = null; //unparsed json response\r\n try { \r\n //URL\r\n URL url = new URL(\"\"\r\n + \"https://global.api.pvp.net/api/lol/static-data/\" + this.regionCode + \"/v1.2/champion?champData=image&api_key=\" + this.objLoLSearch.getApiKey());\r\n //retrieve JSON\r\n BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));\r\n String strTemp = \"\";\r\n while (null != (strTemp = br.readLine())) {\r\n jsonResponse = strTemp;\r\n }\r\n //System.out.println(jsonResponse);\r\n parseJSONResponse(jsonResponse); //parse the json response into usable values\r\n \r\n } catch (MalformedURLException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ProtocolException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (IOException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } \r\n }", "@Override\n\t\t\t\t\tpublic void handleResponse(String jsonResult, EHttpError error) {\n\t\t\t\t\t\tif(jsonResult!=null&&error == EHttpError.KErrorNone){\n\t\t\t\t\t\t\tGson gson = new Gson();\n\t\t\t\t\t\t\tType type = new TypeToken<Map<String, Object>>() {\n\t\t\t\t\t\t\t}.getType();\n\t\t\t\t\t\t\tbooks = gson.fromJson(jsonResult, type);\n\t\t\t\t\t\t\tList<Map<String, Object>>list = (List<Map<String, Object>>) books.get(\"books\");\n\t\t\t\t\t\t\tSystem.out.println(\"书籍详情\"+list);\n\t\t\t\t\t\t\tthis.completeListener.onQueryComplete(GETBOOKBYNAME, list, error);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tthis.completeListener.onQueryComplete(GETBOOKBYNAME, null, error);\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void handleResponse(String jsonResult, EHttpError error) {\n\t\t\t\t\t\tif(jsonResult!=null&&error == EHttpError.KErrorNone){\n\t\t\t\t\t\t\tGson gson = new Gson();\n\t\t\t\t\t\t\tType type = new TypeToken<Map<String, Object>>() {\n\t\t\t\t\t\t\t}.getType();\n\t\t\t\t\t\t\tbooks = gson.fromJson(jsonResult, type);\n\t\t\t\t\t\t\tList<Map<String, Object>>list = (List<Map<String, Object>>) books.get(\"books\");\n saveCache(context, jsonResult);\n\t\t\t\t\t\t\tSystem.out.println(\"旧书\"+list);\n\t\t\t\t\t\t\tthis.completeListener.onQueryComplete(GETBOOKBYTAPE, books, error);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tthis.completeListener.onQueryComplete(GETBOOKBYTAPE, null, error);\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "public static JsonResult getJson(final String url)\r\n {\r\n return getJson(url, new JsonResult());\r\n }", "@Test\n\tpublic void testWithJsonPath() {\n\t\t\t\t\n\t\tResponse response = given().accept(ContentType.JSON)\n\t\t.and().pathParam(\"id\", 110)\n\t\t.when().get(ConfigurationReader.getProperty(\"hrapp.baseurl\")+\"/employees/{id}\");\n\t\t\n\t\tJsonPath json = response.jsonPath(); //get json body and assign to jsonPath object\n\t\t//we are assiging whole response to json object so we can easyly reach and use it \n\t\t\n\t\tSystem.out.println(json.getInt(\"employee_id\"));\n\t\tSystem.out.println(json.getString(\"first_name\"));\n\t\tSystem.out.println(json.getString(\"job_id\"));\n\t\tSystem.out.println(json.getInt(\"salary\"));\n\t\tSystem.out.println(json.getString(\"links[0].href\")); //get specific element from array \n\t \n\t\t//assign all hrefs into a list of strings \n\t\tList<String> hrefs = json.getList(\"links.href\");\n\t\t\n\t\t//everything in arraylist \n\t System.out.println(hrefs);\n\t \n\t //one by one \n\t\tfor(String href:hrefs) {\n\t\t\tSystem.out.println(href);\n\t\t}\n\t}", "private void parseResponse(String body) {\n Gson gson = new Gson();\n try {\n FactDataList factDataList = gson.fromJson(body, FactDataList.class);\n if (!factDataList.title.isEmpty() || (factDataList.factDataArrayList != null && factDataList.factDataArrayList.size() > 0)) {\n factDataView.UpdateListView(factDataList);\n } else {\n factDataView.displayMessage(context.getString(R.string.nodata), false);\n }\n } catch (Exception e) {\n e.printStackTrace();\n factDataView.displayMessage(context.getString(R.string.nodata), false);\n }\n }", "private void parseJSONResponse(String response) {\n try {\n JSONObject volume = new JSONObject(response);\n String title = volume.getJSONObject(\"volumeInfo\").optString(\"title\");\n String desc = volume.getJSONObject(\"volumeInfo\").optString(\"description\");\n if(desc == \"\"){\n desc = \"no description\";\n }\n JSONObject imageLinks = volume.getJSONObject(\"volumeInfo\").optJSONObject(\"imageLinks\");\n String imageUrl = \"\";\n if(imageLinks != null) {\n imageUrl = imageLinks.optString(\"medium\");\n if(imageUrl == \"\"){\n imageUrl = imageLinks.optString(\"thumbnail\");\n }\n }\n String authors = \"\";\n JSONArray arr = volume.getJSONObject(\"volumeInfo\").optJSONArray(\"authors\");\n\n if(arr != null) {\n for (int i = 0; i < arr.length(); i++) {\n authors += arr.getString(i);\n }\n }\n\n // Save these details in a Volume object.\n currentVolume = new Volume(title, authors, id, desc, imageUrl);\n\n updateViews();\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n protected List<List<HashMap<String, String>>> doInBackground(String... jsonData) {\n\n JSONObject jObject;\n List<List<HashMap<String, String>>> routes = null;\n\n try {\n jObject = new JSONObject(jsonData[0]);\n DataParser parser = new DataParser();\n\n routes = parser.parse(jObject);\n } catch (Exception e) {\n FirebaseCrashlytics.getInstance().recordException(e);\n e.printStackTrace();\n }\n return routes;\n }", "public void getNextPage(String url) {\n String kw = \"flag\";\n client = new OkHttpClient();\n final Request request = new Request.Builder()\n .url(url)\n .build();\n Call call = client.newCall(request);\n call.enqueue(new Callback() {\n @Override\n public void onFailure(Call call, IOException e) {\n System.out.println(e);\n }\n\n @Override\n public void onResponse(Call call, Response response) throws IOException {\n String htmlStr = response.body().string();\n //Type listTpye = new TypeToken<LinkedList<QueryRes>>(){}.getType();\n //System.out.println(htmlStr.toString());\n\n try {\n json = new JSONObject(htmlStr);\n //parsePageJson(json);\n System.out.println(json);\n } catch (Exception e) {\n System.out.println(\"error again\");\n }\n //parseJson(json);\n Message msg = handler.obtainMessage();\n msg.what = 1;\n handler.sendMessage(msg);\n //parsePageJson(page_json);\n }\n });\n }", "private void parse(){\n\t\tfor (Object res : book_results){\n\t\t\tString author = JsonPath.read(res,\"$.name\").toString();\n\t\t\tRole role = new Role(author, \"Author\");\n\t\t\tList<String> books = JsonPath.read(res,\"$./book/author/works_written[*].a:name\");\n\t\t\tmql_map.put(role, books);\n\t\t}\n\t\t\n\t\tfor (Object res : organization_results){\n\t\t\tString businessperson = JsonPath.read(res,\"$.name\").toString();\n\t\t\tRole role = new Role(businessperson, \"Businessperson\");\n\t\t\tList<String> organizations = JsonPath.read(res,\"$./organization/organization_founder/organizations_founded[*].a:name\");\n\t\t\tmql_map.put(role, organizations);\n\t\t}\n\t}", "public static JSONObject covertDataToJSONForPage(String pageUri, Map<String, Object> data, VitroRequest vreq, ServletContext context) throws InstantiationException, IllegalAccessException, ClassNotFoundException { \n //Get PageDataGetter types associated with pageUri\n JSONObject rObj = null; \n List<PageDataGetter> dataGetters = getPageDataGetterObjects(vreq, pageUri);\n for(PageDataGetter getter: dataGetters) {\n \t JSONObject typeObj = null;\n try{\n typeObj = getter.convertToJSON(data, vreq);\n if( typeObj != null) {\n //Copy over everything from this type Obj to \n //TODO: Review how to handle duplicate keys, etc.\n if(rObj != null) {\n //For now, just nests as separate entry\n rObj.put(getter.getType(), typeObj);\n } else {\n rObj = typeObj;\n }\n } \n \t\n } catch(Throwable th){\n log.error(th,th);\n }\n } \n return rObj;\n }", "public static List<City> pareseJsonToCities(URL url) {\r\n\tObjectMapper objectMapper = new ObjectMapper();\r\n\tList<City> cities = null;\r\n\ttry {\r\n\t JsonNode node = objectMapper.readValue(url, JsonNode.class);\r\n\t if (node.isArray() && node.size() > 0) {\r\n\t\tcities = new ArrayList<>();\r\n\t\tIterator<JsonNode> nodeElements = node.elements();\r\n\t\twhile (nodeElements.hasNext()) {\r\n\t\t City city = new City();\r\n\r\n\t\t JsonNode currentCity = nodeElements.next();\r\n\t\t JsonNode idNode = currentCity.get(\"_id\");\r\n\t\t Long id = idNode.asLong();\r\n\t\t city.setId(id);\r\n\r\n\t\t JsonNode nameNode = currentCity.get(\"name\");\r\n\t\t String name = nameNode != null ? nameNode.asText() :\" \";\r\n\t\t city.setName(name);\r\n\r\n\t\t JsonNode typeNode = currentCity.get(\"type\");\r\n\t\t String type = typeNode != null ? typeNode.asText() :\" \";\r\n\t\t city.setType(type);\r\n\r\n\t\t JsonNode geoPositionNode = currentCity.get(\"geo_position\");\r\n\t\t if (geoPositionNode != null) {\r\n\t\t\tJsonNode latitudeNode = geoPositionNode.get(\"latitude\");\r\n\t\t\tString latitude = latitudeNode!=null?latitudeNode.asText():\" \";\r\n\t\t\tcity.setLatitude(latitude);\r\n\r\n\t\t\tJsonNode longitudeNode = geoPositionNode.get(\"longitude\");\r\n\t\t\tString longitude = longitudeNode!=null?longitudeNode.asText():\" \";\r\n\t\t\tcity.setLongitude(longitude);\r\n\t\t }\r\n\r\n\t\t cities.add(city);\r\n\t\t}\r\n\r\n\t }\r\n\t} catch (JsonParseException | JsonMappingException e) {\r\n\t System.out.println(\"Could not parse Json.\");\r\n\t e.printStackTrace();\r\n\t} catch (IOException e) {\r\n\t System.out.println(\"File I/O problems.\");\r\n\t e.printStackTrace();\r\n\t}\r\n\treturn cities;\r\n }", "private static String getList(String responseString) throws JSONException {\n\t\tJSONObject array = new JSONObject(responseString);\n\t\treturn array.getString(\"url\");\n\t}", "void onMatched(String json);", "private Object onParse(final String content) throws IOException{\n if(null == this.mBean)\n return null;\n\n try{\n return JSON.parseObject(content, this.mBean);\n }catch(Exception e){\n throw new IOException(e.getMessage());\n }\n }", "public void loadFromSource(Object aSrc)\n{\n WebURL url = WebURL.getURL(aSrc);\n String jsonText = url.getText();\n loadFromString(jsonText);\n}", "@Override\n\t\t\t\t\tpublic void handleResponse(String jsonResult, EHttpError error) {\n\t\t\t\t\t\tif(jsonResult!=null&&error == EHttpError.KErrorNone){\n\t\t\t\t\t\t\tGson gson = new Gson();\n\t\t\t\t\t\t\tType type = new TypeToken<Map<String, Object>>() {\n\t\t\t\t\t\t\t}.getType();\n\t\t\t\t\t\t\tbooks = gson.fromJson(jsonResult, type);\n\t\t\t\t\t\t\tList<Map<String, Object>>list = (List<Map<String, Object>>) books.get(\"books\");\n\t\t\t\t\t\t\tSystem.out.println(\"搜索到的书\"+list);\n\t\t\t\t\t\t\tthis.completeListener.onQueryComplete(new QueryId(), list, error);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tthis.completeListener.onQueryComplete(new QueryId(), null, error);\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "@Override\n\t\tprotected Response<JSONObject> parseNetworkResponse(NetworkResponse arg0) {\n\t\t\treturn null;\n\t\t}", "private void parseJsonAndUpdateView(String json) {\n try {\n //JSONObject object = new JSONObject(json);\n //JSONArray comboArr = object.getJSONArray(\"combo\");\n JSONArray comboArr = new JSONArray(json);\n\n for(int i = 0; i < comboArr.length(); i++){\n JSONObject comboItemObj = comboArr.getJSONObject(i);\n ComboBean comboBean = new ComboBean(comboItemObj);\n comboList.add(comboBean);\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n if (comboList.size() >= 0){\n // information main thread update view\n handler.sendEmptyMessage(GET_DATA_SUCCESS);\n }\n }", "@GET(\"w/api.php?action=parse&format=json&noimage\")\n Call<JsonElement> getSectionFrom(@Query(\"pageid\") long pageid,@Query(\"section\") long section);", "private void parseJsonF1 (String fromAsset) {\n try {\n JSONObject jsonObj = new JSONObject(fromAsset);\n JSONObject jsonObject = jsonObj.getJSONObject(\"data\");\n JSONObject details = jsonObject.getJSONObject(\"details\");\n Iterator<String> itr = details.keys();\n while (itr.hasNext()) {\n String key = itr.next();\n if (key.equals(\"minimumAmount\") || key.equals(\"minimumAmount\") || key.equals(\"suggestedAmount\")) {\n JSONArray jsonArray = details.getJSONArray(key);\n for (int i = 0; i < jsonArray.length(); i++) { // **line 2**\n JSONObject childJSONObject = jsonArray.getJSONObject(i);\n int amount = childJSONObject.getInt(\"amount\");\n String currency = childJSONObject.getString(\"currency\");\n DetailsBean details1 = new DetailsBean();\n details1.setAmout(amount);\n details1.setCurrency(currency);\n detailsList.add(details1);\n }\n }\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic JSONObject findGauge(String jsonStr) throws Exception {\n\t\tJSONObject responseData = new JSONObject();\n\t\t try {\n\t\t\t JSONObject allData = JSONObject.fromObject(jsonStr);\n\t\t\t Integer type = allData.getInt(\"type\");\n\t\t\t String jianju_name = allData.getString(\"jianju_name\");\n\t\t\t if(type==1){\n\t\t\t\t List<SpecialGauge> specialGauges = fuliaoMapper.findSpecialGauge(\"%\"+jianju_name+\"%\", \"%\"+jianju_name+\"%\");\n\t\t \t\t\tif(specialGauges.size()!=0){\n\t\t \t\t\t\tJSONArray jsonArray = JSONArray.fromObject(specialGauges);\n\t\t \t\t\t\tresponseData.put(\"is_success\", \"1\");\n\t\t \t\t\t\tresponseData.put(\"type\", 1);\n\t\t \t\t\t\tresponseData.put(\"all\", jsonArray);\n\t\t \t\t\t\treturn responseData;\n\t\t \t\t\t}else{\n\t\t \t\t\t\tresponseData.put(\"is_success\", \"0\");\n\t\t \t\t\t\treturn responseData;\n\t\t \t\t\t}\n\t\t\t }else if(type==2){\n\t\t\t\t List<HeightGauge> heightGauges = fuliaoMapper.findHeightGauge(\"%\"+jianju_name+\"%\");\n\t\t \t\t\tif(heightGauges.size()!=0){\n\t\t \t\t\t\tJSONArray jsonArray = JSONArray.fromObject(heightGauges);\n\t\t \t\t\t\tresponseData.put(\"is_success\", \"1\");\n\t\t \t\t\t\tresponseData.put(\"type\", 2);\n\t\t \t\t\t\tresponseData.put(\"all\", jsonArray);\n\t\t \t\t\t\treturn responseData;\n\t\t \t\t\t}else{\n\t\t \t\t\t\tresponseData.put(\"is_success\", \"0\");\n\t\t \t\t\t\treturn responseData;\n\t\t \t\t\t}\n\t\t\t }else{\n\t\t\t\t responseData.put(\"is_success\", \"-1\");\n\t\t\t\t return responseData; \n\t\t\t }\n\t\t }catch(Exception e) {\n\t\t\t e.printStackTrace();\n\t\t\t responseData.put(\"is_success\", \"-1\");\n\t\t\t return responseData;\n\t\t }\n\t}", "public Map<String,Object> parseSingleJSON(Object jObj) {\n\t\tMap<String,Object> map = new HashMap<>();\n\t\t\n\t\tif(jObj instanceof JSONObject)\n\t\t\tparseJSON(map, \"\", (JSONObject) jObj);\n\t\telse if(jObj instanceof JSONArray)\n\t\t\tparseJSON(map, \"\", (JSONArray) jObj);\n\t\telse\n\t\t\tmap.put(jObj.toString(), parseJSONVal(jObj));\n\t\t\n\t\treturn map;\n\t}", "@Test\r\n public void testParseConnection() throws MalformedURLException {\r\n JsonArray array = null;\r\n JsonParser parser = new JsonParser();\r\n URL url = new URL(\"https://en.wikipedia.org/w/api.php?action=query&format=json&prop=revisions&titles=\\\" + \\\"Ball State\\\" + \\\"&rvprop=timestamp|user&rvlimit=24&redirects\");\r\n InputStream inputstream = getClass().getClassLoader().getResourceAsStream(\"sample.json\");\r\n assert inputstream != null;\r\n Reader reader = new InputStreamReader(inputstream);\r\n JsonElement rootElement = parser.parse(reader);\r\n JsonObject rootObject = rootElement.getAsJsonObject();\r\n JsonObject pages = rootObject.getAsJsonObject(\"query\").getAsJsonObject(\"pages\");\r\n for (Map.Entry<String, JsonElement> entry : pages.entrySet()) {\r\n JsonObject entryObject = entry.getValue().getAsJsonObject();\r\n array = entryObject.getAsJsonArray(\"revisions\");\r\n }\r\n System.out.println(array);\r\n System.out.println(url);\r\n }", "@Override\n\tpublic void onParser(JSONArray response) {\n\n\t}", "public static JSONObject readJsonObject(HttpServletRequest request) {\n StringBuffer sb = new StringBuffer();\n String line = null;\n try {\n\t //get the body information from request which is a kind JSON file.\n BufferedReader reader = request.getReader(); \n while ((line = reader.readLine()) != null) {\n \t sb.append(line);\n }\n reader.close();\n return new JSONObject(sb.toString());\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }", "@Override\n protected Void doInBackground(Void... arg0) {\n HttpURLConnection urlConnection = null;\n\n try {\n URL data = new URL(url);\n urlConnection = (HttpURLConnection) data.openConnection();\n\n int responseCode = urlConnection.getResponseCode();\n\n if (responseCode == HttpURLConnection.HTTP_OK) {\n\n readJsonStream(urlConnection.getInputStream());\n }\n\n } catch (MalformedURLException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n urlConnection.disconnect();\n return null;\n }", "private void getJSON(String url) {\n class GetJSON extends AsyncTask<String, Void, String> {\n\n @Override\n protected void onPreExecute() {\n super.onPreExecute();\n }\n\n @Override\n protected String doInBackground(String... params) {\n\n String uri = params[0];\n\n BufferedReader bufferedReader = null;\n try {\n URL url = new URL(uri);\n HttpURLConnection con = (HttpURLConnection) url.openConnection();\n StringBuilder sb = new StringBuilder();\n\n bufferedReader = new BufferedReader(new InputStreamReader(con.getInputStream()));\n\n String json;\n while((json = bufferedReader.readLine())!= null){\n sb.append(json+\"\\n\");\n }\n\n sites = sb.toString().split(\"],\"); //split the big string into individual sites by ending bracket\n testing(); //call method that will split into 2d array\n return sb.toString().trim();\n\n }catch(Exception e){\n return null;\n }\n\n }\n\n @Override\n protected void onPostExecute(String s) {\n super.onPostExecute(s);\n\n }\n }\n GetJSON gj = new GetJSON();\n gj.execute(url);\n }", "private ArrayList<String> permaLinkParser(String response, ArrayList<String> permaLinkUrls){\n\t\tJsonElement element = new JsonParser().parse(response);\n\t\tJsonArray array = element.getAsJsonArray();\n\t\t\n\t\tfor(int i = 0; i < array.size(); i++){\n\t\t\tJsonObject currentObject = array.get(i).getAsJsonObject().getAsJsonObject();\n\t\t\t\n\t\t\tString key = currentObject.get(\"permalink_url\").toString().replaceAll(\"\\\"\", \"\");\n\t\t\tpermaLinkUrls.add(key);\n\t\t}\n\t\t\n\t\treturn permaLinkUrls;\n\t\t\n\t}", "protected String fetchJSON(String requestedUrl) throws IOException {\n Log.d(this.TAG, \"Hitting URL \" + requestedUrl);\n URL url = new URL(requestedUrl);\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n /* TODO: Set connection headers (User-agent, etc) */\n\n int status = connection.getResponseCode();\n if (status != HttpURLConnection.HTTP_OK) {\n throw new IOException(\"Bad URL: \" + requestedUrl);\n }\n\n InputStream in = connection.getInputStream();\n BufferedReader reader = new BufferedReader(new InputStreamReader(in));\n\n StringBuilder stringBuilder = new StringBuilder();\n String line;\n\n while ((line = reader.readLine()) != null) {\n stringBuilder.append(line);\n }\n\n connection.disconnect();\n return stringBuilder.toString();\n }", "@Override\n protected List<List<HashMap<String, String>>> doInBackground(String... jsonData) {\n\n JSONObject jObject;\n List<List<HashMap<String, String>>> routes = null;\n\n try {\n jObject = new JSONObject(jsonData[0]);\n// Log.e(\"JO\", String.valueOf(jObject));\n DataParser parser = new DataParser();\n\n JSONArray array = jObject.getJSONArray(\"routes\");\n JSONObject JORoutes = array.getJSONObject(0);\n JSONArray JOLegs= JORoutes.getJSONArray(\"legs\");\n JSONObject JOSteps = JOLegs.getJSONObject(0);\n JSONObject JODistance = JOSteps.getJSONObject(\"distance\");\n if (JODistance.has(\"text\")) {\n distance = JODistance.getString(\"text\");\n }\n\n // Starts parsing data\n routes = parser.parse(jObject);\n } catch (Exception e) {\n e.printStackTrace();\n }\n return routes;\n }", "private Tuple<String, PlaceholderArgs> parseJSON(String json, Map<String, PlaceholderArgs> existing) {\n\n HashArgs args = new HashArgs();\n // recursively sanitize\n json = sanitize(json, existing, args);\n\n JsonParser parser = new JsonParser();\n JsonElement el = parser.parse(json); // use actual json parsers cause only schmucks write their own\n // except google isnt a schmuck. its google.\n if (!el.isJsonObject()) {\n return null;\n }\n JsonObject obj = el.getAsJsonObject();\n if (!obj.has(\"id\")) { // invalid json, we don't care just leave it in the text.\n return null;\n }\n String id = obj.get(\"id\").getAsString();\n Tuple<String, Placeholder<?>> plx = tryGetPlaceholder(id, existing);\n if (plx == null) {\n return null; // didnt find a valid placeholder -> leave it\n }\n // get placeholder to parse for\n Placeholder<?> pl = plx.getSecond();\n id = plx.getFirst();\n for (Map.Entry<String, JsonElement> e : obj.entrySet()) { // parse json to put into args\n parseJsonValue(e.getKey(), e.getValue(), pl, args, existing);\n }\n return Tuple.of(id, args);\n }", "public static Map<String,String> getPrice() throws MalformedURLException, IOException {\n Map<String,String>priceMap = new HashMap();\n String price;\n URL url = new URL(\"https://api.independentreserve.com/Public/GetMarketSummary?primaryCurrencyCode=xbt&secondaryCurrencyCode=aud\");\n try (InputStream is = url.openStream();\n JsonParser parser = Json.createParser(is)) {\n while (parser.hasNext()) {\n JsonParser.Event e = parser.next();\n if (e == JsonParser.Event.KEY_NAME) {\n switch (parser.getString()) {\n case \"DayHighestPrice\":\n parser.next();\n price=parser.getString();\n priceMap.put(\"DayHighestPrice\",price);\n break;\n case \"DayLowestPrice\":\n parser.next();\n System.out.print(\"DayLowestPrice: \");\n price=parser.getString();\n System.out.println(price);\n System.out.println(\"---------\");\n priceMap.put(\"DayLowestPrice\", price);\n break;\n case \"CurrentLowestOfferPrice\":\n parser.next();\n System.out.print(\"CurrentLowestOfferPrice: \");\n price=parser.getString();\n System.out.println(price);\n System.out.println(\"---------\");\n priceMap.put(\"CurrentLowestOfferPrice\", price);\n break;\n case \"CurrentHighestBidPrice\":\n parser.next();\n price=parser.getString();\n System.out.print(\"CurrentHighestBidPrice: \");\n System.out.println(price);\n priceMap.put(\"CurrentHighestBidPrice\", price);\n break;\n case \"LastPrice\":\n parser.next();\n System.out.print(\"LastPrice: \");\n price=parser.getString();\n System.out.println(price);\n System.out.println(\"---------\");\n priceMap.put(\"LastPrice\", price);\n break;\n }\n }\n }\n }\n \n return priceMap; \n}", "public void parseResponse();", "protected String fixASingleJsonLdBlock(String markup, String url) throws JsonLDInspectionException {\n\t\tJSONParser parser = new JSONParser();\n\t\tJSONArray jsonArray = null;\n\t\tJSONObject jsonObj = null;\n\t\ttry {\n\t\t\tObject obj = parser.parse(markup);\n\n\t\t\tif (obj instanceof JSONArray) {\n\t\t\t\tjsonArray = (JSONArray) obj;\n\t\t\t\treturn fixAJsonLdArray(jsonArray, url);\n\t\t\t} else if (obj instanceof JSONObject) {\n\t\t\t\tjsonObj = (JSONObject) obj;\n\t\t\t\treturn fixASingleJsonLdObject(jsonObj, url);\n\t\t\t}\n\n\t\t\tthrow new JsonLDInspectionException(\"Unkown object obtained from JSON parser :\" + url);\n\n\t\t} catch (ParseException e) {\n\t\t\tthrow new JsonLDInspectionException(\"JSON ParseException. Failed to parse JSON from :\" + url + \" Parser Error: \" + e);\n\t\t}\n\t}", "public JSONObject getResponse(){\n try {\n URL finalURL = new URL(url);\n BufferedReader in = new BufferedReader(\n new InputStreamReader(finalURL.openStream()));\n String inputLine;\n while ((inputLine = in.readLine()) != null) {\n sb.append(inputLine);\n }\n in.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n String str = sb.toString();\n try {\n json = new JSONObject(str);\n } catch (Exception e) {\n\n }\n return json;\n }", "private static List<News> extractFeaturesFromJsonResponse(String jsonResponse) {\n List<News> newsList = new ArrayList<>();\n\n try {\n JSONObject baseJsonObject = new JSONObject(jsonResponse);\n // If JSON object does not contain \"response\" return null object\n if (!baseJsonObject.has(Keys.JSON_NEWS_OBJECT_KEY)) {\n return null;\n }\n\n JSONObject response = baseJsonObject.getJSONObject(Keys.JSON_NEWS_OBJECT_KEY);\n JSONArray resultsArray = response.getJSONArray(Keys.JSON_NEWS_ARRAY_KEY);\n\n for (int i = 0; i < resultsArray.length(); i++) {\n JSONObject newsObject = resultsArray.getJSONObject(i);\n\n // Get section name\n String sectionName = newsObject.getString(Keys.JSON_NEWS_SECTION_KEY);\n // Get Headline\n String newsHeadline = newsObject.getString(Keys.JSON_NEWS_HEADLINE_KEY);\n // Get published time\n String publishedTime = newsObject.getString(Keys.JSON_NEWS_PUBLISHED_TIME_KEY);\n // Get web Url\n String webUrl = newsObject.getString(Keys.JSON_NEWS_URL_KEY);\n\n // Get thumbnail URL string\n String newsThumbnailUrlString = null;\n if (newsObject.has(Keys.JSON_NEWS_FIELDS_KEY)) {\n JSONObject field = newsObject.getJSONObject(Keys.JSON_NEWS_FIELDS_KEY);\n\n if (field.has(Keys.JSON_NEWS_THUMBNAIL_KEY)) {\n newsThumbnailUrlString = field.getString(Keys.JSON_NEWS_THUMBNAIL_KEY);\n }\n }\n\n // Get author name\n String authorName = null;\n if (newsObject.has(Keys.JSON_NEWS_TAGS_KEY)) {\n JSONArray tags = newsObject.getJSONArray(Keys.JSON_NEWS_TAGS_KEY);\n if (!tags.isNull(0)) {\n // If first element of array is not null then get the author name\n JSONObject tagsObject = tags.getJSONObject(0);\n if (tagsObject.has(Keys.JSON_NEWS_AUTHOR_NAME_KEY)) {\n authorName = tagsObject.getString(Keys.JSON_NEWS_AUTHOR_NAME_KEY);\n }\n }\n }\n newsList.add(new News(newsHeadline, sectionName, authorName, publishedTime, webUrl, newsThumbnailUrlString));\n }\n } catch (JSONException e) {\n Log.e(LOG_TAG, \"Error creating JSON object : extractFeaturesFromJsonResponse() method\", e);\n }\n return newsList;\n }", "public static final <T extends JsonResult> T getJson(final String url, final T json)\r\n {\r\n HttpSimpleResponse response = getHttpFetcher().fetch(url);\r\n String httpResponse = response.getResponse();\r\n\r\n json.setHttpResponse(response);\r\n\r\n if (httpResponse.length() > 0)\r\n {\r\n if (httpResponse.startsWith(\"[\"))\r\n {\r\n try\r\n {\r\n json.setJsonArray(new JSONArray(httpResponse));\r\n }\r\n catch (final JSONException e)\r\n {\r\n Log.e(TAG, \"Could not convert to JSON array.\", e);\r\n }\r\n }\r\n else if (httpResponse.startsWith(\"{\"))\r\n {\r\n try\r\n {\r\n json.setJsonObject(new JSONObject(httpResponse));\r\n }\r\n catch (final JSONException e)\r\n {\r\n Log.e(TAG, \"Could not convert to JSON object.\", e);\r\n }\r\n }\r\n else if (httpResponse.startsWith(\"\\\"\"))\r\n {\r\n if (httpResponse.endsWith(\"\\\"\"))\r\n {\r\n json.setJsonString(httpResponse.subSequence(1, httpResponse.length() - 1).toString());\r\n }\r\n }\r\n }\r\n\r\n return json;\r\n }", "@Test\n\tpublic void testJsonPath() {\n\tString responseAsString=\n\t\twhen().\n\t\t\tget(\"http://jsonplaceholder.typicode.com/photos\").\n\t\tthen().\n\t\textract().asString();\n\t\t\n\tList<Integer> albumIds = from(responseAsString).get(\"id\");\n\tSystem.out.println(albumIds.size());\n\t}", "@Override\n protected List<List<HashMap<String, String>>> doInBackground(String... jsonData) {\n JSONObject jObject;\n List<List<HashMap<String, String>>> routes = null;\n try {\n jObject = new JSONObject(jsonData[0]);\n Log.d(\"ParserTask\", jsonData[0].toString());\n DataParser parser = new DataParser();\n Log.d(\"ParserTask\", parser.toString());\n // Starts parsing data\n routes = parser.parse(jObject);\n Log.d(\"ParserTask\", \"Executing routes\");\n Log.d(\"ParserTask\", routes.toString());\n } catch (Exception e) {\n Log.d(\"ParserTask\", e.toString());\n e.printStackTrace();\n }\n return routes;\n }", "@Override\n protected List<List<HashMap<String, String>>> doInBackground(String... jsonData) {\n\n JSONObject jObject;\n List<List<HashMap<String, String>>> routes = null;\n\n try{\n\n Log.d(\"debbbbb\", jsonData[0]);\n\n jObject = new JSONObject(jsonData[0]);\n DirectionsJSONParser parser = new DirectionsJSONParser();\n\n // Starts parsing data\n routes = parser.parse(jObject);\n }catch(Exception e){\n e.printStackTrace();\n }\n return routes;\n }", "public interface RequestURLs {\n String DEFAULT_URL = \"http://aperturedev.co.kr:21002/petcommunity/\";\n\n /*\n 매칭 서비스 관련\n */\n String GET_PET_TYPES = DEFAULT_URL + \"services/get-pettypes.php\"; // 강아지 종을 가져온다.\n String REGIST_MATCH_PET = DEFAULT_URL + \"matching/regist-new-pet.php\"; // 팻 등록 실시\n String MATCHING_OTHER_PET = DEFAULT_URL + \"matching/matching.php\"; // 매칭할 팻을 하나 가져옵니다.\n\n /*\n 사용자 정보 관련\n */\n String GET_USER_INFO = DEFAULT_URL + \"users/get-info.php\"; // UUID -> 사용자 정보\n String REGIST_SERVICE = DEFAULT_URL + \"users/signup.php\"; // 회원가입을 실시한다.\n String IS_REGIST_SERVICE = DEFAULT_URL + \"/users/is-registed.php\"; // 회원가입 되어 있는지 확인한다.\n String LOGIN_SERVICE = DEFAULT_URL + \"users/signin.php\"; // 로그인 처리한다.\n\n\n\n\n}", "public ArrayList<Product> parseJSONAction(String textJson){\n \n JSONParser j = new JSONParser();\n \n try {\n \n Map<String, Object> productsListJson = j.parseJSON(new CharArrayReader(textJson.toCharArray()));\n ArrayList<Map<String,Object>> productsList = (ArrayList<Map<String,Object>>) productsListJson.get(\"root\");\n //System.out.println(\"pdd \" + productsList.toString());\n Map<String, Object> cart = productsList.get(0);\n //System.out.println(\"cc \" + cart);\n //System.out.println(\"ggg\" + cart.get(\"cart\"));\n ArrayList<Map<String,Object>> lis = (ArrayList<Map<String,Object>>) cart.get(\"cart\");\n //System.out.println(\"lista \" + lis.toString());\n for(Map<String, Object> en : lis){\n Product p = new Product();\n p.setDetails(en.get(\"numProducts\").toString());\n p.setRef_product((int) Double.parseDouble(en.get(\"refProduct\").toString()));\n p.setPrice((int) Float.parseFloat(en.get(\"totalPrice\").toString()));\n products.add(p);\n }\n \n Map<String, Object> data = productsList.get(1);\n ArrayList<Map<String,Object>> llis = (ArrayList<Map<String,Object>>) data.get(\"data\");\n System.out.println(\"dddd\" + llis.toString());\n int i=0;\n for(Map<String, Object> en : llis){\n Product pro = products.get(i);\n pro.setName(en.get(\"name\").toString());\n pro.setPhoto(\"http://127.0.0.1/ftbb_web/ftbb_web/public/images/prod/\"+en.get(\"photo\").toString());\n i++;\n }\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n \n return products; \n }", "@Override\n protected List<List<HashMap<String, String>>> doInBackground(String... jsonData) {\n\n\n JSONObject jObject;\n List<List<HashMap<String, String>>> routes = null;\n\n try{\n jObject = new JSONObject(jsonData[0]);\n DirectionsJSONParser parser = new DirectionsJSONParser();\n\n // Starts parsing data\n routes = parser.parse(jObject);\n }catch(Exception e){\n\n\n\n e.printStackTrace();\n }\n return routes;\n }", "@SuppressLint(\"SetTextI18n\")\n private void processJsonData(String report)\n {\n try {\n JSONObject mainObject = new JSONObject(report);\n JSONArray reportArray = mainObject.optJSONArray(\"report\");\n\n JSONObject jsonIndex = reportArray.getJSONObject(0);\n JSONArray detailArray = jsonIndex.getJSONArray(\"detail\");\n JSONObject detailObject = detailArray.getJSONObject(0);\n\n if(!detailObject.getString(\"monthlyTaka\").equals(\"0\"))\n monthlyTaka = detailObject.getString(\"monthlyTaka\");\n else monthlyTaka = \"0\";\n\n if(!detailObject.getString(\"monthlyCost\").equals(\"0\"))\n monthlyCost = detailObject.getString(\"monthlyCost\");\n else monthlyCost = \"0\";\n\n if(!detailObject.getString(\"monthlyMeal\").equals(\"0\"))\n monthlyMeal = detailObject.getString(\"monthlyMeal\");\n else monthlyMeal = \"0\";\n\n if(!detailObject.getString(\"remaining\").equals(\"0\"))\n remain = detailObject.getString(\"remaining\");\n else remain = \"0\";\n\n if(!detailObject.getString(\"mealRate\").equals(\"0\"))\n mealRate = detailObject.getString(\"mealRate\");\n else mealRate = \"0\";\n\n String name,meal,taka,cost,status;\n\n for(int i=1;i<reportArray.length();i++)\n {\n int count=0;\n JSONObject index = reportArray.getJSONObject(i);\n JSONArray infoArray = index.getJSONArray(\"info\");\n while(count<infoArray.length())\n {\n JSONObject object = infoArray.getJSONObject(count);\n\n name = object.getString(\"name\");\n if(!object.getString(\"meal\").equals(\"null\"))\n meal = object.getString(\"meal\");\n else meal = \"0\";\n if(!object.getString(\"taka\").equals(\"null\"))\n taka = object.getString(\"taka\");\n else taka = \"0\";\n if(!object.getString(\"cost\").equals(\"null\"))\n cost = object.getString(\"cost\");\n else cost = \"0\";\n if(!object.getString(\"status\").equals(\"null\"))\n status = object.getString(\"status\");\n else status = \"0\";\n modelList.add(new CostModel(name,meal,taka,cost,status));\n count++;\n }\n }\n\n ReportAdapter adapter = new ReportAdapter(this, modelList, mealRate, sharedPreferenceData.getmyCurrentSession());\n listView.setAdapter(adapter);\n\n txtTotalTaka.setText(monthlyTaka);txtTotalMeal.setText(monthlyMeal);txtTotalCost.setText(monthlyCost);\n txtRemaining.setText(remain);txtMealRate.setText(mealRate+\" per meal\");\n\n }catch (JSONException e)\n {\n Log.d(\"Exception \",e.toString());\n }\n }", "private JsonArrayRequest getDataFromServer(String url, String requestCount) {\r\n\r\n //JsonArrayRequest of volley\r\n return new JsonArrayRequest(url + String.valueOf(requestCount),\r\n new Response.Listener<JSONArray>() {\r\n @Override\r\n public void onResponse(JSONArray response) {\r\n //Calling method to parse the json response\r\n parseData(response, requestCount);\r\n }\r\n },\r\n new Response.ErrorListener() {\r\n @Override\r\n public void onErrorResponse(VolleyError error) {\r\n //If an error occurs that means end of the list has reached\r\n }\r\n });\r\n }", "@Override\r\n protected List<List<HashMap<String, String>>> doInBackground(String... jsonData) {\r\n\r\n JSONObject jObject;\r\n List<List<HashMap<String, String>>> routes = null;\r\n\r\n try {\r\n jObject = new JSONObject(jsonData[0]);\r\n Log.d(\"ParserTask\", jsonData[0].toString());\r\n DataParser parser = new DataParser();\r\n Log.d(\"ParserTask\", parser.toString());\r\n\r\n // Starts parsing data\r\n routes = parser.parse(jObject);\r\n Log.d(\"ParserTask\", \"Executing routes\");\r\n Log.d(\"ParserTask\", routes.toString());\r\n\r\n } catch (Exception e) {\r\n Log.d(\"ParserTask\", e.toString());\r\n e.printStackTrace();\r\n }\r\n return routes;\r\n }", "public static HashMap<String, String> feedResponse(String responseUrl) throws Exception {\n\t\tSystem.out.println(responseUrl);\r\n\t\tObjectMapper objectMapper = new ObjectMapper();\r\n\t\tMap<String, Object> map = new HashMap<String, Object>();\r\n\t\t// convert JSON string to Map\r\n\t\tmap = objectMapper.readValue(responseUrl, new TypeReference<Map<String, Object>>() {\r\n\t\t});\r\n\t\t// System.out.println(map.size());\r\n\t\tMap<String, String> dynamicValuesMap = new HashMap<String, String>();\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tArrayList<Map<String, Object>> data = (ArrayList<Map<String, Object>>) map.get(\"entries\");\r\n\t\tArrayList<Map<String, Object>> seriesName;\r\n\t\tfor (Map<String, Object> show : data) {\r\n\t\t\tif (show.get(\"pl1$fullEpisode\").toString().equalsIgnoreCase(\"true\")) {\r\n\t\t\t\tdynamicValuesMap.put(\"s:stream:type\", \"VOD Episode\");\r\n\t\t\t} else {\r\n\t\t\t\tdynamicValuesMap.put(\"s:stream:type\", \"VOD Clip\");\r\n\t\t\t}\r\n\t\t\tif (show.get(\"pl1$entitlement\").toString().equalsIgnoreCase(\"free\")) {\r\n\t\t\t\tdynamicValuesMap.put(\"s:meta:videostatus\", \"Unrestricted\");\r\n\t\t\t} else {\r\n\t\t\t\tdynamicValuesMap.put(\"s:meta:videostatus\", \"Restricted\");\r\n\t\t\t}\r\n\t\t\t// System.out.println(show.get(\"pl1$episodeNumber\"));\r\n\t\t\t// System.out.println(show.get(\"pl1$seasonNumber\"));\r\n\t\t\t// System.out.println(show.get(\"guid\"));\r\n\t\t\tdynamicValuesMap.put(\"s:meta:videoguid\", show.get(\"guid\").toString());\r\n\t\t\t// Comscore event\r\n\t\t\tdynamicValuesMap.put(\"ns_st_ci\", show.get(\"guid\").toString());\r\n\t\t\tassetValuesFeedMap.put(\"VOD ID\", show.get(\"guid\").toString());\r\n\t\t\tdynamicValuesMap.put(\"s:meta:videodaypart\", show.get(\"pl1$dayPart\").toString());\r\n\t\t\tdynamicValuesMap.put(\"s:meta:videoepnumber\", show.get(\"pl1$episodeNumber\").toString());\r\n\t\t\t// Comscore events\r\n\t\t\tdynamicValuesMap.put(\"ns_st_en\", show.get(\"pl1$episodeNumber\").toString());\r\n\t\t\tassetValuesFeedMap.put(\"VOD Episode Number\", show.get(\"pl1$episodeNumber\").toString());\r\n\t\t\tdynamicValuesMap.put(\"s:meta:videotitle\", show.get(\"title\").toString());\r\n\t\t\tdynamicValuesMap.put(\"ns_st_pr\", show.get(\"title\").toString());\r\n\t\t\tdynamicValuesMap.put(\"ns_st_ep\", show.get(\"title\").toString());\r\n\t\t\tassetValuesFeedMap.put(\"VOD Episode\", show.get(\"title\").toString());\r\n\t\t\tdynamicValuesMap.put(\"s:asset:name\", show.get(\"title\").toString());\r\n\t\t\tdynamicValuesMap.put(\"VOD Episode Number\", show.get(\"pl1$episodeNumber\").toString());\r\n\t\t\tdynamicValuesMap.put(\"s:meta:videoseason\", show.get(\"pl1$seasonNumber\").toString());\r\n\t\t\tdynamicValuesMap.put(\"ns_st_sn\", show.get(\"pl1$seasonNumber\").toString());\r\n\t\t\t// setting parameter for s:meta:videoinitiate\r\n\t\t\tdynamicValuesMap.put(\"s:meta:videoinitiate\", \"Manual\");\r\n\t\t\tassetValuesFeedMap.put(\"VOD Season\", show.get(\"pl1$seasonNumber\").toString());\r\n\t\t\t// System.out.println(show.get(\"title\"));\r\n\t\t\tseriesName = (ArrayList<Map<String, Object>>) show.get(\"media$categories\");\r\n\t\t\tfor (Map<String, Object> series : seriesName) {\r\n\t\t\t\tSystem.out.println(series.get(\"media$name\"));\r\n\t\t\t\tdynamicValuesMap.put(\"s:meta:videoprogram\", series.get(\"media$name\").toString().replace(\"Series/\", \"\"));\r\n\t\t\t\t// Comscore Events\r\n\t\t\t\tdynamicValuesMap.put(\"c6\", series.get(\"media$name\").toString().replace(\"Series/\", \"\"));\r\n\t\t\t\tassetValuesFeedMap.put(\"VOD Series\", series.get(\"media$name\").toString().replace(\"Series/\", \"\"));\r\n\t\t\t}\r\n\t\t\tArrayList<Map<String, Object>> adPositions = new ArrayList<>();\r\n\t\t\tArrayList<String> positions = new ArrayList<>();\r\n\t\t\t// adPositions = (ArrayList<Map<String, Object>>)\r\n\t\t\t// show.get(\"plmedia$chapters\");\r\n\t\t\t// System.out.println(show);\r\n\t\t\tadPots = new HashMap<>();\r\n\t\t\t// System.out.println(show.get(\"plmedia$chapters\"));\r\n\t\t\t// for (Map<String, Object> series : adPositions) {\r\n\t\t\t// String pos = String.valueOf(series.get(\"plmedia$startTime\"));\r\n\t\t\t// positions.add(pos);\r\n\t\t\t// adPots.put(\"seekTo\", positions);\r\n\t\t\t// }\r\n\t\t}\r\n\t\tfor (String parameter : assetValuesFeedMap.keySet()) {\r\n\t\t\tSystem.out.println(parameter + \":\" + assetValuesFeedMap.get(parameter));\r\n\t\t}\r\n\t\t/*\r\n\t\t * for (String parameter : assetValuesFeedMap.keySet()) {\r\n\t\t * System.out.println(parameter + \":\" +\r\n\t\t * assetValuesFeedMap.get(parameter)); }\r\n\t\t */\r\n\t\treturn (HashMap<String, String>) dynamicValuesMap;\r\n\t}", "@Override\n protected List<List<HashMap<String, String>>> doInBackground(String... jsonData) {\n\n JSONObject jObject;\n List<List<HashMap<String, String>>> routes = null;\n\n try {\n jObject = new JSONObject(jsonData[0]);\n Log.d(\"ParserTask\", jsonData[0].toString());\n DataParser parser = new DataParser();\n Log.d(\"ParserTask\", parser.toString());\n\n // Starts parsing data\n routes = parser.parse(jObject);\n Log.d(\"ParserTask\", \"Executing routes\");\n Log.d(\"ParserTask\", routes.toString());\n\n } catch (Exception e) {\n Log.d(\"ParserTask exp\", e.toString());\n e.printStackTrace();\n }\n return routes;\n }", "@Override\n protected JSONObject doInBackground(String... strings) {\n try {\n String query = strings[0];\n URL url = new URL(query);\n Scanner scanner = new Scanner(url.openConnection().getInputStream());\n StringBuilder responseBuilder = new StringBuilder();\n while(scanner.hasNextLine()) {\n responseBuilder.append(scanner.nextLine());\n }\n String response = responseBuilder.toString();\n JSONTokener tokener = new JSONTokener(response);\n JSONObject json = new JSONObject(tokener);\n return json;\n }\n catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }", "public static String getValue( String str , Response [] previousJsonResponse){\n\t\tString temp = \"\";\n\t\tString ret_value = \"\";\nint ret_value_int = 0;\nint temp2 = 0 ;\n\t\tif(str.contains(Keywords.PREV_COOKIE)){\n\t\t\tString[] params = (str.split(\":\"));\n\t\t\tString result = params[0].substring((params[0].indexOf(\"[\")) + 1, (params[0].indexOf(\"]\")));\n\t\t\tint index = Integer.parseInt(result);\n\t\t\ttemp = (previousJsonResponse[(index-1)]).getCookie(params[1]);\n\t\t\tif(str.startsWith(\" \")) ret_value = \" \" + temp;\n\t\t\telse ret_value = temp;\n\t\t\tif(str.endsWith(\" \")) ret_value += \" \";\n\t\t}else if(str.contains(Keywords.PREV_HEADER)){\n\t\t\tString[] params = (str.split(\":\"));\n\t\t\tString result = params[0].substring((params[0].indexOf(\"[\")) + 1, (params[0].indexOf(\"]\")));\n\t\t\tint index = Integer.parseInt(result);\n\t\t\ttemp = (previousJsonResponse[(index-1)]).header(params[1]);\n\t\t\tif(str.startsWith(\" \")) ret_value = \" \" + temp;\n\t\t\telse ret_value = temp;\n\t\t\tif(str.endsWith(\" \")) ret_value += \" \";\n\t\t}else if(str.contains(Keywords.PREV_BODY)){\n\t\t\tString[] params = (str.split(\":\"));\n\t\t\tString result = params[0].substring((params[0].indexOf(\"[\")) + 1, (params[0].indexOf(\"]\")));\n\t\t\tint index = Integer.parseInt(result);\n\t\t\ttemp = (previousJsonResponse[(index-1)]).path(params[1]);\n\t\t\tif(str.startsWith(\" \")) ret_value = \" \" + temp;\n\t\t\telse ret_value = temp;\n\t\t\tif(str.endsWith(\" \")) ret_value += \" \";\n\t\t}\n\t\telse if(str.contains(Keywords.PREV_BODY_integer)){\n\t\t\tString[] params = (str.split(\":\"));\n\t\t\tString result = params[0].substring((params[0].indexOf(\"[\")) + 1, (params[0].indexOf(\"]\")));\n\t\t\tint index = Integer.parseInt(result);\n\t\t\ttemp2 = (previousJsonResponse[(index-1)]).path(params[1]);\n\t\t\tif(str.startsWith(\" \")) ret_value_int = temp2;\n\t\t\telse ret_value_int = temp2;\n\t\t\tret_value = Integer.toString(ret_value_int);\n\t\t\tif(str.endsWith(\" \")) ret_value += \" \";\n\t\t}\n\n\t\telse ret_value = str;\n\t\treturn ret_value;\n\t}", "public static String getJSON(String url){\n \t\t\n \t\tStringBuilder builder = new StringBuilder();\n \t HttpClient client = new DefaultHttpClient();\n \t HttpGet httpGet = new HttpGet(url);\n \t try {\n \t HttpResponse response = client.execute(httpGet);\n \t HttpEntity entity = response.getEntity();\n \t InputStream content = entity.getContent();\n \t BufferedReader reader = new BufferedReader(new InputStreamReader(content));\n \t \n \t String line;\n \t while ((line = reader.readLine()) != null) {\n \t builder.append(line);\n \t }\n \t } catch (Exception e) {}\n \t\t\n \t\treturn builder.toString(); \n \t}", "private List<String> getMobilDinamis(String url, String jsonName, String key) {\n List<String> result = new ArrayList<>();\n try {\n OkHttpUtil okHttpUtil = new OkHttpUtil();\n okHttpUtil.init(true);\n Request request = new Request.Builder().url(url).get().build();\n Response response = okHttpUtil.getClient().newCall(request).execute();\n\n String res = \"{\\\"\" + jsonName + \"\\\":\" + response.body().string() + \"}\";\n\n JSONObject jsonObject = new JSONObject(res);\n JSONArray jSONArray = jsonObject.getJSONArray(jsonName);\n for (int i = 0; i < jSONArray.length(); i++) {\n JSONObject obj = (JSONObject) jSONArray.get(i);\n result.add(obj.getString(key));\n }\n } catch (Exception e) {\n\n }\n return result;\n }", "@Override\n public void onResponse(JSONObject jsonObject) {\n System.out.println(jsonObject.toString());\n //Log.d(\"response from api\", \"onResponse: \\n\"\n // + jsonObject.toString());\n try {\n JSONObject j = jsonObject.getJSONObject(\"data\");\n Log.d(\"response from api\", j.toString());\n JSONObject rr = j.getJSONObject(\"orders\");\n Log.d(\"response from api\", rr.toString());\n Gson json = new Gson();\n Order me = json.fromJson(rr.toString(), Order.class);\n singleorder = me;\n Log.d(\"response from api\", me.getName());\n } catch (JSONException e) {\n Log.d(\"response from api\", \"paaaapiiii\");\n e.printStackTrace();\n }\n }", "public static ArrayList<JSONObject> parseJSON(String tracker, String info_hash, String ip, String port){\n\t\t\n\t\tArrayList<JSONObject> ret = new ArrayList<JSONObject>();\n\t\t\n\t HttpURLConnection connection; //Connection service\n\t URL url = null; //Target URL\n\t String response = null; //Return Response\n\t \n\t String parameters = \"info_hash=\" + info_hash + \"&ip=\" + ip + \"&port=\" + port; //Default parameter\n\n\t try\n\t {\n\t url = new URL(tracker + \"?\" + parameters); /* URL link with its info */\n\t \n\t /** Open Connection to tracker */\n\t connection = (HttpURLConnection) url.openConnection();\n\t connection.setDoOutput(true);\n\t connection.setRequestProperty(\"Content-Type\", \"application/x-www-form-urlencoded\");\n\t connection.setRequestMethod(\"POST\");\n\n\t String line = \"\"; //Initialize line\n\n\t /** Open InputStream and Buffered Reader */\n\t InputStreamReader isr = new InputStreamReader(connection.getInputStream());\n\t BufferedReader reader = new BufferedReader(isr);\n\t StringBuilder sb = new StringBuilder();\n\t while ((line = reader.readLine()) != null)\n\t {\n\t \t sb.append(line);\n\t }\n\t response = \"{\\\"peers\\\": \" + sb.toString() + \"}\";\n\n\t /*\n\t * JSON Parser, using json_simple-1.1.jar\n\t */\n\t JSONParser parser = new JSONParser();\n\t JSONObject mainJSON = null;\n\t\t\ttry {\n\t\t\t\tmainJSON = (JSONObject) parser.parse(response);\n\t\t\t} catch (ParseException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t JSONArray infoPeers = (JSONArray) mainJSON.get(\"peers\"); //Get peers info\n\t \n\t /** Suppress warning for Compilation level */\n\t @SuppressWarnings(\"unchecked\")\n\t\t\tIterator<JSONObject> iterator = infoPeers.iterator();\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\tJSONObject peer = iterator.next(); //each peer info\n\t\t\t\tret.add((JSONObject) peer.clone());\n\t\t\t}\n\n\t\t\t/** Close Connection */\n\t isr.close();\n\t reader.close(); \n\t }\n\t catch(IOException e) /* Input Output Error Exception */\n\t {\n\t System.out.println(\"Network Error: \" + e); //Print Error Message\n\t }\t \n\n\t return ret;\n\t}", "@Override\n protected List<List<HashMap<String, String>>> doInBackground(String... jsonData) {\n\n JSONObject jObject;\n List<List<HashMap<String, String>>> routes = null;\n\n try {\n jObject = new JSONObject(jsonData[0]);\n Log.d(\"ParserTask\",jsonData[0].toString());\n DataParser parser = new DataParser();\n Log.d(\"ParserTask\", parser.toString());\n\n // Starts parsing data\n routes = parser.parse(jObject);\n Log.d(\"ParserTask\",\"Executing routes\");\n Log.d(\"ParserTask\",routes.toString());\n\n } catch (Exception e) {\n Log.d(\"ParserTask\",e.toString());\n e.printStackTrace();\n }\n return routes;\n }", "@Override\n protected List<List<HashMap<String, String>>> doInBackground(String... jsonData) {\n\n JSONObject jObject;\n List<List<HashMap<String, String>>> routes = null;\n\n try {\n jObject = new JSONObject(jsonData[0]);\n Log.d(\"ParserTask\",jsonData[0].toString());\n DataParser parser = new DataParser();\n Log.d(\"ParserTask\", parser.toString());\n\n // Starts parsing data\n routes = parser.parse(jObject);\n Log.d(\"ParserTask\",\"Executing routes\");\n Log.d(\"ParserTask\",routes.toString());\n\n } catch (Exception e) {\n Log.d(\"ParserTask\",e.toString());\n e.printStackTrace();\n }\n return routes;\n }", "@Override\n protected List<List<HashMap<String, String>>> doInBackground(String... jsonData) {\n\n JSONObject jObject;\n List<List<HashMap<String, String>>> routes = null;\n\n try {\n jObject = new JSONObject(jsonData[0]);\n Log.d(\"ParserTask\",jsonData[0].toString());\n DataParser parser = new DataParser();\n Log.d(\"ParserTask\", parser.toString());\n\n // Starts parsing data\n routes = parser.parse(jObject);\n Log.d(\"ParserTask\",\"Executing routes\");\n Log.d(\"ParserTask\",routes.toString());\n\n } catch (Exception e) {\n Log.d(\"ParserTask\",e.toString());\n e.printStackTrace();\n }\n return routes;\n }", "public void accessWebService() {\n\r\n JsonReadTask task = new JsonReadTask();\r\n // passes values for the urls string array\r\n task.execute(new String[] { url });\r\n }", "public List<List<HashMap<String,String>>> parse(JSONObject jObject){\n // Khoi tao cac mang\n List<List<HashMap<String, String>>> routes = new ArrayList<List<HashMap<String,String>>>() ;\n JSONArray jRoutes = null;\n JSONArray jLegs = null;\n JSONArray jSteps = null;\n try {\n // Truy cap vao phan tu chua danh sach tuyen duong\n jRoutes = jObject.getJSONArray(\"routes\");\n for(int i = 0; i < jRoutes.length(); i++){\n jLegs = ((JSONObject)jRoutes.get(i)).getJSONArray(\"legs\");\n List path = new ArrayList<HashMap<String, String>>();\n // Phan tich cac buoc\n for(int j = 0; j < jLegs.length(); j++){\n jSteps = ( (JSONObject)jLegs.get(j)).getJSONArray(\"steps\");\n // Phan tich cac diem\n for(int k = 0; k < jSteps.length(); k++){\n // Danh sach cac duong thang\n String polyline = \"\";\n polyline = (String)((JSONObject)((JSONObject)jSteps.get(k)).get(\"polyline\")).get(\"points\");\n // Giai ma cac duong thang duoc ve tren ban do\n List list = decodePoly(polyline);\n // Gan danh sach cac diem\n for(int l=0;l <list.size();l++){\n HashMap<String, String> hm = new HashMap<String, String>();\n hm.put(\"lat\", Double.toString(((LatLng)list.get(l)).latitude) );\n hm.put(\"lng\", Double.toString(((LatLng)list.get(l)).longitude) );\n path.add(hm);\n }\n }\n routes.add(path);\n }\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }catch (Exception e){\n }\n return routes;\n }", "@Override\n\t\t\t\t\t\t\tpublic void handleResponse(String jsonResult,\n\t\t\t\t\t\t\t\t\tEHttpError error) {\n\t\t\t\t\t\t\t\tMap<String, Object> map;\n\t\t\t\t\t\t\t\tif (jsonResult != null\n\t\t\t\t\t\t\t\t\t\t&& error == EHttpError.KErrorNone) {\n\t\t\t\t\t\t\t\t\tGson gson = new Gson();\n\t\t\t\t\t\t\t\t\tType type = new TypeToken<Map<String, Object>>() {\n\t\t\t\t\t\t\t\t\t}.getType();\n\t\t\t\t\t\t\t\t\tmap = gson.fromJson(jsonResult, type);\n\t\t\t\t\t\t\t\t\tthis.completeListener.onQueryComplete(\n\t\t\t\t\t\t\t\t\t\t\tGetWishDetail, map, error);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}", "public void parseJson(JSONObject jsobject){\n\t\ttry{\n\t\t\tidCompany=(jsobject.has(\"idCompany\"))?jsobject.getInt(\"idCompany\"):0;\n\t\t\tname=(jsobject.has(\"name\"))?jsobject.getString(\"name\"):\"\";\n\t\t\taddress=(jsobject.has(\"address\"))?jsobject.getString(\"address\"):\"\";\n\t\t\tphone=(jsobject.has(\"address\"))?jsobject.getString(\"address\"):\"\";\n\t\t\tstate=(jsobject.has(\"state\"))?jsobject.getString(\"state\"):\"\";\n\t\t\tcountry=(jsobject.has(\"country\"))?jsobject.getString(\"country\"):\"\";\n\t\t\tlogotype=(jsobject.has(\"logotype\"))?jsobject.getString(\"logotype\"):\"\";\n\t\t\tfloorPlan=(jsobject.has(\"floorPlan\"))?jsobject.getString(\"floorPlan\"):\"\";\n\t\t}catch(JSONException e){\n\t\t\tLog.e(User.class.toString(), \"Failed to parse\"+e.toString());\n\t\t}\n\t}", "private String parseJsonResult(String json) {\n final JsonElement parsed = new JsonParser().parse(json);\n if (parsed.isJsonObject()) {\n final JsonObject obj = parsed.getAsJsonObject();\n if (obj.has(\"result\")) {\n return obj.get(\"result\").getAsString();\n }\n if(obj.has(\"error\")) {\n return obj.get(\"error\").getAsString();\n }\n }\n return \"no json received: \" + json;\n }" ]
[ "0.67903566", "0.6280289", "0.6034179", "0.5992706", "0.5754293", "0.5654313", "0.56220704", "0.55040634", "0.54848737", "0.5462431", "0.5457402", "0.5439047", "0.5385247", "0.5383812", "0.53803587", "0.53599614", "0.53580606", "0.5325731", "0.53130704", "0.5311013", "0.5279841", "0.5248696", "0.5236231", "0.5233442", "0.52266836", "0.52025306", "0.52002805", "0.51872116", "0.5182981", "0.51829284", "0.5169476", "0.51524526", "0.5130973", "0.51198155", "0.5114213", "0.5114093", "0.50959474", "0.50918907", "0.5068586", "0.50624967", "0.5054421", "0.50373", "0.5029417", "0.5019013", "0.5017342", "0.50147307", "0.5013463", "0.50079864", "0.5002105", "0.5000828", "0.49996772", "0.49982676", "0.49868047", "0.49825054", "0.49687773", "0.49669948", "0.49628973", "0.4960928", "0.49569702", "0.49546918", "0.49480394", "0.49449715", "0.49410433", "0.49395588", "0.49373683", "0.49242282", "0.4917445", "0.49114862", "0.49107206", "0.49093693", "0.4905777", "0.49057564", "0.49052408", "0.4904376", "0.49021956", "0.48952097", "0.48915008", "0.4887024", "0.48720536", "0.4869262", "0.48689076", "0.4864331", "0.48625013", "0.48598626", "0.48596647", "0.4852908", "0.48485783", "0.48476845", "0.484741", "0.48466122", "0.48435044", "0.48358274", "0.48252258", "0.48252258", "0.48252258", "0.48181722", "0.4816065", "0.4811113", "0.48099944", "0.48070207" ]
0.53455526
17
/ writ a program to ask user if there is sale if no sale > not going shopping of sale we will ask the price of the item based on the price we will apply discount and calculate final price if price less than 20>apply 10% if price is between 20 and 100 > apply 20% if price between 100 and 5000 >apply 30% if price more than 500 >apply 50% after discount ____ the price of the item reduced from__to___ frist decliar
public static void main(String[] args) { Scanner scan; String sale; double price; double discount = 50; double finalPrice = 500; scan =new Scanner(System.in); System.out.println("any sales?"); String sales = scan.nextLine(); if(sales.equalsIgnoreCase("Yes")) { System.out.println("What is the price?"); price = scan.nextDouble(); scan.close(); if(price<20) { discount = price*0.1; finalPrice = price-discount; }else if(price>20 && price<100) { discount = price*0.2; finalPrice = price-discount; }else if(price>100 && price<500) { discount = price*0.3; finalPrice = price-discount; }else if(price>500) { discount = price*0.5; finalPrice = price-discount; } System.out.println("have discount " + discount + ". total price is " + finalPrice); }else{ System.out.println("We are not going shopping"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main (String[] args) {\n\t\t\n\t\t\n\t\tScanner inp = new Scanner(System.in);\n\t\tSystem.out.println(\"Is there a sale? True or False\");\n\t\tboolean sale = inp.nextBoolean();\n\t\t\n\t\t\n\t double discount;\n\t\tdouble finalPrice;\n\t\tdouble price;\n\t\t\n\t\tif (!sale) {\n\t\t\tSystem.out.println(\"I am not shopping\");\n\t\t}else {\n\t\t\tSystem.out.println(\"What is the actual price?\");\n\t\t\tprice = inp.nextDouble();\n\t\t\t\n\t\tif (price<20) {\n\t\t\tdiscount = price *0.10;\n\t\t\t//finalPrice = price - discount;\n\t\t} else if (price>=20 && price<=100) {\n\t\t\tdiscount = price *0.20;\n\t\t\t//finalPrice = price - discount;\n\t\t} else if (price>=100 && price<=500) {\n\t\t\tdiscount = price *0.30;\n\t\t\t//finalPrice = price - discount;\n\t\t} else {\n\t\t\tdiscount = price *0.50;\n\t\t\t\n\t\t\t\n\t\t}\n\t\t finalPrice = price - discount;\n\t\t\t\nSystem.out.println(\"After discount \"+discount+\" the price of the item reduce from \"+price+\" to \"+finalPrice);\n\t\t\t\n\t\t}\n\t\t\n\t}", "public static void main(String[] args) {\n Scanner Keyboard = new Scanner(System.in);\r\n System.out.println(\"how many sof u wnt to purchase\");\r\n int numSoftware =Keyboard.nextInt();\r\n double discount=0;\r\n if(numSoftware >=10 &&numSoftware<=19){\r\n\t discount=0.20;\r\n }\r\n else if (numSoftware>=20 &&numSoftware<=49){\r\n\t discount=0.30;\r\n }\r\n else if (numSoftware>=50 &&numSoftware<=99){\r\n\t discount=0.40;\r\n }\r\n else if (numSoftware>=100){\r\n\t discount=0.50;\r\n }\r\n double subtotal =99*numSoftware;\r\n double discountAmount=subtotal*discount;\r\n double finalAmount=subtotal-discountAmount;\r\n \r\n System.out.println(\"subtotal:$\"+subtotal);\r\n System.out.println(\"discount percent:$\"+discount*100+\"%\");\r\n System.out.println(\"discountAmount:$\"+discountAmount);\r\n \r\n System.out.println(\"finalAmount:$\"+finalAmount);\r\n //System.out.printf(\"finalAmount:$%.2f\",finalAmount);\r\n \r\n \r\n //rounded to 2 decimal points\r\n System.out.printf(\"final price:%.2f\",finalAmount);\r\n \r\n \r\n \r\n \r\n \r\n // string formatting\r\n \r\n\t}", "public void discountPrices()\n {\n System.out.print( \"Enter amount of purchases: \" );\n int cost = scan.nextInt();\n int discount = cost - cost / 10;\n if ( cost > 1000 )\n {\n System.out.print( \"Discounted price: \" + discount );\n }\n else\n {\n System.out.print( \"Discounted price: \" + cost );\n }\n\n }", "public static void main(String[] args) throws InterruptedException {\n Item item1 = new Item(\"Coca-cola\", 200);\n System.out.println(\"Price before discount: \" + item1.getPrice());\n System.out.println(\"Price after discount: \" + item1.calculateDiscount()); //should be same price, 200, there's no doscount for this type\n\n ItemWithDiscount item2 = new ItemWithDiscount(\"Coca-cola Zero\", 2.0);\n System.out.println(\"\\nPrice before discount: \" + item2.getPrice());\n item2.setDiscount(10);\n System.out.println(\"Price after discount: \" + item2.calculateDiscount()); // 2 - 0.2 = 1.8\n\n\n //CHECK BUY PAY DISCOUNT\n BuyMorePayLess item04 = new BuyMorePayLess(\"Milk\", 10);\n BuyMorePayLess item05 = new BuyMorePayLess(\"Milk\", 10);\n BuyMorePayLess item06 = new BuyMorePayLess(\"Milk\", 1);\n item04.setBuyPayOffer(3,2);\n item04.calculateDiscount();\n\n //Check TakeItAll discount\n ItemTakeItAll item07 = new ItemTakeItAll(\"Tuna\",5.00);\n ItemTakeItAll item08 = new ItemTakeItAll(\"Tuna\",5.00);\n\n// item07.setDiscount(10);\n item07.setMinimumNumber(1);\n System.out.println(\"##################\" + item07.calculateDiscount());\n\n // USERS\n LoyalCustomer customer01 = new LoyalCustomer(\"Giorgi Tsipuria\", \"giobaski\", \"123\",\n \"Gonsiori 33\",\"55945239\");\n\n //B A S K E T S\n Basket basket01 = new Basket(\"Tartu 46\", \"Kairi\", customer01);\n basket01.insertItem(item1); //200 -> 200\n basket01.insertItem(item2); // 2.0 -> 1.8\n System.out.println(\"Total payment in basket: \" + basket01.caclulatePayment()); //201.8 + 201.8 * 0.1 = 221.98\n\n\n\n\n\n //1. Create Store\n Store store = new Store(\"Raua 16\");\n\n //2. sign into store\n Cashier currentCashier = store.cashierAuthentication();\n\n //3.\n Menu currentMenu = store.openMenu();\n\n //4. new basket\n currentMenu.openNewBasket(customer01);\n\n\n //5.Cashier starts adding items into new basket\n System.out.println(currentMenu.getBasket());\n currentMenu.getBasket().insertItem(item1);\n currentMenu.getBasket().insertItem(item2);\n\n\n System.out.println(\"######Basket By ID:\");\n currentMenu.printBasketInfoById(2);\n System.out.println(\"########\");\n\n\n //6. Calculate total price for the current basket\n currentMenu.getBasket().caclulatePayment();\n System.out.println(currentMenu.getBasket());\n System.out.println(\"currents items: \");\n System.out.println(currentMenu.getBasket().getItems());\n\n //7. Logout cashier\n Thread.sleep(10000);\n currentMenu.exit();\n\n\n // Additional features\n System.out.println(\"points of the loyal customer: \" + customer01.getPoints());\n\n System.out.println(\"Bonus for cashier: \" + currentCashier.calculateBonus() + \" Euros\");\n\n\n\n\n\n\n }", "private void calcPrice() {\n double itemPrice = 0;\n \n //get price of burger (base)\n if (singleRad.isSelected())\n {\n itemPrice = 3.50;\n }\n else \n {\n itemPrice = 4.75;\n }\n \n //check options add to item price\n if(cheeseCheckbox.isSelected())\n itemPrice = itemPrice += 0.50;\n if(baconCheckbox.isSelected())\n itemPrice = itemPrice += 1.25;\n if(mealCheckbox.isSelected())\n itemPrice = itemPrice += 4.00;\n \n //include the quantity for the item price\n int quantity= 1;\n if (quantityTextField.getText().equals(\"\"))\n quantityTextField.setText(\"1\");\n quantity = Integer.parseInt(quantityTextField.getText());\n itemPrice = itemPrice * quantity;\n\n \n //show the price no $ symbol\n \n itemPriceTextField.setText(d2.format(itemPrice));\n }", "public double applyDiscount(){\n SaleDTO saleDTO = sale.createSaleDTO();\n List<DiscountDTO> itemDiscounts=dc.findDiscounts(saleDTO,new ItemDiscount());\n List<DiscountDTO> saleDiscounts=dc.findDiscounts(saleDTO,new SaleDiscount());\n \n sale.applyItemDiscounts(itemDiscounts);\n sale.applyDiscounts(saleDiscounts);\n return sale.getTotalPrice();\n }", "double calculateNewPrice(double discount_rate, double price);", "void u1 (){\n\n\tint rose,sunflower,jasmin,tulip;\n\tdouble money,sale,total,profit,cost;\n\tScanner sc = new Scanner(System.in);\n\tSystem.out.println(\"--------Flower List----------\\n\");\n\tSystem.out.println(\"1.Rose\\t\\t15 Baht\\n2.Sun flower\\t23 Baht\\n3.Jasmin\\t8 Baht\\n4.Tulip\\t\\t20 Baht\\n\");\n\tSystem.out.println(\"-----------------------------\\n\");\n\n\tSystem.out.println(\"Put number flower\\n\");\n\tSystem.out.print(\"Rose --> \");rose = sc.nextInt();\n\tSystem.out.print(\"Sun flower --> \");sunflower = sc.nextInt();\n\tSystem.out.print(\"Jasmin --> \");jasmin = sc.nextInt();\n\tSystem.out.print(\"Tulip --> \");tulip = sc.nextInt();\n\tSystem.out.println(\"\\n-----------------------------\\n\");\n\tmoney = (15*rose)+(23*sunflower)+(8*jasmin)+(20*tulip);\n\tSystem.out.println(\"Money --> \"+money+\"\\tBaht\\n\");\n\n\tif (money>200)\n\t{\n\t\tsale = money*3/100;\n\t\tSystem.out.println(\"Discount --> \"+sale+\"\\tBaht\");\n\t\ttotal = money-sale;\n\t\tSystem.out.println(\"Total Money --> \"+total+\"\\tBaht\");\n\t\t\n\t\tcost = (9*rose)+(13*sunflower)+(4*jasmin)+(8*tulip);\n\t\tprofit =(money-cost)-sale;\n\t\tSystem.out.println(\"Owner get profit --> \"+profit+\"\\tBaht\");\n\n\t}\n\t\telse if (money>500)\n\t\t{\n\t\tsale = money*5/100;\n\t\tSystem.out.println(\"Discount --> \"+sale+\"\\tBaht\");\n\t\ttotal = money-sale;\n\t\tSystem.out.println(\"Total Money --> \"+total+\"\\tBaht\");\n\n\t\tcost = (9*rose)+(13*sunflower)+(4*jasmin)+(8*tulip);\n\t\tprofit =(money-cost)-sale;\n\t\tSystem.out.println(\"Owner get profit --> \"+profit+\"\\tBaht\");\n\t\t}\n\n\t\telse if (money>700)\n\t\t{\n\t\tsale = money*10/100;\n\t\tSystem.out.println(\"Discount --> \"+sale+\"\\tBaht\");\n\t\ttotal = money-sale;\n\t\tSystem.out.println(\"Total Money --> \"+total+\"\\tBaht\");\n\n\t\tcost = (9*rose)+(13*sunflower)+(4*jasmin)+(8*tulip);\n\t\tprofit =(money-cost)-sale;\n\t\tSystem.out.println(\"Owner get profit --> \"+profit+\"\\tBaht\");\n\t\t}\n\t\n\t System.out.println(\"\\n---------Thank You-----------\");\n\n\t\n}", "public static void main(String[] args) {\n //ENTER CODE HERE\n Scanner scan =new Scanner(System.in);\n System.out.println(\"Enter price in cents:\");\n\n int itemPrice = scan.nextInt();\n\n if (itemPrice < 25 || itemPrice > 100 || (itemPrice % 5 != 0) ) {\n System.out.println(\"Invalid entry\");\n }\n else\n {\n int change=(100-itemPrice);\n int quarterCount = change / 25;\n int remainder1 = change % 25;\n int dimeCount = remainder1 / 10;\n int remainder2 = remainder1 % 10;\n int nickelCount = remainder2 / 5;\n\n System.out.println(\"When you give $1 for \" +itemPrice+ \"cents item. You will get back \"+\n quarterCount+ (quarterCount>1 ? \"quarters \" :\"quarter \")+\n dimeCount + (dimeCount > 1 ? \"dimes \" : \"dime \") +\n nickelCount+ (nickelCount > 1 ? \"nickels \" :\"nickel \") );\n\n }\n\n\n\n }", "void calculate() {\n if (price <= 1000)\n price = price - (price * 2 / 100);\n else if (price > 1000 && price <= 3000)\n price = price - (price * 10 / 100);\n else\n price = price - (price * 15 / 100);\n }", "public static void main(String[] args) {\n\t\t\n\t\tScanner in = new Scanner(System.in);\n\t\t\n\t\t\n\t\t{\n\t\t\t\n\t\t\tSystem.out.print(\"Enter the amount of oil ordered, in gallons: \"); //output to ask user test oil\n\t\t\tdouble oil = in.nextDouble(); //program waits and asks user for input\n\t\t\n\n\t\t\n\t\tif (oil >= 100) //if statement for oil greater than equal to 100\n\t\t{\n\t\t\tint discount = 1; //Displays prompt if user enters a value 100 or greater\n\t\t\tdouble pricePerGallon = 325.00;\n\t\t\tdouble pricePerGallon2 = 3.25;\n\t\t\tSystem.out.println(\"Number of gallons ordered: \" + oil + \" - $\" + pricePerGallon);\n\t\t\tSystem.out.println(\"Discount: \" + discount + \"% - $\" + pricePerGallon2);\n\t\t\tdouble total = pricePerGallon - pricePerGallon2;\n\t\t\tSystem.out.println(\"Your total charge is: $\" + total);\n\t\t}\n\t\telse if (oil >= 200) //if statement for oil greater than or equal to 200\n\t\t{\n\t\t int discount2 = 2; //Displays prompt if user enters a value of 200 or greater\n\t\t\tdouble pricePerGallon = 650.00;\n\t\t\tdouble pricePerGallon2 = 6.50;\n\t\t\tSystem.out.println(\"Number of gallons ordered: \" + oil + \" - $\" + pricePerGallon);\n\t\t\tSystem.out.println(\"Discount: \" + discount2 + \"% - $\" + pricePerGallon2);\n\t\t\tdouble total = pricePerGallon - pricePerGallon2;\n\t\t\tSystem.out.println(\"Your total charge is: $\" + total);\n\t\t}\n\t\telse if (oil >= 300) //if statement for oil greater than or equal to 300\n\t\t{\n\t\t\tint discount3 = 3; //Displays prompt if user enters a value 300 or greater\n\t\t\tdouble pricePerGallon = 975.00;\n\t\t\tdouble pricePerGallon2 = 9.75;\n\t\t\tSystem.out.println(\"Number of gallons ordered: \" + oil + \" - $\" + pricePerGallon);\n\t\t\tSystem.out.println(\"Discount: \" + discount3 + \"% - $\" + pricePerGallon2);\n\t\t\tdouble total = pricePerGallon - pricePerGallon2;\n\t\t\tSystem.out.println(\"Your total charge is: $\" + total);\n\t\t}\n\t\telse if (oil >= 400) //if statement for oil greater than or equal to 400\n\t\t{\n\t\t\tint discount4 = 4; //Displays prompt if user enters a value 400 or greater\n\t\t\tdouble pricePerGallon = 1300.00;\n\t\t\tdouble pricePerGallon2 = 13;\n\t\t\tSystem.out.println(\"Number of gallons ordered: \" + oil + \" - $\" + pricePerGallon);\n\t\t\tSystem.out.println(\"Discount: \" + discount4 + \"% - $\" + pricePerGallon2);\n\t\t\tdouble total = pricePerGallon - pricePerGallon2;\n\t\t\tSystem.out.println(\"Your total charge is: $\" + total);\n\t\t}\n\t\telse if (oil >= 500) //if statement for oil greater than or equal to 500\n\t\t{\n\t\t\tint discount5 = 5; //Displays prompt if user enters a value 500 or greater\n\t\t\tdouble pricePerGallon = 1625.00;\n\t\t\tdouble pricePerGallon2 = 16.25;\n\t\t\tSystem.out.println(\"Number of gallons ordered: \" + oil + \" - $\" + pricePerGallon);\n\t\t\tSystem.out.println(\"Discount: \" + discount5 + \"% - $\" + pricePerGallon2);\n\t\t\tdouble total = pricePerGallon - pricePerGallon2;\n\t\t\tSystem.out.println(\"Your total charge is: $\" + total);\n\t\t}\n\t\telse \n\t\t{\n\t\t\tSystem.out.print(\"Have a great day\"); //Displays message if the input of oil is less than 100 \n\t\t}\n\t\t\n\t\t}\n\t\t}", "public double getDiscountedPrice(double itemPrice);", "public static void main(String [] args)\n {\n //create Scanner to obtain input from command window\n Scanner input = new Scanner(System.in);\n \n double item1 = 239.99;// item 1 price \n double item2 = 129.75;// item 2 price\n double item3 = 99.95;// item 3 price\n double item4 = 350.89;// item 4 price\n int a;// number of item1\n int b;// number of item2\n int c;// number of item3\n int d;// number of item4\n double comm = .09;// commision rate\n double total;// total sales\n \n // # of item 1 \n System.out.print(\"Number of item 1 sold: \"); //prompt\n a = input.nextInt(); \n \n // # of item 2 \n System.out.print(\"Number of item 2 sold: \"); //prompt\n b = input.nextInt(); \n \n // # of item 3\n System.out.print(\"Number of item 3 sold: \"); //prompt\n c = input.nextInt(); \n \n // # of item 4 \n System.out.print(\"Number of item 4 sold: \"); //prompt\n d = input.nextInt(); \n \n // total of all items sold\n total = a * item1 + b * item2\n + c * item3 + d * item4;\n \n // displays total of sales done by sales person\n System.out.printf(\" Total Sales: %.2f\" , ( double ) total );\n \n // displays Earnings of Salesperson for the week\n System.out.printf( \"\\n Total weeks pay: %.2f \" , ( double ) total * comm + 200 );\n \n input.close();\n }", "public void calculateEndPrice(int TotalPrice, int Discount) {\n\n }", "public static void main(String[] args) {\n\t\t\n\t\tScanner scan;\n\t\tdouble salesAmount;\n\t\tdouble commission;\n\t\t\n\t\tscan= new Scanner(System.in);\n\t\tSystem.out.println(\" please enter your sales amount\");\n\t\tsalesAmount=scan.nextDouble();\n\t\t\n\t\tif(salesAmount>=1 && salesAmount<100) {\n\t\t\t//lets give user 10% commision of a sale\n\t\t\tcommission=salesAmount*0.1;\n\t\t}else if(salesAmount>=100 && salesAmount <200) {\n\t\t\t//lets give user 20% commision of a sale\n\t\t\tcommission=salesAmount*0.2;\n\t\t}else if(salesAmount>=200 && salesAmount<500) {\n\t\t\t// lets give user 30% commision of a sale\n\t\t\tcommission=salesAmount*0.3;\n\t\t}else if(salesAmount>=500) {\n\t\t\t//lets give user 50% commision of a sale\n\t\t\tcommission=salesAmount*0.5;\n\t\t}else {\n\t\t\tcommission=0;\n\t\t}\n\t\tSystem.out.println(\"Based on the sales your commision is \"+commission);\n\t}", "int main()\n{\n int f_amt,f_dis,f_shp,s_amt,s_dis,s_shp,a_amt,a_dis,a_shp,f_tot,s_tot,a_tot;\n std::cin>>f_amt>>f_dis>>f_shp>>s_amt>>s_dis>>s_shp>>a_amt>>a_dis>>a_shp;\n f_dis=(f_amt/100)*f_dis;\n s_dis=(s_amt/100)*s_dis;\n a_dis=(a_amt/100)*a_dis;\n f_tot=(f_amt-f_dis)+f_shp;\n s_tot=(s_amt-s_dis)+s_shp;\n a_tot=(a_amt-a_dis)+a_shp;\n std::cout<<\"In Flipkart Rs.\"<<f_tot;\n std::cout<<\"\\nIn Snapdeal Rs.\"<<s_tot;\n std::cout<<\"\\nIn Amazon Rs.\"<<a_tot;\n if((f_tot<s_tot)&&(f_tot<a_tot)||(f_tot==s_tot)&&(f_tot<a_tot)){\n std::cout<<\"\\nHe will prefer Flipkart\";\n }\n else if((s_tot<f_tot)&&(s_tot<a_tot)||(s_tot==a_tot)&&(s_tot<f_tot)){\n std::cout<<\"\\nHe will prefer Snapdeal\";\n \n }\n else if((a_tot<f_tot)&&(a_tot<s_tot)){\n std::cout<<\"\\nHe will prefer Amazon\";\n }\n}", "public abstract double getDiscount(int qty, double price);", "private void calculatePrice() {\n\t\tint temp = controller.getQualityPrice(hotel.getText(), quality.getText());\n\n\t\ttemp *= getDays();\n\n\t\tif (discountChoice > 0) {\n\t\t\tdouble discountTmp = (double) discountChoice / 100;\n\t\t\ttemp *= (1.00 - discountTmp);\n\t\t}\n\n\t\tprice.setText(Integer.toString(temp));\n\n\t}", "public static void main(String args[]){\n System.out.println(\"Enter the no. of sales you make\");\n Scanner sc = new Scanner(System.in);\n int sale = sc.nextInt();\n System.out.println(\"Entern the no of experince in current Job\");\n int year = sc.nextInt();\n int pay=1000;\n int requiredSales =10;\n int requiredExp = 2;\n\n if (sale>=requiredSales) {\n if (year>=requiredExp) {\n // Calculate the pay\n pay = pay + 250;\n // Display the pay\n System.out.println(\"Your pay is \" + pay);\n }\n else\n System.out.println(\"Sorry you are not qualified, your experince is less\");\n }\n else\n {\n System.out.println(\"Sorry you are not qualified, fuck your self mc\");\n }\n\n }", "public void getDiscount(){\n System.out.println(\"10% off, final price: \" + price * 0.9);\n }", "public static void main(String[] args) {\n\t\tdouble sum=0;\n\t\t\n\t\tScanner scan=new Scanner(System.in);\n\t\tSystem.out.println(\"Enter the item you want to buy\");\n\t\tString item=scan.nextLine();\n\t\tSystem.out.println(\"Enter the price for the item\");\n\t\tdouble price=scan.nextDouble();\n\t\t\n\t\tdo {\n\t\tSystem.out.println(\"Now please pay for your item\");\n\t\tdouble price1=scan.nextDouble();\n\t\t\tsum=sum+price1;\n\t\t\tif (sum!=price) \n\t\t\tSystem.out.println(\"Please enter more $\"+(price-sum));\n\t\t\t}\n\t\t\n\t\twhile (sum!=price);\n\t\tSystem.out.println(\"Thank you for shopping with us\");\n\t\n\t\t\n\t\t\t\n\t\t}", "public static void main(String[]args){\n\t\n\tdouble budget =500;\n\t\n\tdouble phone =250.0;\n\tdouble watch =105.5;\n\tdouble bag = 80.00;\n\t\n\t\n\tif(budget< 80.0) {\n\t\tSystem.out.println(\"Cannot buy anything\");\n\t\t\n\t}if (budget >=435.5) {\n\t\tSystem.out.println(\"You can buy all items\");\n\t\n\t\t\n\t} else if (budget >= phone + watch) {\n\t\tSystem.out.println(\"You can buy Phone +Watch OR Phone + Bag OR watch + Bag\");\n\t\t\n\t} else if (budget >= phone +bag); {\n\t\tSystem.out.println(\"You can buy Phone OR watch + bag\");\n\t\t\t\t\n\t if (budget >= watch) {\n\t\tSystem.out.println(\"You can buy a watch or a bag\");\n\t\t\n\t} else {\n\t\tSystem.out.println(\"You can buy a bag\");}\n\t\n\t}\n\t}", "public static void main(String[] args) {\n\t\tfloat Selling_Price, Actual_Cost, amount;\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tSystem.out.print(\" Enter the Actual Cost \");\n\t\tActual_Cost = sc.nextFloat();\t\n\t\t\n\t\tSystem.out.print(\" Enter the Selling Price \");\n\t\tSelling_Price = sc.nextFloat();\n\t\t\n\t\tif(Selling_Price > Actual_Cost )\n\t\t{\n\t\t\tamount = Selling_Price - Actual_Cost;\n\t\t\tSystem.out.println(\"\\n Profit Amount = \" + amount);\n\t\t}\n\t\telse if(Actual_Cost > Selling_Price)\n\t\t{\n\t\t\tamount = Actual_Cost - Selling_Price;\n\t\t\tSystem.out.println(\"\\n Loss Amount = \" + amount);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"\\n No Profit No Loss! \");\n\t\t}\n\n\t}", "double calculatePrice();", "float calculatePrice () \n\t{\n\t\tfloat final_price = 0;\n\t\tfinal_price = (float)(price * quantity); // price * number of items\n\t\tfinal_price += final_price*(.10); // add tax\n\t\tif(perishable.equals(\"P\"))\n\t\t{\n\t\t\tfloat ship = (float)(20* weight)*quantity; // add shipping\n\t\t\tship += ship*.20;\n\t\t\tfinal_price += ship;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfinal_price += (20* weight)*quantity; // add shipping\n\t\t}\n\t\treturn final_price;\n\t}", "public static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in); \n\t\tint itemNum;\n\t\tint quantity;\n\t\tdouble price;\n\t\tdouble total;\n\t\tSystem.out.println(\"Please enter prod num\");\n\t\titemNum = input.nextInt();\n\t\tSystem.out.println(\"please enter the quantity:\");\n\t\tquantity = input.nextInt();\n\t\t/*if(itemNum == 1){\n\t\t\tprice = 2.98;\n\t\t}\n\t\tif(itemNum == 2){\n\t\t\tprice = 4.5;\n\t\t}*/\n\t\tswitch (itemNum){\n\t\tcase 1:\n\t\t\tprice = 2.98;\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tprice = 4.50;\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tprice = 9.98;\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tprice = 4.49;\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tprice = 6.87;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tSystem.out.println(\"Wrong item # price is 0\");\n\t\t\tprice = 0;\t\t\t\n\t\t}\n\t\t\n\t\ttotal = price*quantity;\n\t\tSystem.out.println(\"The total is:\" + total);\n\n\t}", "public void calculateSale()\n {\n double total = 0.00;\n int numTimbits = 0;\n int numDoughnuts = 0;\n int smallCoffee = 0;\n int mediumCoffee = 0;\n int largeCoffee = 0;\n String order;\n \n for(int i = 0; salesItem[i] != null && i < salesItem.length; i++)\n {\n if(salesItem[i] instanceof Timbit) \n {\n numTimbits = numTimbits + salesItem[i].getNumOfItems();\n }\n else if(salesItem[i] instanceof Doughnut)\n {\n numDoughnuts = numDoughnuts + salesItem[i].getNumOfItems();\n }\n else if(salesItem[i] instanceof Coffee)\n {\n if(salesItem[i].getNumOfItems()==1)\n {\n smallCoffee ++;\n }\n else if(salesItem[i].getNumOfItems()==2)\n {\n mediumCoffee ++;\n }\n else\n {\n largeCoffee ++;\n }\n }\n \n total += salesItem[i].getFinalPrice();\n }\n \n order = \"Timbits: \" + numTimbits + \"\\nDoughnuts: \" + numDoughnuts + \"\\nSmall Coffees: \" + smallCoffee + \"\\nMedium Coffees: \" + mediumCoffee + \"\\nLarge Coffees: \" + largeCoffee ; \n showText(order + String.format(\"\\nTotal Price: $%5.2f\", total), 150, 175);\n }", "public static void main(String args[]) \r\n\t{\n\t\tSystem.out.println(\"Welcome to the Line Item Calculator\"); \r\n\t\tSystem.out.println(); \r\n\t\tScanner sc = new Scanner(System.in); \r\n\t\t\r\n\t\t\r\n\t\tString select_item;\r\n\t\tString choice = \"y\"; \r\n\t\tInvoice item = new Invoice ();\r\n\t\tdouble invoice_Total = 0;\r\n\t\t\r\n\t\tNumberFormat currency = NumberFormat.getCurrencyInstance();\r\n\t\t\r\n\t\twhile (choice.equalsIgnoreCase(\"y\")){ \r\n\t\t\t\r\n\t\t\t\r\n\t\t\t// get the input from the user \r\n\t\t\tString productCode = Validator.getString(sc,\"Enter product code: \"); \r\n\t\t\tint quantity = Validator.getInt(sc,\"Enter quantity: \"); \r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//get the Product object \r\n\t\t\tProduct product = ProductDB.getProductInfo(productCode); \r\n\t\t\t\r\n\t\t\t\r\n\t\t\tBonus:\r\n\t\t\tfor(int i=0; i < item.get_list().size(); i++){\r\n\t\t\t\tselect_item = item.get_list().get(i) ;\r\n\t\t\t\t\r\n\t\t\t\t//&& i != item.get_list().size()\r\n\t\t\t\tif(select_item.substring(0,2).contains(productCode) && i != item.get_list().size()){\r\n\t\t\t\t\tquantity += Integer.parseInt(select_item.substring(42,43)); //index of the quantity in the list\r\n\t\t\t\t\t//invoice_Total -= Integer.parseInt(select_item\r\n\t\t\t\t\titem.delete_line_item(i);\r\n\t\t\t\t\tbreak Bonus;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\r\n\t\t\t\r\n\t\t\t// create the LineItem object and set its fields \r\n\t\t\tLineItem lineItem = new LineItem(); \r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tlineItem.setProduct(product); \r\n\t\t\tlineItem.setQuantity(quantity);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//invoice_Total += lineItem.getTotal();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\titem.store_line_item(lineItem.getProduct(), lineItem.getQuantity(), lineItem.getTotal());\r\n\t\t\t\r\n\t\t\r\n\t\t\tSystem.out.println(\"Another line item? (y/n): \"); \r\n\t\t\tchoice = sc.nextLine();\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"Code Description Price Qty Total \");\r\n\t\tSystem.out.println(\"---- ------------ --------- ----- ------- \");\r\n\t\t\r\n\t\t\r\n\t\tfor (String list:item.get_list()){\r\n\t\t\t\r\n\t\t\r\n\t\t\tinvoice_Total += Double.parseDouble(list.substring(56,61)); //index of the total in the list\r\n\t\t\tSystem.out.println(list);\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\" Invoice total: \" + currency.format(invoice_Total));\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\n\t\tScanner keyboard = new Scanner(System.in);\n\n\t\tSystem.out.println(\"Enter cutoff price for discount>>>\");\n\t\tprice = keyboard.nextDouble();\n\t\tSystem.out.print(\" Enter discount rate as a whole number>>>\");\n\t\tdiscount = keyboard.nextDouble();\n\t\tsavings = computeDiscountInfo(price, discount);\n\n\t\tSystem.out.println(\" Special this week on any service over \" + price);\n\t\tdisplayInfo();\n\t\tcomputeDiscountInfo(34, 34);\n\t}", "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 }", "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 abstract double applyDiscount(double p);", "public String calculateTotal(String quantity, String price, String discount) {\n double percentageDisc, discountedPrice, total;\n percentageDisc = Double.parseDouble(discount) / 100;\n discountedPrice = Double.parseDouble(price) - (Double.parseDouble(price) * percentageDisc);\n total = (Double.parseDouble(quantity) * discountedPrice);\n return df2.format(total);\n }", "public int calcMarketPrice() {\r\n player = Context.getInstance().getPlayer();\r\n //Random r = new Random();\r\n int techLevel = player.getCurrentPlanet().getTechLevel();\r\n Event event = player.getCurrentPlanet().getEvent();\r\n Resource resource = player.getCurrentPlanet().getResource();\r\n double price = basePrice;\r\n price += (ipl * (techLevel - mtlb)) + variance;\r\n if (player.getCurrentPlanet().getTechLevel() == this.ttp) {\r\n price *= Context.TECH_PRICE_MULT;\r\n }\r\n if (event.equals(this.ie)) {\r\n price *= event.getUpMult();\r\n } else if (event.equals(this.de)) {\r\n price *= event.getDownMult();\r\n }\r\n if (resource.equals(this.cr)) {\r\n price *= resource.getDownMult();\r\n } else if (resource.equals(this.er)) {\r\n price *= resource.getUpMult();\r\n }\r\n price *= (((double) player.getTrader() / DFIFTY) + 1.0);\r\n int finalPrice = (int) price;\r\n if (player.getTrader() > 0) {\r\n double discountedPrice = price;\r\n double trader = (double) player.getTrader();\r\n discountedPrice -= (price) * (4.0 * trader / PERCENT);\r\n return (int) discountedPrice;\r\n } else {\r\n return finalPrice;\r\n }\r\n }", "public static void main(String[] args) {\n final int MAX_AMOUNT =3;\n double RATE_TAX = 0.055;\n Scanner input = new Scanner(System.in);\n double prices[] = new double [MAX_AMOUNT], subtotal =0, tax=0, total=0;\n int quantity[] = new int[MAX_AMOUNT];\n\n for(int i=0; i<MAX_AMOUNT; i++)\n {\n System.out.print(\"Enter the price of item \" + (i+1) + \": \");\n prices[i] = input.nextDouble();\n System.out.print(\"Enter the quantity of the item \" + (i+1) + \": \");\n quantity[i] = input.nextInt();\n subtotal += prices[i] * quantity[i];\n }\n tax =subtotal * RATE_TAX;\n total = tax + subtotal;\n\n System.out.println(\"Subtotal: $\" + String.format(\"%.2f\", subtotal));\n System.out.println(\"Tax: $\" + String.format(\"%.2f\", tax));\n System.out.println(\"Total: $\" + String.format(\"%.2f\", total));\n\n\n\n\n }", "public static double priceCalculator(String item, double currentPrice){\n // if the string start with 'n' that mean no item is selected so we add 0 to the total price.\n if (item.charAt(0) == 'n' || item.equalsIgnoreCase(\" \"))\n {\n currentPrice += 0;\n } else{ // if not we add 0.5 to the total price.\n currentPrice += 0.50;\n }\n return currentPrice;\n }", "double purchasePrice();", "public static int calculateDiscount(ItemType type, int quantity) {\n int discount = 0;\n switch (type) {\n case NEW:\n return 0;\n case SECOND_FREE:\n if (quantity > 1)\n discount = 50;\n break;\n case SALE:\n discount = 70;\n break;\n }\n discount += quantity / 10;\n if (discount > 80)\n discount = 80;\n return discount;\n }", "public static void main(String[] args)\n\t {\n\t \n\t Coffee coffee = new Coffee();\n\t Expresso espresso = new Expresso();\n\t Cappuccino cappuccino = new Cappuccino();\n\t \n\t \n\t final double SALES_TAX = 0.06;\n\t \n\t \n\t Scanner s = new Scanner(System.in); // Create a Scanner object\n\t System.out.println(\"How many coffeee drinks woul dyou like ?\");\n\t coffee.setQuantity(s.nextInt());\n\t \n\t s.hasNextLine();\n\t System.out.println(\" Would you like milk ( y or n)?\");\n\t String milkOption = s.nextLine();\n\t if (milkOption.equals(\"y\")) {\n\t \t coffee.setMilk(true);\n\t }\n\t \n\t System.out.println(\" Would you like sugar ( y or n)?\");\n\t String sugarOption = s.nextLine();\n\t if (sugarOption.equals(\"y\")) {\n\t \t coffee.setSugar(true);\n\t }\n\t \n\t System.out.printf(\"Name: %s\\nDescription: %s\\nSubtotal: %2f\\n\\n\", coffee.getName(), coffee.getDescription(),\n\t coffee.calculateProductTotal());\n\t \n\t \n\t\t \t \n\t\t \t \n\t System.out.println(\"How many Espresso drinks would you like ?\");\n\t espresso.setQuantity(s.nextInt());\n\t System.out.printf(\"Name: %s\\nDescription: %s\\nSubtotal: %2f\\n\\n\", espresso.getName(), espresso.getDescription(),\n\t espresso.calculateProductTotal());\n\t s.hasNextLine();\n\t\t System.out.println(\" Would you like milk ( y or n)?\");\n\t\t String extraShot = s.nextLine();\n\t\t if (extraShot.equals(\"y\")) {\n\t\t \t espresso.setExtraShot(true);\n\t\t }\n\t\t \n\t\t System.out.println(\" Would you like sugar ( y or n)?\");\n\t\t String macchiato = s.nextLine();\n\t\t if (macchiato.equals(\"y\")) {\n\t\t \t espresso.setMacchiato(true);\n\t\t }\n\t \n\t \n\t System.out.println(\"How many cappuccino drinks would you like ?\");\n\t cappuccino.setQuantity(s.nextInt());\n\t System.out.printf(\"Name: %s\\nDescription: %s\\nSubtotal: %2f\\n\\n\", cappuccino.getName(), cappuccino.getDescription(),\n\t cappuccino.calculateProductTotal());\n\t s.hasNextLine();\n\t\t System.out.println(\" Would you like milk ( y or n)?\");\n\t\t String peppermint = s.nextLine();\n\t\t if (peppermint.equals(\"y\")) {\n\t\t \t cappuccino.setPeppermint(true);\n\t\t }\n\t\t \n\t\t System.out.println(\" Would you like sugar ( y or n)?\");\n\t\t String whippedCream = s.nextLine();\n\t\t if (whippedCream.equals(\"y\")) {\n\t\t \t cappuccino.setWhippedCream(true);\n\t\t }\n\t \n\t \n\t double transactionSubtotal = coffee.calculateProductTotal() + espresso.calculateProductTotal() + cappuccino.calculateProductTotal();\n\t System.out.println(transactionSubtotal);\n\t double transactionTax = transactionSubtotal * SALES_TAX;\n\t double total = transactionSubtotal + transactionTax;\n\t System.out.printf(\"Subtotal: %.2f\\nTax: %.2f\\nTotal: %.2f\\n\",transactionSubtotal,transactionTax,total);\n\t s.close();\n\t }", "private void setDiscountedPrice() {\n seekbarNewprice.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {\n @Override\n public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {\n tvDiscountPerc.setText(progress * 5 + \"%\");\n try {\n double originalPrice = Double.parseDouble(etOriginalPrice.getText().toString());\n double sp = (progress * 5 * originalPrice) / 100;\n\n tvNewPrice.setText(String.format(Locale.US, \"%.2f\", originalPrice - sp));\n } catch (NumberFormatException ne) {\n ne.printStackTrace();\n }\n }\n\n @Override\n public void onStartTrackingTouch(SeekBar seekBar) {\n\n }\n\n @Override\n public void onStopTrackingTouch(SeekBar seekBar) {\n\n }\n });\n }", "@Override \n\tpublic TradeAction tick(double price) {\n\t\tma10before=average(priceQ10);\n\t\t\n\t\tif (priceQ10.size()<10)\n\t\t{\n\t\t\tpriceQ10.offer(price);\n\t\t}\n\t\tif(priceQ10.size()==10)\n\t\t{\n\t\t\tpriceQ10.poll();\n\t\t\tpriceQ10.offer(price);\t\t\n\t\t}\n\t\t\n\t\t ma10after=average(priceQ10);\n\t\t \n\t\t// 60 days moving average\n\t\tma60before=average(priceQ60);\n\t\tif (priceQ60.size()<60)\n\t\t{\n\t\t\tpriceQ60.offer(price);\n\t\t}\n\t\tif(priceQ60.size()==60)\n\t\t{\n\t\t\tpriceQ60.poll();\n\t\t\tpriceQ60.offer(price);\t\t\n\t\t}\n\t\tma60after=average(priceQ60);\n\t\t\t\n\t\t//buy when its 10 day moving average goes above the 60 day moving average\n\t\tif((ma10before < ma60before) & (ma10after > ma60after))\n\t\t{\n\t\t\tprofit = profit - price;\n\t\t\t//System.out.println(\"buy\");\n\t\t\t//System.out.println(\"profit is\");\n\t\t\t//System.out.println(profit);\n\t\t\tif(mark==1){\n\t\t\t\tmark=-1;\n\t\t\t\treturn TradeAction.BUY;\n\t\t\t}\n\t\t\telse \n\t\t\t\treturn TradeAction.DO_NOTHING;\n\t\t\t\n\t\t}\n\t\t//buy when its 10 day moving average goes below the 60 day moving average\n\t\tif((ma10before > ma60before) & (ma10after < ma60after))\n\t\t{\n\t\t\tprofit = profit + price;\n\t\t\t//System.out.println(\"sell\");\n\t\t\t//System.out.println(\"profit is\");\n\t\t\t//System.out.println(profit);\n\t\t\tif(mark==-1){\n\t\t\t\tmark=1;\n\t\t\t\treturn TradeAction.SELL;\n\t\t\t}\n\t\t\telse \n\t\t\t\treturn TradeAction.DO_NOTHING;\n\t\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn TradeAction.DO_NOTHING;\t\t\t\n\t\t}\n\n\t}", "public void executeSale(double qty,double price,int pay,int sell) {\n\t\tboolean testing=false;\n\t\tif (testing|testAll) System.out.println(\"RETAILER \"+id+\". Execute sale. qty=\"+qty+\". price=\"+price+\". buy=\"+pay+\". sell=\"+sell);\n\t\tthis.increaseInventory(pay,qty*price);\n\t\tthis.increaseInventory(sell,-qty);\n\t\tif (pay==r_money) income=income+qty*price;\n\t\tif (pay==r_product) supply=supply+qty*price;\n\t\tif (sell==r_money) {\n\t\t\tif (this.getInventory()[r_money]<0.00001) cashouts++;\n\t\t}\n\t\tif (sell==r_product) {\n\t\t\tif (this.getInventory()[r_product]<0.00001) stockouts++;\n\t\t}\n\t\tdouble epsilon=0.000001;\n\t\tif (this.getInventory()[sell]<epsilon) Transactions.dividend(this,owner,sell,this.getInventory()[sell]);\n\t\tif (this.getInventory()[pay]<epsilon) Transactions.dividend(this,owner,pay,this.getInventory()[pay]);\n\t}", "public static void main(String[] args)\n\t\t\t{\n\t\t\t\tScanner enter = new Scanner(System.in);\n\t\t\t\tSystem.out.println(\"Please enter your condominium selection:\\n1 - Park View\\n2 - Golf \" +\n\t\t\t\t \"Course View\\n3 - Lake View\");\n\t\t\t\tcondoSelection = enter.nextInt();\n\t\t\t\tboolean invalidResponse = (condoSelection > 3 || condoSelection < 0);\n \n \n\t\t\t\tif (condoSelection == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tsalesPrice = PARKVIEW_PRICE;\n\t\t\t\t\t\tSystem.out.println(park + String.format( \"%.2f\", salesPrice ));\n\t\t\t\t\t}\n\t\t\t\telse if (condoSelection == 2)\n\t\t\t\t\t{\n\t\t\t\t\t\tsalesPrice = GOLFVIEW_PRICE;\n\t\t\t\t\t\tSystem.out.println(golf + String.format( \"%.2f\", salesPrice ));\n\t\t\t\t\t}\n\t\t\t\telse if (condoSelection == 3)\n\t\t\t\t\t{\n\t\t\t\t\t\tsalesPrice = LAKEVIEW_PRICE;\n\t\t\t\t\t\tSystem.out.println(lake + String.format( \"%.2f\", salesPrice ));\n\t\t\t\t\t}\n\t\t\t\telse if (invalidResponse)\n\t\t\t\t\t{\n\t\t\t\t\t\tsalesPrice = 0;\n\t\t\t\t\t\tSystem.out.println(invalidSelection + String.format( \"%.2f\", salesPrice ));\n\t\t\t\t\t}\n\t\t\t}", "double checkout() {\n\t\tdouble total = 0;\n\t\tfor (Fruit item : fruitList){\n\t\t\ttotal += item.getPrice();\t\n\t\t}\t\n\t\t\n\t\t// Apply offers and calculate total\n\t\tdouble discountGetOneFree = Offer.getOfferBuyOneGetOneFree(getFruitNameList(), new Apple() );\n\t\tdiscountGetOneFree += Offer.getOfferBuyOneGetOneFree(getFruitNameList(), new Banana() );\n\t\tdouble discountThreeForTwo = Offer.getOfferThreeForTwo(getFruitNameList(), new Orange() );\n\t\tdiscountThreeForTwo += Offer.getOfferThreeForTwo(getFruitNameList(), new Melon() );\t\t\n\t\tdouble discountCheapestForFree = Offer.cheapestFruitForFree(getFruitList());\n\t\ttotal += - discountGetOneFree - discountThreeForTwo - discountCheapestForFree;\n\t\t\n\t\tDecimalFormat df = new DecimalFormat(\"#,##0.00\");\n\t\t// Print out the total cost and saving\n\t\tSystem.out.println(String.format(\"£ %s Total cost\", df.format(total)));\n\t\tif (discountGetOneFree > 0)\n\t\t\tSystem.out.println(String.format(\"£ %s Promotional Saving *** Buy One Get One Free ***\", df.format(discountGetOneFree)));\n\t\tif (discountThreeForTwo > 0)\n\t\t\tSystem.out.println(String.format(\"£ %s Promotional Saving *** 3 for the price of 2 ***\", df.format(discountThreeForTwo)));\n\t\tif (discountCheapestForFree > 0)\n\t\t\tSystem.out.println(String.format(\"£ %s Promotional Saving *** Cheapest for free ***\", df.format(discountCheapestForFree)));\n\t\t\t\t\t\n\t\treturn total;\t\t\n\t}", "private int calculatePrice(boolean addWhippedCream, boolean addChocolate,boolean takeAway) {\r\n int price=20;\r\n if (addWhippedCream){\r\n price=price+5;\r\n }\r\n\r\n if (addChocolate){\r\n price=price+7;\r\n }\r\n if (takeAway){\r\n price=price+2;\r\n }\r\n\r\n\r\n return quantity*price;\r\n\r\n }", "private void changePrice() {\n\t\tint sic_idHolder; // declares sic_idHolder\n\t\tdouble priceHolder; // declares priceHolder\n\t\t\n\t\tSystem.out.println(\"Please enter the SIC-ID of the book you'd like to change the price of:\");\n\t\tsic_idHolder = scan.nextInt();\n\t\tscan.nextLine();\n\t\t\n\t\tif(inventoryObject.cardExists(sic_idHolder)) { // checks to see if card exists\n\t\t\tSystem.out.println(\"Please enter the new price of the book:\");\n\t\t\tpriceHolder = scan.nextDouble();\n\t\t\tscan.nextLine();\n\t\t\tif(priceHolder < 0) { // checks to see if priceHolder is negative\n\t\t\t\tSystem.out.println(\"The price cannot be below zero\\n\");\n\t\t\t\tgetUserInfo();\n\t\t\t}\n\t\t\tinventoryObject.changePrice(sic_idHolder, priceHolder);\n\t\t\tgetUserInfo();\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"The ID you entered does not exist\\n\");\n\t\t\tgetUserInfo();\n\t\t}\n\t}", "void setDiscount(float sconto);", "private void calculatePrice(int quantity) {\n int price = quantity * priceOfCoffee;\n }", "public static void main(String[] args) {\n int moneyAmount = 10;\n\n int capuccinoPrice = 180;\n int lattePrice = 120;\n int espressoPrice = 80;\n int pureWaterPrise = 20;\n\n var canBuyAnything = false;\n var isMilkEnough = true;\n\n if(moneyAmount >= capuccinoPrice && isMilkEnough) {\n System.out.println(\"Вы можете купить капуччино\");\n canBuyAnything = true;\n }\n\n if(moneyAmount >= lattePrice && isMilkEnough) {\n System.out.println(\"Вы можете купить латте\");\n canBuyAnything = true;\n }\n\n if(moneyAmount >= espressoPrice) {\n System.out.println(\"Вы можете купить еспрессо\");\n canBuyAnything = true;\n }\n\n if(moneyAmount >= pureWaterPrise) {\n System.out.println(\"Вы можете купить воду\");\n canBuyAnything = true;\n }\n\n if(canBuyAnything == false) {\n System.out.println(\"Недостаточно денег\");\n }\n }", "private int calculatePrice(boolean addWhippedCream, boolean addChocolate, boolean addCinnamon, boolean addMarshmallows) {\n int basePrice = 5;\n if (addWhippedCream){\n basePrice = basePrice + 1;\n }\n if (addChocolate){\n basePrice = basePrice + 1;\n }\n if (addCinnamon){\n basePrice = basePrice + 1;\n }\n if (addMarshmallows){\n basePrice = basePrice + 1;\n }\n return quantity * basePrice;\n\n }", "public int calculatePrice() {\n int price = 5;\n if(hasWhippedCream) {\n price += 1;\n }\n if(hasChocolate) {\n price += 2;\n }\n return quantity * price;\n }", "public double calculatePrice(Order order){\r\n return order.quantity * order.itemPrice -\r\n Math.max(0, order.quantity - 500) * order.itemPrice * 0.05 +\r\n Math.min(order.quantity * order.itemPrice * 0.1, 100);\r\n }", "private int calculatePrice(int quantit,boolean b) {\n\n if(b==true)\n return quantit*10;\n else\n return quantit*5;\n }", "private int calculatePrice(boolean cream , boolean choco) {\n //Price per one cup is $5\n int pricePerCup = 5;\n\n\n //Cream topping costs $2\n if(cream == true & pricePerCup > 0){\n pricePerCup += 1;\n }\n\n //Chocolate topping costs $3\n if(choco == true & pricePerCup > 0){\n pricePerCup += 2;\n }\n\n return quantity * pricePerCup;\n }", "public static void main(String[] args) {\r\n // calculate how much it would cost to purchase different quantities of computer parts\n String name;\n System.out.println(\"Welcome! Enter which computer parts you would like to purchase along with a quantity:\");\n System.out.println(\"How many Chromebook Chargers would you like?:\");\n // Creates a Scanner used for input\n Scanner input = new Scanner(System.in);\n int chromebookCharger = input.nextInt();\n\n\n System.out.println(\"How many Replacement Motherboards would you like?:\"); \n int replacementMotherboard = input.nextInt();\n \n System.out.println(\"How many Computer Mouses would you like?:\");\n int computerMouse = input.nextInt();\n\n double Subtotal = (chromebookCharger*34.99 + replacementMotherboard*127.50 + computerMouse*18.00);\n\n double Tax = (1.13);\n\n // declare and calculate the quotient\n System.out.println(Subtotal*1.13);\n\n\n\n \r\n \r\n }", "private static int getBonus(int sales) {\n if (sales > 5000) {\n\n return sales / 10;\n\n }\n return 0;\n }", "private void calculatePrice(int quantity, int pricePerCup) {\n int price = quantity * pricePerCup;\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tScanner in = new Scanner(System.in);\r\n\t\tSystem.out.println(\"How many libraries you bought?\");\r\n\t\tint sales = in.nextInt();\r\n\t\tswitch(sales){\r\n\t\tcase 6: System.out.println(\"You Won $1000\");\r\n\t\tcase 5: System.out.println(\"You Won A Motorcycle\");\r\n\t\tcase 4: System.out.println(\"You won A Smart Phone\");\r\n\t\tcase 3: System.out.println(\"You Won A Nintendo\");\r\n\t\tcase 2: System.out.println(\"You Won A Car\");\r\n\t\tcase 1: System.out.println(\"You won A watch\");\r\n\t\tbreak;\r\n\t\tdefault: System.out.println(\"no Price\");\r\n\r\n\t}\r\n\t}", "public static void main(String[] args) {\n\t\tint c=1;\r\n\t\tdouble total=0.0,pd=0.0;\r\n\t\tbyte i =0, numero =0;\r\n\t\t\r\n\t\tScanner leer=new Scanner(System.in);\r\n\t\tDecimalFormat formateador = new DecimalFormat(\"###,##.##\");\r\n\t\t\r\n\t\t\tSystem.out.println(\"INGRESE EL NUMERO DE PRODUCTOS\" );\r\n\t\t\tnumero=leer.nextByte();\r\n\t\t\ti++;\r\n\t\t\tdo{\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"ingrese el vallor del producto \" );\r\n\t\t\tpd=leer.nextDouble();\r\n\t\t\ttotal+=pd;\r\n\r\n\t\t}\r\n\t\twhile (i<=numero);\r\n\t\tif (total>=1500){\r\n\t\ttotal=total*1.11;\r\n\r\n\t\t\t\r\n\t}\r\n else {\r\n\t\t\t total=total*1.10;\r\n\t\t\t\r\n\t\t\t\tSystem.out.println(total);\r\n\t\t\t}\r\n\t\t{\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\r\n\t\tSystem.out.println(\"enter the number of items:\");\r\n\t\titems=sc.nextInt();\r\n\t\tSystem.out.println(\"enter the value:\");\r\n\t\tcost=sc.nextInt();\r\n\t\ttry {\r\n\t\t\tcal=items/cost;\r\n\t\t\tSystem.out.println(\"enter the cost per day:\"+cal);\r\n\t\t}\r\n\t\tcatch(ArithmeticException ae) {\r\n\t\t\tSystem.out.println(\"Enter the correct value:\");\r\n\t\t}\r\n\t}", "@SuppressWarnings(\"FeatureEnvy\")\n @SuppressLint(\"SetTextI18n\")\n @Override\n public void sellItem(String goods, int price) {\n @SuppressWarnings(\"ChainedMethodCall\") int max = player.getInven().get(goods.toLowerCase());\n if ((max - Integer.parseInt(inputStr)) >= 0) {\n player.getInven().put(goods.toLowerCase(), player.getInven().get(goods.toLowerCase())\n -Integer.parseInt(inputStr));\n player.setCargo(player.getCargo() - Integer.parseInt(inputStr));\n player.setCredit(player.getCredit() + (Integer.parseInt(inputStr) * price));\n bay.setText(String.valueOf(player.getCargo()) + \"/\" + player.getSpaceship().getBay());\n credit.setText(String.valueOf(player.getCredit()) + \" Cr\");\n setupInverntory();\n Toast.makeText(getApplicationContext(), \"You sold \" + inputStr + \" \" + goods,\n Toast.LENGTH_LONG).show();\n } else {\n Toast.makeText(getApplicationContext(),\n \"You can not sell anymore. Check your bay.\", Toast.LENGTH_LONG).show();\n }\n }", "private static double getDiscount() {\n System.out.print(\"Fill your coupon code: \");\n String code = sc.nextLine();\n for (String aDiscount : SKERestaurant.discount) {\n System.out.println(aDiscount);\n if (code.equalsIgnoreCase(aDiscount.split(\";\")[0])) {\n return Double.parseDouble(aDiscount.split(\";\")[2].replaceAll(\" \", \"\"));\n }\n }\n System.out.println(\"Coupon not found, Proceed to checkout\");\n return 0;\n }", "private int calculatePrice() {\n int price = numberOfCoffees * 5;\n\n return price;\n\n\n }", "public double cost()\n\t{\n\t\t//initiates the price variable\n\t\tdouble price = 0;\n\t\t\n\t\t//if the customer is aged between 18 and 64 years and is not a student\n\t\tif (this.age >= 18 && this.age <= 64 && !this.isStudent)\n\t\t{\n\t\t\t//the price is $10\n\t\t\tprice = 10;\n\t\t}\n\t\t\n\t\t//if not, but it has less than 18 years\n\t\telse if (this.age < 18)\n\t\t{\n\t\t\t//the price is 7\n\t\t\tprice = 7;\n\t\t}\n\t\t\n\t\t//why between 10 and 25 if people aged less than 18 pay 7 dollars?\n\t\t//it would not make sense someone aged 17 and is not a student pay $7\n\t\t//if someone aged 17 and is a student pay $8.50\n\t\t\n\t\t//if not, but the age is bigger than 10 and less than 25 and is a student\n\t\telse if (this.age >= 10 && this.age <= 25 && this.isStudent)\n\t\t{\n\t\t\t//give 15% of discount\n\t\t\tprice = 0.85f * 10;\n\t\t}\n\t\t\n\t\t//if not, but the age is bigger than 25 and is a students\n\t\telse if (this.age > 25 && this.isStudent)\n\t\t{\n\t\t\t//give 10% of discount\n\t\t\tprice = 0.90f * 10;\n\t\t}\n\t\t\n\t\t//if not, but the age is bigger than 64 and is not a student\n\t\telse if (this.age > 64 && !this.isStudent)\n\t\t{\n\t\t\t//give 7% of discount\n\t\t\tprice = 0.93f * 10;\n\t\t}\n //returns the price \n\t\treturn price;\n\t}", "public static void main(String[] args) {\n double productPrice;\n String productDesc;\n double taxRate;\n double totalAmount=0;\n double productTotal=0;\n\n double taxCharged;\n String response=\"y\";\n \n //The 'shopping list' \n ArrayList<Product> pList=new ArrayList <Product>();\n \n //Created to accept user input \n Scanner sc = new Scanner(System.in);\n \n //Prompt user for tax rate \n System.out.println(\"Enter tax rate\");\n //use .hasNext for data types to validate for each type \n while(!sc.hasNextDouble())\n {\n System.out.println(\"Invalid number. Please enter a tax rate e.g. '3'\");\n sc.next();\n\n }\n taxRate = sc.nextDouble();\n //Use this to capture the return (enter) key, so that the app does not skip to the next line\n sc.nextLine();\n\n //Check to see if the user would like to enter another product\n do{\n if(!response.equalsIgnoreCase(\"y\"))\n {\n System.out.println(\"You must enter either 'Y' or 'N'\");\n }\n else{\n System.out.println(\"Enter product price\");\n while(!sc.hasNextDouble())\n {\n System.out.println(\"Invalid number. Please product price\");\n sc.next();\n\n }\n productPrice = sc.nextDouble();\n sc.nextLine();\n\n System.out.println(\"Enter product description\");\n while(!sc.hasNextLine())\n {\n System.out.println(\"You must enter a product description\");\n sc.next();\n\n }\n productDesc = sc.nextLine();\n System.out.println(\"The product price is \"+productPrice+\" and the description is \"+productDesc);\n Product p = new Product();\n p.setDescription(productDesc);\n p.setPrice(productPrice);\n pList.add(p);\n\n }\n System.out.println(\"Would you like to enter more product details? \");\n response = sc.nextLine();\n }while(!response.equalsIgnoreCase(\"n\"));\n \n //Iterate through the 'shopping list' \n for(Product aNewProduct : pList)\n {\n //Use the toString() method to show what the product item contains\n \tSystem.out.println(aNewProduct.toString());\n productTotal+=aNewProduct.getPrice();\n }\n taxCharged = (taxRate/100) * productTotal;\n \n //Show the pre-tax total, tax charged and total amount in plain text\n System.out.println(\"The pre-tax total is:\"+productTotal);\n System.out.println(\"The tax due is:\"+taxCharged);\n totalAmount=productTotal+taxCharged;\n System.out.println(\"The Grand Total is:\"+totalAmount);\n\n //Format to two decimal places\n\n //Display a table (courtesy http://bit.ly/2uIAkNb)\n /*Format the body of the table to have a | character, followed by \n * 35 string characters\n * and another | followed by a float, made up of 10 digits for the number\n * and 2 digits for the decimal place\n * Move to the net line (%n)\n */\n String leftAlignFormat = \"| %-35s | %-10.2f |%n\";\n \n\n System.out.format(\"+-------------------------------------+------------+%n\");\n System.out.format(\"| Description | Price |%n\");\n System.out.format(\"+-------------------------------------+------------+%n\");\n for(Product aNewProduct : pList)\n {\n \t/*Format the string using the product description as the string, and the product price\n \tas the float to display\n \t*/\n System.out.format(leftAlignFormat,aNewProduct.getDescription(),aNewProduct.getPrice());\n }\n System.out.format(\"+-------------------------------------+------------+%n\");\n System.out.format(leftAlignFormat,\"Sub Total\",productTotal);\n System.out.format(leftAlignFormat,\"Tax Amount\",taxCharged);\n System.out.format(\"+-------------------------------------+------------+%n\");\n System.out.format(leftAlignFormat,\"Grand Total\",totalAmount);\n System.out.format(\"+-------------------------------------+------------+%n\");\n\n }", "public static void checkout(double preTotal, double discount, double discountRate)\r\n\t{\r\n\t\tdouble discountAmount = 0.0;\r\n\t\tdouble total;\r\n\r\n\t\tSystem.out.println(\"Thanks for coming!\");\r\n\t\tSystem.out.println(\"SubTotal: \" + preTotal);\r\n\r\n\t\tif(preTotal >= discount)\r\n\t\t\tdiscountAmount = preTotal * discountRate;\r\n\t\ttotal = preTotal - discountAmount;\r\n\r\n\t\tSystem.out.println(\"-Discount: \" + discountAmount);\r\n\t\tSystem.out.println(\"Total: \\t\" + total);\r\n\t}", "public abstract double calculateAppraisalPrice();", "float getDiscount();", "public static void main(String[] args) {\n Scanner myScanner = new Scanner(System.in); //allows to prompt user for input\n System.out.print(\"Enter the original cost of the check in the form xx.xx \");\n //using method within Scanner class\n double checkCost = myScanner.nextDouble();\n System.out.print(\"Enter the percentage tip that you wish to pay as\"+\n \"a whole number (in the form xx): \" ); \n double tipPercent = myScanner.nextDouble(); //promt user to enter tip perecentage\n tipPercent /= 100; //We want to convert the percentage into a decimal value\n System.out.print(\"Enter the number of people who went out to dinner: \"); \n int numPeople = myScanner.nextInt(); //promt user to enter number of people\n double totalCost; \n double costPerPerson;\n int dollars, //whole dollar amount of cost \n dimes, pennies; //for storing digits\n //to the right of the decimal point \n //for the cost$ \n totalCost = checkCost * (1 + tipPercent);\n costPerPerson = totalCost / numPeople;\n //get the whole amount, dropping decimal fraction\n dollars=(int)costPerPerson;\n //get dimes amount, e.g., \n // (int)(6.73 * 10) % 10 -> 67 % 10 -> 7\n // where the % (mod) operator returns the remainder\n // after the division: 583%100 -> 83, 27%5 -> 2 \n dimes=(int)(costPerPerson * 10) % 10;\n pennies=(int)(costPerPerson / 100);\n System.out.println(\"Each person in the group owes $\" + dollars + \".\" + dimes + pennies);\n \n \n }", "public static double calculations(int quantity, double cost) {\r\n\tdouble price = 0;\r\n\tprice = quantity*cost;\r\n\treturn price = price+calculateTax(price);\r\n\t}", "private void OverAllDiscount(double dDiscountPercent) {\n double dRate = 0, dTaxPercent = 0, dTaxAmt = 0, dDiscAmt = 0, dTempAmt = 0;\n TableRow rowItem;\n TextView DiscAmt, DiscPercent, Qty, Rate, TaxAmt, TaxPercent, TaxType;\n\n for (int i = 0; i < tblOrderItems.getChildCount(); i++) {\n\n // Get Item row\n rowItem = (TableRow) tblOrderItems.getChildAt(i);\n if (rowItem.getChildAt(0) != null) {\n // Get Discount percent\n Qty = (TextView) rowItem.getChildAt(3);\n Rate = (TextView) rowItem.getChildAt(4);\n DiscPercent = (TextView) rowItem.getChildAt(8);\n DiscAmt = (TextView) rowItem.getChildAt(9);\n TaxPercent = (TextView) rowItem.getChildAt(6);\n TaxAmt = (TextView) rowItem.getChildAt(7);\n TaxType = (TextView) rowItem.getChildAt(13);\n DiscPercent.setText(String.format(\"%.2f\", dDiscountPercent));\n\n dRate = Double.parseDouble(Rate.getText().toString());\n dTaxPercent = Double.parseDouble(TaxPercent.getText().toString());\n\n if (TaxType.getText().toString().equalsIgnoreCase(\"1\")) {\n // Discount\n dDiscAmt = dRate * (dDiscountPercent / 100);\n dTempAmt = dDiscAmt;\n dDiscAmt = dDiscAmt * Double.parseDouble(Qty.getText().toString());\n\n // Tax\n dTaxAmt = (dRate - dTempAmt) * (dTaxPercent / 100);\n dTaxAmt = dTaxAmt * Double.parseDouble(Qty.getText().toString());\n\n TaxAmt.setText(String.format(\"%.2f\", dTaxAmt));\n DiscAmt.setText(String.format(\"%.2f\", dDiscAmt));\n\n } else {\n double dBasePrice = 0;\n dBasePrice = dRate / (1 + (dTaxPercent / 100));\n\n // Discount\n dDiscAmt = dBasePrice * (dDiscountPercent / 100);\n dTempAmt = dDiscAmt;\n dDiscAmt = dDiscAmt * Double.parseDouble(Qty.getText().toString());\n\n // Tax\n dTaxAmt = (dBasePrice - dTempAmt) * (dTaxPercent / 100);\n dTaxAmt = dTaxAmt * Double.parseDouble(Qty.getText().toString());\n\n TaxAmt.setText(String.format(\"%.2f\", dTaxAmt));\n DiscAmt.setText(String.format(\"%.2f\", dDiscAmt));\n }\n }\n }\n\n CalculateTotalAmount();\n }", "public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tProduct item1 = new Product(\"Toaster\", 29.95);\n\t\tSystem.out.print(item1.getName());\n\t\tSystem.out.println(item1.getPrice());\n\t\tProduct item2 = new Product(\"Coffee Maker\", 19.95);\n\t\tSystem.out.print(item2.getName());\n\t\tSystem.out.println(item2.getPrice());\n\t\tSystem.out.println(1+2+3+4);\n\t\t\n\t\tString itemName = JOptionPane.showInputDialog(null, \"Please input the name of the item\");\n\t\tString itemPrice = JOptionPane.showInputDialog(null, \"Please input the price of the item\");\n\t\t\n\t\tdouble item3Price = Double.parseDouble(itemPrice);\n\t\t\n\t\tProduct item3 = new Product(itemName, item3Price);\n\t\titem1.reducePrice(5.00);\n\t\tSystem.out.println(item1.getPrice());\n\t\titem2.reducePrice(5.00);\n\t\tSystem.out.println(item2.getPrice());\n\t\tSystem.out.println(itemName);\n\t\tSystem.out.println(itemPrice);\n\t\titem3.reducePrice(5.00);\n\t\tSystem.out.println(item3.getPrice());\n\t\t\n\n\t}", "private void OverAllDiscount(double dDiscountPercent) {\r\n double dRate = 0, dTaxPercent = 0, dTaxAmt = 0, dDiscAmt = 0, dTempAmt = 0;\r\n TableRow rowItem;\r\n TextView DiscAmt, DiscPercent, Qty, Rate, TaxAmt, TaxPercent, TaxType;\r\n\r\n for (int i = 0; i < tblOrderItems.getChildCount(); i++) {\r\n\r\n // Get Item row\r\n rowItem = (TableRow) tblOrderItems.getChildAt(i);\r\n if (rowItem.getChildAt(0) != null) {\r\n // Get Discount percent\r\n Qty = (TextView) rowItem.getChildAt(3);\r\n Rate = (TextView) rowItem.getChildAt(4);\r\n DiscPercent = (TextView) rowItem.getChildAt(8);\r\n DiscAmt = (TextView) rowItem.getChildAt(9);\r\n TaxPercent = (TextView) rowItem.getChildAt(6);\r\n TaxAmt = (TextView) rowItem.getChildAt(7);\r\n TaxType = (TextView) rowItem.getChildAt(13);\r\n DiscPercent.setText(String.format(\"%.2f\", dDiscountPercent));\r\n\r\n dRate = Double.parseDouble(Rate.getText().toString());\r\n dTaxPercent = Double.parseDouble(TaxPercent.getText().toString());\r\n\r\n if (TaxType.getText().toString().equalsIgnoreCase(\"1\")) {\r\n // Discount\r\n dDiscAmt = dRate * (dDiscountPercent / 100);\r\n dTempAmt = dDiscAmt;\r\n dDiscAmt = dDiscAmt * Double.parseDouble(Qty.getText().toString());\r\n\r\n // Tax\r\n dTaxAmt = (dRate - dTempAmt) * (dTaxPercent / 100);\r\n dTaxAmt = dTaxAmt * Double.parseDouble(Qty.getText().toString());\r\n\r\n TaxAmt.setText(String.format(\"%.2f\", dTaxAmt));\r\n DiscAmt.setText(String.format(\"%.2f\", dDiscAmt));\r\n\r\n } else {\r\n double dBasePrice = 0;\r\n dBasePrice = dRate / (1 + (dTaxPercent / 100));\r\n\r\n // Discount\r\n dDiscAmt = dBasePrice * (dDiscountPercent / 100);\r\n dTempAmt = dDiscAmt;\r\n dDiscAmt = dDiscAmt * Double.parseDouble(Qty.getText().toString());\r\n\r\n // Tax\r\n dTaxAmt = (dBasePrice - dTempAmt) * (dTaxPercent / 100);\r\n dTaxAmt = dTaxAmt * Double.parseDouble(Qty.getText().toString());\r\n\r\n TaxAmt.setText(String.format(\"%.2f\", dTaxAmt));\r\n DiscAmt.setText(String.format(\"%.2f\", dDiscAmt));\r\n }\r\n }\r\n }\r\n\r\n CalculateTotalAmount();\r\n }", "public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\t// Create HashMaps to store the items in the store and the customers.\n\t\t\n\t\t// String -> Item Name Double -> Item Cost\n\t\tHashMap<String, Double> storeItems = new HashMap<>();\n\t\t\n\t\t// String -> Customer First and Last Double -> Customer Total Cost\n\t\tHashMap<String, Double> customers = new HashMap<>();\n\t\t\n\t\t// Get total number of items in store from input\n\t\tint itemsInStore = scan.nextInt();\n\t\t\n\t\t// Put all the inputed items in the HashMap with their corresponding value\n\t\tfor (int i=0;i<itemsInStore;i++)\n\t\t\t// Item Name Item Price\n\t\t\tstoreItems.put(scan.next(), scan.nextDouble());\n\t\t\n\t\t// Get total number of customers from input\n\t\tint totalCustomers = scan.nextInt();\n\t\t\n\t\t// Loop through each customer, calculate the total cost and\n\t\t// put their info in the HashMap\n\t\tfor (int i=0;i<totalCustomers;i++) {\n\t\t\t// Get the first and last name of the customer\n\t\t\tString name = scan.next() + \" \" + scan.next();\n\t\t\t\n\t\t\t// Get the items the customer bought\n\t\t\tint itemsBought = scan.nextInt();\n\t\t\t\n\t\t\tdouble totalCost = 0.0;\n\t\t\t\n\t\t\t// For each of the items bought, get the cost of the item and multiple by the quantity\n\t\t\t// Add the resulting value to the total cost of the customer\n\t\t\tfor (int j=0;j<itemsBought;j++)\n\t\t\t\t// Quantity * Item Price From HasMap\n\t\t\t\ttotalCost += (scan.nextInt() * storeItems.get(scan.next()));\n\t\t\t\n\t\t\t// The the cost and then name into the customer HashMap\n\t\t\tcustomers.put(name, totalCost);\n\t\t}\n\t\t\n\t\tMap.Entry<String, Double> maxCustomer = null;\n\n\t\t// Calculate the biggest buyer from the customers\n\t\t// Loop through each customer in the HashMap\n\t\tfor (Map.Entry<String, Double> customer : customers.entrySet()) {\n\t\t\t// If the current customer in the loop is higher than the original highest\n\t\t\t// then replace the old current highest with the new current highest customer\n\t\t\tif (maxCustomer == null || customer.getValue().compareTo(maxCustomer.getValue()) > 0)\n\t\t\t\tmaxCustomer = customer;\n\t\t}\n\n\t\tMap.Entry<String, Double> minCustomer = null;\n\t\t\n\t\t// Calculate the smallest buyer from the customers\t\t\n\t\t// Loop through each customer in the HashMap\n\t\tfor (Map.Entry<String, Double> customer : customers.entrySet()) {\n\n\t\t\t// If the current customer in the loop is lower than the original lowest\n\t\t\t// then replace the old current lowest with the new current lowest customer\n\t\t\tif (minCustomer == null || customer.getValue().compareTo(minCustomer.getValue()) < 0)\n\t\t\t\tminCustomer = customer;\n\t\t}\n\t\t\n\t\tdouble totalCostOfAllCustomers = 0.0;\n\n\t\t// Calculate the grand total of the customers\n\t\t// Loop through each customer in the HashMap\n\t\tfor (Map.Entry<String, Double> customer : customers.entrySet())\n\t\t\t// Add the total cost of the customer to the grand total\n\t\t\ttotalCostOfAllCustomers += customer.getValue();\n\t\t\n\t\t// Print the biggest customer and their amount formatted to 2 decimal places\n\t\tSystem.out.println(\"Biggest: \" + maxCustomer.getKey() +\n\t\t\t\t\t\t\t\" (\" + String.format(\"%.2f\", maxCustomer.getValue()) + \")\");\n\n\t\t// Print the smallest customer and their amount formatted to 2 decimal places\n\t\tSystem.out.println(\"Smallest: \" + minCustomer.getKey() +\n\t\t\t\t\t\t\t\" (\" + String.format(\"%.2f\", minCustomer.getValue()) + \")\");\n\t\t\n\t\t// Print the average of all the customers formatted to 2 decimal places\n\t\tSystem.out.println(\"Average: \" + String.format(\"%.2f\", (totalCostOfAllCustomers / customers.size())));\n\t\t\n\t\t// Close scanner as user input is no longer needed\n\t\tscan.close();\n\t}", "public static void askCustomer(Cart cart){\n // Code to read from console the product name, seller,\n // price, number of products, discount and\n // if Buy2Take3 applies.\n // Then create a product of the correct type\n // and add it to the shopping cart\n\n Scanner scanner = new Scanner(System.in);\n\n System.out.print(\"Product name: \");\n String pName = scanner.nextLine();\n\n System.out.print(\"Seller: \");\n String seller = scanner.nextLine();\n\n System.out.print(\"Price: \");\n double price = scanner.nextDouble();\n\n System.out.print(\"How many: \");\n int howMany = scanner.nextInt();\n\n System.out.print(\"Discount (enter 0 if no discount applies): \");\n int discount = scanner.nextInt();\n\n\n System.out.print(\"Does Buy2Take3 apply? Y/N: \");\n String buy2take3 =scanner.next();\n\n\n Product product;\n\n\n if(discount>0&&buy2take3.equals(\"N\")) {\n product=new Product(pName,seller,price);\n DiscountedProduct bt=new DiscountedProduct(product,discount);\n cart.addProduct(bt,howMany);\n }\n else if(discount==0&&buy2take3.equals(\"Y\")) {\n product=new Product(pName,seller,price);\n Buy2Take3Product bt2=new Buy2Take3Product(product);\n cart.addProduct(bt2,howMany);\n }else {\n throw new IllegalArgumentException(\"You can not use both campaign\");\n }\n }", "public double discountedPrice (){\n return basePrice - basePrice * discountRate;\n }", "@Test\n\tpublic void priceTest(){\n\t\tMyFoodora myFoodora = new MyFoodora();\n\t\tmyFoodora.load();\n\t\tRestaurant rest = myFoodora.getListRestaurant().get(0);\n\t\ttry{\n\t\tOrder order = new Order(myFoodora.getListCustomer().get(0), rest);\n\t\torder.AddMealToOrder(\"basic\",1); //Basic is the meal of the week\n\t\torder.getCustomer().setFidelityCard(\"lotteryfidelitycard\");\n\t\torder.getBill();\n\t\tmyFoodora.getListCourier().get(0).setAcceptProbability(1); //To be sure that the order is always accepted in the test\n\t\tmyFoodora.setCourierToOrder(order);\n\t\tmyFoodora.closeOrder(order);\n\t\tassertTrue(order.getPrice()== ((double) Math.round(0.95*(2.3+6.7+2.5) * 100))/100 ||order.getPrice()==0);}\n\t\t\n\t\tcatch(NoCourierFoundToDeliver e){\n\t\t\te.getMessage();\n\t\t}\n\t\tcatch(OrderNotCompletException e){\n\t\t\te.getMessage();\n\t\t}\n\t\tcatch(ItemDoesNotExist e){\n\t\t\te.getMessage();\n\t\t}\n\t\tcatch(FidelityCardDoesNotExistException e){\n\t\t\te.getMessage();\n\t\t}\n\t}", "@Override\r\n\tpublic void makeDiscount() {\n\t\t\r\n\t}", "public double price(){\n if (basePrice() >1000){\n return basePrice() *0.95;\n }else\n return basePrice() * 0.98;\n }", "public static void main(String[] args) {\n\n\t\tCustomer customer = new Customer();\n\t\tShoppingCart cart = new ShoppingCart();\n\t\tBill bill = new Bill();\n\t\t\n\t\tcustomer.addCart(cart);\n\t\t\n\t\tint cost1 = 15;\n\t\tint cost2 = 30;\n\t\tint cost3 = 10;\n\t int cost4 = 20;\n\t\t\n\t\tItem item1 = new Item( 12345666L);\n\t\titem1.setCost(cost1);\n\t\tItem item2 = new Item(12345667L);\n\t\titem2.setCost(cost2);\n\t\tItem item3 = new Item(12345668L);\n\t\titem3.setCost(cost3);\n\t\tItem item4 = new Item(12345669L);\n\t\titem4.setCost(cost4);\n\t\t\n\t\tcart.addItem(item1);\n\t\tcart.addItem(item2);\n\t\tcart.addItem(item3);\n\t\tcart.addItem(item4);\n\t\t\n\t\t\n\t\tint total = cart.getTotal();\n\t\t\n\t\tint actual = cost1 + cost2 + cost3 + cost4 ;\n\t\t\n\t\tif(total==actual){\n\t\tSystem.out.println(\"getTotal is correct\");\n\t\tSystem.out.println(\"item 1 is \" + cost1 + \"item 2 is \"+cost2 + \"item 3 is \" + cost3 + \"item 4 is \"+ cost4);\n\t\tSystem.out.println(\"Total is \" + total);\n\t\t}else{\n\t\tSystem.out.println(\"getTotal is wrong\");\n\t\tSystem.out.println(\"expected \" + actual);\t\n\t\tSystem.out.println(\"returned \" + total);\t\n\t\t}\n\t\t\n\t\tSystem.out.println(\"removing an item from cart \");\n\t\t\n\t\tcart.removeItem(item4);\n\t\tint newActual = cost1 + cost2 + cost3;\n\t\tint newTotal = cart.getTotal();\n\t\tif(total==actual){\n\t\t\tSystem.out.println(\"getTotal is correct\");\n\t\t\tSystem.out.println(\"item 1 is \" + cost1 + \"item 2 is \"+cost2 + \"item 3 is \" + cost3 );\n\t\t\tSystem.out.println(\"Total is \" + newTotal);\n\t\t}else{\n\t\t\tSystem.out.println(\"getTotal is wrong\");\n\t\t\tSystem.out.println(\"expected \" + newActual);\t\n\t\t\tSystem.out.println(\"returned \" + newTotal);\t\n\t\t\t}\n\t\t\n\t\t\n\t\tbill.inputBill();\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "private int calculatePrice(boolean addWhippedCream, boolean addChocolate) {\n int basePrice=5; //price of one cup of coffee\n if(addWhippedCream) //add $1 if user wants whipped cream\n basePrice+=1;\n if(addChocolate) //add $2 if user wants whipped cream\n basePrice+=2;\n\n return quantity * basePrice;\n }", "@Override\n public double calculatePrice() {\n return getVolume() * (1.0 + (getAlcoholPercent() / 100.0)) * this.liquids.size();\n }", "public double calculatePrice(Model model)\n\t{\n\t\t//sum each of the price components price value\n\t\tString finalprice = \"\";\n\t\tdouble pc_price = -1, lower_limit = -1, upper_limit = -1, function_price = -1,finalvalue=0;\n\t\tfor(PriceComponent pc : this.priceComponents)\n\t\t{\n\t\t\tpc_price = -1; lower_limit = -1; upper_limit = -1;function_price = -1;\n\t\t\t//get the variables and define their value\n\t\t\tif(pc.getPriceFunction() != null)\n\t\t\t{\n\t\t\t\tif (pc.getPriceFunction().getSPARQLFunction() != null) {\n\t\t\t\t\tcom.hp.hpl.jena.query.Query q = ARQFactory.get().createQuery(pc.getPriceFunction().getSPARQLFunction());\n\t\t\t\t\tQueryExecution qexecc = ARQFactory.get().createQueryExecution(q, model);\t\n\t\t\t\t\t\n\t\t\t\t\tResultSet rsc = qexecc.execSelect();\n//\t\t\t\t\tSystem.out.println(q.toString());\n\t\t\t\t\tfunction_price = rsc.nextSolution().getLiteral(\"result\").getDouble();// final result is store in the ?result variable of the query\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (pc.getComponentCap() != null) {\n\t\t\t\tupper_limit = pc.getComponentCap().getValue();\n\t\t\t}\n\n\t\t\tif (pc.getComponentFloor() != null) {\n\t\t\t\tlower_limit =pc.getComponentFloor().getValue();\n\t\t\t}\n\n\t\t\tif (pc.getPrice() != null) {\n\t\t\t\tpc_price = pc.getPrice().getValue();\n\t\t\t}\n\t\t\t\n\t\t\tif(function_price >=0)\n\t\t\t{\n\t\t\t\tif(function_price > upper_limit && upper_limit >= 0)\n\t\t\t\t\tfunction_price = upper_limit;\n\t\t\t\telse if(function_price < lower_limit && lower_limit >=0)\n\t\t\t\t\tfunction_price = lower_limit;\n\t\t\t}\n\t\t\t\n\t\t\tif(pc_price >= 0)\n\t\t\t{\n\t\t\t\tif(pc_price > upper_limit && upper_limit >=0)\n\t\t\t\t\tpc_price = upper_limit;\n\t\t\t\telse if(pc_price < lower_limit && lower_limit >= 0)\n\t\t\t\t\tpc_price = lower_limit;\n\t\t\t}\n\t\t\t\n\t\t\tif(pc.getPrice() != null && pc.getPriceFunction() != null)\n\t\t\t\tSystem.out.println(\"Dynamic and static price? offer->\"+this.name+\",pc->\"+pc.getName() + \"price ->\"+pc_price);//throw expection?\n\t\t\t\n\t\t\t\n\t\t\tif(pc.isDeduction())\n\t\t\t{\n\t\t\t\tif(function_price >= 0)\n\t\t\t\t{\n\t\t\t\t\tfinalprice = finalprice+\" - \" +function_price;\n\t\t\t\t\tfinalvalue-=function_price;\n\t\t\t\t}\n\t\t\t\tif(pc_price >= 0)\n\t\t\t\t{\n\t\t\t\t\tfinalprice = finalprice+\" - \" +pc_price;\n\t\t\t\t\tfinalvalue-=pc_price;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(function_price >= 0)\n\t\t\t\t{\n\t\t\t\t\tfinalprice = finalprice+\" + \" +function_price;\n\t\t\t\t\tfinalvalue+=function_price;\n\t\t\t\t}\n\t\t\t\tif(pc_price >= 0)\n\t\t\t\t{\n\t\t\t\t\tfinalprice = finalprice+\" + \" +pc_price;\n\t\t\t\t\tfinalvalue+=pc_price;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//conditions to verify that the final price is inside the interval defined by the lower and upper limit, in case these exist\n\t\tif(this.getPriceCap() != null)\n\t\t{\n\t\t\tif(this.getPriceCap().getValue() >= 0 && finalvalue < this.getPriceCap().getValue())\n\t\t\t\tfinalvalue = this.getPriceCap().getValue();\n\t\t}\n\t\tif(this.getPriceFloor() != null)\n\t\t{\n\t\t\tif(this.getPriceFloor().getValue() >= 0 && finalvalue > this.getPriceFloor().getValue())\n\t\t\t\tfinalvalue = this.getPriceFloor().getValue();\n\t\t}\n\t\t\t\t\n\t\treturn finalvalue;\n\t}", "private static double checkOut() {\n double discount = 0;\n System.out.print(\"Do you have any coupon code (y/n): \");\n String response = sc.nextLine();\n if (!response.equals(\"y\") && !response.equals(\"n\")) {\n System.out.println(\"Invalid input\");\n checkOut();\n return 0;\n } else {\n if (response.equals(\"y\")) discount = getDiscount();\n }\n double total = printBill(discount);\n double cash = 0;\n while (true) {\n System.out.print(\"Cash: \");\n String input = sc.nextLine();\n if (input.charAt(0) < 48 || input.charAt(0) > 57) {\n System.out.println(\"Invalid input\");\n continue;\n }\n cash = Double.parseDouble(input);\n if (cash < total) {\n System.out.println(\"IS THAT JOKE? HAHAHA\");\n System.out.printf(\"You have to pay at least %.2f Baht%n\", total);\n } else {\n System.out.printf(\"%47s: %8.2f Baht%n\", \"Cash\", cash);\n System.out.printf(\"%47s: %8.2f Baht%n\", \"Change\", cash - total);\n break;\n }\n }\n return total;\n }", "public static void setupShop()\r\n\t{\r\n\t\tScanner input = new Scanner (System.in);\r\n\t\tSystem.out.print(\"Please enter the number of items: \");\r\n\t\tanswer = input.nextInt();\r\n\t\tamount = new int [answer];\r\n\t\tproducts = new String [answer];\r\n\t\tprices = new double [answer];\r\n\r\n\t\tfor(int i = 0; i < amount.length; i++)\r\n\t\t{\r\n\t\t\tSystem.out.print(\"Enter name of product \" + i + \": \");\r\n\t\t\tproducts[i] = input.next();\r\n\t\t\tSystem.out.print(\"Enter price of product \" + i + \": \");\r\n\t\t\tprices[i] = input.nextDouble();\r\n\t\t}\r\n\t\tSystem.out.print(\"Please enter the amount to qualify for discount: \");\r\n\t\tdiscount = input.nextDouble();\r\n\r\n\t\tSystem.out.print(\"Please enter the discount rate (0.1 for 10%): \");\r\n\t\tdiscountRate = input.nextDouble();\r\n\t}", "public static void main(String[] args) {\n\t\tScanner reader=new Scanner(System.in);\n\t\tSystem.out.println(\"please enter what type of ticket buying? :\");\n\t\tString typeticket=reader.nextLine();\n\t System.out.println(typeticket);\n\t int totPrice=0;\n\t System.out.println(typeticket.toLowerCase());\n if(typeticket.toLowerCase().equals(\"silver\"))\n {\n \ttotPrice=2*150;\n \tSystem.out.println(typeticket +\" Price for 2 is :\"+totPrice);\n }\n else if(typeticket.toLowerCase().equals(\"golden\"))\n {\n \ttotPrice=2*200;\n \tSystem.out.println(typeticket +\" Price for 2 is :\"+totPrice);\n }\n \n \n\t}", "public static void main(String[] args) {\r\n Scanner keyboard = new Scanner(System.in);\r\n f_menu();\r\n\r\n int total[] = f_drink(),pay;\r\n\r\n System.out.println(\"Deposit the value of the Drink (Minimum:\" + total[0] + \"):\");\r\n pay = keyboard.nextInt();\r\n\r\n while (pay < 50 || pay > 5000){\r\n System.err.println(\"ERROR, The pay must be between 50 and 5000. Retry:\");\r\n pay = keyboard.nextInt();\r\n }\r\n\r\n while (pay < total[0]){\r\n System.err.println( (total[0]-pay) + \"$ missing (the drink costs \" + total[0] + \")\\nDeposit the missing money:\");\r\n pay += keyboard.nextInt();\r\n }\r\n\r\n if (pay > total[0]){\r\n System.out.println(\"Take your residue : (\" + (pay-total[0]) + \"$)\");\r\n }\r\n\r\n System.out.println(\"Wait \" + total[1] + \" seconds, Enjoy your drink!\");\r\n\r\n\r\n }", "public static void main (String[] args) {\n\t\t\n\t\t\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\n\t\tSystem.out.println(\"how many items do you have?\");\n\t\tint itemsCount=scan.nextInt();\n\t\tString allItems=\"\";\n\t\tdouble totalPrice=0;\n\t\t\n\t\tfor(int i=1; i<=itemsCount; i++) {\t\n\t\t\t\t System.out.println(\"what is the item\");\n\t\t\t\t String item = scan.next();\n\t\t\t\t \n\t\t\t\t System.out.println(\"how much is it \"+\"?\");\n\t\t\t\t double price=scan.nextDouble();\n\t\t\t\t \n\t\t\t\t if (i==itemsCount) {\n\t\t\t\t\t allItems=allItems+ item;\n\t\t\t\t }else {\n\t\t\t\t\t allItems=allItems+ item+\",\";\n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t \n totalPrice+=price;\n\t\t}\n\t\tSystem.out.println(\"your items: \"+allItems);\n\t\t System.out.println(\"toatal price:$ \"+totalPrice);\n\t\t \n\t\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "@Test\n public void amountGreatherThanItemsPrice() {\n Coupon coupon = couponService.calculateCoupon(Arrays.asList(MLA1),PRICE_MLA1+PRICE_MLA2);\n assertEquals(1, coupon.itemsIds().size());\n assertEquals(MLA1, coupon.itemsIds().get(0));\n assertEquals(PRICE_MLA1, coupon.total());\n }", "public static void setPrice() {\n double summe = 0.0;\n for (Object obj : dlm.getDisplayedArtikel()) {\n if (obj instanceof Article) {\n Article art = (Article) obj;\n if (!art.isIsAbfrage()) {\n if (((art.isJugendSchutz() && art.isJugendSchutzOk())) || !art.isJugendSchutz()) {\n if (art.isEloadingAmmountOk() && !art.isPriceZero()) {\n summe += ((Article) ((obj))).getPreis() * ((Article) ((obj))).getAmount();\n }\n }\n }\n } else if (obj instanceof Karte) {\n Karte card = (Karte) obj;\n summe += card.getAufladung() / 100;\n }\n }\n for (Object obj : dlm.getRemovedObjects()) {\n if (obj instanceof Article) {\n if (!((Article) ((obj))).isStorno_error()) {\n summe -= ((Article) ((obj))).getPreis() * ((Article) ((obj))).getAmount();\n }\n } else if (obj instanceof Karte) {\n Karte card = (Karte) obj;\n summe -= card.getAufladung() / 100;\n }\n }\n if (Math.round(summe) == 0) {\n summe = 0;\n }\n if (GUIOperations.isTraining()) {\n summe += 1000;\n }\n tfSumme.setText(String.format(\"%.2f\", summe));\n }", "static float addDiscount(float originalPrice, String discountName, float discountPercentage) {\n float discountedPrice = originalPrice * (1 - discountPercentage);\n float discount = discountedPrice - originalPrice;\n printEntry(discountName, discount);\n return discountedPrice;\n }", "public static double computeDiscountInfo(double price, double discountRate)\n\t {\n\t\t double savings;\n\t\t savings = price * discountRate / 100;\n\t\t return savings;\n\t }", "public static void main(String[] args) {\n\t\t// create a Scanner for user input\n\t\tScanner input = new Scanner(System.in);\n\t\t//sets the variables for the labour and energy cost\n\t\tfinal double labour = 0.75;\n\t\tfinal double POWER_COST = 0.99;\n\t\tfinal double SIZE_COST = 0.50;\n\t\t//Prompt the user for what size of pizza they want \n\t\tSystem.out.println(\"What is the size of the pizza (in cm):\");\n\t\t//gets the size of pizza from user \n\t\tint pizzaSize = input.nextInt();\n\t\t//calculates the subtotal of the pizza\n\t\tdouble subtotal = pizzaSize * SIZE_COST + labour + POWER_COST;\n\t\t//outputs the message to the user about their subtotal\n\t\tSystem.out.println(\"Subtotal: $\" + subtotal);\n\t\t//calculates the tax \n\t\tdouble tax = subtotal * 0.13;\n\t\t//outputs the taxes to the user\n\t\tSystem.out.println(\"Taxes: $\" + tax);\n\t\t//calculates the total of the user\n\t\tdouble total = subtotal + tax;\n\t\t//outputs the total to the user\n\t\tSystem.out.println(\"Total: $\" + total);\n\t\t//according to the size of the pizza it outputs a specific message \n\t\tif (pizzaSize <= 20 && pizzaSize >= 1){\n\t\t\t//outputs this message if the pizza size is between 1 and 20cm\n\t\t\tSystem.out.println(\"We are going to make you a cute little pizza!\");\n\t\t\t} else if (pizzaSize <= 40 && pizzaSize > 20) {\n\t\t\t//outputs this message if the pizza size is between 40 and 20cm\n\t\t\tSystem.out.println(\"This will be delicious!\");\n\t\t\t} else if (pizzaSize > 40) {\n\t\t\t//outputs this message if the pizza sice is greater than 40\n\t\t\tSystem.out.println(\"Whoa, big pizza! You might need a truck to get this home!\");\n\t\t\t} else {\n\t\t\t//outputs this message if value is in negative or 0\n\t\t\tSystem.out.println(\"Invalid values entered please try again\");\n\t\t\t\t}\n\t}", "double applyTax(double price);", "@Test\n\tpublic void test_PNL_2Deals_Buy_Sell_R(){\n\t\tpa.addTransaction(new Trade(new Date(), new Date(), \"\", 0.10, AAPL, 10.0, 10.0));\n\t\tpa.addTransaction(new Trade(new Date(), new Date(), \"\", 0.10, AAPL, 15.0, -10.0));\n\t\tassertEquals( \"50.00\", nf.format(new PNLImpl(pa, AAPL).getPNLRealized(false)) );\n\t}", "@Override\n\tpublic double getDiscountedPrice (double price) {\n\t\treturn price - 5;\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tdouble check,servicefee;\n\t\tcheck=40;\n\t\tservicefee=1000;\n\t\t\n\t\tif (check<20 && check>=0) {\n\t\t\tservicefee=10+(0.1*check);\n\t\t}else if(check>=20 && check<40) {\n\t\t\tservicefee=10+(0.08*check);\n\t\t}else if(check>=40 && check<60) {\n\t\t\tservicefee=10+(0.06*check);\n\t\t}else if(check>=60) {\n\t\t\tservicefee=10+(0.04*check);\n\t\t}else {\n\t\t\tSystem.out.println(\"Invalid Operator\");\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(\"You use \" + check + \" check\\nYour monthly service fee is $\" + servicefee);\n\t\t\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\n int catmeal=50;\n int cat=3;\n double eat=0.5;\n int sum=0;\n for(int i = 50; i>3 ;i++){\n double total=cat*eat;\n double days=catmeal/total;\n System.out.println(\"they eating is \" + days);\n break;\n }\n\n\n// Scanner input=new Scanner(System.in);\n// System.out.println(\"please enter number of 50 kg meal bag \");\n// double bag=input.nextDouble();\n// double total=bag*50;\n// System.out.println((int)(total/1.5) + \"days you can feed them \");\n//\n//\n\n\n\n\n }", "private int calculatePrice(boolean hasWhipped, boolean hasChocolate){\n return quantity * (5 + (hasWhipped ? 1 : 0) + (hasChocolate ? 2 : 0));\n }", "public double calculateCost(Purchase purchase);" ]
[ "0.78039134", "0.76402926", "0.75033826", "0.74267673", "0.7198299", "0.7102342", "0.7040571", "0.6867977", "0.68417203", "0.6838868", "0.68324596", "0.682381", "0.67766243", "0.67671025", "0.67653835", "0.6672029", "0.665972", "0.6638873", "0.6637893", "0.6628855", "0.66219515", "0.65997237", "0.65785974", "0.6516823", "0.64941436", "0.6460107", "0.64225525", "0.6404895", "0.6402286", "0.6382122", "0.6364763", "0.63352644", "0.6332065", "0.6320096", "0.6296754", "0.6293779", "0.6281741", "0.6262585", "0.621684", "0.6159692", "0.61442447", "0.6136948", "0.61343855", "0.610721", "0.61044484", "0.61043346", "0.60974973", "0.6097021", "0.60967344", "0.6089845", "0.60887516", "0.608057", "0.60774374", "0.60766464", "0.6068886", "0.60656404", "0.60640603", "0.6058932", "0.6057067", "0.60475194", "0.6046983", "0.6045572", "0.6041073", "0.60325813", "0.60293496", "0.60198605", "0.6005965", "0.60036886", "0.59964645", "0.5990866", "0.5987555", "0.5985918", "0.59674585", "0.5966997", "0.596028", "0.595181", "0.59382826", "0.5929598", "0.592757", "0.5924517", "0.59198356", "0.5918822", "0.5918033", "0.59148955", "0.5904979", "0.5903839", "0.58959526", "0.58938813", "0.58914703", "0.5888012", "0.5886374", "0.58833253", "0.5881686", "0.5874366", "0.5866986", "0.5860581", "0.5854331", "0.58493406", "0.5834333", "0.58292884" ]
0.75388867
2
turns a Location in to a string containing the coordinates of the Location
public static String LocationToString(Location location){ StringBuilder sb = new StringBuilder(); sb.append("( ").append(location.getBlockX()).append(", ").append(location.getBlockY()).append(", ").append(location.getBlockZ()).append(" )"); return sb.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getLocationString(){\n return \"(\" + x + \", \" + y + \")\";\n }", "public String getLocationString() {\r\n\t\treturn \"Location = (\" + Math.round(getLocationX() * 10) / 10.0 + \", \" + Math.round(getLocationY() * 10) / 10.0 + \")\";\r\n\t}", "public String coordToAddress(Coord loc);", "static public String toString(WorldLocation loc)\r\n {\r\n String res = toStringLat(loc.getLat(), true) + \" \" + toStringLong(loc.getLong(), true);\r\n\r\n return res;\r\n }", "public String getLocation() {\n\t\treturn \"-12.9990189,-38.5140298\";\n\t}", "public static String locationToString(Location location) {\n\n return location.getWorld().getName() + \",\" + location.getX() + \",\" + location.getY() + \",\" + location.getZ() + \",\" + location.getYaw() + \",\" + location.getPitch();\n\n }", "String getLocation();", "String getLocation();", "String getLocation();", "java.lang.String getLocation();", "public String getCoordinatesAsString() {\r\n return String.format(\"%s, %s, %s, %s\\n\", p1, p2, p3, p4);\r\n }", "@Override\r\n public String toString() {\r\n return \"Location:: xPos: \" + xPos + \" yPos: \" + yPos + \"\\nBoundingBox: \" + boundingBox;\r\n }", "private String locateToUsFormat(Location location) {\n\t\t\n\t\tString latitudeString = Location.convert(location.getLatitude(), Location.FORMAT_DEGREES);\n\t\tString longitudeString = Location.convert(location.getLongitude(), Location.FORMAT_DEGREES);\n\t\treturn latitudeString.replace(',', '.') + \",\" + longitudeString.replace(',', '.');\n\t}", "public String locationToString(Location loc) {\n return loc.getWorld().getName() + \"|\" + loc.getBlockX() + \"|\" + loc.getBlockY() + \"|\" + loc.getBlockZ();\n }", "public String getLocationString() {\n return getCenter().toString();\n }", "public String toString() {\n\t\treturn String.format(\"%-28s%-16f%-17f\", city,location.getLat(),location.getLng());\n\t}", "private String getLocationForPrint(double latitude, double longitude) {\n int latDegree = (new Double(Math.floor(latitude))).intValue();\n int longDegree = (new Double(Math.floor(longitude))).intValue();\n String latEnd = getString(R.string.latitude_south);\n String longEnd = getString(R.string.longitude_west);\n if (latDegree > 0) {\n latEnd = getString(R.string.latitude_north);\n\n }\n if (longDegree > 0) {\n longEnd = getString(R.string.longitude_east);\n }\n double latSecond = (latitude - latDegree) * 100;\n double latMinDouble = (latSecond * 3d / 5d);\n int latMinute = new Double(Math.floor(latMinDouble)).intValue();\n\n double longSecond = (longitude - longDegree) * 100;\n double longMinDouble = (longSecond * 3d / 5d);\n int longMinute = new Double(Math.floor(longMinDouble)).intValue();\n// return String.format(getString(R.string.geo_location_info), latDegree,\n// latMinute, latEnd, longDegree, longMinute, longEnd);\n return getString(R.string.geo_location_info);\n\n }", "@Override\r\n\tpublic String toString() {\r\n\t\treturn getLocation();\r\n\t}", "public String toString()\n\t{\n\t\treturn Double.toString(latitude)+\", \"+Double.toString(longitude);\n\t}", "String location();", "String location();", "String location();", "String location();", "String location();", "String location();", "String location();", "String location();", "public String getSpawnLocationString(){\n\t\tStringBuilder sb = new StringBuilder();\n\t\tList<Location> locs = getSpawns();\n\t\tfor (int i=0;i<locs.size(); i++ ){\n\t\t\tif (locs.get(i) != null) sb.append(\"[\").append(i + 1).append(\":\").\n append(Util.getLocString(locs.get(i))).append(\"] \");\n\t\t}\n\t\treturn sb.toString();\n\t}", "private String format(ArrayList<Location> locs) {\n String res = \"\";\n for (Location loc : locs) {\n res += loc.getLatitude() + \"-\" + loc.getLongitude() + \";\";\n }\n return res;\n }", "@Override\n public String toString() {\n if (isValid()) {\n return String.format(\n Locale.US,\n \"%+02f%+02f%s/\",\n coordinates.get(1), coordinates.get(0), coordinateSystem.toString());\n }\n return \"\";\n }", "public String toString() {\n\t\t\n\t\treturn (\"(\" + getX() + \", \" + getY() + \")\");\t\t\t// Returns a string representing the Coordinate object\n\t}", "public String gpsString() {\n return \"(\" + gps.getLatitude() + \",\" + gps.getLongitude() + \")\";\n }", "public Coordinate getLocation();", "public String formatLocation(Location location) {\n if (location == null) {\n return \" \";\n }\n return String.format(\"Coordinates: lat = %1$.4f, lon = %2$.4f, time = %3$tF %3$tT\",\n location.getLatitude(), location.getLongitude(), new Date(location.getTime()));\n }", "@Override\r\n\tpublic String getFormatedCoordinates() {\n\t\treturn \"Drone position: (\"+x+\",\"+y+\",\"+z+\")\";\r\n\t}", "public String getGVCoordsForPosition() {\n return \"\\\"\" + coords[0] + \",\" + coords[1] + \"!\\\"\";\n }", "public String toString(){\n if(trackLat != null && trackLon != null)\n return (trackNumber+\"; lat=\" + trackLat.getValue() + \";lon=\" + trackLon.getValue());\n else\n return (trackNumber+\" No location detail\");\n }", "public Coord addressToCoord(String localisation);", "public String toString() {\n checkRep();\n return \"(latitude,longitude)=(\" + this.latitude + \",\" + this.longitude + \") \\n\";\n\n }", "Location getLocation();", "Location getLocation();", "Location getLocation();", "Location getLocation();", "synchronized String getLocString() {\n String MSG_TERMINATOR = \";\";\n String DATA_SEPARATOR = \",\";\n\n if (loc == null) {\n return System.currentTimeMillis() + DATA_SEPARATOR + \"No Location!\" + MSG_TERMINATOR;\n }\n\n return String.valueOf(System.currentTimeMillis()) +\n DATA_SEPARATOR +\n loc.getLongitude() +\n DATA_SEPARATOR +\n loc.getLatitude() +\n DATA_SEPARATOR +\n loc.getAltitude() +\n DATA_SEPARATOR +\n loc.getSpeed() +\n DATA_SEPARATOR +\n loc.getBearing() +\n DATA_SEPARATOR +\n loc.getAccuracy() +\n DATA_SEPARATOR +\n loc.getTime() +\n DATA_SEPARATOR +\n providerEnabled.toString() +\n DATA_SEPARATOR +\n lastTemp +\n DATA_SEPARATOR +\n lastGravity +\n DATA_SEPARATOR +\n lastPressure +\n MSG_TERMINATOR;\n }", "@Override\n public CharSequence convertToString(Cursor cursor) {\n int j = cursor.getColumnIndex(\"LONGITUDE\");\n return cursor.getString(j);\n }", "private static String printInfo(GeoLocation object) {\n\t\treturn(object.toString());\n\t}", "private String requestInfo(Location location) {\n return \"location(lat \" + location.getLat() + \", lon \" + location.getLat() + \") \";\n }", "public java.lang.String getLocation() {\n java.lang.Object ref = location_;\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 location_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "@Override\n public String toString() {\n String s = shipName + \" located at\";\n\n for (Point p : shipLocation) {\n s += \" (\" + (p.x + 1) + \",\" + (p.y + 1) + \")\";\n }\n\n return s;\n }", "@Override\n public String toString() {\n double longDeg = Math.toDegrees(this.longitude);\n double latDeg = Math.toDegrees(this.latitude);\n Locale l = null;\n String s = String.format(l, \"(%.4f,%.4f)\", longDeg, latDeg);\n return s;\n }", "public static String formatCoord(double coordinate, int outputType)\n\t{\n\n\t\tStringBuilder sb = new StringBuilder();\n\t\tchar endChar = DEGREE_CHAR;\n\n\t\tDecimalFormat df = new DecimalFormat(\"###.######\");\n\t\tif (outputType == Location.FORMAT_MINUTES\n\t\t\t\t|| outputType == Location.FORMAT_SECONDS)\n\t\t{\n\n\t\t\tdf = new DecimalFormat(\"##.###\");\n\n\t\t\tint degrees = (int) Math.floor(coordinate);\n\t\t\tsb.append(degrees);\n\t\t\tsb.append(DEGREE_CHAR); // degrees sign\n\t\t\tendChar = '\\''; // minutes sign\n\t\t\tcoordinate -= degrees;\n\t\t\tcoordinate *= 60.0;\n\n\t\t\tif (outputType == Location.FORMAT_SECONDS)\n\t\t\t{\n\n\t\t\t\tdf = new DecimalFormat(\"##.##\");\n\n\t\t\t\tint minutes = (int) Math.floor(coordinate);\n\t\t\t\tsb.append(minutes);\n\t\t\t\tsb.append('\\''); // minutes sign\n\t\t\t\tendChar = '\\\"'; // seconds sign\n\t\t\t\tcoordinate -= minutes;\n\t\t\t\tcoordinate *= 60.0;\n\t\t\t}\n\t\t}\n\n\t\tsb.append(df.format(coordinate));\n\t\tsb.append(endChar);\n\n\t\treturn sb.toString();\n\t}", "@AutoEscape\n\tpublic String getLocation();", "private String coords(int x, int y) {\n return String.format(\"%d,%d\", x, y);\n }", "@Override\n public String toString()\n {\n return id + \"*\" + name + \"|\" + lat + \"&\"+lon + \"\\n\";\n }", "public String getPrettyCoordinates() {\n\t\treturn coordinateTools.localToPrettyCoordinates(this);\n\t}", "public static String convertPointToSector(Double lat, Double lon){\n if(lat > maxLat || lon > maxLon || lat < minLat || lon < minLon){\n return \"Coordinate non valide!\";\n }\n\n double number_lat = ((lat - minLat)/1.3);\n int integer_lat = (int)number_lat;\n double number_lon = ((lon - minLon)/1.075);\n int integer_lon = (int)number_lon+1;\n\n\n\n String id_lat = latID[integer_lat];\n\n String id_lon = Integer.toString(integer_lon);\n\n return id_lat+id_lon;\n\n }", "public String getCoordinates() {\n return this.coordinates;\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"Coord[\" + this.x0 + \",\" + this.y0 + \"]\";\n\t}", "public java.lang.String getLocation() {\n java.lang.Object ref = location_;\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 location_ = s;\n return s;\n }\n }", "String getLocationLabel();", "public String toString() {\n\t\treturn \"[Location] Operator: \" + this.operator + \" Longitude: \" + this.longitude +\n\t\t\t \" Latitude: \" + this.latitude;\n\t}", "public String toString() {\n\t\tString blawk = \"X: \" + getLocation().getX() + \", Y: \" + getLocation().getY() + \", Id: \" + getId();\n\t\treturn blawk;\n\t}", "public static String getLatLng(LatLng currentLocation, int color) {\n // If the location is valid\n if (currentLocation != null) {\n return \"@long\" +\n String.valueOf(currentLocation.longitude) +\n \"gnol@\" +\n \"@lat\" +\n String.valueOf(currentLocation.latitude) +\n \"tal@\" +\n \"#\" + color + \"#\";\n } else {\n // Otherwise, return the empty string\n return EMPTY_STRING;\n }\n }", "private String getCompleteAddressString(double LATITUDE, double LONGITUDE) {\n String strAdd = \"\";\n Geocoder geocoder = new Geocoder(getActivity(), Locale.getDefault());\n try {\n List<Address> addresses = geocoder.getFromLocation(LATITUDE, LONGITUDE, 1);\n if (addresses != null) {\n Address returnedAddress = addresses.get(0);\n StringBuilder strReturnedAddress = new StringBuilder(\"\");\n\n for (int i = 0; i <= returnedAddress.getMaxAddressLineIndex(); i++) {\n strReturnedAddress.append(returnedAddress.getAddressLine(i)).append(\"\\n\");\n }\n strAdd = strReturnedAddress.toString();\n } else {\n Log.e(\"Current loction address\", \"No Address returned!\");\n }\n } catch (Exception e) {\n e.printStackTrace();\n Log.e(\"Current loction address\", \"Canont get Address!\");\n }\n return strAdd;\n }", "@Override\n\tpublic void getCoordinates() {\n\t\tSystem.out.println(\"Your Coordinates: 18.1124° N, 79.0193° E \");\n\t}", "public void displayCoordsInDegrees() {\n DecimalFormat formatter = new DecimalFormat(\"0.000\");\n\n String latFormat = formatter.format(posMarker.getPosition().latitude);\n String lonFormat = formatter.format(posMarker.getPosition().longitude);\n\n TextView latitude = (TextView) findViewById(R.id.image_latitude);\n TextView longitude = (TextView) findViewById(R.id.image_longitude);\n\n latitude.setText(latFormat); //Use posMarker location as field actually reflects marker position\n longitude.setText(lonFormat); //Use posMarker location as field actually reflects marker position\n }", "public static String getLatLng(Context context, Location currentLocation) {\n // If the location is valid\n if (currentLocation != null) {\n\n // Return the latitude and longitude as strings\n return context.getString(\n R.string.latitude_longitude,\n currentLocation.getLatitude(),\n currentLocation.getLongitude());\n } else {\n\n // Otherwise, return the empty string\n return EMPTY_STRING;\n }\n }", "private String getDestCoordinate(Float coord) {\r\n if (coord != null) {\r\n return String.valueOf(coord);\r\n } else {\r\n return \"\";\r\n }\r\n }", "public String toString() {\n\t\treturn position\n\t\t\t+ \" between \"\n\t\t\t+ worldOrigin\n\t\t\t+ \" and \"\n\t\t\t+ worldEnd;\n\t}", "@Override\n\tpublic void onLocationChanged(Location location) {\n\t\tlatitude = String.valueOf(location.getLatitude());\n\t\tlongitude = String.valueOf(location.getLongitude());\n\t}", "public java.lang.String getLocation() {\n return location;\n }", "public static String convertCoordinatesArrayToString(ArrayList<LatLng> coordsArray){\n String result = \"\";\n LatLng coord;\n for (int i=0; i < coordsArray.size(); i+=1) {\n coord = coordsArray.get(i);\n result += coord.latitude + \",\";\n result += coord.longitude;\n if (i+1 < coordsArray.size()){\n result += \",\";\n }\n }\n return result;\n }", "@AutoEscape\n\tpublic String getLatitud();", "public String getLocation(){\r\n return location;\r\n }", "public String toString() {\n //arena info\n String locations = \"The arena is \" + xSize + \" x \" + ySize;\n //pieces info\n for (Pieces d : drones) {\n locations += \"\\n\";\n locations += d.toString();\n }\n\n return locations;\n }", "public java.lang.String getLocation() {\n return location;\n }", "public String getCoordsForLP() {\n String x = coords[0] < 0 ? \"neg\" + Math.abs(coords[0]) :\n Integer.toString(Math.abs(coords[0]));\n String y = coords[1] < 0 ? \"neg\" + Math.abs(coords[1]) :\n Integer.toString(Math.abs(coords[1]));\n return x + \"_\" + y;\n }", "public String toString() { \r\n\t\tString str = \"&markers=color:\" + color + \"%7Clabel:\" + label + \"%7C\" + latitude + \",\" + longitude;\r\n\t\t\r\n\t\treturn str;\r\n\t\t\r\n\t}", "public String toString() {\n\t return \"(\" + this.x + \",\" + this.y + \")\";\n\t }", "public String getCoordinates(String address){\n\t\ttry\n {\n String thisLine;\n String address1 = address;\n address1 = address1.replace(' ', '+');\n address1 = address1.replace(',', '+');\n System.out.println(\"address: \"+address1);\n URL u = new URL(\"http://maps.google.com/maps/geo?q=\\'\" + address1 + \"\\'&output=xml&key=AIzaSyDA6y535k8_IQu-3XLpVn865SiEkBLSQ74\");\n \n BufferedReader theHTML = new BufferedReader(new InputStreamReader(u.openStream()));\n \n FileWriter fstream = new FileWriter(\"url.xml\");\n BufferedWriter out = new BufferedWriter(fstream);\n while ((thisLine = theHTML.readLine()) != null)\n out.write(thisLine);\n out.close();\n File file = new File(\"url.xml\");\n DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n DocumentBuilder db = dbf.newDocumentBuilder();\n Document doc = db.parse(file);\n doc.getDocumentElement().normalize();\n NodeList nl = doc.getElementsByTagName(\"code\");\n Element n = (Element)nl.item(0);\n String st = n.getFirstChild().getNodeValue();\n \n if (st.equals(\"200\"))\n {\n NodeList n2 = doc.getElementsByTagName(\"coordinates\");\n Element nn = (Element)n2.item(0);\n String st1 = nn.getFirstChild().getNodeValue();\n \n return st1;\n }\n else\n {\n \treturn null;\n }\n }\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(\"Exception Occured\");\n return null;\n }\n\t}", "@NotNull\n public static final String toValue(@NotNull Coordinates coordinates) {\n Intrinsics.checkNotNullParameter(coordinates, \"$this$toValue\");\n StringBuilder sb = new StringBuilder();\n sb.append(coordinates.getLatitude());\n sb.append(',');\n sb.append(coordinates.getLongitude());\n return sb.toString();\n }", "com.google.protobuf.ByteString\n getLocationBytes();", "public void convertToLocation() {\r\n\t\tdouble longitude = Double.MIN_VALUE;\r\n\t\tdouble latitude = Double.MIN_VALUE;\r\n\r\n\t\tdistance += 0.75;\r\n\t\tsteps = meter.getSteps();\r\n\r\n\t\tDataLogger.getInstance().setCurrDistance(distance);\r\n\r\n\t\tlatitude = 0.75 * Math.cos(orientation) * 0.000009\r\n\t\t\t\t+ DataLogger.getInstance().getPrevLatitude();\r\n\t\tlongitude = 0.75 * Math.sin(orientation) * 0.0000136\r\n\t\t\t\t+ DataLogger.getInstance().getPrevLongitude();\r\n\r\n\t\tDataLogger.getInstance().addLocation(latitude, longitude,\r\n\t\t\t\tjava.lang.System.currentTimeMillis());\r\n\r\n\t\tLog.d(TAG, \"Called convertToLocation\");\r\n\t}", "public String toString() {\n\t\treturn geoCoordinate.toString() + \" | \" + name + \" | \" + description;\n\t}", "public String toString()\n {\n return id() + location().toString() + direction().toString();\n }", "@Override\n public void onLocationChanged(Location location) {\n t.append(\"\\n \" + location.getLongitude() + \"\\n\" + location.getLatitude() + \"\\n\" + location.getAccuracy() + \"\\n\" + location.getTime());\n latitude = Double.toString(location.getLatitude());\n longitude =Double.toString(location.getLongitude());\n }", "public static Location getSimpleLocation(Location location) {\n\t\tlocation.setX((double)Math.round(location.getX() * 10) / 10);\n\t\tlocation.setY((double)Math.round(location.getY() * 10) / 10);\n\t\tlocation.setZ((double)Math.round(location.getZ() * 10) / 10);\n\t\treturn location;\n\t}", "@Override\n public void onSuccess(Location location) {\n if (location != null) {\n lastLatitude = Double.toString(location.getLatitude());\n lastLongitude = Double.toString(location.getLongitude());\n //lastLocation = Double.toString(location.getLatitude()) + \",\" + Double.toString(location.getLongitude()) ;\n //String b = lastLocation;\n // Get into right format\n // Logic to handle location object\n }\n }", "public String toString(){\n return \"(\" + this.x + \",\" + this.y + \")\";\n }", "public String toString()\n {\n StringBuilder locationString = new StringBuilder();\n locationString.append(entityName).append(\" (\").append(description).append(\"):\\n\");\n for (Entity entity : entityList) {\n locationString.append(\" \").append(entity.toString()).append(\"\\n\");\n }\n return locationString.toString();\n }", "public com.google.protobuf.ByteString\n getLocationBytes() {\n java.lang.Object ref = location_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n location_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public Point getLocation();", "public String getLongitude() {\n return String.valueOf(longitude);\n }", "private void writeActualLocation(Location location)\n {\n //textLat.setText( \"Lat: \" + location.getLatitude() );\n //textLong.setText( \"Long: \" + location.getLongitude() );\n //T.t(MapsActivity.this, \"\" + \"Lat: \" + location.getLatitude() + \"\" + \"Long: \" + location.getLongitude());\n markerLocation(new LatLng(location.getLatitude(), location.getLongitude()));\n }", "IntPoint getLocation();", "public String getLocation() { return location; }", "public String getLocation() { return location; }", "@Override\n public void onLocationChanged(Location location) {\nString x=\"Latitude is--> \"+location.getLatitude();\nString y=\"Longtitude is--> \"+location.getLongitude();\n Toast.makeText(this.context,\"LATITUDE=\"+x+\" LONGTITUDE=\"+y, Toast.LENGTH_LONG).show();\n txtview.setText(x+\"\\n\"+y);\n\n }", "public String getLocation()\n {\n return location;\n }", "private String getLocationName( double lat, double lon ) {\n\t\t//\n\t // Write the location name.\n\t //\n\t try {\n\t Geocoder geo = new Geocoder(this, Locale.getDefault());\n\t List<Address> addresses = geo.getFromLocation(lat, lon, 1);\n\t if (addresses.size() > 0) {\n\t \treturn addresses.get(0).getLocality();\n\t }\n\t }\n\t catch (Exception e) {\n\t e.printStackTrace(); \n\t }\n\t\treturn \"\";\n\t}" ]
[ "0.75260305", "0.7335258", "0.73143196", "0.69749534", "0.68012786", "0.67843074", "0.67081046", "0.67081046", "0.67081046", "0.6627479", "0.65841717", "0.6579655", "0.65443504", "0.6535605", "0.6479932", "0.6442602", "0.64394", "0.6426709", "0.6392877", "0.634772", "0.634772", "0.634772", "0.634772", "0.634772", "0.634772", "0.634772", "0.634772", "0.63414603", "0.62800694", "0.6250715", "0.6229716", "0.62142056", "0.6131299", "0.6130662", "0.6098518", "0.6089388", "0.60821056", "0.6063899", "0.60627484", "0.60576165", "0.60576165", "0.60576165", "0.60576165", "0.6056856", "0.6051786", "0.6040648", "0.59615767", "0.5894985", "0.5884945", "0.58568704", "0.58392066", "0.5822577", "0.58112943", "0.5810552", "0.58099496", "0.5807204", "0.5802588", "0.57982796", "0.5781503", "0.57708055", "0.57686514", "0.5757029", "0.5755058", "0.5749969", "0.5744556", "0.57359457", "0.5729811", "0.5728575", "0.5721643", "0.57125735", "0.57103", "0.57083595", "0.57001853", "0.5693254", "0.56894815", "0.5687737", "0.56778425", "0.5667641", "0.5667354", "0.56649524", "0.56609476", "0.5660371", "0.56596476", "0.56572676", "0.56571925", "0.5654078", "0.56533825", "0.5640928", "0.5640514", "0.5635019", "0.5634683", "0.5628898", "0.5627084", "0.56258756", "0.5623914", "0.5622351", "0.5622351", "0.5618796", "0.56173646", "0.561524" ]
0.6932106
4
Gets the value of the hotelID property.
public int getHotelID() { return hotelID; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Integer getHotelId() {\r\n return hotelId;\r\n }", "public Integer getHotelId() {\n return hotelId;\n }", "public Integer getHotelId() {\n return hotelId;\n }", "public java.lang.String getHotelId() {\n java.lang.Object ref = hotelId_;\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 hotelId_ = s;\n return s;\n }\n }", "public int getHotelId() {\n return hotelId;\n }", "public java.lang.String getHotelId() {\n java.lang.Object ref = hotelId_;\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 hotelId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public Integer getIdHotel() {\r\n return idHotel;\r\n }", "public com.google.protobuf.ByteString\n getHotelIdBytes() {\n java.lang.Object ref = hotelId_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n hotelId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getHotelIdBytes() {\n java.lang.Object ref = hotelId_;\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 hotelId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "java.lang.String getHotelId();", "public String getClHotelId() {\r\n\t\treturn clHotelId;\r\n\t}", "public String getClHotelId() {\r\n return clHotelId;\r\n }", "public String getSHotelID() {\n return sHotelID;\n }", "public void setHotelId(Integer hotelId) {\r\n this.hotelId = hotelId;\r\n }", "public void setHotelId(Integer hotelId) {\n this.hotelId = hotelId;\n }", "public void setHotelId(Integer hotelId) {\n this.hotelId = hotelId;\n }", "public String getHotelcode() {\n return hotelcode;\n }", "public Integer getHotelGroupId() {\n return hotelGroupId;\n }", "public Hotel getHotel() {\n return hotel;\n }", "public Hotel getHotel() {\n return hotel;\n }", "com.google.protobuf.ByteString\n getHotelIdBytes();", "public void setHotelID(int value) {\n this.hotelID = value;\n }", "public void setHotelId(int value) {\n this.hotelId = value;\n }", "public void setIdHotel(Integer idHotel) {\r\n this.idHotel = idHotel;\r\n }", "public String getHotActivityId() {\r\n return hotActivityId;\r\n }", "public Integer getVenueID() {\n return venueID;\n }", "public String getHotelName() {\n\t\treturn this.name;\n\t}", "public String getVehID() {\r\n\t\treturn vehID;\r\n\t}", "public java.lang.String getHotelName() {\n java.lang.Object ref = hotelName_;\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 hotelName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getHotelName() {\n java.lang.Object ref = hotelName_;\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 hotelName_ = s;\n return s;\n }\n }", "public int get_booking_room_id() {\n return room_id;\n }", "public void setClHotelId(String clHotelId) {\r\n this.clHotelId = clHotelId;\r\n }", "public Builder setHotelId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n hotelId_ = value;\n onChanged();\n return this;\n }", "public java.lang.Integer getRestaurantId()\n {\n return restaurantId;\n }", "public int getId() {\n return (roomId);\n }", "public com.Hotel.model.Hotel fetchByPrimaryKey(long hotelId)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "public Long gethId() {\n return hId;\n }", "public void setHotel(Hotel hotel) {\n this.hotel = hotel;\n }", "public void setHotel(Hotel hotel) {\n this.hotel = hotel;\n }", "public Integer getRoomid() {\r\n return roomid;\r\n }", "public Integer getRoomid() {\r\n\t\treturn roomid;\r\n\t}", "public Integer getFlyerId() {\n return flyer_id;\n }", "@Override\n\tpublic HotelDetails findHotel(int id) {\n\t\treturn bookingDao.findHotel(id);\n\t}", "@Override\r\n\tpublic Hotel getById(int Id) {\n\t\tfor(Hotel Hotel : showHotelList() ) {\r\n\t\t\tif(Hotel.getHotelId()==Id)\r\n\t\t\t\t\treturn Hotel;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public Integer getWarehousingid() {\n return warehousingid;\n }", "public int getguestID(){\n return givedata.returnGuestID();\n }", "public Integer getFlyerId() {\n return flyer_id;\n }", "public String getHotelName() {\n\t\t\treturn Name;\r\n\t\t}", "@Override\n\tpublic HotelroomPo getHotelroom(int hotelID, int roomID) {\n\t\t\n\t\tString hotelroomId = String.valueOf(hotelID)\n\t\t\t\t+String.valueOf(roomID);\n\t\treturn map.get(hotelroomId);\n\t}", "public void setClHotelId(String clHotelId) {\r\n\t\tthis.clHotelId = clHotelId;\r\n\t}", "public void setSHotelID(String sHotelID) {\n this.sHotelID = sHotelID;\n }", "public int getBookingId() {\n return booking_id;\n }", "public java.lang.String getHotelAddress() {\n java.lang.Object ref = hotelAddress_;\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 hotelAddress_ = s;\n return s;\n }\n }", "public int getRoomID() {\n return roomID;\n }", "public int getBookingId() {\n return bookingId;\n }", "public int getBookingId() {\n return bookingId;\n }", "public com.google.protobuf.ByteString\n getHotelNameBytes() {\n java.lang.Object ref = hotelName_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n hotelName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public java.lang.String getHotelAddress() {\n java.lang.Object ref = hotelAddress_;\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 hotelAddress_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public com.google.protobuf.ByteString\n getHotelNameBytes() {\n java.lang.Object ref = hotelName_;\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 hotelName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public int getRoomID() {\r\n\t\treturn this.room.getID();\r\n\t}", "public String getCellIdProperty() {\r\n return getAttributeAsString(\"cellIdProperty\");\r\n }", "public Integer getRoomId() {\n return roomId;\n }", "public boolean checkHotelPresent(int hotelId);", "public String getHotelAddress() {\n\t\treturn this.address;\n\t}", "public String getHpId() {\r\n return hpId;\r\n }", "public String getFleetId() {\n return this.FleetId;\n }", "public Integer getOpportunityID() {\n return opportunityID;\n }", "public java.lang.Object getOpportunityID() {\n return opportunityID;\n }", "public String getRoomid() {\r\n\t\treturn roomid;\r\n\t}", "public Integer getRestaurantId() {\n return restaurantId;\n }", "protected int GetID() {\n\t\treturn this.JunctionID;\n\t}", "@GetMapping(value=\"/selecthotel/{id}\", produces=MediaType.APPLICATION_JSON_VALUE)\r\n\tpublic Hotel fetchRoomDetails(@PathVariable(\"id\") String hotelId){\r\n\t\tif(!hotelSer.existsById(hotelId)){\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn hotelSer.findById(hotelId).get();\r\n\t}", "public String getRoomId() {\n return roomId;\n }", "public Long getWeshopVisitId() {\n return weshopVisitId;\n }", "public long getRoomId() {\n return instance.getRoomId();\n }", "public int getRoomId() {\n return roomId;\n }", "public Integer getId() {\n return id.get();\n }", "public int getOfficeId() {\n return officeId;\n }", "public long getRoomId() {\n return roomId_;\n }", "String getRoomId();", "public int getM_ProductFreight_ID() {\n\t\tInteger ii = (Integer) get_Value(\"M_ProductFreight_ID\");\n\t\tif (ii == null)\n\t\t\treturn 0;\n\t\treturn ii.intValue();\n\t}", "public Integer getBookid() {\r\n\t\treturn bookid;\r\n\t}", "public int hentKontrollID() {\n\treturn kontrollID;\n }", "public com.google.protobuf.ByteString\n getHotelAddressBytes() {\n java.lang.Object ref = hotelAddress_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n hotelAddress_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public Integer getId() {\n return (Integer) get(\"id\");\n }", "public int getMonsterID() {\n return monsterID_;\n }", "public int getMonsterID() {\n return monsterID_;\n }", "public String getID() {\n return (id);\n }", "public com.google.protobuf.ByteString\n getHotelAddressBytes() {\n java.lang.Object ref = hotelAddress_;\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 hotelAddress_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getId()\r\n {\r\n return getAttribute(\"id\");\r\n }", "public String getId() {\n return (String)getAttributeInternal(ID);\n }", "public String getId() {\n return (String)getAttributeInternal(ID);\n }", "public int getID() {\n return(this.id);\n }", "public int getHerinneringId() {\n\t\treturn herinneringId;\n\t}", "public Integer getId() {\n return (Integer) get(0);\n }", "public Long getRoomId() {\n\t\treturn roomId;\n\t}", "long getRoomId();", "public Integer getBuildingid() {\r\n return buildingid;\r\n }", "public int getId_traveller() {\r\n return id_traveller;\r\n }", "public Long getId() {\n return this.id.get();\n }" ]
[ "0.8557519", "0.85198265", "0.85198265", "0.82148534", "0.8203375", "0.8184773", "0.7967733", "0.79244363", "0.7878159", "0.7778455", "0.7575152", "0.7434477", "0.73800135", "0.71348244", "0.7083941", "0.7083941", "0.7033906", "0.6987982", "0.68896914", "0.68896914", "0.68671274", "0.68555766", "0.6765044", "0.657374", "0.62496924", "0.62172884", "0.61773115", "0.6176421", "0.615897", "0.6138917", "0.613047", "0.6104294", "0.608601", "0.6066979", "0.6054886", "0.60439056", "0.6003801", "0.59787804", "0.59787804", "0.5966305", "0.596569", "0.59452784", "0.59393454", "0.59382474", "0.5935844", "0.5927524", "0.59271073", "0.59235215", "0.59170663", "0.59041464", "0.58894414", "0.58867854", "0.58788675", "0.5878688", "0.58670664", "0.58670664", "0.5865443", "0.58568144", "0.58557814", "0.5846061", "0.58342284", "0.583035", "0.5811897", "0.5808819", "0.5774074", "0.5772526", "0.5753447", "0.57507265", "0.57450664", "0.5742617", "0.57395405", "0.5736687", "0.5732559", "0.57314813", "0.5720478", "0.5711822", "0.56974036", "0.5684261", "0.56823224", "0.5675456", "0.5665702", "0.56630266", "0.56536627", "0.5651321", "0.5649018", "0.5639726", "0.5639726", "0.5638205", "0.5621977", "0.56181216", "0.5617796", "0.5617796", "0.5614875", "0.56140715", "0.55983675", "0.5598167", "0.55950797", "0.5593407", "0.5587175", "0.55776286" ]
0.83110017
3
Sets the value of the hotelID property.
public void setHotelID(int value) { this.hotelID = value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setHotelId(Integer hotelId) {\r\n this.hotelId = hotelId;\r\n }", "public void setHotelId(Integer hotelId) {\n this.hotelId = hotelId;\n }", "public void setHotelId(Integer hotelId) {\n this.hotelId = hotelId;\n }", "public void setHotelId(int value) {\n this.hotelId = value;\n }", "public void setIdHotel(Integer idHotel) {\r\n this.idHotel = idHotel;\r\n }", "public Builder setHotelId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n hotelId_ = value;\n onChanged();\n return this;\n }", "public void setHotel(Hotel hotel) {\n this.hotel = hotel;\n }", "public void setHotel(Hotel hotel) {\n this.hotel = hotel;\n }", "public Integer getHotelId() {\r\n return hotelId;\r\n }", "public Integer getHotelId() {\n return hotelId;\n }", "public Integer getHotelId() {\n return hotelId;\n }", "public void setSHotelID(String sHotelID) {\n this.sHotelID = sHotelID;\n }", "public void setClHotelId(String clHotelId) {\r\n this.clHotelId = clHotelId;\r\n }", "public int getHotelID() {\n return hotelID;\n }", "public int getHotelId() {\n return hotelId;\n }", "public void setClHotelId(String clHotelId) {\r\n\t\tthis.clHotelId = clHotelId;\r\n\t}", "public com.google.protobuf.ByteString\n getHotelIdBytes() {\n java.lang.Object ref = hotelId_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n hotelId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "private void setHotel(Hotel myHotel) {\n\t\tthis.myHotel = myHotel;\n\t}", "public Builder setHotelIdBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n hotelId_ = value;\n onChanged();\n return this;\n }", "public com.google.protobuf.ByteString\n getHotelIdBytes() {\n java.lang.Object ref = hotelId_;\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 hotelId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public java.lang.String getHotelId() {\n java.lang.Object ref = hotelId_;\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 hotelId_ = s;\n return s;\n }\n }", "public Integer getIdHotel() {\r\n return idHotel;\r\n }", "public java.lang.String getHotelId() {\n java.lang.Object ref = hotelId_;\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 hotelId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public void setHotelGroupId(Integer hotelGroupId) {\n this.hotelGroupId = hotelGroupId;\n }", "public String getClHotelId() {\r\n\t\treturn clHotelId;\r\n\t}", "public Builder clearHotelId() {\n \n hotelId_ = getDefaultInstance().getHotelId();\n onChanged();\n return this;\n }", "java.lang.String getHotelId();", "public String getClHotelId() {\r\n return clHotelId;\r\n }", "public maestro.payloads.FlyerFeaturedItem.Builder setFlyerId(int value) {\n validate(fields()[2], value);\n this.flyer_id = value;\n fieldSetFlags()[2] = true;\n return this;\n }", "public void setHotelcode(String hotelcode) {\n this.hotelcode = hotelcode;\n }", "public Integer getHotelGroupId() {\n return hotelGroupId;\n }", "public String getSHotelID() {\n return sHotelID;\n }", "public void setFlyerId(Integer value) {\n this.flyer_id = value;\n }", "public void setID(long id);", "public com.Hotel.model.Hotel fetchByPrimaryKey(long hotelId)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "@Override\r\n\tpublic void setId(String id) {\n\t\tmWarehouseId = id;\r\n\t}", "@PatchMapping(\"/{hotelId}\")\n public ResponseEntity<HotelResource> updateHotel(@PathVariable Long hotelId, @RequestBody Hotel hotel){\n return new ResponseEntity<>(\n hotelService.updateHotel(hotelId, hotel), HttpStatus.OK\n );\n }", "public void setIdTravel(Integer idTravel) {\r\n this.idTravel = idTravel;\r\n }", "public void setHotActivityId(String hotActivityId) {\r\n this.hotActivityId = hotActivityId == null ? null : hotActivityId.trim();\r\n }", "public void setBookingId(int value) {\n this.bookingId = value;\n }", "public void setBookingId(int value) {\n this.bookingId = value;\n }", "public void setRestaurantId(java.lang.Integer _restaurantId)\n {\n restaurantId = _restaurantId;\n }", "@Override\n public void deleteHotel(String hotelId) {\n Optional<Hotel> optionalHotel = hotelRepository.findByHotelId(hotelId);\n Hotel hotel = optionalHotel.orElseThrow(() -> {\n logger.error(\"Hotel information not found | hotelId:{}\", hotelId);\n return new BookingServiceException(\"Hotel information not found | hotelId:\" + hotelId);\n });\n if (hotel.isDeleted()) {\n logger.info(\"Hotel is inactive | hotelId:{}\", hotelId);\n throw new BookingServiceException(\"Hotel is inactive | hotelId:\" + hotelId);\n }\n hotel.setDeleted(true);\n Date lastModifiedDate = new Date();\n hotel.setLastModifiedDate(lastModifiedDate);\n hotelRepository.save(hotel);\n\n List<Room> rooms = hotel.getRooms();\n if (rooms != null && rooms.size() > 0) {\n List<Room> roomList = rooms.stream()\n .filter(room -> !room.isDeleted())\n .peek(room -> {\n room.setDeleted(true);\n room.setLastModifiedDate(lastModifiedDate);\n })\n .collect(Collectors.toList());\n roomRepository.saveAll(roomList);\n }\n logger.info(\"Deleted hotel information successfully | hotelId:{}\", hotelId);\n }", "public void setId(int newId) {\n roomId = newId;\n }", "public void setId(ID id){\r\n\t\tthis.id = id;\r\n\t}", "public com.Hotel.model.Hotel create(long hotelId);", "public void setID(int id);", "public void setId(int id_)\n\t{\n\t\tthis.id=id_;\n\t}", "public void setID(final String id)\n {\n this.id = id.substring(6, id.length());\n }", "@Override\n public void like(int hotelId) {\n }", "public void setID(int id)\r\n {\r\n\tthis.id = id;\r\n }", "public Hotel(int hotelId, String name, String address, double price, boolean pool, boolean gym, boolean bar,\n\t\t\tboolean pets, int stars, String imgPath) {\n\t\tthis.hotelId = hotelId;\n\t\tthis.name = name;\n\t\tthis.address = address;\n\t\tthis.price = price;\n\t\tthis.pool = pool;\n\t\tthis.gym = gym;\n\t\tthis.bar = bar;\n\t\tthis.pets = pets;\n\t\tthis.stars = stars;\n\t\tthis.imgPath = imgPath;\n\n\t}", "public void setId(java.lang.Integer _id)\n {\n id = _id;\n }", "public void setId(long _id)\r\n {\r\n this._id = _id;\r\n this.hashCode = Integer.MIN_VALUE;\r\n }", "public void setId(Object id) {\n this.id = id;\n }", "public void setId(Object id) {\n this.id = id;\n }", "@Override\n\tpublic void setId(int id) {\n\t\t_keHoachKiemDemNuoc.setId(id);\n\t}", "@Override\n\tpublic void setId(int id) {\n\t\tthis.ID = id;\n\t}", "public Builder setHotelName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n hotelName_ = value;\n onChanged();\n return this;\n }", "void setID(java.lang.String id);", "public void setId(int id) {\r\n\t\t_id = id;\r\n\t}", "public void setId(int id) {\n\t\tthis._id = id;\n\t}", "public void setId(int id) {\n\t\tthis._id = id;\n\t}", "public void setIdImovel(String idImovel) {\r\n this.idImovel = idImovel;\r\n }", "public void setId(int id) {\n this.id = String.valueOf(this.hashCode());\n }", "public final native void setId(int id) /*-{\n\t\tthis.id = id;\n\t}-*/;", "public void setID(int id) {\r\n\t\tID = id;\r\n\t}", "public void setID(int id) {\r\n\t\tID = id;\r\n\t}", "public void setID(int id) {\n this.id = id;\n }", "public void setId (long id)\r\n {\r\n _id = id;\r\n }", "public void setRestaurantId(Integer restaurantId) {\n this.restaurantId = restaurantId;\n }", "public void setID(Integer id) {\r\n this.id = id;\r\n }", "public void setId(String id)\n {\n data().put(_ID, id);\n }", "public maestro.payloads.FlyerFeaturedItem.Builder setId(int value) {\n validate(fields()[1], value);\n this.id = value;\n fieldSetFlags()[1] = true;\n return this;\n }", "public void setID(int id){\n this.ID = id;\n }", "public void setID(int id){\n\t\tthis.id = id;\n\t}", "public void setRoomID(byte id)\r\n\t {\r\n\t this.id = id;\r\n\t }", "public boolean checkHotelPresent(int hotelId);", "public void setId(ID id)\n {\n this.id = id;\n }", "public void setID(int id){\n this.id=id;\n }", "@Override\n\tpublic HotelDetails findHotel(int id) {\n\t\treturn bookingDao.findHotel(id);\n\t}", "public void setId (int id) {\r\n\t\tthis.id=id;\r\n\t}", "public void setId(Long id) {\n this.id.set(id);\n }", "public void setId(int id){\n\t\tthis.id = id;\n\t}", "public void setId(long id){\n\t\tthis.id = id;\n\t}", "public void setId(int id) {\r\n\t\tthis.id = id;\r\n\t}", "public void setId(int id) {\r\n\t\tthis.id = id;\r\n\t}", "public void setId(int id) {\r\n\t\tthis.id = id;\r\n\t}", "public void setId(int id) {\r\n\t\tthis.id = id;\r\n\t}", "public void setId(int id) {\r\n\t\tthis.id = id;\r\n\t}", "public void setId(int id) {\r\n\t\tthis.id = id;\r\n\t}", "public void setId(int id) {\r\n\t\tthis.id = id;\r\n\t}", "public void setId(int id) {\r\n\t\tthis.id = id;\r\n\t}", "public void setId(int id) {\r\n\t\tthis.id = id;\r\n\t}", "public void setId(int id) {\r\n\t\tthis.id = id;\r\n\t}", "public void setId(int id) {\r\n\t\tthis.id = id;\r\n\t}", "public void setId (Long id) {\r\n\t\tthis.id = id;\r\n\t\tthis.hashCode = Integer.MIN_VALUE;\r\n\t}", "public void setId(long id) {\r\n\t\tthis.id = id;\r\n\t}", "public void setId(long id) {\r\n\t\tthis.id = id;\r\n\t}", "public void setId(long id) {\r\n\t\tthis.id = id;\r\n\t}" ]
[ "0.8035081", "0.8020704", "0.8020704", "0.7763597", "0.77427745", "0.7501869", "0.7009716", "0.7009716", "0.69244397", "0.68527573", "0.68527573", "0.67992455", "0.67402685", "0.6640263", "0.66324115", "0.64944154", "0.64896834", "0.6438608", "0.6426357", "0.63657385", "0.6342498", "0.6296999", "0.62853396", "0.6214239", "0.60891", "0.6032714", "0.58822256", "0.586429", "0.58200216", "0.5732644", "0.57088125", "0.568405", "0.56506056", "0.5552071", "0.5527848", "0.55239713", "0.55200714", "0.55095947", "0.5502178", "0.54430526", "0.54430526", "0.54005575", "0.5399905", "0.5398361", "0.5386611", "0.5383368", "0.5375443", "0.53615665", "0.53595126", "0.5351222", "0.5348817", "0.5347922", "0.53406024", "0.53404576", "0.53403455", "0.53403455", "0.5340257", "0.5339369", "0.532549", "0.5317039", "0.5312104", "0.53058463", "0.53058463", "0.53024733", "0.5299466", "0.5297938", "0.5293435", "0.5293435", "0.5292056", "0.5286581", "0.5281509", "0.5281476", "0.527374", "0.52717006", "0.526772", "0.5265663", "0.52599007", "0.5249518", "0.5246035", "0.5232441", "0.5231813", "0.52244776", "0.5223457", "0.521846", "0.5218121", "0.5205277", "0.5205277", "0.5205277", "0.5205277", "0.5205277", "0.5205277", "0.5205277", "0.5205277", "0.5205277", "0.5205277", "0.5205277", "0.5205048", "0.5201092", "0.5201092", "0.5201092" ]
0.78793126
3
Gets the value of the roomID property.
public int getRoomID() { return roomID; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getRoomId() {\n return roomId;\n }", "public int getRoomID() {\r\n\t\treturn this.room.getID();\r\n\t}", "public Integer getRoomid() {\r\n\t\treturn roomid;\r\n\t}", "public String getRoomid() {\r\n\t\treturn roomid;\r\n\t}", "public Integer getRoomId() {\n return roomId;\n }", "public long getRoomId() {\n return roomId_;\n }", "public Long getRoomId() {\n\t\treturn roomId;\n\t}", "public Integer getRoomid() {\r\n return roomid;\r\n }", "public int getId() {\n return (roomId);\n }", "public int getRoomId() {\n return roomId;\n }", "public long getRoomId() {\n return instance.getRoomId();\n }", "String getRoomId();", "long getRoomId();", "@Override\n public int getRoomId() {\n return room.getRoomId();\n }", "public int get_booking_room_id() {\n return room_id;\n }", "public String getRoomNum() {\n return roomNum;\n }", "public Integer getRoomid()\n {\n return roomid; \n }", "public String getRoomnumber() {\r\n return roomnumber;\r\n }", "public int getRoomNumber() {\r\n\t\treturn this.roomNumber;\r\n\t}", "public int getRoomNumber() \n\t{\n\t\treturn roomNumber;\n\t}", "public Integer getRoomnumber() {\n return roomnumber;\n }", "public String getRoom() {\n\t\treturn room;\n\t}", "public int getRoom(){\n\t\treturn room;\n\t}", "public String getRoom() {\r\n return room;\r\n }", "public int getRoomNum() {\n return roomNum;\n }", "public String getRoomno() {\n return roomno;\n }", "public Integer getRoomtypeid() {\n return roomtypeid;\n }", "public String getRoomTypeId() {\n return this.room_type_id;\n }", "public int getRoom()\n\t{\t\n\t\treturn iCurrentRoom;\n\t\t\n\t}", "public void setRoomID(int value) {\n this.roomID = value;\n }", "public String getIdentifier()\n {\n return chatRoomName;\n }", "public int getRoomNumber() {\n\t\treturn number; // Replace with your code\n\t}", "public void setRoomId(int value) {\n this.roomId = value;\n }", "public Room getRoom(){\n\t\treturn this.room;\n\t}", "public java.lang.CharSequence getRoom() {\n return room;\n }", "public java.lang.CharSequence getRoom() {\n return room;\n }", "public java.lang.String getROOMNUMBER()\n {\n \n return __ROOMNUMBER;\n }", "public Integer getRoomtypeid()\n {\n return roomtypeid; \n }", "public String getBuildingRoomNumber() {\n return buildingRoomNumber;\n }", "public Long getRoomstid()\n {\n return roomstid; \n }", "public Room room() {\r\n\t\treturn this.room;\r\n\t}", "public void setRoomid(Integer roomid) {\r\n this.roomid = roomid;\r\n }", "public Integer getRoomstatusid() {\r\n return roomstatusid;\r\n }", "public Long getReservationroomid()\n {\n return reservationroomid; \n }", "private void setRoomId(long value) {\n \n roomId_ = value;\n }", "public void setRoomid(Integer roomid) {\r\n\t\tthis.roomid = roomid;\r\n\t}", "public Integer getClassroomId() {\n\t\treturn classroomId;\n\t}", "public Room getRoom() {\n return currentRoom;\n }", "public Room getRoom()\r\n {\r\n return room;\r\n }", "public void setRoomId(Integer roomId) {\n this.roomId = roomId;\n }", "void setRoomId(String roomId);", "@ApiModelProperty(value = \"当前绑定房产\")\n\tpublic Long getCurrentRoomId() {\n\t\treturn currentRoomId;\n\t}", "RoomInfo room(int id);", "public Builder setRoomId(long value) {\n copyOnWrite();\n instance.setRoomId(value);\n return this;\n }", "@Override\n public Room getRoom(String roomId) {\n return getRoom(roomId, true);\n }", "public Long getRoomstlogid()\n {\n return roomstlogid; \n }", "public Long getBlockroomid()\n {\n return blockroomid; \n }", "public void setRoomId( String roomId ) {\n this.roomId = roomId;\n }", "public Room getRoom()\n {\n return currentRoom;\n }", "public Room getRoomIn() {\n\t\treturn roomIn;\n\t}", "public Room getRoom() {\n\t\treturn super.getRoom();\n\t}", "public void setRoomId(String roomId) {\n this.roomId = roomId;\n }", "public String getRoomaddress() {\r\n\t\treturn roomaddress;\r\n\t}", "java.lang.String getRoomName();", "public EntityBareJid getRoomName()\n {\n return roomName;\n }", "public String getRoomName() {\n\treturn this.name;\n}", "public Integer getRoomcard() {\n return roomcard;\n }", "public String getRoomtype() {\r\n\t\treturn roomtype;\r\n\t}", "java.lang.String getLobbyId();", "public Room getEventRoom(String id){\n return this.eventMap.get(getEvent(id)).getRoom();\n }", "public Room findRoomById(Long id);", "@Override\n\tpublic PropertyRooms findRoomById(long id) {\n\t\treturn hibernateTemplate.get(PropertyRooms.class, id);\n\t}", "public void setRoomID(byte id)\r\n\t {\r\n\t this.id = id;\r\n\t }", "@GetMapping(\"/rooms/{id}\")\n public Room getRoomById (\n @PathVariable (value = \"id\") Long roomId) {\n return roomRepository.findById(roomId)\n .orElseThrow(() -> new ResourceNotFoundException(\"Room\", \"id\", roomId));\n }", "RoomInfo getRoomInfo(int roomId) throws IOException;", "Room getRoom();", "Room getRoom();", "public String getID() {\n return (id);\n }", "public Room getDoorRoom()\n {\n return room;\n }", "public void setRoomId(Long roomId) {\n\t\tthis.roomId = roomId;\n\t}", "public void setRoomid(int newVal) {\n setRoomid(new Integer(newVal));\n }", "public Room currentRoom() {\n\t\treturn currentRoom;\n\t}", "public Integer getNewRoom() {\n return newRoom;\n }", "public String getCellIdProperty() {\r\n return getAttributeAsString(\"cellIdProperty\");\r\n }", "Integer getRealmId();", "public int getLobbyID() {\r\n return lobbyID;\r\n }", "public Room getRoom(String id) {\r\n\t\treturn rooms.get(id);\r\n\t}", "public Room getCurrentRoom()\n {\n return currentRoom;\n }", "public Room getCurrentRoom() {\r\t\treturn currentRoom;\r\t}", "public Integer getBuildingid() {\r\n return buildingid;\r\n }", "public java.lang.String getLobbyId() {\n java.lang.Object ref = lobbyId_;\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 lobbyId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public int getNumOfRoom() {\n\t\t\treturn RoomDetails.size();\r\n\t\t}", "public Room getBuildingRoom() {\n return buildingRoom;\n }", "@java.lang.Override\n public java.lang.String getLobbyId() {\n java.lang.Object ref = lobbyId_;\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 lobbyId_ = s;\n return s;\n }\n }", "java.lang.String getHotelId();", "public Room getCurrentRoom() {\n return currentRoom;\n }", "public String getOid() {\n return getProperty(Property.OID);\n }", "public long getId() {\n\t\treturn Long.parseLong(_id);\n\t}", "@RequestMapping(value = \"/Reservation/{reservation_reservationId}/room\", method = RequestMethod.GET)\n\t@ResponseBody\n\tpublic Room getReservationRoom(@PathVariable Integer reservation_reservationId) {\n\t\treturn reservationDAO.findReservationByPrimaryKey(reservation_reservationId).getRoom();\n\t}", "java.lang.String getID();" ]
[ "0.84529644", "0.84375906", "0.8422093", "0.8396302", "0.83634925", "0.82968456", "0.82773715", "0.82772994", "0.8118956", "0.8113482", "0.80800587", "0.80223644", "0.7848002", "0.77895665", "0.7682284", "0.7579618", "0.75519097", "0.7516884", "0.7514448", "0.7470234", "0.7448274", "0.7434125", "0.74170214", "0.7398595", "0.7347158", "0.72876203", "0.71460927", "0.7122127", "0.7056958", "0.7013601", "0.69768083", "0.6906767", "0.6842249", "0.6836124", "0.683178", "0.6827156", "0.6826356", "0.67783815", "0.67592984", "0.6741974", "0.6741644", "0.66230464", "0.661608", "0.6610029", "0.6509543", "0.6477072", "0.64495635", "0.64268583", "0.6383318", "0.63678074", "0.63571006", "0.6354984", "0.63427114", "0.63292897", "0.6328483", "0.6260116", "0.625418", "0.6240492", "0.6228302", "0.6216259", "0.61605364", "0.6126434", "0.6123542", "0.61217153", "0.6104031", "0.61027765", "0.60998017", "0.6093769", "0.60858583", "0.60858464", "0.60482144", "0.6037392", "0.5994429", "0.5977382", "0.59522706", "0.59503144", "0.59503144", "0.5932976", "0.5930285", "0.59152925", "0.59141076", "0.5891379", "0.58895856", "0.5887708", "0.588633", "0.5873364", "0.58702546", "0.5864872", "0.58607095", "0.58527124", "0.5852399", "0.58520716", "0.584546", "0.58387035", "0.58379596", "0.58369", "0.5830232", "0.5810144", "0.5794006", "0.57856005" ]
0.82076323
8
Sets the value of the roomID property.
public void setRoomID(int value) { this.roomID = value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setRoomId(int value) {\n this.roomId = value;\n }", "void setRoomId(String roomId);", "private void setRoomId(long value) {\n \n roomId_ = value;\n }", "public void setRoomid(Integer roomid) {\r\n this.roomid = roomid;\r\n }", "public void setRoomid(Integer roomid) {\r\n\t\tthis.roomid = roomid;\r\n\t}", "public void setId(int newId) {\n roomId = newId;\n }", "public void setRoomid(int newVal) {\n setRoomid(new Integer(newVal));\n }", "public void setRoomId(Integer roomId) {\n this.roomId = roomId;\n }", "public void setRoomid(Integer newVal) {\n if ((newVal != null && this.roomid != null && (newVal.compareTo(this.roomid) == 0)) || \n (newVal == null && this.roomid == null && roomid_is_initialized)) {\n return; \n } \n this.roomid = newVal; \n roomid_is_modified = true; \n roomid_is_initialized = true; \n }", "public void setRoomId( String roomId ) {\n this.roomId = roomId;\n }", "public Builder setRoomId(long value) {\n copyOnWrite();\n instance.setRoomId(value);\n return this;\n }", "public void setRoomId(String roomId) {\n this.roomId = roomId;\n }", "public void setRoomID(byte id)\r\n\t {\r\n\t this.id = id;\r\n\t }", "public synchronized void setRoom(String room) {\n this.room = room;\n }", "public void setRoomId(Long roomId) {\n\t\tthis.roomId = roomId;\n\t}", "public void setReservationroomid(Long newVal) {\n if ((newVal != null && this.reservationroomid != null && (newVal.compareTo(this.reservationroomid) == 0)) || \n (newVal == null && this.reservationroomid == null && reservationroomid_is_initialized)) {\n return; \n } \n this.reservationroomid = newVal; \n reservationroomid_is_modified = true; \n reservationroomid_is_initialized = true; \n }", "public String getRoomid() {\r\n\t\treturn roomid;\r\n\t}", "public String getRoomId() {\n return roomId;\n }", "public void setRoom(Room room) {\r\n\t\tthis.room = room;\r\n\t}", "public Integer getRoomid() {\r\n\t\treturn roomid;\r\n\t}", "public void setRoom(Room room) {\n currentRoom = room;\n }", "public Long getRoomId() {\n\t\treturn roomId;\n\t}", "public void setReservationroomid(long newVal) {\n setReservationroomid(new Long(newVal));\n }", "public void setRoomstid(long newVal) {\n setRoomstid(new Long(newVal));\n }", "public void setRoomstid(Long newVal) {\n if ((newVal != null && this.roomstid != null && (newVal.compareTo(this.roomstid) == 0)) || \n (newVal == null && this.roomstid == null && roomstid_is_initialized)) {\n return; \n } \n this.roomstid = newVal; \n roomstid_is_modified = true; \n roomstid_is_initialized = true; \n }", "public void setRoom(String room) {\n\t\tthis.room = room;\n\t}", "public long getRoomId() {\n return roomId_;\n }", "public void setRoom(Room room) {\n this.selectedRoom = room;\n }", "public int getRoomID() {\r\n\t\treturn this.room.getID();\r\n\t}", "public Integer getRoomId() {\n return roomId;\n }", "public final void setRoom(com.mendix.systemwideinterfaces.core.IContext context, java.lang.String room)\r\n\t{\r\n\t\tgetMendixObject().setValue(context, MemberNames.Room.toString(), room);\r\n\t}", "public void setRoom(String room) {\r\n this.room = room == null ? null : room.trim();\r\n }", "public final void setRoom(java.lang.String room)\r\n\t{\r\n\t\tsetRoom(getContext(), room);\r\n\t}", "public Integer getRoomid() {\r\n return roomid;\r\n }", "public void setRoomnumber(Integer roomnumber) {\n this.roomnumber = roomnumber;\n }", "public int getRoomID() {\n return roomID;\n }", "public void setRoomNum(String roomNum) {\n this.roomNum = roomNum == null ? null : roomNum.trim();\n }", "public int getRoomId() {\n return roomId;\n }", "public void setNewlyCreatedRoomID(String roomID)\r\n\t{\r\n\t\ttheGridView.shopWindow.addRoomInfo(\"ID\", roomID);\r\n\t}", "public void setRoom(java.lang.CharSequence value) {\n this.room = value;\n }", "public export.serializers.avro.DeviceInfo.Builder setRoom(java.lang.CharSequence value) {\n validate(fields()[3], value);\n this.room = value;\n fieldSetFlags()[3] = true;\n return this;\n }", "public void setCurrentRoomId(Long currentRoomId) {\n\t\tthis.currentRoomId = currentRoomId;\n\t}", "public void setRoomnumber(String roomnumber) {\r\n this.roomnumber = roomnumber;\r\n }", "public void setRoomtypeid(Integer roomtypeid) {\n this.roomtypeid = roomtypeid;\n }", "public void setRoom(Room room) {\n int roomNumber = room.getRoomNumber();\n if (room.getRoomNumber() > internalList.size()) {\n setRoomForRoomNumberLessThanNumberOfRooms(room);\n } else {\n setRoomForRoomNumberMoreThanNumberOfRooms(room);\n }\n }", "public void setRoomtypeid(Integer newVal) {\n if ((newVal != null && this.roomtypeid != null && (newVal.compareTo(this.roomtypeid) == 0)) || \n (newVal == null && this.roomtypeid == null && roomtypeid_is_initialized)) {\n return; \n } \n this.roomtypeid = newVal; \n roomtypeid_is_modified = true; \n roomtypeid_is_initialized = true; \n }", "public void setGameRoomID(String gameArea, String gameRoomID)\r\n\t{\r\n\t\tif(gameArea.toLowerCase().equals(\"fireworks\"))\r\n\t\t{\r\n\t\t\tgameFireworks.setRoomID(gameRoomID);\r\n\t\t}\r\n\t\telse if(gameArea.toLowerCase().equals(\"pirates\"))\r\n\t\t{\r\n\t\t\tgamePirates.setRoomID(gameRoomID);\r\n\t\t}\r\n\t}", "public int getId() {\n return (roomId);\n }", "public void setRoomno(String roomno) {\n this.roomno = roomno;\n }", "public void setRoomstatusid(Integer roomstatusid) {\r\n this.roomstatusid = roomstatusid;\r\n }", "void setRoom(int inRoom) {\n \t\tgraphics.setRoom(inRoom);\n \t}", "@Override\r\n public void setRoom(Room room) {\n this.room = room; //set the hive room\r\n roomList.add(this.room); // add room to the list\r\n }", "public void setRoomNumber (int n) {\r\n\t\tthis.roomNumber = n;\r\n\t}", "public void setRoomtypeid(int newVal) {\n setRoomtypeid(new Integer(newVal));\n }", "public void setBuildingRoom(Room buildingRoom) {\n this.buildingRoom = buildingRoom;\n }", "public void setRoomstlogid(long newVal) {\n setRoomstlogid(new Long(newVal));\n }", "@Override\n public int getRoomId() {\n return room.getRoomId();\n }", "public void setRoomstlogid(Long newVal) {\n if ((newVal != null && this.roomstlogid != null && (newVal.compareTo(this.roomstlogid) == 0)) || \n (newVal == null && this.roomstlogid == null && roomstlogid_is_initialized)) {\n return; \n } \n this.roomstlogid = newVal; \n roomstlogid_is_modified = true; \n roomstlogid_is_initialized = true; \n }", "String getRoomId();", "public void setROOMNUMBER(java.lang.String value)\n {\n if ((__ROOMNUMBER == null) != (value == null) || (value != null && ! value.equals(__ROOMNUMBER)))\n {\n _isDirty = true;\n }\n __ROOMNUMBER = value;\n }", "long getRoomId();", "public void setBlockroomid(Long newVal) {\n if ((newVal != null && this.blockroomid != null && (newVal.compareTo(this.blockroomid) == 0)) || \n (newVal == null && this.blockroomid == null && blockroomid_is_initialized)) {\n return; \n } \n this.blockroomid = newVal; \n blockroomid_is_modified = true; \n blockroomid_is_initialized = true; \n }", "public long getRoomId() {\n return instance.getRoomId();\n }", "public int get_booking_room_id() {\n return room_id;\n }", "public void setCurrentRoom(Room setRoom)\n {\n currentRoom = setRoom;\n }", "public void setCurrentRoom(Room newRoom) {\n playerRoom = newRoom;\n }", "public Builder clearRoomId() {\n copyOnWrite();\n instance.clearRoomId();\n return this;\n }", "public String getRoomnumber() {\r\n return roomnumber;\r\n }", "public void setRoomIn(Room roomIn) {\n\t\tthis.roomIn = roomIn;\n\t}", "private void clearRoomId() {\n \n roomId_ = 0L;\n }", "public int getRoomNumber() \n\t{\n\t\treturn roomNumber;\n\t}", "public Room(int roomNumber) \n\t{\n\t\tthis.roomNumber=roomNumber;\n\t}", "public int getRoomNumber() {\r\n\t\treturn this.roomNumber;\r\n\t}", "protected void makeRoom(String roomID)\n {\n mChat.child(roomID).child(\"sender1\").setValue(uid1);\n mChat.child(roomID).child(\"sender2\").setValue(uid);\n goToChat(roomID);\n }", "public void setID(long id);", "public Integer getRoomid()\n {\n return roomid; \n }", "public String getRoomTypeId() {\n return this.room_type_id;\n }", "public void setBlockroomid(long newVal) {\n setBlockroomid(new Long(newVal));\n }", "public String getRoomNum() {\n return roomNum;\n }", "public void setRoomcard(Integer roomcard) {\n this.roomcard = roomcard;\n }", "public void setHotelID(int value) {\n this.hotelID = value;\n }", "public void setRoomInformation(String newRoomID, String newRoomName)\r\n\t{\r\n\t\troomID = newRoomID;\r\n\t\troomName = newRoomName;\r\n\t\ttheGridView.setRoomInformation(newRoomID, newRoomName);\r\n\t}", "public void setCurrentRoom(Room room)\n {\n addRoomHistory(currentRoom); //this adds room to history log before changing currentRoom\n currentRoom = room; //changes the currentRoom to the new room player enters\n }", "public void moveToRoom(Rooms room) {\n this.currentRoom = room;\n }", "public void setRoom(int next)\n\t{\n\t\tiCurrentRoom = next;\n\t\t\n\t}", "public void setID(String newID)\r\n {\r\n id=newID;\r\n }", "private void setPlayerRoom(){\n player.setRoom(currentRoom);\n }", "public Integer getRoomnumber() {\n return roomnumber;\n }", "public int getRoom(){\n\t\treturn room;\n\t}", "void setID(int val)\n throws RemoteException;", "RoomInfo room(int id);", "public String getRoom() {\n\t\treturn room;\n\t}", "public void setId (long id)\r\n {\r\n _id = id;\r\n }", "public void setID(long value) {\n this.id = value;\n }", "@Override\n public void updateBillOfRoomsById(int roomId) {\n try {\n connection = DBManager.getConnection();\n preparedStatement = connection.prepareStatement(Requests.UPDATE_ROOM_BILL_BY_ID);\n preparedStatement.setInt(1, roomId);\n preparedStatement.executeUpdate();\n } catch (SQLException sqlException) {\n Logger.getLogger(sqlException.getMessage());\n } finally {\n closing(connection, preparedStatement, rs);\n }\n }", "public void enterRoom(Room room) {\n currentRoom = room;\n }", "public String getRoom() {\r\n return room;\r\n }", "public String getRoomno() {\n return roomno;\n }", "public void setID(java.lang.Integer value);", "public int getRoomNum() {\n return roomNum;\n }" ]
[ "0.81284434", "0.8079595", "0.78805757", "0.78034073", "0.7722254", "0.7623438", "0.7574423", "0.7564553", "0.7532305", "0.7481504", "0.74466497", "0.74119335", "0.7219544", "0.7202469", "0.7155089", "0.70703405", "0.70435786", "0.6881574", "0.68585443", "0.68362874", "0.68356913", "0.68159014", "0.6806888", "0.6748224", "0.6738712", "0.6728448", "0.6719674", "0.6705272", "0.6671004", "0.6666955", "0.66645324", "0.6662312", "0.66250217", "0.6551753", "0.6538532", "0.6534695", "0.65137094", "0.6493433", "0.64913774", "0.64856136", "0.64515376", "0.64253074", "0.63859195", "0.63446903", "0.63132083", "0.62986076", "0.6271902", "0.62256837", "0.619369", "0.6185621", "0.61781317", "0.6151899", "0.60679144", "0.6064411", "0.6063718", "0.6057091", "0.6031783", "0.6019403", "0.59971935", "0.5995204", "0.59943265", "0.5948174", "0.5930775", "0.59098566", "0.58632773", "0.58506936", "0.58221954", "0.5791228", "0.57841593", "0.57758754", "0.5764155", "0.5755007", "0.57362115", "0.5728269", "0.57217073", "0.5693146", "0.5692371", "0.5665365", "0.5643984", "0.56258523", "0.56022024", "0.5584505", "0.5581318", "0.5575816", "0.5561592", "0.55492395", "0.55365056", "0.5522332", "0.551854", "0.5488899", "0.548478", "0.5474191", "0.5468888", "0.5436185", "0.54213405", "0.5412825", "0.5411079", "0.54080915", "0.5393474", "0.5374446" ]
0.8357571
0
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { return inflater.inflate(R.layout.fragment_task_info, container, false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.wallpager_layout, null);\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_invit_friends, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_zhuye, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_posts, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.ilustration_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_sow_drug_cost_per_week, container, false);\n\n db = new DataBaseAdapter(getActivity());\n hc = new HelperClass();\n pop = new FeedSowsFragment();\n\n infltr = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n parent = (LinearLayout) v.findViewById(R.id.layout_for_add);\n tvTotalCost = (TextView) v.findViewById(R.id.totalCost);\n\n getData();\n setData();\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_stream_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_event, container, false);\n\n\n\n\n\n\n\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_feed, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.screen_select_list_student, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_overall, container, false);\n mNamesLayout = (LinearLayout) rootView.findViewById(R.id.fragment_overall_names_layout);\n mOverallView = (OverallView) rootView.findViewById(R.id.fragment_overall_view);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n\n\n view = inflater.inflate(R.layout.fragment_earning_fragmant, container, false);\n ini(view);\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n super.onCreateView(inflater, container, savedInstanceState);\n final View rootview = inflater.inflate(R.layout.activity_email_frag, container, false);\n ConfigInnerElements(rootview);\n return rootview;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\trootView = inflater.inflate(R.layout.fragment_attack_armor, container, false);\r\n\r\n\t\tfindInterfaceElements();\r\n\t\taddRangeSelector();\r\n\t\tupdateHeadings();\r\n\t\tsetListeners();\r\n\r\n\t\tsetFromData();\r\n\r\n\t\treturn rootView;\r\n\t}", "@SuppressLint(\"InflateParams\")\r\n\t@Override\r\n\tpublic View initLayout(LayoutInflater inflater) {\n\t\tView view = inflater.inflate(R.layout.frag_customer_all, null);\r\n\t\treturn view;\r\n\t}", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_fore_cast, container, false);\r\n initView();\r\n mainLayout.setVisibility(View.GONE);\r\n apiInterface = RestClinet.getClient().create(ApiInterface.class);\r\n loadData();\r\n return view;\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_friend, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_detail, container, false);\n image = rootView.findViewById(R.id.fr_image);\n name = rootView.findViewById(R.id.fr_name);\n phoneNumber = rootView.findViewById(R.id.fr_phone_number);\n email = rootView.findViewById(R.id.fr_email);\n street = rootView.findViewById(R.id.fr_street);\n city = rootView.findViewById(R.id.fr_city);\n state = rootView.findViewById(R.id.fr_state);\n zipcode = rootView.findViewById(R.id.fr_zipcode);\n dBrith = rootView.findViewById(R.id.date_brith);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_pm25, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_kkbox_playlist, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_feed_pager, container, false);\n\n// loadData();\n\n findViews(rootView);\n\n setViews();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n layout = (FrameLayout) inflater.inflate(R.layout.fragment_actualites, container, false);\n\n relLayout = (RelativeLayout) layout.findViewById(R.id.relLayoutActus);\n\n initListView();\n getXMLData();\n\n return layout;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.frag_post_prayer_video, container, false);\n setCustomDesign();\n setCustomClickListeners();\n return rootView;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.lf_em4305_fragment, container, false);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_recordings, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_category, container, false);\n initView(view);\n bindRefreshListener();\n loadParams();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_cm_box_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_layout12, container, false);\n\n iniv();\n\n init();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_details, container, false);\n //return inflater.inflate(R.layout.fragment_details, container, false);\n getIntentValues();\n initViews();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_mem_body_blood, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_qiugouxiaoxi, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_coll_blank, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_attendance_divide, container, false);\n\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.show_program_fragment, parent, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,\n @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.visualization_fragment, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_category_details_page, container, false);\n initializeAll();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View v = inflater.inflate(R.layout.fragemnt_reserve, container, false);\n\n\n\n\n return v;\n }", "protected int getLayoutResId() {\n return R.layout.activity_fragment;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_quizs, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n role = getArguments().getInt(\"role\");\n rootview = inflater.inflate(R.layout.fragment_application, container, false);\n layout = rootview.findViewById(R.id.patentDetails);\n progressBar = rootview.findViewById(R.id.progressBar);\n try {\n run();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return rootview;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.fragment_zhu, null);\n\t\tinitView();\n\t\tinitData();\n\t\treturn view;\n\t}", "@Override\n\t\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n\t\t{\n\t\t\tView rootView = inflater.inflate(R.layout.maimfragment, container, false);\n\t\t\treturn rootView;\n\t\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n // Inflate the layout for this fragment\n return inflater.inflate(R.layout.fragment__record__week, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_porishongkhan, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_dashboard, container, false);\n resultsRv = view.findViewById(R.id.db_results_rv);\n resultText = view.findViewById(R.id.db_search_empty);\n progressBar = view.findViewById(R.id.db_progressbar);\n lastVisitText = view.findViewById(R.id.db_last_visit);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(getLayoutId(), container, false);\n init(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_feedback, container, false);\n self = getActivity();\n initUI(view);\n initControlUI();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_service_summery, container, false);\n tvVoiceMS = v.findViewById(R.id.tvVoiceValue);\n tvDataMS = v.findViewById(R.id.tvdataValue);\n tvSMSMS = v.findViewById(R.id.tvSMSValue);\n tvVoiceFL = v.findViewById(R.id.tvVoiceFLValue);\n tvDataBS = v.findViewById(R.id.tvDataBRValue);\n tvTotal = v.findViewById(R.id.tvTotalAccountvalue);\n return v;\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_clan_rank_details, container, false);\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_star_wars_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_lei, container, false);\n\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_quotation, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_wode_ragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n\n\n\n\n\n return inflater.inflate(R.layout.fragment_appoint_list, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n if (rootView == null) {\n rootView = inflater.inflate(R.layout.fragment_ip_info, container, false);\n initView();\n }\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_offer, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_rooms, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_img_eva, container, false);\n\n getSendData();\n\n initView(view);\n\n initData();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_project_collection, container, false);\n ButterKnife.bind(this, view);\n fragment = this;\n initView();\n getCollectionType();\n // getCategoryList();\n initBroadcastReceiver();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_yzm, container, false);\n initView(view);\n return view;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tmainLayout = inflater.inflate(R.layout.fragment_play, container, false);\r\n\t\treturn mainLayout;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_invite_request, container, false);\n initialiseVariables();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n getLocationPermission();\n return inflater.inflate(R.layout.centrum_fragment, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_habit_type_details, container, false);\n\n habitTitle = rootView.findViewById(R.id.textViewTitle);\n habitReason = rootView.findViewById(R.id.textViewReason);\n habitStartDate = rootView.findViewById(R.id.textViewStartDate);\n habitWeeklyPlan = rootView.findViewById(R.id.textViewWeeklyPlan);\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_information_friends4, container, false);\n\n if (getArguments() != null) {\n FriendsID = getArguments().getString(\"keyFriends\");\n }\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_post_details, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hotel, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_bus_inquiry, container, false);\n initView();\n initData();\n initDialog();\n getDataFromNet();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_weather, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_srgl, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_ground_detail_frgment, container, false);\n init();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_book_appointment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_wheretogo, container, false);\n ids();\n setup();\n click();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = DataBindingUtil\n .inflate(inflater, R.layout.fragment_learning_leaders, container, false);\n init();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_end_game_tab, container, false);\n\n setupWidgets();\n setupTextFields(view);\n setupSpinners(view);\n\n // Inflate the layout for this fragment\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.memoir_fragment, container, false);\n\n getUserIdFromSharedPref();\n configureUI(view);\n configureSortSpinner();\n configureFilterSpinner();\n\n networkConnection = new NetworkConnection();\n new GetAllMemoirTask().execute();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_jadwal, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_delivery_detail, container, false);\n initialise();\n\n\n\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_4, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_product, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_group_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment06_7, container, false);\n initView(view);\n setLegend();\n setXAxis();\n setYAxis();\n setData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_downloadables, container, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.movie_list_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_like, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hall, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_unit_main, container, false);\n TextView mTxvBusinessAassistant = (TextView) view.findViewById(R.id.txv_business_assistant);\n TextView mTxvCardINformation = (TextView) view.findViewById(R.id.txv_card_information);\n RelativeLayout mRelOfficialWebsite = (RelativeLayout) view.findViewById(R.id.rel_official_website);\n RelativeLayout mRelPictureAblum = (RelativeLayout) view.findViewById(R.id.rel_picture_album);\n TextView mTxvQrCodeCard = (TextView) view.findViewById(R.id.txv_qr_code_card);\n TextView mTxvShareCard = (TextView) view.findViewById(R.id.txv_share_card);\n mTxvBusinessAassistant.setOnClickListener(this.mOnClickListener);\n mTxvCardINformation.setOnClickListener(this.mOnClickListener);\n mRelOfficialWebsite.setOnClickListener(this.mOnClickListener);\n mRelPictureAblum.setOnClickListener(this.mOnClickListener);\n mTxvQrCodeCard.setOnClickListener(this.mOnClickListener);\n mTxvShareCard.setOnClickListener(this.mOnClickListener);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_moviespage, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_s, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_overview, container, false);\n\n initOverviewComponents(view);\n registerListeners();\n initTagListener();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bahan_ajar, container, false);\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n root = (ViewGroup) inflater.inflate(R.layout.money_main, container, false);\n context = getActivity();\n initHeaderView(root);\n initView(root);\n\n getDate();\n initEvetn();\n return root;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_historical_event, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_event_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_video, container, false);\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n v= inflater.inflate(R.layout.fragment_post_contacts, container, false);\n this.mapping(v);\n return v;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_measures, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_feed, container, false);\n findViews(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_surah_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_data_binded, container, false);\n }" ]
[ "0.6739604", "0.67235583", "0.6721706", "0.6698254", "0.6691869", "0.6687986", "0.66869223", "0.6684548", "0.66766286", "0.6674615", "0.66654444", "0.66654384", "0.6664403", "0.66596216", "0.6653321", "0.6647136", "0.66423255", "0.66388357", "0.6637491", "0.6634193", "0.6625158", "0.66195583", "0.66164845", "0.6608733", "0.6596594", "0.65928894", "0.6585293", "0.65842897", "0.65730995", "0.6571248", "0.6569152", "0.65689117", "0.656853", "0.6566686", "0.65652984", "0.6553419", "0.65525705", "0.65432084", "0.6542382", "0.65411425", "0.6538022", "0.65366334", "0.65355957", "0.6535043", "0.65329415", "0.65311074", "0.65310687", "0.6528645", "0.65277404", "0.6525902", "0.6524516", "0.6524048", "0.65232015", "0.65224624", "0.65185034", "0.65130377", "0.6512968", "0.65122765", "0.65116245", "0.65106046", "0.65103024", "0.6509013", "0.65088093", "0.6508651", "0.6508225", "0.6504662", "0.650149", "0.65011525", "0.6500686", "0.64974767", "0.64935696", "0.6492234", "0.6490034", "0.6487609", "0.6487216", "0.64872116", "0.6486594", "0.64861935", "0.6486018", "0.6484269", "0.648366", "0.6481476", "0.6481086", "0.6480985", "0.6480396", "0.64797544", "0.647696", "0.64758915", "0.6475649", "0.6474114", "0.6474004", "0.6470706", "0.6470275", "0.64702207", "0.6470039", "0.6467449", "0.646602", "0.6462256", "0.64617974", "0.6461681", "0.6461214" ]
0.0
-1
On event clicked, go to event profile
@Override public void onItemOfListClicked(Object o) { UserProfileFragmentDirections.ActionUserProfileFragmentToEventProfileFragment action = UserProfileFragmentDirections.actionUserProfileFragmentToEventProfileFragment((MyEvent) o); navController.navigate(action); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void goToEvent() {\n startActivity(new Intent(AddGuests.this, DetailEventRequest.class)); }", "private void clickEventProfileImage(){\n mProfileImage.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n ProfileFragment profileFragment = new ProfileFragment_();\n Bundle args = new Bundle();\n args.putBoolean(\"goal\",false);\n profileFragment.setArguments(args);\n ((MainActivity)getContext()).loadFragment(profileFragment, \"fm_profile\",true,getString(R.string.nav_menu_profile));\n }\n });\n }", "public void toCampusEvent(View view) {\n Intent startNewActivity = new Intent(this, EventProfile.class);\n startNewActivity.putExtra(\"eventInteger\", 2);\n startActivity(startNewActivity);\n }", "@Override\n public void onClick(View view) {\n Navigation.findNavController(view).navigate(R.id.addEventFragment);\n }", "void gotoEditProfile();", "public void clickOnProfile() {\n\t\telement(\"link_profile\").click();\n\t\tlogMessage(\"User clicks on Profile on left navigation bar\");\n\t}", "@FXML\r\n\tpublic void viewProfile(ActionEvent event)\r\n\t{\r\n\t\t// TODO Autogenerated\r\n\t}", "@Override\n public void onClick(View view) {\n Intent addEvent = new Intent(getApplicationContext(), EditActivity.class);\n startActivity(addEvent);\n }", "public void mmEditClick(ActionEvent event) throws Exception{\r\n displayEditProfile();\r\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(getContext(), ProfileActivity.class);\n startActivity(intent);\n\n }", "@Override\n public void onClick(View view) {\n launchGridProfile(view);\n }", "@Override\n public void onClick(View view) {\n launchGridProfile(view);\n }", "public void goToFriendListPage(ActionEvent event) throws IOException { //this is going to close the current window and open a new window\n\t\t//this should also display the User Page\n\t\tParent user_page = FXMLLoader.load(getClass().getResource(\"/view/FriendList_Page.fxml\"));\n\t\tScene userpage_scene = new Scene(user_page);\n\t\tStage app_stage = (Stage) ((Node) (event.getSource())).getScene().getWindow();\n\t\tapp_stage.setScene(userpage_scene);\n\t\tapp_stage.setTitle(\"Friend List\");\n\t\tapp_stage.show();\n\t}", "@Override\n public void onClick(View v) {\n\t \tIntent myIntent = new Intent(MainActivity.this, Profile.class);\n\t \t//myIntent.putExtra(\"key\", value); //Optional parameters\n\t \tMainActivity.this.startActivity(myIntent);\n }", "@Override\n\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t}", "public void myProfileCardClicked(View view) {\n Intent myProfileIntent = new Intent(this, MyProfile.class);\n startActivity(myProfileIntent);\n }", "@Override\n /**\n * User clicked something---launch the browser\n */\n public void propertyChange(PropertyChangeEvent propertyChangeEvent) {\n CardData cardData = (CardData) propertyChangeEvent.getNewValue();\n String url = cardData.getUrl();\n //showErrorMessage(\"clicked on \" + propertyChangeEvent.getNewValue());\n Uri uri = Uri.parse(url);\n\n // log the activity\n\n // TODO: Map the current feed's url\n String sourceUrlPath = getCurrentStrategy().getUrlPath(); // e,g, \"/news/home\"\n String idStr = String.format(\"%d\", cardData.getId());\n\n EventDispatchService dispatchService = _dispatchPaymentFactory.createEventDispatch(idStr);\n dispatchService.sendConfirmation(getDispatchSuccessCallback(), getDispatchFailureCallback());\n\n\n AuthEventPublicDispatch eventDispatchService = _dispatchPaymentFactory.createDispatch(sourceUrlPath, uri.getPath(), url);\n eventDispatchService.sendConfirmation(getEventDispatchSuccessCallback(), getEventDispatchFailureCallback());\n\n Intent browserLaunchIntent = new Intent(Intent.ACTION_VIEW, uri);\n startActivity(browserLaunchIntent);\n\n }", "private void gotoUserProfile() {\n Intent launchUserProfile = new Intent(this, Profile.class);\n startActivity(launchUserProfile);\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(context,ProfileActivity.class);\n startActivity(intent);\n }", "@Override\n public void onClick(View view) {\n\n Intent intent = new Intent(LoginActivity.this, ProfileSetupActivity.class);\n startActivity(intent);\n }", "public void onPressEdit() {\r\n Intent intent = new Intent(this, CreateEventActivity.class);\r\n intent.putExtra(CreateEventActivity.EXTRA_EDIT_EVENT_UID, event.uid);\r\n startActivity(intent);\r\n }", "@Override\n public void buttonClick(ClickEvent event) {\n \tgetUI().getNavigator().navigateTo(NAME + \"/\" + contenView);\n }", "@Override\r\n public void onClick(ClickEvent event) {\n }", "@Override\n public void onClick(View v) {\n startActivity(new Intent(mContext, ActivityProfile.class));\n }", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\n\t\tPoint mouseClick = SwingUtilities.convertPoint(this, e.getPoint(), view);\n\t\t\n\t\tnext = handleInGameMenu(mouseClick);\n\t\t\n\t\thandlePlay(mouseClick);\n\t\t\n\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tIntent intent2 = new Intent(getApplicationContext(), Election_List.class);\n\t\t intent2.putExtra(\"user_id\", user_id);\n\t\t startActivity(intent2);\n\t\t finish();\n\t\t\t\t\n\t\t\t}", "public void itemClick(ItemClickEvent event) {\n \t\tAccount account = ((BeanItemContainer<Account>) accountList\n \t\t\t\t.getContainerDataSource()).getItem(event.getItemId()).getBean();\n \t\tAccountView accountView = new AccountView(account);\n \t\tgetNavigationManager().navigateTo(accountView);\n \t\t((CrmApp) getApplication()).showDetails(account);\n \t\tgetNavigationManager().addListener(new NavigationListener() {\n \t\t\tpublic void navigate(NavigationEvent event) {\n \t\t\t\t((CrmApp) getApplication()).hideDetails();\n \t\t\t}\n \t\t});\n \t}", "@UiHandler(\"people\")\n\tvoid patientsClicked(ClickEvent event) {\n\t\tplaceController.goTo(new StandardizedPatientPlace(\"PatientPlace\"));\n\t}", "public void linktomyaccountButtonPressed(javafx.event.ActionEvent event) throws IOException {\r\n Parent myaccountParent = FXMLLoader.load(getClass().getResource(\"MyAccount.fxml\"));\r\n Scene myaccountScene = new Scene(myaccountParent);\r\n Stage window = (Stage)((Node)event.getSource()).getScene().getWindow();\r\n window.setScene(myaccountScene);\r\n window.show();\r\n }", "public void goToUserPage(ActionEvent event) throws IOException { //this is going to close the current window and open a new window\n\t\t//this should also display the User Page\n\t\tParent user_page = FXMLLoader.load(getClass().getResource(\"/view/User_Page.fxml\"));\n\t\tScene userpage_scene = new Scene(user_page);\n\t\tStage app_stage = (Stage) ((Node) (event.getSource())).getScene().getWindow();\n\t\tapp_stage.setScene(userpage_scene);\n\t\tapp_stage.setTitle(\"User Page\");\n\t\tapp_stage.show();\n\t}", "public void onEvent(Event event) throws Exception {\n\t\t\t\tif(locationUri.startsWith(\"http\")){\n\t\t\t\t\t//open a new browser tab\n\t\t\t\t\tExecutions.getCurrent().sendRedirect(locationUri);\n\t\t\t\t}else{\n\t\t\t\t\t//use iterable to find the first include only\n\t\t\t\t\tInclude include = (Include)Selectors.iterable(eastSideBarTabbox.getPage(), \"#mainInclude\").iterator().next();\n\t\t\t\t\tinclude.setSrc(locationUri);\n\t\t\t\t\tSessions.getCurrent().setAttribute(\"CURRENT_PAGE\", name);\n\t\t\t\t\t\n\t\t\t\t\t//advance bookmark control, \n\t\t\t\t\t//bookmark with a prefix\n\t\t\t\t\tif(name!=null){\n\n\t\t\t\t\t\tgetPage().getDesktop().setBookmark(Context.BOOKMARK_SEPARATOR + name);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tfireDetailEvent(new DetailEvent(this,'P'));\r\n\t\t\t}", "@Override\n\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\t\tbindingSource.setItemId(this, true, bindingSource.getItemId());\n\t\t\t\t\n\t\t\t\t// fire the app event if it's implemented\n\t\t\t\tif (listenerDownButton != null)\n\t\t\t\t\tlistenerDownButton.downButtonClick(new ClickNavigationEvent(event.getButton(), event.getComponent() , null, register, 0));\n\t\t\t\t\n\t\t\t}", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Intent openCauseFullDetailViewPage = new Intent(NeedyProfile.this, CauseFullDetailView.class);\n startActivity(openCauseFullDetailViewPage);\n\n\n }", "@Override\r\n public void onClick(View v) {\n profileClick(mFeedReplyList.get(pos));\r\n }", "private void viewPageClicked(ActionEvent event) {\n\n Item tempItem = new Item();\n String itemURL = tempItem.itemURL;\n Desktop dk = Desktop.getDesktop();\n try{\n dk.browse(new java.net.URI(itemURL));\n }catch(IOException | URISyntaxException e){\n System.out.println(\"The URL on file is invalid.\");\n }\n\n showMessage(\"Visiting Item Web Page\");\n\n }", "@Override\n\t\t\t// On click function\n\t\t\tpublic void onClick(View view) {\n\t\t\t\tIntent intent = new Intent(view.getContext(),\n\t\t\t\t\t\tEditProfileActivity.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t\tfinish();\n\t\t\t}", "@Override\n\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tUI.getCurrent().getNavigator().navigateTo(\"CliPantallaBusquedaExpedientes\");\t \n\t\t\t}", "@Override\n public void onClick(View v) {\n ArticleUtil.launchDetailActivity(mContext, bean.getAid(), bean.getSid(), bean.getAl(), false, bean);\n GoogleAnalyticsTracker.setGoogleAnalyticsEvent(mContext, \"Related Article\", \"Related article: Article Clicked\", \"Article detail page\");\n FlurryAgent.logEvent(\"Related Article: \" + \"Article Clicked\");\n }", "@Override\n public void handleEvent(EventInfo event) {\n if (event.eventType == EventType.GO_TO) {\n goToYear(event.selectedTime.year);\n }\n }", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\tSystem.out.println(\"vai ficar clikando ai a toa? PATETA\");\n\t\t\t\t\n\t\t\t}", "public void AuditOnAction(Event e) {\r\n\t \tViewManager.getInstance().switchViews(\"/View/AuditTrailView.fxml\", e, new AuditTrailController());\r\n\t \r\n\t }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent=new Intent(getApplicationContext(),Login_Profile.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t\t\n\t\t\t}", "public void onClick(DialogInterface dialog,int id) {\n Toast.makeText(EditEventDetails.this, \"Event Edited!\", Toast.LENGTH_LONG).show();\r\n Intent i = new Intent(EditEventDetails.this, NavDrawer.class);\r\n startActivity(i);\r\n finish();\r\n\r\n }", "@Override\n public void onClick(View v) {\n Intent r2page = new Intent(v.getContext(), Cherwell_Boathouse.class);\n startActivity(r2page);\n }", "public void selectEventLink(String inputEventName);", "public void openProfile(){\n\t\t\n\t\tclickElement(profile_L, driver);\n\t}", "@Override\n public void onClick(View view) {\n if(eventType.equals(EventType.ORGANISE)){\n Log.d(TAG, \"In update event\");\n\n Bundle bundle = new Bundle();\n bundle.putString(BundleAndSharedPreferencesConstants.CREATE_OR_UPDATE, BundleAndSharedPreferencesConstants.UPDATE);\n bundle.putInt(DbConstants.EVENT_KEY_EVENT_ID, eventId);\n startNewActivity(CreateUpdateEventActivity.class, bundle);\n finish();\n }\n else if(eventType.equals(EventType.ATTEND)){\n Bundle bundle = new Bundle();\n bundle.putInt(DbConstants.EVENT_KEY_EVENT_ID, eventId);\n\n startNewActivity(SignInActivity.class, bundle);\n }\n }", "@Override\r\n\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\t\r\n\t\t\t\tMaterialToast.fireToast(k5);\r\n\t\t\t\t\r\n\t\t\t\tLayout1 l1=new Layout1();\r\n\t\t\t\tString u=l1.t1.getText();\r\n\t\t\t\t//MaterialToast.fireToast(u);\r\n\t\t\t\tString p=t1.getText();\r\n\t\t\t\t//MaterialToast.fireToast(p);\r\n\t\t\t\tDash2 d=new Dash2(p);\r\n\t\t\t\tRootPanel.get(\"a\").clear();\r\n\t\t\t\tRootPanel.get(\"b\").clear();\r\n\t\t\t\tRootPanel.get(\"a\").add(new Dash1());\r\n\t\t\t\ta2.UserRequest(p,k5,new AsyncCallback<String>() {\r\n\r\n\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\tpublic void onFailure(Throwable caught) {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\tpublic void onSuccess(String result) {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tWindow.alert(\"Thank you for selecting\");\r\n\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\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});\r\n\t\t\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}", "@SuppressLint(\"NewApi\")\n\t@Override\n\tpublic void onClick(View v) {\n\t\tstartActivity(new Intent(getActivity(), Profile_pic.class));\n\t}", "@FXML\r\n void ClickOptionsAndSettings(MouseEvent event) throws IOException {\r\n FXMLLoader loader = new FXMLLoader();\r\n loader.setLocation(getClass().getResource(\"OptionsAndSettings.fxml\"));\r\n loader.load();\r\n //Load options and settings page\r\n OptionsAndSettingsController controller = loader.getController();\r\n controller.setUser(user);\r\n //Set user details\r\n Parent root = loader.getRoot();\r\n Scene scene = new Scene(root);\r\n Stage stage = (Stage)((Node)event.getSource()).getScene().getWindow();\r\n stage.setScene(scene);\r\n stage.show();\r\n }", "void gotoEditProfile(String fbId);", "@Override\n public void onClick(View view) {\n Intent hitsIntent = new Intent(Playlists.this, Playing_now.class);\n startActivity(hitsIntent);\n }", "public void actionPerformed(ActionEvent e) {\n\t\tif (e.getSource() == statusfield || e.getActionCommand().equals(\"Change Status\")) {\n\t\t\tupdateStatus();\n\t\t\t//showCurrentProfile();\n\t\t}\n\t\telse if (e.getSource() == picturefield || e.getActionCommand().equals(\"Change Picture\")) {\n\t\t\tupdatePicture();\n\t\t\t//showCurrentProfile();\n\t\t}\n\t\telse if (e.getSource() == friendfield || e.getActionCommand().equals(\"Add Friend\")) {\n\t\t\taddFriend();\n\t\t\t//showCurrentProfile();\n\t\t}\n\t\telse if (e.getActionCommand().equals(\"Add\")) {\n\t\t\taddName();\n\t\t\t//showCurrentProfile();\n\t\t}\n\t\telse if (e.getActionCommand().equals(\"Delete\")) {\n\t\t\tdeleteName();\n\t\t\t//showCurrentProfile();\n\t\t}\n\t\telse if (e.getActionCommand().equals(\"Lookup\")) {\n\t\t\tlookUpName();\n\t\t\t//showCurrentProfile();\n\t\t}\n\t\t\t\n\t}", "@Override\r\n\t\tpublic void onClick(ClickEvent event) {\n\t\t\tRootPanel.get(\"details\").clear();\r\n\t\t\tuf = new UserForm(AktuellerAnwender.getAnwender());\r\n\t\t\tRootPanel.get(\"details\").add(uf);\r\n\t\t}", "public void gotoProfileActivity()\n {\n Log.e(\"next\",\"\"+\"log\");\n startActivity(new Intent(OTPActivity.this, UserProfileActivity.class));\n finish();\n }", "PreViewPopUpPage clickImageLink();", "public void onClick(View view) {\n Intent nextScreen = new Intent(view.getContext(), Mockup1.class);\n startActivityForResult(nextScreen, 0);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent i = new Intent(cont, ProfilePageActivity.class);\n\t\t\t\tstartActivity(i);\n\t\t\t\tdil.dismiss();\n\t\t\t}", "public void mouseClicked(MouseEvent event) { \n\t\t\n\t}", "public void mmCreateClick(ActionEvent event) throws Exception{\r\n displayCreateProfile();\r\n }", "@FXML\r\n void ClickUserInformation(MouseEvent event) throws IOException {\r\n FXMLLoader loader = new FXMLLoader();\r\n loader.setLocation(getClass().getResource(\"UserInformation.fxml\"));\r\n //Load user information page\r\n loader.load();\r\n UserInformationController controller = loader.getController();\r\n controller.setUser(user);\r\n //Set user details in the user information page\r\n Parent root = loader.getRoot();\r\n Scene scene = new Scene(root);\r\n Stage stage = (Stage)((Node)event.getSource()).getScene().getWindow();\r\n stage.setScene(scene);\r\n stage.show();\r\n }", "@Override\r\n public void mouseClicked(MouseEvent event) {\r\n System.out.println(\"clicked\");\r\n\r\n }", "private void onEditProfileClicked() {\n Intent intent = new Intent(this, ProfileCreationActivity.class);\n intent.putExtra(ProfileCreationActivity.EDIT_USER_PROFILE, true);\n intent.putExtra(ProfileCreationActivity.RETURN_TO_PREVIOUS, true); // we want to return to here, not HomeActivity on cancel or submit\n startActivity(intent);\n }", "public void goToProfilePage() {\n\t\tUtil.element(userTab, driver).click();\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n frame.setVisible(false);//when user clicks my profile button the visibility of the frame for the home screen will be set to false \n new MyProfile();//displays the user's profile page\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\n\t\t\t\tIntent i=new Intent(EventDesc.this,suggestions.class);\n\t\t\t\ti.putExtra(NAME, bun.getString(NAME));\n\t\t\t\ti.putExtra(ID,bun.getString(ID));\n\t\t\t\tstartActivity(i);\n\t\t\t\t\n\t\t\t}", "public void mouseClicked(MouseEvent event){\n if (event.getClickCount() == 2) {\r\n //call teacherTabMethod\r\n teacherTabMethod();\r\n } \r\n }", "private void userSelected(MouseEvent e) {\n User user = getUser(e);\n if (user != null) {\n userListener.userClicked(user, e);\n }\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(NDS_main.this, Urubuga_Services.class);\n intent.putExtra(\"pageId\", \"1\");\n startActivity(intent);\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tString url = mAuth.getAuthUrl();\n\t\t\t\tshowPopUp(url);\n\t\t\t}", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Intent intent = new Intent(getApplicationContext(), EventDetailsActivity.class);\n Event event= arrayList.get(position);\n // putting an object as an intent extra\n intent.putExtra(\"Event\",(Serializable) event);\n startActivity(intent);\n\n }", "public void linktobookinghomeButtonPressed(javafx.event.ActionEvent event) throws IOException {\r\n Parent mybookingsParent = FXMLLoader.load(getClass().getResource(\"bookingHome.fxml\"));\r\n Scene mybookingsScene = new Scene(mybookingsParent);\r\n Stage window = (Stage)((Node)event.getSource()).getScene().getWindow();\r\n window.setScene(mybookingsScene);\r\n window.show();\r\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(NDS_main.this, Urubuga_Services.class);\n intent.putExtra(\"pageId\", \"2\");\n startActivity(intent);\n }", "@Override\n public void onClick(View v) {\n if (editEventId == null && proposal==null){\n if(canGoNext()){\n dialog = UbiQuoBusinessUtils.defaultProgressBar(\"Caricamento in corso\",getActivity());\n dialog.show();\n updateStaticData();\n submitEvent();\n }\n }\n\n if(editEventId != null){\n dialog = UbiQuoBusinessUtils.defaultProgressBar(\"Caricamento in corso\",getActivity());\n dialog.show();\n updateStaticData();\n editEvent(editEventId,editEventCity);\n }\n\n if(proposal != null){\n dialog = UbiQuoBusinessUtils.defaultProgressBar(\"Caricamento in corso\",getActivity());\n dialog.show();\n updateStaticData();\n submitProposal(proposal.getString(\"id\"));\n }\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif(projectsLoader.getNextInspection()!=null){\n\t\t\t\t\tString recordId = projectsLoader.getNextInspection().getRecordId_id();\n\t\t\t\t\tif(recordId==null)\n\t\t\t\t\t\treturn;\n\t\t\t\t\tActivityUtils.startScheduleInspectionActivity(LandingPageActivity.this, projectsLoader.getParentProject(recordId).getProjectId(), recordId, projectsLoader.getNextInspection(), AppConstants.CANCEL_INSPECTION_SOURCE_OTHER);\n\t\t\t\t}\n\t\t\t}", "@Override\n\t\t\tpublic void clicked(InputEvent event, float x, float y) {\n\t\t\t\tif (Constants.userID == 0) { // If no one is signed in\n\t\t\t\t\tdispose();\n\t\t\t\t\tgame.setScreen(new UserInfoScreen(game));\n\t\t\t\t} else { // If a user is currently signed in\n\t\t\t\t\tConstants.userID = 0;\n\t\t\t\t\tConstants.user = \"Temporary User\";\n\t\t\t\t\tcreate();\n\t\t\t\t}\n\t\t\t}", "public void goToProfilePage(View view) {\n Intent intent = new Intent(this, ProfilePage.class);\n startActivity(intent);\n }", "public void actionPerformed(ActionEvent e) {\n\t\tString cmd = e.getActionCommand();\n\t\tString inputName = nameField.getText();\n\t\t\n\t\tswitch(cmd) {\n\t\tcase \"Add\":\n\t\t\taddProfile(inputName);\n\t\t\tbreak;\n\t\t\t\n\t\tcase \"Delete\":\n\t\t\tdeleteProfile(inputName);\n\t\t\tbreak;\n\t\t\t \n\t\tcase \"Lookup\":\n\t\t\tlookUp(inputName);\n\t\t\tbreak;\n\t\t\t\n\t\tcase \"Status\":\n\t\t\tupdateStatus();\n\t\t\tbreak;\n\t\t\t\n\t\tcase \"Picture\":\n\t\t\tupdatePicture();\n\t\t\tbreak;\n\t\t\t\n\t\tcase \"Friend\":\n\t\t\taddFriend();\n\t\t\tbreak;\n\t\t}\n\t\t\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t\tgotoTimeline();\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tBundle data = new Bundle();\n\t\t\t\tdata.putSerializable(\"user\", user);\n\t\t\t\tIntent intent = new Intent(HostpageActivity.this,\n\t\t\t\t\t\tExercisepageActivity.class);\n\t\t\t\tintent.putExtras(data);\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "void onMembersClick();", "public KPAUICommunityEventsPage clickCommunityEventsLink(){\n getCommunityEventsLink().click();\n return new KPAUICommunityEventsPage(driver);\n }", "@Override\n public void onClick(View view) {\n IdEvento = obtenerEmegencia().get(recyclerViewEmergencia.getChildAdapterPosition(view)).getId();\n\n //Se muestra un mensaje en pantalla de lo que seleciono\n Next();\n }", "@Override\n public void onClick(View v) {\n Intent r1page = new Intent(v.getContext(), the_oxford_kitchen.class);\n startActivity(r1page);\n }", "@UiHandler(\"status\")\n \tpublic void onStatusClicked(ClickEvent e) {\n \t\tdelegate.showApplicationLoading(true);\n \t\tLog.info(\"onStatusClicked\");\n \t\tif (proxy.getStatus() == StandardizedPatientStatus.ANONYMIZED) {\n \t\t\tstatus.setVisible(false);\n \t\t} else {\n \t\t\tdelegate.statusClicked();\n \t\t}\n \t\tdelegate.showApplicationLoading(false);\n \t}", "public void handleNavMenuViewProfile() {\n if (user != null) {\n view.launchProfilePage(user);\n }\n }", "public void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\tpublic void mouseClicked(MouseEvent event) {\n\n\t\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\tLinkLikeButton source = (LinkLikeButton) e.getSource();\r\n\t\tif(e.getClickCount()==1){\r\n\t\tif (source.getName().equals(\"TableLinkLikeButton\")) {\r\n\t\t\tif (source.getText().equals(\"Tags\") || source.getText().equals(\"Ingress\") || source.getText().equals(\"Egress\") || source.getText().equals(\"Rules\") || source.getText().equals(\"All Actions\") || source.getText().equals(\"All Conditions\")\r\n\t\t\t\t\t|| source.getText().equals(\"Redirect\") || source.getText().startsWith(\"ELBs\") || source.getText().contains(\"targetgroup\") || source.getText().contains(\"Method Settings\")) {\r\n\t\t\t\t// Do nothing\r\n\t\t\t} else {\r\n\t\t\t\tsource.getCustomAWSObject().showDetailesFrame(getAccount(), source.getCustomAWSObject(), jScrollableDesktopPan);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t\tsource.getCustomAWSObject().showDetailesFrame(getAccount(), source.getCustomAWSObject(), jScrollableDesktopPan);\r\n\t\t}\r\n\t\t}\r\n\t}", "public void clickUserProfile(){\r\n driver.findElement(userTab).click();\r\n driver.findElement(profileBtn).click();\r\n }", "Point userClickPoint();", "@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\r\n\t\t\t\tIntent Intent=new Intent(MainPage.this,TimeTable1.class);\r\n\t\t\t\tstartActivity(Intent);\r\n\t\t\t}", "public void onSignInClick(MouseEvent e) {\n\t\tsignin();\n\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\n\t\t\t\tIntent i = new Intent(NewProfileActivity.this,\n\t\t\t\t\t\tTBDispContacts.class);\n\t\t\t\ti.putExtra(\"Edit\", \"true\");\n\t\t\t\ti.putExtra(\"Details\", \"false\");\n\t\t\t\tstartActivity(i);\n\t\t\t}", "@Override\n public void onClick(View v) {\n Intent i = new Intent(UserProfile.this, SignInActivity.class);\n startActivity(i);\n }", "public void goStationDetail(MouseEvent e) throws IOException {\n BriefStation briefStation = list.getSelectionModel().getSelectedItem();\n int stationId = briefStation.getStationId();\n App.getInstance().display_StationDetailScreen(stationId);\n }", "@Override\n\tpublic void onClick(ClickEvent arg0) {\n\t\t\n\t}", "@Override\n public void onClick(View view)\n {\n Intent intent = new Intent(BoilerRoom.this, Inspection.class);\n startActivity(intent);\n }", "public void mouseClicked(MouseEvent e) {\n\n }" ]
[ "0.75237674", "0.68899626", "0.6864632", "0.65882754", "0.6463012", "0.64601487", "0.6446266", "0.63732207", "0.63136375", "0.63035786", "0.62906206", "0.62906206", "0.62478864", "0.6225731", "0.6216265", "0.62103575", "0.61850643", "0.61806256", "0.6165308", "0.61493033", "0.6145505", "0.61171776", "0.6112331", "0.6077547", "0.6076803", "0.6064147", "0.60567564", "0.6053483", "0.605124", "0.60363686", "0.6034749", "0.6030332", "0.6019515", "0.60142165", "0.6010412", "0.60079455", "0.6005772", "0.5998886", "0.5991909", "0.59918374", "0.599117", "0.5990024", "0.5973924", "0.5969456", "0.5956509", "0.59440356", "0.59321994", "0.59298825", "0.5907988", "0.5893036", "0.58925104", "0.58750427", "0.5874512", "0.58692175", "0.5864629", "0.5860448", "0.5860446", "0.5850403", "0.584267", "0.5840684", "0.5836782", "0.5835272", "0.58349234", "0.5834052", "0.5828048", "0.5827946", "0.58270335", "0.5815985", "0.58151186", "0.58075947", "0.5801266", "0.5801208", "0.57980096", "0.57960415", "0.57922757", "0.5790281", "0.57889146", "0.57869273", "0.5786159", "0.57860565", "0.57841855", "0.577808", "0.5778075", "0.57778525", "0.5777357", "0.576429", "0.5760445", "0.5753261", "0.5743266", "0.5742336", "0.57411766", "0.57407814", "0.57406723", "0.57385236", "0.57365316", "0.57351375", "0.5731926", "0.5727188", "0.5724652", "0.5720438" ]
0.67808074
3
On organisator clicked, go to user profile
@Override public void onItemOfListClicked(Object o) { UserProfileFragmentDirections.ActionUserProfileFragmentSelf action = UserProfileFragmentDirections.actionUserProfileFragmentSelf(); action.setUser((MyUser) o); navController.navigate(action); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void gotoUserProfile() {\n Intent launchUserProfile = new Intent(this, Profile.class);\n startActivity(launchUserProfile);\n }", "public void goToProfilePage() {\n\t\tUtil.element(userTab, driver).click();\n\t}", "public void clickUserProfile(){\r\n driver.findElement(userTab).click();\r\n driver.findElement(profileBtn).click();\r\n }", "public void clickOnProfile() {\n\t\telement(\"link_profile\").click();\n\t\tlogMessage(\"User clicks on Profile on left navigation bar\");\n\t}", "public void handleNavMenuViewProfile() {\n if (user != null) {\n view.launchProfilePage(user);\n }\n }", "public void getUserProfile() {\n\t\tkeypad.UserProfiles.click();\n\t}", "@Override\n public void onClick(View v) {\n Intent myIntent = new Intent(ChooseParty.this, UserProfile.class);\n //\n myIntent.putExtra(\"username\", mUsername);\n startActivity(myIntent);\n }", "void gotoEditProfile();", "@Override\n public void onClick(View v) {\n Intent i = new Intent(UserProfile.this, SignInActivity.class);\n startActivity(i);\n }", "private void onEditProfileClicked() {\n Intent intent = new Intent(this, ProfileCreationActivity.class);\n intent.putExtra(ProfileCreationActivity.EDIT_USER_PROFILE, true);\n intent.putExtra(ProfileCreationActivity.RETURN_TO_PREVIOUS, true); // we want to return to here, not HomeActivity on cancel or submit\n startActivity(intent);\n }", "void gotoEditProfile(String fbId);", "public void onClick(View v) {\n\t\t\t\t\t\t\tIntent gotohomefrommyaccount = new Intent(UserProfileActivity.this, HomeActivity.class);\n\t\t\t\t\t\t\tstartActivity(gotohomefrommyaccount);\n\t\t\t\t\t\t}", "public void openProfile(){\n\t\t\n\t\tclickElement(profile_L, driver);\n\t}", "@Override\n public void onAvatarClick(String username) {\n Intent intent = new Intent(getActivity(), UserProfileActivity.class);\n intent.putExtra(EaseConstant.USER_NAME, username);\n startActivity(intent);\n }", "public void goToUserProfile (View view){\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tBundle data = new Bundle();\n\t\t\t\tdata.putSerializable(\"user\", user);\n\t\t\t\tIntent intent = new Intent(HostpageActivity.this,\n\t\t\t\t\t\tAssistantpageActivity.class);\n\t\t\t\tintent.putExtras(data);\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "@Override\n public void onClick(View view) {\n\n Intent intent = new Intent(LoginActivity.this, ProfileSetupActivity.class);\n startActivity(intent);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tBundle data = new Bundle();\n\t\t\t\tdata.putSerializable(\"user\", user);\n\t\t\t\tIntent intent = new Intent(HostpageActivity.this,\n\t\t\t\t\t\tSlimepageActivity.class);\n\t\t\t\tintent.putExtras(data);\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(context,UserProfileActivity.class);\n intent.putExtra(AppConstants.USER_ID,postDetailModel.getUserDetailsModel().getId());\n startActivity(intent);\n }", "@Override\n public void onClick(View view) {\n launchGridProfile(view);\n }", "@Override\n public void onClick(View view) {\n launchGridProfile(view);\n }", "public void onProfileView(MenuItem item) {\n Intent i = new Intent(this, ProfileActivity.class);\n startActivity(i);\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(getContext(), ProfileActivity.class);\n startActivity(intent);\n\n }", "private void goToSelectionScreen(User user){\n Intent i = new Intent(getApplicationContext(), PlaySelectionActivity.class);\n i.putExtra(\"user\", user);\n startActivity(i);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tBundle data = new Bundle();\n\t\t\t\tdata.putSerializable(\"user\", user);\n\t\t\t\tIntent intent = new Intent(HostpageActivity.this,\n\t\t\t\t\t\tSettingspageActivity.class);\n\t\t\t\tintent.putExtras(data);\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tString url = mAuth.getAuthUrl();\n\t\t\t\tshowPopUp(url);\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent=new Intent(getApplicationContext(),Login_Profile.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t\t\n\t\t\t}", "public void clickUserIcon(){\n getUiInstance().getElement(locators.linkUser, Constant.DEFAULT_TIMEOUT).click();\n reporter.info(\"Clicking person icon\");\n }", "private void showProfile(User user){\n\n Intent i = new Intent(this, ProfileActivity.class);\n i.putExtra(\"user\", user);\n startActivity(i);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()){\n case R.id.logIn:\n Intent login = new Intent(this, SigninActivity.class);\n startActivity(login);\n Toast.makeText(getApplicationContext(),\"Log in\", Toast.LENGTH_SHORT).show();\n\n break;\n case R.id.SignUp:\n Intent signupIntent = new Intent(this, SignupActivity.class);\n startActivity(signupIntent);\n break;\n case R.id.logOut:\n\n if(helper.logout()){\n finish();\n Intent toSignin = new Intent(this, SigninActivity.class);\n startActivity(toSignin);\n }\n\n break;\n\n case R.id.profile:\n int user = helper.getCurrentUser();\n Intent toProfile;\n if(user == 0){\n toProfile = new Intent(MainActivity.this, BarberProfileMenu.class);\n\n toProfile.putExtra(\"EMAIL\", helper.getEMAIL());\n startActivity(toProfile);\n }\n else if(user == 1){\n System.out.println(\"It's User\");\n toProfile = new Intent(this, UserProfile.class);\n startActivity(toProfile);\n }\n else\n Toast.makeText(this,\"Invalid User\", Toast.LENGTH_SHORT).show();\n\n break;\n\n default:\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public void onClick(View v) {\n startActivity(new Intent(mContext, ActivityProfile.class));\n }", "@Override\n public void onClick(View v) {\n\t \tIntent myIntent = new Intent(MainActivity.this, Profile.class);\n\t \t//myIntent.putExtra(\"key\", value); //Optional parameters\n\t \tMainActivity.this.startActivity(myIntent);\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(context,ProfileActivity.class);\n startActivity(intent);\n }", "@Override\n public void userPageViewConcerts() {\n Intent intent = new Intent(userPageModel.this, viewConcertsPageModel.class);\n startActivity(intent);\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(view.getContext(), PollCreationActivity.class);\n Bundle b = new Bundle();\n b.putSerializable(Constants.UserBundleKey, currentUser);\n intent.putExtras(b);\n startActivity(intent);\n }", "public void ClickUserInformationPage() {\r\n\t\tuserinfo.click();\r\n\t\t\tLog(\"Clicked the \\\"User Information\\\" button on the Birthdays page\");\r\n\t}", "@Override\r\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n DeveloperProfileActivity.setDeveloper(adapter.getItem(position));\r\n Intent intent = new Intent(MainActivity.this, DeveloperProfileActivity.class);\r\n startActivity(intent);\r\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tIntent intent2 = new Intent(getApplicationContext(), Election_List.class);\n\t\t intent2.putExtra(\"user_id\", user_id);\n\t\t startActivity(intent2);\n\t\t finish();\n\t\t\t\t\n\t\t\t}", "@Override\n public void onClick(Author clickedItem) {\n Intent intent = new Intent(SearchUserActivity.this, UserActivity.class);\n intent.putExtra(AUTHOR_KEY, clickedItem.firebaseId);\n\n startActivity(intent);\n }", "public void ClickAccount() {\n if (lnkAccount.isDisplayed()) {\n lnkAccount.click();\n }\n else{System.out.println(\"Account link is not displayed\");}\n }", "public void onSignupClickedListener(View view) {\n\n Intent intent = new Intent(this, PersonalAccountActivity.class);\n startActivity(intent);\n }", "private void goToActivity(Class goToClass) {\n Intent intent = new Intent(MenuActivity.this, goToClass);\n intent.putExtra(USER_ID,user.getId());\n intent.putExtra(USERNAME,user.getUserName());\n startActivity(intent);\n }", "public void myProfileCardClicked(View view) {\n Intent myProfileIntent = new Intent(this, MyProfile.class);\n startActivity(myProfileIntent);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent(parentAct,UserSetingActivity.class);\n\t\t\t\tparentAct.startActivity(intent);\n\t\t\t}", "public void gotoProfileActivity()\n {\n Log.e(\"next\",\"\"+\"log\");\n startActivity(new Intent(OTPActivity.this, UserProfileActivity.class));\n finish();\n }", "@Override\n public void onClick(View v) {\n\n Intent intent1=new Intent(mContext,ProfileActivity.class);\n intent1.putExtra(\"uid\",String.valueOf(item.getUid()));\n mContext.startActivity(intent1);\n\n }", "public void goToProfilePage(View view) {\n Intent intent = new Intent(this, ProfilePage.class);\n startActivity(intent);\n }", "public void goToUserProfile(User user) {\n\t\tBundle data = new Bundle();\n\t\tdata.putParcelable(\"User\",user);\n\t\tFragmentProfileOtherUser fpou = new FragmentProfileOtherUser();\n\t\tfpou.setArguments(data);\n\t\t\n\t\tandroid.support.v4.app.FragmentTransaction transaction = getFragmentManager().beginTransaction();\n\t\ttransaction.replace(R.id.container_fragment_main,fpou);\n\t\ttransaction.addToBackStack(null);\n\t\ttransaction.commit();\t\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tBundle data = new Bundle();\n\t\t\t\tdata.putSerializable(\"user\", user);\n\t\t\t\tIntent intent = new Intent(HostpageActivity.this,\n\t\t\t\t\t\tExercisepageActivity.class);\n\t\t\t\tintent.putExtras(data);\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "@When(\"^When user navigates to profile page$\")\n\tpublic void when_user_navigates_to_profile_page() throws Throwable {\n\t\twait.WaitForElement(reviewConfirmationPageObjects.getmuserlink(), 60);\n\t\treviewConfirmationPageObjects.clickonprofile();\n\t}", "@Override\n\tpublic void showProfile() {\n\t\t\n\t}", "private void goToDoctors() {\n\n Intent intent = new Intent(this, DoctorsActivity.class);\n intent.putExtra(EXTRA_EMAIL, email);\n startActivity(intent);\n\n }", "private void showHome(String user){\n\n Intent home = new Intent(this, HomeActivity.class);\n home.putExtra(\"email\", user);\n startActivity(home);\n\n }", "public void openProfileHome(View view) {\n Intent intentProfileHome = new Intent(view.getContext(), ProfileHomeActivity.class);\n startActivity(intentProfileHome);\n }", "@Override\n\tpublic void openUserProfileFromActivity(WUser wuser) {\n\t\t\n\t}", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(UserDetails.this, ChatWindow.class);\n intent.putExtra(\"user\", user); //pass the user to the ChatWindow activity\n startActivity(intent);\n }", "public void newUserClicked(View view) {\r\n Intent intent = new Intent(this, SignUpActivity.class);\r\n startActivity(intent);\r\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent i = new Intent(HomeScreen.this, LoginAndRegistrion.class);\n\t\t\t\tstartActivity(i);\n\t\t\t}", "public void clickHomeProfilePage() {\n wait.until(CustomWait.visibilityOfElement(profileHomePageButton));\n profileHomePageButton.click();\n }", "@Override\n public void onClick(View v) {\n Intent i = new Intent(mContext, ProfilActivity.class);\n i.putExtra(\"uid\",annonceCovoitureurs.get(position).getUtilisateur_id());\n mContext.startActivity(i);\n }", "public String gotoeditprofile() throws IOException {\n\t\treturn \"editProfil.xhtml?faces-redirect=true\";\n\t}", "@Override\r\n\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"个人中心\", Toast.LENGTH_LONG).show();\r\n\t\t\t\t}", "public void newuserclicked(View view) {\n Intent myuserIntent = new Intent(this, UserCreation.class);\n startActivity(myuserIntent);\n }", "private void goToEditPage()\n {\n Intent intent = new Intent(getActivity(),EditProfilePage.class);\n getActivity().startActivity(intent);\n }", "@Override\n public void onClick(View v) {\n String currentUser = firebaseAuth.getCurrentUser().getUid();\n// Log.d(TAG, \"onClickActif: \" + currentUser);\n\n if (!currentUser.equals(user_id)) {\n\n Log.d(TAG, \"onClickFriend: \");\n Intent komentar = new Intent(v.getContext(), FriendActivity.class);\n komentar.putExtra(\"idUser\", user_id);\n v.getContext().startActivity(komentar);\n } else {\n Log.d(TAG, \"onClickProfile: \");\n Intent komentar = new Intent(v.getContext(), ProfileActivity.class);\n komentar.putExtra(\"idUser\", user_id);\n v.getContext().startActivity(komentar);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.profile_menu) {\n Intent intent = new Intent(this, ProfileActivity.class);\n startActivity(intent);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "public static void Goto()\n\t{\n\t\tUserLogin.Login();\n\t\t\t\t\n\t\t//Choose community\n\t\tWebElement Community= Driver.Instance.findElement(PageObjRef.CommunityTab);\n\t\tCommunity.click();\n\t\tWebElement CommunityToJoin= Driver.Instance.findElement(PageObjRef.CommunityToJoin);\n\t CommunityToJoin.click();\n\t\t\n\t}", "private void userSelected(MouseEvent e) {\n User user = getUser(e);\n if (user != null) {\n userListener.userClicked(user, e);\n }\n }", "public void goToLoginPage()\n\t{\n\t\tclickAccountNameIcon();\n\t\tclickSignInLink();\n\t}", "@Override\n public void onClick(View view) {\n Intent nameIntent = new Intent(AccountSettingsActivity.this, NameActivity.class);\n startActivity(nameIntent);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item)\n {\n \n switch (item.getItemId())\n {\n case R.id.viewAccount:\n Intent intent = new Intent(this, ViewAccountActivity.class);\n Integer targetAccountID = FMSApplication.getInstance().getCurrentAccount().getAccountId();\n intent.putExtra(\"targetAccount\", targetAccountID);\n startActivity(intent);\n Toast.makeText(getApplicationContext(), \"\\\"Viewing your account.\\\"\", Toast.LENGTH_SHORT).show();\n return true;\n \n case R.id.logoutButton:\n Toast.makeText(getApplicationContext(), \"\\\"See you next time!\\\"\", Toast.LENGTH_SHORT).show();\n FMSApplication.getInstance().setCurrentAccount(null);\n startLoginActivity();\n return true;\n \n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n\t\t\t// On click function\n\t\t\tpublic void onClick(View view) {\n\t\t\t\tIntent intent = new Intent(view.getContext(),\n\t\t\t\t\t\tEditProfileActivity.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t\tfinish();\n\t\t\t}", "public void signInUser(){\n Intent intent = new Intent(this, AuthUiActivity.class);\n startActivity(intent);\n }", "private void startPersonalActivity(String user_id) {\n }", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if(id == R.id.nav_profile) {\n ParseObject userPO = (ParseObject) ParseUser.getCurrentUser();\n User user = new User(userPO);\n Intent profileIntent = new Intent(this, ProfileActivity.class);\n profileIntent.putExtra(\"user\", user);\n startActivity(profileIntent);\n } else if(id == R.id.nav_joined_teams) {\n Intent orgsIntent = new Intent(this, MyOrgsActivity.class);\n startActivity(orgsIntent);\n } else if(id == R.id.nav_owned_teams) {\n Intent orgsIntent = new Intent(this, MyOrgsActivity.class);\n startActivity(orgsIntent);\n }\n else if (id == R.id.nav_logout) {\n doLogout();\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "@Override\r\n public boolean onNavigationItemSelected(@NonNull MenuItem item) {\n item.setChecked(true);\r\n // close drawer when item is tapped\r\n drawer.closeDrawers();\r\n switch (item.getItemId()){\r\n case R.id.nav_out:\r\n Logout();\r\n return true;\r\n case R.id.nav_choice:\r\n Intent choiceIntent = new Intent(getApplicationContext(), ChoiceMaker.class);\r\n choiceIntent.putExtra(\"username\", user.getUsername());\r\n startActivity(choiceIntent);\r\n return true;\r\n case R.id.nav_pref:\r\n Intent prefIntent = new Intent(getApplicationContext(), CarePreference.class);\r\n prefIntent.putExtra(\"username\", user.getUsername());\r\n startActivity(prefIntent);\r\n return true;\r\n case R.id.nav_display:\r\n Intent displayIntent = new Intent(getApplicationContext(), AcpResultDisplay.class);\r\n displayIntent.putExtra(\"username\", user.getUsername());\r\n startActivity(displayIntent);\r\n return true;\r\n\r\n }\r\n return false;\r\n }", "private void profileButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_profileButtonActionPerformed\n // TODO add your handling code here:\n this.setVisible(false);\n this.parentNavigationController.getUserProfileController();\n }", "@Override\n public void onClick(View view) {\n userManager.setPerson(new Person(\"吴洪春\",\"2018\"));\n }", "@Override\n public void onAuthenticated(AuthData authData) {\n Intent intent = new Intent(getApplicationContext(), ActiveUserActivity.class);\n startActivity(intent);\n }", "public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n SharedPreferences.Editor p_editor = myPrefs.edit();\n User viewProf = profiles.get(position);\n p_editor.putString(\"view_email\", viewProf.getUsername());\n p_editor.commit();\n main.viewProfile(position);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.profile) {\n Intent io = new Intent(MainActivity.this, ProfileActivity.class);\n startActivity(io);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.setClass(Admin2Home.this, Admin2Infomation.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "@Override\n\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\tAnimation alpha = new AlphaAnimation(0.5f, 1.0f);\n\t\t\t\t\talpha.setDuration(200);\n\t\t\t\t\tlogin.startAnimation(alpha);\n\n\t\t\t\t\tIntent intent = new Intent(Main.this, User_information.class);\n\t\t\t\t\tMain.this.startActivity(intent);\n\t\t\t\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n Intent intent = new Intent(this, HomePage.class);\n intent.putExtra(\"USER_EMAIL\", email);\n startActivity(intent);\n finish();\n return true;\n }\n return true;\n }", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_profile) {\n myU.getCurrentUser();\n User us=myU.getmyUser();\n Intent gall = new Intent(FaceMatch.this,MyProfile.class);\n\n// TODO: user Obyecti yaratib onu myProfile otur\n startActivity(gall);\n\n } else if (id == R.id.log_Out) {\n Back();\n } else if (id == R.id.find_match) {\n Intent find = new Intent(FaceMatch.this, FindMatchActivity.class);\n startActivity(find);\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tlog.info(\"in jump\");\n\t\t\t\tIntent inten = new Intent(Main_Activity.this, Jump.class);\n\t\t\t\tif(userName.isEmpty()){\n\t\t\t\t\tToast.makeText(Main_Activity.this, \"You need to login first!\", Toast.LENGTH_LONG).show();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tBundle myBundle = new Bundle();\n\t\t\t\t\tmyBundle.putString(\"name\",person_name);\n\t\t\t\t\tmyBundle.putString(\"username\", userName);\n\t\t\t\t\tinten.putExtras(myBundle);\n\t\t\t\t\tstartActivity(inten);\n\t\t\t\t}\n\t\t\t\t}", "@Override\n public void onUserItemClicked(User user) {\n Intent intent = new Intent(getApplicationContext(), PostsActivity.class);\n intent.putExtra(User.USER_KEY, Parcels.wrap(user));\n startActivity(intent);\n }", "@Override\n public void onClick(View v) {\n SharedPreferences sharedPreferences = getSharedPreferences( USERNAME_KEY, MODE_PRIVATE );\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString( USERNAME_key, null );\n editor.apply();\n\n //berpindah activity\n Intent gotohome = new Intent(My_ProfilAct.this,SignInAct.class);\n startActivity( gotohome );\n finish();\n }", "private void goToLandingPage() {\r\n Intent intent = LandingPage.getIntent(MainActivity.this);\r\n intent.putExtra(LandingPage.USERNAME_EXTRA, userText.getText().toString());\r\n startActivity(intent);\r\n }", "private void launchProfilesActivity() {\n Intent intent = new Intent(this, ProfilesActivity.class);\n startActivity(intent);\n }", "@Override\n public void onUserClicked(Users users) {\n\n }", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\t\t\t\t\n\t\t\t\t\n\n\t\t\t\tListAdapter ca = (ListAdapter) arg0\n\t\t\t\t\t\t.getAdapter();\n\t\t\t\tList ls = (List) ca.getItem(arg2);\n\t\t\t\t\n\n\t\t\t\t Intent intent = new Intent(main.this, ProfileActivity.class);\n\t\t\t\t intent.putExtra(\"member_srl\", String.valueOf(ls.getTag()));\n\t\t\t\t\tstartActivity(intent);\n\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\n\t\t\t\tIntent i = new Intent(NewProfileActivity.this,\n\t\t\t\t\t\tTBDispContacts.class);\n\t\t\t\ti.putExtra(\"Edit\", \"true\");\n\t\t\t\ti.putExtra(\"Details\", \"false\");\n\t\t\t\tstartActivity(i);\n\t\t\t}", "private void goMainActivity() {\n Intent i = new Intent(this, ProfileActivity.class);\n startActivity(i);\n\n //prevents user going back to this screen after signing up\n finish();\n }", "@Override\n public void onClick(View v) {\n showPopupMenuProfil(profil);\n }", "public void onClick(View view) {\n if(validate_info()){\n create_user();\n user = FirebaseAuth.getInstance().getCurrentUser();\n if (user != null) {\n submit_profile(user);\n }\n }\n else{\n return;\n\n\n }\n }", "public void myProfile(View v) {\n\t\tIntent intent = new Intent(RootMenuActivity.this,\n\t\t\t\tMyProfileActivity.class);\n\t\tintent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n\t\tstartActivity(intent);\n\t}", "private void SendUserToInfoPage(){\n Intent intent = new Intent(sign_up_activity.this,user_info_activity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK|Intent.FLAG_ACTIVITY_CLEAR_TASK);\n overridePendingTransition(0,0);\n startActivity(intent);\n finish();\n }", "@Override\n public void switchToProfileByBottomNavigation() {\n mMainView.switchProfileUiInitiative();\n }", "public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.workout_history) {\n Intent intent = new Intent(this, WorkoutHistory.class);\n startActivity(intent);\n } else if (id == R.id.add_workout) {\n Intent intent = new Intent(this, AddRunActivity.class);\n startActivity(intent);\n } else if (id == R.id.add_shoe) {\n Intent intent = new Intent(this, ShoeActivity.class);\n startActivity(intent);\n }/*keep commented out\n else if (id == R.id.leaderboard) {\n\n }*/\n else if (id == R.id.goals) {\n Intent intent = new Intent(this, GoalsActivity.class);\n startActivity(intent);\n } else if(id == R.id.statistics) {\n Intent intent = new Intent(this, StatisticsActivity.class);\n intent.putExtra(\"Runs\", user.getEmail()); //TODO DO THIS KLAYDON\n startActivity(intent);\n } else if(id == R.id.personalInfo){\n Intent intent = new Intent(this, PersonalInfoActivity.class);\n startActivity(intent);\n } else if (id == R.id.about) {\n Intent intent = new Intent(DashboardActivity.this, AboutActivity.class);\n startActivity(intent);\n }\n /* else if(id == R.id.settings){\n Intent intent = new Intent(this, SettingsActivity.class);\n startActivity(intent);\n }*/\n else if(id == R.id.signout){\n auth.signOut();\n Intent intent = new Intent(DashboardActivity.this, LoginActivity.class);\n startActivity(intent);\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }" ]
[ "0.7487481", "0.7004802", "0.67729425", "0.664385", "0.66110677", "0.6608854", "0.6581219", "0.657915", "0.6569611", "0.64856976", "0.64811885", "0.64685315", "0.6421006", "0.64089984", "0.6398304", "0.63905823", "0.6374553", "0.63731897", "0.6360012", "0.6356951", "0.6356951", "0.6349467", "0.63266027", "0.63260627", "0.63236153", "0.6319807", "0.6307452", "0.630029", "0.62837833", "0.62515825", "0.6238004", "0.6207224", "0.6202786", "0.61840427", "0.6181352", "0.6177493", "0.61683834", "0.61599326", "0.6149679", "0.6113206", "0.6100332", "0.6098919", "0.60900426", "0.6078696", "0.60764045", "0.6071665", "0.60603404", "0.60541326", "0.6053696", "0.602961", "0.60282683", "0.6026743", "0.6023446", "0.6010937", "0.59907115", "0.5989998", "0.5985763", "0.5983418", "0.59829235", "0.59764206", "0.596418", "0.5961994", "0.59530526", "0.5940689", "0.59215933", "0.5919461", "0.5914151", "0.59032875", "0.5900571", "0.5897339", "0.5895672", "0.58859223", "0.5882288", "0.58787805", "0.5864241", "0.58583856", "0.5850536", "0.5850476", "0.58497953", "0.584942", "0.58468807", "0.58411753", "0.58411103", "0.5836347", "0.58308846", "0.5819633", "0.58133334", "0.5810067", "0.58032864", "0.5792646", "0.57880324", "0.57840306", "0.5781979", "0.5778708", "0.5775827", "0.57548153", "0.57489854", "0.57427824", "0.57323647", "0.57311773" ]
0.66349155
4
Set organisator to events and update ui
public void setOrganisator(MyUser organisator) { if (createdEvents != null) { for (int i = 0; i < createdEvents.size(); i++) { createdEvents.get(i).setOrganisator(organisator); } adapderEventCard.notifyDataSetChanged(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tprotected void initEvents() {\n\t\t\r\n\t}", "private void initializeEvents() {\r\n\t}", "private void doEvents() {\n\t\tapplyEvents(generateEvents());\t\t\n\t}", "private void populateUI(Event event){\n mTitle.setText(event.getTitle()); //sets title to event title\n mDescription.setText(event.getDescription());\n }", "public gui_Eventedit(manager_userClient userClient) {\n userClientParent = userClient;\n initComponents();\n }", "private void createEvents() {\n\t}", "EventManager()\n {\n }", "private void setUpEventManager() {\n // Register the actionEventListener1 to MockUndoableAction class\n eventManager.addActionEventListener(actionEventListener1, MockAddClassDiagramAction.class);\n // Register the actionEventListener2 to all Action class\n eventManager.addActionEventListener(actionEventListener2);\n // Register the actionEventListener3 to simple Action Class\n eventManager.addActionEventListener(actionEventListener3, Action.class);\n\n // Register the validators to UndoableAction.class\n eventManager.addEventValidator(successEventValidator, UndoableAction.class);\n // Register the validators to all Action class\n eventManager.addEventValidator(modifiedEventValidator);\n // Register the validators to simple Action Class\n eventManager.addEventValidator(deniedEventValidator, Action.class);\n\n // Register the gUIEventListener1 to 'RedoChangesEvent'\n eventManager.addGUIEventListener(gUIEventListener1, RedoChangesEvent.class);\n // Register the gUIEventListener2 to all EventObject\n eventManager.addGUIEventListener(gUIEventListener2);\n // Register the gUIEventListener3 to 'UndoChangesEvent'\n eventManager.addGUIEventListener(gUIEventListener3, UndoChangesEvent.class);\n }", "public TraitGuiListener(){\n\t\tplugin = RacesAndClasses.getPlugin();\n\t\tBukkit.getPluginManager().registerEvents(this, plugin);\n\t}", "public void addNotify() {\r\n\t\tsuper.addNotify();\r\n\t\tcalendar = new JPopupCalendar(getParentWindow(), this);\r\n\t}", "public void initEventsAndProperties() {\r\n }", "public void createEvents(){\r\n\t\tbtnCurrent.addActionListener((ActionEvent e) -> JLabelDialog.run());\r\n\t}", "@Override\n protected void initializeEventList()\n {\n }", "private void initEvents(){\n ArrayList<Event> en = new ArrayList();\n en.add(new Event_MessangerOfGods(this.village));\n en.add(new Event_PaganPriest(this.village));\n this.events = en;\n }", "private void initialize() {\r\n\t\tmanager = new EventManager();\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(100, 100, 850, 600);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\r\n\t\tJMenuBar menuBar = new JMenuBar();\r\n\t\tframe.setJMenuBar(menuBar);\r\n\r\n\t\tJMenu JmFile = new JMenu(\"File\");\r\n\t\tmenuBar.add(JmFile);\r\n\r\n\t\tJMenuItem mntmSave = new JMenuItem(\"Save\");\r\n\t\tfinal CalenderGui forgetThis = this;\r\n\t\tmntmSave.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tSaveDialog save = new SaveDialog(true, manager, forgetThis);\r\n\t\t\t\tsave.setVisible(true);\r\n\t\t\t}\r\n\t\t});\r\n\t\tfinal EventManager ma = manager;\r\n\r\n\t\tJMenuItem mntmNew = new JMenuItem(\"New\");\r\n\t\tmntmNew.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tma.clearEventManager();\r\n\t\t\t\tforgetThis.remake();\r\n\t\t\t}\r\n\t\t});\r\n\t\tJmFile.add(mntmNew);\r\n\t\tJmFile.add(mntmSave);\r\n\r\n\t\tJMenuItem mntmLoad = new JMenuItem(\"Load\");\r\n\t\tmntmLoad.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tSaveDialog save = new SaveDialog(false, manager, forgetThis);\r\n\t\t\t\tsave.setVisible(true);\r\n\t\t\t}\r\n\t\t});\r\n\t\tJmFile.add(mntmLoad);\r\n\r\n\t\tJMenuItem mntmExit = new JMenuItem(\"Exit\");\r\n\t\tmntmExit.addActionListener(new closeListener(frame));\r\n\t\tJmFile.add(mntmExit);\r\n\r\n\t\tJMenu mnEvents = new JMenu(\"Events\");\r\n\t\tmenuBar.add(mnEvents);\r\n\r\n\t\tJMenuItem mntmAddEvent = new JMenuItem(\"Add Event\");\r\n\t\tmntmAddEvent.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tAddEvent eventDialog = new AddEvent(forgetThis);\r\n\t\t\t\teventDialog.setVisible(true);\r\n\t\t\t}\r\n\t\t});\r\n\t\tmnEvents.add(mntmAddEvent);\r\n\t\tframe.getContentPane().setLayout(new GridLayout(0, 1, 0, 0));\r\n\t\t\r\n\t\tJTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);\r\n\t\tframe.getContentPane().add(tabbedPane);\r\n\t\tDefaultListModel<Event> model = new DefaultListModel<Event>();\r\n\t\tfor(Event e: manager.getAllEvents()){\r\n\t\t\tmodel.addElement(e);\r\n\t\t}\r\n\t\t\r\n\t\tJScrollPane scrollPane = new JScrollPane();\r\n\t\ttabbedPane.addTab(\"Daily\", null, scrollPane, null);\r\n\t\t\r\n\t\tJList<Event> list = new JList<Event>();\r\n\t\tlist.addKeyListener(new delKeyListener(manager, this, list));\r\n\t\tlist.setModel(model);\r\n\t\tdailyList = list;\r\n\t\tdailyModel = model;\r\n\t\tscrollPane.setViewportView(list);\r\n\t\t\r\n\t\tJScrollPane scrollPane_1 = new JScrollPane();\r\n\t\ttabbedPane.addTab(\"Weekly\", null, scrollPane_1, null);\r\n\t\t\r\n\t\tJList<Event> list_1 = new JList<Event>();\r\n\t\tmodel = new DefaultListModel<Event>();\r\n\t\tlist_1.setModel(model);\r\n\t\tweeklyList = list_1;\r\n\t\tweeklyModel = model;\r\n\t\tlist_1.addKeyListener(new delKeyListener(manager, this, list_1));\r\n\t\tscrollPane_1.setViewportView(list_1);\r\n\t\t\r\n\t\tJScrollPane scrollPane_2 = new JScrollPane();\r\n\t\ttabbedPane.addTab(\"Monthly\", null, scrollPane_2, null);\r\n\t\t\r\n\t\tJList<Event> list_2 = new JList<Event>();\r\n\t\t\r\n\t\tmodel = new DefaultListModel<Event>();\r\n\t\tlist_2.setModel(model);\r\n\t\tmonthlyList = list_2;\r\n\t\tmonthlyModel = model;\r\n\t\tlist_2.addKeyListener(new delKeyListener(manager, this, list_2));\r\n\t\t\r\n\t\tscrollPane_2.setViewportView(list_2);\r\n\t\t\r\n\t\tJScrollPane scrollPane_3 = new JScrollPane();\r\n\t\ttabbedPane.addTab(\"Yearly\", null, scrollPane_3, null);\r\n\t\t\r\n\t\tJList<Event> list_3 = new JList<Event>();\r\n\t\tmodel = new DefaultListModel<Event>();\r\n\t\tlist_3.setModel(model);\r\n\t\tyearlyList = list_3;\r\n\t\tyearlyModel = model;\r\n\t\tscrollPane_3.setViewportView(list_3);\r\n\t\t\r\n\t\t\r\n\r\n\t}", "public abstract void setEventManager(OwEventManager eventManager_p);", "public void setOrgScheduleController(){\n setChanged();\n notifyObservers(orgScheduleController);\n }", "private void registerEvents(){\n Bukkit.getPluginManager().registerEvents(new RegionListener(), this);\n Bukkit.getPluginManager().registerEvents(new SignListener(), this);\n Bukkit.getPluginManager().registerEvents(new PrisonerListener(), this);\n Bukkit.getPluginManager().registerEvents(new PrisonBlockListener(), this);\n Bukkit.getPluginManager().registerEvents(new MonitorListener(), this);\n Bukkit.getPluginManager().registerEvents(new PortalListener(), this);\n }", "public abstract void initUiAndListener();", "@Override\n public void eventsChanged() {\n }", "private UserInteraction() {\n\t\tthis.elevatorManager = ElevatorManager.getInstance();\n\t}", "public void triggerEvent() {\n\t\ts.changeOpenState();\n\t\ts.setChangedAndNotify();\n\t\t\n\t}", "@Override\n\tprotected void initUIandEvent()\n\t{\n\t\tnew Handler(Looper.getMainLooper()).postDelayed(new Runnable() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tIntent i = new Intent(MainActivity.this, LiveRoomActivity.class);\n\t\t\t\t\ti.putExtra(ConstantApp.ACTION_KEY_CROLE, Constants.CLIENT_ROLE_AUDIENCE);\n\t\t\t\t\ti.putExtra(ConstantApp.ACTION_KEY_ROOM_NAME, \"channel_00_01\");\n\t\t\t\t\tstartActivity(i);\n\t\t\t\t\tMainActivity.this.finish();\n\t\t\t\t}\n\t\t}, 1000);\n\t\t//finish();\n\t}", "private void registerGlobalEvents() {\n\t\tsubmit(new CycleEvent());\n\t\tsubmit(new CleanupEvent());\n\t\tsubmit(new FloorItemEvent());\n\t}", "private void initAgenda() {\n agenda = new Agenda();\n appointmentGroup = new Agenda.AppointmentGroupImpl().withStyleClass(STYLE_CLASS);\n\n // this actionCallBack is called when the user double clicks on an appointment in the display\n // Opens a dialog containing the details of the clicked event\n agenda.actionCallbackProperty().set(param -> {\n logger.info(\"User double clicked on \" + param.toString());\n CalendarEventDialog dialog = new CalendarEventDialog((CalendarEvent) param);\n displayPopUp(dialog.getRoot());\n return null;\n });\n\n agenda.setAllowDragging(false);\n agenda.setAppointmentChangedCallback(param -> null);\n agenda.setEditAppointmentCallback(param -> null);\n agenda.setSkin(new AgendaWeekSkin(agenda));\n agenda.setId(\"agenda\");\n\n calendarDisplayBox.getChildren().add(agenda);\n }", "@FXML\n private void handleManageEvents(ActionEvent event) {\n try {\n LOGGER.log(Level.INFO, \"Redirecting to EventManagement window.\");\n FXMLLoader loader = new FXMLLoader(getClass()\n .getResource(\"/reto2desktopclient/view/EventManagement.fxml\"));\n Parent root = (Parent) loader.load();\n //Getting window controller.\n EventManagementController controller = (loader.getController());\n controller.setStage(stage);\n //Initializing stage.\n controller.initStage(root);\n } catch (IOException ex) {\n LOGGER.log(Level.SEVERE, \"Could not switch to EventManagement window: {0}\", ex.getMessage());\n showErroAlert(\"Could not switch to Event Management window due to an\"\n + \" unexpected error, please try later.\");\n }\n }", "private void setUpViewModels(){\n EventViewModelFactory factory = new EventViewModelFactory(mDatabase, mEventId);\n EventViewModel eventViewModel =\n ViewModelProviders.of(this, factory).get(EventViewModel.class);\n //Uses view model to get category list\n //listener is called any time the categories are changed or updated\n eventViewModel.getCategoryList().observe(this, new Observer<List<Category>>() {\n @Override\n public void onChanged(List<Category> categories) {\n mCategories = new ArrayList<>(categories);\n setUpSpinner(); //sets up spinner if categories change\n }\n });\n\n //creates a new Factory with database and current time\n AddScheduledEventViewModelFactory eventFactory =\n new AddScheduledEventViewModelFactory(mDatabase, Calendar.getInstance().getTimeInMillis());\n AddScheduledEventViewModel addScheduledEventViewModel =\n ViewModelProviders.of(this, eventFactory).get(AddScheduledEventViewModel.class);\n //attaches listener to events list\n addScheduledEventViewModel.getEvents().observe(this, new Observer<List<Event>>() {\n @Override\n public void onChanged(List<Event> events) {\n //updates the events that are given to mScheduler\n if(mScheduler == null){\n mScheduler = new Scheduler(events, Calendar.getInstance(), null);\n } else mScheduler.setEvents(events);\n }\n });\n }", "private void init()\n {\n // Add listeners to the view\n addEventListeners();\n addSelectionChangeListeners();\n\n // Add listeners to the model\n addBackgroundImageHandler();\n addFrameWidgetHandler();\n addWidgetShapeChangeHandler();\n\n project.addHandler(this,\n Project.DesignChange.class,\n new AlertHandler()\n {\n\n public void handleAlert(EventObject alert)\n {\n Project.DesignChange chg =\n (Project.DesignChange) alert;\n\n if ((! chg.isAdd) &&\n (chg.element == design))\n {\n closeOpenController();\n }\n }\n });\n\n design.addHandler(this,\n Design.FrameChange.class,\n new AlertHandler()\n {\n\n public void handleAlert(EventObject alert)\n {\n Design.FrameChange chg =\n (Design.FrameChange) alert;\n\n if ((! chg.isAdd) &&\n (chg.element == frame))\n {\n closeOpenController();\n }\n }\n });\n\n design.addHandler(this,\n Design.DeviceTypeChange.class,\n new AlertHandler()\n {\n\n public void handleAlert(EventObject alert)\n {\n Set<DeviceType> dts =\n design.getDeviceTypes();\n int deviceTypes =\n DeviceType.buildDeviceSet(dts);\n\n view.resetDeviceTypes(deviceTypes);\n }\n });\n\n // Add listeners to rename events on project and design\n frame.addHandler(this, NameChangeAlert.class, renameHandler);\n design.addHandler(this,\n NameChangeAlert.class,\n renameHandler);\n\n // Some items should always be enabled.\n // Should be the last call in the constructor\n setInitiallyEnabled(true);\n }", "private void registerEvents() {\n createRoomBTN.addActionListener(actionEvent -> {\n chatController.createRoom(roomNameIF.getText());\n roomNameIF.setText(\"\");\n });\n\n backBTN.addActionListener(actionEvent -> {\n if (chatController.getJoinedRooms().size() > 0) chatView.renderChatPanel();\n });\n }", "public ManipularEstudiantes() {\n initComponents();\n cme = new Control_Mantenimiento_Estudiante(this);\n this.gUI_botones2.agregar_eventos(cme);\n }", "@Override\n public void setupEventHandlers(ControllerInterface controller) {\n events = Optional.of(new Events.ForView(controller));\n }", "public final void loadEvents() {\n\n if (selectedUser == null || selectedUser.equals(\"All\")) {\n for (Absence a : AbsenceService.getAllUnacknowledged()) {\n\n AbsenceEvent e = new AbsenceEvent(a.getUser().getUsername() + \" \" + a.getAbsenceType(), TimeConverterService.convertLocalDateTimeToDate(a.getStartTime()), TimeConverterService.convertLocalDateTimeToDate(a.getEndTime()), a);\n\n switch (e.getAbsence().getAbsenceType()) {\n\n case MEDICAL_LEAVE:\n e.setStyleClass(\"medical_leave\");\n break;\n case HOLIDAY:\n e.setStyleClass(\"holiday\");\n e.setAllDay(true);\n break;\n case TIME_COMPENSATION:\n e.setStyleClass(\"time_compensation\");\n break;\n case BUSINESSRELATED_ABSENCE:\n e.setStyleClass(\"business-related_absence\");\n break;\n default:\n }\n\n this.addEvent(e);\n }\n } else {\n for (Absence a : AbsenceService.getAbsenceByUserAndUnacknowledged(BenutzerverwaltungService.getUser(selectedUser))) {\n\n AbsenceEvent e = new AbsenceEvent(a.getUser().getUsername() + \" \" + a.getAbsenceType() + \" \" + a.getReason(), TimeConverterService.convertLocalDateTimeToDate(a.getStartTime()), TimeConverterService.convertLocalDateTimeToDate(a.getEndTime()), a);\n\n switch (e.getAbsence().getAbsenceType()) {\n\n case MEDICAL_LEAVE:\n e.setStyleClass(\"medical_leave\");\n break;\n case HOLIDAY:\n e.setStyleClass(\"holiday\");\n e.setAllDay(true);\n break;\n case TIME_COMPENSATION:\n e.setStyleClass(\"time_compensation\");\n break;\n case BUSINESSRELATED_ABSENCE:\n e.setStyleClass(\"business-related_absence\");\n break;\n default:\n }\n\n this.addEvent(e);\n }\n }\n\n DefaultScheduleEvent holidayevent;\n\n for (Holiday h : HolidayService.getList()) {\n holidayevent = new DefaultScheduleEvent(h.getHolidayComment(), TimeConverterService.convertLocalDateToDate(h.getHolidayDate()), TimeConverterService.convertLocalDateToDate(h.getHolidayDate()));\n holidayevent.setAllDay(true);\n holidayevent.setStyleClass(\"feiertag\");\n\n this.addEvent(holidayevent);\n }\n }", "public void setListeners(){\n\t\t\n\t\tthis.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// chosen to add new patient\n\t\t\t\t\n\t\t\t\tArrayList<String> constructorInput = null;\n\t\t\t\tconstructorInput = NewPatientWindow.showInputdialog(true);\n\t\t\t\t\n\t\t\t\t// if cancel or close chosen on new patient window:\n\t\t\t\tif (constructorInput == null)\n\t\t\t\t\treturn; \n\t\t\t\t\n\t\t\t\t//else:\n\t\t\t\tBrainFreezeMain.patients.add(new Patient(\n\t\t\t\t\t\t(constructorInput.toArray( new String[constructorInput.size()]))));\n\t\t\t\tBrainFreezeMain.currentPatientIndex = BrainFreezeMain.patients.size()-1;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tLeftPanel.refreshPatientLabel(); // change to patient list, update label\n\t\t\t\tLeftPanel.refreshPatientData(); // change to patient, update data\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t});\n\t}", "public void runInUi(ElexisEvent ev){}", "public void consulterEvent() {\n\t\t\n\t}", "public void setupUIListeners() {\n\t\tsetupEditTextListeners();\n\t\tsetupSeekBarsListeners();\n\t}", "private void addEvents() {\n\t mlv.getMapNotesOverlay().addEventListener(new NoteSelectedListener()\n {\n\t \t\n\t\t\t@Override\n\t\t\tpublic void handleNoteSelectedEvent(EventObject e, Group gr) {\n\t\t\t\t//We have to go to gallery because the user has select a (groups) note\n\t\t\t\tselectedGroup = gr;\n\t\t\t\tonClick(mlv);\n\t\t\t}\n \t\n });\t\t\t\t\n\t\t\n\t}", "protected void setupUI() {\n\n }", "private void createEvents() {\n\t\tbtnRetour.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tdispose();\r\n\t\t\t\tDashboard_Preteur dashboard_Preteur = new Dashboard_Preteur(currentPreteur);\r\n\t\t\t\tdashboard_Preteur.setVisible(true);\r\n\t\t\t\tdashboard_Preteur.setResizable(false);\r\n\t\t\t}\r\n\t\t});\r\n\t}", "public void setMarioEvents() {\n\t\tCollisionEvent event1, event2, event4, event98, event6, event7, event8, event9;\n\t\tAdvancedCollisionEvent event_1LandsTop4, event_1Touches4NotTop, event5;\n\t\ttry {\n\t\t\t// player with block\n\t\t\tevent1 = new CollisionEvent(\n\t\t\t\t\tArrays.asList(new String[] { \"0\", \"1\" }),\n\t\t\t\t\tPLAYER_LANDING_ON_BLOCK_STRING);\n\t\t\t// enemy with block\n\t\t\tevent2 = new CollisionEvent(Arrays.asList(\"1\", \"2\"),\n\t\t\t\t\tENEMY_ON_BLOCK_STRING);\n\t\t\t// player killing enemy\n\t\t\tevent_1LandsTop4 = new AdvancedCollisionEvent(Arrays.asList(\"0\",\n\t\t\t\t\t\"2\", \"true\", \"false\", \"false\", \"false\", \"false\"),\n\t\t\t\t\tPLAYER_JUMPING_ON_ENEMY_STRING);\n\t\t\t// enemy kills player\n\t\t\tevent_1Touches4NotTop = new AdvancedCollisionEvent(Arrays.asList(\n\t\t\t\t\t\"0\", \"2\", \"false\", \"true\", \"true\", \"true\", \"false\"),\n\t\t\t\t\tENEMY_KILLING_PLAYER_STRING);\n\t\t\t// player reaches goal\n\t\t\tevent4 = new CollisionEvent(Arrays.asList(\"0\", \"3\"),\n\t\t\t\t\tPLAYER_HITTING_GOAL_STRING);\n\t\t\t// player collects coin\n\t\t\tevent98 = new CollisionEvent(Arrays.asList(\"0\", \"5\"),\n\t\t\t\t\tPLAYER_COLLECTING_COIN_STRING);\n\t\t\t// bullet hits enemy\n\t\t\tevent5 = new AdvancedCollisionEvent(Arrays.asList(\"2\", \"150\",\n\t\t\t\t\t\"true\", \"true\", \"true\", \"true\", \"true\"),\n\t\t\t\t\tBULLET_HITTING_ENEMY_STRING);\n\t\t\t// player gets gun power up\n\t\t\tevent6 = new CollisionEvent(Arrays.asList(\"0\", \"6\"),\n\t\t\t\t\tPLAYER_HITS_GUN_POWERUP_STRING);\n\t\t\t// player gets invincibility power up\n\t\t\tevent7 = new CollisionEvent(Arrays.asList(\"0\", \"7\"),\n\t\t\t\t\tPLAYER_HITS_INVINCIBILITY_POWERUP_STRING);\n\t\t\t// player gets size power up\n\t\t\tevent8 = new CollisionEvent(Arrays.asList(\"0\", \"8\"),\n\t\t\t\t\tPLAYER_HITS_SIZE_POWER_UP_STRING);\n\t\t\t// player gets speed power up\n\t\t\tevent9 = new CollisionEvent(Arrays.asList(\"0\", \"9\"),\n\t\t\t\t\tPLAYER_HITS_SPEED_POWERUP_STRING);\n\t\t\tAddPowerUpAction action13 = new AddPowerUpAction(\n\t\t\t\t\tnew ArrayList<String>(Arrays.asList(\"0\", \"8\",\n\t\t\t\t\t\t\tSIZE_POWER_UP_STRING, \"10\", \"mario\")));\n\t\t\tAddPowerUpAction action12 = new AddPowerUpAction(\n\t\t\t\t\tnew ArrayList<String>(Arrays.asList(\"0\", \"9\",\n\t\t\t\t\t\t\tSPEED_POWER_UP_STRING, \"10\", \"bullet\")));\n\n\t\t\tDecreaseObjectHitPointsByCollisionAction action14 = new DecreaseObjectHitPointsByCollisionAction(\n\t\t\t\t\tnew ArrayList<String>(Arrays.asList(\"8\", \"0\")));\n\t\t\tDecreaseObjectHitPointsByCollisionAction action15 = new DecreaseObjectHitPointsByCollisionAction(\n\t\t\t\t\tnew ArrayList<String>(Arrays.asList(\"9\", \"0\")));\n\t\t\tDecreaseObjectHitPointsByCollisionAction action9 = new DecreaseObjectHitPointsByCollisionAction(\n\t\t\t\t\tnew ArrayList<String>(Arrays.asList(\"6\", \"0\")));\n\t\t\tDecreaseObjectHitPointsByCollisionAction action11 = new DecreaseObjectHitPointsByCollisionAction(\n\t\t\t\t\tnew ArrayList<String>(Arrays.asList(\"7\", \"0\")));\n\t\t\tAddPowerUpAction action7 = new AddPowerUpAction(\n\t\t\t\t\tnew ArrayList<String>(Arrays.asList(\"0\", \"6\",\n\t\t\t\t\t\t\tGUN_POWERUP_STRING, \"10\", \"mario\")));\n\t\t\tAddPowerUpAction action8 = new AddPowerUpAction(\n\t\t\t\t\tnew ArrayList<String>(Arrays.asList(\"0\", \"7\",\n\t\t\t\t\t\t\tINVINCIBILITY_POWERUP_STRING, \"10\", \"mobile\")));\n\t\t\tCollideSolidAction action = new CollideSolidAction(\n\t\t\t\t\tnew Tuple<Integer>(0, 1).toListString());\n\t\t\tCollideSolidAction action2 = new CollideSolidAction(\n\t\t\t\t\tnew Tuple<Integer>(2, 1).toListString());\n\t\t\tKillPlayerAction action3 = new KillPlayerAction(\n\t\t\t\t\tnew ArrayList<String>(Arrays.asList(\"0\")));\n\n\t\t\tDecreaseObjectHitPointsByCollisionAction action10 = new DecreaseObjectHitPointsByCollisionAction(\n\t\t\t\t\tnew ArrayList<String>(Arrays.asList(\"5\", \"0\")));\n\t\t\tDecreaseObjectHitPointsByCollisionAction action5 = new DecreaseObjectHitPointsByCollisionAction(\n\t\t\t\t\tnew ArrayList<String>(Arrays.asList(\"150\", \"2\")));\n\t\t\tDecreaseObjectHitPointsByCollisionAction action6 = new DecreaseObjectHitPointsByCollisionAction(\n\t\t\t\t\tnew ArrayList<String>(Arrays.asList(\"2\", \"150\")));\n\t\t\tEndLevelAction action4 = new EndLevelAction(new ArrayList<String>());\n\n\t\t\tChangeScoreAction action98 = new ChangeScoreAction(\n\t\t\t\t\tnew ArrayList<String>(Arrays.asList(\"5\")));\n\t\t\tDecreaseObjectHitPointsByCollisionAction action_1Kills4 = new DecreaseObjectHitPointsByCollisionAction(\n\t\t\t\t\tnew ArrayList<String>(Arrays.asList(\"2\", \"0\")));\n\n\t\t\tevent1.addAction(action);\n\t\t\tevent2.addAction(action2);\n\t\t\tevent_1Touches4NotTop.addAction(action3);\n\t\t\tevent_1LandsTop4.addAction(action_1Kills4);\n\t\t\tevent4.addAction(action4);\n\t\t\tevent98.addAction(action98);\n\t\t\tevent98.addAction(action10);\n\t\t\tevent5.addAction(action5, action6);\n\t\t\tevent6.addAction(action7, action9);\n\t\t\tevent7.addAction(action8, action11);\n\t\t\tevent9.addAction(action12, action15);\n\t\t\tevent8.addAction(action13, action14);\n\t\t\tmyLevel.addEvent(event1, event2, event_1Touches4NotTop, event4,\n\t\t\t\t\tevent98, event_1LandsTop4, event5, event6, event7, event8,\n\t\t\t\t\tevent9);\n\t\t\tmyLevelObjectBar.initializeEventsMap(myLevel.getEvents());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\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}", "public void ingresar_a_la_Opcion_de_eventos() {\n\t\t\n\t}", "private void setupUI(){\n this.setupTimerSchedule(controller, 0, 500);\n this.setupFocusable(); \n this.setupSensSlider();\n this.setupInitEnable();\n this.setupDebugger();\n }", "public void registerEvents()\n {\n \t\tfinal pchestPlayerListener playerListener = new pchestPlayerListener(this, chestManager);\n \t\tfinal pchestEntityListener entityListener = new pchestEntityListener(this, chestManager);\n \t\tfinal pchestBlockListener blockListener = new pchestBlockListener(this, chestManager);\n \t\t\n \t\t\n pm = getServer().getPluginManager();\n \n /* Entity events */\n pm.registerEvent(Type.ENTITY_EXPLODE, entityListener, Event.Priority.Normal, this);\n \n /* Player events */\n pm.registerEvent(Type.PLAYER_INTERACT, playerListener, Event.Priority.Normal, this);\n \n /* Block events */\n \t\tpm.registerEvent(Type.BLOCK_PLACE, blockListener, Event.Priority.Normal, this);\n \t\tpm.registerEvent(Type.BLOCK_BREAK, blockListener, Event.Priority.Normal, this);\n \n \t\t\n /* Spout Required events */\n \t\tif(SpoutLoaded)\n \t\t{\n \t\t\tfinal pchestInventoryListener inventoryListener = new pchestInventoryListener(this, chestManager);\n \n \t /* Inventory events */\n \t\t\tpm.registerEvent(Type.CUSTOM_EVENT, inventoryListener, Event.Priority.Normal, this);\n \t\t}\n }", "private void setupListeners() {\n mCalendarView.setOnDateChangeListener(new CalendarView.OnDateChangeListener() {\n @Override\n public void onSelectedDayChange(CalendarView view, int year, int month, int dayOfMonth) {\n // When the clicked date is changed, change the date displayed on screen\n String date = dayOfMonth + \"/\" + (month + 1) + \"/\" + year;\n mTextView.setText(date);\n }\n });\n }", "private void organizeUI() {\n\t\tfileMenu.add(startServerFileMenu);\n\t\tfileMenu.add(stopServerFileMenu);\n\t\tfileMenu.addSeparator();\n\t\tfileMenu.add(exitFileMenu);\n\n\t\toptionMenu.add(loadJokesOptionMenu);\n\t\toptionMenu.add(setupServerInfoOptionMenu);\n\t\t\n\t\thelpMenu.add(aboutHelpMenu);\n\t\t\n\t\tmenuBar.add(fileMenu);\n\t\tmenuBar.add(optionMenu);\n\t\tmenuBar.add(helpMenu);\n\t\tsetJMenuBar(menuBar);\n\t\t\n\t\ttoolBar.add(startServerToolBarButton);\n\t\ttoolBar.add(stopServerToolBarButton);\n\t\tstopServerToolBarButton.setEnabled(false);\n\t\ttoolBar.addSeparator();\n\t\ttoolBar.add(kkClientToolBarButton);\n\t\t\n\t\tkkServerPortField = new JTextField(String.valueOf(kkServerPort));\n\t\t\n\t\tserverStatusLabel.setText(serverStopped);\n\t\tnorthPanel.setLayout(new BorderLayout());\n\t\tnorthPanel.add(toolBar, BorderLayout.NORTH);\n\t\tnorthPanel.add(serverStatusLabel, BorderLayout.WEST);\n\t\tadd(northPanel, BorderLayout.NORTH);\n\t\t\n\t\tcenterPanel.setLayout(new BorderLayout());\n\t\tadd(centerPanel, BorderLayout.CENTER);\n\t\t\n\t\tsouthPanel.setLayout(new BorderLayout());\n\t\tsouthPanel.add(totalClientConectionLabel, BorderLayout.WEST);\n\t\tsouthPanel.add(totalJokesLabel, BorderLayout.EAST);\n\t\t\n\t\tadd(southPanel, BorderLayout.SOUTH);\n\t}", "private void setEventThread() {\n setEventThread(Thread.currentThread());\n }", "@Override\n\tprotected void onEventComming(EventCenter eventCenter) {\n\t}", "private void createAdminEvents() {\n\t\t//moves the create user panel to the front to allow the user to enter the new user info\n\t\tbtn_create_new_user.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tpnlCreateJob.setVisible(false);\n\t\t\t\tpnlCreateTask.setVisible(false);\n\t\t\t\tpnlCreateProject.setVisible(false);\n\t\t\t\tpnlCreateQualification.setVisible(false);\n\t\t\t\tpnlCreateUser.setVisible(true);\n\t\t\t\tlayeredPaneAdminComponents.setLayer(pnlUserEditInfo, 2);\n\t\t\t\tlayeredPaneAdminComponents.setLayer(pnlCreateUser, 3);\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t//\n\t\tbtn_add_qualifications.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tpnlCreateJob.setVisible(false);\n\t\t\t\tpnlUserEditInfo.setVisible(false);\n\t\t\t\tpnlCreateTask.setVisible(false);\n\t\t\t\tpnlCreateProject.setVisible(false);\n\t\t\t\tpnlCreateUser.setVisible(false);\n\t\t\t\tpnlCreateQualification.setVisible(true);\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t//\n\t\tbtnCancelAddQualifcation.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tpnlCreateJob.setVisible(false);\n\t\t\t\tpnlCreateTask.setVisible(false);\n\t\t\t\tpnlCreateProject.setVisible(false);\n\t\t\t\tpnlCreateQualification.setVisible(false);\n\t\t\t\tpnlUserEditInfo.setVisible(true);\n\t\t\t}\n\t\t});\n\t\t//\n\t\tbtnChangePassword.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t//Display user information that was clicked on the left.\n\t\tlistUsers.addListSelectionListener(new ListSelectionListener() {\n @Override\n public void valueChanged(ListSelectionEvent arg0) {\n if (!arg0.getValueIsAdjusting() && !listUsers.isSelectionEmpty()) {\n pnlViewTickets.setVisible(false);\n pnlCreateQualification.setVisible(false);\n pnlUserEditInfo.setVisible(true);\n displayUserInfo(listUsers.getSelectedValue().toString());\n //saves the index of the array that was clicked on\n btnDeleteUser.setText(\"ARCHIVE USER\");\n lastClickedIndex = listUsers.getSelectedIndex();\n int id = jdbc.getIdOfUser(textUsername.getText());\n //saved the userID of the user that is displayed\n lastClickeduserID = id;\n if (rdbtnAdminDetails.isSelected()) {\n \t lastClickedUserType = 1;\n } else if (rdbtnManagerDetails.isSelected()) {\n \t lastClickedUserType = 2;\n } else {\n \t lastClickedUserType = 3;\n }\n }\n }\n });\n\t\t//Display user information that was clicked on the left.\n\t\tlistArchivedUsers.addListSelectionListener(new ListSelectionListener() {\n @Override\n public void valueChanged(ListSelectionEvent arg0) {\n if (!arg0.getValueIsAdjusting() && !listArchivedUsers.isSelectionEmpty()) {\n pnlUserEditInfo.setVisible(true);\n displayUserInfo(listArchivedUsers.getSelectedValue().toString());\n //saves the index of the array that was clicked on\n lastClickedIndex = listArchivedUsers.getSelectedIndex();\n btnDeleteUser.setText(\"UNARCHIVE USER\");\n int id = jdbc.getIdOfUser(textUsername.getText());\n //saved the userID of the user that is displayed\n lastClickeduserID = id;\n if (rdbtnAdminDetails.isSelected()) {\n \t lastClickedUserType = 1;\n } else if (rdbtnManagerDetails.isSelected()) {\n \t lastClickedUserType = 2;\n } else {\n \t lastClickedUserType = 3;\n }\n }\n }\n });\n\t\t//Save changes made the user\n\t\tbtnSaveChanges.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tint id = jdbc.getIdOfUser(textUsername.getText());\n\t\t\t\tlastClickeduserID = id;\n\t\t\t\ttry {\n\t\t\t\t\t if (rdbtnAdminDetails.isSelected()) {\n\t \t lastClickedUserType = 1;\n\t } else if (rdbtnManagerDetails.isSelected()) {\n\t \t lastClickedUserType = 2;\n\t } else {\n\t \t lastClickedUserType = 3;\n\t }\n\t\t\t\t\t jdbc.updateUser(id, lastClickedUserType, textFirstName.getText(), textLastName.getText(), textUsername.getText(), textEmail.getText(), textPhone.getText());\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\t e.printStackTrace();\n\t\t\t\t}\n\t\t\t\tupdateUserList();\n\t\t\t}\n\t\t});\n\t\t/*Called when the -> button is clicked to add some qualifications to a user\n\t\tall edits are done with the jdbc function assignQuals()\n\t\tparameters are the userId, the ArrayList of available qualifications and the selected indices of the qualification list*/\n\t\tassignQual.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t//parameters are the userId, the ArrayList of available qualifications and the selected indices of the qualification list\n\t\t\t\tjdbc.assignQuals(lastClickeduserID, availQuals, listAvailableQuals.getSelectedIndices());\n\t\t\t\tcreateQualLists(lastClickeduserID);\n\t\t\t}\n\t\t});\n\t\t/*Called when the <- button is clicked to remove some qualifications from a user\n\t\tall edits are done with the jdbc function UnassignQuals()*/\n\t\tunassignQual.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t//parameters are the userId, the ArrayList of assigned qualifications and the selected indices of the qualification list\n\t\t\t\tjdbc.UnassignQuals(lastClickeduserID, assignedQuals, listAssignedQuals.getSelectedIndices());\n\t\t\t\tcreateQualLists(lastClickeduserID);\n\t\t\t}\n\t\t});\n\t\t//Send the information to the SQL server after the information in entered\n\t\tbtnCreateUser.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tint usertype = 0;\n\t\t\t\tif (rdbtnAdmin.isSelected()) {\n\t\t\t\t\tusertype = 1;\n\t\t\t\t} else if (rdbtnManager.isSelected()) {\n\t\t\t\t\tusertype = 2;\n\t\t\t\t} else if (rdbtnWorker.isSelected()) {\n\t\t\t\t\tusertype = 3;\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tString pass = new String(txtCreatePassword.getPassword());\n\t\t\t\t\tjdbc.add_user(usertype,txtCreateUsername.getText(),txtCreateFirstName.getText(), txtCreateLastName.getText(), txtCreateEmailAddress.getText(), txtCreatePhoneNumber.getText(), pass);\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\tJOptionPane.showMessageDialog(null, \"User Created!\");\n\t\t\t\t//hides the create user panel\n\t\t\t\tpnlCreateUser.setVisible(false);\n\t\t\t\t//Refreshes the list of user on the left side panel\n\t\t\t\tcreateUserList();\n\t\t\t}\n\t\t});\n\t\t//\n\t\tbtnCancel.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tpnlCreateUser.setVisible(false);\n\t\t\t}\n\t\t});\n\t\t//TODO make it so they turn into an 'archived' user instead of complete deletion.\n\t\tbtnDeleteUser.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tboolean b = true;\n\t\t\t\tif (btnDeleteUser.getText() == \"ARCHIVE USER\") {\n\t\t\t\t\tb = false;\n\t\t\t\t} \n\t\t\t\tjdbc.archiveUser(lastClickeduserID, b);\n\t\t\t\tcreateUserList();\n\t\t\t}\n\t\t});\n\t\t//\n\t\tbtnCreateQual.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tArrayList<String> usernames = new ArrayList<String>();\n\t\t\t\tfor (int i = 0; i < userListAssignQual.size(); i++) {\n\t\t\t\t\tusernames.add(userListAssignQual.getElementAt(i).toString());\n\t\t\t\t}\n\t\t\t\tboolean worked = jdbc.createQual(txtNewQualificationName.getText(), txtNewQualificationDesc.getText(), usernames);\n\t\t\t\tif (worked) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Qualification Created!\");\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Qualification not created.\");\n\t\t\t\t\ttxtNewQualificationDesc.setText(\"\");\n\t\t\t\t\ttxtNewQualificationName.setText(\"\");\n\t\t\t\t\tuserListAssignQual.clear();\n\t\t\t\t\tcreateUserListQual();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t//\n\t\tbtnAssignUserQual.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tint[] selected = listCreateQualAvailUsers.getSelectedIndices();\n\t\t\t\tfor (int i = 0; i < selected.length; i++) {\n\t\t\t\t\tuserListAssignQual.addElement(userListAvailQual.getElementAt(selected[i]));\n\t\t\t\t\tuserListAvailQual.remove(selected[i]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t//\n\t\tbtnUnassignUserQual.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tint[] selected = listCreateQualAssignedUsers.getSelectedIndices();\n\t\t\t\tfor (int i = 0; i < selected.length; i++) {\n\t\t\t\t\tuserListAvailQual.addElement(userListAssignQual.getElementAt(selected[i]));\n\t\t\t\t\tuserListAssignQual.remove(selected[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t//\n\t\tbtnViewTickets.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tloadTickets();\n\t\t\t\tif (pnlViewTickets.isVisible()) {\n\t\t\t\t\tpnlViewTickets.setVisible(false);\n\t\t\t\t\tpnlUserEditInfo.setVisible(true);\n\t\t\t\t} else {\n\t\t\t\t\tpnlUserEditInfo.setVisible(false);\n\t\t\t\t\tpnlCreateQualification.setVisible(false);\n\t\t\t\t\tpnlViewTickets.setVisible(true);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t//Displays the closed ticket information\n\t\tlistClosedTickets.addListSelectionListener(new ListSelectionListener() {\n @Override\n public void valueChanged(ListSelectionEvent arg0) {\n if (!arg0.getValueIsAdjusting() && !listClosedTickets.isSelectionEmpty()) {\n \tpnlTicketDetails.setVisible(true);\n \tdisplayTicketDetails(listClosedTickets.getSelectedValue().toString());\n }\n }\n });\n\t\t//Displays the open ticket information\n\t\tlistOpenTickets.addListSelectionListener(new ListSelectionListener() {\n @Override\n public void valueChanged(ListSelectionEvent arg0) {\n if (!arg0.getValueIsAdjusting() && !listOpenTickets.isSelectionEmpty()) {\n \tpnlTicketDetails.setVisible(true);\n \tdisplayTicketDetails(listOpenTickets.getSelectedValue().toString());\n }\n }\n });\n\t\t//\n\t\tbtnTicketDetailsClose.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tpnlTicketDetails.setVisible(false);\n\t\t\t\tloadTickets();\n\t\t\t}\n\t\t});\n\t\t//opens report generation tab\n\t\tbtnReportGenerator.addActionListener(new ActionListener() {\t\t\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n//\t\t\t\tpnlUserEditInfo.setVisible(false);\n//\t\t\t\tpnlCreateQualification.setVisible(false);\n//\t\t\t\tpnlCreateUser.setVisible(false);\n//\t\t\t\tpnlDeleteUser.setVisible(false);\n//\t\t\t\tpnlViewTickets.setVisible(false);\n//\t\t\t\tpnlTicketDetails.setVisible(false);\n//\t\t\t\tpnlArchivedUsers.setVisible(false);\n\t\t\t\tpnlReportGeneration.setVisible(true);\n\t\t\t\tloadProjects();\n\t\t\t}\n\t\t});\n\t\t//listens for selection of a project to generate a report of\n\t\tlistProjectsGeneratable.addListSelectionListener(new ListSelectionListener() {\t\t\n\t\t\t@Override\n\t\t\tpublic void valueChanged(ListSelectionEvent arg0) {\n\t if (!arg0.getValueIsAdjusting()) {\n\t projectToGenerate= (String) listProjectsGeneratable.getSelectedValue();\t\n\t System.out.println(projectToGenerate);\n\t }\n\t\t\t}\n\t\t});\n\t\t//creates Report given a project name\n\t\tbtnCreateReport.addActionListener(new ActionListener() {\t\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\n\t\t\t\tFile file = new File(\"%s\",txtReportPath.getSelectedText());\n\t\t\t\tString s = \"\";\n\t\t\t\treportedjobs.add(jdbc.get_project(projectToGenerate)); //root\n\t\t\t\treportedjobs.addAll(jdbc.get_Branches(projectToGenerate));//branches\n\t\t\t\tfor (Job job : reportedjobs) {\n\t\t\t\t\ts= s+job.jobname+\"\t\t\t\t\"+job.jobdesc+ '\\r'+'\\n';\n\t\t\t\t\ttry {\n\t\t\t\t\t\twriteFileLine(s, file);\n\t\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t\te1.printStackTrace();\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\t//cancels report generation\n\t\tbtnCancelReport.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tpnlReportGeneration.setVisible(false);\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t//\n\t\tbtnTicketDoneSave.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tjdbc.updateTicket(currentOpenTicketId, rdbtnTicketDoneYes.isSelected());\n\t\t\t\tpnlTicketDetails.setVisible(false);\n\t\t\t\tloadTickets();\n\t\t\t}\n\t\t});\n\t}", "@Override\n\t\t\tpublic void changed(ChangeEvent event, Actor actor) {\n\t\t\t\tgame.setScreen(new MainMenuScreen(game));\n\t\t\t}", "private GUIReminder() {\n\n initComponents();\n initOthers();\n\n }", "public M_Hompeage1_evt() {\n initComponents();\n }", "public void add_events_screen(View view) {\n Calendar calendar = Calendar.getInstance();\n calendar.set(selectedYear, selectedMonth, selectedDay);\n\n Intent intent = new Intent(Intent.ACTION_EDIT);\n intent.setType(\"vnd.android.cursor.item/event\");\n intent.putExtra(CalendarContract.Events.TITLE, \"\");\n intent.putExtra(CalendarContract.EXTRA_EVENT_BEGIN_TIME, calendar.getTimeInMillis());\n intent.putExtra(CalendarContract.EXTRA_EVENT_END_TIME, calendar.getTimeInMillis());\n intent.putExtra(CalendarContract.Events.ALL_DAY, false);\n intent.putExtra(CalendarContract.Events.DESCRIPTION,\"\");\n startActivity(intent);\n }", "private void setupEventHandlers() {\n myMap.addEventHandler(MapViewEvent.MAP_CLICKED, event -> {\n event.consume();\n final Coordinate newPosition = event.getCoordinate().normalize();\n latitude.setText(newPosition.getLatitude().toString());\n longitude.setText(newPosition.getLongitude().toString());\n\n this.markerClick.setPosition(newPosition);\n this.myMap.addMarker(this.markerClick);\n });\n }", "public void setEventManager(GameEventManager eventManager) {\n this.eventManager = eventManager;\n }", "private void registerEvents() {\n MouseEventHandler handler = new MouseEventHandler();\n setOnMousePressed(handler);\n setOnMouseReleased(handler);\n setOnMouseMoved(handler);\n setOnMouseEntered(handler);\n setOnMouseExited(handler);\n\n }", "@Override\n public void onChanged(List<Event> events) {\n if(mScheduler == null){\n mScheduler = new Scheduler(events, Calendar.getInstance(), null);\n } else mScheduler.setEvents(events);\n }", "@Override\n\tpublic void eventSelectTracker() {\n\t\t\n\t}", "public void injectUIEvent(UI_EVENTS event) {\n handleEvent(event);\n }", "@Override\n\tpublic synchronized void registerEventListeners() {\n\t\tif (eventListeners != null) // already called\n\t\t\treturn;\n\t\teventListeners = EventListenerManagers.wrap(this);\n\t\tSelectionUpdateListener selectionUpdateListener = new SelectionUpdateListener();\n\t\tselectionUpdateListener.setHandler(this);\n\t\teventListeners.register(SelectionUpdateEvent.class, selectionUpdateListener);\n\n\t\tSelectionCommandListener selectionCommandListener = new SelectionCommandListener();\n\t\tselectionCommandListener.setHandler(this);\n\t\t// selectionCommandListener.setDataDomainID(dataDomain.getDataDomainID());\n\t\teventListeners.register(SelectionCommandEvent.class, selectionCommandListener);\n\n\t\tsuper.registerEventListeners();\n\n\n\t}", "public void registerComponents() {\r\n maintainSponsorHierarchyBaseWindow.addVetoableChangeListener(this);\r\n maintainSponsorHierarchyBaseWindow.btnChangeGroupName.addActionListener(this);\r\n maintainSponsorHierarchyBaseWindow.btnClose.addActionListener(this);\r\n maintainSponsorHierarchyBaseWindow.btnCreateNewGroup.addActionListener(this);\r\n maintainSponsorHierarchyBaseWindow.btnDelete.addActionListener(this);\r\n maintainSponsorHierarchyBaseWindow.btnDetails.addActionListener(this);\r\n maintainSponsorHierarchyBaseWindow.btnMoveDown.addActionListener(this);\r\n maintainSponsorHierarchyBaseWindow.btnMoveUp.addActionListener(this);\r\n maintainSponsorHierarchyBaseWindow.btnSave.addActionListener(this);\r\n maintainSponsorHierarchyBaseWindow.btnSearchSponser.addActionListener(this);\r\n maintainSponsorHierarchyBaseWindow.btnPanel.addActionListener(this);\r\n maintainSponsorHierarchyBaseWindow.mnuItmChangeGroupName.addActionListener(this);\r\n maintainSponsorHierarchyBaseWindow.mnuItmChangePassword.addActionListener(this);\r\n maintainSponsorHierarchyBaseWindow.mnuItmClose.addActionListener(this);\r\n maintainSponsorHierarchyBaseWindow.mnuItmCreateNewGroup.addActionListener(this);\r\n maintainSponsorHierarchyBaseWindow.mnuItmDetails.addActionListener(this);\r\n maintainSponsorHierarchyBaseWindow.mnuItmDelete.addActionListener(this);\r\n maintainSponsorHierarchyBaseWindow.mnuItmExit.addActionListener(this);\r\n maintainSponsorHierarchyBaseWindow.mnuItmInbox.addActionListener(this);\r\n maintainSponsorHierarchyBaseWindow.mnuItmMoveDown.addActionListener(this);\r\n maintainSponsorHierarchyBaseWindow.mnuItmMoveUp.addActionListener(this);\r\n //Added for Case#3682 - Enhancements related to Delegations - Start\r\n maintainSponsorHierarchyBaseWindow.mnuItmDelegations.addActionListener(this);\r\n //Added for Case#3682 - Enhancements related to Delegations - End\r\n maintainSponsorHierarchyBaseWindow.mnuItmPreferences.addActionListener(this);\r\n maintainSponsorHierarchyBaseWindow.mnuItmSave.addActionListener(this);\r\n maintainSponsorHierarchyBaseWindow.mnuItmPanel.addActionListener(this);\r\n maintainSponsorHierarchyBaseWindow.mnuItmSearchSponser.addActionListener(this);\r\n //Case 2110 Start\r\n maintainSponsorHierarchyBaseWindow.mnuItmCurrentLocks.addActionListener(this);\r\n //Case 2110 End\r\n //Addded for Case#2445 - proposal development print forms linked to indiv sponsor, should link to sponsor hierarchy - Start\r\n maintainSponsorHierarchyBaseWindow.mnuItmSponsorForm.addActionListener(this);\r\n //Case#2445 - End \r\n sponsorHierarchyTree.addTreeSelectionListener(this);\r\n sponsorHierarchyTree.addMouseListener(this);\r\n model.addTreeModelListener(this);\r\n }", "@Override\n public void updateUi() {\n\n }", "@Override\n public void updateUi() {\n\n }", "@Override\n public void updateUi() {\n\n }", "@Override\r\n public void updateUI() {\r\n }", "private void initEvents() {\r\n\t\teventPool = new EventPool();\r\n\t\teventPool.addEvent(new BlockGeneratorEvent(this));\r\n\t\teventPool.addEvent(new BlockOffScreenEvent(this));\r\n\t\teventPool.addEvent(new DeathEvent(myDropThis, this));\r\n\t}", "private void createEvents() {\n\t\taddBtn.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tbuildOutput();\n\t\t\t}\n\t\t});\n\t}", "@Override\n\tpublic void loadEvents() {\n\t\t\n\t}", "public void registryChange() {\n registryEvent(1);\n }", "private void updateUIAfterTick(){ \n //turn counter\n this.turnClock.setText(\"Turn: \" + this.village.getTurnCountAsString());\n \n //population\n this.populationAmount.setText(\"Population: \" + Integer.toString(this.village.getPopulation().getPopulationAmount()) );\n this.populationGrowthrate.setText(\"Growthrate: \" + Float.toString(this.village.getPopulation().getGrowthrate()));\n\n //buildings:\n this.constructedBuildingsArea.setText(this.getConstructedBuildingsAsList());\n \n //event\n this.eventText.setText(this.currentEvent.getEventText());\n this.eventOption1Btn.setText(this.currentEvent.getOption1Text());\n this.eventOption2Btn.setText(this.currentEvent.getOption2Text());\n this.eventOption3Btn.setText(this.currentEvent.getOption3Text());\n this.eventOption4Btn.setText(this.currentEvent.getOption4Text());\n \n }", "public void setUserScheduleController(){\n setChanged();\n notifyObservers(userScheduleController);\n }", "public AutoEvents() {\n super();\n _autoEventList = new ArrayList();\n }", "@Override\n public void init(TaskManager tm, Ui ui) {\n setResponse(ui.askEventName());\n setUtility(tm, ui);\n }", "private void createLoginEvents() {\n\t\t\n\t\t//Fires after the user clicks the login button. If they typed in the wrong creds or they have been inactivated\n\t\t//they will be given a proper pop up message notifying them\n\t\tbtnLogin.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tString pass = new String(passwordLogin.getPassword());\n\t\t\t\tUser u = jdbc.login(txtLoginUser.getText(), pass);\n\t\t\t\tif (u == null) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Incorrect Login Credentials\");\n\t\t\t\t} else if (!u.active()) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Your account has been inactivated. Contact your manager for help\");\n\t\t\t } else {\n\t\t\t\t\tif (u.get_usertype() == 1) {\n\t\t\t\t\t\t//They are an Admin\n\t\t\t\t\t\tlayeredPane.setLayer(layeredPaneAdmin, 10);\n\t\t\t\t\t\tlayeredPane.setLayer(layeredPaneLogin, 0);\n\t\t\t\t\t\tlayeredPaneAdmin.setLayer(pnlAdmin, 10);\n\t\t\t\t\t\tSystem.out.println(\"logged in as Admin\");\n\t\t\t\t\t\tlblPortal.setText(\"Admin Portal - \"+u.get_firstname()+ \" \" + u.get_lastname());\t\t\t\t\t\t\n\t\t\t\t\t} else if (u.get_usertype() == 2) {\n\t\t\t\t\t\t//They are a Manager\n\t\t\t\t\t\tlayeredPane.setLayer(layeredPaneManagerWorker, 10);\n\t\t\t\t\t\tlayeredPane.setLayer(layeredPaneLogin, 0);\n\t\t\t\t\t\tlayeredPaneManagerWorker.setLayer(pnlManagerWorker, 10);\n\t\t\t\t\t\tSystem.out.println(\"logged in as Manager\");\n\t\t\t\t\t\tlblPortal.setText(\"Manager Portal - \"+u.get_firstname()+ \" \" + u.get_lastname());\n\t\t\t\t\t} else {\n\t\t\t\t\t\t//They are a Worker\n\t\t\t\t\t\tlayeredPane.setLayer(layeredPaneManagerWorker, 10);\n\t\t\t\t\t\tSystem.out.println(\"logged in as Worker\");\n\t\t\t\t\t\tlblPortal.setText(\"Worker Portal - \"+u.get_firstname()+ \" \" + u.get_lastname());\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tcurrentSessionUserID = u.get_userID();\n\t\t\t\t\tbtnLogout.setVisible(true);\n\t\t\t\t\tlblPortal.setVisible(true);\n\t\t\t\t\tbtn_settings.setVisible(true);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t//\n\t\tbtnLogout.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlayeredPane.setLayer(layeredPaneLogin, 10);\n\t\t\t\tlayeredPane.setLayer(layeredPaneAdmin, 0);\n\t\t\t\tlayeredPane.setLayer(layeredPaneManagerWorker, 0);\n\t\t\t\tbtnLogout.setVisible(false);\n\t\t\t\tlblPortal.setVisible(false);\n\t\t\t\tbtn_settings.setVisible(false);\n\t\t\t\ttxtLoginUser.setText(\"\");\n\t\t\t\tpasswordLogin.setText(\"\");\n\t\t\t}\n\t\t});\n\t}", "@Override\n public void ancestorAdded(AncestorEvent event) {\n updateComponents();\n }", "@Override\n public void updateUI() {\n setUI(SubstanceRibbonGalleryUI.createUI(this));\n }", "public void setGui()\n\t{\n\t\tdisplay = new Display();\n\t\tshell = new Shell(display, SWT.CLOSE | SWT.TITLE | SWT.MIN);\n\t\tshell.setText(\"Sensor Configurator\");\n\t\t// create a new GridLayout with 3 columns of same size\n\t\tGridLayout layout = new GridLayout(3, false);\n\t\tshell.setLayout(layout);\n\n\t\tsetTrayIcon();\n\n\t\tGroup groupLeft = new Group(shell, SWT.SHADOW_OUT);\n\t\tgroupLeft.setLayout(new GridLayout());\n\t\tgroupLeft.setText(\"Customer Group\");\n\n\t\tlistLabel = new Label(groupLeft, SWT.NONE);\n\t\tlistLabel.setText(\"List of Customers\");\n\t\tlistLabel.setLayoutData(new GridData(SWT.CENTER, SWT.TOP, false, false, 1, 1));\n\n\t\tcustomerList = new List(groupLeft, SWT.BORDER | SWT.V_SCROLL);\n\t\tGridData gridData = new GridData();\n\t\tgridData.horizontalAlignment = GridData.FILL;\n\t\tgridData.verticalAlignment = GridData.BEGINNING;\n\t\tgridData.heightHint = 220;\n\t\tgridData.widthHint = 150;\n\t\tgridData.grabExcessHorizontalSpace = true;\n\t\tgridData.grabExcessVerticalSpace = false;\n\t\tgridData.horizontalSpan = 1;\n\t\tgridData.verticalSpan = 1;\n\t\tcustomerList.setLayoutData(gridData);\n\t\tcustomerList.select(0);\n\t\t// customerList.showSelection();\n\n\t\t// Combo selection\n\t\tpriorityCombo = new Combo(groupLeft, SWT.READ_ONLY);\n\t\tpriorityCombo.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, true, 1, 1));\n\t\tpriorityCombo.setItems(new String[] {\"Filter by Priority\", \"HIGH\", \"MEDIUM\", \"LOW\"});\n\t\tpriorityCombo.select(0);\n\n\t\t// updateButton\n\t\tupdateButton = new Button(groupLeft, SWT.PUSH);\n\t\tupdateButton.setText(\"Update List\");\n\t\tgridData = new GridData();\n\t\tgridData.verticalAlignment = GridData.CENTER;\n\t\tgridData.horizontalAlignment = GridData.CENTER;\n\t\tgridData.widthHint = 100;\n\t\tgridData.heightHint = 30;\n\t\tgridData.grabExcessHorizontalSpace = true;\n\t\tgridData.grabExcessVerticalSpace = true;\n\t\tgridData.horizontalSpan = 1;\n\t\tgridData.verticalSpan = 1;\n\t\tupdateButton.setLayoutData(gridData);\n\n\t\t// center group\n\t\tGroup groupCenter = new Group(shell, SWT.SHADOW_OUT);\n\t\tGridLayout groupLayout = new GridLayout(2, false);\n\t\tgroupCenter.setLayout(groupLayout);\n\t\tgroupCenter.setText(\"Measurement group\");\n\n\t\tcustomerLabel = new Label(groupCenter, SWT.NONE);\n\t\tcustomerLabel.setText(\"Customer Info\");\n\t\tcustomerLabel.setLayoutData(new GridData(SWT.CENTER, SWT.TOP, false, false, 1, 1));\n\n\t\t// Measurement Label\n\t\tmeasLabel = new Label(groupCenter, SWT.NONE);\n\t\tmeasLabel.setText(\"Measurement Info\");\n\t\tmeasLabel.setLayoutData(new GridData(SWT.CENTER, SWT.TOP, true, false, 1, 1));\n\n\t\t// customerText\n\t\tcustomerText = new StyledText(groupCenter, SWT.BORDER | SWT.V_SCROLL | SWT.READ_ONLY | SWT.MULTI);\n\t\tgridData = new GridData();\n\t\tgridData.horizontalAlignment = GridData.FILL;\n\t\tgridData.verticalAlignment = GridData.BEGINNING;\n\t\tgridData.heightHint = 145;\n\t\tgridData.widthHint = 110;\n\t\tgridData.grabExcessHorizontalSpace = true;\n\t\tgridData.grabExcessVerticalSpace = false;\n\t\tgridData.horizontalSpan = 1;\n\t\tgridData.verticalSpan = 1;\n\t\tcustomerText.setLayoutData(gridData);\n\n\t\t// Measurement Text\n\t\tmeasureText = new StyledText(groupCenter, SWT.BORDER | SWT.V_SCROLL | SWT.READ_ONLY | SWT.MULTI);\n\t\tgridData = new GridData();\n\t\tgridData.horizontalAlignment = GridData.FILL;\n\t\tgridData.verticalAlignment = GridData.BEGINNING;\n\t\tgridData.heightHint = 145;\n\t\tgridData.widthHint = 160;\n\t\tgridData.grabExcessHorizontalSpace = true;\n\t\tgridData.grabExcessVerticalSpace = true;\n\t\tgridData.horizontalSpan = 1;\n\t\tgridData.verticalSpan = 1;\n\t\tmeasureText.setLayoutData(gridData);\n\n\t\t// Comment Label\n\t\tcommentLabel = new Label(groupCenter, SWT.NONE);\n\t\tcommentLabel.setText(\"Comment Here!\");\n\t\tcommentLabel.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, false, 1, 1));\n\n\t\t// Measurement Task Label\n\t\tmeasTaskLabel = new Label(groupCenter, SWT.NONE);\n\t\tmeasTaskLabel.setText(\"Measurement Tasks!\");\n\t\tmeasTaskLabel.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, false, 1, 1));\n\n\t\t// Comment Text\n\t\tcommentText = new StyledText(groupCenter, SWT.BORDER | SWT.MULTI);\n\t\tgridData = new GridData();\n\t\tgridData.horizontalAlignment = GridData.FILL;\n\t\tgridData.verticalAlignment = GridData.BEGINNING;\n\t\tgridData.heightHint = 80;\n\t\tgridData.widthHint = 110;\n\t\tgridData.grabExcessHorizontalSpace = true;\n\t\tgridData.grabExcessVerticalSpace = true;\n\t\tgridData.horizontalSpan = 1;\n\t\tgridData.verticalSpan = 1;\n\t\tcommentText.setLayoutData(gridData);\n\n\t\t// Measurement Task Text\n\t\tmeasurTaskText = new StyledText(groupCenter, SWT.BORDER | SWT.READ_ONLY | SWT.MULTI);\n\t\tgridData = new GridData();\n\t\tgridData.horizontalAlignment = GridData.FILL;\n\t\tgridData.verticalAlignment = GridData.BEGINNING;\n\t\tgridData.heightHint = 80;\n\t\tgridData.widthHint = 160;\n\t\tgridData.grabExcessHorizontalSpace = true;\n\t\tgridData.grabExcessVerticalSpace = true;\n\t\tgridData.horizontalSpan = 1;\n\t\tgridData.verticalSpan = 1;\n\t\tmeasurTaskText.setLayoutData(gridData);\n\n\t\t// Electrode selection\n\t\telectrodeCombo = new Combo(groupCenter, SWT.READ_ONLY);\n\t\telectrodeCombo.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, true, 2, 1));\n\t\telectrodeCombo.setItems(new String[] {\"Electrode\", \"Simple\", \"Test\", \"New\"});\n\t\telectrodeCombo.select(0);\n\n\t\t// right group\n\t\tGroup groupRight = new Group(shell, SWT.SHADOW_OUT);\n\t\tgroupRight.setLayout(new GridLayout());\n\t\tgroupRight.setText(\"Sensor group\");\n\n\t\tsensorLabel = new Label(groupRight, SWT.NONE);\n\t\tsensorLabel.setText(\"Sensor Info\");\n\t\tsensorLabel.setLayoutData(new GridData(SWT.CENTER, SWT.TOP, false, false, 1, 1));\n\n\t\tsensorText = new StyledText(groupRight, SWT.BORDER | SWT.V_SCROLL | SWT.READ_ONLY | SWT.MULTI);\n\t\tgridData = new GridData();\n\t\tgridData.horizontalAlignment = GridData.FILL;\n\t\tgridData.verticalAlignment = GridData.FILL;\n\t\tgridData.heightHint = 140;\n\t\tgridData.widthHint = 180;\n\t\tgridData.grabExcessHorizontalSpace = true;\n\t\tgridData.grabExcessVerticalSpace = false;\n\t\tgridData.horizontalSpan = 1;\n\t\tgridData.verticalSpan = 1;\n\t\tsensorText.setLayoutData(gridData);\n\n\t\t// sensor Task label\n\t\tsensorTaskLabel = new Label(groupRight, SWT.NONE);\n\t\tsensorTaskLabel.setText(\"Sensor Tasks\");\n\t\tsensorTaskLabel.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, false, 1, 1));\n\n\t\tsensorTaskText = new StyledText(groupRight, SWT.BORDER | SWT.READ_ONLY | SWT.MULTI);\n\t\tgridData = new GridData();\n\t\tgridData.horizontalAlignment = GridData.CENTER;\n\t\tgridData.verticalAlignment = GridData.BEGINNING;\n\t\tgridData.heightHint = 80;\n\t\tgridData.widthHint = 180;\n\t\tgridData.grabExcessHorizontalSpace = true;\n\t\tgridData.grabExcessVerticalSpace = true;\n\t\tgridData.horizontalSpan = 1;\n\t\tgridData.verticalSpan = 1;\n\t\tsensorTaskText.setLayoutData(gridData);\n\n\t\t// configButton\n\t\tconfigButton = new Button(groupRight, SWT.PUSH);\n\t\tconfigButton.setText(\"Start Configure\");\n\t\tgridData = new GridData();\n\t\tgridData.horizontalAlignment = GridData.CENTER;\n\t\tgridData.verticalAlignment = GridData.CENTER;\n\t\tgridData.widthHint = 100;\n\t\tgridData.heightHint = 30;\n\t\tgridData.grabExcessHorizontalSpace = true;\n\t\tgridData.grabExcessVerticalSpace = true;\n\t\tgridData.horizontalSpan = 1;\n\t\tgridData.verticalSpan = 1;\n\t\tconfigButton.setLayoutData(gridData);\n\n\t\tstatusBar = new Text(shell, SWT.BORDER | SWT.READ_ONLY | SWT.SINGLE);\n\t\tgridData = new GridData();\n\t\tgridData.horizontalAlignment = GridData.FILL;\n\t\tgridData.verticalAlignment = GridData.FILL;\n\t\tgridData.grabExcessHorizontalSpace = true;\n\t\tgridData.grabExcessVerticalSpace = true;\n\t\tgridData.horizontalSpan = 4;\n\t\tgridData.verticalSpan = 1;\n\t\tstatusBar.setLayoutData(gridData);\n\n\t}", "private void updateUI(){\n\t\tString eventType = eventbean.getEventType();\n\t\n\t\t//THE FOLLOWING MAKE EVERYTHING DISAPPEAR BEFORE UPDATING THE UI\n\t\t\n\t\t// set invisible text views not used and enable based on request\n\t\tresponse_tv.setVisibility(View.GONE);\n\t\tbtnContacts.setVisibility(View.GONE);\n\t\tbtnCallLog.setVisibility(View.GONE);\n\t\tbtnEnterNumManually.setVisibility(View.GONE);\n\t\tbtnEnterText.setVisibility(View.GONE);\n\t\thint_tv.setVisibility(View.GONE);\n\t\t\n\t\t// IF THERE ARE ALREADY INPUT TEXT REPONSE, THEN SHOW\n\t\tif (eventbean.getTextResponse().length() > 1){\n\t\t\t\n\t\t\tresponse_tv.setVisibility(View.VISIBLE);\n\t\t\tresponse_tv.setText(eventbean.getTextResponse());\n\t\t\t\n\t\t\t}\n\t\t\n\t\t// Clean up all the items in the radio group and check box layout\n\t\tradioGroup.removeAllViews();\n\t\tcheckboxLayout.removeAllViews();\n\t\t\n\t\t// based on the event type, dynamically change the user interface\n\t\tif (eventType.equals(\"TEXT_DISPLAY\")){\n\t\t\t\n\t\t\t// get text value from bean\n\t\t\tString textbody = eventbean.getTextbody().replace(\"\\\"\", \"\");\n\t\t\t\n\t\t\t//update user interface\n\t\t\ttitle_tv.setVisibility(View.GONE);\n\t\t\ttextbody_tv.setText(textbody);\n\t\t\tradioGroup.setVisibility(View.GONE);\n\t\t\t\n\t\t}\n\t\t\n\t\telse if(eventType.equals(\"TIE_DISPLAY\")){\n\t\t\t\n\t\t\t// getting the list of tie criteria associated with this event\n\t\t\tTieCriteria tieCriteria = eventbean.getTieCriteria().get(0);\n\t\t\t\n\t\t\t// initiate a String and a ArrayList to store names\n\t\t\tTie tie = null;\n\t\t\t\n\t\t\tTieGenerator tieGT = new TieGenerator(getActivity());\n\t\t\t\n\t\t\tif(eventbean.getDynamicText().length()<1){\n\t\t\t\n\t\t\t\t/* The following applies SELECTION METHOD = Random\n\t\t\t\t * As only random selection is used in TIE DISPLAY event\n\t\t\t\t */\n\t\t\t\t\n\t\t\t\ttry{\n\t\t\t\t\tint nameCount = tieGT.countTies(tieCriteria);\n\t\t\t\t\t\n\t\t\t\t\t// randomize to get a random name\n\t\t\t\t\tRandom rand = new Random();\n\t\t\t\t\tint place = rand.nextInt(nameCount)+1;\n\t\t\t\t\ttieCriteria.setPlace(place);\n\t\t\t\t\t\n\t\t\t\t\t// get a name based on the tie criteria\n\t\t\t\t\ttie = tieGT.getTieByCriteria(tieCriteria);\n\t\t\t\t\n\t\t\t\t}catch(Exception e){\n\t\t\t\t\t\n\t\t\t\t\ttie = new Tie(eventbean.getQid(),\"NONAME\", \"NONAME\", tieCriteria);\n\t\t\t\t\tLog.v(\"failedcriteria\",tieCriteria.toString());\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t\t\teventbean.setDynamicText(tie.getName());\n\t\t\t\t\n\t\t\t\t//show in text view\n\t\t\t\ttextbody_tv.setText(tie.getName());\n\t\t\t}\n\t\t\t\n\t\t\t\telse{\n\t\t\t\t\n\t\t\t\t//show in text view\n\t\t\t\ttextbody_tv.setText(eventbean.getDynamicText());\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//update user interface\n//\t\t\ttitle_tv.setText(eventIndex+\".Tie Display\");\n\t\t\ttitle_tv.setVisibility(View.GONE);\n\t\t\tradioGroup.setVisibility(View.GONE);\n\t\t}\n\t\t\n\t\telse if(eventType.equals(\"SURVEY_QUESTION\")){\n\t\t\t\n\t\t\t//IF EVENT IS SURVEY QUESTIONS \n\t\t\t//disable confirm button every time to DISALLOW skipping questions\n\t\t\t\n\t\t\t// setting the text for the question title text view\n//\t\t\tString qtitle = eventIndex+\".Survey Question\";\n\t\t\t\n\t\t\t// setting the text for the question body text view\n\t\t\tString qbody = eventbean.getTextbody().replace(\"\\\"\", \"\");\n\t\t\t\n\t\t\tint choiceTotal = eventbean.getChoicecount();\n\t\t\t\n\t\t\t// setting the current question title\n//\t\t\ttitle_tv.setText(qtitle);\n\t\t\ttitle_tv.setVisibility(View.GONE);\n\t\t\t\n\t\t\t// BRANCH ENABLED ONLY\n\t\t\t// if enabled branch, the hint will show that response can't be changed\n\t\t\tif (eventbean.isBranchEnabled()){\n\t\t\t\t\n\t\t\t\thint_tv.setVisibility(View.VISIBLE);\n\t\t\t\thint_tv.setText(R.string.branchenabled_hint);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t/* THE FOLLOWING APPLIES TO: DYNAMIC QUESTIONS\n\t\t\t * If the survey question requires dynamic text, will based on it\n\t\t\t * to modify the text body\n\t\t\t */\n\t\t\t\n\t\t\t// getting the list of tie criteria associated with this event\n\t\t\tArrayList<TieCriteria> criteriaList = eventbean.getTieCriteria();\n\t\t\t\n\t\t\t// if it is NOT empty, then there's dynamic text to show\n\t\t\tif(!criteriaList.isEmpty()){\n\t\t\t\t\n\t\t\t\t// rearrange the array list in order of text position\n\t\t\t\t// this is necessary for later inserting the text into question body\n\t\t\t\tComparator <TieCriteria> compareTextPosition = new Comparator<TieCriteria>(){\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic int compare(TieCriteria tc1, TieCriteria tc2) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (tc1.getTextPosition()!=tc2.getTextPosition()){\n\t\t\t\t\t\t\treturn tc1.getTextPosition() - tc2.getTextPosition(); \n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\t\n\t\t\t\t// rearrange the list in order of text position\n\t\t\t\tCollections.sort(criteriaList,compareTextPosition);\n\t\t\t\t\n\t\t\t\t// this array list is used locally, to make sure multiple tie criteria\n\t\t\t\t// in a single question does not generate the same name\n\t\t\t\tArrayList<String> event_local_namepool = new ArrayList<String>();\n\n\t\t\t\tTieGenerator tieGT = new TieGenerator(getActivity());\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//IF THERE ARE NO EXISTING GENERATED TIES(NEW EVENT)\n\t\t\t\t/* THE if(event.getDynamicText().length()<1) IS USED FOR THE \"BACK\" \n\t\t\t\t * CHECK FIRST IF THE TIE HAS ALREADY BEEN GENERATED\n\t\t\t\t * IF IT DOES, THEN USE PREVIOUSLY GENERATED TIES\n\t\t\t\t */\n\t\t\t\t\n\t\t\t\tif(eventbean.getDynamicText().length()<1){\n\t\t\t\t\n\t\t\t\t\t// this value is added up as tie is inserted into the question\n\t\t\t\t\tint differPos = 0;\n\t\t\t\t\n\t\t\t\tfor (TieCriteria tieCriteria:criteriaList){\n\t\t\t\t\t\n\t\t\t\t\t/* The following applies to when\n\t\t\t\t\t * SELECTION METHOD = Random\n\t\t\t\t\t */\n\t\t\t\t\tTie tie = null;\n\t\t\t\t\t\n\t\t\t\t\tif (tieCriteria.getMethod().equals(\"random\")){\n\t\t\t\t\t\t\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tint nameCount = tieGT.countTies(tieCriteria);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdo{\n\t\t\t\t\t\t\t// randomize to get a random name\n\t\t\t\t\t\t\tRandom rand = new Random();\n\t\t\t\t\t\t\tint place = rand.nextInt(nameCount)+1;\n\t\t\t\t\t\t\ttieCriteria.setPlace(place);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// get a name based on the tie criteria\n\t\t\t\t\t\t\ttie = tieGT.getTieByCriteria(tieCriteria);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}while(event_local_namepool.indexOf(tie.getName())!=-1);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// assigning question id and event index to the tie\n\t\t\t\t\t\t\ttie.setQid(eventbean.getQid());\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttie = new Tie(eventbean.getQid(),\"NONAME\", \"NONAME\", tieCriteria);\n\t\t\t\t\t\t\tLog.v(\"failedcriteria\",tieCriteria.toString());\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// register the name in the name pool\n\t\t\t\t\t\ttieGenerateCallBack.onTieGenerated(tie);\n\t\t\t\t\t\t\n\t\t\t\t\t}else if (tieCriteria.getMethod().equals(\"walk_through\")){\n\t\t\t\t\t\n\t\t\t\t\t\t/* the extra step in WALK THROUGH is just to check the name Pool\n\t\t\t\t\t\t * and make sure the name does not appear again.\n\t\t\t\t\t\t */\n\t\t\t\t\t\t\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tint nameCount = tieGT.countTies(tieCriteria);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdo{\n\t\t\t\t\t\t\t// randomize to get a random name\n\t\t\t\t\t\t\tRandom rand = new Random();\n\t\t\t\t\t\t\tint place = rand.nextInt(nameCount)+1;\n\t\t\t\t\t\t\ttieCriteria.setPlace(place);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// get a name based on the tie criteria\n\t\t\t\t\t\t\ttie = tieGT.getTieByCriteria(tieCriteria);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}while(local_tiePool.contains(tie) || //PAY ATTENTION IF IT WORKS\n\t\t\t\t\t\t\t\t\tevent_local_namepool.indexOf(tie.getName())!=-1);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// assigning question id to the tie\n\t\t\t\t\t\t\ttie.setQid(eventbean.getQid());\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttie = new Tie(eventbean.getQid(),\"NONAME\", \"NONAME\", tieCriteria);\n\t\t\t\t\t\t\tLog.v(\"failedcriteria\",tieCriteria.toString());\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// register the name in the name pool\n\t\t\t\t\t\t\ttieGenerateCallBack.onTieGenerated(tie);\n\t\t\t\t\t\t\t\n\t\t\t\t\t}else if (tieCriteria.getMethod().contains(\"use\")){\n\t\t\t\t\t\t\n\t\t\t\t\t\t/* the extra step in USE PREVIOUS TIE is just to check the name Pool\n\t\t\t\t\t\t * and pick up the name used in a previous question.\n\t\t\t\t\t\t */\n\t\t\t\t\t\t\n\t\t\t\t\t\t// first of all, parsing the USE PREVIOUS TIE STRING to get the question id and tie id\n\t\t\t\t\t\tString methodStr = tieCriteria.getMethod();\n\t\t\t\t\t\tint qid = Integer.parseInt(methodStr.substring(methodStr.indexOf(\"q\")+1, methodStr.indexOf(\"t\")));\n\t\t\t\t\t\tint criteria_id = Integer.parseInt(methodStr.substring(methodStr.indexOf(\"t\")+1, methodStr.length()));\n\t\t\t\t\t\t\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// iterate through the tie pool to find a previous tie that fits the question id and criteria id\n\t\t\t\t\t\t\tfor (int i = 0; i < local_tiePool.size(); i++){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tint q_id = local_tiePool.get(i).getQid();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tint c_id = local_tiePool.get(i).getCriteria().getId();\n\n\t\t\t\t\t\t\t\t// if match is found, get this tie!\n\t\t\t\t\t\t\t\tif(qid == q_id && c_id == criteria_id){\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// get this tie\n\t\t\t\t\t\t\t\t\ttie = local_tiePool.get(i);\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\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// NO NEED TO REGISTER, BECAUSE USED PREVIOUS TIE\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// error control: if not found previous tie, then assign NONAME\n\t\t\t\t\t\t\tif(tie == null)tie = new Tie(eventbean.getQid(),\"NONAME\", \"NONAME\", tieCriteria);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//this should not happen, if it does there's a big warning\n\t\t\t\t\t\t\tLog.v(\"debugtag\",\"Warning: Can't find previous tie.\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttie = new Tie(\"NONAME\", \"NONAME\", tieCriteria);\n\t\t\t\t\t\t\tLog.v(\"failedcriteria\",tieCriteria.toString());\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}\n\t\t\t\t\t\n\t\t\t\t\t// add to a name list to later avoid having two same names\n\t\t\t\t\tif(!tie.getName().equals(\"NONAME\"))event_local_namepool.add(tie.getName());\n\t\t\t\n\t\t\t\t\t// save this name to the event bean\n\t\t\t\t\teventbean.setDynamicText(eventbean.getDynamicText() + tie.getName() + \",\" );\n\t\t\t\t\t\n\t\t\t\t\t// get the position that this tie wants to be placed\n\t\t\t\t\tint position = tieCriteria.getTextPosition();\n\t\t\t\t\t\n\t\t\t\t\t// use a String Builder to insert the name into the text body\n\t\t\t\t\tStringBuilder inserted_qbody = new StringBuilder(qbody);\n\t\t\t\t\n\t\t\t\t\tint destination_position = (int)position + (int)differPos;\n\t\t\t\t\t\n\t\t\t\t\tif(destination_position > qbody.length())destination_position = qbody.length()-1;\n\t\t\t\n\t\t\t\t\tinserted_qbody.insert(destination_position,tie.getName());\n\t\t\t\t\t\n\t\t\t\t\tqbody = inserted_qbody+\"\";\n\t\t\t\t\t\n\t\t\t\t\tdifferPos = differPos + tie.getName().length();\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// ELSE IF the Dynamic Text is not empty\n\t\t\t\t\t// meaning ties have already been generated\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\t\n\t\t\t\t\t// this value is added up as tie is inserted into the question\n\t\t\t\t\tint differPos = 0;\n\t\t\t\t\t\n\t\t\t\t\tfor (int i=0 ; i < criteriaList.size();i++){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// retrieve the name from the already generated list\n\t\t\t\t\t\t\tString name = eventbean.getDynamicText().split(\",\")[i];\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// get the position that this tie wants to be placed\n\t\t\t\t\t\t\tint position = criteriaList.get(i).getTextPosition();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// use a String Builder to insert the name into the text body\n\t\t\t\t\t\t\tStringBuilder inserted_qbody = new StringBuilder(qbody);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tint destination_position = (int)position + (int)differPos;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(destination_position > qbody.length())destination_position = qbody.length()-1;\n\t\t\t\t\t\n\t\t\t\t\t\t\tinserted_qbody.insert(destination_position,name);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tqbody = inserted_qbody+\"\";\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdifferPos = differPos + name.length();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t}//correspond to the else\n\t\t\t\t\n\t\t\t}\n\n\t\t\t// setting the question body\n\t\t\ttextbody_tv.setText(qbody);\n\t\t\t\n\t\t\t// identify the question type\n\t\t\t\n\t\t\tString questionType = eventbean.getQuestionType();\n\t\t\t\n\t\t\t/* Based on the question type (single or multiple)\n\t\t\t * Different UI updates code will be initiated\n\t\t\t * 1. Single Choice: RadioGroup and RadioButtons will be used\n\t\t\t * 2. Multiple Choice: Check boxes will be used\n\t\t\t */\n\t\t\t\n\t\t\t\n\t\t\tif (questionType.equals(\"single\")){\n\t\t\t\t\n\t\t\t\t/*1. Single Choice Questions: update radio button for every choice\n\t\t\t\t * \n\t\t\t\t * The following code has been changed from its previous version\n\t\t\t\t * Now, it allows dynamically adding the radio buttons so there are no limit of choices\n\t\t\t\t * \n\t\t\t\t */\n\t\t\t\t\n\t\t\t\tradioGroup.setVisibility(View.VISIBLE);\n\t\t\t\t\n\t\t\t\tfor (int i = 0 ; i < choiceTotal ; i++)\n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\t// getting the text from the bean and update radio button text\n\t\t\t\t\t\tString choice_text = eventbean.getChoice(i);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// instantiate new radio buttons\n\t\t\t\t\t\tRadioButton choiceRadioButton = new RadioButton(getActivity());\n\t\t\t\t\t\t\n\t\t\t\t\t\t// setting the text and tag(used later to read choice text) of the radio button\n\t\t\t\t\t\tchoiceRadioButton.setText(choice_text.replace(\"\\\"\", \"\"));\n\t\t\t\t\t\tchoiceRadioButton.setTag((char) ('A' + i)); // this is to set characters as tags\n\t\t\t\t\t\t\n\t\t\t\t\t\t// setting the layout and style for the radio button\n\t\t\t\t\t\tRadioGroup.LayoutParams params = new RadioGroup.LayoutParams(\n\t\t\t\t LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);\n\t\t\t\t\t\tparams.setMargins(0, 0, 0, 30);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// styling the new added radio button\n\t\t\t\t choiceRadioButton.setLayoutParams(params);\n\t\t\t\t\t\tchoiceRadioButton.setTextSize(27);\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\tradioGroup.addView(choiceRadioButton,i);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\t * Setting a checked change lister for the radio Group\n\t\t\t\t * So when it is selected, will release the \"next\" button\n\t\t\t\t * And user can go to the next event\n\t\t\t\t */\n\t\t\t\t\n\t\t\t\tradioGroup.setOnCheckedChangeListener(new OnCheckedChangeListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onCheckedChanged(RadioGroup group, int checkedId) {\n\n\t\t \t/* Error Control\n\t\t \t * Every time a radio button is checked/unchecked,\n\t\t \t * it will check if there are radio buttons checked\n\t\t \t * if not, it will disable the \"next\" button\n\t\t \t */\n\t\t \t\n\t\t\t\t\t\t// if there exists radio button checked, then enable the next button\n\t\t\t\t\t\tif (checkedId != -1){\n\t\t \t\t\t\t\n\t\t \t\t\t\tRadioButton checkedButton = (RadioButton) group.findViewById(checkedId);\n\t\t \t\t\t\tint checkedIndex = group.indexOfChild(checkedButton) + 1;\n\t\t \t\t\t\t\n\t\t \t\t\t\tresponseCallBack.onEventResponded(eventbean.getIndex(),eventbean.getQid(),\"S\",checkedIndex+\"\");\n\t\t\t\t\t\t\t\n\t\t \t\t\t}else {responseCallBack.onEventResponded(eventbean.getIndex(),eventbean.getQid(),\"S\",\"-1\");}\n\t\t \t\t\t\n\t\t\t\t\t\t// FOR BRANCH ENABLED EVENTS ONLY\n\t\t\t\t\t\t// if branching is enabled, the response will NOT be allowed to change \n\t\t\t\t\t\t\n\t\t\t\t\t\tif(eventbean.isBranchEnabled())disableResponse();\n\t\t\t\t\t\t\n\t\t\t \t\t//record response\n\t\t\t \t\tcheckSingleChoice();\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t }\n\t\t ); \n\t\t\t\t\n\t\t\t\tString responseString = eventbean.getChoiceResponse();\n\t\t\t\t\n\t\t\t\t// make sure selected tag is not null first\n\t\t\t\tif(responseString!=null){\n\t\t\t\t\n\t\t\t\t\t// READ FROM RESPONSE: IF HAVE PREVIOUS RESPONSE, THEN RECALL\n\t\t\t\t\tString selectedTag = responseString.split(\"\\\\.\")[0];\n\t\t\t\t\t\n\t\t\t\t\tfor(int i = 0 ; i < radioGroup.getChildCount(); i++ ){\n\t\t\t\t\t\t\n\t\t\t\t\t\tRadioButton choice = (RadioButton)radioGroup.getChildAt(i);\n\n\t\t\t\t\t\tString choiceTag = choice.getTag()+\"\";\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (choiceTag.equals(selectedTag)){((RadioButton) radioGroup.getChildAt(i)).setChecked(true);}\n\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}else if (questionType.equals(\"multiple\")){\n\t\t\t\t/*2. Multiple Choice Questions: update check boxes for every choice\n\t\t\t\t *Since there's no thing as \"check box group\" the code here just\n\t\t\t\t *add the check boxes to the input linear layout\n\t\t\t\t */\n\t\t\t\t\n\t\t\t\tradioGroup.setVisibility(View.GONE);\n\t\t\t\t\n\t\t\t\t// used to store checked choices, accessed by later code \n\t\t\t\tArrayList<String> checkedChoices = new ArrayList<String>();\n\t\t\t\t\n\t\t\t\t// if there has already been response, check the boxes\n\t\t\t\tif(eventbean.getChoiceResponse().length()>1){\n\t\t\t\t\t\n\t\t\t\t\tString responseStr = eventbean.getChoiceResponse();\n\t\t\t\t\t\n\t\t\t\t\t\t// parsing every choice from the response string and add them to the list\n\t\t\t\t\t\tfor (int i = 0; i < responseStr.split(\",\").length ; i++ ){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString choice = responseStr.split(\",\")[i].split(\"\\\\.\")[0];\n\t\t\t\t\t\t\tcheckedChoices.add(choice);\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\tfor (int i = 0 ; i < choiceTotal ; i++)\n\t\t\t\t\t\n\t\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t// getting the text from the bean and update radio button text\n\t\t\t\t\tString choice_text = eventbean.getChoice(i);\n\t\t\t\t\t\n\t\t\t\t\t// instantiate new radio buttons\n\t\t\t\t\tCheckBox choiceCheckBox = new CheckBox(getActivity());\n\t\t\t\t\t\n\t\t\t\t\t// setting the text and tag(used later to read choice text) of the radio button\n\t\t\t\t\tchoiceCheckBox.setText(choice_text.replace(\"\\\"\", \"\"));\n\t\t\t\t\tchoiceCheckBox.setTag((char) ('A' + i)); // this is to set characters as tags\n\t\t\t\t\t\n\t\t\t\t\t// setting the layout and style for the radio button\n\t\t\t\t\tLinearLayout.LayoutParams params = new LinearLayout.LayoutParams(\n\t\t\t LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);\n\t\t\t\t\tparams.setMargins(0, 0, 0, 30);\n\t\t\t\t\t\n\t\t\t choiceCheckBox.setLayoutParams(params);\n\t\t\t choiceCheckBox.setTextSize(21);\n\t\t\t\t\t\n\t\t\t // setting the listener that will release the \"next\" button when checked\n\t\t\t choiceCheckBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {\n\n\t\t\t @Override\n\t\t\t public void onCheckedChanged(CompoundButton buttonView,boolean isChecked) {\n\t\t\t\t\t\t\t\n\t\t\t \t/* = Error Control =\n\t\t\t \t * Every time a box is checked/unchecked,\n\t\t\t \t * it will check if there are still boxes checked by the user\n\t\t\t \t * if not, it will disable the \"next\" button\n\t\t\t \t */\n\t\t\t \t\n\t\t\t \tString checkedBoxIndexString = \"\";\n\t\t\t \t\n\t\t\t \tfor (int i =0; i < checkboxLayout.getChildCount();i++){\n\t\t\t \t\t\t\n\t\t\t \t\t\tCheckBox choiceBox = (CheckBox) checkboxLayout.getChildAt(i);\n\t\t\t \t\t\t\n\t\t\t \t\t\t// if there exists checked box, then continue and enable \"next\" button\n\t\t\t \t\t\tif(choiceBox.isChecked()){\n\t\t\t \t\t\t\t\n\t\t\t \t\t\t\t// set the choice index string format\n\t\t\t \t\t\t\tcheckedBoxIndexString = checkedBoxIndexString + (i + 1) + \"&\";\n\t\t\t \t\t\t\t\n\t\t\t \t\t\t}\n\t\t\t \t}\n\t\t\t \t\n\t\t\t \t// if there exists checked box, then continue and enable \"next\" button\n\t\t\t \tif(!checkedBoxIndexString.equals(\"\")){\n\t\t\t \t\t\n\t\t\t \t\t// remove the & sign at end if exists\n\t\t\t\t \t\tif(checkedBoxIndexString.endsWith(\"&\")){\n\t\t\t\t \t\t\t\n\t\t\t\t \t\t\t// remove the & at the end\n\t\t\t\t \t\t\tcheckedBoxIndexString = checkedBoxIndexString.substring(0, checkedBoxIndexString.length()-1);\n\t\t\t\t \t\t\t\n\t\t\t\t \t\t}\n\t\t\t\t \t\t\n\t\t\t \t\tresponseCallBack.onEventResponded(eventbean.getIndex(),eventbean.getQid(),\"M\",checkedBoxIndexString);\n\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\t// if no checked box is found, then disable the button\n\t\t \t\t\t// THIS IS BECAUSE, we don't want to continue without at least a box checked\n\t\t\t \t\tresponseCallBack.onEventResponded(eventbean.getIndex(),eventbean.getQid(),\"M\",\"-1\");\n\t \t\t\t\n\t\t\t \t}\n\t\t\t \t\n\t\t\t \t//record the response\n\t\t\t \tcheckMultipleChoice();\n\t\t\t \t\n\t\t\t }\n\t\t\t }\n\t\t\t ); \n\t\t\t\t\t\n\t\t\t // looking up saved choices and check the selected boxes\n\t\t\t if (!checkedChoices.isEmpty()){\n\t\t\t \t\n\t\t\t \t// tag of the current check box\n\t\t\t \tString box_tag = choiceCheckBox.getTag()+\"\";\n\t\t\t \t\n\t\t\t \t// compared with all checked choices in the list\n\t\t\t \tif (checkedChoices.contains(box_tag))choiceCheckBox.setChecked(true);// if has, then check\n\t\t\t \t\n\t\t\t }\n\t\t\t \n\t\t\t\t\tcheckboxLayout.addView(choiceCheckBox,i);\n\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t\n\t\t\t// if the question asks user to select from contacts/call log/enter manually\n\t\t\t// the corresponding function button will show\n\t\t\tif(eventbean.isSelectContacts())btnContacts.setVisibility(View.VISIBLE);\n\t\t\tif(eventbean.isSelectCallLog())btnCallLog.setVisibility(View.VISIBLE);\n\t\t\tif(eventbean.isEnterManually())btnEnterNumManually.setVisibility(View.VISIBLE);\n\t\t\tif(eventbean.isEnterText())btnEnterText.setVisibility(View.VISIBLE);\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t}", "public void newClubEvent() {\n \n // Capture current category selection, if any\n String selectedTags = \"\";\n TagsNode tags = (TagsNode)tagsTree.getLastSelectedPathComponent();\n if (tags != null) {\n selectedTags = tags.getTagsAsString();\n } \n \n boolean modOK = modIfChanged();\n \n if (modOK) {\n position = new ClubEventPositioned();\n position.setIndex (clubEventList.size());\n localPath = \"\";\n display();\n clubEventPanel1.getStatusTextSelector().setText (selectedTags);\n }\n }", "private void fireActivationEvent()\n {\n Set<DataGroupInfo> activated;\n Set<DataGroupInfo> deactivated;\n synchronized (this)\n {\n activated = New.set(myDeltaActivatedGroups);\n myDeltaActivatedGroups.clear();\n deactivated = New.set(myDeltaDeactivatedGroups);\n myDeltaDeactivatedGroups.clear();\n }\n\n myController.getToolbox().getEventManager().publishEvent(new ActiveDataGroupsChangedEvent(this, activated, deactivated));\n myActivationChangeSupport.notifyListeners(r -> r.run());\n }", "private void createMainEvents() {\n\t\taddWindowListener(new WindowAdapter() {\n\t\t\t@Override\n\t\t\tpublic void windowClosing(WindowEvent arg0) {\n\t\t\t\tjdbc.closeSQLConnection();\n\t\t\t}\n\t\t});\n\t\t\n\t\tbtn_settings.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t}\n\t\t});\n\n\t}", "public void managerAdded(ManagerEvent e);", "public EventsGUI() {\n\t\t// ******** << DEBUGGING MENU FOR EVENTS ONLY >> ******** //\n\t\t// Source: https://docs.oracle.com/javase/tutorial/uiswing/layout/card.html\n\t\tJPanel eventMenuPane = new JPanel(new FlowLayout());\n String menuOptions[] = { SWITCH, BUTTON, LEVER };\n JComboBox<String> eventMenu = new JComboBox<>(menuOptions);\n eventMenu.setEditable(false);\n eventMenu.addItemListener(eventsMain);\n eventMenuPane.add(eventMenu);\n eventMenuPane.setOpaque(false);\n eventMenuPane.setVisible(false); // REMOVE THIS LINE TO ACTIVATE EVENT DEBUGGING\n // ^^*****************************************************************^^ //\n\t\t\n // call methods which generate each event space's GUI\n createImageFiles();\n\t\tcreateSwitchSpace();\n\t\tcreateButtonGrid();\n\t\tcreateLeverSpace();\n\t\tcreateMessageWindow();\n\t\t\n\t\t// add each event's panel to the event main panel\n\t\teventPanel.setOpaque(false);\n\t\teventPanel.add(switchPanel, SWITCH);\n\t\teventPanel.add(buttonPanel, BUTTON);\n\t\teventPanel.add(leverPanel, LEVER);\n\n\t\t// add the event main panel and its background to the event container\n\t\teventsWindow = new JLabel(eventsBG);\n\t\teventsWindow.setBounds(0, 0, getEventsBG().getIconWidth(), getEventsBG().getIconHeight());\n\t\teventPanel.setBounds(0, 0, getEventsBG().getIconWidth(), getEventsBG().getIconHeight());\n\t\teventMenuPane.setBounds(150, 450, 300, 30);\n\t\t\n\t\t// add the close button for events\n\t\tcloseEventButton.addMouseListener(eventsMain);\n\t\tcloseEventButton.setBounds(540, 0, closeButton.getIconWidth(), closeButton.getIconHeight()); // close button position\n\t\t \n\t\t// assemble event components in the main event container\n\t\teventContainer.add(eventsWindow, new Integer(0));\n\t\teventContainer.add(eventPanel, new Integer(1));\n\t\teventContainer.add(closeEventButton, new Integer(2));\n\t\teventContainer.add(eventMenuPane, new Integer(2));\n\n\t\teventContainer.setOpaque(false);\n\t}", "private void setupNotificationLayout() {\n //Setup notification area to begin date-set process on click.\n notificationLayout.setOnTouchListener(new View.OnTouchListener() {\n @Override\n public boolean onTouch(View v, MotionEvent event) {\n showTimerPickerDialog();\n return false;\n }\n });\n\n //Remove date from task and updated view\n notificationRemoveButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n cal = null;\n EventBus.getDefault().post(new TaskEditedEvent());\n }\n });\n }", "private void createEvents() {\n\t\tbtnPushTheButton.addActionListener(new ActionListener() {\n\t\t\t\n\t\t\t\n\t\t\tprivate List<String> b;\n\n\t\n\t\t\t//@SuppressWarnings(\"unchecked\")\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tact = true;\n\t\t\t\t\n//\t\t\t\tb = new ArrayList<String>();\n//\t\t\t\t\n//\t\t\t\tthis.b= (List<String>) ((List<Object>) (agent.v.getData())).stream().map(item -> {\n//\t\t\t\t\treturn (String) item;\n//\t\t\t\t});\n//\t\t\t\tString c = String.join(\", \", b);\n//\t\t\t\tclassTextArea.setText(c);\n//\t\t\t\n//\t\t\t\tclassTextArea.setText(b.toString());\n//\t\t\t\t\n//\t\t\t\treturn;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t});\n\t\t\n\t}", "@Override\n public void onInteractabilityChanged(boolean interactable) {\n maybeUpdateLayout();\n }", "protected void addCalendarWidgets() {\n\n calendarMenu = new MenuBar();\n clubName = new Label();\n nameLayout = new EVerticalLayout(clubName);\n clubNamePanel = new Panel(nameLayout);\n\n addCalendarMenuItems();\n\n addComponents(calendarMenu, clubNamePanel, calendar);\n clubNamePanel.setSizeUndefined();\n\n clubName.setStyleName(ValoTheme.LABEL_BOLD);\n setComponentAlignment(clubNamePanel, Alignment.MIDDLE_CENTER);\n setComponentAlignment(calendarMenu, Alignment.MIDDLE_CENTER);\n\n addComponents(calendarMenu, clubNamePanel, calendar);\n // nameLayout.setComponentAlignment(clubName, Alignment.MIDDLE_CENTER);\n clubNamePanel.setSizeUndefined();\n\n clubName.setStyleName(ValoTheme.LABEL_BOLD);\n setComponentAlignment(clubNamePanel, Alignment.MIDDLE_CENTER);\n setComponentAlignment(calendarMenu, Alignment.MIDDLE_CENTER);\n }", "private void registerEvents(){\n\t\tPluginManager pm = getServer().getPluginManager();\r\n\t\t//PlayerListener stuff\r\n\t pm.registerEvent(Event.Type.PLAYER_CHAT, playerListener, Event.Priority.Normal, this);\r\n\t pm.registerEvent(Event.Type.PLAYER_MOVE, playerListener, Event.Priority.Normal, this);\r\n\t pm.registerEvent(Event.Type.PLAYER_QUIT, playerListener, Event.Priority.Normal, this);\r\n pm.registerEvent(Event.Type.PLAYER_INTERACT, playerListener, Event.Priority.Normal, this);\r\n\t //BlockListener stuff\r\n pm.registerEvent(Event.Type.BLOCK_PLACE, blockListener, Event.Priority.Normal, this);\r\n pm.registerEvent(Event.Type.BLOCK_DAMAGE, blockListener, Event.Priority.Normal, this);\r\n pm.registerEvent(Event.Type.BLOCK_BREAK, blockListener, Event.Priority.Normal, this);\r\n //EntityListener stuff\r\n pm.registerEvent(Event.Type.CREATURE_SPAWN, entityListener, Event.Priority.Normal, this);\r\n pm.registerEvent(Event.Type.ENTITY_DAMAGE, entityListener, Event.Priority.Normal, this);\r\n //ServerListener stuff\r\n pm.registerEvent(Event.Type.PLUGIN_ENABLE, serverListener, Event.Priority.Normal, this);\r\n pm.registerEvent(Event.Type.PLUGIN_DISABLE, serverListener, Event.Priority.Normal, this);\r\n }", "protected void setInteracting(CommandSender sender) {\n this.sender = sender;\n setChanged();\n notifyObservers();\n }", "@CallSuper\n public void registerOrganizer() {\n try {\n getController().registerOrganizer(mInterface);\n } catch (RemoteException e) {\n throw e.rethrowFromSystemServer();\n }\n }", "private EventController()\n {\n events = new ArrayList<>();\n currentCalendar = Calendar.getInstance();\n }", "private void setConnections(ObservableList<CalendarEvent> calendarEventList) {\n // populate the calendar\n // setting the appointment group applies the correct CSS to it\n calendarEventList.forEach((calendarEvent -> calendarEvent.setAppointmentGroup(appointmentGroup)));\n agenda.appointments().addAll(calendarEventList);\n\n // push the changes to agenda\n calendarEventList.addListener(this::forwardChanges);\n }", "@Override\n\tpublic void update(Event e) {\n\t}", "public interface ManagerListener extends EventListener {\r\n\t\r\n\t/**\r\n\t * Method to notify that a manager has joined the application.\r\n\t *\r\n\t * @param e the event\r\n\t */\r\n\tpublic void managerAdded(ManagerEvent e);\r\n\t\r\n\t/**\r\n\t * Method to notify that a manager's active model has been modified\r\n\t * to reflect a new design task.\r\n\t *\r\n\t * @param e the event\r\n\t */\r\n\tpublic void managerModelModified(ManagerEvent e);\r\n\t\r\n\t/**\r\n\t * Method to notify that a manager's output has been modified to \r\n\t * reflect a new set of inputs from designers.\r\n\t *\r\n\t * @param e the event\r\n\t */\r\n\tpublic void managerOutputModified(ManagerEvent e);\r\n\t\r\n\t/**\r\n\t * Method to notify that a manger has left the application.\r\n\t *\r\n\t * @param e the event\r\n\t */\r\n\tpublic void managerRemoved(ManagerEvent e);\r\n}", "private void setControls() {\n calendarDisplayBox.addEventFilter(KEY_PRESSED, event -> {\n switch (event.getCode()) {\n case LEFT:\n logger.info(\"LEFT arrow Pressed.\");\n displayPreviousWeek();\n indicateCalendarDisplayTimeChanged();\n break;\n case RIGHT:\n logger.info(\"RIGHT arrow Pressed.\");\n displayNextWeek();\n indicateCalendarDisplayTimeChanged();\n break;\n default:\n }\n });\n }", "public void updateMenus() {\n\t\tSystem.out.println(\"BarGraphDisplayer.updateMenus\");\n\t\tCommandRegistrar.gRegistrar.checkAction(\"barGraph\");\n\t\tCommandRegistrar.gRegistrar.enableAction(\"viewOptions\");\n\t}", "@Override\r\n \tpublic void start(AcceptsOneWidget panel, EventBus eventBus) {\n \t\tpanel.setWidget(view);\t\t\r\n \t}", "private void initEvents() {\n\t\tuser_head_img.setOnClickListener(this);\r\n\t\ttxt_zcgl.setOnClickListener(this);\r\n\t\ttxt_tzgl.setOnClickListener(this);\r\n\t\ttxt_jlcx.setOnClickListener(this);\r\n\t\ttxt_wdyhk.setOnClickListener(this);\r\n\t\ttxt_wdxx.setOnClickListener(this);\r\n\t\tlayout_zhaq.setOnClickListener(this);\r\n\t\tlayout_ssmm.setOnClickListener(this);\r\n\t\ttxt_myredpager.setOnClickListener(this);\r\n\t}", "@Override\r\n\tprotected void bindEvents() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void bindEvents() {\n\t\t\r\n\t}" ]
[ "0.6344113", "0.62590903", "0.62477416", "0.6151383", "0.5999254", "0.5975234", "0.5954372", "0.5950906", "0.5933526", "0.5932672", "0.5927472", "0.5906235", "0.5887083", "0.5881413", "0.5859912", "0.58428705", "0.5833543", "0.5801797", "0.5770155", "0.5770018", "0.5744711", "0.5743972", "0.57434285", "0.57390827", "0.5713405", "0.56732535", "0.56453025", "0.56365454", "0.5634026", "0.56194234", "0.5613648", "0.5611805", "0.55979294", "0.5584571", "0.55726606", "0.55419827", "0.5539442", "0.5536819", "0.55317473", "0.55316883", "0.55257016", "0.55254084", "0.5518617", "0.5510222", "0.5508235", "0.5507777", "0.5505658", "0.5503592", "0.5501", "0.5472114", "0.5463719", "0.5463101", "0.5461367", "0.54604685", "0.54493225", "0.54483485", "0.54306865", "0.54295266", "0.5425123", "0.5422587", "0.5421602", "0.54202557", "0.54202557", "0.54202557", "0.5420133", "0.54175436", "0.54172075", "0.54166865", "0.54166234", "0.5415603", "0.54147977", "0.541201", "0.5403695", "0.5401724", "0.5383265", "0.5377609", "0.5373921", "0.5369084", "0.5366452", "0.5364559", "0.5358083", "0.5355716", "0.5355595", "0.53490883", "0.534175", "0.53367484", "0.5335085", "0.5334038", "0.5331553", "0.5329501", "0.5323668", "0.531975", "0.53143084", "0.53136516", "0.53134495", "0.5309757", "0.5308463", "0.5308302", "0.5307123", "0.5307123" ]
0.6519702
0
/ Getter and Setter
public long getId_donacion() { return id_donacion; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void get() {\n\t\t\r\n\t}", "@Override\n public void get() {}", "protected abstract Set method_1559();", "String setValue();", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "public void get() {\n }", "public void setdat()\n {\n }", "@Override\n String get();", "public T get() {\n return value;\n }", "public String get();", "public T get() {\n return value;\n }", "public T get() {\n return value;\n }", "public abstract String get();", "@Override\n\tpublic void getData() {\n\t\t\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public Object get()\n {\n return m_internalValue;\n }", "public String getValue() {\n/* 99 */ return this.value;\n/* */ }", "public Object getValue(){\n \treturn this.value;\n }", "public int\t\tget() { return value; }", "public V get() {\n return value;\n }", "private void assignment() {\n\n\t\t\t}", "public Object getValue() { return _value; }", "public Object getNewValue()\n {\n return newValue;\n }", "private void setData() {\n\n }", "public int getValue() {\n/* 450 */ return this.value;\n/* */ }", "private ReadProperty()\r\n {\r\n\r\n }", "public byte[] get(){\n return this.value;\n }", "public int value() { \n return this.value; \n }", "public void setAge(int age) { this.age = age; }", "@Override\n public Object getValue()\n {\n return value;\n }", "@Override\n\tpublic void initValue() {\n\t\t\n\t}", "public String get()\n {\n return this.string;\n }", "public Object getValue() { return this.value; }", "@Override\n\tpublic void setData() {\n\n\t}", "@Override\r\n public Object getValue() {\r\n return value;\r\n }", "public Object getValue()\n {\n\treturn value;\n }", "public int getAge() {return age;}", "@Override\n\tpublic Object getValue() {\n\t\treturn this ;\n\t}", "@Override\n\tpublic Object getValue() {\n\t\treturn this ;\n\t}", "public String getValor()\n/* 17: */ {\n/* 18:27 */ return this.valor;\n/* 19: */ }", "@Override\npublic void setAttributes() {\n\t\n}", "@Override\n\tpublic void setValue(Object value) {\n\t\t\n\t}", "@Override\n \tpublic IValue getValue() {\n \t\treturn this;\n \t}", "private PropertyAccess() {\n\t\tsuper();\n\t}", "public String get() {\n return value;\n\t}", "@Override\r\n\tpublic String get() {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic void set() {\n\t\tSystem.out.println(\"A==========set\");\n\t}", "public int get () { return rating; }", "public Value getValue(){\n return this.value;\n }", "public int getSet() {\n return set;\n }", "@Override\n\tprotected void GetDataFromNative() {\n\t\t\n\t}", "@Override\n\tprotected void GetDataFromNative() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic Object getValue() {\n\t\t\t\treturn null;\r\n\t\t\t}", "public void setValor(String valor)\n/* 22: */ {\n/* 23:34 */ this.valor = valor;\n/* 24: */ }", "public int getAge(){\n return age;\n }", "@Override\n\t\tpublic void set(E arg0) {\n\t\t\t\n\t\t}", "public void setPrice(double price){this.price=price;}", "@Override\n\tprotected void getExras() {\n\n\t}", "protected Object doGetValue() {\n\t\treturn value;\n\t}", "@Override\n\tprotected void setValueOnUi() {\n\n\t}", "public Empresa getEmpresa()\r\n/* 84: */ {\r\n/* 85:131 */ return this.empresa;\r\n/* 86: */ }", "public S getValue() { return value; }", "public Empleado getEmpleado()\r\n/* 183: */ {\r\n/* 184:337 */ return this.empleado;\r\n/* 185: */ }", "V getValue() {\n return value;\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n public int get()\n { \n return this.pr;\n }", "public int getlife(){\r\n return life;\r\n}", "public String setter() {\n\t\treturn prefix(\"set\");\n\t}", "@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 }", "boolean get();", "public void setM_Locator_ID (int M_Locator_ID)\n{\nset_Value (\"M_Locator_ID\", new Integer(M_Locator_ID));\n}", "@Override\n\tpublic String get() {\n\t\treturn null;\n\t}", "public void setNombre(String nombre) {\r\n\tthis.nombre = nombre;\r\n}", "@Override\n protected void getExras() {\n }", "@Override\n\t\tpublic V getValue(){\n\t\t\treturn value;\n\t\t}", "public abstract Object getValue();", "public abstract Object getValue();", "public abstract Object getValue();", "public void setNombre(String nombre) {this.nombre = nombre;}", "@Override\n\tprotected void getDataFromUCF() {\n\n\t}", "public int getNumber(){return number;}", "int getBlue(){\n\n return this.blue;\n }", "public int getID(){\r\n return this.ID;\r\n }", "@Override\n\tpublic void get() {\n\t\tSystem.out.println(\"this is get\");\n\t}", "public Address getAddress() { return address; }", "public void setValue(T value) {\n/* 89 */ this.value = value;\n/* */ }", "public String get() {\n return this.value;\n }", "String getName(){return this.name;}", "@Override\n\tpublic void setValue(Object object) {\n\t\t\n\t}", "public int getArmadura(){return armadura;}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void set(T e) {\n\t\t\n\t}", "public int getAge()\r\n {\r\n return age;\r\n }", "public String getNombre()\r\n/* 60: */ {\r\n/* 61: 67 */ return this.nombre;\r\n/* 62: */ }", "public Student getStudent() { return student; }", "public int getValue(){\n return this.value;\n }", "public void setName(String name){this.name=name;}", "String getValue() {\n return mValue;\n }", "String get();", "String get();", "public String getName () { return this.name; }" ]
[ "0.7014106", "0.6937696", "0.68222636", "0.66343254", "0.65488094", "0.65260863", "0.64485055", "0.6415086", "0.6334599", "0.6325895", "0.6303951", "0.6303951", "0.6301601", "0.6297698", "0.6275698", "0.62576044", "0.62281054", "0.6205482", "0.6191927", "0.61800617", "0.61780834", "0.6162079", "0.61559", "0.6152846", "0.6147762", "0.6137932", "0.61351264", "0.6124628", "0.6094258", "0.60929453", "0.607767", "0.60762686", "0.6054346", "0.604737", "0.6042987", "0.6028611", "0.60234904", "0.6010491", "0.6010491", "0.6009784", "0.59963983", "0.59678745", "0.5954207", "0.5951671", "0.59483916", "0.59447503", "0.59391946", "0.5937225", "0.59370995", "0.59334964", "0.5929541", "0.5929541", "0.5916062", "0.59068084", "0.59022504", "0.5898361", "0.5895902", "0.5892275", "0.5887565", "0.5886122", "0.588273", "0.5881559", "0.5879829", "0.5877229", "0.58771455", "0.58765936", "0.58716947", "0.58716774", "0.5870463", "0.58669466", "0.5866434", "0.58574915", "0.585734", "0.58471245", "0.5845642", "0.5842646", "0.5842646", "0.5842646", "0.5841815", "0.5840667", "0.58399856", "0.5832109", "0.58316666", "0.5831658", "0.5831197", "0.5826772", "0.5821473", "0.5814133", "0.58080727", "0.5804209", "0.58014524", "0.57967484", "0.5796083", "0.57946825", "0.5793269", "0.5793046", "0.5792884", "0.5791912", "0.57901394", "0.57901394", "0.57901126" ]
0.0
-1
TODO Autogenerated method stub
@Override public void setFocus() { }
{ "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
/ On initialise le client
@Before public void setUp() throws Exception { this.client = new Client("toto"); this.client.ajouterFichier("lol"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void init(){\n taskClient.connect(\"127.0.0.1\", 9123);\n }", "private ClientBootstrap() {\r\n init();\r\n }", "public Client() {\r\n\t// TODO Auto-generated constructor stub\r\n\t \r\n }", "public Client() {}", "public static void init() {\n startTime = System.currentTimeMillis();\n if (clientExecutorEngine == null) {\n clientExecutorEngine = new ClientExecutorEngine();\n HzClient.initClient();\n }\n }", "public Client() {\n\t\t// TODO Auto-generated constructor stub\n\t}", "public Client() {\n }", "public void init(){\n\t\tmultiplexingClientServer = new MultiplexingClientServer(selectorCreator);\n\t}", "public void init() {\n\t\ttry {\n\t\t\tthis.is = new ObjectInputStream(clientSocket.getInputStream());\n\t\t\tthis.os = new ObjectOutputStream(clientSocket.getOutputStream());\n\t\t\twhile (this.readCommand()) {}\n\t\t} \n\t\tcatch (IOException e) \n\t\t{\n\t\t\tSystem.out.println(\"XX. There was a problem with the Input/Output Communication:\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public HGDClient() {\n \n \t}", "private void initialize(){\n\t\ttry\n\t\t{\n\t\t\tString[] packet = setPacket();\n\t\t\tif (validatePacket(packet))\n\t\t\t{\n\t\t\t\tsend(packet);\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tSystem.out.println(e.getMessage());\n\t\t\tSystem.out.println(\"Something went wrong...\");\n\t\t\tresetClient();\n\t\t}\n\t}", "public Echange_Client() throws UnknownHostException, IOException {\n start_Connexion(); \n }", "public Client() {\n _host_name = DEFAULT_SERVER;\n _port = PushCacheFilter.DEFAULT_PORT_NUM;\n }", "@Override\n\tpublic void createClient() {\n\t\t\n\t}", "public UPKClient() {\n connectToServer(BASE_URL);\n }", "private void createClient() {\n tc = new TestClient();\n }", "@Override\r\n\tpublic void startup() {\n\t\t\r\n\t\tString wechatID = \"gh_f49bb9a333b3\";\r\n\t\tString Token = \"spotlight-wechat\";\r\n\t\t\r\n\t\tNoIOClient client = new NoIOClient(\"mg.protel.com.hk\",5010);\r\n\t\tclient.addCRouter(wechatID, Token,null,null);\r\n\t\t\r\n\t\tclient.startup();\r\n\r\n\t}", "public LpsClient() {\n super();\n }", "private CorrelationClient() { }", "public AbaloneClient() {\n server = new AbaloneServer();\n clientTUI = new AbaloneClientTUI();\n }", "public ServiceClient() {\n\t\tsuper();\n\t}", "public Cliente() {\n\t\tsuper();\n\t}", "void init() {\n CometUtils.printCometSdkVersion();\n validateInitialParams();\n this.connection = ConnectionInitializer.initConnection(\n this.apiKey, this.baseUrl, this.maxAuthRetries, this.getLogger());\n this.restApiClient = new RestApiClient(this.connection);\n // mark as initialized\n this.alive = true;\n }", "public TurnoVOClient() {\r\n }", "public void init() {\r\n \tconnection = Connect.initConnexion();\r\n \tSystem.out.println(\"connexion :\"+connection);\r\n }", "private void initData() {\n requestServerToGetInformation();\n }", "public void initiate(TelnetClient client) {\n\t}", "private void init() {\n\t\tinitProtocol();\n\t\tinitResultStorage();\n\t}", "@Override\n\tpublic void createClient(Client clt) {\n\t\t\n\t}", "private MatterAgentClient() {}", "public Client() {\n initComponents();\n \n Server server = new Server();\n server.start();\n \n }", "public static void initClient() {\n BundleEvents.register();\n }", "private ClientLoader() {\r\n }", "public GameServerClient(){\r\n\t\tinitComponents();\r\n\t\t}", "private ClientExecutorEngine() {\n ClientConfigReader.readConfig();\n DrillConnector.initConnection();\n HzConfigReader.readConfig();\n }", "@Override\n\tpublic void initialize() {\n\t\tSystem.out.println(\"TestClient initialization\");\n\t\tsubscribe(\"Scalars\");\n\t\tsubscribe(\"Triggers\");\n\t\tsubscribe(\"Alarms\");\n\n\t\t//If I'm a sender, run some tests\n\t\tif (_sender) {\n//\t\t\ttestIntArray();\n//\t\t\ttestSerializedObject();\n//\t\t\ttestStringArray();\n//\t\t\ttestDoubleArray();\n//\t\t\ttestString();\n//\t\t\ttestByteArray();\n//\t\t\ttestStreamedMessage();\n\t\t\tstressTest();\n\t\t}\n\t}", "public EO_ClientsImpl() {\n }", "public ServerConnecter() {\r\n\r\n\t}", "public JSipClient() {\n\t\tinitComponents();\n\t}", "void clientReady();", "private void resetClient()\n\t{\n\t\tSystem.out.println(\"\\n---Resetting client...\");\n\t\tSystem.out.println(\"\\n\");\n\t\tinitialize();\n\t}", "public ClientTSap() {\n socketFactory = SocketFactory.getDefault();\n }", "public void init() {\n configuration.init();\n \n //Connections connections = configuration.getBroker().getConnections(\"topic\");\n Connections connections = configuration.getBrokerPool().getBroker().getConnections(\"topic\");\n \n if (connections == null) {\n handleException(\"Couldn't find the connection factor: \" + \"topic\");\n }\n \n sensorCatalog = new SensorCatalog();\n clientCatalog = new ClientCatalog();\n \n nodeCatalog = new NodeCatalog();\n \n updateManager = new UpdateManager(configuration, sensorCatalog, this);\n updateManager.init();\n \n endpointAllocator = new EndpointAllocator(configuration, nodeCatalog);\n\n registry = new JCRRegistry(this);\n registry.init();\n\n // Initialize Public-End-Point\n if(!isPublicEndPointInit) {\n \tinitPublicEndpoint();\n }\n }", "@Override\n public void onInit(int i) {\n\n // Solicito informacion completa\n requestFull();\n Log.i(\"#FSEM# SERVICE\", \"ON INIT\");\n\n // Loop mientras haya conexión para solicitar\n // información actualizada\n new Thread(new Runnable() {\n @Override\n public void run() {\n while (client.isConnected() && SemComunication.run) {\n informTimeToCross();\n SystemClock.sleep(900);\n }\n close();\n staticDisconect();\n }\n }).start();\n }", "public Cliente() {\n }", "private Client() {\n solution_set = new HashSet<>();\n contentsMap = new HashMap<>();\n current_state = new HashSet<>();\n next_state = new HashSet<>();\n }", "public RedisClient() {\n init();\n }", "public FClientSR() {\n random = new Random();\n helper = new Helper();\n receivedPacketList = new HashMap<>();\n expectedList = new ArrayList<>();\n loadList(expectedList);\n }", "ClientMessageSender() {\n\n\t}", "@Before\n\tpublic void setup() {\n\n\t\tclient = ClientBuilder.newClient();\n\n\t}", "public static void init() {\n client = new OkHttpClient();\n\n //Construct a HTTP builder\n retrofit = new Retrofit.Builder()\n .client(client)\n .baseUrl(apiAddress)\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n\n //Form an API to receive a token\n kedronService = retrofit.create(IKedronService.class);\n }", "private void initializeNA(){\n name = \"N/A\";\n key = \"N/A\";\n serverIpString = \"N/A\";\n serverPort = 0;\n clientListenPort = 0;\n }", "Cliente(){}", "private void initialize(){\n if(uri != null)\n httpUriRequest = getHttpGet(uri);\n httpClient = HttpClients.createDefault();\n }", "public DmaiClient() {\r\n\t\tthis.mainView = new MainView();\r\n\t\tconnexionServeur();\r\n\r\n\t}", "private void init() {\n\n\t\tgroup = new NioEventLoopGroup();\n\t\ttry {\n\t\t\thandler = new MoocHandler();\n\t\t\tBootstrap b = new Bootstrap();\n\t\t\t\n\t\t\t\n\t\t\t//ManagementInitializer ci=new ManagementInitializer(false);\n\t\t\t\n\t\t\tMoocInitializer mi=new MoocInitializer(handler, false);\n\t\t\t\n\t\t\t\n\t\t\t//ManagemenetIntializer ci = new ManagemenetIntializer(handler, false);\n\t\t\t//b.group(group).channel(NioSocketChannel.class).handler(handler);\n\t\t\tb.group(group).channel(NioSocketChannel.class).handler(mi);\n\t\t\tb.option(ChannelOption.CONNECT_TIMEOUT_MILLIS, 10000);\n\t\t\tb.option(ChannelOption.TCP_NODELAY, true);\n\t\t\tb.option(ChannelOption.SO_KEEPALIVE, true);\n\n\t\t\t// Make the connection attempt.\n\t\t\tchannel = b.connect(host, port).syncUninterruptibly();\n\n\t\t\t// want to monitor the connection to the server s.t. if we loose the\n\t\t\t// connection, we can try to re-establish it.\n\t\t\tChannelClosedListener ccl = new ChannelClosedListener(this);\n\t\t\tchannel.channel().closeFuture().addListener(ccl);\n\t\t\tSystem.out.println(\" channle is \"+channel);\n\t\t} catch (Exception ex) {\n\t\t\tlogger.error(\"failed to initialize the client connection\", ex);\n\n\t\t}\n\n\t\t// start outbound message processor\n\t//\tworker = new OutboundWorker(this);\n\t//\tworker.start();\n\t}", "public ClientLoginService(){\n this(MessageConnection.CHANNEL_DEFAULT_RELIABLE);\n }", "public ClientsSpeicher() {\n mDb = new MyArrowDB().getInstance();\n }", "public Ctacliente() {\n\t}", "@Override\n public void setUp() throws Exception {\n transport = new TFramedTransport(new TSocket(\"123.56.206.195\", 1982));\n\n\n\n TProtocol protocol = new TBinaryProtocol(transport);\n client = new SubjectServ.Client(protocol);\n transport.open();\n }", "public Client(Client client) {\n\n }", "public Intermediary()\r\n\t{\r\n\t\ttry {\r\n\t\t\treceiveSocket = new DatagramSocket(68);\r\n\t\t\tsendReceiveSocket = new DatagramSocket();\t\t\t\r\n\t\t\t\r\n\t\t} catch (SocketException se) {\r\n\t\t\tse.printStackTrace();\r\n\t\t\tSystem.exit(1);\r\n\t\t} \r\n\t\t\r\n\t\treqID = 1;\r\n\t\tSystem.out.println(\"===== INTERMEDIATE HOST STARTED =====\\n\");\r\n\t}", "public TCPMessengerServer() {\n initComponents();\n customInitComponents();\n listenForClient(); \n }", "private void init() {\n AdvertisingRequest();// 广告列表请求线程\n setapiNoticeControllerList();\n }", "public HRModuleClient() {\n }", "@PostConstruct\n public void init() {\n c=new Cliente();\n lc=null;\n }", "public Server(){\r\n \r\n this.m_Clients = new TeilnehmerListe();\r\n this.m_Port = 7575;\r\n }", "public BrowseOffenceAMClient() {\r\n }", "private APIClient() {\n }", "public void updateClient()\n\t{\n\t\t// TODO\n\t}", "private NotificationClient() { }", "private void initService() {\r\n\t}", "public NMQModuleClient() {\r\n }", "public void createClient() {\n client = new UdpClient(Util.semIp, Util.semPort, this);\n\n // Le paso true porque quiero que lo haga en un hilo nuevo\n client.connect(true);\n }", "public ClienteServicio() {\n }", "private ClientController() {\n }", "public void teleopInit() {\n \n }", "public static void initCommunicationClientThread(){\r\n new CommunicationClientThread();\r\n }", "public Factory() {\n this(getInternalClient());\n }", "protected ClientSimulator() {\r\n\r\n\t\tthis.publicKeysOfMixes = getPublicKeys();\r\n\t\t\r\n\t\t// start ClientSimulator\r\n\t\tstart();\r\n\t}", "private static void initializeClient(Client client) {\n\t\tclient.setReportFolder(reportFolder);\n\t\tString[] statArray = new String[statTypes.size()];\n\t\tstatTypes.keySet().toArray(statArray);\n\t\tclient.setStatTypes(statArray);\n\t}", "@PostConstruct\n public void init() {\n rest.put(\"http://authenticationServer:8080/bot\", info);\n AuthServerChecker checker = new AuthServerChecker(name);\n checker.start();\n }", "private void init() {\n\n\t}", "protected ClientStatus() {\n }", "public ClientData() {\n\n this.name = \"\";\n this.key = \"\";\n this.serverIpString = \"\";\n this.serverPort = 0;\n this.clientListenPort = 0;\n this.clientsSocketPort = 0;\n this.clientsLocalHostName = \"\";\n this.clientsLocalhostAddressStr = \"\";\n\n this.socket = new Socket();\n\n try {\n this.socket.bind(null);\n } catch (IOException ex) {\n ClientInterface.getjTextArea1().append(\"Error. Unable to load data and create client.\");\n }\n \n try {\n this.clientsLocalHostName = InetAddress.getLocalHost().getHostName();\n this.clientsLocalhostAddressStr = InetAddress.getLocalHost().getHostAddress();\n } catch (UnknownHostException ex) {\n ClientInterface.getjTextArea1().append(\"Error. Unable to load data and create client.\");\n }\n this.clientsSocketPort = socket.getLocalPort();\n\n parseClientConfigFile();\n\n //Initialize ServerSocket and bind to specific port.\n try {\n serverS = new ServerSocket(clientListenPort);\n } catch (IOException ex) {\n ClientInterface.getjTextArea1().append(\"Error. Unable to load data and create client.\");\n }\n }", "private void initialize() {\n\t\tservice = KCSClient.getInstance(this.getApplicationContext(), new KinveySettings(APP_KEY, APP_SECRET));\n\n BaseKinveyDataSource.setKinveyClient(service);\n }", "protected Gateway(boolean noInit) {\n genClient = null;\n }", "private void init() {\n\t\tsendPacket(new Packet01Login(\"[you have connected to \"+UPnPGateway.getMappedAddress()+\"]\", null));\n\t}", "public Cinit(String server_ip) {\n this.server_ip=server_ip;\n start();\n }", "public TelaCliente() {\n initComponents();\n conexao=ModuloConexao.conector();\n }", "private void addClient () {\n ArrayList<String> info = loadOnePlayerInfo();\n Ntotal++;\n Nnow++;\n\n System.out.println(\"Vai ser inicializado o utilizador \" + info.get(0));\n initThread(info.get(0), info.get(1));\n }", "private TcpClient()\n {\n socket = null;\n writer = null;\n connected = false;\n \n connect(\"localhost\", 7778);\n }", "public Client(ClientConfiguration conf) {\n clientMessages = new Stack<>();\n serverMessages = new Stack<>();\n this.conf = conf;\n encryptionSessionHashMap = new HashMap<>();\n savedMessage = new HashMap<>();\n }", "public void initializeRPC(){\n try{XmlRpcClientConfigImpl configuration = new XmlRpcClientConfigImpl();\n configuration.setServerURL(new URL(\"http://\"+RunnerRepository.host+\n \":\"+RunnerRepository.getCentralEnginePort()+\"/ra/\"));\n configuration.setEnabledForExtensions(true);\n configuration.setBasicPassword(RunnerRepository.password);\n configuration.setBasicUserName(RunnerRepository.user);\n client = new XmlRpcClient();\n client.setConfig(configuration);\n System.out.println(\"XMLRPC Client for testbed initialized: \"+client);}\n catch(Exception e){System.out.println(\"Could not conect to \"+\n RunnerRepository.host+\" :\"+RunnerRepository.getCentralEnginePort()+\"/ra/\"+\n \"for RPC client initialization\");}\n }", "public ClientConfiguration() {\n serverIp = DEFAULT_SERVER_IP;\n serverPort = DEFAULT_SERVER_PORT;\n }", "public void initializeClient(WebSocketAdapter client) {\n\t\tServer.log.debug(\"Send initial node info to \" + client);\r\n\r\n\t\tfor (IController controller : this.controllers.values()) {\r\n\t\t\tif (controller != null && controller.isEnabled() && controller.isInitialized()) {\r\n\t\t\t\tCollection<JSONMessage> messages = controller.initClient();\r\n\t\t\t\tif (messages != null) {\r\n\t\t\t\t\tfor (JSONMessage message : messages) {\r\n\t\t\t\t\t\tclient.getRemote().sendStringByFuture(message.serialize().toString());\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 void onCreate() {\n Log.i(TAG, \"MinaClient create\");\r\n\r\n Thread thread = new Thread(this);\r\n thread.start();\r\n\r\n CommandHandle.getInstance().setContext(getApplicationContext());\r\n }", "public InscriptionClient() {\n initComponents();\n }", "public GerenciarCliente() {\n initComponents();\n }", "private MockClientFacade() {\n\t\t//this.c = Client.getInstance();\n\t}", "private void init(String ip, int port, String name) {\n this.settings = new Settings(ip, port, name);\n this.network = new Network(this);\n this.clientGUI = new ClientGUI(this);\n //\n new Thread(network::start).start();\n }" ]
[ "0.744276", "0.7422111", "0.73647255", "0.73606354", "0.7325459", "0.7325381", "0.72477865", "0.7245482", "0.7245453", "0.723643", "0.7181802", "0.7173221", "0.7137251", "0.7136658", "0.7084905", "0.7076523", "0.70693314", "0.70586693", "0.7056861", "0.7008487", "0.6975478", "0.6974208", "0.6948055", "0.6934697", "0.6894332", "0.6886905", "0.6876469", "0.68720984", "0.6868464", "0.6835913", "0.68022853", "0.67861795", "0.6774537", "0.676429", "0.67632335", "0.6738007", "0.6725923", "0.6718568", "0.6714139", "0.6708255", "0.6701912", "0.66932976", "0.6683852", "0.6680574", "0.6674655", "0.66648036", "0.6652905", "0.66428673", "0.6639596", "0.6637148", "0.66366655", "0.6626438", "0.6626436", "0.6615762", "0.66120684", "0.65691346", "0.656599", "0.6563075", "0.655889", "0.6554492", "0.65505844", "0.6545002", "0.65448326", "0.6542937", "0.6537221", "0.6528509", "0.65220326", "0.6519201", "0.65173936", "0.65048885", "0.6493421", "0.6491547", "0.64907265", "0.64897275", "0.648646", "0.64727724", "0.64592797", "0.64591616", "0.64517003", "0.6451571", "0.64497286", "0.64432675", "0.6441504", "0.6432556", "0.6426868", "0.64239675", "0.64196986", "0.64180404", "0.64179534", "0.6416727", "0.6400282", "0.63915604", "0.6387399", "0.6385721", "0.6380646", "0.6376089", "0.63718784", "0.6371156", "0.63642305", "0.6361334", "0.6358873" ]
0.0
-1
/ On verifie si l'ajout de l'etiquette a reussi
@Test public void testAjouterEtiquette() { assertEquals(true,this.client.ajouterEtiquette("Film", "lol")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void verifierSaisie(){\n boolean ok = true;\n\n // On regarde si le client a ecrit quelque chose\n if(saisieMessage.getText().trim().equals(\"\"))\n ok = false;\n\n if(ok)\n btn.setEnabled(true); //activer le bouton\n else\n btn.setEnabled(false); //griser le bouton\n }", "public void actionPerformed(ActionEvent e) {\r\n\t\tif (verifier()){\r\n\t\t\tvue.ajouterJoueur();\r\n\t\t\tJOptionPane.showMessageDialog(vue,\"Joueur ajouté !\");\r\n\t\t}\r\n\r\n\t}", "private static void verifPayement(){\n\t\tint x,y, dime;\n\t\tx=jeu.getAssam().getXPion()-1;\n\t\ty=jeu.getAssam().getYPion()-1;\n\t\tint caseInfoTapis = jeu.cases[x][y].getCouleurTapis();\n\t\tif(caseInfoTapis == tour || caseInfoTapis == 0){\n\t\t\treturn;\n\t\t}\n\t\telse{\n\t\t\tdime = jeu.payerDime(caseInfoTapis,x,y,0,new boolean[7][7]);\n\t\t\tJoueur payeur = jeu.getJoueurs()[tour-1];\n\t\t\tJoueur paye = jeu.getJoueurs()[caseInfoTapis-1];\n\t\t\tif(jeu.payerVraimentDime(payeur,paye,dime)){\n\t\t\t\tjoueurElimine++;\n\t\t\t}\n\t\t\tconsole.afficherPayeurPaye(payeur, paye, dime);\n\t\t}\n\t}", "@SkipValidation\n public String makeChangesToShowMessage() {\n important = impService.getImportantNews(important.getImportantNewsId());\n if (important.isShowMessage() == false) {\n important.setShowMessage(true);\n impService.updateImportantNews(important);\n }\n return SUCCESS;\n }", "private void peliLoppuuUfojenTuhoamiseen() {\n if (tuhotut == Ufolkm) {\n ingame = false;\n Loppusanat = \"STEVE HOLT!\";\n }\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tif (ta.getText().trim().length() > 0) {\n\t\t\t\t\tint re = -1;\n\t\t\t\t\tif (isChanged)\n\t\t\t\t\t\tre = JOptionPane.showConfirmDialog(f, \"변경된 내용을 저장하시겠습니까?\", \"확인\",\n\t\t\t\t\t\t\t\tJOptionPane.YES_NO_CANCEL_OPTION);\n\n\t\t\t\t\tSystem.out.println(\"new \" + re);\n\t\t\t\t\tif (re == 0) {\n\t\t\t\t\t\tsaveFile();\n\t\t\t\t\t\tfile = null;\n\t\t\t\t\t\tta.setText(\"\");\n\t\t\t\t\t} else if (re == 1) {\n\t\t\t\t\t\tfile = null;\n\t\t\t\t\t\tta.setText(\"\");\n\t\t\t\t\t}\n\t\t\t\t} else\n\t\t\t\t\tta.setText(\"\");\n\t\t\t}", "private void IsAbleToGebruikEigenschap() throws RemoteException {\n boolean eigenschapGebruikt = speler.EigenschapGebruikt();\n if (eigenschapGebruikt == true) {\n gebruikEigenschap.setDisable(true);\n }\n }", "private void vereenvoudigAction() {\n foutLabel.setText(\"\");\n int teller = Integer.parseInt(tellerVeld.getText());\n int noemer = Integer.parseInt(noemerVeld.getText());\n if (noemer <= 0) {\n foutLabel.setText(\"Noemer moet positief zijn\");\n }\n else if (teller < 0) {\n foutLabel.setText(\"Teller mag niet negatief zijn\");\n }\n else {\n Breuk breuk = new Breuk(teller, noemer); \n if (breuk != null) {\n breuk.vereenvoudig();\n tellerVeld.setText(breuk.getTeller() + \"\");\n noemerVeld.setText(breuk.getNoemer() + \"\");\n }\n }\n }", "public void actionsTouches () {\n\t\t//Gestion des deplacements du mineur si demande\n\t\tif (Partie.touche == 'g' || Partie.touche == 'd' || Partie.touche == 'h' || Partie.touche == 'b') deplacements();\n\n\t\t//Affichage du labyrinthe et des instructions, puis attente de consignes clavier.\n\t\tpartie.affichageLabyrinthe();\n\n\t\t//Quitte la partie si demande.\n\t\tif (Partie.touche == 'q') partie.quitter();\n\n\t\t//Trouve et affiche une solution si demande.\n\t\tif (Partie.touche == 's') affichageSolution();\n\n\t\t//Recommence la partie si demande.\n\t\tif (Partie.touche == 'r') {\n\t\t\tgrille.removeAll();\n\t\t\tpartie.initialisation();\n\t\t}\n\n\t\t//Affichage de l'aide si demande\n\t\tif (Partie.touche == 'a') {\n\t\t\tString texteAide = new String();\n\t\t\tswitch(themeJeu) {\n\t\t\tcase 2 : texteAide = \"Le but du jeu est d'aider Link à trouver la sortie du donjon tout en récupérant le(s) coffre(s).\\n Link doit egalement recuperer la Master Sword qui permet de tuer le monstre bloquant le chemin.\\n\\nLink se déplace à l'aide des touches directionnelles.\\nUne solution peut-être affichée en appuyant sur la touche (s).\\nLa touche (r) permet de recommencer, (q) de quitter.\\n\\n Bon jeu !\"; break;\n\t\t\tcase 3 : texteAide = \"Le but du jeu est d'aider Samus à trouver la sortie du vaisseau tout en récupérant le(s) émeraude(s).\\nSamus doit egalement recuperer la bombe qui permet de tuer le metroid qui bloque l'accès à la sortie.\\n\\nSamus se déplace à l'aide des touches directionnelles.\\nUne solution peut-être affichée en appuyant sur la touche (s).\\nLa touche (r) permet de recommencer, (q) de quitter.\\n\\n Bon jeu !\"; break;\n\t\t\tcase 4 : texteAide = \"Le but du jeu est d'aider le pompier à trouver la sortie du batiment tout en sauvant le(s) rescapé(s).\\nLe pompier doit egalement recuperer l'extincteur qui permet d'éteindre le feu qui bloque l'accès à la sortie.\\n\\nLe pompier se déplace à l'aide des touches directionnelles.\\nUne solution peut-être affichée en appuyant sur la touche (s).\\nLa touche (r) permet de recommencer, (q) de quitter.\\n\\n Bon jeu !\"; break;\n\t\t\tcase 5 : texteAide = \"Le but du jeu est d'aider Mario à trouver le drapeau de sortie tout en ramassant le(s) pièce(s).\\nMario doit egalement recuperer l'étoile d'invincibilité qui permet de se débarasser du Goomba qui l'empêche de sortir.\\n\\nMario se déplace à l'aide des touches directionnelles.\\nUne solution peut-être affichée en appuyant sur la touche (s).\\nLa touche (r) permet de recommencer, (q) de quitter.\\n\\n Here we gooo !\"; break;\n\t\t\tdefault : texteAide = \"Le but du jeu est d'aider le mineur à trouver la sortie du labyrinthe tout en extrayant le(s) filon(s).\\nLe mineur doit egalement recuperer la clef qui permet l'ouverture de le porte qui bloque l'accès à la sortie.\\n\\nLe mineur se déplace à l'aide des touches directionnelles.\\nUne solution peut-être affichée en appuyant sur la touche (s).\\nLa touche (r) permet de recommencer, (q) de quitter.\\n\\n Bon jeu !\"; break;\n\t\t\t}\n\t\t\tSystem.out.println(\"\\n============================================ AIDE ========================================\\n\\n\" + texteAide + \"\\n\\n==========================================================================================\\n\");\n\t\t\tJOptionPane.showMessageDialog(null, texteAide, \"Aide\", JOptionPane.QUESTION_MESSAGE);\n\t\t\tPartie.touche = ' ';\n\t\t}\n\n\t\t//Affichage de les infos si demande\n\t\tif (Partie.touche == 'i') {\n\t\t\tSystem.out.println(\"\\n============================================ INFOS =======================================\\n\\nCe jeu a ete developpe par Francois ADAM et Benjamin Rancinangue\\ndans le cadre du projet IPIPIP 2015.\\n\\n==========================================================================================\\n\");\n\t\t\tPartie.touche = ' ';\n\t\t\tJOptionPane.showMessageDialog(null, \"Ce jeu a été développé par François Adam et Benjamin Rancinangue\\ndans le cadre du projet IPIPIP 2015.\", \"Infos\", JOptionPane.INFORMATION_MESSAGE, new ImageIcon(getClass().getResource(\"/images/EMN.png\")));\n\t\t}\n\n\t\t//Nettoyage de l'ecran de console\n\t\tSystem.out.println(\"\\n==========================================================================================\\n\");\n\t}", "public boolean sucheMitspieler();", "private void gaVerder()\n {\n /**\n * Dialog tonen waarbij de gebruiker de keuze krijgt om al dan niet nog een spelbord te maken.\n */\n Alert keuze = new Alert(Alert.AlertType.CONFIRMATION);\n keuze.setTitle(ResourceHandling.getInstance().getString(\"Configureer.gaverder\"));\n keuze.setHeaderText(ResourceHandling.getInstance().getString(\"Knop.verder\"));\n\n ButtonType btnNieuw = new ButtonType(ResourceHandling.getInstance().getString(\"Spelbord.nieuw\"));\n ButtonType btnCancel = new ButtonType(ResourceHandling.getInstance().getString(\"Annuleer.knop\"));\n\n keuze.getButtonTypes().setAll(btnCancel, btnNieuw);\n Optional<ButtonType> result = keuze.showAndWait();\n\n if (result.get() == btnNieuw)\n {\n LoaderSchermen.getInstance().load(\"Sokoban\", new GaVerderSchermController(dc), 488, 213, this);\n } else\n {\n LoaderSchermen.getInstance().load(\"Sokoban\", new KiesConfigureerSchermController(dc), 300, 300, this);\n }\n }", "public boolean attivaPulsanteProsegui(){\n\t\tif(!model.isSonoInAggiornamentoIncasso()){\n\t\t\tif(null!=model.getGestioneOrdinativoStep1Model().getOrdinativo() && model.getGestioneOrdinativoStep1Model().getOrdinativo().isFlagCopertura() && model.getGestioneOrdinativoStep2Model().getListaSubOrdinativiIncasso()!= null && model.getGestioneOrdinativoStep2Model().getListaSubOrdinativiIncasso().size()>0){\n\t\t\t return true;\t\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t}", "public boolean update(Contribuyente contribuyente){\n return true;\n }", "private void B_InscrireActionPerformed(java.awt.event.ActionEvent evt) {\n \n String ident=T_Email.getText();\n String mdp1=String.valueOf(Ps_Mdp.getPassword());\n String mdp2=String.valueOf(Ps_ConfirmeMdp.getPassword());\n String prenom_uti=prenom.getText();\n String nom_uti=nom.getText();\n \n boolean ajout;\n \n if (mdp1.equals(mdp2)){\n System.out.println(\"Les deux mots de passe correspondent\");\n Bdd bdd = new Bdd();\n \n //On vérifie que l'utilisateur existe pas déjà\n boolean exists = bdd.liste_uti(ident);\n \n if(exists==true){ //alors on ajoute\n bdd.Inscription(ident,mdp1,prenom_uti,nom_uti);\n AffichageConnexion Aff = new AffichageConnexion();\n Aff.setLocationRelativeTo(null);\n Aff.setVisible(true);\n this.dispose();\n }\n else {\n System.out.println(\"existe déjà\");\n } \n }\n else \n System.out.println(\"mdp diff\");\n }", "public void quitter() {\n\n\t\tint rep = JOptionPane.showConfirmDialog(null, \"Voulez-vous vraiment quitter ?\" , \"Attention\", JOptionPane.WARNING_MESSAGE);\n\t\tif (rep == JOptionPane.OK_OPTION)\n\t\t{\n\t\t\tsetChanged();\n\t\t\tnotifyObservers(QUITTER);\n\t\t}\n\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"<html><center><u><strong>Edité par :</strong></u><br>RAHMANI ABD EL KADER<br>SEIF EL ISLEM<br> Groupe 1 Section 1</center></html>\", \"A propros\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t}", "private void verificaVencedor(){\n\n // Metodo para verificar o vencedor da partida\n\n if(numJogadas > 4) {\n\n String vencedor = tabuleiro.verificaVencedor();\n\n vencedor = (numJogadas == tabuleiro.TAM_TABULEIRO && vencedor == null) ? \"Deu Velha!\" : vencedor;\n\n if (vencedor != null) {\n\n mostraVencedor(vencedor);\n temVencedor = true;\n\n }\n\n }\n\n }", "public void verificar_que_se_halla_creado() {\n\t\t\n\t}", "private void afficheSuiv(){\n\t\ttry{ // Essayer ceci\n\t\t\tif(numCourant <= rep.taille()){\n\t\t\t\tnumCourant ++;\n\t\t\t\tPersonne e = rep.recherchePersonne(numCourant); // Rechercher la personne en fonction du numCourant\n\t\t\t\tafficherPersonne(e);\n\t\t\t}else{\n\t\t\t\tafficherMessageErreur();\n\t\t\t}\n\t\t}catch(Exception e){ // Permet de voir s'il y a cette exception\n\t\t\tafficherMessageErreur();\n\t\t\tnumCourant --;\n\t\t}\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n fenetre.getClient().envoyerMessage(getMessage(), optionEnvoi); // Envoie du message\n saisieMessage.setText(\"\"); // On supprime le texte de la saisie message\n }", "private void onCheckBoxTeilungRechts()\n\t{\n\t\tif (istBeimTaktLaden)\n\t\t\treturn;\n\n\t\tistBeimTaktLaden = true;\n\t\t\n\t\thandleTeilung(getJCheckBoxTeilungLinks().isSelected(),\n\t\t\t\t\t\tgetJCheckBoxTeilungMitte().isSelected(),\n\t\t\t\t\t\tgetJCheckBoxTeilungRechts().isSelected());\n\t\t\t\t\n\t\tistBeimTaktLaden = false;\n\t}", "private void botonEnviarActionPerformed(java.awt.event.ActionEvent evt) {\n emisor = Integer.parseInt(jTextField2.getText());\r\n time_emisor = Integer.parseInt(jTextField4.getText());\r\n receptor = Integer.parseInt(jTextField3.getText());\r\n time_receptor = Integer.parseInt(jTextField5.getText());\r\n \r\n posXEmisor = emisor;\r\n posYEmisor = time_emisor;\r\n posXReceptor = receptor;\r\n posYReceptor = time_receptor;\r\n \r\n if(desfaces[emisor][time_emisor]>=desfaces[receptor][time_receptor]){\r\n jButton1.setEnabled(true);\r\n lienzo.setGraficar_flecha(true);\r\n } else {\r\n lienzo.setGraficar_flecha(false);\r\n lienzo.repaint();\r\n jPanel5.repaint();\r\n }\r\n }", "private void gestionPriseEnCompte() {\r\n\t\tString raison = new String(\"\");\r\n\t\tDate now = new Date();\r\n\t\tString strSql = \"\";\r\n\t\r\n if (tbAlarme.getRowCount() > 0) {\r\n \tif (tbAlarme.getSelectedRowCount() > 0) {\r\n\t\t int[] selection = tbAlarme.getSelectedRows();\r\n\t\t int indexSelection = selection[0];\r\n\t\t int idCapteur = mdlTpsReelAlarme.getIdCapteur(indexSelection); \r\n\t\t String strTypeAlarme = \"\";\r\n\t\t \r\n\t\t\t\t// Motif Prise En Compte seulement si appel Alert\r\n\t\t strTypeAlarme = (String) mdlTpsReelAlarme.getValueAt(indexSelection, JTABLE_ALARME_TYPE_ALARME);\r\n\t\t if (strTypeAlarme.equals(\"Alarme\")) {\r\n\t\t\t\t\tint idPriseEnCompte = 0;\r\n\t\t \tdo {\r\n\t\t\t\t\t\tObject [] possibilites = new Object[tbPriseEnCompte.size()];\r\n\t\t\t\t\t\tfor(int i = 0; i < tbPriseEnCompte.size(); i++) {\r\n\t\t\t\t\t\t\tpossibilites[i] = tbPriseEnCompte.get(i).getNom();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tString strReponse = (String)JOptionPane.showInputDialog(this, \"Choisir un motif de prise en compte : \", \"Prise en compte\", JOptionPane.QUESTION_MESSAGE, null, possibilites, null);\r\n\t\t\t\t\t\tidPriseEnCompte = 1;\r\n\t\t\t\t\t\tif (strReponse != null) {\r\n\t\t\t\t\t\t\tfor(int i = 0; i < tbPriseEnCompte.size(); i++) {\r\n\t\t\t\t\t\t\t\tif(strReponse.equals(tbPriseEnCompte.get(i).getNom())) {\r\n\t\t\t\t\t\t\t\t\tidPriseEnCompte = (int) tbPriseEnCompte.get(i).getId();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} // fin for\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\traison = \"En attente\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// idPriseEncompte == 1 (Autres)\r\n\t\t\t\t\t\tif(idPriseEnCompte == 1) {\r\n\t\t\t\t\t\t\t// Demande de commentaire\r\n\t\t\t\t\t\t\traison = AE_Fonctions.saisieTexte(\"Veuillez entrer une raison : \", \"Raison commentaire ...\");\r\n\t\t\t\t\t\t\tif (raison == null) raison = \"\";\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\traison = \"---\";\r\n\t\t\t\t\t\t}\r\n\t\t \t} while(raison == \"\");\r\n\t\t \t\r\n\t\t\t\t\tstrSql = \"UPDATE V2_AlarmeEnCours SET idPriseEnCompte = \" + idPriseEnCompte\r\n\t\t\t\t\t\t\t + \" , idUtilisateur = \" + EFS_Client_Variable.idUtilisateur\r\n\t\t\t\t\t\t\t + \" , CommentairePriseEnCompte = '\" + raison + \"'\"\r\n\t\t\t\t\t\t\t + \" WHERE idCapteur = \" + idCapteur;\r\n\t\t\t\t\tctn.fonctionSql(strSql);\r\n\t\t\t\t\tmdlTpsReelAlarme.setMotifIdPriseEncompte(indexSelection, idPriseEnCompte);\r\n\t\t } // fin if appelAlert\r\n\r\n\t\t if(mdlTpsReelAlarme.getValueAt(indexSelection, JTABLE_ALARME_PRISE_EN_COMPTE) == null) {\r\n\t\t\t\t\t// Date prise en compte\r\n\t\t\t\t\tstrSql = \"UPDATE V2_AlarmeEnCours SET DatePriseEnCompte = sysdate, blPriseEnCompte = 1 WHERE idCapteur = \" + idCapteur;\r\n\t\t\t\t\tctn.fonctionSql(strSql);\r\n\t\t\t\t\tmdlTpsReelAlarme.setValueAt(now, indexSelection, JTABLE_ALARME_PRISE_EN_COMPTE);\r\n\t\t } // fin if datePrsieEnCompte\r\n\t\r\n\t\t // Prevenir le programme maitre\r\n\t\t AE_Fonctions.modifierMaitreViaClient(idCapteur, VIA_API_PRISE_EN_COMPTE);\r\n\t\t \r\n\t\t\t\t// Arret klaxon et Alert\r\n//\t\t\t\tgestionKlaxon(false);\r\n//\t\t\t\tgestionAlert(false);\r\n\t\t\t\t\r\n \t} else {\r\n \t JOptionPane.showMessageDialog(this, \"Vous devez sélectionner une ligne pour prendre en compte ...\",\r\n \t \t\t \"GTC Visualize - Programme Maitre\", JOptionPane.WARNING_MESSAGE);\r\n \t}\r\n } else {\r\n//\t\t\tgestionKlaxon(false);\r\n//\t\t\tgestionAlert(false);\r\n }\r\n\t}", "private boolean correcto() {\r\n return (casillas.size()>numCasillaCarcel); //&&tieneJuez\r\n }", "public void effetCarte(Partie partie) {\r\n\r\n\t\tint nbHuitsJoues = partie.getLesJoueurs().get(partie.getTour()).getNbCartesJouees();\r\n\r\n\t\tpartie.setNbTouraPasser( partie.getNbTouraPasser() + (1*nbHuitsJoues) );\r\n\r\n\t\tif (nbHuitsJoues==1)\r\n\t\t\tSystem.out.println(\"--> Le joueur suivant passe son tour\");\r\n\t\telse\r\n\t\t\tSystem.out.println(\"--> Les \"+nbHuitsJoues+\" joueurs suivants passent leurs tour\");\r\n\r\n\r\n\r\n\r\n\t}", "public void bienvenida(){\n System.out.println(\"Bienvenid@ a nuestro programa de administracion de parqueos\");\n }", "private void ajouterPot (int somme) {\r\n\t\tbanque.ajouter(somme);\r\n\t}", "private void exemTimeOver() {\n\t\tuploadBtn.setVisible(false);\n\t\tapproveImage.setVisible(false);\n\t\tuploadExamTxt.setText(\"Exam time is over, you can not upload files anymore\");\n\t\ttimer.cancel();\n\t\t// sign the student as someone who start the exam but did not submitted\n\t\tflag1 = false;\n\t\tsummbitBlank();\n\t}", "private void afegirButtonPressed(){\n Toaster toaster = new Toaster(getContext());\n if(Afegir.getCurrentTextColor() == ResourcesCompat.getColor(getResources(), R.color.solidGray, null))\n //Cas d'error: es preten referenciar a una definició inexistent.\n toaster.standardToast(getText(R.string.err_equ_not_match).toString());\n\n else if(WordText.getText().toString().isEmpty() ||\n TranText.getText().toString().isEmpty() ||\n Categories.getText().toString().isEmpty() ||\n (Equival.isChecked() &&\n (!(EquWord.isChecked() || EquTran.isChecked()) ||\n InfoText.getText().toString().isEmpty()))){\n\n //Cas d'error: no poden ser buits, ja que la base de dades ho requereix axi.\n toaster.standardToast(getText(R.string.err_empty_elements).toString());\n }\n\n else insertOrUpdateItem();\n }", "public static void jouerAuJustePrix() {\n\t\tint nbVies=Tools.inputInt(\"Combien de tentatives voulez-vous ? \");\n\t\tint limite=Tools.inputInt(\"Quel est le nombre maximum à prendre en compte?\");\n\t\tint nbATrouver=Tools.randomint(limite);\n\t\tint nbPropose;\n\t\t\n\t\twhile (nbVies>0){\n\t\t\tnbPropose=Tools.inputInt(\"Saisissez un nombre : \");\n\t\t\tif (afficherResultatProposition(nbPropose, nbATrouver)) {\n\t\t\t\tbreak;\n\t\t\t};\n\t\t\tnbVies=nbVies-1;\n\t\t}\n\t\t\n\t\tif (nbVies==0) {\n\t\t\tSystem.out.println(\"Game Over\");\n\t\t}\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n if (model.getHintsUsed() < model.getPuzzle().getDifficulty().getMaxHints()) {\n model.getPuzzle().hint(false);\n model.setHintsUsed(model.getHintsUsed() + 1);\n update();\n System.err.println(\"HINT USED: \" + model.getStringHintsUsed());\n if (model.getHintsUsed() == model.getPuzzle().getDifficulty().getMaxHints()) {\n view.getGamePanel().getHintBtn().setEnabled(false);\n JOptionPane.showOptionDialog(getParent(), \"Let's not make it too easy!\\nThat was the last hint for this game.\\n\\nDid you Know?\\nSudokus can likely prevent Alzheimer's disease\\nand Dementia, so don't make it too easy.\", \"Out of Hints\", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, null, null, null);\n }\n checkGridCompletion();\n }\n }", "public void envoyerEtatUniteProduction(EtatUniteProduction etat) throws Exception;", "private void onCheckBoxTeilungMitte()\n\t{\n\t\tif (istBeimTaktLaden)\n\t\t\treturn;\n\n\t\tistBeimTaktLaden = true;\n\n\t\tif (getJCheckBoxTeilungMitte().isSelected())\n\t\t{\n\t\t\tgetJCheckBoxTeilungLinks().setEnabled(true);\n\t\t\tgetJCheckBoxTeilungRechts().setEnabled(true);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tgetJCheckBoxTeilungLinks().setEnabled(false);\n\t\t\tgetJCheckBoxTeilungRechts().setEnabled(false);\n\t\t\tgetJCheckBoxTeilungLinks().setSelected(false);\n\t\t\tgetJCheckBoxTeilungRechts().setSelected(false);\n\t\t}\n\t\thandleTeilung(getJCheckBoxTeilungLinks().isSelected(),\n\t\t\t\t\t\tgetJCheckBoxTeilungMitte().isSelected(),\n\t\t\t\t\t\tgetJCheckBoxTeilungRechts().isSelected());\n\t\t\t\t\t\t\n\t\tistBeimTaktLaden = false;\n\t}", "public void showReportAbuseSuccess() {\n try {\n AlertDialog.Builder builder = new AlertDialog.Builder(this.mContext);\n builder.setTitle(this.mContext.getResources().getString(R.string.consult_report_abuse_thanks));\n builder.setMessage(this.mContext.getResources().getString(R.string.consult_comment_report_abuse_success));\n builder.setPositiveButton(this.mContext.getResources().getString(R.string.alert_dialog_confirmation_ok_button_text), new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialogInterface, int i) {\n dialogInterface.dismiss();\n }\n });\n builder.show();\n } catch (Exception unused) {\n Trace.w(TAG, \"Failed to show disclaimer for consult photo editing\");\n }\n }", "public void choixDeJeu () {\n\t\t//Affichage d'une fenetre qui permet de choisir entre un labyrinthe genere aleatoirement et un fichier txt\n\t\tString[] choixPossibles = {\"Generer un labyrinthe aleatoirement\", \"Ouvrir un labyrinthe en .txt\"};\n\t\tString choix = (String)JOptionPane.showInputDialog(null, \"Que voulez-vous faire ?\", \"Labyrinthe\", JOptionPane.QUESTION_MESSAGE, new ImageIcon(getClass().getResource(\"/images/icone.gif\")), choixPossibles, choixPossibles[0]);\n\t\t\n\t\t//Si le bouton \"Annuler\" n'est pas presse\n\t\tif (choix != null) {\n\t\t\t//Affichage d'une fenetre qui permet de choisir le theme du jeu\n\t\t\tString[] choixTheme = {\"Theme par defaut\", \"Theme d'ancien labyrinthe en pierre\", \"Theme de The legend of zelda\", \"Theme de Métroid\", \"Theme d'incendie dans un batiment\", \"Theme de Mario\"};\n\t\t\tString theme = (String)JOptionPane.showInputDialog(null, \"Quel theme voulez-vous ?\", \"Choix du theme\", JOptionPane.QUESTION_MESSAGE, new ImageIcon(getClass().getResource(\"/images/icone.gif\")), choixTheme, choixTheme[1]);\n\n\t\t\t//Si le bouton \"Annuler\" n'est pas presse\n\t\t\tif (theme != null) {\n\t\t\t\t\n\t\t\t\t//Enregistrement du theme et changement de la couleur de fond de la fenetre.\t\n\t\t\t\tswitch (theme) {\n\t\t\t\tcase \"Theme par defaut\" : \n\t\t\t\t\tthemeJeu = 0;\n\t\t\t\t\tgrille.setBackground(new Color(91, 60, 17));\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"Theme de The legend of zelda\" : \n\t\t\t\t\tthemeJeu = 2; \n\t\t\t\t\tgrille.setBackground(Color.BLACK);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"Theme de Métroid\" : \n\t\t\t\t\tthemeJeu = 3; \n\t\t\t\t\tgrille.setBackground(Color.white);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"Theme d'incendie dans un batiment\" : \n\t\t\t\t\tthemeJeu = 4; \n\t\t\t\t\tgrille.setBackground(new Color(61, 43, 31));\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"Theme de Mario\" : \n\t\t\t\t\tthemeJeu = 5; \n\t\t\t\t\tgrille.setBackground(Color.cyan);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault :\n\t\t\t\t\tthemeJeu = 1;\n\t\t\t\t\tgrille.setBackground(new Color(69, 69, 69));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t//Si l'utilisateur a choisi d'ouvrir un fichier texte\n\t\t\t\tif (choix.equals(\"Ouvrir un labyrinthe en .txt\")) {\t\t\t\t\n\t\t\t\t\t//On ouvre un explorateur qui permet de ne selectionner que des fichiers .txt\n\t\t\t\t\tJFileChooser exploreur = new JFileChooser();\n\t\t\t\t\tFileNameExtensionFilter filter = new FileNameExtensionFilter(\".txt\", \"txt\");\n\t\t\t\t\texploreur.setFileFilter(filter);\n\t\t\t\t\texploreur.setAcceptAllFileFilterUsed(false);\n\t\t\t\t\tint valeurRetournee = exploreur.showOpenDialog(null);\n\n\t\t\t\t\t//Si le fichier est correct, on enregistre le nom de ce dernier, et on initie une partie.\n\t\t\t\t\tif (valeurRetournee == JFileChooser.APPROVE_OPTION) {\n\t\t\t\t\t\tpartie.fichier = exploreur.getSelectedFile().getPath();\n\t\t\t\t\t\tpartie.largeur = 0;\n\t\t\t\t\t\tpartie.hauteur = 0;\n\t\t\t\t\t\tpartie.nbFilons = 0;\n\t\t\t\t\t\tinitialisation();\n\t\t\t\t\t}\n\t\t\t\t\t//Sinon, on quitte le programme.\n\t\t\t\t\tif (valeurRetournee == JFileChooser.CANCEL_OPTION) {\n\t\t\t\t\t\tpartie.quitter();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//Si l'utilisateur a choisi de generer un labyrinthe aleatoirement\n\t\t\t\telse {\n\t\t\t\t\t//On cree une nouvelle fenetre\n\t\t\t\t\tJFrame fenetreDimensions = new JFrame();\n\n\t\t\t\t\t//On cree un premier panneau qui contient un texte et un slider afin de regler la hauteur du labyrinthe\n\t\t\t\t\tJPanel panneauHauteur = new JPanel();\n\t\t\t\t\tJLabel labelHauteur = new JLabel(\"25 cases :\");\n\t\t\t\t\tJSlider sliderHauteur = new JSlider();\t\t\t\t\n\t\t\t\t\tsliderHauteur.setMaximum(21);\n\t\t\t\t\tsliderHauteur.setMinimum(6);\n\t\t\t\t\tsliderHauteur.setValue(13);\n\t\t\t\t\tsliderHauteur.addChangeListener(new ChangeListener(){\n\t\t\t\t\t\t//Action liee au deplacement du slider\n\t\t\t\t\t\tpublic void stateChanged(ChangeEvent event){\n\t\t\t\t\t\t\tlabelHauteur.setText(2*((JSlider)event.getSource()).getValue()-1 + \" cases :\");\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tpanneauHauteur.setBorder(BorderFactory.createTitledBorder(\"Hauteur du labyrinthe\"));\n\t\t\t\t\tpanneauHauteur.add(labelHauteur);\n\t\t\t\t\tpanneauHauteur.add(sliderHauteur);\n\n\t\t\t\t\t//On cree un second panneau qui contient un texte et un slider afin de regler la largeur du labyrinthe\n\t\t\t\t\tJPanel panneauLargeur = new JPanel();\n\t\t\t\t\tJLabel labelLargeur = new JLabel(\"25 cases :\");\n\t\t\t\t\tJSlider sliderLargeur = new JSlider();\n\t\t\t\t\tsliderLargeur.setMaximum(38);\n\t\t\t\t\tsliderLargeur.setMinimum(6);\n\t\t\t\t\tsliderLargeur.setValue(13);\n\t\t\t\t\tsliderLargeur.addChangeListener(new ChangeListener(){\n\t\t\t\t\t\tpublic void stateChanged(ChangeEvent event){\n\t\t\t\t\t\t\t//Action liee au deplacement du slider\n\t\t\t\t\t\t\tlabelLargeur.setText(2*((JSlider)event.getSource()).getValue()-1 + \" cases :\");\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tpanneauLargeur.setBorder(BorderFactory.createTitledBorder(\"Largeur du labyrinthe\"));\n\t\t\t\t\tpanneauLargeur.add(labelLargeur);\n\t\t\t\t\tpanneauLargeur.add(sliderLargeur);\n\n\t\t\t\t\t//On cree un bouton \"Continuer\"\n\t\t\t\t\tJButton boutonContinuer = new JButton(\"Continuer\");\n\t\t\t\t\tboutonContinuer.addActionListener(new ActionListener() {\n\t\t\t\t\t\t//Action liee a l'appui sur le bouton \"continuer\"\n\t\t\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\t\t//On efface la fenetre precedente et on en recree une\n\t\t\t\t\t\t\tfenetreDimensions.dispose();\n\t\t\t\t\t\t\tJFrame fenetreFilons = new JFrame();\n\n\t\t\t\t\t\t\t//On enregistre les valeurs des sliders precedents\n\t\t\t\t\t\t\tpartie.largeur = 2*sliderLargeur.getValue()-1;\n\t\t\t\t\t\t\tpartie.hauteur = 2*sliderHauteur.getValue()-1;\n\n\t\t\t\t\t\t\t//On cree un nouveau panneau qui contient un texte et un slider afin de regler le nombre de filons\n\t\t\t\t\t\t\tJPanel panneauFilons = new JPanel();\n\t\t\t\t\t\t\tJLabel labelFilons = new JLabel(1 + \" filon(s) :\");\n\t\t\t\t\t\t\tJSlider sliderFilons = new JSlider();\n\t\t\t\t\t\t\tsliderFilons.setMinimum(0);\n\t\t\t\t\t\t\tsliderFilons.setMaximum((partie.largeur*partie.hauteur-partie.largeur-partie.hauteur+3)/4);\n\t\t\t\t\t\t\tsliderFilons.setValue(1);\n\t\t\t\t\t\t\tsliderFilons.setMajorTickSpacing((partie.largeur*partie.hauteur-partie.largeur-partie.hauteur+3)/8);\n\t\t\t\t\t\t\tsliderFilons.setPaintTicks(true);\n\t\t\t\t\t\t\tsliderFilons.setPaintLabels(true);\n\t\t\t\t\t\t\tsliderFilons.addChangeListener(new ChangeListener(){\n\t\t\t\t\t\t\t\tpublic void stateChanged(ChangeEvent event) {\n\t\t\t\t\t\t\t\t\t//Action liee au deplacement du slider\n\t\t\t\t\t\t\t\t\tlabelFilons.setText(((JSlider)event.getSource()).getValue() + \" filons :\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tpanneauFilons.setBorder(BorderFactory.createTitledBorder(\"Nombre de filons\"));\t\n\t\t\t\t\t\t\tpanneauFilons.add(labelFilons);\n\t\t\t\t\t\t\tpanneauFilons.add(sliderFilons);\t\n\n\t\t\t\t\t\t\t//On cree un bouton \"Jouer\"\n\t\t\t\t\t\t\tJButton boutonJouer = new JButton(\"Jouer\");\n\t\t\t\t\t\t\tboutonJouer.addActionListener(new ActionListener() {\n\t\t\t\t\t\t\t\t//Action liee a l'appui sur le bouton \"jouer\"\n\t\t\t\t\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\t\t\t\tfenetreFilons.dispose();\n\t\t\t\t\t\t\t\t\tpartie.nbFilons = sliderFilons.getValue();\n\t\t\t\t\t\t\t\t\tinitialisation();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t//On cree un bouton \"Annuler\"\n\t\t\t\t\t\t\tJButton annulerFilons = new JButton(\"Annuler\");\n\t\t\t\t\t\t\tannulerFilons.addActionListener(new ActionListener() {\n\t\t\t\t\t\t\t\t//Action liee a l'appui sur le bouton \"jouer\"\n\t\t\t\t\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\t\t\t\tfenetreFilons.dispose();\n\t\t\t\t\t\t\t\t\tpartie.quitter();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t//On cree un panneau recueillant deux bontons\n\t\t\t\t\t\t\tJPanel boutonsFilons = new JPanel();\n\t\t\t\t\t\t\tboutonsFilons.add(boutonJouer);\n\t\t\t\t\t\t\tboutonsFilons.add(annulerFilons);\t\n\n\t\t\t\t\t\t\t//On parametre la fenetre et agence les differents panneaux, puis on l'affiche\n\t\t\t\t\t\t\tfenetreFilons.setSize(320, 140);\n\t\t\t\t\t\t\tfenetreFilons.setTitle(\"Choix du nombre de filons\");\n\t\t\t\t\t\t\tfenetreFilons.setIconImage(new ImageIcon(getClass().getResource(\"/images/icone.gif\")).getImage());\n\t\t\t\t\t\t\tfenetreFilons.setLocationRelativeTo(null);\n\t\t\t\t\t\t\tfenetreFilons.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\t\t\t\t\tfenetreFilons.getContentPane().add(panneauFilons, BorderLayout.CENTER);\n\t\t\t\t\t\t\tfenetreFilons.getContentPane().add(boutonsFilons, BorderLayout.SOUTH);\n\t\t\t\t\t\t\tfenetreFilons.setVisible(true);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\t//On cree un bouton \"Annuler\"\n\t\t\t\t\tJButton annulerDimension = new JButton(\"Annuler\");\n\t\t\t\t\tannulerDimension.addActionListener(new ActionListener() {\n\t\t\t\t\t\t//Un appui sur le bouton \"annuler\" quitte le jeu\n\t\t\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\t\tfenetreDimensions.dispose();\n\t\t\t\t\t\t\tpartie.quitter();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\t//On cree un panneau recueillant deux bontons\n\t\t\t\t\tJPanel boutonsDimensions = new JPanel();\n\t\t\t\t\tboutonsDimensions.add(boutonContinuer);\n\t\t\t\t\tboutonsDimensions.add(annulerDimension);\t\n\n\t\t\t\t\t//On parametre la fenetre et agence les differents panneaux, puis on l'affiche\n\t\t\t\t\tfenetreDimensions.setSize(575, 120);\n\t\t\t\t\tfenetreDimensions.setTitle(\"Choix des dimensions du labyrinthe\");\n\t\t\t\t\tfenetreDimensions.setIconImage(new ImageIcon(getClass().getResource(\"/images/icone.gif\")).getImage());\n\t\t\t\t\tfenetreDimensions.setLocationRelativeTo(null);\n\t\t\t\t\tfenetreDimensions.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\t\t\tfenetreDimensions.getContentPane().add(panneauHauteur, BorderLayout.EAST);\n\t\t\t\t\tfenetreDimensions.getContentPane().add(panneauLargeur, BorderLayout.WEST);\n\t\t\t\t\tfenetreDimensions.getContentPane().add(boutonsDimensions, BorderLayout.SOUTH);\n\t\t\t\t\tfenetreDimensions.setVisible(true);\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Un appui sur le bouton \"annuler\" quitte le jeu\n\t\t\telse {\n\t\t\t\tpartie.quitter();\n\t\t\t}\n\t\t}\n\t\t//Un appui sur le bouton \"annuler\" quitte le jeu\n\t\telse {\n\t\t\tpartie.quitter();\n\t\t}\n\t}", "private void verificarMuerte() {\n if(vidas==0){\n if(estadoJuego==EstadoJuego.JUGANDO){\n estadoJuego=EstadoJuego.PIERDE;\n //Crear escena Pausa\n if(escenaMuerte==null){\n escenaMuerte=new EscenaMuerte(vistaHUD,batch);\n }\n Gdx.input.setInputProcessor(escenaMuerte);\n efectoGameOver.play();\n if(music){\n musicaFondo.pause();\n }\n }\n guardarPuntos();\n }\n }", "public void consulterBoiteVocale() {\n for (int i = 0; i < this.boiteVocale.getListeMessagesVocaux().size(); i++) {\n //on passe l'attribut consulte à true pour savoir qu'il a été vu pour la facturation\n this.boiteVocale.getListeMessagesVocaux().get(i).setConsulte(true);\n }\n }", "protected boolean m9200e() {\n return this.this$0.b._getEtat() != 0;\n }", "public void verarbeite() {\n\t\t\r\n\t}", "@Override\r\n\tpublic boolean seLanceSurServiteurProprietaire() {\n\t\treturn false;\r\n\t}", "@SuppressWarnings(\"unused\")\n\t@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\tif(((this.loginChange.getState() && this.passChange.getState())&&(ancienLogin.getText().compareToIgnoreCase(\"\")==0 ||nouveauLogin.getText().compareToIgnoreCase(\"\")==0 ||ancienPass.getText().compareToIgnoreCase(\"\")==0 ||nouveauPass.getText().compareToIgnoreCase(\"\")==0 ))||( this.loginChange.getState()&& (ancienLogin.getText().compareToIgnoreCase(\"\")==0||this.nouveauLogin.getText().compareToIgnoreCase(\"\")==0) )||(this.passChange.getState() &&(ancienPass.getText().compareToIgnoreCase(\"\")==0 ||nouveauPass.getText().compareToIgnoreCase(\"\")==0 ||this.ancienLogin.getText().compareToIgnoreCase(\"\")==0) ) )\n\t\t\tinfo.setText(\"quelques champs sont vides!!\");\n\t\telse{\n\t\t\tString message=\"\";\n\t\tif(this.loginChange.getState() && this.passChange.getState())\n\t\t\tmessage=Protocole.ChangeId+\":LP:\"+this.ancienLogin.getText()+\":\"+this.nouveauLogin.getText()+\":\"+this.ancienPass.getText()+\":\"+this.nouveauPass.getText();\n\t\telse{\n\t\t\tif(this.loginChange.getState())\n\t\t\t\tmessage=Protocole.ChangeId+\":L:\"+this.ancienLogin.getText()+\":\"+this.nouveauLogin.getText();\n\t\t\telse if(this.passChange.getState()){\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tmessage=Protocole.ChangeId+\":P:\"+this.ancienLogin.getText().trim()+\":\"+this.ancienPass.getText()+\":\"+this.nouveauPass.getText();\n\t\t\t}\n\t\t}\n\t\tinfo.setText(\"envoi en cours...\");\n\t\t//envoi de message\n\t\tSocket messagerie;\n\t\ttry {\n\t\t\tmessagerie = new Socket(Config.IPserveur,Config.portServeur);\n\t\t\tBufferedReader messagerieLecture= new BufferedReader(\n\t\t\t\t\t new InputStreamReader(messagerie .getInputStream()));\n\t\t\t//String mes=CriptageB.CripterChaine(message,0);\n\t\t\tString mes=message;\n\t\t\t new PrintWriter(\n\t\t\t\t\t new BufferedWriter(\n\t\t\t\t\t new OutputStreamWriter(messagerie .getOutputStream())),\n\t\t\t\t\t true).println(mes);\n\t\t\t message=messagerieLecture.readLine();\n\t\t\t//message=DecriptageB.decripter(mes,0);\n\t\t\tmessagerie.close();\n\t\t\tif(message.compareToIgnoreCase(\"SUCCESS_LP\")==0){\n\t\t\t\tJOptionPane.showMessageDialog(null, \"<html><body>votre login et mot de pass ont été bien modifiés:<br>votre nouveau Login:<h1>\"+this.nouveauLogin.getText()+\"</h1><br>nouveau pass:<h1>\"+this.nouveauPass.getText()+\"</h1><br>les notifications seront prises en comptes à la prochaine conexion<br><br>merci!</body></html>\");\n\t\t\tthis.login=this.nouveauLogin.getText().trim();\n\t\t\t\tsetVisible(false);\n\t\t\t}\n\t\t\telse if(message.compareToIgnoreCase(\"SUCCESS_P\")==0) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"<html><body>votre mot de pas a été bien modifié<br>votre nouveau pass:<h1>\"+this.nouveauPass.getText()+\"</h1><br>les notifications seront prises en comptes à la prochaine conexion<br><br>merci!</body></html>\");\n\t\t\t\tsetVisible(false);\n\t\t\t}\n\t\t\telse if(message.compareToIgnoreCase(\"SUCCESS_L\")==0){\n\t\t\t\tJOptionPane.showMessageDialog(null, \"<html><body><h1>votre login a été bien modifié<br>votre nouveau login:<h1>\"+this.nouveauLogin.getText()+\"</h1><br>les notifications seront prises en comptes à la prochaine conexion<br>merci!</body></html>\");\n\t\t\t\tthis.login=this.nouveauLogin.getText().trim();\n\t\t\t\tsetVisible(false);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tinfo.setText(\"<html><body>erreur lors du traitement<br>veuillez bien <br>verifier vos informations <br></body> </html>\");\n\t\t\t\tthis.nouveauLogin.setText(\"\");\n\t\t\t\tthis.ancienLogin.setText(\"\");\n\t\t\t\tthis.nouveauPass.setText(\"\");\n\t\t\t\tthis.ancienPass.setText(\"\");\n\t\t\t}\n\t\t} catch (UnknownHostException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tinfo.setText(\"erreur lors de l'envoi\");\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tinfo.setText(\"erreur lors de l'envoi\");\n\t\t}\n\t\t\n\t\t\n\t\t}\n\t}", "public void changerJoueur() {\r\n\t\t\r\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tgetControleur(). ConsultOuvrage() ;}", "public void sincronizza() {\n boolean abilita;\n\n super.sincronizza();\n\n try { // prova ad eseguire il codice\n\n /* abilitazione bottone Esegui */\n abilita = false;\n if (!Lib.Data.isVuota(this.getDataInizio())) {\n if (!Lib.Data.isVuota(this.getDataFine())) {\n if (Lib.Data.isSequenza(this.getDataInizio(), this.getDataFine())) {\n abilita = true;\n }// fine del blocco if\n }// fine del blocco if\n }// fine del blocco if\n this.getBottoneEsegui().setEnabled(abilita);\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }", "boolean isDisplayMessageOnRedeem();", "protected boolean colaVacia() {\r\n return ini == -1;\r\n }", "public void actionPerformed(ActionEvent e){\n\t\t\t\tString[] AuthorList = textArea.getText().split(\",\");\r\n\t\t\t\tint result = myAuthor.isAuthorsAtLimit(AuthorList, myConference);\r\n\t\t\t\t\r\n\t\t\t\tif (result < 0 ) {\r\n\t\t\t\t\tManuscriptSubmitButton.setEnabled(true);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tManuscriptSubmitButton.setEnabled(false);\r\n\t\t\t\t\tJOptionPane.showMessageDialog(ManuscriptPanelHolder,\"Sorry \" + AuthorList[result] +\r\n\t\t\t\t\t\t\t\" has already submitted Manuscript limit of \" + myAuthor.MAX_MANUSCRIPT_LIMIT + \"!\"); \r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t }", "public void cliquerSauverContinuer() {\r\n\t\t\t\r\n\t\t\t//Identification du bouton et clic\r\n\t\t\tWebElement boutonSaveContinue = wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(\"//table[@id='\"+prefix()+\"y5-box']/tbody/tr[2]/td[2]\")));\r\n\t\t\tboutonSaveContinue.click();\r\n\t\t}", "private void verificaNome() {\r\n\t\thasErroNome(nome.getText());\r\n\t\tisCanSave();\r\n\t}", "boolean hasFeedback();", "public void enviarAlertaDeQueEstaOnline(){\n //mandaria un mail a los usuarios avisando que ya esta disponible para ver.\n System.out.println(\"Enviando mail con url \" + this.url);\n }", "public boolean update(Panier nouveau) {\n\t\treturn false;\r\n\t}", "private void majAffichage(int choix) {\n supprAffichage();\n ajoutAffichage(choix);\n if (tdConnect != null) {\n activationON();\n }\n }", "private void modificarViaje(Viaje vje2, Boolean estabaCargado2,\r\n\t\t\tBoolean estabaPago2, Boolean estabaDescargado2,\r\n\t\t\tBoolean estabaCobrado2, Boolean estabaPagoFlete2,\r\n\t\t\tBoolean estabaPagoDescargador2) {\r\n\t\tgreetingService.ModificarViaje(vje2, estabaCargado2, estabaPago2,\r\n\t\t\t\testabaDescargado2, estabaCobrado2, estabaPagoFlete2,\r\n\t\t\t\testabaPagoDescargador2, new AsyncCallback<String>() {\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void onFailure(Throwable caught) {\r\n\t\t\t\t\t\terrorLabel.setText(\"Error al modificar el viaje.\");\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void onSuccess(String result) {\r\n\t\t\t\t\t\tif (chkDescargarPago.getValue()\r\n\t\t\t\t\t\t\t\t|| chkDescargar.getValue()) {\r\n\t\t\t\t\t\t\tDouble tonOrigen = Double.parseDouble(tbToneladas\r\n\t\t\t\t\t\t\t\t\t.getText());\r\n\t\t\t\t\t\t\tDouble tonRealDescargadas = Double\r\n\t\t\t\t\t\t\t\t\t.parseDouble(tbDescargaRealToneladas\r\n\t\t\t\t\t\t\t\t\t\t\t.getText());\r\n\t\t\t\t\t\t\tif (tonOrigen > tonRealDescargadas) {\r\n\t\t\t\t\t\t\t\tvje.setKilos(String.valueOf(tonOrigen\r\n\t\t\t\t\t\t\t\t\t\t- tonRealDescargadas));\r\n\t\t\t\t\t\t\t\t//TODO Al cerrar el viaje sobrante \r\n\t\t\t\t\t\t\t\t//se debe cerrar la ventana.\r\n\t\t\t\t\t\t\t\tCrearViaje viajeSobrante = new CrearViaje(vje,\r\n\t\t\t\t\t\t\t\t\t\tlv);\r\n\t\t\t\t\t\t\t\tdialogBox = createDialogBox(\"Crear viaje.\",\r\n\t\t\t\t\t\t\t\t\t\tviajeSobrante);\r\n\t\t\t\t\t\t\t\tdialogBox.center();\r\n\t\t\t\t\t\t\t\tdialogBox.show();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tlv.cerrarDialogBox();\r\n\t\t\t\t\t\t// Window.alert(\"Se modifico el viaje correctamente.\");\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t}", "@Override\n public void onClick(View v) {\n if (!vKenalan()){\n dialog.show();\n berbicara.play(\"it seems like we haven't met yet, don't know it then don't love, let's know you first\");\n return;\n }\n // untuk toogle\n if (diam){\n bolehMendengarkan();\n diam = false;\n }else {\n tidakBolehMendengarkan();\n diam = true;\n }\n }", "private boolean Verific() {\n\r\n\treturn true;\r\n\t}", "public int VerifierPlagesHorairesUneLiv(Livraison liv) {\r\n\t\t// juste checker si l'horaire d'arrivee fait partie de la ph\r\n\t\t// valeur 0 : pas d'attente et pas tendu --> bleu\r\n\t\t// valeur 1 : pas d'attente et tendu --> orange\r\n\t\t// valeur 2 : attente --> PURPLE\r\n\t\t// valeur 3 : plage horaire violee --> rouge\r\n\r\n\t\tint valeurPH = 0;\r\n\r\n\t\tfor (Livraison l : getListeLivraison()) {\r\n\t\t\tif (l.toString().equals(liv.toString())) {\r\n\t\t\t\tliv = l;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tDate[] tempsPassage = getTempsPassage()[getListeLivraison().indexOf(liv)];\r\n\r\n\t\tboolean attente = true;\r\n\t\tDate horaireArr = tempsPassage[0];\r\n\r\n\t\tif (liv.getDebutPlageHoraire() != null && liv.getFinPlageHoraire() != null) {\r\n\t\t\tDate debutPH = liv.getDebutPlageHoraire();\r\n\t\t\tDate finPH = liv.getFinPlageHoraire();\r\n\t\t\tDate tempsRestantAvantFinPHdate = new Date(finPH.getTime() - horaireArr.getTime());\r\n\t\t\tlong tempsRestantAvantFinPH = tempsRestantAvantFinPHdate.getTime();\r\n\r\n\t\t\t// arrive apres DPH et avant FPH donc n'attend pas\r\n\t\t\tif (horaireArr.getTime() >= debutPH.getTime() && horaireArr.getTime() < finPH.getTime()) {\r\n\t\t\t\tattente = false;\r\n\t\t\t}\r\n\r\n\t\t\tif (attente == false && tempsRestantAvantFinPH > 30 * 60000 + liv.getDuree() * 1000) { // pas\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// d'attente\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// et\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// pas\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// tendu\r\n\t\t\t\tvaleurPH = 0;\r\n\t\t\t}\r\n\r\n\t\t\tif (attente == false && tempsRestantAvantFinPH <= 30 * 60000 + liv.getDuree() * 1000) { // pas\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// d'attente\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// et\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// tendu\r\n\t\t\t\tvaleurPH = 1;\r\n\t\t\t}\r\n\r\n\t\t\tif (attente == true && tempsRestantAvantFinPH >= liv.getDuree() * 1000) { // attente\r\n\t\t\t\tvaleurPH = 2;\r\n\t\t\t}\r\n\r\n\t\t\tif (tempsRestantAvantFinPH < liv.getDuree() * 1000) {// plage violee\r\n\t\t\t\tvaleurPH = 3;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tvaleurPH = 0;\r\n\t\t}\r\n\r\n\t\treturn valeurPH;\r\n\r\n\t}", "public void uruchomGre()\n\t{\n\t\tustawPojazdNaPoczatek();\n\t\tplanszaWidokHND.repaint();\n\t\twToku = true;\n\t\tzegar.start();\n\t\tpauza = false;\n\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tnew AlertDialog.Builder(arg0.getContext()).setTitle(\"Confirme si desea registrarse.\")\n\t\t\t\t.setPositiveButton(\"Si\",new DialogInterface.OnClickListener() {\n\t\t\t\t\tpublic void onClick(DialogInterface dialog,int whichButton) {\n\t\t\t\t\t\tString mensaje=\"\";\n\t\t\t\t\t\tif(nombre.getText().length()!=0 && direccion.getText().length()!=0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmensaje= nombre.getText().toString() + \" \" + \"dir: \" + direccion.getText().toString() + \" \";\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(chligesp.isChecked()==true || chligespnews.isChecked()==true || chligbund.isChecked()==true || chligbundnews.isChecked()==true || chligcalcio.isChecked()==true || chligcalcionews.isChecked()==true || chligprem.isChecked()==true || chligpremnews.isChecked()==true)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(chligesp.isChecked()==true)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tmensaje+= \" \" + \"liga \" + \"esp\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(chligespnews.isChecked()==true)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tmensaje+=\" \" + \"news \" + \"esp\" ;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(chligbund.isChecked()==true)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tmensaje+= \" \" + \"liga \" + \"bund\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(chligbundnews.isChecked()==true)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tmensaje+= \" \" + \"news \" + \"bund\" ;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(chligcalcio.isChecked()==true)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tmensaje+= \" \" + \"liga \" + \"calcio\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(chligcalcionews.isChecked()==true)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tmensaje+= \" \" + \"news \" + \"calcio\" ;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(chligprem.isChecked()==true)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tmensaje+= \" \" + \"liga \" + \"ing\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(chligpremnews.isChecked()==true)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tmensaje+=\" \" + \"news \" + \"ing\" ;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(news.isChecked()==true)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tmensaje+= \" news internac \" ;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tsendSMS(\"+5354487317\",mensaje);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tif(chligesp.isChecked()==false && chligespnews.isChecked()==false && chligbund.isChecked()==false && chligbundnews.isChecked()==false && chligcalcio.isChecked()==false && chligcalcionews.isChecked()==false && chligprem.isChecked()==false && chligpremnews.isChecked()==false && news.isChecked()==false)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tToast.makeText(getApplicationContext(), \"Para registrase seleccione antes los servicios que desea activar.\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else\n\t\t\t\t\t\t\tif(nombre.getText().length()==0 || direccion.getText().length()==0 )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tToast.makeText(getApplicationContext(), \"No pudo enviarse.. Verifique sus datos personales.\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}).setNegativeButton(\"No\", null).show();\n\t\t\t}", "private boolean estValide() {\n if (textFieldNom.getText() == null || textFieldNom.getText().isEmpty() || comboBoxVisibilite.getSelectionModel().getSelectedItem() == null\n || comboBoxType.getSelectionModel().getSelectedItem() == null) {\n erreurLabel.setText(\"Tous les champs doivent etre remplis\");\n return false;\n }\n erreurLabel.setText(\"\");\n return true;\n }", "public Message action(Joueur joueurCourant) {\r\n\t\t\r\n\t\treturn new Message(Message.Types.effetClassique);\r\n\t}", "public boolean tienePrepaga() {\r\n\t\treturn obraSocial != null;\r\n\t}", "public boolean estDetecteCoteGauche()\r\n\t{\n\t\treturn !this.detecteurGauche.get();\r\n\t}", "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}", "private void jButtonMessageActionPerformed(ActionEvent e)\n {\n \tif(bSupMessage)\n \t bSupMessage=false;\n \telse\n \t bSupMessage=true;\n \t\n \t\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n setOnVacationOk(atc, guiD, sm);\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tif(name_field.getText().equals(\"\")) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"사용자 이름을 설정해 주세요.\", \"warning\",JOptionPane.WARNING_MESSAGE);\n\t\t\t\t}else {\n\t\t\t\t\tid = name_field.getText();\n\t\t\t\t\t\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"설정되었습니다.\", \"success\",JOptionPane.INFORMATION_MESSAGE);\n\t\t\t\t\tsetting.setEnabled(false);\n\t\t\t\t\tname_field.setEnabled(false);\n\t\t\t\t\twt.sendMsg();\n\t\t\t\t\t// who_area.append(id + \"\\n\");\n\t\t\t\t}\t\n\t\t\t}", "private void affPremierJoueur(String nomPJoueur) {\r\n\t\tAlert alert = new Alert(AlertType.INFORMATION);\r\n\t\talert.setTitle(\"Premier joueur\");\r\n\t\talert.setHeaderText(null);\r\n\t\talert.setContentText(nomPJoueur + \" est le premier joueur a jouer\");\r\n\t\talert.showAndWait();\r\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n JOptionPane.showConfirmDialog(OverCounterForm.this, \"Check this\");\n }", "public boolean erreurStandard1() {\r\n\t\t\t\r\n\t\t\t//Initialisation du booléen, identification des champs à vérifer \r\n\t\t\tboolean verif = false;\r\n\t\t\tWebElement messageErreur = wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(\"//div[.='Out of range (>= 0).']\")));\r\n\t\t\t\r\n\t\t\t//Vérification\r\n\t\t\tif (messageErreur.isDisplayed()) {\r\n\t\t\t\tverif = true;\r\n\t\t\t}\r\n\t\t\treturn verif;\r\n\t\t}", "public void clickSurCarte(CarteModel carteJouer) throws IOException{\n\t\tif (ajm.estJoueurCourant() && !platMod.retourneFinDeManche())\n\t\t{\n\t\t\t//Si le joueur doit piocher une carte chez le joueur précédent\n\t\t\tif (platMod.retournePiocheChezJoueur())\n\t \t{\n\t\t\t\tSystem.out.println(\"Vous piochez chez un joueur\");\n\t\t\t\tnew DialogVuePiocheChezJoueur(jv, platMod); \n\t\t\t\tjv.validate();\n\t\t\t//sinon, c'est qu'il peut jouer une carte de son choix, a condition qu'elle soit valide et qu'il n'est pas à piocher\n\t \t}else if (platMod.peutJouerCarte(carteJouer)){\n\t \t//Si le joueur joue une carte alors qu'il aurait du prévenir \"Carte !\", il pioche deux cartes\n\t \t\tif(((JoueurHumain)ajm).retourneDerCarte())\n\t \t\t{\n\t \t\t\tSystem.out.println(\"Vous piochez deux cartes car vous n'avez pas cliquer sur Carte ! avant de jouer votre avans dernière carte\");\n\t \t\t\tajm.piocherCarteMultiple(platMod.retourneModelPioche(), 2);\n\t \t\t\tplatMod.roulementJoueurCourant();\n\t \t\t//Sinon, sa carte est prit en compte et est joué\n\t \t\t}else{\n\t \t\t\tSystem.out.println(\"Vous jouez la carte : \"+carteJouer.toString());\n\t\t\t\t\tArrayList<CarteModel> listCarteJouable = new ArrayList<CarteModel>(); //La liste ne contient que la carte cliqué valide\n\t\t\t\t\tlistCarteJouable.add(carteJouer);\n\t\t\t\t\tajm.jouer(platMod, listCarteJouable);\n\t\t\t\t\t\n\t\t\t\t\t//Pour le huit et le 15, le passage au joueur suivant se fera après un clic sur l'IHM\n\t\t\t\t\tif (carteJouer.retourneTaille() == 8 || carteJouer.retourneTaille() == 15) \n\t\t\t\t\t\tnew DialogVueChoixCouleur(jv, platMod);\n\t\t\t\t\telse \n\t\t\t\t\t\tplatMod.roulementJoueurCourant();\n\t \t\t}\n\t \t}\n\t\t}\n\t}", "@Override\n\tpublic boolean approveIt() {\n\t\treturn false;\n\t}", "public int enAttente() {\n\t\treturn nbmsg;\n\t}", "private void ajoutAffichage(int choix) {\n switch(choix) {\n case AFFICHE_SPOOL :\n ecranSpool.createContents();\n afficheChoix = AFFICHE_SPOOL;\n mntmSpoolUsage.setEnabled(false);\n mntmUser.setEnabled(true);\n mntmConfig.setEnabled(true);\n shell.layout();\n break;\n case AFFICHE_USER :\n ecranUser.createContents();\n afficheChoix = AFFICHE_USER;\n mntmSpoolUsage.setEnabled(true);\n mntmUser.setEnabled(false);\n mntmConfig.setEnabled(true);\n shell.layout();\n break;\n case AFFICHE_CONFIG :\n ecranConfig.createContents();\n afficheChoix = AFFICHE_CONFIG;\n mntmSpoolUsage.setEnabled(true);\n mntmUser.setEnabled(true);\n mntmConfig.setEnabled(false);\n shell.layout();\n break;\n default: break;\n }\n }", "public void changeIfJail()\r\n\t{\r\n\t\tisJailed = !isJailed;\r\n\t}", "@Override\n\tpublic boolean paie() {\n\t\treturn false;\n\t}", "public boolean estValide() {\n\t\treturn ( estDedans() && estImpaire() ); \n }", "@Override\n\tpublic void statusVomMenschen() {\n\t\tSystem.out.println(\"Sie wurden getroffen nun können Sie nicht mehr so schnell laufen!\");\n\t}", "@Override\n\tpublic boolean vender(String placa) {\n\t\treturn false;\n\t}", "private void updateUI() {\n\t\t\tfinal TextView MessageVitesse = (TextView) findViewById(R.id.TextView01);\r\n\t\t\tfinal ProgressBar Progress = (ProgressBar) findViewById (R.id.ProgressBar01);\r\n\t\t\tfinal TextView MessageStatus = (TextView)findViewById (R.id.TextView02);\r\n\t\t\t\t\t\r\n\t\t\t//on affecte des valeurs aux composant\r\n\t\t\tMessageVitesse.setText(\"Vitesse Actuelle : \"+ Vitesse + \" Ko/s\");\r\n\t\t\tProgress.setProgress(Pourcent);\r\n\t\t\tMessageStatus.setText (Status);\r\n\t\t\tif (Status.equals(\"Télèchargement terminé!!!\")&&NotifDejaLancée==false){\r\n\t\t\t\tlanceNotification();\r\n\t\t\t\tNotifDejaLancée=true;\r\n\t\t\t}\r\n\t\t\t}", "void entrerAuGarage();", "@Override\n\tpublic void doit() {\n\t\tafficher_texte(UtilitaireChainesCommunes.demande_saisie_nombre);\n\t\tint i = saisie_entier();\n\t\tafficher_texte(UtilitaireChainesCommunes.demande_saisie_nombre);\n\t\tint j = saisie_entier();\n\t\t// tous deux strictements positifs ou strictement négatifs? \n\t\t// vrai => produit positif\n\t\t// faux => produit negatif ou nul\n\t\tboolean Truth = TrueIfSameTruthValue(i,j,this.estposit);\n if (Truth){afficher_texte(UtilitaireChainesCommunes.resultat_positif);}\n else{ \n \t// l un des deux est soit de signe différent soit nul.\n \t// on vire le cas \"est de signe différent\" (on aurait pu faire l autre)\n \tboolean Truth2 = ((i < 0 && j > 0) || (i > 0 && j < 0));\n \tif (Truth2){afficher_texte(UtilitaireChainesCommunes.resultat_negatif);}\n \telse {afficher_texte(UtilitaireChainesCommunes.nombre_nul);}\n }\n\n\t}", "private boolean setPermessiRicevuti(HttpServletRequest request, HttpServletResponse response,\r\n String utente) {\r\n Gruppo g = new Gruppo();\r\n\r\n g.setRuolo(utente);\r\n if (request.getParameter((\"checkbox\").concat(utente)).equals(\"true\")) {\r\n if (!ricevuti.getGruppi().contains(g)) {\r\n ricevuti.getGruppi().add(g);\r\n }\r\n } else if (request.getParameter((\"checkbox\").concat(utente)).equals(\"false\")) {\r\n ricevuti.getGruppi().remove(g);\r\n } else {\r\n return false;\r\n }\r\n return true;\r\n }", "public void acheter(){\n\t\t\n\t\t// Achete un billet si il reste des place\n\t\ttry {\n\t\t\tthis.maBilleterie.vendre();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tthis.status.put('B', System.currentTimeMillis());\n\t\tSystem.out.println(\"STATE B - Le festivalier \" + this.numFestivalier + \" a acheté sa place\");\n\t}", "public boolean erreurStandard2() {\r\n\t\t\t\r\n\t\t\t//Initialisation du booléen, identification des champs à vérifer \r\n\t\t\tboolean verif = false;\r\n\t\t\tWebElement messageErreur = wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(\"//div[.='Out of range (0 ~ 59).']\")));\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//Vérification\r\n\t\t\tif (messageErreur.isDisplayed()) {\r\n\t\t\t\tverif = true;\r\n\t\t\t}\r\n\t\t\treturn verif;\r\n\t\t}", "public void reestablecerInfo(){\n panelIngresoControlador.getPanelIngreso().reestablecerInfo();\n }", "private void verificaIdade() {\r\n\t\thasErroIdade(idade.getText());\r\n\t\tisCanSave();\r\n\t}", "private void chkKeyPressed(KeyEvent e) {\n\t\tif (UtilityPtoVenta.verificaVK_F1(e)) // Reservado para ayuda\n\t\t{\n\t\t} else if (UtilityPtoVenta.verificaVK_F11(e)) {\n \n boolean valor=true;\n if (datosValidados()){\n //JCORTEZ 14.03.09 solo para tipo ticket no se podra modificar la cola de impresion con una que ya exista\n if (VariablesImpresoras.vTipoComp.trim().equalsIgnoreCase(ConstantsPtoVenta.TIP_COMP_TICKET)){\n if(!validaRuta()){\n FarmaUtility.showMessage(this,\"No se puede asignar una ruta de impresion que ya existe.\",txtColaImpresion);\n valor=false;\n }\n }\n if(valor)\n if (JConfirmDialog.rptaConfirmDialog(this,\"¿Está seguro que desea grabar los datos ?\")) {\n try {\n if (existenDatos) {\n actualizarImpresora();\n } else {\n insertarImpresora();\n actualizaNumeracionImpresoras();\n }\n\n FarmaUtility.aceptarTransaccion();\n FarmaUtility.showMessage(this,\"La operación se realizó correctamente\",txtDescImpresora);\n\n } catch (SQLException ex) {\n FarmaUtility.liberarTransaccion();\n FarmaUtility.showMessage(this,\"Error al grabar datos de la impresora: \\n\"+ ex.getMessage(), txtDescImpresora);\n log.error(\"\",ex);\n\n }\n cerrarVentana(true);\n }\n }\n\n\t\t} else if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {\n\t\t\tcerrarVentana(false);\n\t\t}\n\n\t}", "private void isAbleToBuild() throws RemoteException {\n int gebouwdeGebouwen = speler.getGebouwdeGebouwen();\n int bouwLimiet = speler.getKarakter().getBouwLimiet();\n if (gebouwdeGebouwen >= bouwLimiet) {\n bouwbutton.setDisable(true); // Disable button\n }\n }", "public boolean pregunta(){\n int d = JOptionPane.showConfirmDialog(null, \"¿Desea escribir otra palabra?\", \"¿Escribir?\", JOptionPane.YES_NO_OPTION);\n if (d == 0) {\n return true;\n }else if (d == 1) {\n return false;\n }\n return false;\n }", "private boolean setPermessiPrivacy(HttpServletRequest request, HttpServletResponse response,\r\n String utente) {\r\n Gruppo g = new Gruppo();\r\n\r\n g.setRuolo(utente);\r\n if (request.getParameter((\"radio\").concat(utente)) != null\r\n && request.getParameter((\"radio\").concat(utente)).equals(\"conFirma\".concat(utente))) {\r\n if (!conFirma.getGruppi().contains(g)) {\r\n conFirma.getGruppi().add(g);\r\n noFeedback.getGruppi().remove(g);\r\n anonimi.getGruppi().remove(g);\r\n }\r\n } else if (request.getParameter((\"radio\").concat(utente)) != null\r\n && request.getParameter((\"radio\").concat(utente)).equals(\"anonimi\".concat(utente))) {\r\n if (!anonimi.getGruppi().contains(g)) {\r\n anonimi.getGruppi().add(g);\r\n noFeedback.getGruppi().remove(g);\r\n conFirma.getGruppi().remove(g);\r\n }\r\n } else if (request.getParameter((\"radio\").concat(utente)) != null\r\n && request.getParameter((\"radio\").concat(utente)).equals(\"noFeedback\".concat(utente))) {\r\n if (!noFeedback.getGruppi().contains(g)) {\r\n noFeedback.getGruppi().add(g);\r\n anonimi.getGruppi().remove(g);\r\n conFirma.getGruppi().remove(g);\r\n }\r\n } else {\r\n return false;\r\n }\r\n return true;\r\n }", "public void quitter() throws HeadlessException {\n //Permet l'arret du programme\n int reponse = JOptionPane.showConfirmDialog(null, \"Voulez-vous vraiment quitter?\",\n \"Quitter\", JOptionPane.YES_NO_OPTION);\n if (reponse == JOptionPane.YES_OPTION) {\n System.exit(0);\n }\n }", "public void verificaJogo(){\n\t\t\t\tif(jogo.verificaPerdeu()) {\n\t \t\tJOptionPane dialogo = new JOptionPane();\n\t \t\t\n\t \t\tint opcao = dialogo.showConfirmDialog(this, \"Voce Perdeu!!\\nDeseja jogar novamente?\", \"mensagem\", JOptionPane.YES_NO_OPTION);\n\t \t\t\n\t \t\tif(opcao == JOptionPane.YES_OPTION) {\n\t \t\t\tMatriz novamente = new Matriz();\n\t \t\t}\n\t \t\tsetVisible(false);\n\t \t\tdispose();\n\t \t}\n\t\t\t\t\n\t\t\t\tif(jogo.verificaGanhou()) {\n\t\t\t\t\tJOptionPane dialogo = new JOptionPane();\n\t \t\t\n\t \t\tint opcao = dialogo.showConfirmDialog(this, \"Voce GANHOOOOO!!\\nDeseja jogar novamente?\", \"mensagem\", JOptionPane.YES_NO_OPTION);\n\t \t\t\n\t \t\tif(opcao == JOptionPane.YES_OPTION) {\n\t \t\t\tMatriz novamente = new Matriz();\n\t \t\t}\n\t \t\tsetVisible(false);\n\t \t\tdispose();\n\t \t}\n\t\t\t\t\n\t\t\t}", "public void notifyChangementJoueurs();", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tif(messageCheck.isChecked())\n\t\t\t\tprefs.edit().putString(\"MessageText\",message.getText()+\" \").commit();\n\t\t\t\t\t\n\n\t\t\t}", "public boolean jeu() {\n int k;\n\n String compJoueur = \"\";\n String compOrdi = \"\";\n String reponse;\n\n boolean victoireJoueur = false;\n boolean victoireOrdi = false;\n String mystJoueur = challenger.nbMystere(); /**nb que le joueur doit trouver*/\n String mystOrdi = defenseur.nbMystere(); /**nb que l'ordinateur doit trouver*/\n String propOrdi = defenseur.proposition(); /**ordinateur genere un code aleatoire en premiere proposition*/\n log.info(\"Proposition ordinateur : \" + propOrdi); /**afficher proposition ordinateur*/\n String propJoueur = \"\";\n String goodResult = MethodesRepetitives.bonResultat();\n\n\n for (k = 1; !victoireJoueur && !victoireOrdi && k <= nbEssais; k++) { /**si ni le joueur ou l'ordinateur n'ont gagne et si le nombre d'essais n'est pas atteind, relancer*/\n\n compOrdi = MethodesRepetitives.compare(mystOrdi, propOrdi); /**lancer la methode de comparaison du niveau defenseur*/\n log.info(\"Reponse Ordinateur :\" + compOrdi); /**afficher la comparaison*/\n propJoueur = challenger.proposition(); /**demander une saisie au joueur selon le mode challenger*/\n compJoueur = MethodesRepetitives.compare(mystJoueur, propJoueur); /**comparer selon le mode challenger*/\n log.info(\"Reponse Joueur :\" + compJoueur); /**afficher la comparaison*/\n\n if (compOrdi.equals(goodResult)) { /**si l'ordinateur a gagne, changement de la valeur victoireOrdi*/\n victoireOrdi = true;\n }else if(compJoueur.equals(goodResult)) {/**si le joueur a gagne changement de la valeur victoireJoeur*/\n victoireJoueur = true;\n } else if (k < nbEssais) { /**sinon redemander un code a l'ordinateur selon les symboles de comparaison*/\n propOrdi = defenseur.ajuste(propOrdi, compOrdi);\n log.info(\"Proposition Ordinateur :\" + propOrdi);\n }\n }\n\n if (victoireOrdi || !victoireJoueur)/**si l'ordinateur ou le joueur perdent alors perdu sinon gagne*/\n victoireJoueur = false;\n else\n victoireJoueur = true;\n\n return victoireJoueur;\n\n\n }", "public abstract boolean esComestible();", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Instrucciones: \" + \"\\n1. Has de darle al boton iniciar juego \"\n\t\t\t\t\t\t+ \"\\n2. Aparecen los espacios de las letras de una palabra oculta \"\n\t\t\t\t\t\t+ \"\\n3. Has de adivinar la palabra pulsando en el teclado de palabras que hay abajo \"\n\t\t\t\t\t\t+ \"\\n4. Si te equivocas, el ahorcado se ira completando \"\n\t\t\t\t\t\t+ \"\\n5. Tienes 10 intentos antes de que se complete el ahorcado \"\n\t\t\t\t\t\t+ \"\\n6. Puedes usar las pistas las cuales te descubriran una letra, tienes una pista por partida\"\n\t\t\t\t\t\t+ \"\\n7. al principio del juego puedes elegir hasta 5 vidas, cada vez que solicitas una pista perderas una vida \"\n\t\t\t\t\t\t+ \"\\n8. cada vez que pierdes la partida, perderas una vida \");\n\n\t\t\t}", "private void onCheckBoxTeilungLinks()\n\t{\n\t\tif (istBeimTaktLaden)\n\t\t\treturn;\n\n\t\tistBeimTaktLaden = true;\n\t\t\n\t\thandleTeilung(getJCheckBoxTeilungLinks().isSelected(),\n\t\t\t\t\t\tgetJCheckBoxTeilungMitte().isSelected(),\n\t\t\t\t\t\tgetJCheckBoxTeilungRechts().isSelected());\n\t\t\t\t\n\t\tistBeimTaktLaden = false;\n\t}", "private void verarbeiteInWarenkorbKlick() {\n\n\t\tString titel = text2.getText();\n\t\tString anzahlString = text1.getText();\n\t\tint menge = Integer.parseInt(anzahlString);\n\n\t\tList<Artikel> liste1 = shop.sucheArtikelBezeichnung(titel);\n\n\t\ttry {\n\t\t\ttry {\n\t\t\t\tshop.warenHinzufügen(liste1.get(0), kunde, menge);\n\t\t\t} catch (ArtikelBestandReichtNichtAusException e) {\n\t\t\t\t// TODO Automatisch generierter Erfassungsblock\n\t\t\t\tJOptionPane.showMessageDialog(null, e.getMessage());\n\t\t\t}\n\t\t} catch (MassengutartikelException e1) {\n\n\t\t\tJOptionPane.showMessageDialog(null, e1.getMessage());\n\t\t}\n\t\ttry {\n\t\t\tshop.schreibeArtikel();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Automatisch generierter Erfassungsblock\n\t\t\te.printStackTrace();\n\t\t}\n\t}" ]
[ "0.7012396", "0.6340044", "0.6321851", "0.6042882", "0.6028247", "0.5999178", "0.5997437", "0.59874105", "0.5947565", "0.5932834", "0.59113204", "0.58909166", "0.5883105", "0.5875394", "0.58249074", "0.5819872", "0.5811785", "0.57947123", "0.57932276", "0.5784832", "0.57844657", "0.577711", "0.5764084", "0.5735432", "0.572724", "0.57143736", "0.5708822", "0.5697387", "0.5688417", "0.5688276", "0.56717145", "0.5669762", "0.5655928", "0.56432796", "0.5638076", "0.56376684", "0.5633635", "0.56327295", "0.5626693", "0.5626006", "0.5617377", "0.5616659", "0.56114", "0.56098217", "0.56019574", "0.5599952", "0.5595827", "0.5592518", "0.55895424", "0.55889374", "0.55872107", "0.5585551", "0.55838454", "0.5583348", "0.5579954", "0.55796933", "0.5573628", "0.55723256", "0.5569357", "0.55675304", "0.55658364", "0.55642015", "0.5559892", "0.55584383", "0.5554338", "0.5540575", "0.55367666", "0.5529482", "0.55282813", "0.55274796", "0.5521952", "0.5516687", "0.5502358", "0.5501998", "0.5495464", "0.5489604", "0.5489458", "0.5488467", "0.5486647", "0.5483343", "0.54833317", "0.54789263", "0.5476935", "0.5472289", "0.547028", "0.5468266", "0.5466175", "0.5464312", "0.54628915", "0.5457991", "0.5455716", "0.5450599", "0.5449275", "0.54472125", "0.54460394", "0.5442588", "0.54383886", "0.54261875", "0.54249287", "0.5419096" ]
0.5570953
58
On test les accesseurs et mutateurs herite de la classe machine
@Test public void testGetNom() { assertEquals(client.getNom(), "toto"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public MachineTest() {\n ArrayList<Rotor> rotors;\n rotors = new ArrayList<>();\n rotors.add(new MovingRotor(\"I\",\n new Permutation(NAVALA.get(\"I\"), UPPER), \"Q\"));\n rotors.add(new MovingRotor(\"II\",\n new Permutation(NAVALA.get(\"II\"), UPPER), \"E\"));\n rotors.add(new MovingRotor(\"III\",\n new Permutation(NAVALA.get(\"III\"), UPPER), \"V\"));\n rotors.add(new MovingRotor(\"IV\",\n new Permutation(NAVALA.get(\"IV\"), UPPER), \"J\"));\n rotors.add(new MovingRotor(\"V\",\n new Permutation(NAVALA.get(\"V\"), UPPER), \"Z\"));\n rotors.add(new MovingRotor(\"VI\",\n new Permutation(NAVALA.get(\"VI\"), UPPER), \"ZM\"));\n rotors.add(new MovingRotor(\"VII\",\n new Permutation(NAVALA.get(\"VII\"), UPPER), \"ZM\"));\n rotors.add(new MovingRotor(\"VIII\",\n new Permutation(NAVALA.get(\"VIII\"), UPPER), \"ZM\"));\n rotors.add(new FixedRotor(\"Beta\",\n new Permutation(NAVALA.get(\"Beta\"), UPPER)));\n rotors.add(new FixedRotor(\"Gamma\",\n new Permutation(NAVALA.get(\"Gamma\"), UPPER)));\n rotors.add(new Reflector(\"B\",\n new Permutation(NAVALA.get(\"B\"), UPPER)));\n rotors.add(new Reflector(\"C\",\n new Permutation(NAVALA.get(\"C\"), UPPER)));\n\n machine = new Machine(UPPER, 5, 3, rotors);\n\n }", "@Test\n void makeCoffee() {\n Assertions.assertFalse(machine.makeCoffee());\n\n //try with cup\n Assertions.assertDoesNotThrow(() -> {\n machine.positionCup();\n });\n\n Assertions.assertThrows(Exception.class, () -> {\n machine.positionCup();\n });\n\n\n Assertions.assertTrue(machine.makeCoffee());\n\n //check if correct amount as been subtracted\n Assertions.assertEquals(machine.getCurrentWater(), 1000 - machine.waterPerCup);\n Assertions.assertEquals(machine.getCurrentBeans(), 800 - machine.beansPerCup);\n\n //reset\n machine.fillWater();\n machine.fillBeans();\n machine.setCupPositioned(true);\n\n //test over boundary\n Assertions.assertTrue(machine.makeCoffee());\n Assertions.assertTrue(machine.makeCoffee());\n\n //set only water to boundary values and below\n machine.setCurrentWater(0);\n Assertions.assertFalse(machine.makeCoffee());\n machine.setCurrentWater(machine.waterPerCup);\n Assertions.assertTrue(machine.makeCoffee());\n\n //reset water\n machine.fillWater();\n\n //set only beans to boundary value and below\n machine.setCurrentBeans(0);\n Assertions.assertFalse(machine.makeCoffee());\n machine.setCurrentBeans(machine.beansPerCup);\n Assertions.assertTrue(machine.makeCoffee());\n\n\n }", "@Test\n //checks for state switching (on/off)\n void SwitchStates() {\n Assertions.assertFalse(machine.isTurnedOn());\n\n //then, switch on and check if on\n machine.setTurnedOn(true);\n Assertions.assertTrue(machine.isTurnedOn());\n\n //switch off to see if turned off correctly\n machine.setTurnedOn(false);\n Assertions.assertFalse(machine.isTurnedOn());\n\n //and now check the inversion\n machine.flipSwitch();\n\n Assertions.assertTrue(machine.isTurnedOn());\n }", "private static void farmMachines()\n {\n List<Automat> johnDeere = new ArrayList<Automat>();\n johnDeere.add(new SaeMaschine());\n johnDeere.add(new GiessMaschine());\n johnDeere.add(new ErnteMaschine());\n\n // Jemand muss nun endlich arbeiten\n System.out.println(\"Ja, jetzt wird wieder in die Hände gespuckt\\n\" +\n \"Wir steigern das Bruttosozialprodukt\\n\" +\n \"Ja, ja, ja, jetzt wird wieder in die Hände gespuckt\\n\");\n\n new Thread(() -> {\n for( Automat automat : johnDeere )\n {\n automat.arbeiten(maisFeld);\n if( automat instanceof SaeMaschine )\n {\n new SaeMaschine().arbeiten(maisFeld, \"Mais\");\n System.out.println(\"Maiskölbchen nach Arbeit: \" + maisFeld.size());\n }\n }\n }).start();\n\n new Thread(() -> {\n for( Automat automat : johnDeere )\n {\n automat.arbeiten(weizenFeld);\n if( automat instanceof SaeMaschine )\n {\n new SaeMaschine().arbeiten(weizenFeld, \"Weizen\");\n System.out.println(\"Weizenhalme nach Arbeit: \" + weizenFeld.size());\n }\n }\n }).start();\n }", "public Demo()\n {\n machine = new Machine();\n }", "@Test\n void operations() {\n HotelOperation.scanner = new Scanner(\"1 2 3 4 5 -1\");\n Receptionist res = new Receptionist();\n assertEquals(1,res.Operations());\n assertEquals(2,res.Operations());\n assertEquals(3,res.Operations());\n assertEquals(4,res.Operations());\n assertEquals(5,res.Operations());\n\n }", "public Vending_MachineTest()\n {\n // initialise instance variables\n \n \n }", "@Test\n\tpublic void functionKoreDatastructureTest() {\n\t\ttry {\n\t\t\tString DataStructureAgent1Name = \"DataStructureAgent1\"; \n\t\t\t//String weatherAgent2Name = \"WeatherAgent2\"; \n\t\t\tString datageneratorservice = \"DataStructureGenerator\";\n\n\t\t\tAgentConfig cf = AgentConfig.newConfig(DataStructureAgent1Name)\n\t\t\t\t\t.addFunction(FunctionConfig.newConfig(datageneratorservice, KoreDataStructureGeneratorMock.class))\n\t\t\t\t\t.addFunction(FunctionConfig.newConfig(\"LamprosUI\", UserInterfaceCollector.class)\n\t\t\t\t\t\t\t.addManagedDatapoint(\"KORE\", DataStructureAgent1Name + \":\" + datageneratorservice + \"/result\", SyncMode.SUBSCRIBEONLY));\n\t\t\tCell weatherAgent = this.launcher.createAgent(cf);\n\t\t\t\n\t\t\t//=== Init finished ===//\n\n\t\t\tsynchronized (this) {\n\t\t\t\ttry {\n\t\t\t\t\tthis.wait(2000);\n\t\t\t\t} catch (InterruptedException e) {\n\n\t\t\t\t}\n\t\t\t}\n\t\t\tlog.info(\"=== All agents initialized ===\");\n\t\t\t\n\t\t\tweatherAgent.getCommunicator().execute(weatherAgent.getName() + \":\" + datageneratorservice + \"/command\", (new Request())\n\t\t\t\t\t.setParameter(\"command\", ControlCommand.START)\n\t\t\t\t\t.setParameter(\"blocking\", false), 100000);\n\t\t\t\n\t\t\t//Wait while the system runs\n\t\t\tsynchronized (this) {\n\t\t\t\ttry {\n\t\t\t\t\tthis.wait(2000000000);\n\t\t\t\t} catch (InterruptedException e) {\n\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Read the state of the system\n\t\t\t//JsonObject systemState = weatherAgent.readLocalDatapoint(CFStateGenerator.SYSTEMSTATEADDRESS).getValue().getAsJsonObject();\n\t\t\t\n\t\t\t//String currentResult = systemState.get(\"hasFunction\").getAsJsonArray().get(0).getAsJsonObject().get(\"hasState\").getAsString();\n\t\t\t//String expectedResult = \"RUNNING\"; //As the system is still running, when the request is sent\n\t\t\t\n\t\t\t//weatherAgent.getCommunicator().write(DatapointBuilder.newDatapoint(weatherservice + \".command\").setValue(ControlCommand.STOP));\n\t\t\t\n\t\t\t//log.info(\"current result={}, expected result={}\", currentResult, expectedResult);\n\t\t\tassertEquals(true, false);\n\t\t\t\n\t\t\tlog.info(\"Tests passed\");\n\t\t} catch (Exception e) {\n\t\t\tlog.error(\"Error testing system\", e);\n\t\t\tfail(\"Error\");\n\t\t}\n\n\t}", "@Test\n public void computerOffensive() throws IOException {\n Board field = new Board(\"CP----\"\n + \"-P--C-\"\n + \"-P----\"\n + \"-C----\"\n + \"-P--C-\"\n + \"------\");\n\n assertTrue(field.evaluate(false) < 0);\n\n // Vorteil fuer Spieler in Spalte 1\n Board field2 = new Board(\"CP----\"\n + \"-PC-C-\"\n + \"-P--P-\"\n + \"------\"\n + \"-PC-C-\"\n + \"------\");\n\n assertTrue(field2.evaluate(false) < 0);\n\n // Vorteil Computer in Zeile 0, 2\n // Vorteil Spieler in Zeile 2\n Board field3 = new Board(\"PC----\"\n + \"-PC-C-\"\n + \"-P--P-\"\n + \"-C----\"\n + \"-P--C-\"\n + \"------\");\n\n assertTrue(field3.evaluate(false) > 0);\n }", "@Test\r\n\tpublic void testExecuteMachine() throws MalformedURLException {\n//\t\tassertEquals(true, MockBackLMBets.executed);\r\n//\t\tassertEquals(6000000, MockBackLMBets.marketSuspendTime);\r\n//\r\n//\t\tmachine.fireEvent(\"runner\", ctx);\r\n//\t\tassertEquals(\"backPlaced\", machine.getCurrentStateId());\r\n\r\n\t}", "private void runTest(final Node me) {\n if (!initialized) {\n initStressTest();\n }\n\n List<Row> runs = engine.getSqlTemplate().query(selectControlSql);\n\n for (Row run : runs) {\n int runId = run.getInt(\"RUN_ID\");\n int payloadColumns = run.getInt(\"PAYLOAD_COLUMNS\");\n int initialSeedSize = run.getInt(\"INITIAL_SEED_SIZE\");\n long duration = run.getLong(\"DURATION_MINUTES\");\n\n String status = engine.getSqlTemplate().queryForString(selectStatusSql, runId, me.getNodeId());\n\n if (isMasterNode(me) && StringUtils.isBlank(status)) {\n initStressTestRowOutgoing(payloadColumns, runId, initialSeedSize);\n initStressTestRowIncoming(payloadColumns);\n long commitRows = run.getLong(\"SERVER_COMMIT_ROWS\");\n long sleepMs = run.getLong(\"SERVER_COMMIT_SLEEP_MS\");\n\n engine.getSqlTemplate().update(insertStatusSql, runId, me.getNodeId(), \"RUNNING\");\n for (Node client : engine.getNodeService().findTargetNodesFor(NodeGroupLinkAction.W)) {\n engine.getSqlTemplate().update(insertStatusSql, runId, client.getNodeId(), \"RUNNING\");\n }\n\n fillOutgoing(runId, duration, commitRows, sleepMs, payloadColumns);\n\n engine.getSqlTemplate().update(updateStatusSql, \"COMPLETE\", runId, me.getNodeId());\n\n } else if (!isMasterNode(me) && !StringUtils.isBlank(status) && status.equals(\"RUNNING\")) {\n long commitRows = run.getLong(\"CLIENT_COMMIT_ROWS\");\n long sleepMs = run.getLong(\"CLIENT_COMMIT_SLEEP_MS\");\n\n fillIncoming(runId, duration, commitRows, sleepMs, payloadColumns);\n\n engine.getSqlTemplate().update(updateStatusSql, \"COMPLETE\", runId, me.getNodeId());\n }\n }\n }", "public Machine machine() {\n return machine;\n }", "@Test\n void cupTesting() {\n Assertions.assertFalse(machine.isCupPositioned());\n Assertions.assertFalse(machine.removeCup());\n\n Assertions.assertDoesNotThrow(() -> machine.positionCup());\n\n Assertions.assertTrue(machine.removeCup());\n Assertions.assertFalse(machine.isCupPositioned());\n machine.setCupPositioned(true);\n Assertions.assertTrue(machine.isCupPositioned());\n\n }", "@Test\r\n\tpublic void test() {\r\n\t\tmodel1.getActualTurn().setHasAttacked(true);\r\n\t\tassertEquals(attack2.isPossible(model1) , false);\r\n\t\t\r\n\t\t/* verifica che se gli alieni vincono il gioco viene chiuso */\r\n\t\taliensWin2.perform(model1);\r\n\t\tassertEquals(model1.getGameState() , GameState.CLOSING);\r\n\t\tassertEquals(model1.getActualTurn().getCurrentPlayer().getAvatar().getIsWinner() , EndState.WINNER);\r\n\t\t\r\n\t\tmodel1.setActualTurn(turn2);\r\n\t\t\r\n\t\t/* verifica il corrretto funzionamento del metodo isPossible dell'azione di attacco */\r\n\t\tassertEquals(attack1.isPossible(model1) , false);\r\n\t\tmodel1.getActualTurn().setHasMoved(true);\r\n\t\tmodel1.getActualTurn().setHasDraw(true);\r\n\t\tassertEquals(attack1.isPossible(model1) , false);\r\n\t\tmodel1.getActualTurn().setHasDraw(false);\r\n\t\tmodel1.setGameState(GameState.ACCEPTING);\r\n\t\tassertEquals(attack1.isPossible(model1) , false);\r\n\t\tmodel1.setGameState(GameState.RUNNING);\r\n\t\tassertEquals(attack1.isPossible(model1) , true);\r\n\t\tmodel1.getGamePlayers().get(0).getAvatar().setIsAlive(LifeState.DEAD);\r\n\t\tmodel1.getGamePlayers().get(1).getAvatar().setIsAlive(LifeState.DEAD);\r\n\t\tmodel1.getGamePlayers().get(2).getAvatar().setIsAlive(LifeState.DEAD);\r\n\t\tmodel1.getGamePlayers().get(3).getAvatar().setIsAlive(LifeState.DEAD);\r\n\t\tmodel1.getGamePlayers().get(4).getAvatar().setIsAlive(LifeState.DEAD);\r\n\t\tmodel1.getGamePlayers().get(5).getAvatar().setIsAlive(LifeState.DEAD);\r\n\t\tmodel1.getGamePlayers().get(6).getAvatar().setIsAlive(LifeState.DEAD);\r\n\t\tevtAttacked1 = attack1.perform(model1);\r\n\t\tassertEquals(((EventAttacked)evtAttacked1.get(1)).getAreThereOtherHumans() , false);\r\n\t\tmodel1.getGamePlayers().get(1).getAvatar().setIsAlive(LifeState.ALIVE);\r\n\t\tmodel1.getGamePlayers().get(0).getAvatar().setIsAlive(LifeState.ALIVE);\r\n\t\tmodel1.getGamePlayers().get(2).getAvatar().setIsAlive(LifeState.ALIVE);\r\n\t\tmodel1.getGamePlayers().get(3).getAvatar().setIsAlive(LifeState.ALIVE);\r\n\t\tevtAttacked1 = attack1.perform(model1);\t\r\n\t\tassertEquals(((EventSufferAttack)evtAttacked1.get(0)).getKilled() , killedPlayer);\r\n\t\t\r\n\t\tmodel1.setActualTurn(turn3);\r\n\t\t\r\n\t\t/* verifica il corrretto funzionamento del metodo isPossible dell'azione di attacco */\r\n\t\tmodel1.setGameState(GameState.ACCEPTING);\r\n\t\t((Human)model1.getActualTurn().getCurrentPlayer().getAvatar()).setCanAttack(true);\r\n\t\tassertEquals(attack3.isPossible(model1) , false);\r\n\t\tmodel1.setGameState(GameState.RUNNING);\r\n\t\t((Human)model1.getActualTurn().getCurrentPlayer().getAvatar()).setCanAttack(false);\r\n\t\tassertEquals(attack3.isPossible(model1) , false);\r\n\t\t((Human)model1.getActualTurn().getCurrentPlayer().getAvatar()).setCanAttack(true);\r\n\t\tmodel1.getActualTurn().setHasAttacked(true);\r\n\t\tassertEquals(attack3.isPossible(model1) , false);\r\n\t\t\r\n\t\tmodel1.setActualTurn(turn4);\r\n\t\t\r\n\t\t/* verifica il corrretto funzionamento della perform dell'azione di attacco */\r\n\t\tsector1 = model1.getGameMap().searchSectorByName(\"Hatch\");\r\n\t\tmodel1.getActualTurn().getCurrentPlayer().getAvatar().setCurrentSector(sector1);\r\n\t\tevtAttacked2 = humanWin2.perform(model1);\r\n\t\tassertEquals(((EventNotifyHumanWin)evtAttacked2.get(0)).getGenerator() , player4);\r\n\t\tmodel1.getGamePlayers().get(3).getAvatar().setIsWinner(EndState.LOOSER);\r\n\t\tmodel1.getGamePlayers().get(2).getAvatar().setIsWinner(EndState.LOOSER);\r\n\t\tmodel1.getGamePlayers().get(0).getAvatar().setIsWinner(EndState.LOOSER);\r\n\t\tmodel1.getGamePlayers().get(1).getAvatar().setIsWinner(EndState.LOOSER);\r\n\t\tmodel1.getGamePlayers().get(4).getAvatar().setIsWinner(EndState.LOOSER);\r\n\t\tassertEquals(humanWin2.perform(model1).size() , 3);\r\n\t\t\r\n\t\tmodel1.setActualTurn(turn7);\r\n\t\t\r\n\t\t/* verifica il corrretto funzionamento dell'utilizzo della carta difesa */\r\n\t\tmodel1.getActualTurn().getCurrentPlayer().getAvatar().addCard(card);\r\n\t\tdefense = new Defense(evtDefense);\r\n\t\tevtAttacked2 = defense.perform(model1);\r\n\t\tassertTrue(!model1.getActualTurn().getCurrentPlayer().getAvatar().getMyCards().contains(card));\r\n\t\tassertTrue(evtAttacked2.get(0) instanceof EventRejectCardAlien);\r\n\t\tassertTrue(evtAttacked2.get(1) instanceof EventCardUsed);\r\n\t\t\r\n\t}", "static void test2() {\n\n System.out.println( \"Begin test2. ===============================\\n\" );\n\n Thread init = Thread.currentThread(); // init spawns the Mogwais\n\n System.out.println( \"TODO: write a more involved test here.\" );\n //\n // Create a GremlinsBridge of capacity 3.\n // Set an OPTIONAL, test delay to stagger the start of each mogwai.\n // Create the Mogwais and store them in an array.\n // Run them by calling their start() method.\n // Now, the test must give the mogwai time to finish their crossings.\n //\n System.out.println( \"TODO: follow the pattern of the example tests.\" );\n System.out.println( \"\\n=============================== End test2.\" );\n }", "@Test\n\tpublic void test() \n\t{\n\t\t\n\t\tfor(int i =0; i< 100; i++)\n\t\t{\n\t\t\tConnection uno = new RMIConnection(true);\n\t\t\tuno.setActive();\n\t\tConnection due = new RMIConnection(true);\n\t\t\tdue.setActive();\n\t\t\n\t\tMap<Integer, Connection> wRoom = new HashMap<>();\n\t\twRoom.put(0, uno);\n\t\twRoom.put(1, due);\n\t\t\n\t\tWaitingRoom.setConnection(wRoom);\n\t\t\n\t\t\n\t\tList<Integer> players = new ArrayList<>();\n\t\tplayers.add(0);\n\t\tplayers.add(1);\n\t\tModel m = new Model(players);\n\t\t\t\n\t\t\tBusinessCard first = m.getMap().getRegionByType(RegionType.PLAIN).getFirstcard();\n\t\t\tBusinessCard second = m.getMap().getRegionByType(RegionType.PLAIN).getSecondcard();\n\t\t\t\n\t\t\tGameController g = new GameController(m);\n\t\t\tRedrawBusinessCardMessage message = new RedrawBusinessCardMessage(RegionType.PLAIN);\n\t\t\n\t\t\tmessage.setId(0);\n\t\t\n\t\t\tg.update(null, message);\n\t\t\n\t\t\tBusinessCard firstNew = m.getMap().getRegionByType(RegionType.PLAIN).getFirstcard();\n\t\t\tBusinessCard secondNew = m.getMap().getRegionByType(RegionType.PLAIN).getSecondcard();\n\n\t\t\tassertTrue(\"prima \" + first.getId() + \" - seconda \" + firstNew.getId(), first.getId() != firstNew.getId());\n\t\t\tassertTrue(\"prima \" + second.getId() + \" - seconda \" + secondNew.getId(), second.getId() != secondNew.getId());\n\t\t}\n\t}", "public abstract int simulate();", "public OperatingSystem(Machine machine) throws MemoryFault, Exception {\n //List<Program> program = new LinkedList<>();\n this.machine = machine;\n\n for (int i = 0; i < waitQ.length; i++) {\n waitQ[i] = new LinkedList<>();\n }\n\n //Process_Table = new PCB[10]; \n ProgramBuilder wait = new ProgramBuilder();\n wait.size(2);\n wait.jmp(0);\n Program waiter = wait.build();\n program.add(waiter);\n\n freespace.add(new freeSpace(0, this.machine.MEMORY_SIZE));\n System.out.println(\"[Debug] Initial freeSpace size: \" + freespace.get(0).size);\n schedule(program);\n }", "@Test\n void getSetCurrentWater() {\n Assertions.assertEquals(1000, machine.getCurrentWater());\n machine.setCurrentWater(42);\n Assertions.assertEquals(42, machine.getCurrentWater());\n }", "public static void main(String[] args) {\n\r\n\t\tMachine machine = new Machine(5);\r\n\t\tSystem.out.println(machine);\r\n\t\t\r\n\t\tmachine.insertQuarter();\r\n\t\tmachine.turnCrank();\r\n\t\t\r\n\t\tSystem.out.println(machine);\r\n\t\t\r\n\t\tmachine.insertQuarter();\r\n\t\tmachine.turnCrank();\r\n\t\tmachine.insertQuarter();\r\n\t\tmachine.turnCrank();\r\n\t\t\r\n\t\tSystem.out.println(machine);\r\n\t}", "@Before\n public void setUp()\n {\n m1 = new GumballMachine(5);\n hasQuart1 = new HasQuarterState(m1);\n }", "@Before\n public void setup() {\n monitor = new ControlPlaneMonitor();\n\n mockCommunicationService = new ClusterCommunicationServiceAdapter();\n monitor.communicationService = mockCommunicationService;\n\n nodeId = new NodeId(\"1\");\n mockControllerNode = new MockControllerNode(nodeId);\n mockClusterService = createMock(ClusterService.class);\n monitor.clusterService = mockClusterService;\n\n expect(mockClusterService.getNode(anyObject()))\n .andReturn(mockControllerNode).anyTimes();\n expect(mockClusterService.getLocalNode())\n .andReturn(mockControllerNode).anyTimes();\n replay(mockClusterService);\n\n monitor.activate();\n }", "@Test\n void doEffectmachinegun() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"machine gun\");\n Weapon w14 = new Weapon(\"machine gun\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n wd.addWeapon(w14);\n p.setPlayerPosition(Board.getSquare(6));\n p.getPh().drawWeapon(wd, w14.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(7));\n RealPlayer victim2 = new RealPlayer('v', \"ciccia1\");\n victim2.setPlayerPosition(Board.getSquare(10));\n RealPlayer victim3 = new RealPlayer('g', \"ciccia2\");\n victim3.setPlayerPosition(Board.getSpawnpoint('y'));\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n players.add(victim2);\n players.add(victim);\n try {\n p.getPh().getWeaponDeck().getWeapon(w14.getName()).doEffect(\"base\", \"opt1\", null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) {\n System.out.println(\"ERROR\");\n }\n\n assertTrue(victim.getPb().countDamages() == 2 && victim2.getPb().countDamages() == 1);\n\n players.clear();\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(7));\n victim2 = new RealPlayer('v', \"ciccia\");\n victim2.setPlayerPosition(Board.getSquare(10));\n victim3 = new RealPlayer('g', \"ciccia\");\n victim3.setPlayerPosition(Board.getSpawnpoint('y'));\n players.add(victim);\n players.add(victim2);\n players.add(victim);\n players.add(victim3);\n try {\n p.getPh().getWeaponDeck().getWeapon(w14.getName()).doEffect(\"base\", \"opt1\", \"opt2\", p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 2 && victim2.getPb().countDamages() == 1 && victim3.getPb().countDamages() == 1);\n }", "public void testCycleHaltAddM() \r\n\t{\n\t\tMemory testProgram1 = new Memory(3);\r\n\t\ttestProgram1.store(0, \"00000000\");\r\n\t\ttestProgram1.store(1, \"00100111\");\r\n\t\ttestProgram1.store(2, \"11100111\");\r\n\t\t\r\n\t\tCPU testCPU = new CPU(testProgram1);\r\n\t\t\r\n\t\t//check haltCalledbefore the action is executed\r\n\t\tassertEquals(false, testCPU.getHaltCalled());\t\t\r\n\t\ttestCPU.cycle();\r\n\t\t//check haltCalled after the action is performed\r\n\t\tassertEquals(true, testCPU.getHaltCalled());\t\r\n\t\t\r\n\t\t//Check the accumulator before the rest is program is executed\r\n\t\tassertEquals(\"00000000\", testCPU.getAccumulator());\r\n\t\tassertEquals(0, testCPU.getAccumulatorDecimal());\r\n\t\ttestCPU.executeProgramInMemory();\r\n\t\t//Check the accumulator after the program has been executed\r\n\t\tassertEquals(\"00000000\", testCPU.getAccumulator());\r\n\t\tassertEquals(0, testCPU.getAccumulatorDecimal());\r\n\t\t\r\n\t\t//This program modifies the aaccumulator and then call halt\r\n\t\tMemory testProgram2 = new Memory(3);\r\n\t\ttestProgram2.store(0, \"10100111\");\r\n\t\ttestProgram2.store(1, \"00000000\");\r\n\t\ttestProgram2.store(2, \"11100111\");\r\n\t\t\r\n\t\ttestCPU.setMemory(testProgram2);\r\n\t\t\r\n\t\t//Check the accumulator before execution\r\n\t\tassertEquals(\"00000000\", testCPU.getAccumulator());\r\n\t\tassertEquals(0, testCPU.getAccumulatorDecimal());\r\n\t\t//check accumulator after the rest of the program has been executed\r\n\t\ttestCPU.executeProgramInMemory();\r\n\t\tassertEquals(\"00000111\", testCPU.getAccumulator());\r\n\t\tassertEquals(7, testCPU.getAccumulatorDecimal());\r\n\t\t\r\n\t\t\r\n\t\t//This program call halt at the beginning then call it again\r\n\t\t//it check that even the halt it call again nothing is execute\r\n\t\t//after the first call\r\n\t\tMemory testProgram3 = new Memory(4);\r\n\t\ttestProgram3.store(0, \"00000000\");\r\n\t\ttestProgram3.store(1, \"10100111\");\r\n\t\ttestProgram3.store(2, \"00000000\");\r\n\t\ttestProgram3.store(3, \"10100111\");\r\n\t\t\r\n\t\ttestCPU.setMemory(testProgram3);\r\n\t\r\n\t\t//Check the accumulator before execution\r\n\t\tassertEquals(\"00000000\", testCPU.getAccumulator());\r\n\t\tassertEquals(0, testCPU.getAccumulatorDecimal());\r\n\t\ttestCPU.executeProgramInMemory();\r\n\t\t//check accumulator after the rest of the program has been executed\r\n\t\tassertEquals(\"00000000\", testCPU.getAccumulator());\r\n\t\tassertEquals(0, testCPU.getAccumulatorDecimal());\r\n\t}", "@Test\n public void testModuloExpectedUse() {\n MainPanel mp = new MainPanel();\n ProgramArea pa = new ProgramArea();\n ProgramStack ps = new ProgramStack();\n\n ps.push(10);\n ps.push(3);\n\n ProgramExecutor pe = new ProgramExecutor(mp, ps, pa);\n\n pe.modulo();\n\n Assert.assertEquals(1, ps.pop());\n }", "@Before\r\n\tpublic void setUp() throws Exception {\r\n\t\tvendMachine = new VendingMachine();\r\n\t}", "public static void main(String[] args) throws Exception\n {\n Machine machine = new Machine();\n OperatingSystem os = new OperatingSystem(machine);\n machine.powerUp(os);\n // create a program\n\n //grab a program from collection, add to list, schedule list of programs\n List<Program> programs = new LinkedList<>();\n\n////////Testing virtua/physical\n// programs.add(ProgramCollection.A2P1(0));\n// programs.add(ProgramCollection.A2P1(1));\n// programs.add(ProgramCollection.A2P1(2));\n// programs.add(ProgramCollection.A2P1(3));\n// programs.add(ProgramCollection.A2P1(4));\n///////////Testing expand\n// programs.add(ProgramCollection.miniProg(2));\n// programs.add(ProgramCollection.miniProg(3));\n// programs.add(ProgramCollection.moreMem2());\n/////////Testing Shift\n// programs.add(ProgramCollection.moreMem2());\n// programs.add(ProgramCollection.longProg());\n /*\tTesting Compaction\n this test will have two mini programs that finish before our more memory program\n asks for more memory. It will also have two additional wait processes that never finish\n (one that needs to shift left and one too shift right). Our moreMem3 prog will ask for \n more memory and then try storing into these memory locations.\n */\n// programs.add(ProgramCollection.mini(6));\n// programs.add(ProgramCollection.mini(6));\n// programs.add(ProgramCollection.waitProcess(6));\n// programs.add(ProgramCollection.moreMem3(240));\n// programs.add(ProgramCollection.waitProcess(6));\n// programs.add(ProgramCollection.testIt(1));\n// programs.add(ProgramCollection.testIt(2));\n// programs.add(ProgramCollection.testIt(3));\n// programs.add(ProgramCollection.writeConsole(1));\n// programs.add(ProgramCollection.writeConsole(2));\n// programs.add(ProgramCollection.writeConsole(3));\n// programs.add(ProgramCollection.pWriteDisk2(340));\n//TEST READ AND WRITE DISK\n //programs.add(ProgramCollection.WriteReadDisk());\n//TEST SSTF\n// programs.add(ProgramCollection.testSSTF(10, 46, 5));\n// programs.add(ProgramCollection.testSSTF(20, 71, 5));\n// programs.add(ProgramCollection.testSSTF(30, 51, 10));\n// programs.add(ProgramCollection.testSSTF(40, 26, 5));\n\n//TEST STARVATION\n programs.add(ProgramCollection.testSSTF(10, 31, 3));\n programs.add(ProgramCollection.testSSTF(340, 90, 3));\n programs.add(ProgramCollection.testSSTF(20, 51, 3));\n programs.add(ProgramCollection.testSSTF(30, 41, 3));\n programs.add(ProgramCollection.testSSTF(40, 51, 3));\n programs.add(ProgramCollection.testSSTF(50, 41, 3));\n programs.add(ProgramCollection.testSSTF(60, 51, 3));\n programs.add(ProgramCollection.testSSTF(70, 41, 3));\n programs.add(ProgramCollection.testSSTF(80, 51, 3));\n programs.add(ProgramCollection.testSSTF(90, 41, 3));\n\n os.schedule(programs);\n\n }", "public static void main(String[] args) {\n MadScientist madScientist = new MadScientist(new TimeMachine());\r\n LinearlyTimeTraveler linearlyTimeTraveler = new LinearlyTimeTraveler(\"LinearMan\", 100d);\r\n DoublyTimeTraveler doublyTimeTraveler = new DoublyTimeTraveler(\"DoubleMan\", 100d);\r\n ExpolyTimeTraveler expolyTimeTraveler = new ExpolyTimeTraveler(\"ExpoMan\", 100d, DECAY_CONSTANT);\r\n // experiment on each TimeTraveler\r\n // a TimeTraveler should always start with 100 years of time travel strength\r\n // one TimeTraveler implementation should linearly decay (i.e., one year of actual time travel reduces the\r\n // time traveler's ability by one year)\r\n //250 multi-thread to speed up the process\r\n for (int i=0; i<250; i++) {\r\n madScientist.experiment(linearlyTimeTraveler);\r\n }\r\n // one TimeTraveler implementation should decay double the travel value (i.e., one year of actual time travel reduces\r\n // the time traveler's ability by two years)\r\n //150 multi-thread\r\n for (int i=0; i<150; i++) {\r\n madScientist.experiment(doublyTimeTraveler);\r\n }\r\n // one TimeTraveler implementation should have exponential decay with a decay constant inputted by the scientist (see http://en.wikipedia.org/wiki/Exponential_decay)\r\n //50 multi-thread\r\n for (int i=0; i<50; i++) {\r\n madScientist.experiment(expolyTimeTraveler);\r\n }\r\n // continue to experiment until all the TimeTraveler's have exhausted their ability to travel\r\n }", "@Test\n public void testAlterarSala() {\n System.out.println(\"alterarSala\");\n Simulacao simulacao = new Simulacao();\n simulacao.setSala(sala);\n AlterarTemperaturasMeioController instance = new AlterarTemperaturasMeioController(simulacao);\n instance.alterarSala();\n }", "public static void main(String[] args) {\n Computer computer = new Computer();\n computer.description();\n for (int i = 0; i != computer.resource; i++) {\n computer.on();\n computer.off();\n }\n }", "public static void main(String[] args) {\n\r\n\t\tMachine mac = new Machine();\r\n\t\t\r\n\t\tmac.start();\r\n\t\tmac.stop();\r\n\t\tSystem.out.println(\"----------------------\");\r\n\t\t\r\n\t\tCar bmw = new Car();\r\n\t\tbmw.start();\r\n\t\tbmw.stop();\r\n\t\tbmw.re_strat();\r\n\t\tSystem.out.println(\"-------------------\");\r\n\t\t\r\n\t\tMachine alto = new Car();\r\n\t\t\t\talto.start();\r\n\t\talto.stop();\r\n\t\tSystem.out.println(alto.engsize);\r\n\t\tSystem.out.println(\"---------------------------\");\t\r\n\t}", "@Override\r\n\tpublic void simulate() {\n\t\t\r\n\t}", "@Test\n public void testAct() {\n world.add(new Location(2, 0), jumper);\n jumper.act();\n jumper.act();\n assertEquals(new Location(0, 0), jumper.getLocation());\n jumper.act();\n jumper.act();\n assertEquals(new Location(0, 2), jumper.getLocation());\n }", "public abstract void simulate();", "public Machine() {\n\t\tsuper();\n\t}", "@Before\r\n\tpublic void setup() {\r\n \tint[] coinKind = {5, 10, 25, 100, 200};\r\n \tint selectionButtonCount = 6;\r\n \tint coinRackCapacity = 200;\t\t// probably a temporary value\r\n \tint popCanRackCapacity = 10;\r\n \tint receptacleCapacity = 200; \r\n \tvend = new VendingMachine(coinKind, selectionButtonCount, coinRackCapacity, popCanRackCapacity, receptacleCapacity);\r\n \t\r\n \t//for (int i = 0; i < vend.getNumberOfCoinRacks(); i++) {\r\n \t//\tTheCoinRackListener crListen = new TheCoinRackListener(vend);\r\n \t//\t(vend.getCoinRack(i)).register(crListen);\r\n \t//}\r\n \t\r\n \t//TheDisplayListener dListen = new TheDisplayListener();\r\n\t\t//(vend.getDisplay()).register(dListen);\r\n\t\t\r\n\t\tcsListen = new TheCoinSlotListener();\r\n\t\t(vend.getCoinSlot()).register(csListen);\r\n\t\t\r\n\t\t//TheCoinReceptacleListener crListen = new TheCoinReceptacleListener(vend);\r\n\t\t//(vend.getCoinReceptacle()).register(crListen);\r\n\t\t\r\n\t\t//crListen = new TheCoinReceptacleListener(vend);\r\n\t\t//(vend.getStorageBin()).register(crListen);\r\n\t\t\r\n\t\tdcListen = new DeliveryChuteListen(vend);\r\n\t\t(vend.getDeliveryChute()).register(dcListen);\r\n\t\t\r\n\t\t// exact change light\r\n\t\t//TheIndicatorLightListener eclListen = new TheIndicatorLightListener(vend);\r\n\t\t//(vend.getExactChangeLight()).register(dcListen);\r\n\t\t\r\n\t\t// out of order light\r\n\t\t//TheIndicatorLightListener oooListen = new TheIndicatorLightListener(vend);\r\n\t\t//(vend.getOutOfOrderLight()).register(dcListen);\r\n\t\t\r\n\t\tfor (int i = 0; i < vend.getNumberOfSelectionButtons(); i++) {\r\n \t\tTheSelectionButtonListener sbListen = new TheSelectionButtonListener(vend.getPopCanRack(i), csListen, vend, i);\r\n \t\t(vend.getSelectionButton(i)).register(sbListen);\r\n // \t\tPopCanRackListen pcrListen = new PopCanRackListen(vend);\r\n // \t\t(vend.getPopCanRack(i)).register(pcrListen);\r\n \t}\r\n\t\t\r\n\t\t//for (int i = 0; i < vend.getNumberOfPopCanRacks(); i++) {\r\n \t//\t\r\n \t//\t\r\n \t//}\r\n\t\tList<String> popCanNames = new ArrayList<String>();\r\n\t\tpopCanNames.add(\"Coke\"); \r\n\t\tpopCanNames.add(\"Pepsi\"); \r\n\t\tpopCanNames.add(\"Sprite\"); \r\n\t\tpopCanNames.add(\"Mountain dew\"); \r\n\t\tpopCanNames.add(\"Water\"); \r\n\t\tpopCanNames.add(\"Iced Tea\");\r\n\t\t\r\n\t\tPopCan popcan = new PopCan(\"Coke\");\r\n\t\ttry {\r\n\t\t\tvend.getPopCanRack(0).acceptPopCan(popcan);\r\n\t\t} catch (CapacityExceededException | DisabledException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t};\r\n\t\t\r\n\t\tList<Integer> popCanCosts = new ArrayList<Integer>();\r\n\t\tfor (int i = 0; i < 6; i++) {\r\n\t\t\tpopCanCosts.add(200);\r\n\t\t}\r\n\t\tvend.configure(popCanNames, popCanCosts);\r\n \t\r\n }", "@Test\r\n\tpublic void MakeBeverageTest() throws InsuficientException, InterruptedException\r\n\t{\n\t\tmachine.MakeBeverage(\"Tea\", machine.GetOutlet(1));\r\n\t\tmachine.MakeBeverage(\"Tea\", machine.GetOutlet(0));\r\n\t\tSystem.out.println(\"Servered Successfully !!\");\r\n\t}", "@Before\n public void setUp(){\n choose = new ChooseDieModifier(new DieReducer());\n }", "public void mutate() {\n \t//POEY comment: for initialise() -> jasmine.gp.nodes.ercs\n //such as CustomRangeIntegerERC.java, PercentageERC.java, BoolERC.java \n \tsetValue(initialise());\n }", "public void testaReclamacao() {\n\t}", "public Machine(Machine machine, int days){\n this.daySale = machine.daySale;\n this.priceBought = machine.priceBought;\n this.priceResold = machine.priceResold;\n this.dailyProfit = machine.dailyProfit;\n this.machineCost = priceBought - priceResold;\n this.minDaysProfitable = machine.minDaysProfitable - 1;\n this.daysLefts = machine.daysLefts - days;\n this.maximumMachineProfit = (this.dailyProfit * this.daysLefts) + this.priceResold;\n }", "@Test\n public void test(){\n tmp = new Die(\"Red\",5);\n choose.modifyDie(tmp);\n assertEquals(4,tmp.getDieNumber());\n choose = new ChooseDieModifier(new DieEnhancer());\n choose.modifyDie(tmp);\n assertEquals(5,tmp.getDieNumber());\n choose = new ChooseDieModifier(new TurnTheDieOpposite());\n choose.modifyDie(tmp);\n assertEquals(2,tmp.getDieNumber());\n choose = new ChooseDieModifier(new RollDie());\n Die tmp2 = new Die(tmp.getDieColor(),tmp.getDieNumber());\n int i;\n int max=1000000;\n boolean testPassed=false;\n for(i=0;i<max;i++){\n choose.modifyDie(tmp);\n if(tmp.getDieNumber()!=tmp2.getDieNumber()){\n testPassed=true;\n i = max;\n }\n }\n assertTrue(testPassed);\n }", "@Test(invocationCount=1,skipFailedInvocations=false)\n public void testDemo() throws TimeOut{\n \tMentalStateManager msmAgent1_0DeploymentUnitByType3=MSMRepository.getInstance().waitFor(\"Agent1_0DeploymentUnitByType3\");\n \t \t\t\t\n \t// wait for Agent1_0DeploymentUnitByType2 to initialise\n \tMentalStateManager msmAgent1_0DeploymentUnitByType2=MSMRepository.getInstance().waitFor(\"Agent1_0DeploymentUnitByType2\");\n \t \t\t\t\n \t// wait for Agent0_0DeploymentUnitByType1 to initialise\n \tMentalStateManager msmAgent0_0DeploymentUnitByType1=MSMRepository.getInstance().waitFor(\"Agent0_0DeploymentUnitByType1\");\n \t \t\t\t\n \t// wait for Agent0_0DeploymentUnitByType0 to initialise\n \tMentalStateManager msmAgent0_0DeploymentUnitByType0=MSMRepository.getInstance().waitFor(\"Agent0_0DeploymentUnitByType0\");\n \t\n \t\n \tGenericAutomata ga=null;\n \tga=new GenericAutomata();\n\t\t\t\n\t\t\tga.addInitialState(\"default_WFTestInitialState0\");\t\t\n\t\t\t\n\t\t\tga.addInitialState(\"default_WFTestInitialState1\");\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tga.addFinalState(\"WFTestFinalState0\");\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tga.addStateTransition(\"default_WFTestInitialState0\",\"Agent0_0DeploymentUnitByType0-Task0\",\"WFTestInitialState0\");\n\t\t\t\n\t\t\tga.addStateTransition(\"WFTestInitialState0\",\"Agent1_0DeploymentUnitByType2-Task1\",\"WFTestFinalState0\");\n\t\t\t\n\t\t\tga.addStateTransition(\"default_WFTestInitialState1\",\"Agent0_0DeploymentUnitByType1-Task0\",\"WFTestInitialState1\");\n\t\t\t\n\t\t\tga.addStateTransition(\"WFTestInitialState1\",\"Agent1_0DeploymentUnitByType2-Task1\",\"WFTestFinalState0\");\n\t\t\t\t\n\t\t\t\n\t\t\tTaskExecutionValidation tev=new TaskExecutionValidation(ga);\n \t\n \ttev.registerTask(\"Agent0_0DeploymentUnitByType0\",\"Task0\");\n \t\n \ttev.registerTask(\"Agent1_0DeploymentUnitByType2\",\"Task1\");\n \t\n \ttev.registerTask(\"Agent0_0DeploymentUnitByType1\",\"Task0\");\n \t\n \ttev.registerTask(\"Agent1_0DeploymentUnitByType2\",\"Task1\");\n \t\t\n \t\t\n \tRetrieveExecutionData cwfe=new \tRetrieveExecutionData();\n \tEventManager.getInstance().register(cwfe);\n\t\tlong step=100;\n\t\tlong currentTime=0;\n\t\tlong finishedTime=0;\n\t\tlong duration=2000;\n\t\tlong maxtimepercycle=2000;\n\t\t \n\t\tMainInteractionManager.goAutomatic(); // tells the agents to start working\t\t\t\n\t\twhile (currentTime<finishedTime){\n\t\t\t\ttry {\n\t\t\t\t\tThread.currentThread().sleep(step);\n\t\t\t\t\t\n\t\t\t\t} catch (InterruptedException e) {\t\t\t\t\t\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcurrentTime=currentTime+step;\n\t\t\t}\n\t\t\t\n\t\t\tif (currentTime<duration){\n\t\t\t\tTestUtils.doNothing(duration-currentTime); // waits for tasks to execute\t\n\t\t\t}\n\t\t\t\t\t\n\t\t\t\n\t\t\tMainInteractionManager.goManual(); // now it commands to not execute more tasks\t\t\n\t\t\tEventManager.getInstance().unregister(cwfe);\n\t\t\t\n\t\t Vector<String> counterExamples=tev.validatePartialTermination(cwfe,ga,maxtimepercycle);\n\t\t assertTrue(\"The execution does not match the expected sequences. I found the following counter examples \"+counterExamples,counterExamples.isEmpty());\t\t\n\t\t\t\t\t\t\t\n }", "@Override\r\n\tpublic void onMachine() {\n System.out.println(\"Please On the machine to cook \");\r\n grillmachine.setState(grillmachine.getOnState());\r\n\t}", "@Test\n void necesitaConductorExperimentado() {\n when(f1.esCompleja()).thenReturn(true);\n when(f2.esCompleja()).thenReturn(true);\n when(f3.esCompleja()).thenReturn(false);\n assertTrue(deposito.necesitaConductorExperimentado());\n\n // Nignuna de sus formaciones es compleja:\n when(f1.esCompleja()).thenReturn(false);\n when(f2.esCompleja()).thenReturn(false);\n when(f3.esCompleja()).thenReturn(false);\n assertFalse(deposito.necesitaConductorExperimentado());\n }", "static void test0() {\n\n System.out.println( \"Begin test0. ===============================\\n\" );\n\n Thread init = Thread.currentThread(); // init spawns the Mogwais\n\n // Create a GremlinsBridge of capacity 3.\n GremlinsBridge gremlinBridge = new GremlinsBridge( 3 );\n\n // Set an optional, test delay to stagger the start of each mogwai.\n int delay = 4000;\n\n // Create the Mogwais and store them in an array.\n Thread peds[] = {\n new Mogwai( \"Al\", 3, SIDE_ONE, gremlinBridge ),\n new Mogwai( \"Bob\", 4, SIDE_TWO, gremlinBridge ),\n };\n\n for ( int j = 0; j < peds.length; ++j ) {\n // Run them by calling their start() method.\n try {\n peds[j].start();\n init.sleep( delay );\n }\n catch ( InterruptedException e ) {\n System.err.println( \"Abort. Unexpected thread interruption.\" );\n break;\n }\n }\n // Now, the test must give the mogwai time to finish their crossings.\n for ( int j = 0; j < peds.length; ++j ) {\n try {\n peds[j].join();\n }\n catch ( InterruptedException e ) {\n System.err.println( \"Abort. Unexpected thread interruption.\" );\n break;\n }\n }\n System.out.println( \"\\n=============================== End test0.\" );\n return;\n }", "private static void teste02 () {\n\t\tEstoque e = Estoque.find(1);\n\t\tlog.debug(\"Estoque encontrado.\");\n\n\t\te.setPreco(new Float(10));\n\t\te.update();\n\n\t\tlog.debug(\"Estoque atualizado.\");\n\t}", "private void test() {\n\n\t}", "public static void main(String[ ] args) {\r\n Machine m1 = new Machine() {\r\n @Override public void start() {\r\n System.out.println(\"Wooooo\");\r\n }\r\n };\r\n Machine m2 = new Machine();\r\n m2.start();\r\n m2.end();\r\n }", "@Test\n public void testAct() {\n world.add(new Location(FOUR , FOUR), jumper);\n jumper.act();\n jumper.act();\n assertEquals(new Location(ZERO, FOUR), jumper.getLocation());\n }", "private void runEm() {\n renameOriginalDomainConfig();\n\n testV3_0_1Domain();\n\n // after all the tests have run, move back the old domain\n restoreOriginalDomainConfig();\n\n // print results\n stat.printSummary();\n }", "@Before\n public void prepare() throws Exception{\n systemController = new SystemControllerImpl();\n //List<Node> inputNodes = NodeDataGenerator.generate(3, 5);\n List<Node> inputNodes = NodeDataGenerator.generateFixedReal();\n inputNodes.forEach(node -> systemController.addNode(node));\n }", "public void realizaSimulacion(){\r\n\t\t\r\n\t\tEntradaDeDatos entradaDatosUsuario = new EntradaDeDatos();\r\n\t\tEnum_Instrucciones ordenUsuarioEnEnumerado;\r\n\t\tint filaEntrada, columnaEntrada;\r\n\t\tboolean salir = false;\r\n\t\t\r\n\t\t// Mostramos la superficie.\r\n\t\tmundo.mostrarSuperficie();\r\n\t\t\t\r\n\t\twhile(!salir) {\r\n\t\t\t\r\n\t\t\tordenUsuarioEnEnumerado = entradaDatosUsuario.pedirComandoPorConsolaAlUsuario();\r\n\t\t\t\r\n\t\t\t// Dependiendo del enumerado haremos que se ejecute una accion u otra.\r\n\t\t\tswitch(ordenUsuarioEnEnumerado) {\r\n\t\t\tcase PASO:\r\n\t\t\t\t\r\n\t\t\t\tmundo.evoluciona();\r\n\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t\tcase INICIAR:\r\n\t\r\n\t\t\t\tmundo.iniciar();\r\n\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t\tcase CREARCELULA:\r\n\t\t\t\t\r\n\t\t\t\t// Almacenamos en la variable filaEntrada el valor que haya introducido el usuario.\r\n\t\t\t\tfilaEntrada = entradaDatosUsuario.devuelveFilaIntroducidaPorConsolaAlUsuario();\r\n\t\t\t\t\r\n\t\t\t\t// Almacenamos en la variable columnaEntrada el valor que haya introducido el usuario.\r\n\t\t\t\tcolumnaEntrada = entradaDatosUsuario.devuelveColumnaIntroducidaPorConsolaUsuario();\r\n\t\t\t\t\r\n\t\t\t\t// Creamos la celula, si se ha podido nos notifica exito, y si no, nos informa de un error.\r\n\t\t\t\tif(mundo.crearCelula(filaEntrada, columnaEntrada)) {\r\n\t\t\t\t\tSystem.out.println(\"Creamos nueva celula en la posicion: (\" +\r\n\t\t\t\t\t\t\t\t\t\tfilaEntrada + \",\" + columnaEntrada + \").\");\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tSystem.out.println(\"Error, no se ha podido crear la celula\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t\tcase ELIMINARCELULA:\r\n\t\t\t\r\n\t\t\t\t// Almacenamos en la variable filaEntrada el valor que haya introducido el usuario.\r\n\t\t\t\tfilaEntrada = entradaDatosUsuario.devuelveFilaIntroducidaPorConsolaAlUsuario();\r\n\t\t\t\t\r\n\t\t\t\t// Almacenamos en la variable columnaEntrada el valor que haya introducido el usuario.\r\n\t\t\t\tcolumnaEntrada = entradaDatosUsuario.devuelveColumnaIntroducidaPorConsolaUsuario();\r\n\t\t\t\t\r\n\t\t\t\t// Creamos la c�lula, si se ha podido nos notifica exito, y si no error.\r\n\t\t\t\tif(mundo.eliminarCelula(filaEntrada, columnaEntrada)) {\r\n\t\t\t\t\tSystem.out.println(\"Celula eliminada con exito en la posicion: (\" +\r\n\t\t\t\t\t\t\t\t\t\tfilaEntrada + \",\" + columnaEntrada + \").\");\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tSystem.out.println(\"Error, no se ha podido eliminar la celula\");\r\n\t\t\t\t}\r\n\t\t\r\n\t\t\t\tbreak;\r\n\t\t\tcase AYUDA:\r\n\t\t\t\t\r\n\t\t\t\tmostrarAyuda();\r\n\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t\tcase VACIAR:\r\n\t\t\t\t\r\n\t\t\t\tmundo.vaciar();\r\n\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t\tcase SALIR:\r\n\t\t\t\t\r\n\t\t\t\tsalir = true;\r\n\t\t\t\t \r\n\t\t\t\tbreak;\r\n\t\t\tcase DESCONOCIDO:\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"Error de entrada.\");\r\n\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(!salir) {\r\n\t\t\t\t\r\n\t\t\t\t// Muestra la superficie.\r\n\t\t\t\tSystem.out.println();\r\n\t\t\t\tmundo.mostrarSuperficie();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"Fin de la simulacion......\");\r\n\t}", "@Test\n\tpublic void hasWorkstationTest(){\n\t\tcmcSystem.logInUser(2);\n\t\tOrder testOrder = makeOrder(new ModelA());\n\t\tcmcSystem.logInUser(2);\n\t\tOrder testOrder2 = makeOrder(new ModelB());\n//\t\tOrder testOrder3 = makeOrder(new ModelC());\n//\t\tOrder testOrder4 = makeOrder(new ModelX());\n//\t\tcmcSystem.logInUser(2);\n//\t\tOrder testOrder5 = makeOrder(new ModelY());\n\t\tcmcSystem.logInUser(1);\n\t\tassemblyLine.setStatus(Status.OPERATIONAL, 1);\n\t\tassertTrue(assemblyLine.supports(testOrder));\n\t\tassertTrue(assemblyLine.supports(testOrder2));\n//\t\tassertFalse(assemblyLine.supports(testOrder3));\n//\t\tassertFalse(assemblyLine.supports(testOrder4));\n//\t\tassertFalse(assemblyLine.supports(testOrder5));\n\t}", "@Test\n\tpublic void test() {\n\t\tCollection<Storage> storage = new ArrayList<Storage>();\n\t\tstorage.add(new Memory(2048));\n\n\t\t// create a list of disks to build a RAID array\n\t\tList<Disk> disks = new ArrayList<Disk>();\n\t\tdisks.add(new SSD(1, 1, 1));\n\t\tdisks.add(new SSD(1, 1, 1));\n\t\t\n\t\t// add the new RAID array to the storage collection\n\t\tstorage.add(new RAID(disks));\n\n\t\t// build the laptop using the storage\n\t\tLaptop laptop = new Laptop(\"Apple\", \"Intel\", storage);\n\t\tlaptop.setOpen(true);\n\n\t\t// install some applications!\n\t\tlaptop.installApplication(\"eclipse\");\n\t\tlaptop.installApplication(\"chrome\");\n\n\t\tLaptopBag bag = new LaptopBag(\"Mission Workshop\", 10.0, Color.getRandomColor());\n\t\tSystem.out.println(totalStorageCapacity(laptop));\n\t}", "@Override\n public void onMachineAssembled()\n {\n \n }", "@Test\n public void testLunce() throws IOException {\n }", "@Override\n public void main() throws InterruptedException {\n this.motorLeft = this.hardwareMap.dcMotor.get(\"motorLeft\");\n this.motorRight = this.hardwareMap.dcMotor.get(\"motorRight\");\n\n motorLeft.setMode(DcMotorController.RunMode.RUN_WITHOUT_ENCODERS);\n motorRight.setMode(DcMotorController.RunMode.RUN_WITHOUT_ENCODERS);\n\n motorRight.setDirection(DcMotor.Direction.REVERSE);\n\n// boolean test = true;\n// while (test) {\n// motorLeft.setPower(1.0);\n// motorRight.setPower(1.0);\n//\n// if (updateGamepads())\n// {\n// if (gamepad1.b)\n// {\n// test = false;\n// }\n// }\n// }\n\n // while (opModeIsActive())\n // gamepad1.a\n while (true)\n {\n if (updateGamepads())\n {\n motorLeft.setPower(gamepad1.left_stick_y);\n motorRight.setPower(gamepad1.right_stick_y);\n\n // move the arm with controller bumpers\n if (gamepad1.right_bumper)\n {\n motorArm.setPower(0.5);\n Thread.sleep(100);\n }\n else if (gamepad1.left_bumper)\n {\n motorArm.setPower(-0.5);\n Thread.sleep(100);\n }\n else\n {\n motorArm.setPower(0);\n }\n }\n\n telemetry.update();\n idle();\n }\n }", "@Override\n public void runOpMode() {\n leftDrive = hardwareMap.get(DcMotor.class, \"left_drive\");\n rightDrive = hardwareMap.get(DcMotor.class, \"right_drive\");\n intake = hardwareMap.get (DcMotor.class, \"intake\");\n dropServo = hardwareMap.get(Servo.class, \"drop_Servo\");\n leftDrive.setDirection(DcMotor.Direction.REVERSE);\n rightDrive.setDirection(DcMotor.Direction.FORWARD);\n\n dropServo.setPosition(1.0);\n waitForStart();\n dropServo.setPosition(0.6);\n sleep(500);\n VuforiaOrientator();\n encoderSequence(\"dumbDrive\");\n\n\n }", "public void test() throws Exception {\n ApiConnection api = new ApiConnection(\"http://api06.dev.openstreetmap.org/api\");\n\n Root root = api.get(malmoSouth, malmoWest, malmoNorth, malmoEast);\n\n api.authenticate(\"[email protected]\", \"osm-common\");\n\n\n long changeset = api.createChangeset(\"Test\");\n try {\n\n String reference = UUID.randomUUID().toString();\n\n Node node = new Node();\n node.setChangeset(changeset);\n node.setLongitude(53);\n node.setLatitude(16);\n node.setTag(\"ref:osm-common\", reference);\n\n api.create(changeset, node);\n\n assertTrue(node.getId() > 0);\n assertEquals(new Long(changeset), node.getChangeset());\n assertEquals(reference, node.getTag(\"ref:osm-common\"));\n\n Node newNode = api.getNode(node.getId());\n assertEquals(node.getId(), newNode.getId());\n assertEquals(new Long(changeset), newNode.getChangeset());\n assertEquals(node.getLatitude(), newNode.getLatitude());\n assertEquals(node.getLongitude(), newNode.getLongitude());\n assertEquals(reference, newNode.getTag(\"ref:osm-common\"));\n\n api.delete(changeset, newNode);\n\n // todo check deleted\n\n System.currentTimeMillis();\n\n } finally {\n api.closeChangeset(changeset);\n }\n\n System.currentTimeMillis();\n }", "@Test\n public void testTankMoving() {\n tank.moveRight();\n assertEquals(tank.getMovingRight(), true);\n\n tank.moveLeft();\n assertEquals(tank.getMovingLeft(), true);\n\n tank.notMoveLeft();\n assertEquals(tank.getMovingLeft(), false);\n\n tank.notMoveRight();\n assertEquals(tank.getMovingRight(), false);\n }", "@Test\n public void z_topDown_TC03() {\n try {\n Intrebare intrebare = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"M\");\n Intrebare intrebare1 = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"A\");\n Intrebare intrebare2 = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"B\");\n Intrebare intrebare3 = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"C\");\n assertTrue(true);\n assertTrue(appService.exists(intrebare));\n assertTrue(appService.exists(intrebare1));\n assertTrue(appService.exists(intrebare2));\n assertTrue(appService.exists(intrebare3));\n\n try {\n ccir2082MV.evaluator.model.Test test = appService.createNewTest();\n assertTrue(test.getIntrebari().contains(intrebare));\n assertTrue(test.getIntrebari().contains(intrebare1));\n assertTrue(test.getIntrebari().contains(intrebare2));\n assertTrue(test.getIntrebari().contains(intrebare3));\n assertTrue(test.getIntrebari().size() == 5);\n } catch (NotAbleToCreateTestException e) {\n assertTrue(false);\n }\n\n Statistica statistica = appService.getStatistica();\n assertTrue(statistica.getIntrebariDomenii().containsKey(\"Literatura\"));\n assertTrue(statistica.getIntrebariDomenii().get(\"Literatura\")==1);\n\n assertTrue(statistica.getIntrebariDomenii().containsKey(\"M\"));\n assertTrue(statistica.getIntrebariDomenii().get(\"M\")==1);\n\n assertTrue(statistica.getIntrebariDomenii().containsKey(\"A\"));\n assertTrue(statistica.getIntrebariDomenii().get(\"A\")==1);\n\n assertTrue(statistica.getIntrebariDomenii().containsKey(\"B\"));\n assertTrue(statistica.getIntrebariDomenii().get(\"B\")==1);\n\n assertTrue(statistica.getIntrebariDomenii().containsKey(\"C\"));\n assertTrue(statistica.getIntrebariDomenii().get(\"C\")==1);\n\n } catch (DuplicateIntrebareException | IntrebareValidatorFailedException e) {\n e.printStackTrace();\n assertTrue(false);\n } catch (NotAbleToCreateStatisticsException e) {\n assertTrue(false);\n }\n }", "@Override\n public void runOpMode(){\n motors[0][0] = hardwareMap.dcMotor.get(\"frontLeft\");\n motors[0][1] = hardwareMap.dcMotor.get(\"frontRight\");\n motors[1][0] = hardwareMap.dcMotor.get(\"backLeft\");\n motors[1][1] = hardwareMap.dcMotor.get(\"backRight\");\n // The motors on the left side of the robot need to be in reverse mode\n for(DcMotor[] motor : motors){\n motor[0].setDirection(DcMotor.Direction.REVERSE);\n }\n // Being explicit never hurt anyone, right?\n for(DcMotor[] motor : motors){\n motor[1].setDirection(DcMotor.Direction.FORWARD);\n }\n\n waitForStart();\n\n //Kill ten seconds\n runtime.reset();\n while(runtime.seconds()<10); runtime.reset();\n\n while(runtime.milliseconds()<700){\n // Loop through front and back motors\n for(DcMotor[] motor : motors){\n // Set left motor power\n motor[0].setPower(100);\n // Set right motor power\n motor[1].setPower(100);\n }\n }\n\n while(runtime.milliseconds()<200){\n // Loop through front and back motors\n for(DcMotor[] motor : motors){\n // Set left motor power\n motor[0].setPower(-100);\n // Set right motor power\n motor[1].setPower(-100);\n }\n }\n\n runtime.reset();\n // Loop through front and back motors\n for(DcMotor[] motor : motors){\n // Set left motor power\n motor[0].setPower(0);\n // Set right motor power\n motor[1].setPower(0);\n }\n }", "@Test\n public void testIsEntityAllowedVlan() throws Exception {\n IAnswer<Boolean> isConsistentAnswer = new IsConsistentAnswer();\n IOFSwitch sw1 = createMock(IOFSwitch.class);\n IOFSwitch sw2 = createMock(IOFSwitch.class);\n ArrayList<ImmutablePort> sw1ports = new ArrayList<ImmutablePort>();\n ArrayList<ImmutablePort> sw2ports = new ArrayList<ImmutablePort>();\n for (int i = 1; i <= 2; i++) {\n ImmutablePort p = (new ImmutablePort.Builder())\n .setName(\"eth\" + i)\n .setPortNumber((short) i)\n .build();\n expect(sw1.getPort(p.getName())).andReturn(p).anyTimes();\n sw1ports.add(p);\n\n p = (new ImmutablePort.Builder())\n .setName(\"eth\" + i)\n .setPortNumber((short) i)\n .build();\n expect(sw2.getPort(p.getName())).andReturn(p).anyTimes();\n sw2ports.add(p);\n }\n // catch-all for ports we haven't specified\n expect(sw1.getPort(EasyMock.anyObject(String.class))).andStubReturn(null);\n expect(sw2.getPort(EasyMock.anyObject(String.class))).andStubReturn(null);\n expect(sw1.getEnabledPorts()).andReturn(sw1ports).anyTimes();\n expect(sw2.getEnabledPorts()).andReturn(sw2ports).anyTimes();\n expect(sw1.getId()).andReturn(1L).anyTimes();\n expect(sw2.getId()).andReturn(2L).anyTimes();\n ConcurrentHashMap<Long, IOFSwitch> switches =\n new ConcurrentHashMap<Long, IOFSwitch>();\n switches.put(1L, sw1);\n switches.put(2L, sw2);\n mockFloodlightProvider.setSwitches(switches);\n\n replay(sw1, sw2);\n\n Entity h1 = new Entity(1L, null, 1, 1L, 1, null);\n Entity h1vlan2 = new Entity(1L, (short) 2, 1, 1L, 1, null);\n Entity h1vlan2sw2 = new Entity(1L, (short) 2, 1, 2L, 1, null);\n Entity h2vlan2 = new Entity(2L, (short) 2, 1, 1L, 1, null);\n Entity[] entities =\n new Entity[] { h1, h1vlan2, h1vlan2sw2, h2vlan2 };\n\n // Test 0\n // no config. All should be allowed\n setupTopology(isConsistentAnswer, true);\n verifyEntityAllowed(new boolean[] { true, true, true, true },\n entities,\n \"AS1\");\n verifyEntityAllowed(new boolean[] { true, true, true, true },\n entities,\n \"default\");\n verify(topology);\n\n EnumSet<DeviceField> keyFields =\n EnumSet.of(IDeviceService.DeviceField.VLAN,\n IDeviceService.DeviceField.MAC);\n // Test 1\n // Lock MAC 1 to nonexisting switch/port in AS1 and default. VLAN\n // should be ignored in AS1\n HostSecurityAttachmentPointRow r1 =\n new HostSecurityAttachmentPointRow(\"AS1\",\n null,\n 1L,\n 0xffL,\n \"eth1\",\n keyFields);\n HostSecurityAttachmentPointRow r2 =\n new HostSecurityAttachmentPointRow(\"default\",\n null,\n 1L,\n 0xffL,\n \"eth1\",\n keyFields);\n r1.writeToStorage();\n r2.writeToStorage();\n setupTopology(isConsistentAnswer, true);\n verifyEntityAllowed(new boolean[] { false, false, false, true },\n entities,\n \"AS1\");\n verifyEntityAllowed(new boolean[] { false, true, true, true },\n entities,\n \"default\");\n verify(topology);\n\n // Test 2: now lock MAC 1 to sw1-port1\n HostSecurityAttachmentPointRow r3 =\n new HostSecurityAttachmentPointRow(\"AS1\",\n (short) 2,\n 1L,\n 0x1L,\n \"eth1\",\n keyFields);\n HostSecurityAttachmentPointRow r4 =\n new HostSecurityAttachmentPointRow(\"default\",\n (short) 2,\n 1L,\n 0x1L,\n \"eth1\",\n keyFields);\n r3.writeToStorage();\n r4.writeToStorage();\n setupTopology(isConsistentAnswer, true);\n verifyEntityAllowed(new boolean[] { false, false, false, true },\n entities,\n \"AS1\");\n verifyEntityAllowed(new boolean[] { false, true, false, true },\n entities,\n \"default\");\n verify(topology);\n\n // Clear storage\n r1.removeFromStorage();\n r2.removeFromStorage();\n r3.removeFromStorage();\n r4.removeFromStorage();\n\n String hostBaseUrl = REST_URL + \"/core/device\";\n\n // Test 3: Lock IP1 to MAC 2\n HostSecurityIpAddressRow ipRow1 =\n new HostSecurityIpAddressRow(\"AS1\", null, 2L, 1, keyFields);\n HostSecurityIpAddressRow ipRow2 =\n new HostSecurityIpAddressRow(\"default\",\n null,\n 2L,\n 1,\n keyFields);\n ipRow1.writeToStorage();\n ipRow2.writeToStorage();\n verifyEntityAllowed(new boolean[] { false, false, false, true },\n entities,\n \"AS1\");\n verifyEntityAllowed(new boolean[] { false, false, false, false },\n entities,\n \"default\");\n verify(topology);\n\n // Test 4: same as Test3 plus add: Lock IP1 to MAC 2, VLAN 2\n // Not setting for AS1 since using non-default AS + vlan is illegal\n HostSecurityIpAddressRow ipRow3 =\n new HostSecurityIpAddressRow(\"default\",\n (short) 2,\n 2L,\n 1,\n keyFields);\n ipRow3.writeToStorage();\n verifyEntityAllowed(new boolean[] { false, false, false, true },\n entities,\n \"AS1\");\n verifyEntityAllowed(new boolean[] { false, false, false, true },\n entities,\n \"default\");\n verify(topology);\n\n // Test 5: Same as Test 4: add: Lock IP1 to MAC 1\n HostSecurityIpAddressRow ipRow4 =\n new HostSecurityIpAddressRow(\"AS1\", null, 1L, 1, keyFields);\n HostSecurityIpAddressRow ipRow5 =\n new HostSecurityIpAddressRow(\"default\",\n null,\n 1L,\n 1,\n keyFields);\n ipRow4.writeToStorage();\n ipRow5.writeToStorage();\n verifyEntityAllowed(new boolean[] { true, true, true, true },\n entities,\n \"AS1\");\n verifyEntityAllowed(new boolean[] { true, false, false, true },\n entities,\n \"default\");\n verify(topology);\n\n verify(sw1, sw2);\n }", "@Test\n public void test_01() {\n Maze maze = new Maze(tinyBoard, new Location(0,0));\n maze.moveChip(Direction.EAST);\n assertTrue(maze.getChipLocation().equals(new Location(1, 0)));\n }", "@Test\r\n public void testActualizar() throws Exception {\r\n System.out.println(\"actualizar\");\r\n String pcodigo = \"qart\";\r\n String pnombre = \"Arreglar bumper\";\r\n String tipo = \"Enderazado\";\r\n Date pfechaAsignacion = new Date(Calendar.getInstance().getTimeInMillis());\r\n String pplacaVehiculo = \"TX-101\";\r\n \r\n Reparacion preparacion = new Reparacion(pcodigo, pnombre,tipo,pfechaAsignacion,pplacaVehiculo);\r\n MultiReparacion instance = new MultiReparacion();\r\n instance.crear(pcodigo, pnombre, tipo, pfechaAsignacion, pplacaVehiculo);\r\n \r\n preparacion.setNombre(\"Arreglar retrovisores\");\r\n \r\n instance.actualizar(preparacion);\r\n Reparacion nueva = instance.buscar(pcodigo);\r\n \r\n assertEquals(nueva.getNombre(), \"Arreglar retrovisores\");\r\n // TODO review the generated test code and remove the default call to fail.\r\n //fail(\"The test case is a prototype.\");\r\n }", "@Test\n public void isJumpActionLegalFor()\n {\n // Setup.\n final CheckersGameInjector injector = new CheckersGameInjector();\n final List<Agent> agents = createAgents(injector);\n final Agent agentRed = agents.get(0);\n final Agent agentWhite = agents.get(1);\n final CheckersEnvironment environment = createEnvironment(injector, agents);\n {\n final CheckersMoveAction action = new CheckersMoveAction(environment, agentRed, CheckersPosition.P21,\n CheckersPosition.P17);\n action.doIt();\n }\n {\n final CheckersMoveAction action = new CheckersMoveAction(environment, agentWhite, CheckersPosition.P09,\n CheckersPosition.P14);\n action.doIt();\n }\n {\n final CheckersMoveAction action = new CheckersMoveAction(environment, agentRed, CheckersPosition.P22,\n CheckersPosition.P18);\n action.doIt();\n }\n final CheckersAdjudicator adjudicator = injector.injectAdjudicator();\n\n // Agent white can jump his token over a red token to an empty space.\n assertTrue(adjudicator.isJumpActionLegalFor(environment, CheckersTeam.WHITE, CheckersPosition.P14,\n CheckersPosition.P21));\n\n // Agent white cannot jump his token to an occupied space.\n assertFalse(adjudicator.isJumpActionLegalFor(environment, CheckersTeam.WHITE, CheckersPosition.P14,\n CheckersPosition.P23));\n\n // Agent white cannot jump his token to an adjacent empty space.\n assertFalse(adjudicator.isJumpActionLegalFor(environment, CheckersTeam.WHITE, CheckersPosition.P10,\n CheckersPosition.P15));\n\n // Agent white cannot jump his own token.\n assertFalse(adjudicator.isJumpActionLegalFor(environment, CheckersTeam.WHITE, CheckersPosition.P08,\n CheckersPosition.P15));\n }", "public static void run() {\n testAlgorithmOptimality();\n// BenchmarkGraphSets.testMapLoading();\n //testAgainstReferenceAlgorithm();\n //countTautPaths();\n// other();\n// testLOSScan();\n //testRPSScan();\n }", "public void testOperation();", "@Override\n public void runOpMode() {\n servo0 = hardwareMap.servo.get(\"servo0\");\n servo1 = hardwareMap.servo.get(\"servo1\");\n digital0 = hardwareMap.digitalChannel.get(\"digital0\");\n motor0 = hardwareMap.dcMotor.get(\"motor0\");\n motor1 = hardwareMap.dcMotor.get(\"motor1\");\n motor0B = hardwareMap.dcMotor.get(\"motor0B\");\n motor2 = hardwareMap.dcMotor.get(\"motor2\");\n blinkin = hardwareMap.get(RevBlinkinLedDriver.class, \"blinkin\");\n motor3 = hardwareMap.dcMotor.get(\"motor3\");\n park_assist = hardwareMap.dcMotor.get(\"motor3B\");\n\n if (digital0.getState()) {\n int_done = true;\n } else {\n int_done = false;\n }\n motor_stuff();\n waitForStart();\n if (opModeIsActive()) {\n while (opModeIsActive()) {\n lancher_position();\n slow_mode();\n drive_robot();\n foundation_grabber(1);\n launcher_drive();\n data_out();\n Pickingupblockled();\n lettingoutblockled();\n Forwardled();\n backwardled();\n Turnleftled();\n Turnrightled();\n Stationaryled();\n }\n }\n }", "public static void other() {\n // This is how to generate test data for the grid. (Use the VisibilityGraph algorithm to generate optimal path lengths)\n// ArrayList<Point> points = ReachableNodes.computeReachable(gridGraph, 5, 5);\n// System.out.println(points.size());\n//\n// generateRandomTestDataAndPrint(gridGraph);\n\n //This is how to conduct a running time / path length test for tha algorithm:\n// TestResult test1 = testAlgorithm(gridGraph, sx, sy, ex, ey, 1, 1);\n// System.out.println(test1);\n// TestResult test2 = testAlgorithm(gridGraph, sx, sy, ex, ey, 30, 25);\n// System.out.println(test2);\n }", "ComputerProxy(Computer computer) {\n this.computer = computer;\n //this.map = new ConcurrentHashMap<UUID, Task>();\n }", "@Test\n\tpublic void testRepeatibleDynamics() throws IOException, PropertiesException {\n\n\t\t\n\t\t// INSTANTIATE benchmark \n\t\tProperties props = PropertiesUtil.setpointProperties(new File (\"src/main/resources/sim.properties\"));\n\t\tSetPointGenerator lg = new SetPointGenerator (props);\n\t\tList<ExternalDriver> externalDrivers = new ArrayList<ExternalDriver>();\n\t\texternalDrivers.add(lg);\n\t\tIndustrialBenchmarkDynamics d = new IndustrialBenchmarkDynamics (props, externalDrivers);\n\t\tRandom actionRand = new Random(System.currentTimeMillis());\n \n // 1) do 100000 random steps, in order to initialize dynamics\n\t\tfinal ActionDelta action = new ActionDelta(0.001f, 0.001f, 0.001f); \n\t\tfor (int i=0; i<INIT_STEPS; i++) {\n\t\t\taction.setDeltaGain(2.f*(actionRand.nextFloat()-0.5f));\n\t\t\taction.setDeltaVelocity(2.f*(actionRand.nextFloat()-0.5f));\n\t\t\taction.setDeltaShift(2.f*(actionRand.nextFloat()-0.5f));\n\t\t\td.step(action);\n\t\t}\n\t\t\n\t\t// 2) memorize current observable state and current markov state\n\t\tfinal ObservableState os = d.getState();\n\t\tfinal DataVector ms = d.getInternalMarkovState();\n\t\tSystem.out.println (\"init o-state: \" + os.toString());\n\t\tSystem.out.println (\"init m-state: \" + ms.toString());\n\t\t\n\t\t\n\t\t// 3) perform test trajectory and memorize states\n\t\tactionRand.setSeed(ACTION_SEED);\n\t\tDataVector oStates[] = new DataVector[MEM_STEPS];\n\t\tDataVector mStates[] = new DataVector[MEM_STEPS];\n\t\t\t\t\n\t\tfor (int i=0; i<MEM_STEPS; i++) {\n\t\t\taction.setDeltaGain(2.f*(actionRand.nextFloat()-0.5f));\n\t\t\taction.setDeltaVelocity(2.f*(actionRand.nextFloat()-0.5f));\n\t\t\taction.setDeltaShift(2.f*(actionRand.nextFloat()-0.5f));\n\t\t\td.step(action);\n\t\t\toStates[i] = d.getState();\n\t\t\tmStates[i] = d.getInternalMarkovState();\n\t\t}\n\t\t\n\t\t// 4) reset dynamics & parameters and internal markov state\n\t\td.reset();\n\t\td.setInternalMarkovState(ms);\n\t\t\n\t\t// 5) reperform test and check if values are consistent\n\t\tactionRand.setSeed(ACTION_SEED); // reproduce action sequence\n\t\tDataVector oState = null;\n\t\tDataVector mState = null;\n\t\tfor (int i=0; i<MEM_STEPS; i++) {\n\t\t\taction.setDeltaGain(2.f*(actionRand.nextFloat()-0.5f));\n\t\t\taction.setDeltaVelocity(2.f*(actionRand.nextFloat()-0.5f));\n\t\t\taction.setDeltaShift(2.f*(actionRand.nextFloat()-0.5f));\n\t\t\t\n\t\t\td.step(action);\n\t\t\toState = d.getState();\n\t\t\tmState = d.getInternalMarkovState();\n\t\t\t\n\t\t\t// check observable state\n\t\t\tassertEquals (oStates[i].getValue(ObservableStateDescription.SetPoint), oState.getValue(ObservableStateDescription.SetPoint), 0.0001);\n\t\t\tassertEquals (oStates[i].getValue(ObservableStateDescription.Fatigue), oState.getValue(ObservableStateDescription.Fatigue), 0.0001);\n\t\t\tassertEquals (oStates[i].getValue(ObservableStateDescription.Consumption), oState.getValue(ObservableStateDescription.Consumption), 0.0001);\n\t\t\tassertEquals (oStates[i].getValue(ObservableStateDescription.RewardTotal), oState.getValue(ObservableStateDescription.RewardTotal), 0.0001);\n\n\t\t\t// \n\t\t\tassertEquals (mStates[i].getValue(MarkovianStateDescription.CurrentOperationalCost), mState.getValue(MarkovianStateDescription.CurrentOperationalCost), 0.0001);\n\t\t\tassertEquals (mStates[i].getValue(MarkovianStateDescription.FatigueLatent2), mState.getValue(MarkovianStateDescription.FatigueLatent2), 0.0001);\n\t\t\tassertEquals (mStates[i].getValue(MarkovianStateDescription.FatigueLatent1), mState.getValue(MarkovianStateDescription.FatigueLatent1), 0.0001);\n\n\t\t\tassertEquals (mStates[i].getValue(MarkovianStateDescription.EffectiveActionGainBeta), mState.getValue(MarkovianStateDescription.EffectiveActionGainBeta), 0.0001);\n\t\t\tassertEquals (mStates[i].getValue(MarkovianStateDescription.EffectiveActionVelocityAlpha), mState.getValue(MarkovianStateDescription.EffectiveActionVelocityAlpha), 0.0001);\n\t\t\tassertEquals (mStates[i].getValue(MarkovianStateDescription.EffectiveShift), mState.getValue(MarkovianStateDescription.EffectiveShift), 0.0001);\n\t\t\tassertEquals (mStates[i].getValue(MarkovianStateDescription.MisCalibration), mState.getValue(MarkovianStateDescription.MisCalibration), 0.0001);\n\t\t\t\n\t\t\tassertEquals (mStates[i].getValue(SetPointGeneratorStateDescription.SetPointChangeRatePerStep), mState.getValue(SetPointGeneratorStateDescription.SetPointChangeRatePerStep), 0.0001);\n\t\t\tassertEquals (mStates[i].getValue(SetPointGeneratorStateDescription.SetPointCurrentSteps), mState.getValue(SetPointGeneratorStateDescription.SetPointCurrentSteps), 0.0001);\n\t\t\tassertEquals (mStates[i].getValue(SetPointGeneratorStateDescription.SetPointLastSequenceSteps), mState.getValue(SetPointGeneratorStateDescription.SetPointLastSequenceSteps), 0.0001);\n\t\t\t\n\t\t\tassertEquals (mStates[i].getValue(MarkovianStateDescription.RewardFatigue), mState.getValue(MarkovianStateDescription.RewardFatigue), 0.0001);\n\t\t\tassertEquals (mStates[i].getValue(MarkovianStateDescription.RewardConsumption), mState.getValue(MarkovianStateDescription.RewardConsumption), 0.0001);\n\t\t}\n\t\t\n\t\tSystem.out.println (\"last o-state 1st trajectory: \" + oStates[oStates.length-1]);\n\t\tSystem.out.println (\"last o-state 2nd trajectory: \" + oState);\n\t\t\n\t\tSystem.out.println (\"last m-state 1st trajectory: \" + mStates[oStates.length-1]);\n\t\tSystem.out.println (\"last m-state 2nd trajectory: \" + mState);\n\t}", "private void mutateHelper() {\n\t\tsynchronized (this) {\n\t\t\tRandom rand = new Random();\n\t\t\tint mutateType = rand.nextInt(5);\n\t\t\tif (rules.size() >= 14) {\n\t\t\t\tmutateType = rand.nextInt(6);\n\t\t\t}\n\t\t\tint index = rand.nextInt(rules.size());\n\t\t\tMutation m = null;\n\t\t\tswitch (mutateType) {\n\t\t\tcase 0:\n\t\t\t\tm = MutationFactory.getDuplicate();\n\t\t\t\tm.addRules(rules.root);\n\t\t\t\tm.mutate(index);\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tm = MutationFactory.getInsert();\n\t\t\t\tm.addRules(rules.root);\n\t\t\t\tm.mutate(index);\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\tm = MutationFactory.getRemove();\n\t\t\t\tm.addRules(rules.root);\n\t\t\t\tm.mutate(index);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tm = MutationFactory.getReplace();\n\t\t\t\tm.addRules(rules.root);\n\t\t\t\tm.mutate(index);\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tm = MutationFactory.getSwap();\n\t\t\t\tm.addRules(rules.root);\n\t\t\t\tm.mutate(index);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tm = MutationFactory.getTransform();\n\t\t\t\tm.addRules(rules.root);\n\t\t\t\tm.mutate(index);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "@Test\n public void testValida() {\n System.out.println(\"valida\");\n Simulacao simulacao = new Simulacao();\n Material mat = new Material();\n mat.setCoeficienteConducao(0.5);\n mat.setCoeficienteConveccao(0.002);\n mat.setCoeficienteRadiacao(0.07);\n mat.setNome(\"Material XPTO\");\n mat.setDescricao(\"Descricao XPTO\");\n mat.setImagem(new BufferedImage(1, 1, BufferedImage.TYPE_INT_RGB));\n Sala sala = new Sala(20, 20, 20, 20, 20, 20, 20, 20, mat);\n simulacao.setSala(sala);\n\n AlterarTemperaturasMeioController instance = new AlterarTemperaturasMeioController(simulacao);\n boolean expResult = true;\n boolean result = instance.valida();\n assertEquals(expResult, result);\n }", "@Test\n\tpublic void test() {\n\t\t// CHECKSTYPE:OFF\n\n\t\t// Test the addPlayer(Player player) method\n\t\tPlayer player1 = new Player(\"Iris\");\n\t\tPlayer player2 = new Player(\"Emily\");\n\t\tPlayer player3 = new Player(\"Jason\");\n\t\tPlayer player4 = new Player(\"Rain\");\n\t\tPlayer player5 = new Player(\"Mandy\");\n\t\tscrabbleSystem.addPlayer(player1);\n\t\tscrabbleSystem.addPlayer(player2);\n\t\tscrabbleSystem.addPlayer(player3);\n\t\tscrabbleSystem.addPlayer(player4);\n\t\tscrabbleSystem.addPlayer(player5);\n\t\tList<Player> playersList = scrabbleSystem.getPlayers();\n\t\tassertEquals(4, playersList.size());\n\n\t\t// Test the startNewGame() method\n\t\t/**\n\t\t * The first Turn -- place some tiles on the board\n\t\t */\n\t\tscrabbleSystem.startNewGame();\n\t\tPlayer currentPlayer1 = scrabbleSystem.getCurrentPlayer();\n\t\tSystem.out.println(currentPlayer1.getName());\n\t\tassertEquals(7, currentPlayer1.getTileList().size());\n\t\tList<SpecialTile> specialStore = scrabbleSystem.getSpecialStore();\n\t\tassertEquals(5, specialStore.size());\n\t\tassertEquals(\"Boom\", specialStore.get(0).getName());\n\t\tassertEquals(\"NegativePoint\", specialStore.get(1).getName());\n\t\tassertEquals(\"RetrieveOrder\", specialStore.get(2).getName());\n\t\tassertEquals(\"ReverseOrder\", specialStore.get(3).getName());\n\t\tassertEquals(70, scrabbleSystem.getLetterBag().getNumber());\n\n\t\t// Test the playMove(Move move) method\n\t\tSquare square1 = scrabbleSystem.getBoard().getSquare(7, 7);\n\t\tSquare square2 = scrabbleSystem.getBoard().getSquare(8, 7);\n\t\tSquare square3 = scrabbleSystem.getBoard().getSquare(9, 7);\n\n\t\tTile tile1 = currentPlayer1.getTileList().get(0);\n\t\tTile tile2 = currentPlayer1.getTileList().get(1);\n\t\tTile tile3 = currentPlayer1.getTileList().get(2);\n\n\t\tint scoreSum1 = tile1.getValue() + tile2.getValue() + tile3.getValue();\n\t\t// The first Player\n\t\tMove move = scrabbleSystem.getMove();\n\t\tmove.addTile(square2, tile2);\n\t\tmove.addTile(square3, tile3);\n\n\t\tscrabbleSystem.playMove(move);\n\t\tassertEquals(7, currentPlayer1.getTileList().size());\n\t\tassertEquals(70, scrabbleSystem.getLetterBag().getNumber());\n\n\t\tmove.addTile(square1, tile1);\n\t\tscrabbleSystem.playMove(move);\n\t\tassertEquals(7, currentPlayer1.getTileList().size());\n\t\tassertEquals(67, scrabbleSystem.getLetterBag().getNumber());\n\n\t\tassertTrue(scrabbleSystem.getBoard().getSquare(7, 7).isOccuppied());\n\t\tassertTrue(scrabbleSystem.getBoard().getSquare(8, 7).isOccuppied());\n\t\tassertTrue(scrabbleSystem.getBoard().getSquare(9, 7).isOccuppied());\n\t\tassertFalse(scrabbleSystem.getBoard().getSquare(10, 7).isOccuppied());\n\t\tassertFalse(scrabbleSystem.isGameOver());\n\t\t// check player's score\n\t\tassertEquals(scoreSum1, currentPlayer1.getScore());\n\n\t\tPlayer challengePlayer1 = playersList.get(0);\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\tPlayer playerTmp = playersList.get(i);\n\t\t\tif (playerTmp != currentPlayer1) {\n\t\t\t\tchallengePlayer1 = playerTmp;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// if there is no player invoke a challenge\n\t\tscrabbleSystem.updateOrder();\n\n\t\t/**\n\t\t * The secord turn -- place some tiles on the board and challenges by\n\t\t * another player\n\t\t */\n\t\tPlayer currentPlayer2 = scrabbleSystem.getCurrentPlayer();\n\t\tassertNotEquals(currentPlayer1, currentPlayer2);\n\t\tSystem.out.println(currentPlayer1.getName());\n\t\tSystem.out.println(currentPlayer2.getName());\n\n\t\tSquare square4 = scrabbleSystem.getBoard().getSquare(8, 6);\n\t\tSquare square5 = scrabbleSystem.getBoard().getSquare(8, 8);\n\t\tSquare square6 = scrabbleSystem.getBoard().getSquare(8, 9);\n\t\tSquare square7 = scrabbleSystem.getBoard().getSquare(7, 8);\n\n\t\tTile tile4 = currentPlayer2.getTileList().get(0);\n\t\tTile tile5 = currentPlayer2.getTileList().get(1);\n\t\tTile tile6 = currentPlayer2.getTileList().get(2);\n\n\t\tMove move2 = scrabbleSystem.getMove();\n\t\tassertEquals(0, move2.getTileMap().size());\n\t\tmove2.addTile(square4, tile4);\n\t\tmove2.addTile(square5, tile5);\n\t\tmove2.addTile(square7, tile6);\n\t\t// check invalid move\n\t\tscrabbleSystem.playMove(move2);\n\n\t\t// check invalid move\n\t\tmove2.clearMove();\n\t\tmove2.addTile(square4, tile4);\n\t\tmove2.addTile(square6, tile6);\n\t\tscrabbleSystem.playMove(move2);\n\n\t\t// make valid move\n\t\tmove2.clearMove();\n\t\tmove2.addTile(square4, tile4);\n\t\tmove2.addTile(square5, tile5);\n\t\tmove2.addTile(square6, tile6);\n\t\tscrabbleSystem.playMove(move2);\n\n\t\tint scoreSum2 = tile2.getValue() + tile4.getValue() * 2 + tile5.getValue() * 2 + tile6.getValue();\n\t\tassertEquals(scoreSum2, currentPlayer2.getScore());\n\n\t\t// get the challenge player\n\t\tPlayer challengePlayer2 = playersList.get(0);\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\tPlayer playerTmp = playersList.get(i);\n\t\t\tif (playerTmp != currentPlayer1) {\n\t\t\t\tchallengePlayer2 = playerTmp;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tassertEquals(64, scrabbleSystem.getLetterBag().getNumber());\n\n\t\tscrabbleSystem.challenge(challengePlayer2);\n\t\tscrabbleSystem.updateOrder();\n\t\tassertEquals(67, scrabbleSystem.getLetterBag().getNumber());\n\t\tassertFalse(square4.isOccuppied());\n\t\tassertFalse(square5.isOccuppied());\n\t\tassertFalse(square6.isOccuppied());\n\n\t\t/**\n\t\t * The third turn -- buy a Boom special tile and pass this turn\n\t\t */\n\n\t\tPlayer currentPlayer3 = scrabbleSystem.getCurrentPlayer();\n\t\tMove move3 = scrabbleSystem.getMove();\n\t\tcurrentPlayer3.addScore(100);\n\t\tscrabbleSystem.buySpecialTile(\"Boom\");\n\t\tassertEquals(80, currentPlayer3.getScore());\n\n\t\tSquare square8 = scrabbleSystem.getBoard().getSquare(8, 8);\n\t\tSquare square9 = scrabbleSystem.getBoard().getSquare(9, 8);\n\t\tSquare square10 = scrabbleSystem.getBoard().getSquare(10, 8);\n\t\tSquare square11 = scrabbleSystem.getBoard().getSquare(10, 7);\n\n\t\tTile tile8 = currentPlayer3.getTileList().get(0);\n\t\tTile tile9 = currentPlayer3.getTileList().get(1);\n\t\tTile tile10 = currentPlayer3.getTileList().get(2);\n\t\tSpecialTile specialTile = currentPlayer3.getSpecialTiles().get(\"Boom\").get(0);\n\t\tmove3.addTile(square8, tile8);\n\t\tmove3.addTile(square9, tile9);\n\t\tmove3.addTile(square10, tile10);\n\t\tmove3.addSpecialTile(specialTile, square11);\n\n\t\tint scoreSum3 = 2 * tile8.getValue() + tile9.getValue() + tile10.getValue() + 2 * tile8.getValue()\n\t\t\t\t+ tile2.getValue() + tile3.getValue() + tile9.getValue() + 80;\n\t\tscrabbleSystem.playMove(move3);\n\t\tassertEquals(scoreSum3, currentPlayer3.getScore());\n\t\tscrabbleSystem.challenge(currentPlayer2);\n\t\tassertEquals(67, scrabbleSystem.getLetterBag().getNumber());\n\t\tassertTrue(square11.hasSpecialTile());\n\n\t\t/**\n\t\t * The fourth turn -- buy a NegativePoint special tile and place it on\n\t\t * the board\n\t\t */\n\t\tPlayer currentPlayer4 = scrabbleSystem.getCurrentPlayer();\n\t\tcurrentPlayer4.addScore(10);\n\t\tscrabbleSystem.buySpecialTile(\"NegativePoint\");\n\t\tassertEquals(1, currentPlayer4.getSpecialTiles().get(\"NegativePoint\").size());\n\n\t\tcurrentPlayer4.addScore(50);\n\t\tSystem.out.println(currentPlayer4.getScore());\n\t\tscrabbleSystem.buySpecialTile(\"NegativePoint\");\n\t\tint scoreSum4 = currentPlayer4.getScore();\n\n\t\tMove move4 = scrabbleSystem.getMove();\n\t\tSpecialTile specialTile2 = currentPlayer4.getSpecialTiles().get(\"NegativePoint\").get(0);\n\n\t\tSquare square12 = scrabbleSystem.getBoard().getSquare(11, 7);\n\t\tmove4.addSpecialTile(specialTile2, square12);\n\n\t\tscrabbleSystem.pass(move4);\n\t\tassertEquals(scoreSum4, currentPlayer4.getScore());\n\t\tassertTrue(square12.hasSpecialTile());\n\t\tassertEquals(1, currentPlayer4.getSpecialTiles().get(\"NegativePoint\").size());\n\n\t\t/**\n\t\t * The fifth turn -- invork the Boom and NegativePoint special tiles at\n\t\t * the same time\n\t\t */\n\t\tPlayer currentPlayer5 = scrabbleSystem.getCurrentPlayer();\n\t\tMove move5 = scrabbleSystem.getMove();\n\t\tSquare square13 = scrabbleSystem.getBoard().getSquare(10, 7);\n\t\tSquare square14 = scrabbleSystem.getBoard().getSquare(11, 7);\n\t\tSquare square15 = scrabbleSystem.getBoard().getSquare(12, 7);\n\t\tSquare square16 = scrabbleSystem.getBoard().getSquare(13, 7);\n\t\tSquare square17 = scrabbleSystem.getBoard().getSquare(14, 7);\n\n\t\tTile tile13 = currentPlayer5.getTileList().get(0);\n\t\tTile tile14 = currentPlayer5.getTileList().get(1);\n\t\tTile tile15 = currentPlayer5.getTileList().get(2);\n\t\tTile tile16 = currentPlayer5.getTileList().get(3);\n\t\tTile tile17 = currentPlayer5.getTileList().get(4);\n\n\t\tmove5.addTile(square13, tile13);\n\t\tmove5.addTile(square14, tile14);\n\t\tmove5.addTile(square15, tile15);\n\t\tmove5.addTile(square16, tile16);\n\t\tmove5.addTile(square17, tile17);\n\t\tscrabbleSystem.playMove(move5);\n\t\tassertFalse(square13.isOccuppied());\n\t\tassertFalse(square14.isOccuppied());\n\t\tassertFalse(square15.isOccuppied());\n\t\tassertFalse(square2.isOccuppied());\n\t\tassertFalse(square3.isOccuppied());\n\t\tassertTrue(square1.isOccuppied());\n\t\tscrabbleSystem.updateOrder();\n\n\t\tint scoreSum5 = scoreSum1 - 3 * (tile13.getValue() + tile14.getValue() + tile1.getValue());\n\t\tSystem.out.println(scoreSum5);\n\n\t\t/**\n\t\t * The sixth turn -- The player exchanges some tiles\n\t\t */\n\t\tPlayer currentPlayer6 = scrabbleSystem.getCurrentPlayer();\n\t\tList<Tile> tiles = new ArrayList<>();\n\t\tTile tile18 = currentPlayer6.getTileList().get(0);\n\t\tTile tile19 = currentPlayer6.getTileList().get(1);\n\t\tTile tile20 = currentPlayer6.getTileList().get(2);\n\t\ttiles.add(tile18);\n\t\ttiles.add(tile19);\n\t\ttiles.add(tile20);\n\t\tscrabbleSystem.exchangeTile(tiles);\n\t\tassertEquals(7, currentPlayer6.getTileList().size());\n\n\t\t/**\n\t\t * Get winner\n\t\t */\n\n\t\tList<Player> playersWinner = scrabbleSystem.getWinner();\n\t\tassertEquals(currentPlayer3.getName(), playersWinner.get(0).getName());\n\t}", "public static Turing_Machine initialiseMachine() {\n\t\tnew FenetreCreation();\n\t\ttry {\n\t\t\tbarrier.await();\n\t\t} catch (Exception e) {\n\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\te.getMessage(), \"Erreur\", JOptionPane.ERROR_MESSAGE);\n\t\t\treturn null;\n\t\t}\n\t\tTuring_Machine tmp = machine;\n\t\tmachine = null;\n\t\treturn tmp;\n\t}", "@Test\r\n public void testTransferMetalInfo() {\r\n System.out.println(\"transferMetalInfo - Table have records\");\r\n List<Vector> result = KnowledgeSystemBeanInterface.transferMetalInfo();\r\n assertEquals(result.size(), 15);\r\n System.out.println(\"testTransferMetalInfo ---------------------------------------------------- Done\");\r\n }", "@Override \n public void runOpMode() \n {\n leftMotors = hardwareMap.get(DcMotor.class, \"left_Motors\");\n rightMotors = hardwareMap.get(DcMotor.class, \"right_Motors\");\n vLiftMotor = hardwareMap.get(DcMotor.class, \"vLift_Motor\"); \n \n leftMotors.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n rightMotors.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n leftMotors.setDirection(DcMotor.Direction.REVERSE);\n rightMotors.setDirection(DcMotor.Direction.FORWARD);\n vLiftMotor.setDirection(DcMotor.Direction.REVERSE);\n vLiftMotor.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n \n waitForStart(); //press play button, actives opMode\n intakePivotServo.setPosition(intakePivotServoPos);\n while (opModeIsActive()) \n { \n drive();\n pivotIntake();\n pivotLift();\n \n }//opModeIsActive \n \n }", "@Test public void testClickWithSomeTablets() throws Exception {\n int first=toUnsignedInt(myInetAddress.getAddress()[3]);\n // maybe make first 101?\n int n=32;\n Group group=new Group(first,first+n-1,true);\n p(group.toString());\n ArrayList<Main> mains=new ArrayList<>();\n for(int i=0;i<n;i++) {\n int myService=group.serviceBase+first+i;\n Main main=new Main(defaultProperties,group,Model.mark1.clone(),myService);\n mains.add(main);\n Tablet tablet=main.instance();\n main.myInetAddress=myInetAddress;\n tablet.startListening();\n }\n Main m1=mains.get(0);\n m1.instance().click(1);\n Thread.sleep(100);\n for(Main main:mains)\n p(\"model: \"+main.model);\n for(Main main:mains)\n assertTrue(main.model.state(1));\n for(Main main:mains) {\n Tablet tablet=main.instance();\n tablet.stopListening();\n }\n }", "public boolean setUnit(Unit u) //this method is for creating new units or called from territories move unit method\r\n {\r\n//\t\tSystem.out.println(\"Set unit called \" + u);\r\n \tTile old = u.getTile();\r\n boolean test = false;\r\n if(u != null) //this line is mostly useless now but i'm keeping it.\r\n {\r\n \tif(!(u instanceof Capital))\r\n \t{\r\n \t\tif(!(u instanceof Castle))\r\n \t\t{\r\n\t \t\tif(u.canMove())\r\n\t \t\t{\r\n\t\t\t if(Driver.currentPlayer.equals(player))\r\n\t\t\t {\r\n\t\t\t if(hasUnit())\r\n\t\t\t {\r\n\t\t\t if(u instanceof Peasant)\r\n\t\t\t {\r\n\t\t\t \tif(!(unit instanceof Capital) && !(unit instanceof Castle))\r\n\t\t\t \t{\r\n\t\t\t\t int curProtect = unit.getStrength();\r\n\t\t\t\t switch(curProtect) //for upgrading with a peasant.\r\n\t\t\t\t {\r\n\t\t\t\t case 1: newUnitTest(old, u);\r\n\t\t\t\t unit = new Spearman(this);\r\n\t\t\t\t unit.move(false);\r\n\t\t\t\t setAdjacentProtection();\r\n\t\t\t\t test = true;\r\n\t\t\t\t break;\r\n\t\t\t\t case 2: newUnitTest(old, u);\r\n\t\t\t\t unit = new Knight(this);\r\n\t\t\t\t unit.move(false);;\r\n\t\t\t\t setAdjacentProtection();\r\n\t\t\t\t test = true;\r\n\t\t\t\t break;\r\n\t\t\t\t case 3:\t\tnewUnitTest(old, u);\r\n\t\t\t\t unit = new Baron(this);\r\n\t\t\t\t unit.move(false);\r\n\t\t\t\t setAdjacentProtection();\r\n\t\t\t\t test = true;\r\n\t\t\t\t break;\r\n\t\t\t\t default:\r\n\t\t\t\t \t//possibly put a noise or alert here\r\n\t\t\t\t// \t\tAlert a = new Alert(AlertType.WARNING);\r\n\t\t\t\t// \t\ta.setTitle(\"Warning\"); \r\n\t\t\t\t \t\ttest = false;\r\n\t\t\t\t }\r\n\t\t\t \t}\r\n\t\t\t \telse\r\n\t\t\t \t{\r\n\t\t\t \t\t//play a noise or something\r\n\t\t\t \t}\r\n\t\t\t\t }\r\n\t\t\t\t else\r\n\t\t\t\t {\r\n\t\t\t\t \t//possibly put a noise or sumting.\r\n\t\t\t\t }\r\n\t\t\t\t }\r\n\t\t\t\t else\r\n\t\t\t\t {\r\n\t\t\t\t \tnewUnitTest(old, u);\r\n\t\t\t\t unit = u;\r\n\t\t\t\t u.setTile(this);\r\n\t\t\t\t setAdjacentProtection();\r\n\t\t\t\t test = true;\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t\t\t else\r\n\t\t\t\t {\r\n\t\t\t\t \t//As of now the only time that this case (setting unit to enemy tile) is used is when called by territories move unit method.\r\n\t\t\t\t \t\t//This means that when you build a new unit (in this case a peasant) you have to put them on your territory before moving them to another players tile.\r\n\t\t\t\t \t\tif(old != null)\r\n\t\t\t\t \t\t{\r\n\t\t\t\t \t\t\tunit = u;\r\n\t\t\t\t \t\t\tu.setTile(this);\r\n\t\t\t\t setAdjacentProtection();\r\n\t\t\t\t test = true;\r\n\t\t\t\t \t\t}\r\n\t\t\t\t \t\telse\r\n\t\t\t\t \t\t{\r\n\t\t\t\t \t\t\t//maybe make a noise or something\r\n\t\t\t\t \t\t}\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\t//maybe play a noise or something\r\n\t \t\t}\r\n \t\t}\r\n \t\telse\r\n \t\t{\r\n \t\t\tif(!hasUnit())\r\n \t\t\t{\r\n\t \t\t\tunit = u;\r\n\t u.setTile(this);\r\n\t setAdjacentProtection();\r\n\t test = true;\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n \telse\r\n \t{\r\n \t\tunit = u;\r\n u.setTile(this);\r\n setAdjacentProtection();\r\n test = true;\r\n \t}\r\n } \r\n\t return test;\r\n\t \r\n}", "@Test\n\t/*\n\t * Checking Stalemate by \n\t * deleteing all pieces of Player 2 except 1 pawn but keeping it trapped.\n\t * Moving the King of Player 2 to such a positon that it can make more than 1 movements.\n\t * here we are using the Queen of Player 1 to achieve that situation.\n\t * In this case its not a stalemate as the king can move.\n\t */\n\tvoid testCheckStalemateWhenKingCanMove() {\n\t\tm_oBoard.getPositionAgent(\"a8\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"b8\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"c8\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"d8\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"j8\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"k8\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"l8\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"a7\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"c7\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"d7\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"i7\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"j7\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"k7\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"l7\").getPiece().setPosition(null);\n\n\t\tm_oBoard.getPositionAgent(\"a8\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"b8\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"c8\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"d8\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"j8\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"k8\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"l8\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"a7\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"c7\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"d7\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"i7\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"j7\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"k7\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"l7\").setPiece(null);\n\t\t\t\t\n\t\t// Setting Player 1 Pawn from b2 to b4\n\t\tIPositionAgent oSourcePositionOfPawnWhite = m_oBoard.getPositionAgent(\"b2\");\n\t\tIPositionAgent oDestinationPositionOfPawnWhite = m_oBoard.getPositionAgent(\"b4\");\n\t\t\n\t\tIRuleAgent oRulepawnWhite= (IRuleAgent)m_oBoardFactory.createRule();\t\t\n\t\toRulepawnWhite.getRuleData().setRuleType(RuleType.MOVE);\n\t\toRulepawnWhite.getRuleData().setDirection(Direction.EDGE);\n\t\toRulepawnWhite.getRuleData().setMaxRecurrenceCount(Integer.MAX_VALUE);\n\t\toRulepawnWhite.getRuleData().setFile(File.SAME);\n\t\toRulepawnWhite.getRuleData().setRank(Rank.FORWARD);\n\t\toRulepawnWhite.getRuleData().setFamily(Family.IGNORE);\n\t\toRulepawnWhite.getRuleData().setManoeuvreStrategy(Manoeuvre.FILE_AND_RANK);\n\t\toRulepawnWhite.getRuleData().setName(\"MOVE\");\n\t\toRulepawnWhite.getRuleData().setCustomName(\"\");\n\t\t\n\t\tIMoveCandidate oMoveCandidatePawnWhite = new MoveCandidate(oRulepawnWhite, oSourcePositionOfPawnWhite.getPiece(), oSourcePositionOfPawnWhite, oDestinationPositionOfPawnWhite);\n\t\tm_oRuleEngine.tryExecuteRule(m_oBoard, oMoveCandidatePawnWhite);\n\t\t\n\t\t// Setting Player 2 Pawn from b7 to b5\n\t\tIPositionAgent oSourcePositionOfPawnBlack = m_oBoard.getPositionAgent(\"b7\");\n\t\tIPositionAgent oDestinationPositionOfPawnBlack = m_oBoard.getPositionAgent(\"b5\");\n\t\t\n\t\tIRuleAgent oRulepawnBlack= (IRuleAgent)m_oBoardFactory.createRule();\t\t\n\t\toRulepawnBlack.getRuleData().setRuleType(RuleType.MOVE);\n\t\toRulepawnBlack.getRuleData().setDirection(Direction.EDGE);\n\t\toRulepawnBlack.getRuleData().setMaxRecurrenceCount(Integer.MAX_VALUE);\n\t\toRulepawnBlack.getRuleData().setFile(File.SAME);\n\t\toRulepawnBlack.getRuleData().setRank(Rank.FORWARD);\n\t\toRulepawnBlack.getRuleData().setFamily(Family.IGNORE);\n\t\toRulepawnBlack.getRuleData().setManoeuvreStrategy(Manoeuvre.FILE_AND_RANK);\n\t\toRulepawnBlack.getRuleData().setName(\"MOVE\");\n\t\toRulepawnBlack.getRuleData().setCustomName(\"\");\n\t\t\n\t\tIMoveCandidate oMoveCandidatePawnBlack = new MoveCandidate(oRulepawnWhite, oSourcePositionOfPawnBlack.getPiece(), oSourcePositionOfPawnBlack, oDestinationPositionOfPawnBlack);\n\t\tm_oRuleEngine.tryExecuteRule(m_oBoard, oMoveCandidatePawnBlack);\n\t\t\t\t\n\t\t// Setting Player 2 king from i8 to l8\n\t\tIPositionAgent oSourcePositionOfKing = m_oBoard.getPositionAgent(\"i8\");\n\t\tIPositionAgent oDestinationPositionOfKing = m_oBoard.getPositionAgent(\"l8\");\n\t\t\n\t\tIRuleAgent oRuleKing= (IRuleAgent)m_oBoardFactory.createRule();\t\t\n\t\toRuleKing.getRuleData().setRuleType(RuleType.MOVE);\n\t\toRuleKing.getRuleData().setDirection(Direction.EDGE);\n\t\toRuleKing.getRuleData().setMaxRecurrenceCount(Integer.MAX_VALUE);\n\t\toRuleKing.getRuleData().setFile(File.SAME);\n\t\toRuleKing.getRuleData().setRank(Rank.FORWARD);\n\t\toRuleKing.getRuleData().setFamily(Family.IGNORE);\n\t\toRuleKing.getRuleData().setManoeuvreStrategy(Manoeuvre.FILE_AND_RANK);\n\t\toRuleKing.getRuleData().setName(\"MOVE\");\n\t\toRuleKing.getRuleData().setCustomName(\"\");\n\t\t\n\t\tIMoveCandidate oMoveCandidateKing = new MoveCandidate(oRuleKing, oSourcePositionOfKing.getPiece(), oSourcePositionOfKing, oDestinationPositionOfKing);\n\t\tm_oRuleEngine.tryExecuteRule(m_oBoard, oMoveCandidateKing);\n\t\t\n\t\t// Setting Player 1 queen from d1 to k5\n\t\tIPositionAgent oSourcePositionOfQueen = m_oBoard.getPositionAgent(\"d1\");\n\t\tIPositionAgent oDestinationPositionOfQueen = m_oBoard.getPositionAgent(\"k5\");\n\t\t\n\t\tIRuleAgent oRuleQueen= (IRuleAgent)m_oBoardFactory.createRule();\t\t\n\t\toRuleQueen.getRuleData().setRuleType(RuleType.MOVE);\n\t\toRuleQueen.getRuleData().setDirection(Direction.VERTEX);\n\t\toRuleQueen.getRuleData().setMaxRecurrenceCount(Integer.MAX_VALUE);\n\t\toRuleQueen.getRuleData().setFile(File.SAME);\n\t\toRuleQueen.getRuleData().setRank(Rank.FORWARD);\n\t\toRuleQueen.getRuleData().setFamily(Family.IGNORE);\n\t\toRuleQueen.getRuleData().setManoeuvreStrategy(Manoeuvre.FILE_AND_RANK);\n\t\toRuleQueen.getRuleData().setName(\"MOVE\");\n\t\toRuleQueen.getRuleData().setCustomName(\"\");\n\t\t\n\t\tIMoveCandidate oMoveCandidateQueen = new MoveCandidate(oRuleQueen, oSourcePositionOfQueen.getPiece(), oSourcePositionOfQueen, oDestinationPositionOfQueen);\n\t\tm_oRuleEngine.tryExecuteRule(m_oBoard, oMoveCandidateQueen);\n\t\t\n\t\tBoolean bExpected = false;\n\t\tBoolean bActual = m_oRuleProcessor.checkStalemate(m_oBoard, oDestinationPositionOfKing.getPiece().getPlayer());\n\n\t\tassertEquals(bExpected, bActual);\n\t\t\n\t}", "public EstacionDeTren(String nombreCiudad,int precioMaquina1,int precioMaquina2)\n {\n ciudad = nombreCiudad;\n maquina1 = new TicketMachine(precioMaquina1);\n maquina2 = new TicketMachine(precioMaquina2);\n }", "public void test_LoginToSystem2(){\n\t\tfor (int i=0; i<5; i++) {\n\t\t\tLogin l = new Login();\n\t\t\tl.LoginToSystem(\"TBONCI\", \"TEST\");\n\t\t\tassertFalse(l.GetSuccessfulLogin());\n\t\t}\n\t}", "@Override\r\n public void runTests() {\r\n getTemperature();\r\n }", "@Test\n public void testCanJump() {\n world.add(new Location(2, 2), jumper);\n world.add(new Location(0, 2), rock);\n assertEquals(false, jumper.canJump());\n jumper.turn();\n world.add(new Location(0, 4), flower);\n assertEquals(true, jumper.canJump());\n jumper.jump();\n assertEquals(false, jumper.canJump());\n jumper.turn();\n jumper.turn();\n jumper.turn();\n world.add(new Location(2, 4), jumper2); \n assertEquals(false, jumper.canJump());\n jumper.turn();\n world.add(new Location(2, 2), bug);\n assertEquals(false, jumper.canJump());\n }", "@Test \r\n\t\r\n\tpublic void ataqueDeMagoSinMagia(){\r\n\t\tPersonaje perso=new Humano();\r\n\t\tEspecialidad mago=new Hechicero();\r\n\t\tperso.setCasta(mago);\r\n\t\tperso.bonificacionDeCasta();\r\n\t\t\r\n\t\tPersonaje enemigo=new Orco();\r\n\t\tEspecialidad guerrero=new Guerrero();\r\n\t\tenemigo.setCasta(guerrero);\r\n\t\tenemigo.bonificacionDeCasta();\r\n\t\t\r\n\t\tAssert.assertEquals(50,perso.getCasta().getMagia());\r\n\t\tAssert.assertEquals(7,perso.getFuerza());\r\n\t\tAssert.assertEquals(44,perso.getEnergia());\r\n\t\tAssert.assertEquals(17,perso.calcularPuntosDeAtaque());\r\n\t\t\r\n\t\t//ataque normal\r\n\t\tperso.atacar(enemigo);\r\n\t\t\r\n\t\tAssert.assertEquals(50,perso.getCasta().getMagia());\r\n\t\tAssert.assertEquals(7,perso.getFuerza());\r\n\t\tAssert.assertEquals(32,perso.getEnergia());\r\n\t\tAssert.assertEquals(17,perso.calcularPuntosDeAtaque());\r\n\t\t\r\n\t\t// utilizar hechizo\r\n\t\tperso.getCasta().getHechicero().agregarHechizo(\"Engorgio\", new Engorgio());\r\n\t\tperso.getCasta().getHechicero().hechizar(\"Engorgio\",enemigo);\r\n\t\t\r\n\t\tAssert.assertEquals(20,perso.getCasta().getMagia());\r\n\t\tAssert.assertEquals(7,perso.getFuerza());\r\n\t\tAssert.assertEquals(32,perso.getEnergia());\r\n\t\tAssert.assertEquals(17,perso.calcularPuntosDeAtaque());\r\n\t}", "public static void main( String[] args )\n {\n //usage: move bar below down 1 line at a time to test functionality...\n\n Slots machine01 = new Slots();\n Slots machine02 = new Slots();\n\n //test to verify slot machines function indepently\n\n System.out.println( \"Machine01 initial state:\\t\" + machine01 );\n System.out.println( \"Machine02 initial state:\\t\" + machine02 );\n\n System.out.println( \"\\nSpinning machine01...\\n\" );\n\n machine01.spinOnce();\n\n System.out.println();\n System.out.println( \"Machine01 state:\\t\" + machine01 );\n System.out.println( \"Machine02 state:\\t\" + machine02 );\n System.out.println();\n\n\n //test gamble-until-you-win mechanism\n\n System.out.println( \"Preparing to spin until a mini win! . . .\" );\n System.out.println( \"------------------------------------\" );\n\n //if you haven't won, spin again until you win!\n while( machine01.miniWin() == false ) {\n System.out.println( \"Your spin...\" + \"\\t\" + machine01 );\n System.out.println( \"LOSE\\n\" );\n machine01.spinOnce();\n }\n\n System.out.println( \"====================================\" );\n System.out.println( \"Your spin...\" + \"\\t\" + machine01 );\n System.out.println( \"WIN\\n\" );\n\n\n\n System.out.println( \"Preparing to spin until...jackpot! . . .\" );\n System.out.println( \"------------------------------------\" );\n\n\n //if you haven't won, spin again until you win!\n int x = 0;\n while( machine01.jackpot() == false ) {\n\t System.out.println( \"Your spin...\" + \"\\t\" + machine01 );\n\t System.out.println( \"LOSE\\n\" );\n\t machine01.spinOnce();\n\t x += 1;\n }\n \n System.out.println( \"====================================\" );\n System.out.println( \"Your spin...\" + \"\\t\" + machine01 );\n System.out.println( \"JACKPOT!\\n\" );\n System.out.println(\"Number of tries: \" + x);\n \n }", "@Test\n public void testLocateManager() {\n System.out.println(\"locateManager\");\n int x = 0;\n int y = 0; \n //instance.locateManager(x, y);\n \n }", "public void train ()\t{\t}", "@Test(timeout=2000) public void testMovesToReach(){\r\n GameStateSpace states = new GameStateSpace(this.initial);\r\n // For every target state based on the initial game look at a\r\n // target and calculate the moves to reach it\r\n for(int target=0; target<this.targetGameMoves.size(); target++){\r\n GameAndMoves gm = this.targetGameMoves.get(target);\r\n ZombieTrapGame targetGame = gm.game;\r\n List<String> expectMoves = gm.moves;\r\n List<String> actualMoves = states.movesToReach(targetGame);\r\n StringBuilder sb = new StringBuilder(this.name+\"\\n\");\r\n sb.append(\"TARGET GAME NUMBER \"+target+\"\\n\");\r\n \r\n // Check if the moves are equal to the expectation\r\n if(expectMoves==null && actualMoves==null){\r\n continue;\r\n }\r\n else if(expectMoves !=null && expectMoves.equals(actualMoves)){\r\n continue;\r\n }\r\n else if(expectMoves!=null && actualMoves==null){\r\n sb.append(\"State misidentified as NOT reachable\\n\");\r\n sb.append(String.format(\"Expect sequence: %s\\n\",expectMoves));\r\n sb.append(String.format(\"Actual sequence: %s\\n\",actualMoves));\r\n sb.append(String.format(\"Target Game:\\n%s\",targetGame));\r\n sb.append(this.toString());\r\n appendAllStates(states, sb);\r\n fail(sb.toString());\r\n }\r\n\r\n // ALREADY THERE\r\n // If equal length do they produce the correct board: could be\r\n // alternate paths to the same state\r\n ZombieTrapGame game = this.initial.copy();\r\n for(String move : actualMoves){\r\n doShift(game,move);\r\n }\r\n\r\n // ADD THIS CODE to fix a bug in the original test cases\r\n if(expectMoves==null && actualMoves!=null){\r\n sb.append(\"State misidentified as IS reachable\\n\");\r\n sb.append(String.format(\"Expect sequence: %s\\n\",expectMoves));\r\n sb.append(String.format(\"Actual sequence: %s\\n\",actualMoves));\r\n sb.append(String.format(\"Target Game:\\n%s\",targetGame));\r\n sb.append(String.format(\"Actual End Game:\\n%s\",game));\r\n sb.append(this.toString());\r\n appendAllStates(states, sb);\r\n fail(sb.toString());\r\n }\r\n\r\n // ALREADY THERE\r\n if(!game.equals(targetGame)){ // Moves don't lead to target state\r\n sb.append(\"Actual move sequence does not lead to target state\\n\");\r\n sb.append(String.format(\"Expect sequence (length %s): %s\\n\",expectMoves.size(),expectMoves));\r\n sb.append(String.format(\"Target Game:\\n%s\",targetGame));\r\n sb.append(String.format(\"Actual sequence (length %s): %s\\n\",actualMoves.size(),actualMoves));\r\n sb.append(String.format(\"Actual End Game:\\n%s\",game));\r\n } \r\n // Different path but same length, not an error\r\n else if(actualMoves.size() == expectMoves.size()){\r\n continue;\r\n }\r\n // Check if the moves are longer than the expected\r\n else if(actualMoves.size() > expectMoves.size()){\r\n sb.append(\"Actual move sequence is longer than the expected move sequence\\n\");\r\n sb.append(String.format(\"Expect sequence (length %s): %s\\n\",expectMoves.size(),expectMoves));\r\n sb.append(String.format(\"Actual sequence (length %s): %s\\n\",actualMoves.size(),actualMoves));\r\n sb.append(String.format(\"Target Game:\\n%s\",targetGame));\r\n }\r\n // A shorter path!?\r\n else {\r\n sb.append(\"Actual move sequence is SHORTER than the expected move sequence\\n\");\r\n sb.append(\"YOU HAVE DISCOVERED A BUG IN THE TEST CASES: NOTIFY THE COURSE INSTRUCTOR\\n\");\r\n sb.append(String.format(\"Expect sequence (length %s): %s\\n\",expectMoves.size(),expectMoves));\r\n sb.append(String.format(\"Actual sequence (length %s): %s\\n\",actualMoves.size(),actualMoves));\r\n sb.append(String.format(\"Target Game:\\n%s\",targetGame));\r\n }\r\n sb.append(this.toString());\r\n appendAllStates(states, sb);\r\n fail(sb.toString());\r\n }\r\n }", "public void runOpMode() {\n leftBackDrive = hardwareMap.get(DcMotor.class, \"left_back_drive\"); //port 0, hub1\n rightBackDrive = hardwareMap.get(DcMotor.class, \"right_back_drive\"); //port 1, hub1\n leftFrontDrive = hardwareMap.get(DcMotor.class, \"left_front_drive\"); //port 2, hub1\n rightFrontDrive = hardwareMap.get(DcMotor.class, \"right_front_drive\"); //port 3, hub1\n craneExtend = hardwareMap.get(DcMotor.class, \"craneExtend\"); //port 0, hub2\n cranePitch = hardwareMap.get(DcMotor.class, \"cranePitch\"); //port 1, hub2\n craneElevate = hardwareMap.get(DcMotor.class, \"craneElevate\"); //port 2, hub2\n fakeMotor = hardwareMap.get(DcMotor.class, \"fakeMotor\"); //port 2, hub3\n craneGrab = hardwareMap.get(Servo.class, \"craneGrab\"); //port 0, servo\n craneGrabAttitude = hardwareMap.get(Servo.class, \"craneGrabAttitude\"); //port 2, servo\n trayGrab = hardwareMap.get(Servo.class, \"trayGrab\"); //port 1, servo\n flipperLeft = hardwareMap.get(Servo.class, \"flipperLeft\"); //port 3. servo\n flipperRight = hardwareMap.get(Servo.class, \"flipperRight\"); //port 4, servo\n \n //Setting the motor directions\n leftBackDrive.setDirection(DcMotor.Direction.FORWARD);\n rightBackDrive.setDirection(DcMotor.Direction.REVERSE);\n leftFrontDrive.setDirection(DcMotor.Direction.FORWARD);\n rightFrontDrive.setDirection(DcMotor.Direction.REVERSE);\n\n //Initializing variables\n \n telemetry.addData(\"Status\", \"Initialized\");\n telemetry.update(); //Done initalizing\n\n //Wait for the game to start (driver presses PLAY)\n waitForStart();\n runtime.reset();\n\n //run until the end of the match (driver presses STOP)\n while (opModeIsActive()) {\n \n//******************************************************************************\n\n //Drive controls\n if (gamepad1.left_trigger>0 || gamepad1.right_trigger>0) { //Crab\n leftBackDrive.setPower(gamepad1.left_stick_x*0.8);\n rightBackDrive.setPower(-gamepad1.left_stick_x*0.8);\n leftFrontDrive.setPower(-gamepad1.left_stick_x*0.8);\n rightFrontDrive.setPower(gamepad1.left_stick_x*0.8);\n }\n\n else { //Tank\n leftBackDrive.setPower(-gamepad1.left_stick_x);\n rightBackDrive.setPower(-gamepad1.right_stick_x);\n leftFrontDrive.setPower(-gamepad1.left_stick_x);\n rightFrontDrive.setPower(-gamepad1.right_stick_x);\n }\n }\n \n//******************************************************************************\n\n //Crane control\n \n \n//******************************************************************************\n\n //Telemetry display\n telemetry.addData(\"Run Time:\", \"\" + runtime.toString());\n telemetry.addData(\"Motor Power\", \"L (%.2f), R (%.2f)\", gamepad1.left_stick_y, gamepad1.right_stick_y);\n telemetry.update();\n }", "void mutate() {\r\n\t\tif (Math.random() < TSP.p_mutate) {\r\n\t\t\t// randomly flip two cities\r\n\t\t\trndSwapTwo();\r\n\t\t\tthis.distance = distance();\r\n\t\t}\r\n\t}", "@Test\n\t/*\n\t * Checking Stalemate by \n\t * deleteing all pieces of Player 2 except 1 pawn but keeping it trapped.\n\t * Moving the King of Player 2 to such a positon that its not a check but cannot move.\n\t * here we are using the Queen of Player 1 to achieve that situation.\n\t */\n\tvoid testCheckStalemate() {\n\t\tm_oBoard.getPositionAgent(\"a8\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"b8\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"c8\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"d8\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"j8\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"k8\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"l8\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"a7\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"c7\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"d7\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"i7\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"j7\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"k7\").getPiece().setPosition(null);\n\t\tm_oBoard.getPositionAgent(\"l7\").getPiece().setPosition(null);\n\n\t\tm_oBoard.getPositionAgent(\"a8\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"b8\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"c8\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"d8\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"j8\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"k8\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"l8\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"a7\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"c7\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"d7\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"i7\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"j7\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"k7\").setPiece(null);\n\t\tm_oBoard.getPositionAgent(\"l7\").setPiece(null);\n\t\t\t\t\n\t\t// Setting Player 1 Pawn from b2 to b4\n\t\tIPositionAgent oSourcePositionOfPawnWhite = m_oBoard.getPositionAgent(\"b2\");\n\t\tIPositionAgent oDestinationPositionOfPawnWhite = m_oBoard.getPositionAgent(\"b4\");\n\t\t\n\t\tIRuleAgent oRulepawnWhite= (IRuleAgent)m_oBoardFactory.createRule();\t\t\n\t\toRulepawnWhite.getRuleData().setRuleType(RuleType.MOVE);\n\t\toRulepawnWhite.getRuleData().setDirection(Direction.EDGE);\n\t\toRulepawnWhite.getRuleData().setMaxRecurrenceCount(Integer.MAX_VALUE);\n\t\toRulepawnWhite.getRuleData().setFile(File.SAME);\n\t\toRulepawnWhite.getRuleData().setRank(Rank.FORWARD);\n\t\toRulepawnWhite.getRuleData().setFamily(Family.IGNORE);\n\t\toRulepawnWhite.getRuleData().setManoeuvreStrategy(Manoeuvre.FILE_AND_RANK);\n\t\toRulepawnWhite.getRuleData().setName(\"MOVE\");\n\t\toRulepawnWhite.getRuleData().setCustomName(\"\");\n\t\t\n\t\tIMoveCandidate oMoveCandidatePawnWhite = new MoveCandidate(oRulepawnWhite, oSourcePositionOfPawnWhite.getPiece(), oSourcePositionOfPawnWhite, oDestinationPositionOfPawnWhite);\n\t\tm_oRuleEngine.tryExecuteRule(m_oBoard, oMoveCandidatePawnWhite);\n\t\t\n\t\t// Setting Player 2 Pawn from b7 to b5\n\t\tIPositionAgent oSourcePositionOfPawnBlack = m_oBoard.getPositionAgent(\"b7\");\n\t\tIPositionAgent oDestinationPositionOfPawnBlack = m_oBoard.getPositionAgent(\"b5\");\n\t\t\n\t\tIRuleAgent oRulepawnBlack= (IRuleAgent)m_oBoardFactory.createRule();\t\t\n\t\toRulepawnBlack.getRuleData().setRuleType(RuleType.MOVE);\n\t\toRulepawnBlack.getRuleData().setDirection(Direction.EDGE);\n\t\toRulepawnBlack.getRuleData().setMaxRecurrenceCount(Integer.MAX_VALUE);\n\t\toRulepawnBlack.getRuleData().setFile(File.SAME);\n\t\toRulepawnBlack.getRuleData().setRank(Rank.FORWARD);\n\t\toRulepawnBlack.getRuleData().setFamily(Family.IGNORE);\n\t\toRulepawnBlack.getRuleData().setManoeuvreStrategy(Manoeuvre.FILE_AND_RANK);\n\t\toRulepawnBlack.getRuleData().setName(\"MOVE\");\n\t\toRulepawnBlack.getRuleData().setCustomName(\"\");\n\t\t\n\t\tIMoveCandidate oMoveCandidatePawnBlack = new MoveCandidate(oRulepawnWhite, oSourcePositionOfPawnBlack.getPiece(), oSourcePositionOfPawnBlack, oDestinationPositionOfPawnBlack);\n\t\tm_oRuleEngine.tryExecuteRule(m_oBoard, oMoveCandidatePawnBlack);\n\t\t\t\t\n\t\t// Setting Player 2 king from i8 to l8\n\t\tIPositionAgent oSourcePositionOfKing = m_oBoard.getPositionAgent(\"i8\");\n\t\tIPositionAgent oDestinationPositionOfKing = m_oBoard.getPositionAgent(\"l8\");\n\t\t\n\t\tIRuleAgent oRuleKing= (IRuleAgent)m_oBoardFactory.createRule();\t\t\n\t\toRuleKing.getRuleData().setRuleType(RuleType.MOVE);\n\t\toRuleKing.getRuleData().setDirection(Direction.EDGE);\n\t\toRuleKing.getRuleData().setMaxRecurrenceCount(Integer.MAX_VALUE);\n\t\toRuleKing.getRuleData().setFile(File.SAME);\n\t\toRuleKing.getRuleData().setRank(Rank.FORWARD);\n\t\toRuleKing.getRuleData().setFamily(Family.IGNORE);\n\t\toRuleKing.getRuleData().setManoeuvreStrategy(Manoeuvre.FILE_AND_RANK);\n\t\toRuleKing.getRuleData().setName(\"MOVE\");\n\t\toRuleKing.getRuleData().setCustomName(\"\");\n\t\t\n\t\tIMoveCandidate oMoveCandidateKing = new MoveCandidate(oRuleKing, oSourcePositionOfKing.getPiece(), oSourcePositionOfKing, oDestinationPositionOfKing);\n\t\tm_oRuleEngine.tryExecuteRule(m_oBoard, oMoveCandidateKing);\n\t\t\n\t\t// Setting Player 1 queen from d1 to j7\n\t\tIPositionAgent oSourcePositionOfQueen = m_oBoard.getPositionAgent(\"d1\");\n\t\tIPositionAgent oDestinationPositionOfQueen = m_oBoard.getPositionAgent(\"j7\");\n\t\t\n\t\tIRuleAgent oRuleQueen= (IRuleAgent)m_oBoardFactory.createRule();\t\t\n\t\toRuleQueen.getRuleData().setRuleType(RuleType.MOVE);\n\t\toRuleQueen.getRuleData().setDirection(Direction.VERTEX);\n\t\toRuleQueen.getRuleData().setMaxRecurrenceCount(Integer.MAX_VALUE);\n\t\toRuleQueen.getRuleData().setFile(File.SAME);\n\t\toRuleQueen.getRuleData().setRank(Rank.FORWARD);\n\t\toRuleQueen.getRuleData().setFamily(Family.IGNORE);\n\t\toRuleQueen.getRuleData().setManoeuvreStrategy(Manoeuvre.FILE_AND_RANK);\n\t\toRuleQueen.getRuleData().setName(\"MOVE\");\n\t\toRuleQueen.getRuleData().setCustomName(\"\");\n\t\t\n\t\tIMoveCandidate oMoveCandidateQueen = new MoveCandidate(oRuleQueen, oSourcePositionOfQueen.getPiece(), oSourcePositionOfQueen, oDestinationPositionOfQueen);\n\t\tm_oRuleEngine.tryExecuteRule(m_oBoard, oMoveCandidateQueen);\n\t\t\n\t\tBoolean bExpected = true;\n\t\tBoolean bActual = m_oRuleProcessor.checkStalemate(m_oBoard, oDestinationPositionOfKing.getPiece().getPlayer());\n\n\t\tassertEquals(bExpected, bActual);\n\t\t\n\t}", "@Test\n public void testGiveChange() throws Exception {\n System.out.println(\"giveChange\");\n //CashRegister instance = new CashRegister();\n assertEquals(0.0, instance.giveChange(), EPSILON);\n instance.scanItem(0.55);\n instance.scanItem(1.27);\n double expResult = 0.18;\n instance.collectPayment(Money.QUARTER, 8);\n double result = instance.giveChange();\n assertEquals(expResult, result, EPSILON);\n \n }", "@Test(timeout=60000)\n\tpublic void testEscenarioBase() {\n\n\t\tcb= new CyclicBarrier(21);\n\t\tprincipal(3, 5, 2, 10); \n\t\tExecutorService executor = Executors.newFixedThreadPool(21);\t\t \n\t\tfor ( int i = 0; i < totalEmpleados; i++ ){\n\t\t\tTelefono c =new Telefono( dispatcher,cb,1);\n\t\t\texecutor.execute(c);\n\t\t}\n\t\tfor ( int i = 0; i < totalClientes; i++ ){\n\t\t\tCliente p= new Cliente(dispatcher,cb,1);\n\t\t\texecutor.execute(p);\n\t\t}\n\n\t\ttry {\n\t\t\tcb.await();\n\t\t\tcb.await();\n\t\t\tassertEquals(0, dispatcher.getnProductores());\n\t\t\tassertEquals(0, dispatcher.getLLamadas().size());\n\n\t\t} catch (BrokenBarrierException e) {\n\t\t\te.printStackTrace();\n\t\t}catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "@Test(timeout = 4000)\n public void test029() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n int int0 = homeEnvironment0.getLightColor();\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(13684944, int0);\n assertEquals(0.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(11053224, homeEnvironment0.getGroundColor());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n assertEquals(13427964, homeEnvironment0.getSkyColor());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n }", "public abstract void mo20900UP();", "@Test\n public void mainFlowTest() {\n type.insert();\n engineer.insert();\n\n Equipment equipment1 = new Equipment(\"equipment1\", type.getId(), model, location, installTime1);\n Equipment equipment2 = new Equipment(\"equipment2\", type.getId(), model, location, installTime2);\n equipment1.insert();\n equipment2.insert();\n\n Plan plan1 = new Plan(\"plan1\", type.getId(), 30, \"large\", \"checking\");\n Plan plan2 = new Plan(\"plan2\", type.getId(), 60, \"small\", \"repairing\");\n plan1.insert();\n plan2.insert();\n\n Record record1 = new Record(\"r1\", plan1.getId(), equipment1.getId(), engineer.getId(),\n DateUtils.getCalendar(2015, 11, 1).getTime(), 2, \"换过滤网\");\n Record record2 = new Record(\"r2\", plan2.getId(), equipment1.getId(), engineer.getId(),\n DateUtils.getCalendar(2015, 11, 31).getTime(), 1, \"发动机清理\");\n Record record3 = new Record(\"r3\", plan1.getId(), equipment2.getId(), engineer.getId(),\n DateUtils.getCalendar(2015, 11, 5).getTime(), 3, \"cleaning\");\n Record record4 = new Record(\"r4\", plan2.getId(), equipment2.getId(), engineer.getId(),\n DateUtils.getCalendar(2016, 0, 4).getTime(), 2, \"tiny repairing\");\n record1.insert();\n record2.insert();\n record3.insert();\n record4.insert();\n\n // test the correctness of 10 days tasks\n List<Task> tenDayTasks = MaintenanceOperation.getTenDaysTask(DateUtils.getCalendar(2015, 11, 30).getTime());\n assertEquals(\"wrong with 10 days' tasks\", 2, tenDayTasks.size());\n\n // test the total maintenance time\n int time1 = MaintenanceOperation.getTotalMaintenanceTime(equipment1.getId());\n assertEquals(\"wrong with total time of equipment 1\", 3, time1);\n int time2 = MaintenanceOperation.getTotalMaintenanceTime(equipment2.getId());\n assertEquals(\"wrong with total time of equipment 2\", 5, time2);\n\n // test the total maintenance time of certain type\n int time3 = MaintenanceOperation.getTotalMaintenanceTime(equipment1, plan1.getId());\n assertEquals(\"wrong with total time of equipment 1 of plan 1\", 2, time3);\n int time4 = MaintenanceOperation.getTotalMaintenanceTime(equipment1, plan2.getId());\n assertEquals(\"wrong with total time of equipment 1 of plan 1\", 1, time4);\n int time5 = MaintenanceOperation.getTotalMaintenanceTime(equipment2, plan1.getId());\n assertEquals(\"wrong with total time of equipment 1 of plan 1\", 3, time5);\n int time6 = MaintenanceOperation.getTotalMaintenanceTime(equipment2, plan2.getId());\n assertEquals(\"wrong with total time of equipment 1 of plan 1\", 2, time6);\n }", "@Test\n\tpublic void testCanEnter(){\n\t}", "@Test\n public void testModulo0() {\n MainPanel mp = new MainPanel();\n ProgramArea pa = new ProgramArea();\n ProgramStack ps = new ProgramStack();\n\n ps.push(10);\n ps.push(5);\n\n ProgramExecutor pe = new ProgramExecutor(mp, ps, pa);\n\n pe.modulo();\n\n Assert.assertEquals(0, ps.pop());\n }" ]
[ "0.63402915", "0.6177766", "0.6049223", "0.6041955", "0.5890267", "0.58635277", "0.586025", "0.5817327", "0.5786649", "0.57827413", "0.5767501", "0.5715634", "0.57084167", "0.56022", "0.5596156", "0.5550086", "0.5532278", "0.55060554", "0.54941505", "0.5483332", "0.5480219", "0.5451428", "0.54345757", "0.5425278", "0.5418911", "0.5386172", "0.538035", "0.5377071", "0.5376604", "0.5373315", "0.53657556", "0.5354082", "0.5342207", "0.53357697", "0.5335593", "0.53313696", "0.5315843", "0.53124154", "0.5311731", "0.53078026", "0.5302911", "0.5302737", "0.5283981", "0.52825636", "0.52718085", "0.5268583", "0.5260643", "0.52586347", "0.5253283", "0.52406883", "0.5237159", "0.5236826", "0.523219", "0.5225267", "0.5224712", "0.52214736", "0.52198875", "0.52194387", "0.5218285", "0.5212253", "0.5208382", "0.52070975", "0.5202546", "0.51953864", "0.51947564", "0.51941377", "0.5189816", "0.5182226", "0.51729757", "0.51691574", "0.5169085", "0.5157191", "0.5155253", "0.51517886", "0.5150653", "0.5142103", "0.51365703", "0.51342374", "0.51328605", "0.51314396", "0.5129014", "0.5124631", "0.51244944", "0.51206374", "0.51116025", "0.5108916", "0.5108701", "0.5106926", "0.5106851", "0.5105098", "0.5104488", "0.5104101", "0.510325", "0.5102214", "0.50949407", "0.5092957", "0.5089149", "0.5087911", "0.50846153", "0.50844693", "0.508288" ]
0.0
-1
Printing unique values from String array
public static void main(String[] args) { String [] array = {"A", "A", "B", "C", "C"}; for (int j = 0; j < array.length; j++) { int count = 0; for (int i = 0; i < array.length; i++) { if (array[i].equals(array[j])) count++; } if (count == 1) System.out.print(array[j] + " "); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n System.out.print(unique(new int[]{100, 11, 34, 11, 52, 61, 1, 34}));\n // should print: `[1, 11, 34, 52, 61]`\n\n\n }", "public static void main(String[] args) {\n int[] listOfNumbers = {1, 11, 34, 11, 52, 61, 1, 34};\n System.out.println(Arrays.toString(unique(listOfNumbers)));\n // should print: `[1, 11, 34, 52, 61]`\n\n\n }", "static void FindDuplicate(String[] strArray){\n\t\t\n\t\tHashSet<String> set = new HashSet<String>();\n\t\t\n\t\tfor(String arrayElement : strArray){\n\t\t\tif(!set.add(arrayElement))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Duplicate Element is: \"+ arrayElement);\n\t\t\t}\n\t\t}\n\t}", "public static String[] unique(String[] strArray) {\n List<String> unique = new ArrayList<String>();\n for (int i = 0; i < strArray.length; i++) {\n if (unique.contains(strArray[i])) continue;\n unique.add(strArray[i]);\n }\n return (String[]) unique.toArray(new String[0]);\n }", "public static void printDistinctElement(int arr[]) {\r\n\t\tSet<Integer> set = new HashSet<>();\r\n\t\tfor(int num : arr){\r\n\t\t\tif(set.add(num)){\r\n\t\t\t\tSystem.out.print(num + \" \");\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\n\t\tList<Integer> arrList = Arrays.asList(10,30,40,20,40,60,50,40,80,90,50);\n\t\t\n\t\tCollections.sort(arrList);\n\t\t//Remove duplicate from integer array using distinct method\n\t\tarrList.stream().distinct().collect(Collectors.toList()).forEach(System.out::println);\n\t\t\n\t\tString[] arrayString = {\"stack\",\"google\",\"insolution\",\"isg\",\"stack\",\"google\",\"stack\",\"disk\",\"danger\"};\n\t\t\n\t List<String> stringList = Arrays.asList(arrayString);\n\n\t //Removing duplicate from list of string\n\t stringList.stream().distinct().sorted().forEach(System.out::println);\n\t \n\t String str = \"aaabcdaabbeeecccddd\";\n\t \n\t //Converting string to charcter stream object\n\t Stream<Character> streamChar = str.chars().mapToObj(val -> (char) val);\n\t \n\t //Remove duplicate charcter from string using java 8\n\t streamChar.distinct().forEach(System.out::println);\n\t}", "void ifUnique(char inputCharArray[])\n\t{\n\t\tint count=0;\n\t\t\n\t\tfor(int i=0; i<inputCharArray.length; i++)\n\t\t{\n\t\t\t//int ab = (int)inputCharArray[i]; \n\t\t\tchar ab = inputCharArray[i];\n\t\t\tfor (int j=0; j<i; j++)\n\t\t\t{\n\t\t\t\tif(ab==inputCharArray[j])\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"String not unique!\");\n\t\t\t\t\tcount = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tfor (int j=i+1; j<inputCharArray.length; j++)\n\t\t\t{\n\t\t\t\tif(ab==inputCharArray[j])\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"String not unique!\");\n\t\t\t\t\tcount = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (count==1)\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\tif (count==0)\n\t\t{\n\t\t\tSystem.out.print(\"String unique!\");\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tSystem.out.println(\"enter few strings [space in betweeen] \");\n\t\tString s1 = sc.nextLine();\n\t\tString testSA [] = s1.split(\" \");\n\t\t\n\t\tString resSA [] = uniquStrings(testSA);\n\t\t\n\tSystem.out.println(\"the unique strings \" );\n\tfor(String str:resSA)\n\t\tSystem.out.println(str);\n\n\t}", "public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tInteger[] numbers = new Integer[] {1, 73, 12, - 5, 73, 8, - 5, 1, 12};\n\t\n\t\tSet<Integer> equalNumbers = new HashSet<Integer>();\n\t\tSet<Integer> uniqueNumbers = new HashSet<Integer>();\n\t\tString uniqueNumber = \"\";\n\t\t\n\t\tfor (int i = 0; i < numbers.length; i++) {\n\t\t\tfor (int j = i + 1; j < numbers.length; j++) {\n\t\t\tif (numbers[i] == numbers[j]) {\n\t\t\t\tif (!equalNumbers.contains(numbers[j])) {\n\t\t\t\t\tequalNumbers.add(numbers[j]);\t// 1, -5, 73, 12,\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (!uniqueNumbers.contains(numbers[j]))\n\t\t\t\tuniqueNumbers.add(numbers[j]);\t // 1, -5, 8, 73, 12, \t\t\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t\tfor (Integer number : equalNumbers) {\n\t\t\tSystem.out.print(number.toString() + \", \"); // 1, -5, 73, 12,\n\t\t}\t\n\t\tSystem.out.println();\t\t\n\t\tfor (Integer number : uniqueNumbers) {\n\t\t\tSystem.out.print(number.toString() + \", \"); // 1, -5, 8, 73, 12, \n\t\t} \n\t\t\n\t\tfor (Integer number : uniqueNumbers) {\n\t\t\tif (!equalNumbers.contains(number)) {\n\t\t\t\tuniqueNumber += number;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println();\t\n System.out.println(\"The uniqie number is : \" + uniqueNumber);\n\t}", "public static void main(String[] args) {\n String[] strings = new String[100];\n for (int i = 0; i < strings.length; i++) {\n strings[i] = randomStrings(2);\n }\n// for (String s : strings) {\n// System.out.println(s);\n// }\n ArrayList<String> appeared = new ArrayList<>();\n for (String s : strings) {\n if (!appeared.contains(s)) {\n appeared.add(s);\n }\n }\n System.out.println(appeared.size());\n\n }", "public static void main (String[]args){\n String[] test = {\"1, 3, 4, 7, 13\", \"1, 2, 4, 13, 15\"};\n Stream<String> testStrings = Arrays.stream(test);\n testStrings.map(s -> s.split(\",\"))\n .flatMap(Arrays::stream).distinct()\n .collect(Collectors.toList())\n .forEach(System.out::print);\n //FindIntersection(test);\n //System.out.println(LongWord(test));\n\n }", "private static String[] transformToUnique(final String... input) {\n final Set<String> inputSet = new HashSet<>(Arrays.asList(input));\n return inputSet.toArray(new String[0]);\n }", "private void display(int[] array) {\n\t\tfor(int unique: array) {\n\t\t\tSystem.out.println(unique);\n\t\t}\n\t}", "public static void main(String[] args) {\n String str = \"abcDaaafmOO\";\n String uniques = \"\";//lets use string str to find unique characters\n // int count = frequency(str,'a');//return type is int, therefore assign to int variable\n // System.out.println(count);//print the frequency of char 'a'\n//This step is use to identify if the character is unique, let's use loop for this\n for (char each : str.toCharArray()){\n // char ch = str.charAt(i); //to get char as a data type\n int count = frequency(str, each);\n //this is a frequency\n if(count == 1){//if count is equal to 1, concat it to unique variable\n uniques += each;\n }\n }\n System.out.println(\"unique values are: \"+uniques);\n System.out.println(\"========================\");\n String str2 = \"ppppoifugggggsxL\";\n String uniques2 = uniques(str2);\n System.out.println(\"unique values are: \"+uniques2);\n }", "public static void main(String[] args) {\n int[] arr={1,2,2,2,3,4,4,45}; // 1 3 45\n int[] array={};\n int j=0;\n for (int each:arr){\n int count=0;\n for (int i = 0; i <arr.length ; i++) {\n if (each==arr[i]){\n count++;\n }\n }\n if (count==1){\n System.out.println(each+\" \");\n // array[j++]=each;\n }\n }\n System.out.println(Arrays.toString(array));\n }", "public static int unique(String[] a) {\n\t\treturn unique(a,0,a.length);\n\t}", "public static String[] set(String[] strArray) {\n return unique(strArray);\n }", "public static void main(String[] args) {\n String s1 = \"ShivaniKashyap\";\n char[] chararray = s1.toCharArray();\n LinkedHashSet set = new LinkedHashSet();\n LinkedHashSet newset = new LinkedHashSet();\n for(int i=0;i<chararray.length;i++)\n {\n if( !set.add(chararray[i]))\n {\n newset.add(chararray[i]);\n\n }\n\n }\n System.out.println(newset);\n }", "public static void main(String[] args) {\n\t\tint a[] = {4,4,4,5,5,5,6,6,6,9};\n\t\t\n\t\tArrayList<Integer> ab = new ArrayList<Integer>();\n\t\t\n\t\tfor(int i=0; i<a.length; i++)\n\t\t{\n\t\t\tint k =0;\n\t\t\tif(!ab.contains(a[i]))\n\t\t\t{\n\t\t\t\tab.add(a[i]);\n\t\t\t\tk++;\n\t\t\t\tfor(int j=i+1; j<a.length; j++)\n\t\t\t\t{\n\t\t\t\t\tif(a[i]==a[j])\n\t\t\t\t\t{\n\t\t\t\t\t\tk++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//System.out.println(a[i]);\n\t\t\t//System.out.println(k);\n\t\t\tif(k==1)\n\t\t\t\tSystem.out.println(a[i] +\" is unique number \");\n\t\t}\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tString[] niz = { \"abc\",\"bcd\",\"efg\",\"ijk\",\"lmn\",\"abc\",\"bcd\"};\n\n\t\tfor(int i=0;i<niz.length-1;i++) {\n\t\t\tfor(int j=i+1;j<niz.length;j++) {\n\t\t\t\tif(niz[i]== niz[j] && (i !=j)) { // moze ici i ovako if( (my_array[i].equals(my_array[j])) && (i != j) )\n\t\t\t\t\tSystem.out.println(\"dupli elementi su : \" + niz[j]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tboolean unique=true;\n\t\tString str=\"sami\";\n\t\tchar[] chars= str.toCharArray();\n\t\tArrays.sort(chars);\n\t\t\n\t\tfor(int i=0;i<=chars.length-2;i++){\n\t\t\t\n\t\t\tif(chars[i]==chars[i+1]){\n\t\t\t\tSystem.out.println(\"Not unique chracters\");\n\t\t\t\tunique=false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t if(unique){\n\t \t System.out.println(\" unique chracters\");\n\t }\n\n\t}", "public static void main(String[] args) {\r\n Scanner sc= new Scanner(System.in);\r\n int n = sc.nextInt();\r\n int[] arr = new int[n];\r\n //getting all the numbers\r\n for(int i=0;i<n;i++)\r\n arr[i]=sc.nextInt();\r\n //assigning 0th element as unique\r\n int unique=0;\r\n unique=arr[0];\r\n for(int i=1;i<arr.length;i++)\r\n {\r\n unique^=arr[i];\r\n }\r\n System.out.println(unique);\r\n\r\n\t}", "private void checkDuplicates(String[] array) {\n\t\tfor (int j =0;j<array.length;j++)\n\t\t for (int k=j+1;k<array.length;k++)\n\t\t if (array[j].endsWith(array[k])){\n\t\t \tSystem.out.println(array[j] + array[k]);\n\t\t }\n\t}", "public static String[] unique(String[] strings) {\n Set set = new HashSet();\n for (int i=0; i<strings.length; i++) {\n String name = strings[i].toLowerCase();\n set.add(name);\n }\n return (String[])set.toArray(new String[0]);\n }", "public static void main(String[] args) {\n\n String[] array = {\"AAA\", \"BBB\", \"ABA\", \"ABB\", \"AAA\", \"ABB\", \"ABB\"};\n\n\n for (\n int i = 0;\n i < array.length - 1; i++)\n {\n for (int j = i + 1; j < array.length; j++) {\n\n if ((array[i].equals(array[j])) && (i != j)) {\n System.out.println(\"Дублирующийся элемент \" + array[j]);\n }\n }\n }\n }", "public static void main(String[] args) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tint arr[] = {2,4,6,7,8,4};\r\n\t\tSystem.out.println(isUnique(arr) ? \"Girls\" : \"Boys\");\r\n//\t\tSystem.out.println(isUnique(arr) ? \"Boys\" : \"Girls\");\r\n\t}", "String getUnique();", "public static void main(String[] args) {\n\t\tString s = \"caaab\";\n\t\tString[] res = getUniqueSubstring(s,2);\n\t\tfor(String a : res){\n\t\t\tSystem.out.println(a);\n\t\t}\n\t}", "private void printNonDuplicates( Collection< String > collection )\r\n {\r\n // create a HashSet \r\n Set< String > set = new HashSet< String >( collection ); \r\n\r\n System.out.println( \"\\nNonduplicates are: \" );\r\n\r\n for ( String s : set )\r\n System.out.printf( \"%s \", s );\r\n\r\n System.out.println();\r\n }", "public static void main(String[] args) {\n int a[]={1,2,3,4,4,3,2,6,6,9,9,6,7,4,7};\n\n ArrayList<Integer> al= new ArrayList<Integer>();\n\n for (int i =0;i<a.length;i++){\n int k=0;\n if (!al.contains(a[i])){\n al.add(a[i]);\n k++;\n\n for (int j=0;j<a.length;j++){\n if(a[i]==a[j]){\n k++;\n }\n }\n System.out.println(\"The number \"+ a[i] +\"repeats \"+ k+\" number of times.\");\n if (1==k)\n System.out.println(a[i]+ \" is the unique number.\");\n }\n\n\n }\n\n\n\n }", "public static void main(String[] args) {\n\t\tScanner sc =new Scanner(System.in);\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"-----array duplicate remover------\");\n\t\t//System.out.println(\"Enter the Elements of string \");\n\t\tint ar1[]= {12,33,11,23,4,11,12,11,52,52};\n\t\t\n\t/*\tfor (int i = 0; i < ar1.length; i++) {\n\t\t\tar1[i]=Integer.parseInt(sc.nextLine());\n\t\t} */\n\t\tint n=ar1.length;\n\t\tsc.close();\n\t\tArrays.sort(ar1);\n\t\t\n\t\tSystem.out.println(\"output array\");\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\n\t\t\tif(ar1[i]==ar1[i+1]) {\n\t\t\t\t//System.out.println();\n\t\t\t\t//System.out.println(ar1[i]);\n\t\t\t\tfor (int j = i; j < ar1.length-1; j++) {\n\t\t\t\t\tar1[j]=ar1[j+1];\n\t\t\t\t\t//System.out.println(ar1[j]);\n\t\t\t\t}\n\t\t\t\ti--;\n\t\t\t\tn--;\n\t\t\t}\n\t\t\t\n\t\t\t}\n\t\tSystem.out.println();\n\t\tSystem.out.println();\n\t\tfor (int i = 0; i < n+1; i++) {\n\t\t\tSystem.out.println(ar1[i]);\n\t\t}\n\t\t}", "public static void main(String[] args) {\n\t\tint a[] = { 1, 2, 3, 6, 7, 8, 2, 3 };\r\n\r\n\t\tSystem.out.println(\"The Duplicates in the array is: \");\r\n\t\t\r\n\t\t//1 1\r\n\r\n\t\tfor (int i = 0; i < a.length; i++) {\r\n\t\t\tfor (int j=i+1; j < a.length; j++) {\r\n\t\t\t\tif (a[i] == a[j]) {\r\n\t\t\t\t\tSystem.out.println(a[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "Set<String> getUniqueCharacterStrings();", "public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tint[] A={0,1,2,2,2,3,4};\n\t\tSystem.out.println(removeDuplicates(A));\n\t\tfor(int i=0;i<A.length;i++){\n\t\t\tSystem.out.print(A[i]);\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tList<String> arrayList = new ArrayList<String>();\n\t\tarrayList.add(\"张三\");\n\t\tarrayList.add(\"李四\");\n\t\tarrayList.add(\"王五\");\n\t\tarrayList.add(\"张三\");\n\t\tarrayList.add(\"aaa\");\n\t\tarrayList.add(\"aaa\");\n\t\tarrayList.add(\"bbb\");\n\t\tfor (int i = 0; i < arrayList.size(); i++) {\n\t\t\tfor (int j = i+1; j < arrayList.size(); j++) {\n\t\t\t\tif(arrayList.get(i).equals(arrayList.get(j))) {\n\t\t\t\t\tarrayList.remove(j);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (Iterator iterator = arrayList.iterator(); iterator.hasNext();) {\n\t\t\tString string = (String) iterator.next();\n\t\t\tSystem.out.println(string);\n\t\t}\n\t}", "private static Set<String> m23475a(String[] strArr) {\n if (strArr == null || strArr.length == 0) {\n return Collections.emptySet();\n }\n HashSet hashSet = new HashSet(strArr.length);\n for (String str : strArr) {\n hashSet.add(str);\n }\n return hashSet;\n }", "private void printNonDuplicates( Collection< String > collection )\r\n {\r\n \t // create a HashSet using a collection as parameter\r\n \t Set< String > set = new HashSet< String >( collection );\r\n \t System.out.println( \"Nonduplicates are: \" );\r\n \t for ( String s : set )\r\n \t\t System.out.printf( \"%s \", s );\r\n \t System.out.println();\r\n \t }", "public static void main(String[] args) {\n\t\tArrayList<String> arrayListWithDups = new ArrayList<String>();\n\n\t\tarrayListWithDups.add(\"nonie\");\n\t\tarrayListWithDups.add(\"test\");\n\t\tarrayListWithDups.add(\"中中中\");\n\t\tarrayListWithDups.add(\"test\");\n\t\tarrayListWithDups.add(\"nonie\");\n\t\tarrayListWithDups.add(null);\n\t\tarrayListWithDups.add(\"中中中\");\n\t\tarrayListWithDups.add(\"homework\");\n\t\tarrayListWithDups.add(null);\n\n\t\t// Printing listWithDuplicateElements\n\t\tSystem.out.print(\"Input:\");\n\t\tSystem.out.println(arrayListWithDups);\n\n\t\t// Constructing HashSet using listWithDuplicateElements\n\t\tHashSet<String> removeDups = new HashSet<String>(arrayListWithDups);\n\n\t\t// Constructing listWithoutDuplicateElements using set\n\t\tArrayList<String> arrayListNoDups = new ArrayList<String>(removeDups);\n\n\t\t// Printing listWithoutDuplicateElements\n\t\tSystem.out.print(\"Ouput: \");\n\t\tSystem.out.println(arrayListNoDups);\n\t}", "public static String uniques(String str){\n String uniques = \"\";//lets use string str to find unique characters\n // int count = frequency(str,'a');//return type is int, therefore assign to int variable\n // System.out.println(count);//print the frequency of char 'a'\n//This step is use to identify if the character is unique, let's use loop for this\n for (char each : str.toCharArray()){\n // char ch = str.charAt(i); //to get char as a data type\n int count = frequency(str, each);\n //this is a frequency\n if(count == 1){//if count is equal to 1, concat it to unique variable\n uniques += each;\n }\n }\n return uniques;\n\n }", "public static void main(String[] args) {\nint arr[]= {4,3,4,5,6,77,77,2,4,9,2};\nint uniqueelem=arr.length;\n//int arrclean[]=new int[arr.length];\nfor(int i=0;i<uniqueelem;i++)\n{\n\tfor(int j=i+1;j<uniqueelem;j++)\n\t{\n\t\tif(arr[i]==arr[j])\n\t\t{\n\t\t\t\n\t\t\tarr[j]=arr[uniqueelem-1];\n\t\t\tuniqueelem--;\n\t\t\tj--;\n\t\t}\n\t}\n}\n\nint arrclean[]=Arrays.copyOf(arr, uniqueelem);\n\nSystem.out.println(Arrays.toString(arrclean));\n\t}", "public SetTest()\r\n {\r\n List< String > list = Arrays.asList( colors );\r\n System.out.printf( \"ArrayList: %s\\n\", list );\r\n printNonDuplicates( list );\r\n }", "public static boolean uniqueStringUsingArray(String str) {\n boolean[] boolArray = new boolean[256];\n for (int i = 0; i < str.length(); i++) {\n int val = str.charAt(i);\n if (boolArray[val]) {\n return false;\n }\n boolArray[val] = true;\n }\n return true;\n }", "public static List<String> getRepetitiveElements(String[] array)\n {\n if (array == null) return null;\n\n // variable -> each index maps to a linkedlist containing the values\n List<Integer>[] hashMap = new ArrayList[array.length];\n List<String> duplicateSet = new ArrayList<>();\n int index;\n int n = array.length;\n String curString;\n for (int i = 0; i < array.length; i++) {\n curString = array[i];\n index = curString.hashCode()%n;\n if (hashMap[index] == null) {\n hashMap[index]=new ArrayList<>(); // store the i index\n hashMap[index].add(i); // put in i within the arrayList\n } else { // index is not null\n List<Integer> matchingIndice = hashMap[index];\n boolean hit = false;\n for (Integer mi: matchingIndice) {\n if (array[mi].compareTo(curString)==0) {\n // collision, and the string matches, we are happy\n if (!duplicateSet.contains(curString)) { // this is O(m) where m is # of duplicate strings in the set\n duplicateSet.add(curString);// found duplicate string\n }\n hit = true;\n break; // exit -> found a match\n }\n }\n if (!hit) {\n matchingIndice.add(i); // put i into the linkedlist\n hashMap[index] = matchingIndice;\n }\n }\n }\n\n return duplicateSet;\n }", "public static void main(String[] args)throws IOException {\n int n = 5; //Integer.parseInt(rd.readLine());\n// String str[] = rd.readLine().split(\" \");\n// int arr[] = new int[n];\n// for(int i=0; i<n; i++){\n// arr[i] = Integer.parseInt(str[i]);\n// }\n int arr[] = {1, 3, 2, 1, 2};\n int freq = 0;\n Arrays.sort(arr);\n for(int i=0; i<n-1; i++){\n if(arr[i] != arr[i+1]){\n freq++;\n break;\n }\n i++;\n }\n if(freq==0) {\n System.out.println(arr[n-1]); //the unique no is tha last no\n }\n else{\n System.out.println(freq); //unique no is somewhere in between\n }\n }", "public static void getNonRepeatedNumbres(int[] arr )\r\n\t{\n\t\tSet<Integer> set=find(arr);\t\r\n\t\t//If size of set >=1 then there are few integers which are Non Repeated \r\n\t\tif(set.size()>=1)\r\n\t\t{\r\n\t\t\t//Printing those every Integers in set \r\n\t\t\tSystem.out.println(\"Non Repeated Integers are=\");\r\n\t\t\tfor(Integer i:set)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\t//If set.size==0, Then there are no Integers Which are Non Repeated..............\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"There are no repeated numbers in a given array\");\r\n\t\t}\r\n\t}", "public static String[] uniqueElements(int field, Record[] r){\r\n\r\n\r\n\r\n\t\tStack<String> unique = new Stack<String>(); \t\t//stack which will hold the elements\r\n\r\n\r\n\t\tRecord[] copy = r; \t\t\t\t\t\t\t\t//input array is copied\r\n\r\n\t\tRecord.heapSort(r, field); \t\t\t\t\t\t\t//array is then sorted according to field argument\r\n\r\n\r\n\t\tfor(int i = 0; i < copy.length; i++){\r\n\r\n\r\n\t\t\tif(i == 0){unique.push(copy[i].getData()[field]);} \t\t\t\t\t\t//first element is always unique --> push into stack\r\n\t\t\telse if(copy[i].getData()[field].equals(copy[i-1].getData()[field])); \t//ignore if duplicate element is found\r\n\t\t\telse{unique.push(copy[i].getData()[field]); \t\t\t\t\t//if not duplicate --> push into stack\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tString[] output = new String[unique.size()]; \t//initialization of output string array\r\n\r\n\t\tfor(int i = output.length-1; i>= 0; i--){ \t\t//stack is loaded into array in reverse order\r\n\r\n\t\t\toutput[i] = unique.pop();\r\n\t\t}\r\n\r\n\r\n\t\treturn output; \t\t//unique elements are returned\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tint count=0;\n String[] ab= {\"A\", \"B\", \"B\", \"F\", \"A\"};\n \n for(int i=0; i<ab.length;i++){\n\t for(int j=0;j<ab.length;j++){\n\t\t if(ab[i]==ab[j]){\n\t\t\t count++;\n\t\t\t \n\t\t\t if(count==2){\n\t\t\t\t System.out.println(ab[i]);\n\t\t\t\t count= --count-1;\n\t\t\t\t \n\t\t\t }\n\t\t\t \n\t\t }\n\t }\n }\n\t}", "public static void main(String[] args) {\n\t\tString myString = \"abcdea\";\n\t\tint flag = 1;\n\t\t\n\t\tfor (int i=0; i < myString.length(); i++) {\n\t\t\tfor (int j=0; j < myString.length(); j++) {\n\t\t\t\tif(myString.charAt(i)==myString.charAt(j) && i!=j) {\n\t\t\t\t\tflag = 0;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\tif(flag==1) {\n\t\t\tSystem.out.println(\"The string has unique characters\");\n\t\t}else {\n\t\t\tSystem.out.println(\"The string does not have unique characters\");\n\t\t}\n\n\t}", "public static void removeDuplicates(int[] a)\r\n\t\t{\r\n\t\t\tLinkedHashSet<Integer> set\r\n\t\t\t\t= new LinkedHashSet<Integer>();\r\n\r\n\t\t\t// adding elements to LinkedHashSet\r\n\t\t\tfor (int i = 0; i < a.length; i++)\r\n\t\t\t\tset.add(a[i]);\r\n\r\n\t\t\t// Print the elements of LinkedHashSet\r\n\t\t\tSystem.out.print(set);\r\n\t\t}", "public static void main (String[] args) {\n System.out.println(\"test case 1: \" + Arrays.toString(getDistinctLCLetters(\"\")));\r\n\r\n // should return: [], i.e. an array with zero elements\r\n System.out.println(\"test case 2: \" + Arrays.toString(getDistinctLCLetters(\"BEE\")));\r\n\r\n // should return: [e]\r\n System.out.println(\"test case 3: \" + Arrays.toString(getDistinctLCLetters(\"Bee\")));\r\n\r\n // should return: [d, e, l, o, r]\r\n System.out.println(\"test case 4: \" + Arrays.toString(getDistinctLCLetters(\"Hello World!\")));\r\n }", "public static void main(String[] args){\n\t\tScanner scanner = new Scanner( System.in );\r\n\t\tSystem.out.print( \"Input String: \" );\r\n\t\tString input = scanner.nextLine();\r\n\t\r\n\t\t//converts input into an array and sorts it\r\n\t\tchar tempArray[] = input.toCharArray();\r\n\t\tArrays.sort(tempArray);\r\n\t\r\n\t\t//traverses array, checking if the character \r\n\t\t//following the current one is the same as the current\r\n\t\tfor(int i = 0; i < tempArray.length - 1; i++){\r\n\t\t\tif(tempArray[i] == tempArray[i+1]){\r\n\t\t\t\tSystem.out.println(\"Is not unique\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"Is unique\");\r\n\t\treturn;\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tString str1 = \"garima\";\r\n\t\t\r\n\t\tSystem.out.println(\"The given string is:\"+str1);\r\n\t\t\r\n\t\tfor(int i = 0; i < str1.length(); i++)\r\n\t\t{\r\n\t\t\tboolean unique = true;\r\n\t\t\t\r\n\t\t\tfor(int j = 0; j < str1.length(); j++)\r\n\t\t\t{\r\n\t\t\t\tif(i != j && str1.charAt(i) == str1.charAt(j)) {\r\n\t\t\t\t\tunique = false;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(unique)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"The first non-repeating character in String:\"+str1.charAt(i));\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\n\n\n\n ArrayList<String> names = new ArrayList<>();\n names.add(\"Tima\");\n names.add(\"Eldiar\");\n names.add(\"Beksultan\");\n names.add(\"Ilias\");\n names.add(\"Nurkan\");\n names.add(\"Alisher\");\n names.add(\"Tima\");\n String name = \"Tima\";\n int count = 0;\n\n for (String firstName : names) {\n if (firstName.equals(name)) {\n count++;\n }\n }\n System.out.println(count);\n\n String[] ar=names.toArray(new String[0]);\n\n\n\n System.out.println(names.get(0));\n System.out.println(\"============\");\n\n ArrayList<String> copy = (ArrayList) names.clone();\n\n Collections.sort(copy);\n for (String copies : copy) {\n System.out.println(copies);\n\n }\n System.out.println(\"=============\");\n System.out.println(\"removing all the duplicates from the Arraylist\");\n Set<String> unique = new HashSet<>();\n for (String removingDuplicates : copy) {\n unique.add(removingDuplicates);\n\n }\n\n for (String uniq:unique){\n System.out.println(uniq);\n }\n\n Set<String> sorted=new TreeSet<>();\n for (String sorting:unique){\n sorted.add(sorting);\n }\n System.out.println(\"=============\");\n for (String alreadySorted:sorted){\n System.out.println(alreadySorted);\n }\n\n }", "public static void main(String[] args) {\n\t\t\n\t\t\n\t\tAnagramCheck();\n\t\tSet<Character> se = new HashSet<Character>();\n\t\tSet<Character> se1 = new HashSet<Character>();\n\t\t\n\t\tStringBuffer sb = new StringBuffer();\n\t\tStringBuffer sb1 = new StringBuffer();\n\t\tString str =\"javav\";\n\t\t\n\t\tfor(int i =0; i <str.length();i++)\n\t\t{\n\t\t\tCharacter ch = str.charAt(i);\n\t\t\t\n\t\t\tif(!se.contains(ch))\n\t\t\t{\n\t\t\t\tse.add(ch);\n\t\t\t\tsb.append(ch);\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tse1.add(ch);\n\t\t\t\tsb1.append(ch);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\tSystem.out.println(\"The duplicates after removed \"+sb.toString());\n\t\t\n\t\tSystem.out.println(\"The duplicate item is \"+sb1.toString());\n\t}", "public static void main(String[] args) throws IOException {\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\r\n int n=Integer.parseInt(br.readLine());\r\n String[] strings=br.readLine().split(\",\");\r\n //System.out.println( printNoofUniqueStrings(n,strings));\r\n System.out.println(printAnswer(n,strings));\r\n \r\n /*List<String> list=new LinkedList<String>();\r\n //list.add(\"def\");\r\n //list.add(\"abc\");\r\n //list.remove(\"abc\");\r\n //list.add(0, \"abc\");\r\n \r\n list.add(\"2\");\r\n list.add(\"5\");\r\n list.add(\"9\");\r\n \r\n list.remove(\"5\");\r\n list.add(0,\"5\");\r\n \r\n for(String a:list){\r\n \tSystem.out.println(a);\r\n }*/\r\n\t}", "private static void usingLinkedHashSet()\n\t{\n Integer[] numbers = new Integer[] {1,2,3,4,5,1,3,5};\n \n //This array has duplicate elements\n System.out.println( Arrays.toString(numbers) );\n \n //Create set from array elements\n LinkedHashSet<Integer> linkedHashSet = new LinkedHashSet<>( Arrays.asList(numbers) );\n \n //Get back the array without duplicates\n Integer[] numbersWithoutDuplicates = linkedHashSet.toArray(new Integer[] {});\n \n //Verify the array content\n System.out.println( Arrays.toString(numbersWithoutDuplicates) );\n\t}", "public static void main(String[] args) {\n\n String [] arr = {\"milk\",\"pot\",\"pot\",\"bread\",\"bread\",\"iskem\"};\n //String s = \"\";\n\n\n for(int i =0 ; i <= arr.length-1 ; i++) {\n String s = arr[i];\n int count = 0;\n for (int j = 0; j <= arr.length-1; j++) {\n String each = arr[j];\n if(s.equals(each)) {\n count+=1;\n }\n }\n if (count == 1) {\n System.out.println(s);\n }\n\n }\n System.out.println(\"==================================\");\n\n String str = \"islem ouiddir\";\n String [] arr2 = str.split(\" \");\n System.out.println(Arrays.toString(arr2));\n\n char [] ch = str.toCharArray();\n System.out.println(Arrays.toString(ch));\n\n }", "public static void main(String a[])throws IOException\n {\n BufferedReader b= new BufferedReader(new InputStreamReader(System.in));\n TreeSet<String> t = new TreeSet<String>();\n String mon = b.readLine();\n String[] arr = mon.split(\",\");\n for(int i = 0;i<arr.length;i++)\n {\n t.add(arr[i]);\n }\n System.out.println(t);\n Object arr1[] = t.toArray();\n int c = arr1.length-1;\n while(t.isEmpty()!=true)\n {\n Object m = arr1[c];\n t.remove(m);\n System.out.println(t);\n --c;\n }\n \n }", "public static void main(String[] args) {\n\t\tString s=\"hello world lokl\";\n\t\tchar[] chararray=s.toCharArray();\n\t\tSet<Character> set = new HashSet<Character>();\n\t\t//hashset is implementation of set interface\n\t\t\n\t\tint ctr=0;\n\t\tfor(int i=0; i<chararray.length;i++)\n\t\t{\n\t\t\tif(!set.add(chararray[i]))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"index of duplicate char-\" + chararray[i]+\" \" +i);\n\t\t\t\tctr++;\n\t\t\t}\n\n\n\t\t}\n\t\t\n\t\tSystem.out.println(\"total no of duplicate characters\"+ ctr);\n\t\t\n\n\t}", "public static void main(String args[]) {\n\t\t\n\t\tint arr[]= {1,2,3,2,3,4,5,4,6};\n\t\t\n\t\tSystem.out.print(\"The original including the duplicate elements is: \");\n\t\tfor(int i=0; i<arr.length; i++) {\n\t\t\tSystem.out.print(arr[i] + \" \");\n\t\t}\n\t\t\n\t\tSystem.out.println(\" \\n \");\n\t\t\n//\t\tThe search for the duplicate array begins here.\n\t\t\n\t\tSystem.out.print(\"The array of duplicate elements are the following: \");\n\t\t\n\t\tfor(int i=0;i<arr.length;i++) {\n\t\t\t\t\n\t\t\tfor(int j=i+1;j<arr.length;j++) {\n\t\t\t\tif(arr[i]==arr[j]) {\n\t\t\t\t\tSystem.out.print(arr[j] + \" \");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private static void fromUnsortedArray()\n\t{\n Integer[] origArray = new Integer[] { 1, 1, 2, 3, 3, 3, 4, 5, 6, 6, 6, 7, 8 };\n \n // This array has duplicate elements\n System.out.println(Arrays.toString(origArray));\n \n Integer[] tempArray = removeDuplicates2(origArray);\n \n // Verify the array content\n System.out.println(Arrays.toString(tempArray));\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tScanner scan =new Scanner(System.in);\r\n\t\t\r\n\t\tint size,i=0,temp=0;\r\n\t\t\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"Enter terms\");\r\n\t\tsize=scan.nextInt();\r\n\t\tSystem.out.println(\"Enter input value\");\r\n\t\tString inputValue[] = new String[size];\r\n\t\tfor(i=0;i<size;i++){\r\n\t\t\tinputValue[i] = scan.next();\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"Duplicate value\");\r\n\t\tfor( i=0;i<inputValue.length;i++){\r\n\t\t\tfor(int j=i+1;j<inputValue.length;j++){\r\n\t\t\t\tif(inputValue[i].equals(inputValue[j]))\r\n\t\t\t\t{\r\n\t\t\t\t\tString value=inputValue[j];\r\n\t\t\t\t\tSystem.out.println(\"Duplicate Array is \"+value+\", position\"+i+\",\"+j);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\r\n\t\t}\r\n\r\n\t}", "@Test\n public void shouldReturnUniqueCodenames()\n {\n String[] codenames = DatabaseHelper.getRandomCodenames(25);\n boolean noMatches = true;\n\n\n for (int i = 0; i < codenames.length-1; i++)\n {\n for (int j = i+1; j < codenames.length; j++)\n {\n if (codenames[i] == codenames[j])\n {\n noMatches = false;\n // Here to give more detailed feedback in case the test fails.\n System.out.println(\"Match found: \" + codenames[i] + \" \" + codenames[j]);\n }\n }\n }\n\n assert(noMatches);\n }", "public static void main(String[] args) {\n printUnique();\n }", "public static String[] removeDuplicates(String[] values) {\n\t\t// Put into set to remove duplicates\n\t\tHashSet<String> valueSet = new HashSet<String>();\n\t\tfor (String value : values) {\n\t\t\tvalueSet.add(value);\n\t\t}\n\n\t\t// put into a new array to maintain the original order\n\t\tString[] result = new String[valueSet.size()];\n\t\tint resultIndex = 0;\n\t\tfor (String value : values) {\n\t\t\tif (valueSet.contains(value)) {\n\t\t\t\tresult[resultIndex] = value;\n\t\t\t\tvalueSet.remove(value);\n\t\t\t\tresultIndex++;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public static void main(String[] args) \n\t{\n\t\tScanner sc = new Scanner(System.in);\n\t\tSystem.out.println(\"enter ints of fisrt array [spaces inbetween]\");\n\t\tString s1 = sc.nextLine();\n\t\tString [] sa = s1.split(\" \");\n\t\tint ia [] = new int[sa.length];\n\t\tfor(int i=0;i<sa.length;i++)\n\t\t{ \n\t\t\tia[i] = Integer.parseInt(sa[i]);\n\t\t}\n\t\n\t\tSystem.out.println(\"enter ints of 2nd array [spaces inbetween]\");\n\t\tString s2 = sc.nextLine();\n\t\tString [] sa2 = s2.split(\" \");\n\t\tint ia2 [] = new int[sa2.length];\n\t\tfor(int i=0;i<sa2.length;i++)\n\t\t{ \n\t\t\tia2[i] = Integer.parseInt(sa2[i]);\n\t\t}\n\t\tint [] respIA = uniqOfTwoArrays(ia, ia2);\n\t\tSystem.out.println(\"the uniqe ints of bot aray are \");\n\t\tfor(int i= 0;i<respIA.length;i++)\n\t\t\tSystem.out.println(respIA[i]);\n\n\t}", "public static void main(String[] args) {\n\n Set<String> set = new LinkedHashSet<>();\n set.add(\"ad\");\n set.add(\"text2\");\n set.add(\"ac\");\n set.add(\"text1\");\n set.add(\"text\");\n set.add(\"text2\");\n\n for (String s : set) {\n System.out.println(s);\n }\n }", "public static void main(String[] args) {\n\n\t\tint [] numbers = {2, 7, 3, 2, 3, 7, 7};\n\t\tSet<Integer> set = new HashSet<>();\n\t\tfor(int i = 0; i < numbers.length; i++) {\n\t\t\tif(!set.contains(numbers[i])) {\n\t\t\t\tset.add(numbers[i]);\n\t\t\t\tSystem.out.print(numbers[i] + \" \");\n\t\t\t}\n\t\t}\n\t}", "public static void printDuplicate(String str){\n\t\t\n\t\tString[] strArray = str.split(\" \");\n\t\t\n\t\tHashMap<String, Integer> hm = new HashMap<>();\n\t\t\n\t\t/*for(String tempString : strArray){\n\t\t\tif(hm.containsKey(strArray[i])){\n\t\t\t\t\n\t\t\t\thm.put(strArray[i], hm.get(strArray[i])+1);\n\t\t\t}else{\n\t\t\t\thm.put(strArray[i], 1);\n\t\t\t}\n\t\t}*/\n\t\t\n\t\t//or\n\t\t\n\t\tfor(int i=0; i<strArray.length; i++){\n\t\t\t\n\t\t\tif(hm.containsKey(strArray[i])){\n\t\t\t\t\n\t\t\t\thm.put(strArray[i], hm.get(strArray[i])+1);\n\t\t\t}else{\n\t\t\t\thm.put(strArray[i], 1);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tSystem.out.println(hm);\n\t\t\n\t\tfor (Map.Entry<String, Integer> entry : hm.entrySet()) {\n\t\t\tif(entry.getValue()>1){\n\t\t\t\tSystem.out.print(\"Item : \" + entry.getKey() + \" Count : \" + entry.getValue());\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println();\n\t\t//java 8 iteration\n\t\thm.forEach((k,v)->{\n\t\t\t//System.out.println(\"Item : \" + k + \" Count : \" + v);\n\t\t\t\n\t\t\tif(v > 1){\n\t\t\t\t\n\t\t\t\tSystem.out.println(k +\" \" + v);\n\t\t\t}\n\t\t});\n\t\t\n\t}", "public Set<Character> distincts() {\n return jumble.keySet();\n }", "public static String[] getUniqueValues(String[] labelColumn) {\n\t\t\n\t\tArrayList<String> labelValues = new ArrayList<String>();\n\t\t\n\t\t//initialise\n\t\tlabelValues.add(labelColumn[0]);\n\t\t\n\t\tfor (int i = 1; i < labelColumn.length; i++){\t\n\t\t\tif (!labelValues.contains(labelColumn[i])) {\n\t\t\t\tlabelValues.add(labelColumn[i]);\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Convert to String Array from Array List\n\t\tString[] returnData = new String[labelValues.size()];\n\t\t\n\t\tfor (int i = 0; i < labelValues.size(); i++) {\n\t\t\treturnData[i] = labelValues.get(i);\n\t\t}\n\t\treturn returnData;\n\t}", "public static void main(String[] args) {\n Set<String> mySet = new HashSet<String>(100,50);\n mySet.add(\"APPLE\");\n mySet.add(\"LG\");\n mySet.add(\"HTTC\");\n mySet.add(\"APPLE\");\n mySet.add(\"SAMSUNG\");\n Iterator<String> iterator = mySet.iterator();\n while (iterator.hasNext()){\n System.out.println(iterator.next());\n }\n\n\n\n }", "public static void main(String[] args) {\n\t\tHashSet<String> a = new HashSet<String>();\n\t\ta.add(\"Duke 250\");\n\t\ta.add(\"Duke 125\");\n\t\ta.add(\"Duke 390\");\n\t\t\n\t\tSystem.out.println(a);\n\t}", "public static void main(String[] args) {\n\t\tint[] nums = {1,1,2,3,4,3,4};\n\t\tfor(int i=0; i<nums.length;i++) {\n\t\t\tint count = 0;\n\t\t\tfor(int j=0; j<nums.length; j++) {\n\t\t\t\tif(nums[i]==nums[j]) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\t\t\t\n\t\t\t}\n\t\t\tif(count==1) {\n\t\t\t\tSystem.out.println(nums[i]);\n\t\t\t}\n\t\t}\n\n\t}", "public static void main(String[] args) {\n int [] A = {5,1,5,2,5,3,5,4};\n HashSet<Integer> aa = new HashSet<>();\n for (int i = 0; i <A.length ; i++) {\n if (aa.contains(A[i])) {\n System.out.println(A[i]);\n break;\n }else\n aa.add(A[i]);\n\n }\n\n }", "public static void main(String[] args) {\n\n\t\t\n\t\tSet<String> wind = new HashSet();\n\t\t\n\t\twind.add(\"A\");\n\t\twind.add(\"B\");\n\t\t\n\t\tString[] strArr = new String[wind.size()]; //\n\t\tint[] j = new int[3];\n\t\tj[0] = 1;\n\t\t\n\t\tint[] k = {1,2,3};\n\t\t\n\t\tint[] l = new int[]{1,2,4};\n\t\t\n\t\t\n\t\twind.toArray(strArr);\n\t\t\n\t\tfor(int i=0; i <strArr.length; i++){\n\t\t\tSystem.out.println(strArr[i]);\n\t\t}\n\t\t\n\t}", "private int[] removeDuplicate() {\n\n\t\t//Add int array elements to HashSet\n\t\tSet<Integer> temp = new HashSet<Integer>();\n\t\t\n\t\tfor(int num : randomIntegers){\n\t\t\ttemp.add(num);\n\t\t}\n\n\t\t//convert LinkedHashSet to integer array\n\t\tint[] uniqueNumbers = new int[temp.size()];\n\t\tint i = 0;\n\t\t\n\t\tfor (Iterator<Integer> iterator = temp.iterator(); iterator.hasNext();) {\n\t\t\tuniqueNumbers[i++] = iterator.next();\n\t\t}\n\n\t\treturn uniqueNumbers;\n\t}", "public static void main(String[] args) {\n Set<String>list=new LinkedHashSet<>();\n list.add(\"Work\");\n list.add(\" smart\");\n list.add(\" not\");\n list.add(\" hard\");\n\n String str2=\"\";\n\n for(String str:list){\n str2+=str;\n }\n System.out.println(str2);\n }", "public static void findSingleElement(int[] arr) {\n int distinct = 0;\n for (int i = 0; i < arr.length; i++) {\n for (int j = 0; j < arr.length; j++) {\n if (arr[i] == arr[j] )\n distinct++;\n }\n if(distinct==1)\n System.out.println(\"Element which appears only once in array is : \"+arr[i]);\n distinct = 0;\n }\n }", "public static void main(String[] args) {\n\t\t String S = \"aacaacca\";\n\t\t String T = \"ca\";\n\t\tSystem.out.println(numDistinct(S, T));\n\t}", "static void findDuplicate()\n\t{\n\n\t\tList<String> oList = null;\n\t\tSet<String> oSet = null;\n\t\ttry {\n\t\t\toList = new ArrayList<String>();\n\t\t\toList.add(\"Apple\");\n\t\t\toList.add(\"Boy\");\n\t\t\toList.add(\"Frog\");\n\t\t\toList.add(\"Dog\");\n\t\t\toList.add(\"Eagle\");\n\t\t\toList.add(\"Frog\");\n\t\t\toList.add(\"Apple\");\n\t\t\toList.add(\"Boy\");\n\t\t\toList.add(\"Apple\");\n\t\t\toList.add(\"Boy\");\n\t\t\tSystem.out.println(oList);\n\t\t\t\n\t\t\toSet = new TreeSet<>();\n\t\t\t\n\t\t\tString s = \"\";\n\t\t\tfor(int i=0;i<oList.size();i++)\n\t\t\t{\n\t\t\t\tif((oSet.add(oList.get(i))==false) && (!s.contains(oList.get(i))))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Duplicate: \"+oList.get(i));\n\t\t\t\t\ts+=oList.get(i);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}catch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\toList = null;\n\t\t\toSet = null;\n\t\t}\n\t}", "public SetTest()\r\n\t{\r\n\t\tList< String > list = Arrays.asList( colors );\r\n\t\tSystem.out.printf( \"ArrayList: %s\\n\", list );\r\n\t\tprintNonDuplicates( list );\r\n\t\tprintSortedNonDuplicates(list);\r\n\t\t}", "public static void main(String[] args) {\n\t\tList<Integer> numbers = Arrays.asList(9, 10, 3, 4, 7, 3, 4);\n\t\tList<Integer> distinct = numbers.stream().map(i -> i * i).distinct().collect(Collectors.toList());\n\t\tSystem.out.printf(\"Original List : %s, Square Without duplicates : %s %n\", numbers, distinct);\n\t}", "public static void main(String[] args) {\n ArrayList<Integer> nums = new ArrayList<>();\n nums.addAll( Arrays.asList(100, 2000, 50, 50, 100, 200, 300, 50));\n nums=new ArrayList<>(new TreeSet<>(nums));\n System.out.println(nums);\n\n String str1 = \"babababC\";\n str1 = new TreeSet<>( Arrays.asList(str1.split(\"\")) ).toString();\n System.out.println(str1);\n\n\n System.out.println(\"=========================================================================================\");\n\n /**\n * - 2. Write a program that can REMOVE THE DUPLICATES from an ArrayList. DO NOT change the ORDER\n * -> LinkedHashSet -> Remove Duplicates and Keeps the Insertion Order\n */\n ArrayList<Integer> list = new ArrayList<>(Arrays.asList(6,6,6,6,5,5,5,4,4,4,4));\n list=new ArrayList<>(new LinkedHashSet<>(list));\n System.out.println(list);\n\n\n /**\n * - 1. Write a program that can remove the duplicated characters from String and store them into variable\n */\n String str = \"ABABABCDEF\";\n String[] arr = str.split(\"\");\n str = new LinkedHashSet<>(Arrays.asList(arr)).toString().replace(\", \", \"\");\n System.out.println(str);\n\n\n System.out.println(\"=========================================================================================\");\n\n /**\n * -> Does not accept duplicates, and sort the objects\n * -> HashSet accepts null\n * -> HashSet is faster than TreeSet\n */\n HashSet<Integer> numbers = new HashSet<>(Arrays.asList(10,9,10, 9, 8, 7, 8, 7, 6, 5, 6, 1));\n System.out.println(numbers ); // -> [1, 5, 6, 7, 8, 9, 10]\n\n\n System.out.println(\"=========================================================================================\");\n\n /**\n * - ITERATOR: -> is the only way to remove duplicates from collection\n * - removeIf -> removes numbers because it is uses the iterator interface internally. Iterator implicitly\n *\n * - hasNext() method only can go forward cant go backward. it stars from next index\n * - when we use it our loop hasNext() iterates from the next index\n * - iterator(); - hasNext(); - next(); - remove();\n */\n ArrayList<Integer> list2 = new ArrayList<>(Arrays.asList(1,1,2,2,3,3,4,4,5,5));\n list2.removeIf( p -> p < 4 );\n System.out.println(list2);\n\n\n ArrayList<Integer> list3 = new ArrayList<>(Arrays.asList(1,1,2,2,3,3,4,4,5,5));\n Iterator<Integer> it =list3.iterator(); // - this method will return iterator\n while( it.hasNext() ){ // - iterator explicitly. While loop only accept boolean\n if( it.next() < 4 ){\n it.remove();\n }\n }\n System.out.println(list3);\n\n\n ArrayList<Integer> list4 = new ArrayList<>(Arrays.asList(1,1,2,3,3,4,4,5,5));\n // - hasNext(); will iterate all the indexes. We do not need extra iterator in the loop\n for(Iterator<Integer> I = list4.iterator(); I.hasNext(); ){\n if( I.next() < 4) {\n I.remove();\n }\n }\n System.out.println(list4);\n\n\n\n LinkedHashSet<String> names = new LinkedHashSet<>();\n names.addAll(Arrays.asList( \"Mehmet\",\"Mohammed\",\"Yucel\",\"Sha\",\"Ozgur\", \"Ahmet\",\"Osmanj\",\"Ozgur\",\"Ozgur\",\"Irina\"));\n System.out.println(names);\n Iterator<String> it3 = names.iterator();\n while( it3.hasNext() ){\n String s = it3.next();\n if(s.contains(\"m\") || s.contains(\"M\")){ // - s.toLowerCase.contains(\"m\")\n it3.remove();\n }\n }\n System.out.println(names);\n\n /*\n ===============================================================\n for(Iterator<String> it3 = names.iterator(); it3.hasNext() ; ){\n String s = it3.next();\n if(s.toLowerCase().contains(\"m\")){\n it3.remove();\n }\n }\n ================================================================\n names.removeIf( s -> s.contains(\"m\") || s.contains(\"M\") );\n ================================================================\n names.removeAll( Arrays.asList( \"Mehmet\", \"Ozgur\", \"Mohammed\" ));\n ================================================================\n names.retainAll( Arrays.asList( \"Yucel\", \"Sha\", \"Ahmet\" ) );\n ================================================================\n boolean result = list.containsAll( Arrays.asList(5, 6, 9, 8, 11 ));\n */\n\n\n\n\n\n\n\n System.out.println(\"=========================================================================================\");\n\n\n\n\n\n }", "public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\r\n\t\tList<Integer> nums = new ArrayList<>();\r\n\t\t\r\n\t\tnums.add(10);nums.add(10);nums.add(10);nums.add(8);\r\n\t\tnums.add(11);nums.add(10);nums.add(10);nums.add(10);\r\n\r\n\t\tSystem.out.println(nums);\r\n\t\t\r\n\t\tList<Integer> unique1 = new ArrayList<>(); \r\n\t\t\r\n\t\t\r\n\t\t // find unique NON DUPLICATE VALUES\r\n\t\tfor(Integer num: nums) {\r\n\t\t\tif(!unique1.contains(num)) { // if unique1 doesn't contains num add it\r\n\t\t\t\tunique1.add(num); //<<<<<======= adding to unique1 num one by one\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(unique1.toString());\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t \r\n\t\t\r\n\t\tList<Integer> unique2 = new ArrayList<>();\r\n\t\t\r\n\t\tfor(int i =0; i<nums.size(); i++) { // find unique ( appearence once)\r\n\t\t\tint count=0;\r\n\t\t\t\r\n\t\t\tInteger value = nums.get(i);\r\n\t\t\tfor(int k =0; k<nums.size(); k++) {\r\n\t\t\t\tif(nums.get(k)== value && i != k) {\r\n\t\t\t\t\tcount++;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(count == 0) {\r\n\t\t\t\tunique2.add(value);\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(unique2);\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\n\t\t\n\t\tList<Character>st1=new ArrayList<>();\n\t\n\t\tst1.add('a');\n\t\tst1.add('b');\n\t\tst1.add('a');\n\t\tst1.add('a');\n\t\tst1.add('c');\n\t\tst1.add('t');\n\t\n\t\tSystem.out.println(st1);//[a, b, a, a, c, t]\n\t\t\n\t\tList<Character>st2=new ArrayList<>();//empty []\n\t\tfor (int i=0; i<st1.size();i++) {\n\t\t\tif(!st2.contains(st1.get(i))) {\n\t\t\t\t// created str2 [empty], we will get the element from st1 to st2 while checking if there is repetition \n\t\t\t\tst2.add(st1.get(i));\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(st2);//[a, b, c, t]\n\t\t\n\n\t}", "public static void findDups(int[] arr)\n {\n BitSet bs = new BitSet(32000);\n for(int i=0; i < bs.length(); i++)\n System.out.print(bs.get(i));\n\n for(int i = 0; i < arr.length; i++)\n {\n int num0 = arr[i] - 1;\n if(bs.get(num0))\n System.out.print(arr[i]);\n else\n bs.set(num0);\n }\n }", "public static void main(String[] args) {\n\t\t Set<String> hashset = new HashSet<String>();\r\n\t\t hashset.add(\"Selenium\");\r\n\t\t hashset.add(\"Java\");\r\n\t\t hashset.add(\"Python\");\r\n\t\t hashset.add(\"dotNet\");\r\n\t System.out.println(\"Elements in hash set = \"+hashset);\r\n\t Object[] obArr = hashset.toArray();\r\n\t for (Object ob : obArr)\r\n\t System.out.println(ob);\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tHashSet<String> obj = new HashSet<String>();\n\t\t\n\t\tobj.add(\"Apple\");\n\t\tobj.add(\"Mango\");\n\t\tobj.add(\"Grapes\");\n\t\t\n\t\t//adding duplicate elements\n\t\tobj.add(\"Mango\");\n\t\tobj.add(\"Grapes\");\n\t\t\n\t\tobj.add(null);\n\t\tobj.add(null);\n\t\t\n\t\tSystem.out.println(obj);\n\t\t\n\t\t\t\t\n\t}", "@Test\n\tpublic void testIsUniqueOnUniqueString() {\n\t\tassertTrue(ArraysAndStrings.isUnique(UNIQUE_CHARACTERS));\n\t}", "public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n int N = Integer.parseInt(in.nextLine());\n HashSet<Character> first = new HashSet<Character>();\n HashSet<Character> second = new HashSet<Character>();\n int i=0;\n char temp = 'a';\n for(temp='a';temp<='z';temp++){\n \t first.add(temp);\n }\n int j;\n while(i<N){\n \t second.clear();\n \t char[] stringArray = in.nextLine().toCharArray();\n \t for(j=0;j<stringArray.length;j++){\n \t\t second.add(stringArray[j]); \n \t }\n \t first.retainAll(second);\n \t i++;\n }\n System.out.println(first.size());\n }", "static void findDuplicates(int[] input)\n\t{\n\t\t\n\t\tint length= input.length;\n\t\t\n\t\tSystem.out.println(\"The length of the given array is = \"+length);\n\t\t\n\t\t\n\t\tint[] register= new int[input.length];\n\t\t\n\t\t\n\t\tfor(int i: input)\n\t\t{\n\t\t\tregister[i]=1;\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Missing numbers in the given array\");\n\t\t\n\t\tfor(int i=1; i<register.length; i++)\n\t\t{\n\t\t\tif(register[i]==0)\n\t\t\t\tSystem.out.println(i);\n\t\t}\n\t\tfor(int a: input)\n\t\t{\n\t\t\tSystem.out.print(a);\n\t\t}\n\t\t\n\t\tSystem.out.println(\"\");\n\t\t\n\t\tSystem.out.println(\"\");\n\t\tfor(int b: register)\n\t\t{\n\t\tSystem.out.print(b);\n\t\t\n\t\t}\n\t}", "public boolean RepVec(String []a){\n boolean rep=false;\n String aux1=\"\",aux2=\"\";\n for (int i = 0; i < a.length; i++) {\n aux1=a[i];\n for (int j = 0; j < a.length; j++) {\n aux2=a[j];\n if( i!=j ){ \n if(aux1==aux2){\n rep=true;\n return rep;\n } \n } \n }\n }\n return rep;\n \n }", "public static int[] uniqueElements(int[] arr) {\n boolean[] duplicateMap = new boolean[arr.length];\n int duplicate = 0;\n int index=0;\n int[]result;\n\n for (int x = 0; x < arr.length; x++) {\n for (int j = 0; j < arr.length; j++) {\n if (x == j) {\n break;\n }\n if (arr[x] == arr[j]) {\n duplicateMap[x] = true;\n duplicateMap[j]=false;\n duplicate++;\n }\n }\n }\n result=new int[arr.length-duplicate];\n for(int k=0; k< arr.length;k++){\n if(!duplicateMap[k]){\n result[index]=arr[k];\n index++;\n }\n }\n\n return result;\n }", "public static void main(String[] args) \r\n{\n\tList<Integer> numbers = Arrays.asList(3, 2, 2, 3, 7, 3, 5);\r\n\r\n\t//get list of unique squares\r\n\tList<Integer> squaresList = numbers.stream().map( i -> i*i).distinct().collect(Collectors.toList());\r\n\tSystem.out.println(squaresList);\r\n//\tList<String>strings = Arrays.asList(\"abc\", \"\", \"bc\", \"efg\", \"abcd\",\"\", \"jkl\");\r\n//\r\n//\t//get count of empty string\r\n////\tlong count = strings.stream().filter(string -> string.isEmpty()).count();\r\n////\tSystem.out.println(count);\r\n//\tList<String>strings1 = Arrays.asList(\"abc\", \"\", \"bc\", \"efg\", \"abcd\",\"\", \"jkl\");\r\n//\tList<String> filtered = strings1.stream().filter(string -> !string.isEmpty()).collect(Collectors.toList());\r\n//\r\n//\tSystem.out.println(\"Filtered List: \" + filtered);\r\n//\tString mergedString = strings1.stream().filter(string -> !string.isEmpty()).collect(Collectors.joining());\r\n//\tSystem.out.println(\"Merged String: \" + mergedString);\r\n//}\r\n}", "public static void main(String[] args)\n\t{\n\t\tHashSet<String> wordsWithNoDuplicates = new HashSet<>();\n\t\t\n\t\twordsWithNoDuplicates.add(\"poop\");\n\t\twordsWithNoDuplicates.add(\"butt\");\n\t\twordsWithNoDuplicates.add(\"ass\");\n\t\twordsWithNoDuplicates.add(\"ass\");\n\t\t\n\t\tfor (String word : wordsWithNoDuplicates)\n\t\t{\n\t\t\tSystem.out.println(word);\n\t\t}\n\n\t}", "public void question4(List<String> input){\n Set<String> s = new HashSet<>(input);\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tString input = \"I am am debo debo\";\r\n\t\t\r\n\t\tString[] inputArr =input.split(\" \");\r\n\t\t\r\n\t\tSet<String> mySet = new HashSet<String>();\r\n\t\t\r\n\t\tfor(String x : inputArr) {\r\n\t\t\t\r\n\t\t\tmySet.add(x);\r\n\t\t}\r\n\t\t\r\n\t\tIterator itr = mySet.iterator();\r\n\t\twhile(itr.hasNext()) {\r\n\t\t\tSystem.out.print(itr.next()+\" \");\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\n\n\t\tHashSet<String> actual = uniqueTuple(\"aaabbb\", 2);\n\t\tHashSet<String> expected = new HashSet<String>();\n\t\texpected.add(\"aa\");\n\t\texpected.add(\"ab\");\n\t\texpected.add(\"bb\");\n System.out.println(expected.containsAll(actual));\n }", "public boolean isStringMadeofAllUniqueChars(String word) {\n if (word.length() > 128) {\n return false;\n }\n boolean[] char_set = new boolean[128];\n for (int i = 0; i < word.length(); i++) {\n int val = word.charAt(i);\n System.out.println(val);\n if (char_set[val]) {\n return false;\n }\n char_set[val] = true;\n }\n return true;\n }" ]
[ "0.7444944", "0.7393819", "0.6585514", "0.65750134", "0.6574742", "0.63990504", "0.6388313", "0.6362286", "0.6361295", "0.62946665", "0.6283857", "0.6281318", "0.62796426", "0.6202249", "0.6184303", "0.6179196", "0.61669326", "0.61604846", "0.6126033", "0.61039287", "0.6091584", "0.60903466", "0.6087593", "0.6085556", "0.6029702", "0.60285354", "0.59977204", "0.5989793", "0.59781367", "0.59774095", "0.59562325", "0.5939479", "0.59321576", "0.59292674", "0.5909626", "0.5866306", "0.58477575", "0.5831341", "0.58206517", "0.58137906", "0.5800478", "0.5796836", "0.57919335", "0.57812726", "0.5771261", "0.5764572", "0.5758213", "0.5737314", "0.5723194", "0.5718753", "0.57105136", "0.57034415", "0.57019633", "0.56862974", "0.5684745", "0.56734866", "0.56721234", "0.5665272", "0.5661178", "0.5659362", "0.5640481", "0.56335545", "0.562822", "0.5622213", "0.5613536", "0.56130403", "0.55815583", "0.5580628", "0.5575362", "0.5574344", "0.55630505", "0.55589265", "0.55482924", "0.5529066", "0.5524549", "0.5517963", "0.5502933", "0.5501419", "0.5499314", "0.5489722", "0.5486792", "0.5480141", "0.5467688", "0.5455328", "0.544791", "0.54436165", "0.54386604", "0.543648", "0.5431878", "0.5424461", "0.54207057", "0.5419105", "0.5411394", "0.5403342", "0.54032475", "0.5400067", "0.5398153", "0.5390958", "0.5382333", "0.5374867" ]
0.6111863
19
Manipulates the map once available. This callback is triggered when the map is ready to be used. This is where we can add markers or lines, add listeners or move the camera. In this case, we just add a marker near Sydney, Australia. If Google Play services is not installed on the device, the user will be prompted to install it inside the SupportMapFragment. This method will only be triggered once the user has installed Google Play services and returned to the app.
@Override public void onMapReady(GoogleMap googleMap) { mMap = googleMap; //Add markers to show places to eat on campus LatLng Jester = new LatLng(30.283086, -97.736775); LatLng Texas_Union = new LatLng(30.287125, -97.741109); LatLng Kinsolving = new LatLng(30.290536, -97.739621); mMap.addMarker(new MarkerOptions().position(Texas_Union).title("Texas Union Cafe")); mMap.addMarker(new MarkerOptions().position(Jester).title("Jester Dining Hall")); mMap.addMarker(new MarkerOptions().position(Kinsolving).title("Kinsolving Dining Hall")); mMap.moveCamera(CameraUpdateFactory.newLatLng(Jester)); //Add a map click listener mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() { /** * Manipulates the map when it is clicked/tapped. * Open a dialog that will allow a user to name and create * a marker where they tap on the screen. */ @Override public void onMapClick(LatLng latLng) { AlertDialog.Builder builder = new AlertDialog.Builder(MapsActivity.this); //Set the title of the dialog. builder.setTitle("Create a new Marker"); final LatLng markerPoint = latLng; // Set up the input final EditText input = new EditText(MapsActivity.this); // Specify the type of input expected; this, for example, sets the input as a password, and will mask the text input.setInputType(InputType.TYPE_CLASS_TEXT); builder.setView(input); // Set up the buttons builder.setPositiveButton("Create", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { //Create a new marker with the Latitude and Longitude of the click event. MarkerOptions marker = new MarkerOptions().position( new LatLng(markerPoint.latitude, markerPoint.longitude)).title(input.getText().toString()); mMap.addMarker(marker); } }); builder.setNegativeButton("Cancel", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { //Cancel dialog.cancel(); } }); builder.show(); } }); //Set UI settings. mMap.getUiSettings().setZoomControlsEnabled(true); mMap.getUiSettings().setCompassEnabled(true); mMap.getUiSettings().setMapToolbarEnabled(true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onMapReady(GoogleMap googleMap) {\n Geocoder geoCoder = new Geocoder(getActivity(), Locale.getDefault());\n double lat, lng;\n try {\n List<Address> addresses = geoCoder.getFromLocationName(\"Western Sydney Paramatta, NSW\", 5);\n lat = addresses.get(0).getLatitude();\n lng = addresses.get(0).getLongitude();\n } catch (Exception e) {\n lat = -34;\n lng = 151;\n }\n\n LatLng sydney = new LatLng(lat, lng);\n googleMap.addMarker(new MarkerOptions().position(sydney).title(\"WSU Paramatta\"));\n googleMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n if (ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n googleMap.setMyLocationEnabled(true);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney, Australia, and move the camera.\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(17.2231, 78.2827);\n marker = mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Hyderbbad\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n initializeMap();\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n if (ContextCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mMap.setMyLocationEnabled(true);\n } else {\n ActivityCompat.requestPermissions(this,new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION}, 1);\n }\n // Add a marker in Sydney and move the camera\n if (loc != -1 && loc != 0) {\n locationManager.removeUpdates(this);\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(MainActivity.locations.get(loc), 10));\n\n mMap.addMarker(new MarkerOptions().position(MainActivity.locations.get(loc)).title(MainActivity.places.get(loc)));\n } else {\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n locationManager.requestLocationUpdates(provider, 400, 1, this);\n\n }\n mMap.setOnMapLongClickListener(this);\n }", "@SuppressLint(\"MissingPermission\")\n @Override\n public void onMapReady(GoogleMap googleMap) {\n Log.d(\"MAP_FRAG\", \"MapCallback\");\n\n mMap = googleMap;\n\n Log.d(\"MAP\", mMap.toString());\n\n mMap.setPadding(0, 0, 0, 300);\n\n mMap.setMyLocationEnabled(true);\n mMap.setTrafficEnabled(true);\n mMap.getUiSettings().setCompassEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n mMap.getUiSettings().setMapToolbarEnabled(false);\n\n mMap.addMarker(new MarkerOptions().position(new LatLng(Common.latitude, Common.longitude))\n .icon(BitmapDescriptorFactory.fromResource(R.mipmap.ic_mark_red)));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(Common.latitude, Common.longitude), 15.0f));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n getMarkers();\n\n // Add a marker in Sydney and move the camera\n LatLng penn = new LatLng(39.952290, -75.197060);\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(penn, 15));\n mMap.setMyLocationEnabled(true);\n UiSettings uiSettings = mMap.getUiSettings();\n uiSettings.setZoomControlsEnabled(true);\n uiSettings.setCompassEnabled(true);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\")\n //below line is use to add custom marker on our map.\n .icon(BitmapFromVector(getApplicationContext(), R.drawable.ic_flag)));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mapReady = true;\n mMap = googleMap;\n // Add a marker in Sydney and move the camera\n LatLng Bangalore = new LatLng(12.972442, 77.580643);\n CameraPosition cameraPosition = new CameraPosition.Builder()\n .target(Bangalore)\n .zoom(17)\n .bearing(90)\n .tilt(30)\n .build();\n mMap.addMarker(new MarkerOptions().position(Bangalore).title(\"Marker in Bangalore\"));\n mMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n mMap.setMyLocationEnabled(true);\n mMap.setTrafficEnabled(true);\n mMap.setIndoorEnabled(true);\n mMap.setBuildingsEnabled(true);\n mMap.getUiSettings().setZoomControlsEnabled(true);\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(43.777365,-79.3406);\n LatLng loc22=new LatLng(43.775748,-79.336674);\n LatLng loc3=new LatLng(43.769240,-79.360010);\n LatLng loc4=new LatLng(43.769290,-79.400101);\n LatLng loc5=new LatLng(43.769552,-79.601201);\n mMap.addMarker(new MarkerOptions().position(sydney).title(values[0]));\n mMap.addMarker(new MarkerOptions().position(loc22).title(values[1]));\n mMap.addMarker(new MarkerOptions().position(loc3).title(values[2]));\n mMap.addMarker(new MarkerOptions().position(loc4).title(values[3]));\n mMap.addMarker(new MarkerOptions().position(loc5).title(values[4]));\n\n //mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n LatLng position = new LatLng(latitude, longitude);\n\n // centre the map around the specified location\n mMap.animateCamera(CameraUpdateFactory.newLatLng(position));\n\n // add a marker at the specified location\n MarkerOptions options = new MarkerOptions();\n mMap.addMarker(options.position(position).title(locationName));\n\n // configure the map settings\n mMap.setTrafficEnabled(true);\n mMap.setBuildingsEnabled(true);\n mMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);\n\n // enable the zoom controls\n mMap.getUiSettings().setZoomControlsEnabled(true);\n mMap.getUiSettings().setZoomGesturesEnabled(true);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n if (ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(getActivity(), new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, LOCATION_REQUEST_CODE);\n\n } else {\n buildGoogleApiClient();\n mMap.setMyLocationEnabled(true);\n }\n\n /* // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));*/\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in city and move the camera\n LatLng cityCoord = new LatLng(lat, lng);\n float zoom = (float) 9.0;\n mMap.addMarker(new MarkerOptions().position(cityCoord).title(cityAddr));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(cityCoord, zoom));\n }", "public static void onMapReady() {\n mMap.addMarker(new MarkerOptions().position(new LatLng(latitude, longitude)).title(\"My Home\").snippet(\"Home Address\"));\n // For zooming automatically to the Dropped PIN Location\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(latitude,\n longitude), 12.0f));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n // Add a marker in Sydney, Australia,\n // and move the map's camera to the same location.\n LatLng singapore = new LatLng(1.338709, 103.819519);\n googleMap.addMarker(new MarkerOptions().position(singapore)\n .title(\"Marker in Singapore\"));\n googleMap.moveCamera(CameraUpdateFactory.newLatLng(singapore));\n googleMap.animateCamera(CameraUpdateFactory.zoomTo(11),3000,null);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n\n if (ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED\n && ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n return;\n }\n mMap.setMyLocationEnabled(true);\n\n addMarkers();\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n marker = mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng place = new LatLng(Double.parseDouble(lat),Double.parseDouble(longitude));\n\n mMap.addMarker(new MarkerOptions().position(place));\n moveToCurrentLocation(place);\n\n }", "@Override\r\n public void onMapReady(GoogleMap googleMap) {\r\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\r\n googleMap.setMyLocationEnabled(true);\r\n\r\n LocationManager locationManager = (LocationManager)\r\n getSystemService(Context.LOCATION_SERVICE);\r\n Criteria criteria = new Criteria();\r\n\r\n Location currentLocation = locationManager.getLastKnownLocation(locationManager.getBestProvider(criteria, false));\r\n\r\n LatLng sydney = new LatLng(currentLocation.getLatitude(), currentLocation.getLongitude());\r\n\r\n googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(sydney, 13));\r\n\r\n } else {\r\n PermissionUtils.requestPermission(this, LOCATION_PERMISSION_REQUEST_CODE, Manifest.permission.ACCESS_FINE_LOCATION, true);\r\n }\r\n\r\n updateMarkersData(googleMap);\r\n\r\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n CameraUpdate cUpdate = CameraUpdateFactory.newLatLngZoom(new LatLng(35.68, 139.76), 12);\n //mMap.addMarker(new MarkerOptions().position(new LatLng(35.68, 139.76)).title(\"Marker in Tokyo\"));\n mMap.moveCamera(cUpdate);\n if (ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n mMap.setMyLocationEnabled(true);\n mMap.setTrafficEnabled(true);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng wroclaw = new LatLng(51.110, 17.034);\n mMap.addMarker(new MarkerOptions().position(wroclaw));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(wroclaw, 12));\n mMap.clear();\n // Setting a click event handler for the map\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n\n @Override\n public void onMapClick(LatLng latLng) {\n bSelect.setEnabled(true);\n // Creating a marker\n MarkerOptions markerOptions = new MarkerOptions();\n\n // Setting the position for the marker\n markerOptions.position(latLng);\n\n // Setting the title for the marker.\n // This will be displayed on taping the marker\n markerOptions.title(\"NOWY: \" + latLng.latitude + \" : \" + latLng.longitude);\n\n markerOptions.alpha(0.6f);\n // Clears the previously touched position\n mMap.clear();\n\n // Animating to the touched position\n mMap.animateCamera(CameraUpdateFactory.newLatLng(latLng));\n\n // Placing a marker on the touched position\n mMap.addMarker(markerOptions);\n\n location = latLng.latitude + \" \" + latLng.longitude;\n\n setupMarker();\n }\n });\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n mLocationRequest = LocationRequest.create()\n .setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY)\n .setInterval(1*1000)\n .setFastestInterval(5 * 100);\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mMap.setMyLocationEnabled(true);\n } else {\n // Show rationale and request permission.\n }\n }", "@Override\r\n public void onMapReady(GoogleMap googleMap) {\r\n Log.i(TAG, \"map is ready\");\r\n mMap = googleMap;\r\n\r\n mMap.setMyLocationEnabled(true);\r\n mMap.setOnMyLocationButtonClickListener(this);\r\n mMap.setOnMyLocationClickListener(this);\r\n\r\n startLocationUpdates();\r\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n frLatLng = new LatLng(getLatitude, getLongitude);\n\n map = googleMap;\n map.getUiSettings().setMyLocationButtonEnabled(false);\n\n if (ActivityCompat.checkSelfPermission(getContext()\n , Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED\n && ActivityCompat.checkSelfPermission(getContext(),\n Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n\n return;\n }\n\n map.addMarker(new MarkerOptions().position(frLatLng)).setTitle(getString(R.string.my_location));\n googleMap.getUiSettings().setMyLocationButtonEnabled(true);\n map.animateCamera(CameraUpdateFactory.newLatLngZoom(frLatLng, 520));\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng montesson = new LatLng(48.9190286,2.1380955);\n mMap.addMarker(new MarkerOptions().position(montesson).title(\"Marker in Montesson\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(montesson));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mMap.setMyLocationEnabled(true);\n } else {\n // Show rationale and request permission.\n int i = 12;\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n i);\n\n }\n mMap.setMyLocationEnabled(true); //when location changed call line. loaction manager\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng myLocation = new LatLng(latitude, longitude);\n addMarker(myLocation, name);\n moveCamera(myLocation, 3);\n\n //search a place\n /*searchInput = (EditText) findViewById(R.id.map_search_input);\n searchInput.setOnEditorActionListener(new TextView.OnEditorActionListener() {\n @Override\n public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {\n if(actionId == EditorInfo.IME_ACTION_SEARCH\n || actionId == EditorInfo.IME_ACTION_DONE\n || actionId == KeyEvent.ACTION_DOWN\n || actionId == KeyEvent.KEYCODE_ENTER)\n //search location\n geoLocate();\n return false;\n }\n });*/\n\n //add location\n addButton = findViewById(R.id.map_add_button);\n addButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent intent = new Intent();\n intent.putExtra(\"latitude\", marker.getPosition().latitude);\n intent.putExtra(\"longitude\", marker.getPosition().longitude);\n intent.putExtra(\"name\", marker.getTitle());\n setResult(4, intent);\n finish();\n }\n });\n\n //long tap to add a marker\n mMap.setOnMapLongClickListener(new GoogleMap.OnMapLongClickListener() {\n @Override\n public void onMapLongClick(@NonNull LatLng latLng) {\n addMarker(latLng, name);\n }\n });\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n mMap.setMyLocationEnabled(true);\n mMap.setOnMyLocationChangeListener(this);\n markerIconBitmapDescriptor = BitmapDescriptorFactory.fromResource(R.mipmap.ic_driver_check_in);\n\n mFillColor = Color.HSVToColor(50, new float[]{0, 1, 1});\n mStrokeColor = Color.BLACK;\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n updateLocationUI();\n getDeviceLocation();\n // Add a marker in Sydney and move the camera\n //float zoom = 15;\n //LatLng gbc = new LatLng(43.676209, -79.410703);\n //mMap.addMarker(new MarkerOptions().position(gbc).title(\"Marker in GBC\"));\n //mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(gbc, zoom));\n\n }", "@Override\n public void onMapReady(final GoogleMap map) {\n map.moveCamera(CameraUpdateFactory.zoomTo(14));\n //map.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n map.setMyLocationEnabled(true);\n map.setOnMyLocationButtonClickListener(new GoogleMap.OnMyLocationButtonClickListener() {\n @Override\n public boolean onMyLocationButtonClick() {\n\n return true;\n }\n });\n map.setOnMyLocationChangeListener(new GoogleMap.OnMyLocationChangeListener() {\n @Override\n public void onMyLocationChange(Location location) {\n Log.d(\"map\", \"onMyLocationChange\");\n if (!isinit) {\n isinit = true;\n if (now_Location == null ||\n now_Location.getLatitude() != location.getLatitude() ||\n now_Location.getLongitude() != location.getLongitude()) {\n now_Location = location;\n initStreetView();\n }\n }\n LatLng sydney = new LatLng(location.getLatitude(), location.getLongitude());\n map.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }\n });\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(121.5729889, 25.0776557);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"This is my first Maker\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n // Add a marker in Sydney and move the camera\n LatLng CSN = new LatLng(51.87, -8.481);\n mMap.setMapType(MAP_TYPE_HYBRID);\n mMap.addMarker(new MarkerOptions().position(CSN).title(\"Marker at CSN college\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(CSN, 15F));\n mMap.getUiSettings().setZoomControlsEnabled(true);\n }", "private void setUpMapIfNeeded() {\n if (mGoogleMap != null) {\n if (checkPermission()) {\n mGoogleMap.setMyLocationEnabled(true);\n }\n // Check if we were successful in obtaining the map.\n if (mMapView != null) {\n\n mGoogleMap.setOnMyLocationChangeListener(new GoogleMap.OnMyLocationChangeListener() {\n @Override\n public void onMyLocationChange(Location location) {\n mGoogleMap.addMarker(new MarkerOptions().position(new LatLng(location.getLatitude(), location.getLongitude())).title(\"It's Me!\"));\n mGoogleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(location.getLatitude(), location.getLongitude()), 10));\n }\n });\n\n }\n }\n }", "@Override\r\n public void onMapReady(GoogleMap googleMap) {\r\n mMap = googleMap;\r\n\r\n // Add a marker in Sydney and move the camera\r\n LatLng charlotte = new LatLng(35.22, -80.84);\r\n //currentMarker = mMap.addMarker(new MarkerOptions().position(charlotte).title(\"Charlotte, NC\"));\r\n mMap.moveCamera(CameraUpdateFactory.newLatLng(charlotte));\r\n //currentMarker.setTag(0);\r\n\r\n mMap.setOnMapLongClickListener(this);\r\n\r\n\r\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED\r\n //&& ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED\r\n ) {\r\n // TODO: Consider calling\r\n\r\n return;\r\n }\r\n mMap.setMyLocationEnabled(true);\r\n mMap.setOnMyLocationButtonClickListener(new GoogleMap.OnMyLocationButtonClickListener() {\r\n @Override\r\n public boolean onMyLocationButtonClick() {\r\n Log.d(\"maps\", \"On my location button click\");\r\n return false;\r\n }\r\n });\r\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n Log.d(\"TEST\", \"MAP READY\");\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\n\n LatLng curLocation = new LatLng(latitude,longitude);\n CameraUpdate cameraUpdate = CameraUpdateFactory.newLatLngZoom(curLocation,15.0f);\n setPin(latitude,longitude, null);\n mMap.moveCamera(cameraUpdate);\n for(int i = 0; i < restaurantList.size(); i++){\n double lat = restaurantList.get(i).getLatitude();\n double lng = restaurantList.get(i).getLongitude();\n setPin(lat, lng, restaurantList.get(i));\n }\n //Check we have the users permission to access their location\n // if we dont have it, we have to request it\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)== PackageManager.PERMISSION_GRANTED){\n mMap.setMyLocationEnabled(true);\n\n } else {\n //we dont have permission, so we have to ask for it\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_LOCATION_REQUEST_CODE);\n //run asychronously.. show an alert dialog\n //user can choose allow or deny\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mMap.setTrafficEnabled(true);\n googleMap.setMyLocationEnabled(true);\n mMap.setOnMyLocationChangeListener(onMyLocationChangeListener);\n\n // mMap.setPadding(0, 0, 0, 100);\n UiSettings uiSettings = mMap.getUiSettings();\n uiSettings.setZoomControlsEnabled(true);\n\n mMap.addMarker(new MarkerOptions()\n .position(new LatLng(65.9667, -18.5333))\n .title(\"Hello world\"));\n\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n // Add a marker in Sydney and move the camera\n LatLng loc = new LatLng(v, v1);\n mMap.addMarker(new\n MarkerOptions().position(loc).title(\"0000000000\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(loc));\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMapFragment = ((SupportMapFragment)getSupportFragmentManager().findFragmentById(R.id.fragment_show_place_info_map));\n mMap = mMapFragment.getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap();\n }\n }\n }", "@Override\n public void onMapReady(GoogleMap map) {\n mMap = map;\n\n // Use a custom info window adapter to handle multiple lines of text in the\n // info window contents.\n mMap.setInfoWindowAdapter(new GoogleMap.InfoWindowAdapter() {\n\n @Override\n // Return null here, so that getInfoContents() is called next.\n public View getInfoWindow(Marker arg0) {\n return null;\n }\n\n @Override\n public View getInfoContents(Marker marker) {\n // Inflate the layouts for the info window, title and snippet.\n View infoWindow = getLayoutInflater().inflate(R.layout.custom_info_contents,\n (FrameLayout) findViewById(R.id.map), false);\n\n TextView title = ((TextView) infoWindow.findViewById(R.id.title));\n title.setText(marker.getTitle());\n\n TextView snippet = ((TextView) infoWindow.findViewById(R.id.snippet));\n snippet.setText(marker.getSnippet());\n\n return infoWindow;\n }\n });\n\n // Turn on the My Location layer and the related control on the map.\n updateLocationUI();\n\n // Get the current location of the device and set the position of the map.\n getDeviceLocation();\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"you are in sydney\").draggable(true));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n mMap.setOnMarkerDragListener(this);\n mMap.setOnMapLongClickListener(this);\n\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = mMapFragment.getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setCompassEnabled(true);\n mMap.getUiSettings().setZoomControlsEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n final LatLng update = getLastKnownLocation();\n if (update != null) {\n mMap.moveCamera(CameraUpdateFactory.newCameraPosition(CameraPosition.fromLatLngZoom(update, 11.0f)));\n }\n\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n\n @Override\n public void onMapClick(LatLng latLng) {\n mIsNeedLocationUpdate = false;\n moveToLocation(latLng, false);\n }\n\n });\n\n }\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n // Home Mark\n LatLng home = new LatLng(41.374736, 2.168308);\n float zoom = 13;\n\n // Inicialitzem mapa\n mMap.setMapType(GoogleMap.MAP_TYPE_TERRAIN); //Tipus de mapa\n mMap.addMarker(new MarkerOptions().position(home).title(\"IOC\")); //Marcador inicial\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(home, zoom)); //Centrem mapa en el marcador inicial\n\n this.setMapLongClick(mMap);\n this.enableMyLocation();\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n\n final LatLng[] myLoc = {new LatLng(1, 1)};\n mMap.setMyLocationEnabled(true);\n// mMap.setOnMyLocationChangeListener(new GoogleMap.OnMyLocationChangeListener() {\n// @Override\n// public void onMyLocationChange(Location location) {\n// myLoc[0] = new LatLng(location.getLatitude(), location.getLongitude());\n// mMap.addCircle(new CircleOptions().center(myLoc[0]));\n// mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(myLoc[0], 15));\n// }\n// });\n\n mMap.addCircle(new CircleOptions().center(new LatLng(lat, lng)));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(lat, lng), 18));\n\n mMap.setOnPoiClickListener(new GoogleMap.OnPoiClickListener() {\n @Override\n public void onPoiClick(PointOfInterest poi) {\n\n }\n });\n\n mMap.getUiSettings().setMapToolbarEnabled(true);\n\n // Add a marker in Sydney and move the camera\n\n\n showItems(lat, lng, radius);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n LatLng posini = new LatLng(3.4,-76.5);\n myMarker = mMap.addMarker(new MarkerOptions().position(posini));\n\n requestLocation();\n\n googleMap.setOnCameraMoveListener(new GoogleMap.OnCameraMoveListener() {\n @Override\n public void onCameraMove() {\n if (!flag) {\n\n addMarker();\n flag = true;\n }\n }\n });\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n Log.d(logTag,\"4\");\n mMap = googleMap;\n mMap.getUiSettings().setZoomControlsEnabled(true);\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, LOCATION_REQUEST);\n return;\n }\n mMap.setOnMapLongClickListener(this);\n mMap.setOnInfoWindowClickListener( this );\n mMap.setOnMapClickListener(this);\n mMap.setMyLocationEnabled(true);\n ll=new LatLng(currentLocation.getLatitude(),currentLocation.getLongitude());\n MarkerOptions options = new MarkerOptions().position(ll);\n options.title(getAddressFromLatLng(ll));\n\n Log.d(logTag,\"5\");\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng hn = new LatLng(14.079526, -87.180662);\n mMap.moveCamera(CameraUpdateFactory.newLatLng(hn));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(hn,7));\n helperFacturacion = new FacturacionHelper(MapListClientesActivity.this);\n\n\n addMarkers();\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n setInitialLocation(VehicleData.getLatitude(), VehicleData.getLongitude());\n }", "@Override\r\n public void onMapReady(GoogleMap googleMap) {\r\n mMap = googleMap;\r\n if(ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)!= PackageManager.PERMISSION_GRANTED){\r\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION},101);\r\n }\r\n loc = lm.getLastKnownLocation(LocationManager.GPS_PROVIDER);\r\n populateMap(loc);\r\n try {\r\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(lm.getLastKnownLocation(LocationManager.GPS_PROVIDER).getLatitude(), lm.getLastKnownLocation(LocationManager.GPS_PROVIDER).getLongitude()), 15.0f));\r\n }catch(Exception blyat){\r\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\r\n builder.setMessage(\"No hemos podido acceder a tu localización, revisa el estado de GPS y reinicia la app\");\r\n builder.show();\r\n }\r\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n try{\n Geocoder geo = new Geocoder(this);\n\n //Get address provided for location as Address object\n List<Address> foundAddresses = geo.getFromLocationName(location.getAddress(),1);\n Address address = geo.getFromLocationName(location.getAddress(),1).get(0);\n\n LatLng position= new LatLng(address.getLatitude(),address.getLongitude());\n\n googleMap.addMarker(new MarkerOptions().position(position)\n .title(location.getTitle()));\n googleMap.setMinZoomPreference(12);\n googleMap.setMaxZoomPreference(15);\n googleMap.moveCamera(CameraUpdateFactory.newLatLng(position));\n }\n catch (IOException e){\n e.printStackTrace();\n }\n catch(IndexOutOfBoundsException e){\n e.printStackTrace();\n }\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n mMap.setOnMapLoadedCallback(new GoogleMap.OnMapLoadedCallback() {\n @Override\n public void onMapLoaded() {\n\n setUpMap();\n\n }\n });\n }\n }\n }", "@Override\n @SuppressWarnings({\"MissingPermission\"})\n public void onMapReady(GoogleMap googleMap) {\n\n Log.d(TAG, \"Map is ready.\");\n mMap = googleMap;\n\n mMap.setMyLocationEnabled(true);\n mLastLocation = LocationServices.FusedLocationApi.getLastLocation(\n mGoogleApiClient);\n\n setMarkerToCurrentLocation();\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n// updateMap(new LocationModel(41.806363, 44.768531, \"Agmasheneblis Xeivani\"));\n if (shoppingList.getLocationReminder() != null) {\n updateMap(shoppingList.getLocationReminder());\n } else {\n updateMap(null);\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(LocationStorage.getInstance().getLocation().getLatitude(), LocationStorage.getInstance().getLocation().getLongitude());\n// BitmapDescriptor icon = BitmapDescriptorFactory.fromResource(R.drawable.ic_large_marker);\n Marker marker = mMap.addMarker(new MarkerOptions().position(sydney).title(\"Current Location\").snippet(\"Hold and drag to your desired location\"));\n marker.showInfoWindow();\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n CameraUpdate cameraUpdate = CameraUpdateFactory.newLatLngZoom(sydney, 15);\n mMap.animateCamera(cameraUpdate);\n marker.setDraggable(true);\n mMap.setOnMarkerDragListener(new GoogleMap.OnMarkerDragListener() {\n @Override\n public void onMarkerDragStart(Marker marker) {\n\n }\n\n @Override\n public void onMarkerDrag(Marker marker) {\n\n }\n\n @Override\n public void onMarkerDragEnd(Marker marker) {\n LatLng latLng=marker.getPosition();\n Location temp = new Location(LocationManager.GPS_PROVIDER);\n temp.setLatitude(latLng.latitude);\n temp.setLongitude(latLng.longitude);\n LocationStorage.getInstance().setLocation(temp);\n }\n });\n// mMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {\n// @Override\n// public boolean onMarkerClick(Marker marker) {\n//\n// return true;\n// }\n// });\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n uiSettings = mMap.getUiSettings();\n uiSettings.setZoomControlsEnabled(false);\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n mcircleOptions = mcircleOptions.center(sydney);\n mcircleOptions = mcircleOptions.radius(500);\n mcircleOptions = mcircleOptions.strokeWidth(2);\n mcircleOptions = mcircleOptions.strokeColor(Color.argb(100, 255, 73, 73));\n mcircleOptions = mcircleOptions.fillColor(Color.argb(100, 255, 73, 73));\n mMap.addCircle(mcircleOptions);\n if (ActivityCompat.checkSelfPermission(this,\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n !=\n PackageManager.PERMISSION_GRANTED\n &&\n ActivityCompat.checkSelfPermission(this,\n android.Manifest.permission.ACCESS_COARSE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n mMap.setMyLocationEnabled(true);\n\n mMap.setOnMapLongClickListener(new GoogleMap.OnMapLongClickListener() {\n @Override\n public void onMapLongClick(LatLng latLng) {\n mlatLng = latLng;\n mMap.clear();\n mMap.addMarker(new MarkerOptions().position(mlatLng));\n mcircleOptions = mcircleOptions.center(mlatLng);\n mMap.addCircle(mcircleOptions);\n mMap.animateCamera(CameraUpdateFactory.newLatLng(latLng));\n geocoder = new Geocoder(Maps.this, Locale.getDefault());\n try {\n List<Address> addresses = geocoder.getFromLocation(mlatLng.latitude, mlatLng.longitude, 1);\n for (int i=0; i < addresses.get(0).getMaxAddressLineIndex(); i++) {\n Log.e(\"Address\", addresses.get(0).getAddressLine(i) + \"\");\n caddress = addresses.get(0).getAddressLine(i);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n loc_data = getSharedPreferences(\"loc_data\", MODE_PRIVATE);\n SharedPreferences.Editor loc_data_editor = loc_data.edit();\n loc_data_editor.putString(\"lat\", Double.toString(mlatLng.latitude));\n loc_data_editor.putString(\"lng\", Double.toString(mlatLng.longitude));\n loc_data_editor.putString(\"add\", caddress + \"\");\n loc_data_editor.commit();\n }\n });\n }", "@Override\r\n public void onMapReady(GoogleMap googleMap) {\r\n mMap = googleMap;\r\n mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\r\n\r\n //Initialize Google Play Services\r\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\r\n if (ContextCompat.checkSelfPermission(this,\r\n Manifest.permission.ACCESS_FINE_LOCATION)\r\n == PackageManager.PERMISSION_GRANTED) {\r\n buildGoogleApiClient();\r\n mMap.setMyLocationEnabled(true);\r\n }\r\n }\r\n else {\r\n buildGoogleApiClient();\r\n mMap.setMyLocationEnabled(true);\r\n }\r\n }", "@Override\n public void onMapReady(GoogleMap map) {\n mMap = map;\n\n // Use a custom info window adapter to handle multiple lines of text in the\n // info window contents.\n mMap.setInfoWindowAdapter(new GoogleMap.InfoWindowAdapter() {\n\n @Override\n // Return null here, so that getInfoContents() is called next.\n public View getInfoWindow(Marker arg0) {\n return null;\n }\n\n @Override\n public View getInfoContents(Marker marker) {\n // Inflate the layouts for the info window, title and snippet.\n View infoWindow = getLayoutInflater().inflate(R.layout.custom_info_contents,\n (FrameLayout) findViewById(R.id.map), false);\n\n TextView title = ((TextView) infoWindow.findViewById(R.id.title));\n title.setText(marker.getTitle());\n\n TextView snippet = ((TextView) infoWindow.findViewById(R.id.snippet));\n snippet.setText(marker.getSnippet());\n\n return infoWindow;\n }\n });\n\n // Turn on the My Location layer and the related control on the map.\n updateLocationUI();\n\n // Get the current location of the device and set the position of the map.\n getDeviceLocation();\n\n initializeOtherSettlements(new LatLng(mLastKnownLocation.getLatitude(), mLastKnownLocation.getLongitude()));\n initializeQuestLocations(new LatLng(mLastKnownLocation.getLatitude(), mLastKnownLocation.getLongitude()));\n\n mMap.setOnMarkerClickListener(this);\n mMap.setOnMapClickListener(this);\n mMap.setOnPoiClickListener(this);\n mMap.setOnInfoWindowClickListener(this);\n\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(\n new LatLng(mLastKnownLocation.getLatitude(),\n mLastKnownLocation.getLongitude()), 9));\n\n final PlaceAutocompleteFragment autocompleteFragment = (PlaceAutocompleteFragment)\n getFragmentManager().findFragmentById(R.id.place_autocomplete_fragment);\n\n autocompleteFragment.getView().setBackgroundColor(Color.WHITE);\n autocompleteFragment.getView().setVisibility(View.GONE);\n autocompleteFragment.setOnPlaceSelectedListener(new PlaceSelectionListener() {\n @Override\n public void onPlaceSelected(Place place) {\n //Bias results towards the user's current location\n /*autocompleteFragment.setBoundsBias(new LatLngBounds(\n new LatLng(place.getLatLng().latitude, place.getLatLng().longitude),\n new LatLng(place.getLatLng().latitude, place.getLatLng().longitude)));*/\n\n //Get info about the selected place.\n //Log.i(TAG, \"Place: \" + place.getName());\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(\n new LatLng(place.getLatLng().latitude,\n place.getLatLng().longitude), mMap.getCameraPosition().zoom));\n\n addMarkerAtPoi(place);\n }\n\n @Override\n public void onError(Status status) {\n // TODO: Handle the error.\n Log.i(TAG, \"An error occurred: \" + status);\n }\n });\n\n updateMapHistory();\n updateCustomTimeUI();\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n enableMyLocation();\n buildGoogleApiClient();\n\n }", "public void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getChildFragmentManager()\n .findFragmentById(R.id.location_map)).getMap();\n MapsInitializer.initialize(getActivity().getApplicationContext());\n // Check if we were successful in obtaining the map.\n if (mMap != null)\n setUpMap();\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n String info = sTitle;\n // Add a marker in Sydney and move the camera\n LatLng pos = new LatLng(latitude, longitude);\n mMap.addMarker(new MarkerOptions().position(pos).title(info));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(pos));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(pos, 8));\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n gpsTracker = new GPSTracker(this);\n\n // TODO Cek Permission >= Marshmellow\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED\n &&\n ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M &&\n checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED\n && checkSelfPermission(Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n requestPermissions(new String[]{\n Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION\n }, 110);\n return;\n }\n }\n\n if (gpsTracker.canGetLocation()) {\n latawal = gpsTracker.getLatitude();\n lonawal = gpsTracker.getLongitude();\n namelocationawal = myLocation(latawal, lonawal);\n }\n\n // Add a marker in Sydney and move the camera\n LatLng myLocation = new LatLng(latawal, lonawal);\n locawal.setText(namelocationawal);\n mMap.addMarker(new MarkerOptions().position(myLocation).title(namelocationawal));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(myLocation, 14));\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n mMap.setPadding(30, 80, 30, 80);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n LatLng oregon = new LatLng(45.3, -122);\n mMap.addMarker(new MarkerOptions().position(oregon).title(\"Marker in Oregon\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(oregon));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n /* mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n //mMap.setMapType(GoogleMap.MAP_TYPE_SATELLITE);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));*/\n LatLng ifto = new LatLng(-10.199202218157746, -48.31158433109522);\n mMap = googleMap;\n mMap.setOnCameraIdleListener(this);\n mMap.addMarker(new MarkerOptions().position(ifto).title(\"IFTO Campus Palmas\"));\n }", "private void setupMap() {\n if (googleMap == null) {\n SupportMapFragment mapFrag = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);\n mapFrag.getMapAsync(this);\n mLocationProvider = new LocationProvider(this, this);\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n Log.d(TAG, \"onMapReady: map is ready\");\n mMap = googleMap;\n\n if (mLocationPermissionsGranted) {\n\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n return;\n }\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n\n\n mMap.getUiSettings().setCompassEnabled(true);\n// mMap.getUiSettings().setZoomControlsEnabled(true);\n mMap.getUiSettings().setCompassEnabled(true);\n mMap.getUiSettings().setIndoorLevelPickerEnabled(true);\n mMap.getUiSettings().setMapToolbarEnabled(true);\n\n mMap.getUiSettings().setAllGesturesEnabled(true);\n getDeviceLocation();\n mMap.setOnMarkerDragListener(this);\n\n }\n }", "public void onMapReady(GoogleMap googleMap , double lati, double longi) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(lati, longi);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Your Current Location\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }", "@Override\n public void onMapReady(GoogleMap map) {\n mGoogleMap = map;\n mGoogleMap.setMyLocationEnabled(true);\n Log.d(TAG, \"Map Ready\");\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n\n\n mMap = googleMap;\n\n attachLocationListener();\n\n\n mMap.setOnMarkerDragListener(this);\n\n }", "public void onMapReady(GoogleMap googleMap) {\r\n mMap = googleMap;\r\n\r\n mMap.moveCamera(CameraUpdateFactory.zoomTo(1));\r\n\r\n\r\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\r\n // TODO: Consider calling\r\n // ActivityCompat#requestPermissions\r\n // here to request the missing permissions, and then overriding\r\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\r\n // int[] grantResults)\r\n // to handle the case where the user grants the permission. See the documentation\r\n // for ActivityCompat#requestPermissions for more details.\r\n return;\r\n }\r\n mMap.setMyLocationEnabled(true);\r\n\r\n /// This allows the user to zoom in and out of the map\r\n mMap.getUiSettings().setZoomControlsEnabled(true);\r\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\r\n mMap.getUiSettings().isMyLocationButtonEnabled();\r\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\r\n\r\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n\n mMap = googleMap;\n //Agafar la localitzacio actual per mostrar-ho al mapa\n LocationManager locationManager = (LocationManager)\n getSystemService(Context.LOCATION_SERVICE);\n Criteria criteria = new Criteria();\n\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n Location location = locationManager.getLastKnownLocation(locationManager.getBestProvider(criteria, false));\n LatLng actual = new LatLng((location.getLatitude()),location.getLongitude());\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(actual,13));\n }", "@RequiresApi(api = Build.VERSION_CODES.M)\n @Override\n public void onMapReady(GoogleMap googleMap) {\n MapsInitializer.initialize(getContext());\n mMap = googleMap;\n mMap.setMinZoomPreference(13.0f);\n mMap.setMaxZoomPreference(20.0f);\n mMap.setOnMapClickListener(this);\n mMap.setInfoWindowAdapter(this);\n mMap.setOnInfoWindowClickListener(MyOnInfoWindowClickListener);\n\n if (ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n requestPermissions(new String[]{Manifest.permission.\n ACCESS_FINE_LOCATION}, 1);\n } else {\n mMap.setMyLocationEnabled(true);\n }\n }\n\n mMap.setMyLocationEnabled(true);\n\n buildGoogleApiClient();\n mGoogleApiClient.connect();\n\n }", "@Override\n public void onMapReady(final GoogleMap map) {\n mMap = map;\n\n mMap.setInfoWindowAdapter(new GoogleMap.InfoWindowAdapter() {\n\n @Override\n // Return null here, so that getInfoContents() is called next.\n public View getInfoWindow(Marker arg0) {\n return null;\n }\n\n @Override\n public View getInfoContents(Marker marker) {\n // Inflate the layouts for the info window, title and snippet.\n @SuppressLint(\"InflateParams\") View infoWindow = getLayoutInflater().inflate(R.layout.custom_info_contents, null);\n\n TextView title = infoWindow.findViewById(R.id.title);\n title.setText(marker.getTitle());\n\n TextView snippet = infoWindow.findViewById(R.id.snippet);\n snippet.setText(marker.getSnippet());\n\n return infoWindow;\n }\n });\n\n mMap.setOnMapLongClickListener(new GoogleMap.OnMapLongClickListener() {\n @Override\n public void onMapLongClick(LatLng point) {\n mMap.clear();\n buildMarker(\"User Tap\", \"This is snippet\", point, true);\n @SuppressLint(\"DefaultLocale\") String latLong = String.format(\"%f,%f\", point.latitude, point.longitude);\n String endPoint = String.format(placesURL,latLong, String.valueOf(distance), BuildConfig.API_KEY);\n Location locationSelected = new Location(mLastKnownLocation);\n locationSelected.setLatitude(point.latitude);\n locationSelected.setLongitude(point.longitude);\n showPlacesNearby(locationSelected, endPoint);\n }\n });\n\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n @Override\n public void onMapClick(LatLng latLng) {\n mMap.clear();\n }\n });\n\n mMap.setOnMyLocationButtonClickListener(new GoogleMap.OnMyLocationButtonClickListener() {\n @Override\n public boolean onMyLocationButtonClick() {\n mMap.clear();\n updateLocationUI();\n getDeviceLocation();\n return true;\n }\n });\n\n\n // Prompt the user for permission.\n getLocationPermission();\n\n // Turn on the My Location layer and the related control on the map.\n updateLocationUI();\n\n // Get the current location of the device and set the position of the map.\n getDeviceLocation();\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mUiSettings = mMap.getUiSettings();\n mUiSettings.setAllGesturesEnabled(mLock);\n\n mMap.setOnMyLocationButtonClickListener(this);\n mMap.setOnMapClickListener(this);\n mMap.setOnMapLongClickListener(this);\n mMap.setOnMarkerDragListener(this);\n\n enableMyLocation();\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n riderLat = getIntent().getDoubleExtra(DriverActivity.RIDER_LATITUDE_EXTRA, 0.0);\n riderLong = getIntent().getDoubleExtra(DriverActivity.RIDER_LONGITUDE_EXTRA, 0.0);\n LatLng rider = new LatLng(riderLat, riderLong);\n riderMarker = mMap.addMarker(new MarkerOptions()\n .position(rider)\n .title(\"Rider\")\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_RED)));\n\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED\n\n && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n\n Toast.makeText(this, \"You don't have location permission\", Toast.LENGTH_LONG).show();\n return;\n }\n\n Location hereNow = mLocationManager.getLastKnownLocation(mBestProvider);\n if (hereNow != null) {\n onLocationChanged(hereNow);\n }\n\n mLocationManager.requestLocationUpdates(mBestProvider, 400, 1, this);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n //Enable Current location\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.\n PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.\n ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n\n requestPermissions(new String[]{Manifest.permission.ACCESS_COARSE_LOCATION,\n Manifest.permission.ACCESS_FINE_LOCATION}, MY_REQUEST_INT);\n\n }\n\n\n return;\n\n } else {\n mMap.setMyLocationEnabled(true);\n\n\n }\n\n\n // Add a marker in Sydney and move the camera\n //LatLng sydney = new LatLng(-34, 151);\n //mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\")\n // .icon(BitmapDescriptorFactory.fromResource(R.drawable.blackspot))\n // );\n //mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n //mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(sydney,16),5000,null);\n //new MarkerOptions().icon(BitmapDescriptorFactory.fromResource(R.drawable.blackspot));\n\n //LatLng latLng = new LatLng(-1.2652560778411037, 36.81265354156495);\n //mMap.addMarker(new MarkerOptions().position(latLng).title(\"Marker in Parklands\"));\n //mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng,16),5000,null);\n //mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n\n //BitmapDescriptor icon = BitmapDescriptorFactory.fromResource(R.drawable.blackspot);\n ////LatLng harmbug = new LatLng(-37, 120);\n //mMap.addMarker(new MarkerOptions().position(harmbug).title(\"Marker in Harmbug\")\n //.icon(icon));\n //mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(harmbug,16),5000,null);\n //mMap.moveCamera(CameraUpdateFactory.newLatLng(harmbug));\n\n //LatLng kenya = new LatLng(-2.456, 37);\n //mMap.addMarker(new MarkerOptions().position(kenya).title(\"Marker in Kenya\"));\n //mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(kenya,16),5000,null);\n //mMap.moveCamera(CameraUpdateFactory.newLatLng(kenya));\n\n LatLng sydney = new LatLng(-0.8041213212075744, 36.53117179870606);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Blackspot at Kinungi\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(sydney, 18), 5000, null);\n\n LatLng gilgil = new LatLng(-0.2167, 36.2667);\n mMap.addMarker(new MarkerOptions().position(gilgil).title(\"Blackspot at Gilgil\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(gilgil));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(gilgil, 18), 5000, null);\n\n LatLng njoro = new LatLng(-0.3290, 35.9440);\n mMap.addMarker(new MarkerOptions().position(njoro).title(\"Blackspot at Njoro\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(njoro));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(njoro, 18), 5000, null);\n\n LatLng bluepost = new LatLng(-1.0226988092777693, 37.06806957721711);\n mMap.addMarker(new MarkerOptions().position(bluepost).title(\"Blackspot at Bluepost Bridge\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(bluepost));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(bluepost, 18), 5000, null);\n\n LatLng Nithi = new LatLng(-0.26649259802107667, 37.66248464584351);\n mMap.addMarker(new MarkerOptions().position(Nithi).title(\"Blackspot at Nithi Bridge\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(Nithi));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(bluepost, 18), 5000, null);\n\n LatLng Maungu = new LatLng(-3.558353542362671, 38.74993801116944);\n mMap.addMarker(new MarkerOptions().position(Maungu).title(\"Blackspot at Maungu Area\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(Maungu));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(Maungu, 18), 5000, null);\n\n LatLng Misikhu = new LatLng(0.6662027919912484, 34.75215911865235);\n mMap.addMarker(new MarkerOptions().position(Misikhu).title(\"Blackspot at Misikhu\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(Misikhu));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(Maungu, 18), 5000, null);\n\n LatLng Muthaiga = new LatLng(-1.2614375406469367, 36.840720176696784);\n mMap.addMarker(new MarkerOptions().position(Muthaiga).title(\"Blackspot at Muthaiga Road\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(Muthaiga));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(Maungu, 18), 5000, null);\n\n LatLng Pangani = new LatLng(-1.2665003190843396, 36.834239959716804);\n mMap.addMarker(new MarkerOptions().position(Muthaiga).title(\"Blackspot at Pangani\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(Pangani));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(Pangani, 18), 5000, null);\n\n LatLng KU = new LatLng(-1.1823303731373749, 36.93703293800355);\n mMap.addMarker(new MarkerOptions().position(KU).title(\"Blackspot at KU\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(KU));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(KU, 18), 5000, null);\n\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n Toast.makeText(this, \"Map is Ready\", Toast.LENGTH_SHORT).show();\n Log.d(TAG, \"onMapReady: map is ready\");\n mMap = googleMap;\n\n if (mLocationPermissionsGranted) {\n getDeviceLocation();\n\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n return;\n }\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n\n init();\n }\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap)\n {\n // This method is called AFTER the map is loaded from Google Play services\n // At this point the map is ready\n\n // Store the reference to the Google Map in our member variable\n mMap = googleMap;\n // Custom marker (Big Blue one - mymarker.png)\n LatLng myPosition = new LatLng(33.671028, -117.911305);\n\n // Add a custom marker at \"myPosition\"\n mMap.addMarker(new MarkerOptions().position(myPosition).title(\"My Location\").icon(BitmapDescriptorFactory.fromResource(R.drawable.my_marker)));\n\n // Center the camera over myPosition\n CameraPosition cameraPosition = new CameraPosition.Builder().target(myPosition).zoom(15.0f).build();\n CameraUpdate cameraUpdate = CameraUpdateFactory.newCameraPosition(cameraPosition);\n // Move map to our cameraUpdate\n mMap.moveCamera(cameraUpdate);\n\n // Then add normal markers for all the caffeine locations from the allLocationsList.\n // Set the zoom level of the map to 15.0f\n\n // Now, let's plot each Location form the list with a standard marker\n for (Location location : allLocationsList)\n {\n LatLng caffeineLocation = new LatLng(location.getLatitude(), location.getLongitude());\n mMap.addMarker(new MarkerOptions().position(caffeineLocation).title(location.getName()));\n }\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n LatLng location = new LatLng(mLat, mLng);\n moveCamera(location, DEFAUT_ZOOM);\n if (ActivityCompat.checkSelfPermission(this,\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED\n && ActivityCompat.checkSelfPermission(\n this,\n android.Manifest.permission.ACCESS_COARSE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n return;\n }\n mMap.setMyLocationEnabled(true);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Pula and move the camera\n LatLng pula = new LatLng(44.86726450096342, 13.850460687162476);\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(pula, 13));\n\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n enableUserLocation();\n zoomTooUserLocation();\n } else {\n if (ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission\n .ACCESS_FINE_LOCATION)) {\n //we can show user dialog why this permission is necessery\n\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission\n .ACCESS_FINE_LOCATION}, LOCATION_REQUEST_CODE);\n\n } else {\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission\n .ACCESS_FINE_LOCATION}, LOCATION_REQUEST_CODE);\n }\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n MapStyleOptions style = MapStyleOptions.loadRawResourceStyle(getContext(), R.raw.mapstyle_day);\n mMap.setMapStyle(style);\n\n if (locationProvider != null) {\n enableLocationBullet();\n if (lastpos != null) {\n mMap.moveCamera(CameraUpdateFactory.newCameraPosition(lastpos));\n }\n }\n // Start clustermanager and add markers\n setUpClusterManager();\n\n mMap.setOnMapLoadedCallback(new GoogleMap.OnMapLoadedCallback() {\n @Override\n public void onMapLoaded() {\n mapReady = true;\n if (searchedRestaurants != null) {\n addRestaurants(searchedRestaurants, false);\n }\n\n Location loc = locationProvider.getLastLocation();\n if (!init) {\n zoomMapToPosition(loc, MY_LOCATION_ZOOM);\n init = true;\n }\n\n }\n });\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\n\n ////run with it to check what is happening and remove it to see\n\n\n //Initialize Google Play Services\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n buildGoogleApiClient();\n mMap.setMyLocationEnabled(true);\n }\n } else {\n buildGoogleApiClient();\n mMap.setMyLocationEnabled(true);\n }\n }", "@Override\r\n public void onMapReady(GoogleMap googleMap) {\r\n mMap = googleMap;\r\n mMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);\r\n\r\n //Initialize Google Play Services\r\n if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\r\n if (ContextCompat.checkSelfPermission(this,\r\n Manifest.permission.ACCESS_FINE_LOCATION)\r\n == PackageManager.PERMISSION_GRANTED) {\r\n buildGoogleApiClient();\r\n mMap.setMyLocationEnabled(true);\r\n }\r\n }\r\n else {\r\n buildGoogleApiClient();\r\n mMap.setMyLocationEnabled(true);\r\n }\r\n\r\n\r\n }", "@Override\n public void onMapReady(GoogleMap map) {\n mMap = map;\n mUiSettings = mMap.getUiSettings();\n mUiSettings.setCompassEnabled(false);\n mUiSettings.setMapToolbarEnabled(false);\n mUiSettings.setZoomControlsEnabled(false);\n mUiSettings.setScrollGesturesEnabled(false);\n mUiSettings.setTiltGesturesEnabled(false);\n mUiSettings.setRotateGesturesEnabled(false);\n\n // Add a marker in Sydney and move the camera\n final LatLng airport = new LatLng(listAirport.get(index).getLatitude(), listAirport.get(index).getLongitude());\n mMap.moveCamera(CameraUpdateFactory.newLatLng(airport));\n mMap.setMinZoomPreference(10.0f);\n mMap.setMaxZoomPreference(10.0f);\n mMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);\n\n map.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n @Override\n public void onMapClick(LatLng latLng) {\n onClick(index, MapsActivity.class);\n }\n });\n\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n SupportMapFragment mapFragment = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map));\n mapFragment.getMapAsync(this);\n mMap = mapFragment.getMap();\n\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n LatLng latlong = new LatLng(29.375859, 47.977405);\n googleMap.addMarker(new MarkerOptions().position(latlong).title(\"\"));\n googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(latlong, 9.0f));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng livraria = new LatLng(maps.getLatitude(), maps.getLongitude());\n if(this.maps.getId() == 1){\n mMap.addMarker(new MarkerOptions().position(livraria).title(\"Livraria Saraiva - Praia de Belas\"));\n } else if(this.maps.getId() == 2){\n mMap.addMarker(new MarkerOptions().position(livraria).title(\"Livraria Cultura - Bourbon Country\"));\n } else if(this.maps.getId() == 3){\n mMap.addMarker(new MarkerOptions().position(livraria).title(\"Livraria Cameron\"));\n } else if(this.maps.getId() == 4){\n mMap.addMarker(new MarkerOptions().position(livraria).title(\"Livraria Siciliano\"));\n }\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(livraria, 15f));\n mMap.getUiSettings().setZoomControlsEnabled(true);\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n Log.d(LOG_TAG, \"called onMapReady()\");\n mMap = googleMap;\n\n // Set up UI for map\n mMap.setMyLocationEnabled(true);\n mMap.setBuildingsEnabled(true);\n mUiSettings = mMap.getUiSettings(); // https://developers.google.com/maps/documentation/android-sdk/controls\n mUiSettings.setMyLocationButtonEnabled(false);\n mUiSettings.setCompassEnabled(true);\n mUiSettings.setTiltGesturesEnabled(true);\n mUiSettings.setRotateGesturesEnabled(true);\n mUiSettings.setScrollGesturesEnabled(true);\n mUiSettings.setZoomGesturesEnabled(true);\n\n\n // Move the camera to last known user location\n fusedLocationClient.getLastLocation().addOnSuccessListener(this, new OnSuccessListener<Location>() { // this -> getActivity()??\n @Override\n public void onSuccess(Location location) {\n // Got last known location. In some rare situations this can be null.\n if (location != null) {\n double latitude = location.getLatitude();\n double longitude = location.getLongitude();\n LatLng startingLocation = new LatLng(latitude, longitude);\n\n CameraPosition cameraPosition = new CameraPosition.Builder()\n .target(startingLocation) // Sets the center of the map\n .zoom(16) // Sets the zoom\n .build(); // Creates a CameraPosition from the builder\n mMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition), 250, null);\n Log.d(LOG_TAG, \" > moved map to last known location\");\n }\n }\n });\n addZoneHolesToMap(shiftZones);\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((MapFragment) getFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n Intent info = getIntent();\n setUpMap(new LatLng(info.getDoubleExtra(\"latitude\", 0), info.getDoubleExtra(\"longitude\", 0)), info.getStringExtra(\"name\"));\n }\n }\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()\n .findFragmentById(R.id.map);\n mapFragment.getMapAsync(this);\n }\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = mMapFragment.getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n Log.i(TAG, \"Yes, we have a google map...\");\n setUpMap();\n } else {\n // means that Google Service is not available\n form.dispatchErrorOccurredEvent(this, \"setUpMapIfNeeded\",\n ErrorMessages.ERROR_GOOGLE_PLAY_NOT_INSTALLED);\n }\n\n }\n }", "private void setupMap() {\n int status = GooglePlayServicesUtil.isGooglePlayServicesAvailable(getBaseContext());\n \t\tif ( status != ConnectionResult.SUCCESS ) {\n \t\t\t// Google Play Services are not available.\n \t\t\tint requestCode = 10;\n \t\t\tGooglePlayServicesUtil.getErrorDialog( status, this, requestCode ).show();\n \t\t} else {\n \t\t\t// Google Play Services are available.\n \t\t\tif ( this.googleMap == null ) {\n \t\t\t\tFragmentManager fragManager = this.getSupportFragmentManager();\n \t\t\t\tSupportMapFragment mapFrag = (SupportMapFragment) fragManager.findFragmentById( R.id.edit_gpsfilter_area_google_map );\n \t\t\t\tthis.googleMap = mapFrag.getMap();\n \n \t\t\t\tif ( this.googleMap != null ) {\n \t\t\t\t\t// The Map is verified. It is now safe to manipulate the map.\n \t\t\t\t\tthis.configMap();\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng liege = new LatLng(50.620552, 5.581177);\n LatLng victime = new LatLng(50.620957, 5.582263);\n mMap.addMarker(new MarkerOptions()\n .position(liege)\n .title(\"You are here !\")\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_YELLOW)));\n mMap.addMarker(new MarkerOptions()\n .position(victime)\n .title(\"Aurélie\")\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_RED)));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(liege,17));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng parque = new LatLng(latitud, longitud);\n mMap.addMarker(new MarkerOptions().position(parque).title(lugar).icon(BitmapDescriptorFactory.fromResource(R.drawable.icons8_terraria_48)));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(parque));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(latitud, longitud),16.0f));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n this.googleMap = googleMap;\n marker = googleMap.addMarker(markerOptions);\n googleMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));\n\n }", "private void setUpMapIfNeeded() {\n // Do a null check to confirm that we have not already instantiated the map.\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\n .getMap();\n mMap.setOnMarkerDragListener(this);\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap();\n }\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n buildGoogleApiClient();\n mMap.setMyLocationEnabled(true);\n\n }", "private void setUpMapIfNeeded() {\r\n if (map == null) {\r\n SupportMapFragment smf = null;\r\n smf = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);\r\n\r\n if (smf != null) {\r\n map = smf.getMap();\r\n if (map != null) {\r\n map.setMyLocationEnabled(true);\r\n }\r\n }\r\n }\r\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mMap.setOnMapLoadedCallback(new GoogleMap.OnMapLoadedCallback() {\n @Override\n public void onMapLoaded() {\n mapLoaded = true;\n waitForMapPlease();\n }\n });\n }" ]
[ "0.81884885", "0.8042996", "0.80369604", "0.8033771", "0.7998488", "0.79770344", "0.7957945", "0.7957621", "0.7954723", "0.79429656", "0.7936834", "0.79301476", "0.7915297", "0.79048723", "0.7888234", "0.7885085", "0.7885085", "0.7885085", "0.7885085", "0.7878164", "0.78446823", "0.7827953", "0.7820209", "0.781347", "0.77963114", "0.7792471", "0.77872795", "0.7786649", "0.77632064", "0.77445674", "0.7742489", "0.77364564", "0.7729635", "0.76863027", "0.7673587", "0.7666516", "0.7666381", "0.7660542", "0.7660032", "0.7658027", "0.7656693", "0.764701", "0.7640233", "0.76333576", "0.76280946", "0.7621821", "0.7620966", "0.7618586", "0.76174897", "0.7608421", "0.76047516", "0.75995344", "0.7598638", "0.7593479", "0.75854367", "0.7585161", "0.75797725", "0.7571025", "0.7568314", "0.7563941", "0.7563395", "0.7554277", "0.7551052", "0.75451434", "0.75433755", "0.75384784", "0.75305945", "0.7527021", "0.7520158", "0.75182885", "0.75154966", "0.7492834", "0.74907964", "0.749", "0.74861366", "0.74739647", "0.7467611", "0.74626285", "0.7457827", "0.7457491", "0.7452213", "0.74507207", "0.7448966", "0.74479777", "0.74376386", "0.7429154", "0.7425011", "0.7417805", "0.74167794", "0.7416", "0.7411618", "0.7410149", "0.7408731", "0.7399689", "0.73954254", "0.7393991", "0.7389341", "0.73889375", "0.7377822", "0.7369343", "0.73593694" ]
0.0
-1
Manipulates the map when it is clicked/tapped. Open a dialog that will allow a user to name and create a marker where they tap on the screen.
@Override public void onMapClick(LatLng latLng) { AlertDialog.Builder builder = new AlertDialog.Builder(MapsActivity.this); //Set the title of the dialog. builder.setTitle("Create a new Marker"); final LatLng markerPoint = latLng; // Set up the input final EditText input = new EditText(MapsActivity.this); // Specify the type of input expected; this, for example, sets the input as a password, and will mask the text input.setInputType(InputType.TYPE_CLASS_TEXT); builder.setView(input); // Set up the buttons builder.setPositiveButton("Create", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { //Create a new marker with the Latitude and Longitude of the click event. MarkerOptions marker = new MarkerOptions().position( new LatLng(markerPoint.latitude, markerPoint.longitude)).title(input.getText().toString()); mMap.addMarker(marker); } }); builder.setNegativeButton("Cancel", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { //Cancel dialog.cancel(); } }); builder.show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\t\tpublic void onMapClick(LatLng arg0) {\n\t\t\t\tfinal LatLng location = arg0;\n \tAlertDialog builder = new AlertDialog.Builder(MainActivity.this)\n\t .setMessage(\"Do you want to add your location here?\")\n\t .setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n\t public void onClick(DialogInterface dialog, int id) {\n\t \t setFlag = true;\n\t \t myLocation = location;\n\t \t //use this flag to indicate that we want to see the path from current location or a set point\n\t \t Log.d(\"my location:\", \"\"+myLocation.latitude + myLocation.longitude);\n\t \t if(setFlag == true){\n\t \t\t if(myMarker != null){\n\t\t \t\t myMarker.remove();\n\t\t \t }\n\t\t \t myMarker = mMap.addMarker(new MarkerOptions().position(myLocation).title(\"myLocation\").draggable(true)\n\t\t \t\t\t\t\t\t.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_BLUE)));\n\t\t \t\t\t\t landmarks.addMarker(\"myLocation\", myMarker);\n\t \t } \n\t }\n\t })\n\t .setNegativeButton(\"Not now\", new DialogInterface.OnClickListener() {\n\t public void onClick(DialogInterface dialog, int id) {\n\t // User cancelled the dialog\n\t }\n\t }).create();\n \tbuilder.show();\n\t\t\t}", "private void openPlacesDialog() {\n DialogInterface.OnClickListener listener = new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n // The \"which\" argument contains the position of the selected item.\n LatLng markerLatLng = mLikelyPlaceLatLngs[which];\n String markerSnippet = mLikelyPlaceAddresses[which];\n if (mLikelyPlaceAttributions[which] != null) {\n markerSnippet = markerSnippet + \"\\n\" + mLikelyPlaceAttributions[which];\n }\n int height = 200;\n int width = 100;\n BitmapDrawable bitmapdraw = (BitmapDrawable) getResources().getDrawable(R.drawable.ic_car_marker);\n Bitmap b = bitmapdraw.getBitmap();\n Bitmap smallMarker = Bitmap.createScaledBitmap(b, width, height, false);\n // Add a marker for the selected place, with an info window\n // showing information about that place.\n mMap.addMarker(new MarkerOptions()\n .title(mLikelyPlaceNames[which])\n .position(markerLatLng)\n .snippet(markerSnippet))\n .setIcon(BitmapDescriptorFactory.fromBitmap(smallMarker));\n\n // Position the customer_map's camera at the location of the marker.\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(markerLatLng,\n DEFAULT_ZOOM));\n }\n };\n\n // Display the dialog.\n AlertDialog dialog = new AlertDialog.Builder(getActivity())\n .setTitle(R.string.pick_place)\n .setItems(mLikelyPlaceNames, listener)\n .show();\n }", "@Override\n public void onClick(View v) {\n if (mPlaceSelected != null) {\n // Open up map fragment.\n FragmentManager manager = getSupportFragmentManager();\n MapDialogFragment mapDialog = new MapDialogFragment();\n mapDialog.setArguments(coordinatesBundle);\n mapDialog.show(manager, MapDialogkey);\n }\n }", "@Override\n\t\t\tpublic void onInfoWindowClick(Marker arg0) {\n\t\t\t\tString id = arg0.getTitle();\n\t\t\t\t\n\t\t\t\tif(id.startsWith(\"Dis\") || id.startsWith(\"my\")){\n\t\t\t\t\tif(id.startsWith(\"Dis\")){\n\t\t\t\t\t\t AlertDialog dialog = new AlertDialog.Builder(MainActivity.this).setTitle(\"Warning\")\n\t\t\t\t\t .setMessage(\"Please select a right victim!!!\")\n\t\t\t\t\t .setNegativeButton(\"OK\", new DialogInterface.OnClickListener() {\n\t\t\t\t public void onClick(DialogInterface dialog, int id) {\n\t\t\t\t \t // finish();\n\t\t\t\t }\n\t\t\t\t }).create();\n\t\t\t\t\t dialog.show();\n\t\t\t\t\t\t}\n\t\t\t\t\tif(id.startsWith(\"my\")){\n\t\t\t\t\t\tmyLocation = arg0.getPosition();\n\t\t\t\t AlertDialog dialog = new AlertDialog.Builder(MainActivity.this)\n\t\t\t\t .setMessage(\"Do you what to update your current location?\")\n\t\t\t\t .setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n\t\t\t public void onClick(DialogInterface dialog, int id) {\n\t\t\t \t setFlag = false;\n\t\t\t }\n\t\t\t })\n\t\t\t .setNegativeButton(\"Not now\", new DialogInterface.OnClickListener() {\n\t\t\t public void onClick(DialogInterface dialog, int id) {\n\t\t\t \t \n\t\t\t }\n\t\t\t }).create();\n\t\t\t\t dialog.show();\n\t\t\t\t\t\t}\t\n\t\t\t\t}else{\n\t\t\t\t\tvicLocation = arg0.getPosition();\n\t\t\t\t\tfinal String PoVictim = readOneVictim(id);\n\t\t\t\t\tLog.d(\"victim infomtion:\",PoVictim);\n\t\t\t AlertDialog dialog = new AlertDialog.Builder(MainActivity.this)\n\t\t\t .setMessage(\"What do you want to do with this victim?\")\n\t\t\t .setNegativeButton(\"Edit/Delect Victim\", new DialogInterface.OnClickListener() {\n\t\t public void onClick(DialogInterface dialog, int id) {\n\t\t \t EditVictim(PoVictim);\n\t\t }\n\t\t })\n\t\t .setPositiveButton(\"Find THIS Victim\", new DialogInterface.OnClickListener() {\n\t\t public void onClick(DialogInterface dialog, int id) {\n\t\t \t //String[] PoVIF = PoVictim.split(\",\");\n\t\t \t vicFlag = true;\n\t\t \t //LatLng vic = new LatLng(42.39398619218224,-72.52872716635466);\n\t\t \t if(vicLocation != null && myLocation != null){\n\t\t \t\t if(wayList != null){\n\t\t \t\t\t wayList.clear();\n\t\t \t\t }\n\t\t \t\t \n\t\t \t\t if(indoorFlag){ //when isindoor return true\n\t\t \t\t\t wayList = findOneVictim(myLocation, vicLocation);\n\t\t \t\t\t if(wayList != null){\n\t\t \t\t\t\t getPath();\n\t\t \t\t\t\t}\n\t\t \t\t }else{\n\t\t \t\t\t LatLng door = getNearestDoor(vicLocation);\n\t\t \t\t\t //get the first part outdoor path \n\t\t \t\t\t findDirections(myLocation.latitude,myLocation.longitude,door.latitude,door.longitude,GMapV2Direction.MODE_DRIVING );\n\t\t \t\t\t //wayList.addAll(findOneVictim(door, vicLocation));\n\t\t \t\t } \n\t\t \t }\n\t\t }\n\t\t }).create();\n\t\t\t dialog.show();\n\t\t\t\t}\t\n\t\t\t}", "@Override\n \tpublic void onMapClick(final LatLng point) \n \t{\n \t\t\n \t\t AlertDialog.Builder builder = new AlertDialog.Builder(CrearIncidenteGPS.this);\n \t\t builder.setMessage(\"Desea agregar un incidente en este lugar?\")\n \t\t .setCancelable(false)\n \t\t .setPositiveButton(\"Si\", new DialogInterface.OnClickListener() \n \t\t {\n \t\t public void onClick(DialogInterface dialog, int id) \n \t\t {\n \t\t \t//Agregar el incidente\n// \t\t \tlstLatLngs.add(point);\n \t\t \tinsertarIncidente(point);\n// \t\t \tgMap.addMarker(new MarkerOptions().position(point));\n \t\t }\n \t\t })\n \t\t .setNegativeButton(\"No\", new DialogInterface.OnClickListener() \n \t\t {\n \t\t public void onClick(DialogInterface dialog, int id) \n \t\t {\n \t\t dialog.cancel();\n \t\t }\n \t\t });\n \t\t AlertDialog alert = builder.create();\n \t\t alert.show();\n \t\t\n \t}", "private void openPlacesDialog() {\n DialogInterface.OnClickListener listener = new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n LatLng markerLatLng = mLikelyPlaceLatLngs[which];\n String markerSnippet = mLikelyPlaceAddresses[which];\n if (mLikelyPlaceAttributions[which] != null) {\n markerSnippet = markerSnippet + \"\\n\" + mLikelyPlaceAttributions[which];\n }\n\n mMap.addMarker(new MarkerOptions()\n .title(mLikelyPlaceNames[which])\n .position(markerLatLng)\n .snippet(markerSnippet));\n\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(markerLatLng,\n DEFAULT_ZOOM));\n }\n };\n\n // Display the dialog.\n AlertDialog dialog = new AlertDialog.Builder(this)\n // .setTitle(R.string.pick_place)\n .setItems(mLikelyPlaceNames, listener)\n .show();\n }", "@Override\n public void onMapClick(LatLng arg0) {\n mBaiduMap.hideInfoWindow();\n if (window != null) {\n window.showAtLocation(search, Gravity.BOTTOM, 0, 0);\n }\n }", "@Override\n\t\t\t\tpublic void onMapClick(LatLng arg0) {\n\t\t\t\t\tgoogleMap.clear();\n\n\t\t\t\t\t// Creating an instance of MarkerOptions to set position\n\t\t\t\t\t// MarkerOptions markerOptions = new MarkerOptions();\n\n\t\t\t\t\t// Setting position on the MarkerOptions\n\t\t\t\t\tmarker.position(arg0);\n\n\t\t\t\t\t// Animating to the currently touched position\n\t\t\t\t\tgoogleMap.animateCamera(CameraUpdateFactory.newLatLng(arg0));\n\n\t\t\t\t\t// Adding marker on the GoogleMap\n\t\t\t\t\tMarker marker1 = googleMap.addMarker(marker);\n\n\t\t\t\t\t// Showing InfoWindow on the GoogleMap\n\t\t\t\t\tmarker1.showInfoWindow();\n\t\t\t\t}", "private void focus() {\n getMapRef().animateCamera(CameraUpdateFactory.newLatLngZoom(\n newHazard.getLatLong(), FOCUS_ZOOM));\n switch (newHazard.getTitle()) {\n case \"Road Works\" :\n getMapRef().addMarker(new MarkerOptions()\n .position(newHazard.getLatLong())\n .flat(true)\n .icon(BitmapDescriptorFactory.fromResource(R.drawable.ic_warning_orange_24dp)));\n break;\n case \"Pothole\" :\n getMapRef().addMarker(new MarkerOptions()\n .position(newHazard.getLatLong())\n .flat(true)\n .icon(BitmapDescriptorFactory.fromResource(R.drawable.ic_move_to_inbox_orange_24dp)));\n break;\n case \"Road Closure\" :\n getMapRef().addMarker(new MarkerOptions()\n .position(newHazard.getLatLong())\n .flat(true)\n .icon(BitmapDescriptorFactory.fromResource(R.drawable.ic_directions_car_orange_24dp)));\n break;\n case \"Flooding\" :\n getMapRef().addMarker(new MarkerOptions()\n .position(newHazard.getLatLong())\n .flat(true)\n .icon(BitmapDescriptorFactory.fromResource(R.drawable.ic_pool_orange_24dp)));\n break;\n case \"Traffic Accident\" :\n getMapRef().addMarker(new MarkerOptions()\n .position(newHazard.getLatLong())\n .flat(true)\n .icon(BitmapDescriptorFactory.fromResource(R.drawable.ic_directions_car_orange_24dp)));\n break;\n case \"Broken Glass\" :\n getMapRef().addMarker(new MarkerOptions()\n .position(newHazard.getLatLong())\n .flat(true)\n .icon(BitmapDescriptorFactory.fromResource(R.drawable.ic_local_bar_orange_24dp)));\n break;\n default :\n getMapRef().addMarker(new MarkerOptions()\n .position(newHazard.getLatLong())\n .flat(true)\n .icon(BitmapDescriptorFactory.fromResource(R.drawable.ic_error_orange_24dp)));\n break;\n }\n\n }", "public void setUpMapOnClick() {\n mMap.setOnMapClickListener(new OnMapClickListener() {\n @Override\n public void onMapClick(LatLng loc) {\n // Hiding the keyboard when tab on map.\n// new MapsUtil.GetAddressByLatLng(new IMaps() {\n// @Override\n// public void processFinished(Object obj) {\n// String address = (String) obj;\n// if (!address.isEmpty()) {\n// // Set marker's title\n// if (txtFromIsSelected) {\n// txtFrom.setText(address);\n// } else {\n// if (txtToIsSelected) {\n// txtTo.setText(address);\n// }\n// }\n// }\n// }\n// }).execute(loc);\n if (txtFromIsSelected) {\n txtFrom.setText(getCompleteAddressString(loc.latitude, loc.longitude));\n } else {\n if (txtToIsSelected) {\n txtTo.setText(getCompleteAddressString(loc.latitude, loc.longitude));\n }\n }\n closeKeyboard();\n selectFromMap = true;\n if (txtFromIsSelected) {\n if (circle != null) {\n circle.remove();\n// mMap.clear();\n }\n startLocation = loc;\n setStartMarker();\n circle = mMap.addCircle(new CircleOptions()\n .center(startLocation)\n .radius(3000)\n .strokeWidth(0.5f)\n .strokeColor(Color.rgb(0, 136, 255))\n .fillColor(Color.argb(20, 0, 136, 255)));\n txtFrom.setDropDownHeight(0);\n } else {\n if (txtToIsSelected) {\n endLocation = loc;\n setEndMarker();\n txtTo.setDropDownHeight(0);\n }\n }\n // Get address by latlng async\n\n }\n });\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n\n //setOnInfoWindowClick listener\n mMap.setOnInfoWindowClickListener(new GoogleMap.OnInfoWindowClickListener() {\n @Override\n public void onInfoWindowClick(Marker marker) {\n if(markerOnClick.get(marker).isItUserMarker()) {\n Intent intent = new Intent(MainActivity.this, FriendProfileActivity.class);\n intent.putExtra(\"friendID\", markerOnClick.get(marker).getID());\n startActivity(intent);\n }else{\n Intent intent = new Intent(MainActivity.this, AnswerTheQuestionActivity.class);\n intent.putExtra(\"questionID\", markerOnClick.get(marker).getID());\n intent.putExtra(\"userID\", user.getId());\n startActivityForResult(intent,ANSWER_THE_QUESTION_ACTIVITY_REQUSET_CODE);\n }\n }\n });\n restoreCurrentLocation();\n }", "@Override\n public void onMapClick(LatLng latLng) {\n System.out.println(\"The map was clicked\");\n if(lineSelected == true) {\n resetInfoBox();\n }\n }", "private void openPlacesDialog() {\n // Ask the user to choose the place where they are now.\n DialogInterface.OnClickListener listener =\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n // The \"which\" argument contains the position of the selected item.\n LatLng markerLatLng = mLikelyPlaceLatLngs[which];\n String markerSnippet = mLikelyPlaceAddresses[which];\n if (mLikelyPlaceAttributions[which] != null) {\n markerSnippet = markerSnippet + \"\\n\" + mLikelyPlaceAttributions[which];\n }\n\n // Position the map's camera at the location of the marker.\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(markerLatLng,\n DEFAULT_ZOOM));\n }\n };\n\n // Display the dialog.\n AlertDialog dialog = new AlertDialog.Builder(this)\n .setTitle(R.string.pick_place)\n .setItems(mLikelyPlaceNames, listener)\n .show();\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n //Add markers to show places to eat on campus\n LatLng Jester = new LatLng(30.283086, -97.736775);\n LatLng Texas_Union = new LatLng(30.287125, -97.741109);\n LatLng Kinsolving = new LatLng(30.290536, -97.739621);\n mMap.addMarker(new MarkerOptions().position(Texas_Union).title(\"Texas Union Cafe\"));\n mMap.addMarker(new MarkerOptions().position(Jester).title(\"Jester Dining Hall\"));\n mMap.addMarker(new MarkerOptions().position(Kinsolving).title(\"Kinsolving Dining Hall\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(Jester));\n //Add a map click listener\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n\n /**\n * Manipulates the map when it is clicked/tapped.\n * Open a dialog that will allow a user to name and create\n * a marker where they tap on the screen.\n */\n\n @Override\n public void onMapClick(LatLng latLng) {\n AlertDialog.Builder builder = new AlertDialog.Builder(MapsActivity.this);\n //Set the title of the dialog.\n builder.setTitle(\"Create a new Marker\");\n\n final LatLng markerPoint = latLng;\n\n // Set up the input\n final EditText input = new EditText(MapsActivity.this);\n // Specify the type of input expected; this, for example, sets the input as a password, and will mask the text\n input.setInputType(InputType.TYPE_CLASS_TEXT);\n builder.setView(input);\n\n // Set up the buttons\n builder.setPositiveButton(\"Create\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n //Create a new marker with the Latitude and Longitude of the click event.\n MarkerOptions marker = new MarkerOptions().position(\n new LatLng(markerPoint.latitude, markerPoint.longitude)).title(input.getText().toString());\n mMap.addMarker(marker);\n }\n });\n builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n //Cancel\n dialog.cancel();\n }\n });\n\n builder.show();\n\n }\n });\n //Set UI settings.\n mMap.getUiSettings().setZoomControlsEnabled(true);\n mMap.getUiSettings().setCompassEnabled(true);\n mMap.getUiSettings().setMapToolbarEnabled(true);\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n MarkerOptions marker = new MarkerOptions().position(\n new LatLng(markerPoint.latitude, markerPoint.longitude)).title(input.getText().toString());\n mMap.addMarker(marker);\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n LatLng markerLatLng = mLikelyPlaceLatLngs[which];\n String markerSnippet = mLikelyPlaceAddresses[which];\n if (mLikelyPlaceAttributions[which] != null) {\n markerSnippet = markerSnippet + \"\\n\" + mLikelyPlaceAttributions[which];\n }\n int height = 200;\n int width = 100;\n BitmapDrawable bitmapdraw = (BitmapDrawable) getResources().getDrawable(R.drawable.ic_car_marker);\n Bitmap b = bitmapdraw.getBitmap();\n Bitmap smallMarker = Bitmap.createScaledBitmap(b, width, height, false);\n // Add a marker for the selected place, with an info window\n // showing information about that place.\n mMap.addMarker(new MarkerOptions()\n .title(mLikelyPlaceNames[which])\n .position(markerLatLng)\n .snippet(markerSnippet))\n .setIcon(BitmapDescriptorFactory.fromBitmap(smallMarker));\n\n // Position the customer_map's camera at the location of the marker.\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(markerLatLng,\n DEFAULT_ZOOM));\n }", "public void onClick(DialogInterface dialog,int id) {\n LatLng newlatlng = getLatLngFromAddress(userInput.getText().toString());\n if (newlatlng != null) {\n startLocation = newlatlng;\n MarkerOptions marker = new MarkerOptions()\n .position(startLocation)\n .title(\"Start\")\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_BLUE));\n markers.add(marker);\n mMap.addMarker(marker);\n zoomMap();\n getEndLocation();\n } else\n {\n TextView alertTxtView = findViewById(R.id.alertTxtView);\n alertTxtView.setText(\"Could not find address\");\n }\n }", "@Override\n public void onMapClick(LatLng latLng) {\n map.addMarker(new MarkerOptions().position(latLng));\n }", "@Override\n public void onClick(View v) {\n pickPointOnMap();\n }", "@Override\n public void onDialogPositiveClick(DialogFragment dialog) {\n\n String loc_name = ((AddLocationDialog)dialog).getNameFromUser();\n //if user enters nothing\n if ( loc_name.length() != 0){\n location.setName(loc_name);\n }\n\n //put a marker if a user adds to favorite\n Marker marker = mMap.addMarker(new MarkerOptions().position(new LatLng(\n location.getLatLng().latitude,\n location.getLatLng().longitude))\n .title(location.getName()));\n\n marker.showInfoWindow();\n\n //Save the marker in shared preferences\n addMarkerToPref(marker);\n }", "public void mapIsClicked(View view) {\n Controller.viewMappa();\n }", "@Override\n public void onInfoWindowClick(Marker marker) {\n\n if (Config.CEK_KONEKSI(ListDealerMaps.this)) {\n if (markerAccessMapping.get(marker).equals(\"1\")) {\n Intent resultIntent = new Intent();\n resultIntent.putExtra(Config.DISP_KD_DEALER, markerIdMapping.get(marker));\n resultIntent.putExtra(Config.DISP_COY_DEALER, markerCoyMapping.get(marker));\n resultIntent.putExtra(Config.DISP_NAMA_DEALER, marker.getTitle());\n setResult(Activity.RESULT_OK, resultIntent);\n finish();\n }else{\n Toast.makeText(ListDealerMaps.this, Config.ALERT_ONLY_VIEW, Toast.LENGTH_SHORT).show();\n }\n } else {\n showDialog(Config.TAMPIL_ERROR);\n }\n\n }", "@Override\n public void onMapClick(LatLng latLng) {\n if(findViewById(R.id.marker_window).getVisibility() == View.VISIBLE){\n findViewById(R.id.marker_window).setVisibility(View.INVISIBLE);\n setIconListVisibility(true);\n }else{\n if (!firstMapTouch) {\n Toast.makeText(getApplicationContext(), R.string.maps_onmapclick, Toast.LENGTH_SHORT).show();\n firstMapTouch = true;\n }\n }\n }", "@Override\n\t\t\tpublic void onInfoWindowClick(Marker marker) {\n\t\t\t\tint id = hashmap.get(marker)-1;\n\t\t\t\tBundle bundle = new Bundle();\n\t\t\t\tDataBase.Object object = new Object();\n\t\t\t\tobject = list.get(id);\n\n\t\t\t\tbundle.putSerializable(\"ob\", object);\n\n\t\t\t\tIntent intent = new Intent(getActivity(), Places.class);\n\t\t\t\tintent.putExtras(bundle);\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "@Override\n public void onMapLongClick(LatLng point){\n location = new cLocation(point, this);\n\n //Open a dialog for the user to allow the user to set the name for the saved location\n DialogFragment dialog = new AddLocationDialog();\n dialog.show(getFragmentManager(), getText(R.string.map_ask_add).toString());\n }", "@Override\n\t\t\t\tpublic boolean onMarkerClick(Marker arg0) {\n\t\t\t\t\t\n\t\t\t\t\tfor(final PoiInfo poiInfo:AppContext.listmap){\n\t\t\t\t\t\tif(poiInfo.location.latitude==arg0.getPosition().latitude&&poiInfo.location.longitude==arg0.getPosition().longitude){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tView mView = LayoutInflater.from(ZhouBianYaodian.this).inflate(R.layout.map_massage_data, null);\n\t\t\t\t\t\t\tTextView dataname=(TextView) mView.findViewById(R.id.txt_map_name);\n\t\t\t\t\t\t\tTextView address=(TextView)mView. findViewById(R.id.txt_map_address);\n\t\t\t\t\t\t\tImageView imageView=(ImageView)mView. findViewById(R.id.map_image_call); \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tdataname.setText(poiInfo.name==null?\"\":poiInfo.name);\n\t\t\t\t\t\t\t\taddress.setText(poiInfo.address==null?\"\":poiInfo.address);\n\t\t\t\t\t\t\t\tif(poiInfo.phoneNum!=null&&!poiInfo.phoneNum.equals(\"\")){\n\t\t\t\t\t\t\t\t\timageView.setVisibility(ImageView.VISIBLE);\n\t\t\t\t\t\t\t\t\timageView.setOnClickListener(new OnClickListener() {\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\t\t\t\t\tIntent intent = new Intent(Intent.ACTION_DIAL, Uri\n\t\t\t\t\t\t\t\t\t\t\t\t\t.parse(\"tel:\" + poiInfo.phoneNum));\n\t\t\t\t\t\t\t\t\t\t\tLog.d(\"测试数据\", poiInfo.phoneNum);\n\t\t\t\t\t\t\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tmInfoWindow= new InfoWindow(mView,arg0.getPosition(), -47);\n\t\t\t\t\t\t\tmBaiduMap.showInfoWindow(mInfoWindow);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\treturn false;\n\t\t\t\t}", "@Override\n public void onMapClick(LatLng latLng) {\n MarkerOptions markerOptions = new MarkerOptions();\n markerOptions.position(latLng);\n\n String address = getMarkerAddress(latLng);\n //if there is a valid address associated with marker\n if (address != null) {\n markerOptions.title(address);\n }\n mMap.clear();\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng, 15));\n mMap.addMarker(markerOptions);\n markerPlaced = true;\n lat = latLng.latitude;\n lon = latLng.longitude;\n }", "@Override\n public void onMapClick(LatLng latLng) {\n }", "@Override\n public void onMapClick(LatLng latLng) {\n }", "@Override\n public void onClick(View v) {\n new AlertDialog.Builder(MainActivity.this)\n .setIcon(android.R.drawable.ic_menu_edit)\n .setTitle(\"Textual Description\")\n .setMessage(\"Is this the location where you would like to describe something?\")\n .setPositiveButton(\"Yes\", new DialogInterface.OnClickListener()\n {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n\n GridPoint gp = myGridPoint();\n MarkerOptions markerOptions = new MarkerOptions().gridPoint(gp);\n markerOptions.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_RED));\n Marker marker = mMap.addMarker(markerOptions);\n describe();\n\n }\n\n })\n .setNegativeButton(\"No\", null)\n .show();\n\n }", "public void onClick(DialogInterface dialog,int id) {\n LatLng newlatlng = getLatLngFromAddress(userInput.getText().toString());\n if (newlatlng != null) {\n endLocation = newlatlng;\n MarkerOptions marker = new MarkerOptions()\n .position(endLocation)\n .title(\"End\")\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_BLUE));\n markers.add(marker);\n mMap.addMarker(marker);\n zoomMap();\n } else\n {\n TextView alertTxtView = findViewById(R.id.alertTxtView);\n alertTxtView.setText(\"Could not find address\");\n }\n }", "@Override\n public void onMapClick(LatLng latLng) {\n showMarkerButtons(false);\n current_number=\"\";\n markerClickflag=false;\n }", "@Override\n\t\t\tpublic void onInfoWindowClick(Marker marker) {\n\t\t\t}", "@Override\n public void onClick(View view) {\n Uri gmmIntentUri = Uri.parse(\"geo:0, 0?q=Animal+Shelter+near+me\");\n Intent mapIntent = new Intent(Intent.ACTION_VIEW, gmmIntentUri);\n mapIntent.setPackage(\"com.google.android.apps.maps\");\n startActivity(mapIntent);\n }", "@Override\n public void onClick(View view) {\n Uri gmmIntentUri = Uri.parse(\"geo:0,0?q=\" + selected_location);\n Intent mapIntent = new Intent(Intent.ACTION_VIEW, gmmIntentUri);\n mapIntent.setPackage(\"com.google.android.apps.maps\");\n if (mapIntent.resolveActivity(getActivity().getPackageManager()) != null) {\n startActivity(mapIntent);\n }\n }", "private void onOpenMapButtonClicked() {\n\n // Create a new intent to start an map activity\n Intent mapIntent =\n new Intent(DetailActivity.this, MapsActivity.class);\n if (mMapDestination != null && mMapDestination.getLocation() != null &&\n mMapDestination.getRadius() >= 0) {\n MapDestination mapDestination =\n new MapDestination(mMapDestination.getLatitude(),\n mMapDestination.getLongitude(), mMapDestination.getLocation(),\n mMapDestination.getRadius());\n mapIntent.putExtra(Constants.EXTRA_ALARM_DESTINATION, mapDestination);\n }\n startActivityForResult(mapIntent, MAP_REQUEST_CODE);\n\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n LatLng markerLatLng = mLikelyPlaceLatLngs[which];\n String markerSnippet = mLikelyPlaceAddresses[which];\n if (mLikelyPlaceAttributions[which] != null) {\n markerSnippet = markerSnippet + \"\\n\" + mLikelyPlaceAttributions[which];\n }\n\n // Position the map's camera at the location of the marker.\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(markerLatLng,\n DEFAULT_ZOOM));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n currentPosition = new LatLng(currentLocation.getLatitude(), currentLocation.getLongitude());\n MarkerOptions currentPositionMarker = new MarkerOptions()\n .position(currentPosition)\n .title(\"You are Here\")\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_ROSE));\n // Add current location marker to map\n mMap.addMarker(currentPositionMarker);\n addArchitectureMarkers();\n mMap.getUiSettings().setZoomControlsEnabled(true);\n mMap.getUiSettings().setMapToolbarEnabled(false);\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n @Override\n public void onMapClick(LatLng latLng) {\n searchBar.setVisibility(View.GONE);\n searchBar.setText(\"\");\n inputManager.hideSoftInputFromWindow(searchBar.getWindowToken(), 0);\n }\n });\n mMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {\n @Override\n public boolean onMarkerClick(Marker marker) {\n Log.i(\"testing\", String.valueOf(marker.getPosition()));\n if (!marker.getPosition().equals(currentPosition)) {\n //display pop-up when marker clicked\n Intent intent = new Intent(MapsActivity.this, PopUpInfoWindow.class);\n\n Bundle bundle = new Bundle();\n bundle.putSerializable(\"MARKER_TITLE\", marker.getTitle());\n bundle.putParcelable(\"MARKER_LATLNG\", marker.getPosition());\n bundle.putParcelable(\"CURRENT_LATLNG\", currentPosition);\n bundle.putString(\"MARKER_PLACEID\", marker.getTag().toString());\n destinationMarker = marker;\n //send data to new activity\n intent.putExtras(bundle);\n startActivity(intent);\n }\n return false;\n }\n }\n );\n //create loading screen on start up\n loadingDialog = new AlertDialog.Builder(this).create();\n loadingDialog.setCancelable(false);\n LayoutInflater inflater = getLayoutInflater();\n View dialogView = inflater.inflate(R.layout.progress_bar_dialog, null);\n loadingDialog.setView(dialogView);\n loadingDialog.show();\n\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n return;\n }\n mMap.setMyLocationEnabled(true);\n }", "@OnClick({R.id.address_img, R.id.address})\n void OnClickMap() {\n // Open location on map\n Intent mapIntent=new Intent(Intent.ACTION_VIEW);\n mapIntent.setData(Uri.parse(\"geo:0,0?q=\" + getString(R.string.latitude) + \",\"\n + getString(R.string.longitude)));\n if (mapIntent.resolveActivity(getPackageManager()) != null) {\n startActivity(mapIntent);\n }\n }", "@Override\n public void onClick(View v) {\n String label = response.body().getEventList().get(0).getEventName();\n String strUri = \"http://maps.google.com/maps?q=loc:\" + response.body().getEventList().get(0).getEventLatitude() + \",\" + response.body().getEventList().get(0).getEventLongitude() + \" (\" + label + \")\";\n Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(strUri));\n\n intent.setClassName(\"com.google.android.apps.maps\", \"com.google.android.maps.MapsActivity\");\n\n startActivity(intent);\n\n\n }", "@Override\n\t\t\t\t\t\t\tpublic void onTap(GeoPoint pt, MapView mapView) {\n\t\t\t\t\t\t\t\tint lastTouchedIndex = poiOverlay\n\t\t\t\t\t\t\t\t\t\t.getLastFocusedIndex();\n\t\t\t\t\t\t\t\tif (lastTouchedIndex > -1) {\n\t\t\t\t\t\t\t\t\tOverlayItem tapped = poiOverlay\n\t\t\t\t\t\t\t\t\t\t\t.getItem(lastTouchedIndex);\n\t\t\t\t\t\t\t\t\tannotation.showAnnotationView(tapped);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tIntent intent = new Intent();\n\t\t\t\t\t\t\t\tintent.setClass(MapActivity.this,\n\t\t\t\t\t\t\t\t\t\tPatientActivity.class);\n\t\t\t\t\t\t\t\tintent.putExtra(\"Id\", poiOverlay\n\t\t\t\t\t\t\t\t\t\t.getItem(lastTouchedIndex).getSnippet());\n\t\t\t\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\t\t\t\tfinish();\n\t\t\t\t\t\t\t}", "public void onAddByMapPressed( ) {\n Router.Instance().changeView(Router.Views.AddWithMap);\n }", "public void onClick(DialogInterface dialog, int id) \n \t\t {\n \t\t \tinsertarIncidente(point);\n// \t\t \tgMap.addMarker(new MarkerOptions().position(point));\n \t\t }", "@Override\r\n public void onMapClick(LatLng latLng) {\n geocoder1 = new Geocoder(getApplicationContext(), Locale.getDefault());\r\n String State = null;\r\n String City = null;\r\n String Country = null;\r\n try {\r\n\r\n List<Address> Addresses = geocoder1.getFromLocation(latLng.latitude, latLng.longitude, 1);\r\n if (Addresses != null && Addresses.size() > 0) {\r\n\r\n City = Addresses.get(0).getAddressLine(0);\r\n State = Addresses.get(0).getAddressLine(1);\r\n Country = Addresses.get(0).getAddressLine(2);\r\n\r\n }\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n // Clears the previously touched position\r\n googleMap.clear();\r\n\r\n TextView tvLocation = (TextView) findViewById(R.id.tv_location);\r\n\r\n\r\n // Animating to the touched position\r\n googleMap.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng, 16.0f));\r\n\r\n // Placing a marker on the touched position\r\n googleMap.addMarker(new MarkerOptions().position(latLng).title(City + \",\" + State + \",\" + Country));\r\n\r\n tvLocation.setText(\"Latitude:\" + latitude + \", Longitude:\" + longitude + \"\\n\" + City + \",\" + State + \",\\n\" + Country);\r\n\r\n }", "@Override\n public void onInfoWindowLongClick(Marker marker) {\n if (marker.getTitle().equals(\"New Maintenance Form\")){\n newOld = false; //don't have to do anything.....\n }else{\n //newOld = true;\n load_id=marker.getSnippet();\n }\n //pull up the maintenance form\n Intent intent = new Intent(MaintenanceMapActivity.this, MaintenanceActivity.class);\n intent.putExtra(\"latitude\", latitude );\n intent.putExtra(\"longitude\",longitude);\n startActivity(intent);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n MarkerOptions m= new MarkerOptions().position(new LatLng(28.7041,77.1025)).icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE)).title(\"tap to get the alerts\");\n n= mMap.addMarker(m);\n\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n @Override\n public void onMapClick(LatLng latLng) {\n\n if (!lati.equals(\"false\") && !longi.equals(\"false\")) {\n Double la = Double.parseDouble(lati);\n Double lo = Double.parseDouble(longi);\n // Add a marker in Sydney and move the camera\n n.setPosition(new LatLng(la,lo));\n n.setTitle(level);\n if(level.equals(\"hard\")){\n n.setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_MAGENTA));}\n else\n {\n n.setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN));}\n LatLng posi = new LatLng(la, lo);\n mMap.moveCamera(CameraUpdateFactory.newLatLng(posi));\n }\n\n\n }\n });\n\n\n\n }", "public void onClick(View v) {\n\t\t\t\topenMap(v);\r\n\t\t\t}", "public void onClick(View v) {\n\t\t\t\topenMap(v);\r\n\t\t\t}", "public void onClick(View v) {\n\t\t\t\topenMap(v);\r\n\t\t\t}", "@Override\r\n public boolean onTap(GeoPoint arg0, MapView arg1) {\n if(getMyLocation()!=null){\r\n int size = 30;\r\n Point out=new Point();\r\n mMapView.getProjection().toPixels(getMyLocation(), out); \r\n Rect rect = new Rect(out.x-size,out.y-size,out.x+size,out.y+size);\r\n mMapView.getProjection().toPixels(arg0, out);\r\n if(rect.contains(out.x, out.y)){\r\n //Log.e(\"MyLocation\", \"click my location \");\r\n mPopView.setVisibility(View.GONE);\r\n MapView.LayoutParams params = (MapView.LayoutParams) mPopView.getLayoutParams();\r\n params.x = 0;// Y轴偏移\r\n params.y = -5;// Y轴偏移\r\n GeoPoint point = getMyLocation().e();\r\n params.point = point;\r\n //mMapCtrl.animateTo(point);\r\n mMapView.updateViewLayout(mPopView, params);\r\n mPopView.setVisibility(View.VISIBLE);\r\n }else{\r\n mPopView.setVisibility(View.GONE) ; \r\n }\r\n }\r\n return super.onTap(arg0, arg1);\r\n }", "@Override\n public void onInfoWindowClick(Marker marker) {\n Integer markerId = markers.get(marker);\n InfoWindowClicked(markerId);\n }", "public void onInfoWindowClick(Marker marker2) {\n\n AlertDialog.Builder builder2 = new AlertDialog.Builder(Detalles.this);\n builder2.setTitle(\"Epicent\");\n builder2.setMessage(\"Referencia : \" +\"ddddddd\" +\"\\n\" +\n \"Fecha local : \" + \"ccccccc\" +\"\\n\" +\n \"Hora local : \" + \"ccccccc\"+ \"\\n\" +\n \"Profundidad : \" + \"ccccccc\"+\" km\"+ \"\\n\" +\n \"Intensidad : \" + \"ccccccc\"+ \"\\n\" +\n \"Magnitud : \" + \"ccccccc\"+ \"\\n\" +\n \"Ubicación : \" + \"ccccccc\"+ \", \" + \"ccccccc\");\n builder2.setNegativeButton(\"Cerrar\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog2, int which) {\n dialog2.cancel();\n }\n });\n\n builder2.setCancelable(true);\n builder2.create().show();\n\n }", "@Override\n public void onMapClick(LatLng latLng) {\n MarkerOptions markerOptions = new MarkerOptions();\n\n //Set position of market\n\n\n //markerOptions.position(latLng);\n markerOptions.position(defaultLocation);\n //set title marker\n markerOptions.title(defaultLocation.latitude + \": \" + defaultLocation.longitude);\n\n //removeall markers\n // googleMap.clear();\n //Animating to zoom the marker\n googleMap.animateCamera(CameraUpdateFactory.newLatLngZoom(\n defaultLocation, 10\n ));\n //Add marker on map\n googleMap.addMarker(markerOptions);\n\n\n\n }", "@Override\n public void handleMapClick(GoogleMap googleMap) {\n this.setGoogleMapClickable(googleMap);\n }", "@Override\n public void onClick(View view) {\n if (markerPlaced) {\n //Firestore handler method that adds geopoint as a field in database\n setPickupLocation(bookId, lat, lon);\n Toast toast = Toast.makeText(SetLocationActivity.this,\n \"Pickup location has been updated\", Toast.LENGTH_SHORT);\n toast.show();\n } else {\n Toast toast = Toast.makeText(SetLocationActivity.this,\n \"Place a marker first\", Toast.LENGTH_SHORT);\n toast.show();\n }\n }", "@Override\n public void handleOnGoogleMapClick(GoogleMap mMap, LatLng latLng) {\n mMap.clear();\n mMap.addMarker(new MarkerOptions()\n .position(latLng)\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_RED)));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n for(int i=0;i<list.size();i++){\n LatLng pos = new LatLng(list.get(i).getLatitude(),list.get(i).getLongitude());\n mMap.addMarker(new MarkerOptions().position(pos).title(list.get(i).getTitle()).snippet(list.get(i).getDescription()));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(pos));\n }\n\n mMap.setOnMapLongClickListener(new GoogleMap.OnMapLongClickListener() {\n @Override\n public void onMapLongClick(final LatLng latLng) {\n final AlertDialog.Builder mBuilder = new AlertDialog.Builder(MapsActivity.this);\n final View mView =getLayoutInflater().inflate(R.layout.dialog_place,null);\n final EditText location_name =mView.findViewById(R.id.dialog_name);\n final EditText location_description = mView.findViewById(R.id.dialog_description);\n final String loc = location_name.getText().toString();\n final String desc = location_description.getText().toString();\n Button yes = mView.findViewById(R.id.yes);\n Button no = mView.findViewById(R.id.no);\n\n// LatLng sydney = new LatLng(-34, 151);\n// mMap.addMarker(new MarkerOptions().position(latLng).title(\"Marker in Sydney\").snippet(\"sdsdwdw\"));\n// mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n\n no.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n dialog.cancel();\n }\n });\n yes.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n mMap.addMarker(new MarkerOptions().position(latLng).title(loc).snippet(desc));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));\n Places places = new Places(location_name.getText().toString(),location_description.getText().toString(),latLng.latitude,latLng.longitude);\n //list.add(0,new Places(location_name.getText().toString(),location_description.getText().toString(),latLng.latitude,latLng.longitude));\n myDB.insertNote(places);\n list = myDB.getNotes();\n customAdapter.setContents(list);\n dialog.cancel();\n }\n });\n mBuilder.setView(mView);\n dialog = mBuilder.create();\n dialog.show();\n }\n });\n\n listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n LatLng pos = new LatLng(list.get(position).getLatitude(),list.get(position).getLongitude());\n map_layout.setVisibility(View.VISIBLE);\n list_layout.setVisibility(View.GONE);\n //map.moveCamera(CameraUpdateFactory.newLatLng(pos));\n mMap.animateCamera(CameraUpdateFactory.newLatLng(pos));\n }\n });\n }", "@Override\n public void onMapReady(GoogleMap map) {\n mMap = map;\n\n // Use a custom info window adapter to handle multiple lines of text in the\n // info window contents.\n mMap.setInfoWindowAdapter(new GoogleMap.InfoWindowAdapter() {\n\n @Override\n // Return null here, so that getInfoContents() is called next.\n public View getInfoWindow(Marker arg0) {\n return null;\n }\n\n @Override\n public View getInfoContents(Marker marker) {\n // Inflate the layouts for the info window, title and snippet.\n View infoWindow = getLayoutInflater().inflate(R.layout.custom_info_contents,\n (FrameLayout) findViewById(R.id.map), false);\n\n TextView title = ((TextView) infoWindow.findViewById(R.id.title));\n title.setText(marker.getTitle());\n\n TextView snippet = ((TextView) infoWindow.findViewById(R.id.snippet));\n snippet.setText(marker.getSnippet());\n\n return infoWindow;\n }\n });\n\n // Turn on the My Location layer and the related control on the map.\n updateLocationUI();\n\n // Get the current location of the device and set the position of the map.\n getDeviceLocation();\n\n initializeOtherSettlements(new LatLng(mLastKnownLocation.getLatitude(), mLastKnownLocation.getLongitude()));\n initializeQuestLocations(new LatLng(mLastKnownLocation.getLatitude(), mLastKnownLocation.getLongitude()));\n\n mMap.setOnMarkerClickListener(this);\n mMap.setOnMapClickListener(this);\n mMap.setOnPoiClickListener(this);\n mMap.setOnInfoWindowClickListener(this);\n\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(\n new LatLng(mLastKnownLocation.getLatitude(),\n mLastKnownLocation.getLongitude()), 9));\n\n final PlaceAutocompleteFragment autocompleteFragment = (PlaceAutocompleteFragment)\n getFragmentManager().findFragmentById(R.id.place_autocomplete_fragment);\n\n autocompleteFragment.getView().setBackgroundColor(Color.WHITE);\n autocompleteFragment.getView().setVisibility(View.GONE);\n autocompleteFragment.setOnPlaceSelectedListener(new PlaceSelectionListener() {\n @Override\n public void onPlaceSelected(Place place) {\n //Bias results towards the user's current location\n /*autocompleteFragment.setBoundsBias(new LatLngBounds(\n new LatLng(place.getLatLng().latitude, place.getLatLng().longitude),\n new LatLng(place.getLatLng().latitude, place.getLatLng().longitude)));*/\n\n //Get info about the selected place.\n //Log.i(TAG, \"Place: \" + place.getName());\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(\n new LatLng(place.getLatLng().latitude,\n place.getLatLng().longitude), mMap.getCameraPosition().zoom));\n\n addMarkerAtPoi(place);\n }\n\n @Override\n public void onError(Status status) {\n // TODO: Handle the error.\n Log.i(TAG, \"An error occurred: \" + status);\n }\n });\n\n updateMapHistory();\n updateCustomTimeUI();\n }", "@Override\n\t\t\t\t\tpublic void onInfoWindowClick(Marker marker) {\n\t\t\t\t\t\tLog.d(\"ASD\", marker.getTitle());\n\t\t\t\t\t\tString markerItemId = infoList.get(marker.getTitle());\n\t\t\t\t\t\tonMapWindwosClick(markerItemId, marker.getTitle());\n\t\t\t\t\t}", "@Override\n public void onMapLongClick(@NonNull LatLng point) {\n latitude = String.valueOf(point.getLatitude());\n longitude = String.valueOf(point.getLongitude());\n mapboxMap.addMarker(new MarkerOptions()\n .position(point)\n .title(\"New Maintenance Form\")\n .snippet(\"Click to add site\")\n );\n\n\n }", "@Override\n public void run() {\n AlertDialog.Builder dialog = new AlertDialog.Builder( getMapController().getContext());\n dialog.setTitle(geoCode.getDisplayName());\n dialog.show();\n }", "@Override\n\t\t\tpublic boolean onMyLocationButtonClick() {\n\t\t\t\tsupportClassObj.fitInMap(parentActivity.getItinerary(), googlemap, parentActivity);\n\t\t\t\treturn true;\n\t\t\t}", "@Override\n public void onClick(DialogInterface dialog, int which) {\n\n String latitude = mTrip.getLatLngString2().split(\"_\")[0]; //the lat of destination\n String longitude = mTrip.getLatLngString2().split(\"_\")[1]; //long of destination\n\n Log.i(TAG, \"StartTripActivity >> onClick: lat >> \" + latitude + \" -- log >> \" + longitude);\n Uri intentUri = Uri.parse(\"google.navigation:q=\" + latitude + \",\" + longitude);\n Intent mapIntent = new Intent(Intent.ACTION_VIEW, intentUri);\n mapIntent.setPackage(\"com.google.android.apps.maps\");\n Intent intentToService = new Intent(getApplicationContext(),\n FloatingService.class);\n\n intentToService.putExtra(KEY_PASS_TRIP, mTrip);\n\n Log.i(TAG, \"StartTripActivity >> onClick: \" + mTrip.getName());\n\n try {\n if (mapIntent.resolveActivity(getPackageManager()) != null) {\n startActivity(mapIntent);\n }\n\n } catch (NullPointerException e) {\n Log.e(\"MAP\", \"map error !! \");\n// Toast.makeText(getApplicationContext(),\n// \"Couldn't open map!! \", Toast.LENGTH_LONG).show();\n }\n if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {\n startService(intentToService);\n finish();\n } else if (Settings.canDrawOverlays(StartTripActivity.this)) {\n startService(intentToService);\n finish();\n } else {\n askPermission();\n// Toast.makeText(getApplicationContext(),\n// \"we Need permission to display your notes in floating view\", Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n public void onClick(View v) {\n ((MapActivity) getActivity()).showMenu();\n }", "private void updatePopupPosition() {\n // get the annotation's screen coordinates\n SKScreenPoint screenPoint = mapView.coordinateToPoint(selectedAnnotation.getLocation());\n // change the popup's (screen) position\n mapPopup.changePosition(screenPoint.getX(), screenPoint.getY(), 65);\n }", "@Override\n public void onClick(View v) {\n Uri gmmIntentUri = Uri.parse(\"geo:37.7749,-122.4194\");\n Intent mapIntent = new Intent(Intent.ACTION_VIEW, gmmIntentUri);\n mapIntent.setPackage(\"com.google.android.apps.maps\");\n startActivity(mapIntent);\n }", "public void onClick(View v){\n \t\ttry {\r\n \t\t\tEditText textLocation = (EditText)findViewById(R.id.edtLocation);\r\n \t\t\tmapLocation = textLocation.getText().toString();\r\n \t\t\t\r\n \t\t\tEditText textDetails = (EditText)findViewById(R.id.edtDetails);\r\n \t\t\tmapSnipper = textDetails.getText().toString();\r\n \t\t\t\r\n \t\t\t\r\n \t\t\tEditText floatLongitude = (EditText)findViewById(R.id.edtLong);\r\n \t\t\tlon = Float.valueOf(floatLongitude.getText().toString());\r\n \t\t\t\r\n \t\t\tEditText floatLatitude = (EditText)findViewById(R.id.edtLat);\r\n \t\t\tlat = Float.valueOf(floatLatitude.getText().toString());\r\n \t\t\t\r\n \t\t\t//Only Lon and Lat between -90 and 90 are allowed\r\n \t\t\tif (lat >=-90 && lat <=90 && lon >=-90 && lon <=90) {\r\n \t\t\tfinal GoogleMap mMap;\r\n \t\t\tmMap = ((MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap();\r\n \t\t\tmMap.addMarker(new MarkerOptions()\r\n \t\t\t .position(new LatLng(lat,lon))\r\n \t\t\t .title(mapLocation)\r\n \t\t\t .snippet(mapSnipper));\r\n \t\t\t}\r\n \t\t\telse\r\n \t\t\t{\r\n \t\t\t\tToast.makeText(getBaseContext(), \"Lonitude and Latitude can only be numbers bewteen -90 to 90 e.g 3.148\", Toast.LENGTH_LONG).show();\r\n \t\t\t}\r\n \t}\r\n \tcatch (Exception e)\r\n \t{\r\n \t\tToast.makeText(getBaseContext(), \"Lonitude and Latitude can only be numbers bewteen -90 to 90 e.g 3.148\", Toast.LENGTH_LONG).show();\r\n \t}\r\n \t}", "@Override\r\n\t\t\t\t\t\t\t\t\t\tpublic void onClick(\r\n\t\t\t\t\t\t\t\t\t\t\t\tDialogInterface dialog,\r\n\t\t\t\t\t\t\t\t\t\t\t\tint which) {\n\t\t\t\t\t\t\t\t\t\t\tIntent intent = new Intent(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tAdminMapField.this,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tAdminMapField.class);\r\n\t\t\t\t\t\t\t\t\t\t\tstartActivity(intent);\r\n\t\t\t\t\t\t\t\t\t\t}", "@Override\n public void onInfoWindowClick(Marker marker) {\n return;\n// openTimesheetInfo(marker.getTitle());\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = null,chooser = null;\n\t\t\t\tintent = new Intent(android.content.Intent.ACTION_VIEW);\n\t \t\t//For any Action\n\t \t\tintent.setData(Uri.parse(\"geo:27.961429,76.402788\"));\n\t \t\tchooser = Intent.createChooser(intent,\"MAPS Launch\");\n\t \t\tstartActivity(chooser);\n\t\t\t}", "@Override\n public void onClick(View v) {\n Log.d(LOG_TAG, \"Pressed FAB!\");\n if (userLocation != null){\n CameraPosition cameraPosition = new CameraPosition.Builder()\n .target(userLocation) // Sets the center of the map to Mountain View\n .zoom(16) // Sets the zoom\n .build(); // Creates a CameraPosition from the builder\n mMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition), 250, null); // Animation takes 250ms\n Log.d(LOG_TAG, \"> Moved to current user location.\");\n }\n else {\n Log.w(LOG_TAG, \" > Couldn't move to current user location, userLocation == null\");\n Toast.makeText(getApplicationContext(), \"Unknown location... Please try again.\", Toast.LENGTH_SHORT).show();\n }\n vibrator.vibrate(VibrationEffect.createOneShot(30, 30));\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(getApplicationContext(), MapActivity.class);\n startActivity(intent);\n }", "@Override\n public void onMapClick( LatLng latLng ) {\n googleMap.clear();\n Log.d( \"LAT/LONG\", latLng.toString() );\n googleMap.addCircle( new CircleOptions()\n .center( latLng )\n .radius( 10000 )\n .strokeColor( ContextCompat.getColor( Objects.requireNonNull( getContext() ), R.color.colorLightPurple ) )\n .fillColor( ContextCompat.getColor( Objects.requireNonNull( getContext() ), R.color.transparentcolorLightPurple ) ) );\n\n googleMap.addMarker( new MarkerOptions().position( latLng )\n .icon( BitmapDescriptorFactory.defaultMarker( BitmapDescriptorFactory.HUE_VIOLET ) ) );\n googleMap.moveCamera( CameraUpdateFactory.newLatLngZoom( latLng, 10.0f ) );\n cLocate = latLng;\n }", "@Override\n public void onMapReady(final GoogleMap map) {\n mMap = map;\n\n mMap.setInfoWindowAdapter(new GoogleMap.InfoWindowAdapter() {\n\n @Override\n // Return null here, so that getInfoContents() is called next.\n public View getInfoWindow(Marker arg0) {\n return null;\n }\n\n @Override\n public View getInfoContents(Marker marker) {\n // Inflate the layouts for the info window, title and snippet.\n @SuppressLint(\"InflateParams\") View infoWindow = getLayoutInflater().inflate(R.layout.custom_info_contents, null);\n\n TextView title = infoWindow.findViewById(R.id.title);\n title.setText(marker.getTitle());\n\n TextView snippet = infoWindow.findViewById(R.id.snippet);\n snippet.setText(marker.getSnippet());\n\n return infoWindow;\n }\n });\n\n mMap.setOnMapLongClickListener(new GoogleMap.OnMapLongClickListener() {\n @Override\n public void onMapLongClick(LatLng point) {\n mMap.clear();\n buildMarker(\"User Tap\", \"This is snippet\", point, true);\n @SuppressLint(\"DefaultLocale\") String latLong = String.format(\"%f,%f\", point.latitude, point.longitude);\n String endPoint = String.format(placesURL,latLong, String.valueOf(distance), BuildConfig.API_KEY);\n Location locationSelected = new Location(mLastKnownLocation);\n locationSelected.setLatitude(point.latitude);\n locationSelected.setLongitude(point.longitude);\n showPlacesNearby(locationSelected, endPoint);\n }\n });\n\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n @Override\n public void onMapClick(LatLng latLng) {\n mMap.clear();\n }\n });\n\n mMap.setOnMyLocationButtonClickListener(new GoogleMap.OnMyLocationButtonClickListener() {\n @Override\n public boolean onMyLocationButtonClick() {\n mMap.clear();\n updateLocationUI();\n getDeviceLocation();\n return true;\n }\n });\n\n\n // Prompt the user for permission.\n getLocationPermission();\n\n // Turn on the My Location layer and the related control on the map.\n updateLocationUI();\n\n // Get the current location of the device and set the position of the map.\n getDeviceLocation();\n }", "@Override\n public void onMapLongClick(LatLng latLng) {\n mMap.clear();\n\n //Adding a new marker to the current pressed position\n mMap.addMarker(new MarkerOptions()\n .position(latLng)\n .draggable(true));\n }", "@Override\n public void onMapLongClick(LatLng latLng) {\n mMap.clear();\n\n //Adding a new marker to the current pressed position we are also making the draggable true\n mMap.addMarker(new MarkerOptions()\n .position(latLng)\n .draggable(true).icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_RED)));\n\n// Toast.makeText(this, \"longitude=\" + latLng.longitude + \"latitude=\" + latLng.latitude, Toast.LENGTH_LONG).show();\n String msg = latLng.longitude + \", \" + latLng.latitude;\n// marker_address_tv.setText(msg);\n setAddressInTVFromLatlong(latLng.latitude, latLng.longitude);\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap)\n {\n\n\n mMap = googleMap;\n Intent intent = getIntent();\n seisme = (Seisme) intent.getSerializableExtra(\"seisme\");\n String[] split = seisme.getPoint().split(\" \");\n LatLng point = new LatLng(Double.parseDouble(split[0]), Double.parseDouble(split[1]));\n mMap.addMarker(new MarkerOptions().position(point).title(seisme.getTitle()));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(point));\n\n mMap.setOnInfoWindowClickListener(new GoogleMap.OnInfoWindowClickListener()\n {\n @Override\n public void onInfoWindowClick(Marker marker)\n {\n Context context = getApplicationContext();\n Intent intent = new Intent(MapsActivity.this, infoDetail.class);\n intent.putExtra(\"item\", seisme);\n startActivity(intent);\n }\n });\n }", "@Override\n public View getInfoContents(Marker arg0) {\n View v = getActivity().getLayoutInflater().inflate(R.layout.info_window, null);\n // Getting reference to the TextView to set latitude\n TextView tvLat = (TextView) v.findViewById(R.id.title);\n\n // Getting reference to the TextView to set longitude\n TextView tvLng = (TextView) v.findViewById(R.id.distance);\n System.out.println(\"Title : \" + arg0.getTitle());\n if (arg0.getTitle() != null && arg0.getTitle().length() > 0) {\n // Getting the position from the marker\n\n final String title = arg0.getTitle();\n\n db.open();\n Cursor c = db.getStateFromSelectedFarm(title);\n if (c.moveToFirst()) {\n do {\n AppConstant.stateID = c.getString(c.getColumnIndex(DBAdapter.STATE_ID));\n /* String contour = c.getString(c.getColumnIndex(DBAdapter.CONTOUR));\n getAtLeastOneLatLngPoint(contour);*/\n }\n while (c.moveToNext());\n }\n db.close();\n\n final String distance = arg0.getSnippet();\n tvLat.setText(title);\n tvLng.setText(distance);\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setTitle(title).\n setMessage(distance).\n setPositiveButton(\"Farm Data\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n\n dialogInterface.cancel();\n Intent intent = new Intent(getActivity(), NavigationDrawerActivity.class);\n intent.putExtra(\"calling-activity\", AppConstant.HomeActivity);\n intent.putExtra(\"FarmName\", title);\n\n startActivity(intent);\n getActivity().finish();\n\n\n }\n }).\n setNegativeButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n dialogInterface.cancel();\n }\n });\n builder.show();\n\n } else {\n // Setting the latitude\n tvLat.setText(String.valueOf(arg0.getPosition().latitude));\n // Setting the longitude\n tvLng.setText(String.valueOf(arg0.getPosition().longitude));\n }\n return v;\n }", "private void openMapPicker() {\n PlacePicker.IntentBuilder builder = new PlacePicker.IntentBuilder();\n try {\n startActivityForResult(builder.build(this), AnyConstant.PLACE_PICKER_REQUEST);\n } catch (GooglePlayServicesRepairableException | GooglePlayServicesNotAvailableException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void run() {\n Map<String, Object> m = new HashMap<>();\n m.put(\"mAMapLocation\", \"mAMapLocation\");\n Graphic graphic = new Graphic(tapPoint, m, pinDestinationSymbol);\n\n finalMarkerOverlay.getGraphics().add(graphic);\n }", "@Override\n public void onClick(View v) {\n new AlertDialog.Builder(MainActivity.this)\n .setIcon(android.R.drawable.ic_menu_myplaces)\n .setTitle(\"Collect GPS Point\")\n .setMessage(\"Is this the location where you would like to collect a GPS point?\")\n .setPositiveButton(\"Yes\", new DialogInterface.OnClickListener()\n {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n\n digitiseMarker(digitise());\n\n }\n\n })\n .setNegativeButton(\"No\", null)\n .show();\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_add) {\n Toast toast = Toast.makeText(getApplicationContext(), \"Please choose attraction's location\", Toast.LENGTH_SHORT);\n toast.setGravity(Gravity.CENTER, 0, 0);\n toast.show();\n\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n @Override\n public void onMapClick(LatLng position) {\n mMap.addMarker(new MarkerOptions().position(position));\n\n Intent intent = new Intent(MapsActivity.this, AddActivity.class);\n intent.putExtra(\"latitude\", position.latitude);\n intent.putExtra(\"longitude\", position.longitude);\n\n startActivity(intent);\n mMap.setOnMapClickListener(null);\n }\n });\n\n return true;\n }\n\n if (id == R.id.action_list) {\n Intent intent = new Intent(MapsActivity.this, ListActivity.class);\n startActivity(intent);\n\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng wroclaw = new LatLng(51.110, 17.034);\n mMap.addMarker(new MarkerOptions().position(wroclaw));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(wroclaw, 12));\n mMap.clear();\n // Setting a click event handler for the map\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n\n @Override\n public void onMapClick(LatLng latLng) {\n bSelect.setEnabled(true);\n // Creating a marker\n MarkerOptions markerOptions = new MarkerOptions();\n\n // Setting the position for the marker\n markerOptions.position(latLng);\n\n // Setting the title for the marker.\n // This will be displayed on taping the marker\n markerOptions.title(\"NOWY: \" + latLng.latitude + \" : \" + latLng.longitude);\n\n markerOptions.alpha(0.6f);\n // Clears the previously touched position\n mMap.clear();\n\n // Animating to the touched position\n mMap.animateCamera(CameraUpdateFactory.newLatLng(latLng));\n\n // Placing a marker on the touched position\n mMap.addMarker(markerOptions);\n\n location = latLng.latitude + \" \" + latLng.longitude;\n\n setupMarker();\n }\n });\n }", "@Override\n public void onMapClick(LatLng point) {\n mMap.clear();\n\n // Add marker on clicked point\n mMap.addMarker(new MarkerOptions().position(point)\n .icon(BitmapDescriptorFactory\n .defaultMarker(BitmapDescriptorFactory.HUE_RED)))\n .setTag(true);\n\n // Set global lat and lng\n lat = point.latitude;\n lng = point.longitude;\n\n // Hide detail view\n hideDetails();\n }", "@Override\n public boolean onMarkerClick(Marker marker) {\n //Cuando se presiona un marker, se abre la ventana de info (default)\n marker.showInfoWindow();\n return true;\n }", "@Override\n public void onInfoWindowClick(Marker marker) {\n openTimesheetInfo(marker.getTitle());\n }", "@Override\n public void onMarkerDragEnd(Marker arg0) {\n Log.d(\"System out\", \"onMarkerDragEnd...\"+arg0.getPosition().latitude+\"...\"+arg0.getPosition().longitude);\n map.animateCamera(CameraUpdateFactory.newLatLng(arg0.getPosition()));\n showPopUp(new LatLng(arg0.getPosition().latitude,arg0.getPosition().longitude));\n }", "@Override\n public void onMapClick(LatLng latLng) {\n Log.i(TAG, \"receive google maps's onMapClick\");\n OnMapClick(latLng.latitude, latLng.longitude);\n\n }", "@Override\n\t\tpublic void onClick(View v) {\n\t \tif(v==begin2){\n\t \t\tbegin2.setVisibility(0x00000004);\n\t \t\tbeginedit.setFocusable(false); \n\t \t\tisbbegin = false;\n\t \t\tisbend = false;\n\t \t}\n\t \telse if(v==begin){\n\t\t\t\tisbbegin = true;\n\t\t\t\tisbend = false;\n\t\t\t\tbeginedit.setFocusable(true); \n\t\t\t\tbegin2.setOnClickListener(this);\n\t \tSystem.out.println(\"iiiiiiiiiiiiiionclick\");\n\t\t\t\t//begin.setVisibility(0x00000004);\n\t\t\t\tbegin2.setVisibility(0x00000000);\n\n\t \tSystem.out.println(\"iiiiiiiiiiiiiisetvisible\");\n\t\t\t\tMKMapTouchListener mapTouchListener = new MKMapTouchListener(){ \n\t\t\t @Override \n\t\t\t public void onMapClick(GeoPoint point) { \n\t\t\t \t\n\t\t\t \tif(isbbegin){//如果是选择起点的时候,则设置起点经纬度\n\t\t\t \t\tSlatitude = point.getLatitudeE6();\n\t\t\t \t\tSlongtitude = point.getLongitudeE6();\n\t\t\t \t}\n\t\t\t \tif(isbend){//如果是选择终点的时候,则设置终点的经纬度\n\t\t\t \t\tDlatitude = point.getLatitudeE6();\n\t\t\t \t\tDlongtitude = point.getLongitudeE6();\n\t\t\t \t}\n\t\t\t \tSystem.out.println(\"iiiiiiiiiiiiiimapclick\");\n\t\t\t //在此处理地图单击事件 \n\t\t\t \tString ads=getLocationAddress(point);\n\t\t\t \tif(ads==\"\"){\n\t\t\t \t\tads=\"无具体地址,坐标:(\"+point.getLatitudeE6()+\",\"+point.getLongitudeE6()+\")\";\n\t\t\t \t}\n\t\t\t \tbeginedit.setText(ads.toCharArray(), 0, ads.length()); \n\t\t\t \tSystem.out.println(\"iiiiiiiiiiiiiisettext\");\n\t\t\t \tbegin2.setVisibility(0x00000004);\n\t\t\t\t\t\t//begin.setVisibility(0x00000000);\n\t\t\t } \n\t\t\t \n\t\t\t @Override \n\t\t\t public void onMapDoubleClick(GeoPoint point) { \n\t\t\t //在此处理地图双击事件 \n\t\t\t } \n\t\t\t \n\t\t\t @Override \n\t\t\t public void onMapLongClick(GeoPoint point) { \n\t\t\t //在此处理地图长按事件 \n\t\t\t } \n\t\t\t }; \n\t\t\t mMapView.regMapTouchListner(mapTouchListener); \n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\telse\tif(v==end2){\n\t\t\t\tisbend = false;\n\t\t\t\tisbbegin =false;\n\t\t\t\tendedit.setFocusable(false); \n\t\t\t\tbeginedit.setFocusable(false); \n\t\t\t\tend2.setVisibility(0x00000004);\n\t\t\t}\n\t\t\telse\tif(v==end){\n\t\t\t\tisbend = true;\n\t\t\t\tisbbegin =false;\n\t\t\t\tendedit.setFocusable(true); \n\t\t\t\tbeginedit.setFocusable(false);\n\t\t\t\tbegin2.setOnClickListener(this);\n\t\t\t\tend2.setVisibility(0x00000000);\n\t\t\t\tMKMapTouchListener mapTouchListener = new MKMapTouchListener(){ \n\t\t\t @Override \n\t\t\t public void onMapClick(GeoPoint point) { \n\t\t\t //在此处理地图单击事件 \n\t\t\t \tString ads=getLocationAddress(point);\n\t\t\t \tif(ads==\"\"){\n\t\t\t \t\tads=\"无具体地址,坐标:(\"+point.getLatitudeE6()+\",\"+point.getLongitudeE6()+\")\";\n\t\t\t \t}\n\t\t\t \tendedit.setText(ads.toCharArray(), 0, ads.length()); \n\t\t\t \tSystem.out.println(\"iiiiiiiiii\"+ads);\n\t\t\t \tend2.setVisibility(0x00000004);\n\t\t\t } \n\t\t\t \n\t\t\t @Override \n\t\t\t public void onMapDoubleClick(GeoPoint point) { \n\t\t\t //在此处理地图双击事件 \n\t\t\t } \n\t\t\t \n\t\t\t @Override \n\t\t\t public void onMapLongClick(GeoPoint point) { \n\t\t\t //在此处理地图长按事件 \n\t\t\t } \n\t\t\t }; \n\t\t\t mMapView.regMapTouchListner(mapTouchListener); \n\t\t\t\n}\n\t\t\t\n\t\t\t\n\t\t\telse if(v==searchok){\n\t\t\t\tsearch =searchcontent.getText().toString();\n\t\t\t\tmMKSearch.poiSearchInCity(\"济南\", search); \n\t\t\t}\n\t\t\telse if(v==bok){//确定了起终点,回到SearchOne\n\t\t\t\tbeginloc = beginedit.getText().toString();\n\t\t\t\tendloc = endedit.getText().toString();\n\t\t\t\tIntent intent1 = new Intent();\n\t\t\t\tintent1.putExtra(\"iam\", \"digitalone\");\n\t\t \tintent1.setClass(DigitalOne.this, SearchOne.class);\n\t\t\t\tintent1.putExtra(\"beginloc\",beginloc);\n\t\t\t\tintent1.putExtra(\"endloc\",endloc);\n\t\t\t\tintent1.putExtra(\"Slatitude\", Slatitude);\n\t\t\t\tintent1.putExtra(\"Slongtitude\", Slongtitude);\n\t\t\t\tintent1.putExtra(\"Dlatitude\", Dlatitude);\n\t\t\t\tintent1.putExtra(\"Dlongtitude\", Dlongtitude);\n\t\t\t\t\n\t\t\t\tintent1.setClass(DigitalOne.this,SearchOne.class);\n\t\t \tDigitalOne.this.startActivity(intent1);\n\t\t\t}\n\t\t\telse if(v==back){\n\t\t\t\tIntent intentback = new Intent();\t\n\n\t\t\t\tintentback.putExtra(\"iam\", \"backfrommap\");\n\t\t\t\tintentback.setClass(DigitalOne.this, SearchOne.class);\n\t\t\t\tDigitalOne.this.startActivity(intentback);\n\t\t \tSystem.out.println(\"iiiiiiiiiintent\");\n\t\t\t}\n\t }", "private void showMapAndSendCoordinate(String coordinateMap, String name) {\n showMapFragment = new ShowMapFragment();\n Bundle bundle = new Bundle();\n bundle.putString(\"LatLng\", coordinateMap);\n bundle.putString(\"Name\", name);\n showMapFragment.setArguments(bundle);\n\n getSupportFragmentManager()\n .beginTransaction()\n .replace(R.id.linearMap, showMapFragment)\n .commit();\n }", "@Override\n public void onMapClick(LatLng latLng) {\n rvTencentMapViewMessage.setVisibility(View.GONE);\n rlyTencentMapViewCollect.setVisibility(View.GONE);\n handler.removeCallbacks(runnable);\n InputMethodManager imm = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);\n View v = getWindow().peekDecorView();\n if (null != v) {\n imm.hideSoftInputFromWindow(v.getWindowToken(), 0);\n }\n\n rlyTencentMapViewBaiTang.setVisibility(View.GONE);\n if(markers != null){\n markers.remove();\n latLng1 = orginalLng;\n }\n if(scaleMarker != null){\n Animation scaleAnimation2 = new ScaleAnimation((float)1.36,(float) 1,(float)1.36,(float)1);\n scaleAnimation2.setDuration(100);\n scaleMarker.setAnimation(scaleAnimation2);\n scaleMarker.startAnimation();\n scaleMarker = null;\n// scaleMarker.refreshInfoWindow();\n// scaleMarker.setFastLoad(true);\n }\n\n// marker.setIcon(BitmapDescriptorFactory.fromBitmap(getBitMap(R.mipmap.booth,40,40)));\n }", "@Override\n public View getInfoContents(Marker marker) {\n infoWindow = getLayoutInflater().inflate(R.layout.custom_info_contents,\n (FrameLayout) findViewById(R.id.map), false);\n\n title = ((TextView) infoWindow.findViewById(R.id.title));\n title.setText(place.getAddress());\n\n snippet = ((TextView) infoWindow.findViewById(R.id.snippet));\n snippet.setText(place.getLatLng().latitude + \",\" + place.getLatLng().longitude);\n\n clickhere = ((TextView) infoWindow.findViewById(R.id.tvClickHere));\n clickhere.setText(R.string.click_here);\n\n googleMap.setOnInfoWindowClickListener(new GoogleMap.OnInfoWindowClickListener() {\n @Override\n public void onInfoWindowClick(Marker marker) {\n Intent intent = new Intent(MapActivity.this, MoreOptionsActivity.class);\n if (source == null) {\n source = new LatLng(mDefaultLocation.latitude, mDefaultLocation.longitude);\n }\n if (destination == null) {\n destination = source;\n }\n\n intent.putExtra(\"source_Latitude\", source.latitude);\n intent.putExtra(\"source_Longitude\", source.longitude);\n\n intent.putExtra(\"dest_Latitude\", destination.latitude);\n intent.putExtra(\"dest_Longitude\", destination.longitude);\n\n intent.putExtra(\"title\", place.getAddress());\n intent.putExtra(\"place_selection\", place_selection_flag);\n\n startActivity(intent);\n\n }\n });\n\n return infoWindow;\n }", "@Override\n /***** Sets up the map if it is possible to do so *****/\n public boolean setUpMapIfNeeded() {\n super.setUpMapIfNeeded();\n if (mMap != null) {\n //Shows history popover on marker clicks\n mMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {\n @Override\n public boolean onMarkerClick(Marker marker) {\n showPopup(getContentFromMarker(marker), marker.getTitle());\n return true;\n }\n });\n return true;\n } else {\n return false;\n }\n }", "@Override\n public void onClick(View view) {\n String geoUri = \"http://maps.google.com/maps?q=loc:\" + 18.5155346 + \",\" + 73.7836165 + \" (\" + \"Manyavar\" + \")\";\n Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(geoUri));\n mcontext.startActivity(intent);\n\n }", "@Override\n public void onInfoWindowClick(Marker marker) {\n makeText(this, \"Info window clicked\",\n LENGTH_SHORT).show();\n marker.getTag();\n marker.getTitle();\n marker.getId();\n\n }", "@Override\n public void onMapClick(LatLng point) {\n double lati = point.latitude;\n\n\n // Getting longitude of the current location\n double longi = point.longitude;\n\n\n i = new Intent(MapsActivity.this, addtasks.class);\n\n\n Bundle b = new Bundle();\n b.putDouble(\"latitude\", lati);\n b.putDouble(\"longitude\", longi);\n i.putExtras(b);\n\n startActivity(i);\n\n }", "@Override\n public void onMapReady(final GoogleMap googleMap) {\n\n this.googleMap = googleMap;\n\n\n // Use a custom info window adapter to handle multiple lines of text in the\n // info window contents.\n googleMap.setInfoWindowAdapter(new GoogleMap.InfoWindowAdapter() {\n\n @Override\n // Return null here, so that getInfoContents() is called next.\n public View getInfoWindow(Marker arg0) {\n return null;\n }\n\n @Override\n public View getInfoContents(final Marker marker) {\n // Inflate the layouts for the info window, title and snippet.\n infoWindow = getLayoutInflater().inflate(R.layout.custom_info_contents,\n (FrameLayout) findViewById(R.id.map), false);\n\n title = ((TextView) infoWindow.findViewById(R.id.title));\n title.setText(marker.getTitle());\n\n snippet = ((TextView) infoWindow.findViewById(R.id.snippet));\n snippet.setText(marker.getSnippet());\n\n clickhere = ((TextView) infoWindow.findViewById(R.id.tvClickHere));\n clickhere.setText(R.string.click_here);\n\n googleMap.setOnInfoWindowClickListener(new GoogleMap.OnInfoWindowClickListener() {\n @Override\n public void onInfoWindowClick(Marker marker) {\n Intent intent = new Intent(MapActivity.this, MoreOptionsActivity.class);\n if (source == null) {\n source = new LatLng(mDefaultLocation.latitude, mDefaultLocation.longitude);\n }\n if (destination == null) {\n destination = source;\n }\n\n intent.putExtra(\"source_Latitude\", source.latitude);\n intent.putExtra(\"source_Longitude\", source.longitude);\n\n intent.putExtra(\"dest_Latitude\", destination.latitude);\n intent.putExtra(\"dest_Longitude\", destination.longitude);\n\n intent.putExtra(\"title\", marker.getTitle());\n\n startActivity(intent);\n\n }\n });\n\n return infoWindow;\n }\n });\n\n // Turn on the My Location layer and the related control on the map.\n updateLocationUI();\n\n // Get the current location of the device and set the position of the map.\n getDeviceLocation();\n\n }", "public void addMapMarker() {\n if (iLat != null && !iLat.equals(\"\") && iLon != null && !iLon.equals(\"\") && iLatRef != null && !iLatRef.equals(\"\") && iLonRef != null && !iLonRef.equals(\"\")) {\n\n if (iLatRef.equals(\"N\")) {\n //North of equator, positive value\n iLatFloat = toDegrees(iLat);\n } else {\n //South of equator, negative value\n iLatFloat = 0 - toDegrees(iLat);\n }\n\n if (iLonRef.equals(\"E\")) {\n //East of prime meridian, positive value\n iLonFloat = toDegrees(iLon);\n } else {\n //West of prime meridian, negative value\n iLonFloat = 0 - toDegrees(iLon);\n }\n }\n\n final MapView gMap = (MapView) findViewById(R.id.map);\n\n if (addedMarker == false) {\n posMarker = gMap.getMap().addMarker(posMarkerOptions);\n posMarker.setTitle(getString(R.string.map_position));\n addedMarker = true;\n }\n\n posMarker.setVisible(true);\n posMarker.setPosition(new LatLng(iLatFloat, iLonFloat));\n\n GoogleMap gMapObj = gMap.getMap();\n\n gMapObj.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n @Override\n public void onMapClick(LatLng latLng) {\n posMarker.setPosition(latLng);\n displayCoordsInDegrees();\n\n //Use text view values instead of posMarker values\n iLat = toDMS(posMarker.getPosition().latitude);\n iLon = toDMS(posMarker.getPosition().longitude);\n\n if (posMarker.getPosition().latitude > 0) {\n //North of equator, positive value\n iLatFloat = toDegrees(iLat);\n iLatRef = \"N\";\n } else {\n //South of equator, negative value\n iLatFloat = 0 - toDegrees(iLat);\n iLatRef = \"S\";\n }\n\n if (posMarker.getPosition().longitude > 0) {\n //East of prime meridian, positive value\n iLonFloat = toDegrees(iLon);\n iLonRef = \"E\";\n } else {\n //West of prime meridian, negative value\n iLonFloat = 0 - toDegrees(iLon);\n iLonRef = \"W\";\n }\n }\n });\n }", "@Override\r\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tIntent i = new Intent(AdminMapField.this, AdminMapField.class);\r\n\t\t\t\tstartActivity(i);\r\n\t\t\t}", "@Override\n public void onMapClick(final LatLng point) {\n name = (EditText) findViewById(R.id.name);\n name.setVisibility(View.VISIBLE);\n\n phoneNumber = (EditText) findViewById(R.id.phoneNumber);\n phoneNumber.setVisibility(View.VISIBLE);\n\n type = (RadioGroup)findViewById(R.id.needprovide);\n type.setVisibility(View.VISIBLE);\n\n if(markerPoints.size()>1){\n markerPoints.clear();\n\n mMap.clear();\n }\n markerPoints.add(point);\n MarkerOptions options = new MarkerOptions();\n options.position(point);\n\n if(markerPoints.size()==1){\n\n options.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN));\n\n\n }else if(markerPoints.size()==2){\n\n options.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_RED));\n\n\n }\n mMap.addMarker(options);\n // mMap.addMarker(new MarkerOptions().position(point).title(\"Added\"));\n // mMap.moveCamera(CameraUpdateFactory.newLatLng(point));\n\n // Clear Map\n Button clear_Map = (Button) findViewById(R.id.clear);\n View.OnClickListener findClickListener1 = new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // Start NewActivity.class\n googleMap.clear();\n markerPoints.clear();\n name = (EditText) findViewById(R.id.name);\n name.setVisibility(View.INVISIBLE);\n\n phoneNumber = (EditText) findViewById(R.id.phoneNumber);\n phoneNumber.setVisibility(View.INVISIBLE);\n\n type = (RadioGroup)findViewById(R.id.needprovide);\n type.setVisibility(View.INVISIBLE);\n }\n };\n\n // Setting button click event listener for the find button\n clear_Map.setOnClickListener(findClickListener1);\n\n // End of Clear Map\n\n\n\n // Save Accomodation\n Button save_Accomodation = (Button) findViewById(R.id.saveAccomodation);\n saveAccOnClickListener saveAcc = new saveAccOnClickListener( point)\n {\n\n @Override\n public void onClick(View v) {\n // Start NewActivity.class\n saveLocation(saveAcc,googleMap);\n }\n };\n\n\n // Setting button click event listener for the find button\n save_Accomodation.setOnClickListener(saveAcc);\n\n // End of Save Accomodation\n\n // Get Directions\n Button get_Directions = (Button) findViewById(R.id.getDirection);\n directionsAccOnClickListener getDir = new directionsAccOnClickListener( point)\n {\n @Override\n public void onClick(View v) {\n // Start NewActivity.class\n\n //getDirections(point, googleMap);\n getDirections( googleMap);\n }\n };\n\n\n // Setting button click event listener for the find button\n get_Directions.setOnClickListener(getDir);\n\n // End of Save Accomodation\n // Get Accomodation\n Button get_Accomodation = (Button) findViewById(R.id.getAccomodation);\n View.OnClickListener getAccomodation = new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // Start NewActivity.class\n getLocation(googleMap);\n\n }\n };\n\n // Setting button click event listener for the find button\n get_Accomodation.setOnClickListener(getAccomodation);\n System.out.println(point.latitude+\"---\"+ point.longitude);\n }" ]
[ "0.7231863", "0.70649385", "0.695946", "0.6948528", "0.69478726", "0.6923964", "0.69156575", "0.69138575", "0.6858517", "0.6854378", "0.68211085", "0.6805032", "0.6717242", "0.6713424", "0.67001295", "0.66829395", "0.6660424", "0.6618912", "0.6558231", "0.6554363", "0.6512353", "0.648971", "0.6481514", "0.6479103", "0.6471408", "0.6470408", "0.6457611", "0.64511395", "0.64511395", "0.64488965", "0.64290184", "0.6422378", "0.641132", "0.64099085", "0.64025176", "0.63971776", "0.63969314", "0.63458514", "0.6328245", "0.63120663", "0.63102686", "0.6309821", "0.6305285", "0.6290315", "0.62807", "0.62795067", "0.62701434", "0.62701434", "0.62701434", "0.6250733", "0.6247616", "0.62350583", "0.6221309", "0.62206197", "0.62109023", "0.620885", "0.6200495", "0.618877", "0.61852056", "0.61757696", "0.6173852", "0.61725616", "0.6168942", "0.6166447", "0.61606085", "0.6158755", "0.615615", "0.6152522", "0.61513346", "0.6143404", "0.6135234", "0.61324644", "0.6128149", "0.6125643", "0.6117565", "0.6111499", "0.6107066", "0.6106749", "0.6105472", "0.60998535", "0.6095055", "0.6086665", "0.60851943", "0.60658246", "0.605854", "0.6057497", "0.6055878", "0.6052867", "0.6035434", "0.6032874", "0.60298765", "0.60293365", "0.60292584", "0.60254955", "0.60250187", "0.601713", "0.6008509", "0.60052127", "0.59985214", "0.5984607" ]
0.7480768
0
Create a new marker with the Latitude and Longitude of the click event.
@Override public void onClick(DialogInterface dialog, int which) { MarkerOptions marker = new MarkerOptions().position( new LatLng(markerPoint.latitude, markerPoint.longitude)).title(input.getText().toString()); mMap.addMarker(marker); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createMarker()\n {\n LocationMarker layoutLocationMarker = new LocationMarker(\n fLon.get(fLon.size()-1),\n fLat.get(fLat.size()-1),\n getExampleView()\n\n );\n\n finalLon = fLon.get(fLon.size()-1);\n finalLat = fLat.get(fLat.size()-1);\n\n View eView = exampleLayoutRenderable.getView();\n TextView finalDistance = findViewById(R.id.textView4);\n\n\n // An example \"onRender\" event, called every frame\n // Updates the layout with the markers distance\n layoutLocationMarker.setRenderEvent(new LocationNodeRender() {\n @Override\n public void render(LocationNode node) {\n View eView = exampleLayoutRenderable.getView();\n\n TextView distanceTextView = eView.findViewById(R.id.textView2);\n distanceTextView.setText(node.getDistance() + \"m\");\n }\n });\n // Adding the marker\n locationScene.mLocationMarkers.add(layoutLocationMarker);\n\n }", "@Override\n public void onMapClick(LatLng latLng) {\n AlertDialog.Builder builder = new AlertDialog.Builder(MapsActivity.this);\n //Set the title of the dialog.\n builder.setTitle(\"Create a new Marker\");\n\n final LatLng markerPoint = latLng;\n\n // Set up the input\n final EditText input = new EditText(MapsActivity.this);\n // Specify the type of input expected; this, for example, sets the input as a password, and will mask the text\n input.setInputType(InputType.TYPE_CLASS_TEXT);\n builder.setView(input);\n\n // Set up the buttons\n builder.setPositiveButton(\"Create\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n //Create a new marker with the Latitude and Longitude of the click event.\n MarkerOptions marker = new MarkerOptions().position(\n new LatLng(markerPoint.latitude, markerPoint.longitude)).title(input.getText().toString());\n mMap.addMarker(marker);\n }\n });\n builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n //Cancel\n dialog.cancel();\n }\n });\n\n builder.show();\n\n }", "@Override\n public void onMapClick(LatLng latLng) {\n map.addMarker(new MarkerOptions().position(latLng));\n }", "private void createMarker(LatLng position) {\n MarkerOptions markerOptions = new MarkerOptions();\n markerOptions.position(position);\n markerOptions.icon(BitmapDescriptorFactory.fromResource(R.drawable.note_position));\n // set up marker\n locationMarker = googleMap.addMarker(markerOptions);\n locationMarker.setDraggable(true);\n locationMarker.showInfoWindow();\n }", "public MapObject addMarker(EncodedImage icon, Coord location, String text, String longText, ActionListener onClick) {\n if(internalNative != null) {\n byte[] iconData = null;\n if(icon != null) {\n iconData = icon.getImageData();\n }\n long key = internalNative.addMarker(iconData, location.getLatitude(), location.getLongitude(), text, longText, onClick != null);\n MapObject o = new MapObject();\n o.mapKey = key;\n o.callback = onClick;\n markers.add(o);\n return o;\n } else {\n if(internalLightweightCmp != null) {\n PointLayer pl = new PointLayer(location, text, icon);\n if(points == null) {\n points = new PointsLayer();\n internalLightweightCmp.addLayer(points);\n points.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent evt) {\n PointLayer point = (PointLayer)evt.getSource();\n for(MapObject o : markers) {\n if(o.point == point) {\n if(o.callback != null) {\n o.callback.actionPerformed(new ActionEvent(o));\n }\n return;\n }\n }\n }\n });\n points.addPoint(pl);\n MapObject o = new MapObject();\n o.point = pl;\n o.callback = onClick;\n markers.add(o);\n return o;\n } \n } else {\n // TODO: Browser component\n }\n }\n return null;\n }", "public void addMapMarker() {\n if (iLat != null && !iLat.equals(\"\") && iLon != null && !iLon.equals(\"\") && iLatRef != null && !iLatRef.equals(\"\") && iLonRef != null && !iLonRef.equals(\"\")) {\n\n if (iLatRef.equals(\"N\")) {\n //North of equator, positive value\n iLatFloat = toDegrees(iLat);\n } else {\n //South of equator, negative value\n iLatFloat = 0 - toDegrees(iLat);\n }\n\n if (iLonRef.equals(\"E\")) {\n //East of prime meridian, positive value\n iLonFloat = toDegrees(iLon);\n } else {\n //West of prime meridian, negative value\n iLonFloat = 0 - toDegrees(iLon);\n }\n }\n\n final MapView gMap = (MapView) findViewById(R.id.map);\n\n if (addedMarker == false) {\n posMarker = gMap.getMap().addMarker(posMarkerOptions);\n posMarker.setTitle(getString(R.string.map_position));\n addedMarker = true;\n }\n\n posMarker.setVisible(true);\n posMarker.setPosition(new LatLng(iLatFloat, iLonFloat));\n\n GoogleMap gMapObj = gMap.getMap();\n\n gMapObj.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n @Override\n public void onMapClick(LatLng latLng) {\n posMarker.setPosition(latLng);\n displayCoordsInDegrees();\n\n //Use text view values instead of posMarker values\n iLat = toDMS(posMarker.getPosition().latitude);\n iLon = toDMS(posMarker.getPosition().longitude);\n\n if (posMarker.getPosition().latitude > 0) {\n //North of equator, positive value\n iLatFloat = toDegrees(iLat);\n iLatRef = \"N\";\n } else {\n //South of equator, negative value\n iLatFloat = 0 - toDegrees(iLat);\n iLatRef = \"S\";\n }\n\n if (posMarker.getPosition().longitude > 0) {\n //East of prime meridian, positive value\n iLonFloat = toDegrees(iLon);\n iLonRef = \"E\";\n } else {\n //West of prime meridian, negative value\n iLonFloat = 0 - toDegrees(iLon);\n iLonRef = \"W\";\n }\n }\n });\n }", "public boolean createMarker(ArrayList<LocationsData>datas) {\n\n boolean isNotEmpty= true;\n if (isNotEmpty) {\n placesMarker= placesMap.addMarker(new MarkerOptions()\n .position(new LatLng(datas.get(0).locationLatitude,datas.get(0).locationLongitude))\n .title(datas.get(0).locationName));\n placesMarker.showInfoWindow();\n placesMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {\n @Override\n public boolean onMarkerClick(Marker marker) {\n Log.i(\"Places Marker\",marker.getTitle()+\"\\n\"+places.toString());\n\n LocationsData data= new LocationsData();\n data.set_id(places.get(0).get_id());\n data.setImage_path(places.get(0).getImage_path());\n data.setLocationName(places.get(0).getLocationName());\n data.setLocationLatitude(places.get(0).getLocationLatitude());\n data.setLocationLongitude(places.get(0).getLocationLongitude());\n data.setLocationProducts(places.get(0).getLocationProducts());\n\n Intent i= new Intent(MainActivity.this,PlaceDetailsActivity.class);\n i.putExtra(\"places\",data);\n startActivity(i);\n\n Log.i(\"Intent\",i.toString());\n Log.i(\"onMarkerClick\",\"Successfull, Title: \"+marker.getTitle());\n Log.i(\"Getting Item Id\",String.valueOf(places.get(0).get_id()));\n return false;\n }\n });\n }else {\n isNotEmpty=false;\n }\n return isNotEmpty;\n }", "@Override\n public void onMapClick(LatLng latLng) {\n MarkerOptions markerOptions = new MarkerOptions();\n markerOptions.position(latLng);\n\n String address = getMarkerAddress(latLng);\n //if there is a valid address associated with marker\n if (address != null) {\n markerOptions.title(address);\n }\n mMap.clear();\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng, 15));\n mMap.addMarker(markerOptions);\n markerPlaced = true;\n lat = latLng.latitude;\n lon = latLng.longitude;\n }", "public void createMarker(DBMarker marker)\n\t{\n\t\t//Call get location function\n Location location = getLocation();\n \n //If location is not null, create a marker at the location and draw a line from that location to lat:0 long:0\n if (location != null)\n {\n \t//Get current location and create a LatLng object\n \tLatLng currentLocation = new LatLng(location.getLatitude(), location.getLongitude());\n \tMarker locationMarker = map.addMarker(new MarkerOptions().position(currentLocation));\n \t\n \t//Create a new GPS object to attach to the marker\n \tGPS gpsObject = new GPS();\n \tgpsObject.latitude = location.getLatitude();\n \tgpsObject.longitude = location.getLongitude();\n \tgpsObject.time = location.getTime();\n \tmarker.gps = gpsObject;\n \n \t//Add the marker to the list of markers and HashTable\n \tmarkerList.add(marker);\n \tmarkerHashTable.put(marker, locationMarker);\n }\n else\n {\n \t//Create alert when location fails\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(\"Location not found.\");\n builder.setTitle(\"Error\");\n builder.setNeutralButton(\"Close\", null);\n AlertDialog dialog = builder.create();\n dialog.show();\n }\n\t}", "private void addGreenMarker(LatLng latLng) {\n MarkerOptions markerOptions = new MarkerOptions();\r\n markerOptions.position(latLng);\r\n //markerOptions.title(dt.format(newDate));\r\n markerOptions.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN));\r\n mMap.addMarker(markerOptions);\r\n }", "@Override\n \tpublic void onMapClick(final LatLng point) \n \t{\n \t\t\n \t\t AlertDialog.Builder builder = new AlertDialog.Builder(CrearIncidenteGPS.this);\n \t\t builder.setMessage(\"Desea agregar un incidente en este lugar?\")\n \t\t .setCancelable(false)\n \t\t .setPositiveButton(\"Si\", new DialogInterface.OnClickListener() \n \t\t {\n \t\t public void onClick(DialogInterface dialog, int id) \n \t\t {\n \t\t \t//Agregar el incidente\n// \t\t \tlstLatLngs.add(point);\n \t\t \tinsertarIncidente(point);\n// \t\t \tgMap.addMarker(new MarkerOptions().position(point));\n \t\t }\n \t\t })\n \t\t .setNegativeButton(\"No\", new DialogInterface.OnClickListener() \n \t\t {\n \t\t public void onClick(DialogInterface dialog, int id) \n \t\t {\n \t\t dialog.cancel();\n \t\t }\n \t\t });\n \t\t AlertDialog alert = builder.create();\n \t\t alert.show();\n \t\t\n \t}", "private void drawMarker1(LatLng point){\n MarkerOptions markerOptions=new MarkerOptions();\r\n\r\n // Setting latitude and longitude for the marker\r\n markerOptions.position(point);\r\n\r\n markerOptions.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN));\r\n\r\n // Adding marker on the Google Map\r\n mMap.addMarker(markerOptions);\r\n\r\n // marker.showInfoWindow();\r\n }", "@Override\n public void onMapClick( LatLng latLng ) {\n googleMap.clear();\n Log.d( \"LAT/LONG\", latLng.toString() );\n googleMap.addCircle( new CircleOptions()\n .center( latLng )\n .radius( 10000 )\n .strokeColor( ContextCompat.getColor( Objects.requireNonNull( getContext() ), R.color.colorLightPurple ) )\n .fillColor( ContextCompat.getColor( Objects.requireNonNull( getContext() ), R.color.transparentcolorLightPurple ) ) );\n\n googleMap.addMarker( new MarkerOptions().position( latLng )\n .icon( BitmapDescriptorFactory.defaultMarker( BitmapDescriptorFactory.HUE_VIOLET ) ) );\n googleMap.moveCamera( CameraUpdateFactory.newLatLngZoom( latLng, 10.0f ) );\n cLocate = latLng;\n }", "@Override\n public void onMapClick(LatLng latLng) {\n MarkerOptions markerOptions = new MarkerOptions();\n\n //Set position of market\n\n\n //markerOptions.position(latLng);\n markerOptions.position(defaultLocation);\n //set title marker\n markerOptions.title(defaultLocation.latitude + \": \" + defaultLocation.longitude);\n\n //removeall markers\n // googleMap.clear();\n //Animating to zoom the marker\n googleMap.animateCamera(CameraUpdateFactory.newLatLngZoom(\n defaultLocation, 10\n ));\n //Add marker on map\n googleMap.addMarker(markerOptions);\n\n\n\n }", "private void addMarker(double lat, double lon) {\n mLatLng = new LatLng(lat,lon);\n mMarker = new MarkerOptions()\n .position(mLatLng)\n .title(\"Location\")\n .setIcon(icon)\n .snippet(\"Welcome to you\");\n map.addMarker(mMarker);\n }", "@Override\n public void onMapLongClick(LatLng latLng) {\n mMap.clear();\n\n //Adding a new marker to the current pressed position we are also making the draggable true\n mMap.addMarker(new MarkerOptions()\n .position(latLng)\n .draggable(true).icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_RED)));\n\n// Toast.makeText(this, \"longitude=\" + latLng.longitude + \"latitude=\" + latLng.latitude, Toast.LENGTH_LONG).show();\n String msg = latLng.longitude + \", \" + latLng.latitude;\n// marker_address_tv.setText(msg);\n setAddressInTVFromLatlong(latLng.latitude, latLng.longitude);\n\n }", "private Marker addMarker(Event event) {\n // TODO: Specify a MarkerColor attribute for each event, or convert the event category\n // to a MarkerColor\n Marker marker = addMarker(event.title, new LatLng(event.latitude, event.longitude));\n markerIdToEvent.put(marker.getId(), event);\n return marker;\n }", "@Override\n public void onMapLongClick(LatLng latLng) {\n String markerName = mTextField.getText().toString();\n\n // check if a marker name is set\n if(markerName.isEmpty()) {\n markerName = \"Marker\" + Integer.toString(numberOfMarkers);\n }\n\n // add marker\n Marker marker = mMap.addMarker(\n new MarkerOptions()\n .position(latLng)\n .title(markerName)\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_RED))\n );\n\n // add halo\n Circle halo = mMap.addCircle(new CircleOptions()\n .center(latLng)\n .radius(100.0)\n .strokeColor(Color.RED)\n .visible(false)\n );\n\n // add marker and halo to tracked markers\n mMarkerHalos.put(marker, halo);\n\n // lat and long to separate values\n double markerLat = latLng.latitude;\n double markerLong = latLng.longitude;\n\n // save marker to shared preferences\n Set<String> positionSet = new HashSet<String>();\n positionSet.add(Double.toString(markerLat));\n positionSet.add(Double.toString(markerLong));\n mPrefEditor.putStringSet(markerName, positionSet);\n mPrefEditor.apply();\n\n // clear text field\n mTextField.setText(\"\");\n\n // increase marker counter\n ++numberOfMarkers;\n }", "@Override\n public void onMapLongClick(@NonNull LatLng point) {\n latitude = String.valueOf(point.getLatitude());\n longitude = String.valueOf(point.getLongitude());\n mapboxMap.addMarker(new MarkerOptions()\n .position(point)\n .title(\"New Maintenance Form\")\n .snippet(\"Click to add site\")\n );\n\n\n }", "private void addMarker(MapboxMap mapboxMap) {\n MarkerOptions markerOptions = new MarkerOptions();\n\n IconFactory iconFactory = IconFactory.getInstance(LocateDoctorActivity.this);\n Icon icon = iconFactory.fromResource(R.drawable.mapquest_icon);\n\n markerOptions.position(new com.mapbox.mapboxsdk.geometry.LatLng(Double.parseDouble(selectedLat), Double.parseDouble(selectedLong)));\n markerOptions.snippet(\"Selected Location\");\n markerOptions.setIcon(icon);\n mapboxMap.addMarker(markerOptions);\n }", "private void addCurrentMarker(double lat, double lon) {\n mLatLng = new LatLng(lat, lon);\n marker_inter = map.addMarker(new MarkerViewOptions()\n .position(mLatLng)\n .title(\"Intervention\")\n .snippet(\"Desc inter\")\n .icon(iconUsr));\n run = 1;\n }", "@Override\n\t\t\tpublic void onMapClick(LatLng arg0) {\n\t\t\t\tfinal LatLng location = arg0;\n \tAlertDialog builder = new AlertDialog.Builder(MainActivity.this)\n\t .setMessage(\"Do you want to add your location here?\")\n\t .setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n\t public void onClick(DialogInterface dialog, int id) {\n\t \t setFlag = true;\n\t \t myLocation = location;\n\t \t //use this flag to indicate that we want to see the path from current location or a set point\n\t \t Log.d(\"my location:\", \"\"+myLocation.latitude + myLocation.longitude);\n\t \t if(setFlag == true){\n\t \t\t if(myMarker != null){\n\t\t \t\t myMarker.remove();\n\t\t \t }\n\t\t \t myMarker = mMap.addMarker(new MarkerOptions().position(myLocation).title(\"myLocation\").draggable(true)\n\t\t \t\t\t\t\t\t.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_BLUE)));\n\t\t \t\t\t\t landmarks.addMarker(\"myLocation\", myMarker);\n\t \t } \n\t }\n\t })\n\t .setNegativeButton(\"Not now\", new DialogInterface.OnClickListener() {\n\t public void onClick(DialogInterface dialog, int id) {\n\t // User cancelled the dialog\n\t }\n\t }).create();\n \tbuilder.show();\n\t\t\t}", "@Override\n\t\t\t\tpublic void onMapClick(LatLng arg0) {\n\t\t\t\t\tgoogleMap.clear();\n\n\t\t\t\t\t// Creating an instance of MarkerOptions to set position\n\t\t\t\t\t// MarkerOptions markerOptions = new MarkerOptions();\n\n\t\t\t\t\t// Setting position on the MarkerOptions\n\t\t\t\t\tmarker.position(arg0);\n\n\t\t\t\t\t// Animating to the currently touched position\n\t\t\t\t\tgoogleMap.animateCamera(CameraUpdateFactory.newLatLng(arg0));\n\n\t\t\t\t\t// Adding marker on the GoogleMap\n\t\t\t\t\tMarker marker1 = googleMap.addMarker(marker);\n\n\t\t\t\t\t// Showing InfoWindow on the GoogleMap\n\t\t\t\t\tmarker1.showInfoWindow();\n\t\t\t\t}", "private Marker createMarker(final int a, final String id1, String lat, String lng, final String title) {\n\n mMarkerMap.put(marker, a);\n mMarkerMap1.put(marker, title);\n\n Log.e(\"Data\", \"\" + lat + \"-->>>>\" + lng + \"--->>\" + title);\n\n if (a == 999999999) {\n\n marker = googleMap.addMarker(new MarkerOptions()\n .position(new LatLng(Double.valueOf(lat), Double.valueOf(lng))).title(title)\n .anchor(0.5f, 0.5f));\n\n } else if (getIntent().getStringExtra(\"placetype\").equalsIgnoreCase(\"Hospitals\")) {\n\n BitmapDescriptor icon = BitmapDescriptorFactory.fromResource(R.drawable.hosp);\n\n marker = googleMap.addMarker(new MarkerOptions()\n .position(new LatLng(Double.valueOf(lat), Double.valueOf(lng))).title(title).icon(icon)\n .anchor(0.5f, 0.5f));\n\n\n } else if (getIntent().getStringExtra(\"placetype\").equalsIgnoreCase(\"Fire_stations\")) {\n\n BitmapDescriptor icon = BitmapDescriptorFactory.fromResource(R.drawable.fire11515);\n marker = googleMap.addMarker(new MarkerOptions()\n .position(new LatLng(Double.valueOf(lat), Double.valueOf(lng))).title(title).icon(icon)\n .anchor(0.5f, 0.5f));\n\n\n } else if (getIntent().getStringExtra(\"placetype\").equalsIgnoreCase(\"Police Stations\")) {\n\n BitmapDescriptor icon = BitmapDescriptorFactory.fromResource(R.drawable.police55);\n marker = googleMap.addMarker(new MarkerOptions()\n .position(new LatLng(Double.valueOf(lat), Double.valueOf(lng))).title(title).icon(icon)\n .anchor(0.5f, 0.5f));\n\n }\n\n marker.showInfoWindow();\n\n return marker;\n\n }", "@Override\n public void onMapClick(LatLng point) {\n mMap.clear();\n\n // Add marker on clicked point\n mMap.addMarker(new MarkerOptions().position(point)\n .icon(BitmapDescriptorFactory\n .defaultMarker(BitmapDescriptorFactory.HUE_RED)))\n .setTag(true);\n\n // Set global lat and lng\n lat = point.latitude;\n lng = point.longitude;\n\n // Hide detail view\n hideDetails();\n }", "private MarkerOptions makeMarkerAt( LatLng point ) {\n \t\treturn new MarkerOptions().flat( true ).draggable( true ).position( point );\n \t}", "private void showMarker() {\n\n if (myMarker == null) {\n MarkerOptions options = new MarkerOptions();//1 option co 2 thu k thieu vi tri ,hinh anh\n options.position(new LatLng(myLocation.getLatitude(), myLocation.getLongitude()));//vi tri kinh do vi do,no tra ve vi tri cuoi cung gps nhan dc ,neu\n options.title(\"dung123\");\n options.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN));\n //newu chua co thif sedc sinh ra bang cach add\n googleMap.addMarker(options);\n// myMarker.setTag(\"Hello\");//co the truyen doi tuig vao duoi window marker getTag\n } else {\n myMarker.setPosition(new LatLng(myLocation.getLatitude(), myLocation.getLongitude()));\n }\n }", "public void markerClicked(Object markerId,\r\n\t\t\t\t\t\t\t\tString markerLabel,\r\n\t\t\t\t\t\t\t\tint clickXCoordinate,\r\n\t\t\t\t\t\t\t\tint clickYCoordinate);", "@Override\n public void onClick(View view) {\n if (markerPlaced) {\n //Firestore handler method that adds geopoint as a field in database\n setPickupLocation(bookId, lat, lon);\n Toast toast = Toast.makeText(SetLocationActivity.this,\n \"Pickup location has been updated\", Toast.LENGTH_SHORT);\n toast.show();\n } else {\n Toast toast = Toast.makeText(SetLocationActivity.this,\n \"Place a marker first\", Toast.LENGTH_SHORT);\n toast.show();\n }\n }", "private void drawMarker(LatLng point){\n \tMarkerOptions markerOptions = new MarkerOptions();\t\t\t\t\t\n \t\t\n \t// Setting latitude and longitude for the marker\n \tmarkerOptions.position(point);\n \tmarkerOptions.icon(BitmapDescriptorFactory.fromResource(R.drawable.marker1));\n \t// Adding marker on the Google Map\n \tmap.addMarker(markerOptions); \t\t\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n LatLng markerLatLng = mLikelyPlaceLatLngs[which];\n String markerSnippet = mLikelyPlaceAddresses[which];\n if (mLikelyPlaceAttributions[which] != null) {\n markerSnippet = markerSnippet + \"\\n\" + mLikelyPlaceAttributions[which];\n }\n int height = 200;\n int width = 100;\n BitmapDrawable bitmapdraw = (BitmapDrawable) getResources().getDrawable(R.drawable.ic_car_marker);\n Bitmap b = bitmapdraw.getBitmap();\n Bitmap smallMarker = Bitmap.createScaledBitmap(b, width, height, false);\n // Add a marker for the selected place, with an info window\n // showing information about that place.\n mMap.addMarker(new MarkerOptions()\n .title(mLikelyPlaceNames[which])\n .position(markerLatLng)\n .snippet(markerSnippet))\n .setIcon(BitmapDescriptorFactory.fromBitmap(smallMarker));\n\n // Position the customer_map's camera at the location of the marker.\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(markerLatLng,\n DEFAULT_ZOOM));\n }", "private void addMarker() {\n /** Make sure that the map has been initialised **/\n LatLng lt = new LatLng(58.722599, -103.798828);\n float focus = 1f;\n if (null != mMap) {\n ArrayList<EarthQuake> earthQuakes = (ArrayList<EarthQuake>) getIntent().getSerializableExtra(\"quakeArrayList\");\n getIntent().removeExtra(\"quakeArrayList\");\n int position = getIntent().getIntExtra(\"position\", 0);\n if (earthQuakes != null) {\n if(position==0) {\n for (int i = 0; i < earthQuakes.size(); i++) {\n mMap.addMarker(\n new MarkerOptions()\n .visible(true)\n .title(\"Earthquake\")\n .snippet(earthQuakes.get(i).getDateTime() + \"\\n\" + earthQuakes.get(i).getMagnitude() + \"\\n\")\n .position(new LatLng(earthQuakes.get(i).getLat(), earthQuakes.get(i).getLon()))\n );\n }\n }else if(position>0){\n lt=new LatLng(earthQuakes.get(position).getLat(),earthQuakes.get(position).getLon());\n mMap.addMarker( new MarkerOptions()\n .visible(true)\n .title(\"Earthquake\")\n .snippet(earthQuakes.get(position).getDateTime() + \"\\n\" + earthQuakes.get(position).getMagnitude() + \"\\n\")\n .position(new LatLng(earthQuakes.get(position).getLat(), earthQuakes.get(position).getLon())));\n focus=4f;\n\n }\n }\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(lt, focus));\n\n }\n }", "@Override\n public void onMapClick(LatLng point) {\n double lati = point.latitude;\n\n\n // Getting longitude of the current location\n double longi = point.longitude;\n\n\n i = new Intent(MapsActivity.this, addtasks.class);\n\n\n Bundle b = new Bundle();\n b.putDouble(\"latitude\", lati);\n b.putDouble(\"longitude\", longi);\n i.putExtras(b);\n\n startActivity(i);\n\n }", "private void drawMarker(LatLng point){\n\t\tgoogleMap.clear();\t\t\r\n\t\t\r\n // Creating an instance of MarkerOptions\r\n MarkerOptions markerOptions = new MarkerOptions();\r\n\r\n // Setting latitude and longitude for the marker\r\n markerOptions.position(point); \r\n \r\n // Setting title for the InfoWindow\r\n markerOptions.title(\"Position\");\r\n \r\n // Setting InfoWindow contents\r\n markerOptions.snippet(\"Latitude:\"+point.latitude+\",Longitude\"+point.longitude);\r\n // markerOptions.icon(BitmapDescriptorFactory.fromResource(R.drawable.));\r\n\r\n // Adding marker on the Google Map\r\n googleMap.addMarker(markerOptions);\r\n \r\n // Moving CameraPosition to the user input coordinates\r\n googleMap.moveCamera(CameraUpdateFactory.newLatLng(point));\r\n\r\n // Setting the zoom level\r\n //googleMap.animateCamera(CameraUpdateFactory.zoomTo(10)); \r\n \r\n }", "public void onClick(DialogInterface dialog,int id) {\n LatLng newlatlng = getLatLngFromAddress(userInput.getText().toString());\n if (newlatlng != null) {\n startLocation = newlatlng;\n MarkerOptions marker = new MarkerOptions()\n .position(startLocation)\n .title(\"Start\")\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_BLUE));\n markers.add(marker);\n mMap.addMarker(marker);\n zoomMap();\n getEndLocation();\n } else\n {\n TextView alertTxtView = findViewById(R.id.alertTxtView);\n alertTxtView.setText(\"Could not find address\");\n }\n }", "@Override\n public void onMapLongClick(LatLng latLng) {\n mMap.clear();\n\n //Adding a new marker to the current pressed position\n mMap.addMarker(new MarkerOptions()\n .position(latLng)\n .draggable(true));\n }", "Marker getMarker();", "public void onClick(View v){\n \t\ttry {\r\n \t\t\tEditText textLocation = (EditText)findViewById(R.id.edtLocation);\r\n \t\t\tmapLocation = textLocation.getText().toString();\r\n \t\t\t\r\n \t\t\tEditText textDetails = (EditText)findViewById(R.id.edtDetails);\r\n \t\t\tmapSnipper = textDetails.getText().toString();\r\n \t\t\t\r\n \t\t\t\r\n \t\t\tEditText floatLongitude = (EditText)findViewById(R.id.edtLong);\r\n \t\t\tlon = Float.valueOf(floatLongitude.getText().toString());\r\n \t\t\t\r\n \t\t\tEditText floatLatitude = (EditText)findViewById(R.id.edtLat);\r\n \t\t\tlat = Float.valueOf(floatLatitude.getText().toString());\r\n \t\t\t\r\n \t\t\t//Only Lon and Lat between -90 and 90 are allowed\r\n \t\t\tif (lat >=-90 && lat <=90 && lon >=-90 && lon <=90) {\r\n \t\t\tfinal GoogleMap mMap;\r\n \t\t\tmMap = ((MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap();\r\n \t\t\tmMap.addMarker(new MarkerOptions()\r\n \t\t\t .position(new LatLng(lat,lon))\r\n \t\t\t .title(mapLocation)\r\n \t\t\t .snippet(mapSnipper));\r\n \t\t\t}\r\n \t\t\telse\r\n \t\t\t{\r\n \t\t\t\tToast.makeText(getBaseContext(), \"Lonitude and Latitude can only be numbers bewteen -90 to 90 e.g 3.148\", Toast.LENGTH_LONG).show();\r\n \t\t\t}\r\n \t}\r\n \tcatch (Exception e)\r\n \t{\r\n \t\tToast.makeText(getBaseContext(), \"Lonitude and Latitude can only be numbers bewteen -90 to 90 e.g 3.148\", Toast.LENGTH_LONG).show();\r\n \t}\r\n \t}", "private void xxx() {\n LatLng westfieldNJ = new LatLng(40.659, -74.3474);\n mMap.addMarker(new MarkerOptions().position(westfieldNJ).title(\"Westfield, New Jersey\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(westfieldNJ));\n\n }", "@Override\n public void run() {\n Map<String, Object> m = new HashMap<>();\n m.put(\"mAMapLocation\", \"mAMapLocation\");\n Graphic graphic = new Graphic(tapPoint, m, pinDestinationSymbol);\n\n finalMarkerOverlay.getGraphics().add(graphic);\n }", "private int addMarkerToMap(Double lat, Double lng, int id, float hue, String title,\n String snippet, boolean draggable) {\n // what if there are too many markers on Google Map ?\n // TODO: https://code.google.com/p/android-maps-extensions/\n Log.i(TAG, \"@addMarkerToMap\");\n LatLng latlng = new LatLng(lat, lng);\n Marker marker = mMap.addMarker(new MarkerOptions()\n .position(latlng)\n .icon(BitmapDescriptorFactory.defaultMarker(hue)));\n\n if (!title.isEmpty()){\n marker.setTitle(title);\n }\n if (!snippet.isEmpty()){\n marker.setSnippet(snippet);\n }\n marker.setDraggable(draggable);\n\n markers.put(marker, id);\n return id;\n }", "@Override\n public void onMapClick(LatLng latLng) {\n showMarkerButtons(false);\n current_number=\"\";\n markerClickflag=false;\n }", "public void onClick(DialogInterface dialog, int id) \n \t\t {\n \t\t \tinsertarIncidente(point);\n// \t\t \tgMap.addMarker(new MarkerOptions().position(point));\n \t\t }", "@Override\n public void handleOnGoogleMapClick(GoogleMap mMap, LatLng latLng) {\n mMap.clear();\n mMap.addMarker(new MarkerOptions()\n .position(latLng)\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_RED)));\n }", "private void addMarkerOnMap(double latitude, double longitude) {\n try {\n //System.out.println(\"LAT::: \" + latitude);\n //System.out.println(\"LONG::: \" + longitude);\n mCurrentLocationLat = latitude;\n mCurrentLocationLongitude = longitude;\n if (markerOptions == null)\n markerOptions = new MarkerOptions();\n\n // Creating a LatLng object for the current / new location\n LatLng currentLatLng = new LatLng(latitude, longitude);\n markerOptions.position(currentLatLng).icon(BitmapDescriptorFactory.defaultMarker()).title(\"Current Location\");\n\n if (mapMarker != null)\n mapMarker.remove();\n\n mapMarker = mMap.addMarker(markerOptions);\n\n// if (dlBean.getAddress() != null) {\n// if (!dlBean.getAddress().equals(\"No Location Found\") && !dlBean.getAddress().equals(\"No Address returned\") && !dlBean.getAddress().equals(\"No Network To Get Address\"))\n// mapMarker.setTitle(dlBean.getAddress());\n// }\n\n // Showing the current location in Google Map by Zooming it\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(currentLatLng, 15));\n\n for (TripsheetSOList saleOrder : tripSheetSOList) {\n AgentLatLong agentLatLong = new AgentLatLong();\n double distance;\n\n // We are calculating distance b/w current location and agent location if lat long are not empty\n if (saleOrder.getmTripshetSOAgentLatitude() != null && !saleOrder.getmTripshetSOAgentLatitude().equals(\"\") && saleOrder.getmTripshetSOAgentLongitude() != null && !saleOrder.getmTripshetSOAgentLongitude().equals(\"\")) {\n double agentLatitude = Double.parseDouble(saleOrder.getmTripshetSOAgentLatitude());\n double agentLongitude = Double.parseDouble(saleOrder.getmTripshetSOAgentLongitude());\n\n distance = getDistanceBetweenLocationsInMeters(mCurrentLocationLat, mCurrentLocationLongitude, agentLatitude, agentLongitude);\n\n agentLatLong.setAgentName(saleOrder.getmTripshetSOAgentFirstName());\n agentLatLong.setLatitude(agentLatitude);\n agentLatLong.setLongitude(agentLongitude);\n agentLatLong.setDistance(distance);\n\n agentsLatLongList.add(agentLatLong);\n\n } else {\n distance = 0.0;\n }\n\n saleOrder.setDistance(Math.round(distance / 1000));\n }\n\n // Sorting by distance in descending order i.e. nearest destination\n Collections.sort(agentsLatLongList, new Comparator<AgentLatLong>() {\n @Override\n public int compare(AgentLatLong o1, AgentLatLong o2) {\n return o1.getDistance().compareTo(o2.getDistance());\n }\n });\n\n Collections.sort(tripSheetSOList, new Comparator<TripsheetSOList>() {\n @Override\n public int compare(TripsheetSOList o1, TripsheetSOList o2) {\n return o1.getDistance().compareTo(o2.getDistance());\n }\n });\n\n // to update distance value in list after getting current location details.\n if (mTripsheetSOAdapter != null) {\n mTripsheetSOAdapter.setAllSaleOrdersList(tripSheetSOList);\n mTripsheetSOAdapter.notifyDataSetChanged();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void markerForGeofence(LatLng latLng)\n {\n Log.e(\"TAGtag\", \"markerForGeofence(\" + latLng + \")\");\n String title = latLng.latitude + \", \" + latLng.longitude;\n Log.e(\"TAGtag\", \"\"+title);\n // Define marker options\n MarkerOptions markerOptions = new MarkerOptions()\n .position(latLng)\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN))\n .title(title);\n if ( mMap!=null )\n {\n // Remove last geoFenceMarker\n if (geoFenceMarker != null)\n {\n geoFenceMarker.remove();\n }\n\n\n geoFenceMarker = mMap.addMarker(markerOptions);\n //geoFenceMarker = mMap.addMarker(markerOptions);\n }\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n MarkerOptions m= new MarkerOptions().position(new LatLng(28.7041,77.1025)).icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE)).title(\"tap to get the alerts\");\n n= mMap.addMarker(m);\n\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n @Override\n public void onMapClick(LatLng latLng) {\n\n if (!lati.equals(\"false\") && !longi.equals(\"false\")) {\n Double la = Double.parseDouble(lati);\n Double lo = Double.parseDouble(longi);\n // Add a marker in Sydney and move the camera\n n.setPosition(new LatLng(la,lo));\n n.setTitle(level);\n if(level.equals(\"hard\")){\n n.setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_MAGENTA));}\n else\n {\n n.setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN));}\n LatLng posi = new LatLng(la, lo);\n mMap.moveCamera(CameraUpdateFactory.newLatLng(posi));\n }\n\n\n }\n });\n\n\n\n }", "private void drawMarker(LatLng point){\n MarkerOptions markerOptions = new MarkerOptions();\n\n // Setting latitude and longitude for the marker\n markerOptions.position(point);\n\n // Adding marker on the Google Map\n mGoogleMap.addMarker(markerOptions);\n }", "@Override\n\t\t\t\tpublic boolean onMarkerClick(Marker arg0) {\n\t\t\t\t\t\n\t\t\t\t\tfor(final PoiInfo poiInfo:AppContext.listmap){\n\t\t\t\t\t\tif(poiInfo.location.latitude==arg0.getPosition().latitude&&poiInfo.location.longitude==arg0.getPosition().longitude){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tView mView = LayoutInflater.from(ZhouBianYaodian.this).inflate(R.layout.map_massage_data, null);\n\t\t\t\t\t\t\tTextView dataname=(TextView) mView.findViewById(R.id.txt_map_name);\n\t\t\t\t\t\t\tTextView address=(TextView)mView. findViewById(R.id.txt_map_address);\n\t\t\t\t\t\t\tImageView imageView=(ImageView)mView. findViewById(R.id.map_image_call); \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tdataname.setText(poiInfo.name==null?\"\":poiInfo.name);\n\t\t\t\t\t\t\t\taddress.setText(poiInfo.address==null?\"\":poiInfo.address);\n\t\t\t\t\t\t\t\tif(poiInfo.phoneNum!=null&&!poiInfo.phoneNum.equals(\"\")){\n\t\t\t\t\t\t\t\t\timageView.setVisibility(ImageView.VISIBLE);\n\t\t\t\t\t\t\t\t\timageView.setOnClickListener(new OnClickListener() {\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\t\t\t\t\tIntent intent = new Intent(Intent.ACTION_DIAL, Uri\n\t\t\t\t\t\t\t\t\t\t\t\t\t.parse(\"tel:\" + poiInfo.phoneNum));\n\t\t\t\t\t\t\t\t\t\t\tLog.d(\"测试数据\", poiInfo.phoneNum);\n\t\t\t\t\t\t\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tmInfoWindow= new InfoWindow(mView,arg0.getPosition(), -47);\n\t\t\t\t\t\t\tmBaiduMap.showInfoWindow(mInfoWindow);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\treturn false;\n\t\t\t\t}", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n //Add markers to show places to eat on campus\n LatLng Jester = new LatLng(30.283086, -97.736775);\n LatLng Texas_Union = new LatLng(30.287125, -97.741109);\n LatLng Kinsolving = new LatLng(30.290536, -97.739621);\n mMap.addMarker(new MarkerOptions().position(Texas_Union).title(\"Texas Union Cafe\"));\n mMap.addMarker(new MarkerOptions().position(Jester).title(\"Jester Dining Hall\"));\n mMap.addMarker(new MarkerOptions().position(Kinsolving).title(\"Kinsolving Dining Hall\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(Jester));\n //Add a map click listener\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n\n /**\n * Manipulates the map when it is clicked/tapped.\n * Open a dialog that will allow a user to name and create\n * a marker where they tap on the screen.\n */\n\n @Override\n public void onMapClick(LatLng latLng) {\n AlertDialog.Builder builder = new AlertDialog.Builder(MapsActivity.this);\n //Set the title of the dialog.\n builder.setTitle(\"Create a new Marker\");\n\n final LatLng markerPoint = latLng;\n\n // Set up the input\n final EditText input = new EditText(MapsActivity.this);\n // Specify the type of input expected; this, for example, sets the input as a password, and will mask the text\n input.setInputType(InputType.TYPE_CLASS_TEXT);\n builder.setView(input);\n\n // Set up the buttons\n builder.setPositiveButton(\"Create\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n //Create a new marker with the Latitude and Longitude of the click event.\n MarkerOptions marker = new MarkerOptions().position(\n new LatLng(markerPoint.latitude, markerPoint.longitude)).title(input.getText().toString());\n mMap.addMarker(marker);\n }\n });\n builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n //Cancel\n dialog.cancel();\n }\n });\n\n builder.show();\n\n }\n });\n //Set UI settings.\n mMap.getUiSettings().setZoomControlsEnabled(true);\n mMap.getUiSettings().setCompassEnabled(true);\n mMap.getUiSettings().setMapToolbarEnabled(true);\n }", "@Override\n public boolean onMarkerClick(Marker marker) {\n\n Integer markerId = markers.get(marker);\n LatLng latLng = marker.getPosition();\n OnMarkerClick(markerId, latLng.latitude, latLng.longitude);\n\n // We return false to indicate that we have not consumed the event and that we wish\n // for the default behavior to occur (which is for the camera to move such that the\n // marker is centered and for the marker's info window to open, if it has one).\n return false;\n }", "@Override\n\tpublic void onInfoWindowClick(Marker marker)\n\t{\n\t\tString id = marker.getId();\n\t\tid = id.substring(1);\n\n\t\tmyLocation = new LatLng(map.getMyLocation().getLatitude(), map.getMyLocation().getLongitude());\n\n\t\tif (myLocation != null)\n\t\t{\n\t\t\tBundle bundle = new Bundle();\n\t\t\tbundle.putString(KEY_NAMA, listTempatMakan.get(Integer.parseInt(id)).getNama());\n\t\t\tbundle.putString(KEY_ALAMAT, listTempatMakan.get(Integer.parseInt(id)).getAlamat());\n\t\t\tbundle.putDouble(KEY_LAT_TUJUAN, marker.getPosition().latitude);\n\t\t\tbundle.putDouble(KEY_LNG_TUJUAN, marker.getPosition().longitude);\n\t\t\tbundle.putDouble(KEY_LAT_ASAL, myLocation.latitude);\n\t\t\tbundle.putDouble(KEY_LNG_ASAL, myLocation.longitude);\n\n\t\t\tIntent i = new Intent(MainActivity.this, InfoTempatMakanActivity.class);\n\t\t\ti.putExtras(bundle);\n\t\t\tstartActivity(i);\n\n\t\t} else\n\t\t{\n\t\t\tToast.makeText(this, \"Tidak dapat menemukan lokasi anda \", Toast.LENGTH_LONG).show();\n\t\t}\n\t}", "@Override\n public void onClick(DialogInterface dialog, int which) {\n LatLng markerLatLng = mLikelyPlaceLatLngs[which];\n String markerSnippet = mLikelyPlaceAddresses[which];\n if (mLikelyPlaceAttributions[which] != null) {\n markerSnippet = markerSnippet + \"\\n\" + mLikelyPlaceAttributions[which];\n }\n\n // Position the map's camera at the location of the marker.\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(markerLatLng,\n DEFAULT_ZOOM));\n }", "private void addDestination(double lat, double lon) {\n mLatLng = new LatLng(lat,lon);\n mMarker = new MarkerOptions()\n .position(mLatLng)\n .title(\"Location\")\n .snippet(\"Welcome to you\");\n map.addMarker(mMarker);\n\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);\n final LatLng latLng = new LatLng(latitude, longitude);\n mMap.addCircle(new CircleOptions()\n .center(latLng)\n .radius(75)\n .strokeWidth(2f));\n CameraUpdate center=\n CameraUpdateFactory.newLatLng(latLng);\n CameraUpdate zoom=CameraUpdateFactory.zoomTo(21);\n\n mMap.moveCamera(center);\n mMap.animateCamera(zoom);\n Marker mark= mMap.addMarker(new MarkerOptions()\n .position(latLng)\n .title(\"I'm here...\")\n .snippet(\"Its My Location\")\n .rotation((float) -15.0)\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_RED)));\n\n Tmarker=mMap.addMarker(new MarkerOptions()\n .snippet(tuition_id)\n .rotation((float)12.0)\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_ORANGE))\n .position(new LatLng(lat,lan)));\n\n\n\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n @Override\n public void onMapClick(LatLng latLng) {\n if(marker!=null) {\n marker.remove();\n }\n marker=mMap.addMarker(new MarkerOptions()\n .snippet(\"My Home\")\n .rotation((float)0.0)\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_BLUE))\n .position(latLng));\n }\n });\n\n//.fillColor(0x55ffff99));\n // Add a marker in Sydney and move the camera\n /*LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));*/\n\n }", "public interface onMarkerClickListener{\n void onMarkerClick(int id);\n }", "@Override\n public void onClick(View v) {\n new AlertDialog.Builder(MainActivity.this)\n .setIcon(android.R.drawable.ic_menu_myplaces)\n .setTitle(\"Collect GPS Point\")\n .setMessage(\"Is this the location where you would like to collect a GPS point?\")\n .setPositiveButton(\"Yes\", new DialogInterface.OnClickListener()\n {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n\n digitiseMarker(digitise());\n\n }\n\n })\n .setNegativeButton(\"No\", null)\n .show();\n\n }", "@Override\n public void onInfoWindowClick(Marker marker) {\n Integer markerId = markers.get(marker);\n InfoWindowClicked(markerId);\n }", "public void onClick(DialogInterface dialog,int id) {\n LatLng newlatlng = getLatLngFromAddress(userInput.getText().toString());\n if (newlatlng != null) {\n endLocation = newlatlng;\n MarkerOptions marker = new MarkerOptions()\n .position(endLocation)\n .title(\"End\")\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_BLUE));\n markers.add(marker);\n mMap.addMarker(marker);\n zoomMap();\n } else\n {\n TextView alertTxtView = findViewById(R.id.alertTxtView);\n alertTxtView.setText(\"Could not find address\");\n }\n }", "public void onItemClick(AdapterView parent, View v, int position, long id) {\n LatLng markerLatLng = mLikelyPlaceLatLngs[position];\n String markerSnippet = mLikelyPlaceAddresses[position];\n if (mLikelyPlaceAttributions[position] != null) {\n markerSnippet = markerSnippet + \"\\n\" + mLikelyPlaceAttributions[position];\n }\n\n // Add a marker for the selected place, with an info window\n // showing information about that place.\n mMap.addMarker(new MarkerOptions()\n .title(mLikelyPlaceNames[position])\n .position(markerLatLng)\n .snippet(markerSnippet));\n\n // Position the map's camera at the location of the marker.\n mMap.moveCamera(CameraUpdateFactory.newLatLng(markerLatLng));\n }", "@Override\n public boolean onMarkerClick(Marker marker) {\n Toast.makeText(CameraInfoActivity.this,\"点击布点\",Toast.LENGTH_SHORT).show();\n return true;\n }", "@Override\n public void onTouch() {\n mScrollView.requestDisallowInterceptTouchEvent(true);\n\n\n map.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n @Override\n public void onMapClick(LatLng location) {\n\n\n Toast.makeText(DoctorRegistration.this, \"\"+location, Toast.LENGTH_SHORT).show();\n if(marker!=null)\n {\n marker.remove();\n map.clear();\n }\n marker=map.addMarker(new MarkerOptions().position(location));\n\n new_lat=location.latitude;\n new_log=location.longitude;\n }\n });\n\n }", "@Override\n public void onMapLongClick(LatLng latLng) {\n String newLocation = null;\n Geocoder gcd = new Geocoder(getBaseContext(), Locale.getDefault());\n List<Address> addresses = null;\n try {\n addresses = gcd.getFromLocation(latLng.latitude, latLng.longitude, 1);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (addresses.size() > 0) {\n newLocation = addresses.get(0).getLocality();\n }\n\n // Set new marker attributes\n MapLocation newMarker = new MapLocation();\n newMarker.setLocation(newLocation);\n newMarker.setLatitude(latLng.latitude);\n newMarker.setLongitude(latLng.longitude);\n\n // Add to firebase\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n DatabaseReference dbRef = database.getReference();\n DatabaseReference newRef = dbRef.push();\n newRef.setValue(newMarker);\n }", "@Override\n public void onInfoWindowClick(Marker marker) {\n\n if (Config.CEK_KONEKSI(ListDealerMaps.this)) {\n if (markerAccessMapping.get(marker).equals(\"1\")) {\n Intent resultIntent = new Intent();\n resultIntent.putExtra(Config.DISP_KD_DEALER, markerIdMapping.get(marker));\n resultIntent.putExtra(Config.DISP_COY_DEALER, markerCoyMapping.get(marker));\n resultIntent.putExtra(Config.DISP_NAMA_DEALER, marker.getTitle());\n setResult(Activity.RESULT_OK, resultIntent);\n finish();\n }else{\n Toast.makeText(ListDealerMaps.this, Config.ALERT_ONLY_VIEW, Toast.LENGTH_SHORT).show();\n }\n } else {\n showDialog(Config.TAMPIL_ERROR);\n }\n\n }", "@Override\n public void onClick(View v) {\n pickPointOnMap();\n }", "@Override\n public boolean onMarkerClick(Marker marker) {\n if (Objects.equals(marker.getTag(), true)) {\n Toast.makeText(MapsActivity.this,\n \"Own marker\", Toast.LENGTH_SHORT).show();\n } else {\n try {\n showDetails(marker);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n return true;\n }", "@Override\n\t\t\tpublic void onInfoWindowClick(Marker marker) {\n\t\t\t\tint id = hashmap.get(marker)-1;\n\t\t\t\tBundle bundle = new Bundle();\n\t\t\t\tDataBase.Object object = new Object();\n\t\t\t\tobject = list.get(id);\n\n\t\t\t\tbundle.putSerializable(\"ob\", object);\n\n\t\t\t\tIntent intent = new Intent(getActivity(), Places.class);\n\t\t\t\tintent.putExtras(bundle);\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "private void addCrimeMarker(Crime c){\n LatLng coor = new LatLng(c.Lat, c.Long);\n Marker crime_marker = mMap.addMarker(new MarkerOptions()\n .position(coor));\n c.marker = crime_marker;\n if(c.marker == null){\n Log.i(TAG, \"weee gotta nulllll marker!!!!\");\n }\n c.setVisable(true);\n Log.i(TAG, \"MockCrime:\" + c.offense + \" @ \" + c.address + \" PLOTTED\");\n }", "private void CreaCoordinate(){\n \n this.punto = new Point(80, 80);\n \n }", "@Override\n public void onClick(View v) {\n mMap.clear();\n //Es crea un marcador amb la seva informacio\n MarkerOptions opcions = new MarkerOptions();\n opcions.title(\"El teu cotxe esta aqui\");\n opcions.position(posicioActual);\n opcions.snippet(\"El teu cotxe esta aparcat aqui\");\n opcions.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_ORANGE));\n\n //Un cop creat el marquem al mapa\n Marker marca = mMap.addMarker(opcions);\n\n //Serveix per mostrar la seva informacio sense haver de tocar-la\n marca.showInfoWindow();\n\n //https://stackoverflow.com/questions/13692398/remove-a-marker-from-a-googlemap\n //esborrar el marcador antic\n }", "public interface MapMarkerClickHandler {\r\n\r\n\t\t\r\n\t////////////////////////////////////////////////////////////\r\n\t// PUBLIC INTERFACE METHODS\r\n\t////////////////////////////////////////////////////////////\r\n\tpublic void markerClicked(Object markerId,\r\n\t\t\t\t\t\t\t\tString markerLabel,\r\n\t\t\t\t\t\t\t\tint clickXCoordinate,\r\n\t\t\t\t\t\t\t\tint clickYCoordinate);\r\n\r\n\r\n\t\r\n}", "@Override\n\t\t\tpublic void onInfoWindowClick(Marker marker) {\n\t\t\t}", "@Override\n public void run() {\n LatLng myLoc = new LatLng(myLatitude, myLongitude);\n myMarker.setPosition(myLoc);\n }", "@Override\n public boolean onMarkerClick(Marker marker) {\n\n\n String title = marker.getTitle();\n if (title.equals(\"A\")){\n marker.setSnippet(info_A);\n\n }else if (title.equals(\"B\")){\n marker.setSnippet(info_B);\n }\n\n\n return false;\n }", "@Override\n public void onInfoWindowLongClick(Marker marker) {\n if (marker.getTitle().equals(\"New Maintenance Form\")){\n newOld = false; //don't have to do anything.....\n }else{\n //newOld = true;\n load_id=marker.getSnippet();\n }\n //pull up the maintenance form\n Intent intent = new Intent(MaintenanceMapActivity.this, MaintenanceActivity.class);\n intent.putExtra(\"latitude\", latitude );\n intent.putExtra(\"longitude\",longitude);\n startActivity(intent);\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\n if(requestCode == LOCATION_REQUEST && resultCode == RESULT_OK){\n PlaceOfInterest fromAdd = (PlaceOfInterest) data.getSerializableExtra(\"Place\");\n LatLng newLatLong = new LatLng(fromAdd.getLatitude(), fromAdd.getLongitude());\n MarkerOptions placeMarker = new MarkerOptions().position(newLatLong).title(fromAdd.getName())\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_YELLOW));\n if(fromAdd.getPicture() != null){\n Log.d(TAG, \"getPicture was not null\");\n int height = 100;\n int width = 100;\n Bitmap picture = ByteConvertor.convertToBitmap(fromAdd.getPicture());\n BitmapDrawable d = new BitmapDrawable(getResources(), picture);\n Bitmap smallMarker = Bitmap.createScaledBitmap(d.getBitmap(), width, height, false);\n\n placeMarker.icon(BitmapDescriptorFactory.fromBitmap(smallMarker));\n }\n places.add(fromAdd);\n mMap.addMarker(placeMarker);\n mMap.moveCamera(CameraUpdateFactory.newLatLng(newLatLong));\n }\n }", "public void onInfoWindowClick(Marker marker2) {\n\n AlertDialog.Builder builder2 = new AlertDialog.Builder(Detalles.this);\n builder2.setTitle(\"Epicent\");\n builder2.setMessage(\"Referencia : \" +\"ddddddd\" +\"\\n\" +\n \"Fecha local : \" + \"ccccccc\" +\"\\n\" +\n \"Hora local : \" + \"ccccccc\"+ \"\\n\" +\n \"Profundidad : \" + \"ccccccc\"+\" km\"+ \"\\n\" +\n \"Intensidad : \" + \"ccccccc\"+ \"\\n\" +\n \"Magnitud : \" + \"ccccccc\"+ \"\\n\" +\n \"Ubicación : \" + \"ccccccc\"+ \", \" + \"ccccccc\");\n builder2.setNegativeButton(\"Cerrar\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog2, int which) {\n dialog2.cancel();\n }\n });\n\n builder2.setCancelable(true);\n builder2.create().show();\n\n }", "@Override\n public void onMapLongClick(LatLng point){\n location = new cLocation(point, this);\n\n //Open a dialog for the user to allow the user to set the name for the saved location\n DialogFragment dialog = new AddLocationDialog();\n dialog.show(getFragmentManager(), getText(R.string.map_ask_add).toString());\n }", "private void showMarker(Double lat, Double lng, String title) {\n mMap.addMarker(new MarkerOptions()\n .position(new LatLng(lat, lng))\n .title(title));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n getDataFromDatabase();\n\n // Add a marker in Sydney and move the camera\n //LatLng hellas = new LatLng(38.311449, 25.022821);\n // mMap.addMarker(new MarkerOptions().position(hellas).title(\"Marker in Aegean Sea\"));\n //mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(hellas,5));\n\n //Initalize MyLocation stuff\n mMap.setMyLocationEnabled(true);\n mMap.setOnMyLocationButtonClickListener(this);\n mMap.setOnMyLocationClickListener(this);\n\n //setMarkersOnMap();\n\n if(mLocationPermissionGranted){\n getDeviceLocation();\n }\n\n\n ic_plus.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n DEFAULT_ZOOM = 17f;\n getDeviceLocation();\n\n //double lat = currentLocation.getLatitude();\n //double lon = currentLocation.getLongitude();\n LatLng currlatlon = new LatLng(currentLocation.getLatitude()+0.0002,currentLocation.getLongitude()+0.0002);\n\n\n curraddmarker = mMap.addMarker(new MarkerOptions().position(currlatlon).draggable(true));\n currentMarkerLat=curraddmarker.getPosition().latitude;\n currentMarkerLon=curraddmarker.getPosition().longitude;\n hideUI();\n showConfirm();\n\n }\n });\n\n addMarker.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n\n showUI();\n addMarker.setVisibility(View.GONE);\n\n //double lat = curraddmarker.getPosition().latitude;\n //double lon = curraddmarker.getPosition().longitude;\n\n //Toast.makeText(AEDMapActivity.this, \"Lat:\"+currentMarkerLat+\" Lon:\"+currentMarkerLon, Toast.LENGTH_SHORT).show();\n Intent i =new Intent(AEDMapActivity.this, addMarkerActivity.class);\n i.putExtra(\"Lat\",curraddmarker.getPosition().latitude);\n i.putExtra(\"Lon\",curraddmarker.getPosition().longitude);\n startActivity(i);\n }\n });\n\n cancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n hideConfirm();\n showUI();\n curraddmarker.remove();\n\n getDeviceLocation();\n\n }\n });\n\n\n\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener()\n {\n @Override\n public void onMapClick(LatLng arg0)\n {\n if(menuUI){\n if(markerInfo){\n hideMarkerInfoIcon();\n return;\n }\n\n if(adminEkav || adminDimos){\n hideReportIcon();\n }\n\n menuUI = false;\n hideUI();\n\n\n }\n else{\n menuUI = true;\n showUI();\n if(adminEkav || adminDimos){\n showReportIcon();\n }\n }\n }\n });\n\n\n\n mMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {\n @Override\n public boolean onMarkerClick(Marker marker) {\n\n showMarkerInfoIcon();\n\n Log.d(TAG,marker.getTag().toString());\n\n if(!markerMap.isEmpty()){\n for(int i=0; i<markerMap.size(); i++) {\n marker_id = (String) markerMap.get(i).get(\"Id\");\n //Log.d(TAG,id);\n if(marker_id.equals(marker.getTag().toString())){\n marker_name = (String) markerMap.get(i).get(\"Name\");\n marker_desc = (String) markerMap.get(i).get(\"Description\");\n marker_pic = (String) markerMap.get(i).get(\"ImageUrl\");\n marker_geo = (GeoPoint) markerMap.get(i).get(\"Geolocation\");\n\n Log.d(TAG,\"Marker Clicked!! - name: \"+marker_name+\" desc: \"+marker_desc+\" geo: \"+marker_geo+ \" imgurl: \"+marker_pic);\n\n ic_info.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent i =new Intent(AEDMapActivity.this, MarkerInfoActivity.class);\n i.putExtra(\"Id\",marker_id);\n i.putExtra(\"Name\",marker_name);\n i.putExtra(\"Description\",marker_desc);\n i.putExtra(\"Lat\",marker_geo.getLatitude());\n i.putExtra(\"Lon\",marker_geo.getLongitude());\n i.putExtra(\"imgUrl\",marker_pic);\n startActivity(i);\n }\n });\n\n break;\n }\n }\n }\n\n return false;\n }\n });\n\n mMap.setOnMarkerDragListener(new GoogleMap.OnMarkerDragListener() {\n\n\n @Override\n public void onMarkerDragStart(Marker marker) {\n\n }\n\n @Override\n public void onMarkerDrag(Marker marker) {\n\n }\n\n @Override\n public void onMarkerDragEnd(Marker marker) {\n currentMarkerLat=curraddmarker.getPosition().latitude;\n currentMarkerLon=curraddmarker.getPosition().longitude;\n }\n });\n\n }", "@Override\n public void onSuccess(Location location) {\n if (location != null) {\n // Logic to handle location object\n double lat = location.getLatitude();\n double lng = location.getLongitude();\n mMap.addMarker(new MarkerOptions().position(new LatLng(lat, lng)).title(\"Marker at current Location\"));\n // mMap.addMarker(new MarkerOptions().position(new LatLng(lat, lng)).title(\"Marker in NYC\").icon(BitmapDescriptorFactory.fromResource(R.mipmap.ic_launcher_round)));\n }\n }", "@Override\n public boolean onMarkerClick(Marker marker) {\n //Cuando se presiona un marker, se abre la ventana de info (default)\n marker.showInfoWindow();\n return true;\n }", "@Override\n public boolean onMarkerClick(Marker marker) {\n layoutManager.smoothScrollToPosition(recyclerView, null, stationList.indexOf(main.stationMap.get(marker.getTag())));\n centreOnStation(main.stationMap.get(marker.getTag()), true);\n return true;\n }", "@Override\n public boolean onMarkerClick(Marker marker) {\n\n\n String title = marker.getTitle();\n if (title.equals(\"A\")) {\n marker.setSnippet(info_A);\n\n }else if (title.equals(\"B\")){\n marker.setSnippet(info_B);\n }\n\n\n return false;\n }", "@Override\n public boolean onMarkerClick(Marker marker) {\n\n\n String title = marker.getTitle();\n if (title.equals(\"A\")) {\n marker.setSnippet(info_A);\n\n }else if (title.equals(\"B\")){\n marker.setSnippet(info_B);\n }\n\n\n return false;\n }", "@Override\n public void onMapReady(final GoogleMap googleMap) {\n mMap = googleMap;\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n\n\n // Add a marker in Sydney and move the camera\n final LatLng sementeryo = new LatLng(7.063907, 125.585014);\n\n\n\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n\n\n @Override\n public void onMapClick(LatLng point) {\n\n if(destinationMarker != null) {\n\n destinationMarker.remove();\n\n }\n marker = new MarkerOptions().position(new LatLng(point.latitude, point.longitude)).title(\"Grave Location\");\n\n marker.icon(BitmapDescriptorFactory.fromResource(R.mipmap.grave_ic1));\n destinationMarker = mMap.addMarker(marker);\n\n\n System.out.println(point.latitude + \"---\" + point.longitude);\n\n // Toast.makeText(add_map.this, (point.latitude + \"---\" + point.longitude), Toast.LENGTH_LONG).show();\n\n Button button = (Button) findViewById(R.id.addlatlang);\n\n button.setBackgroundResource(R.drawable.blue_btn);\n button.setEnabled(true);\n\n lat=point.latitude;\n lang=point.longitude;\n\n\n }\n });\n\n Location locationf;\n locationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE);\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n locationf = locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);\n\n double latitude = locationf.getLatitude();\n double longitude = locationf.getLongitude();\n\n final LatLng coordinate = new LatLng(latitude, longitude); //Store these lat lng values somewhere. These should be constant.\n CameraUpdate location = CameraUpdateFactory.newLatLngZoom(\n coordinate, 15);\n googleMap.animateCamera(location);\n\n googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(coordinate,18));\n\n new Handler().postDelayed(new Runnable() {\n\n @Override\n public void run() {\n\n\n CameraUpdate location = CameraUpdateFactory.newLatLngZoom(\n sementeryo, 17);\n googleMap.animateCamera(location);\n\n }\n }, 5000);\n\n\n\n }", "private void addPlaceLocationMarker(LatLng latLng) {\n MarkerOptions markerOptions = new MarkerOptions();\n markerOptions.position(latLng);\n mMap.clear();\n markerOptions.title(\"Current Position\");\n markerOptions.getPosition();\n markerOptions.title(locationName);\n mMap.addMarker(markerOptions);\n }", "@Override\n public void onClick(View v) {\n new AlertDialog.Builder(MainActivity.this)\n .setIcon(android.R.drawable.ic_menu_edit)\n .setTitle(\"Textual Description\")\n .setMessage(\"Is this the location where you would like to describe something?\")\n .setPositiveButton(\"Yes\", new DialogInterface.OnClickListener()\n {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n\n GridPoint gp = myGridPoint();\n MarkerOptions markerOptions = new MarkerOptions().gridPoint(gp);\n markerOptions.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_RED));\n Marker marker = mMap.addMarker(markerOptions);\n describe();\n\n }\n\n })\n .setNegativeButton(\"No\", null)\n .show();\n\n }", "private void drawMarker(LatLng point) {\n\t\tMarkerOptions markerOptions = new MarkerOptions();\n\t\tmarkerOptions.position(point);\n\t\tmarkerOptions.title(\"Lat:\" + point.latitude + \",\" + \"Lng:\"\n\t\t\t\t+ point.longitude);\n\n\t\t// Adding marker on the Google Map\n\t\tmap.addMarker(markerOptions);\n\t}", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n\n mMap.setOnMapLongClickListener(new GoogleMap.OnMapLongClickListener() {\n @Override\n public void onMapLongClick(LatLng latLng) {\n mMap.addMarker(new MarkerOptions()\n .icon(BitmapDescriptorFactory.fromResource(R.drawable.ic_cast_dark))\n .anchor(0.0f, 1.0f)\n .position(latLng));\n\n }\n });\n\n mMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {\n @Override\n public boolean onMarkerClick(Marker marker) {\n Toast.makeText(getApplicationContext(), \"Has pulsado una marca\", Toast.LENGTH_LONG).show();\n return false;\n }\n });\n\n\n\n }", "private void addMarker( LatLng point ) {\n \t\tthis.markers.add( this.googleMap.addMarker( this.makeMarkerAt( point ) ) );\n \t}", "Marker (Event event, double y) {\n\n// assigns an Event to the Marker\n this.event = event;\n\n// defines the start and end of the Line and Label\n// based on the beginning and end of the Event, the zoom (stretch) and global edge of all Nodes (shift)\n start = (event.startDate[2] * stretch) - shift;\n end = (event.endDate[2] * stretch) - shift;\n width = end - start;\n\n// creates the label\n this.setLayoutX(start + width/2 - width()/2);\n this.setLayoutY(y + 16);\n this.setWidth(width);\n this.setTextAlignment(TextAlignment.CENTER);\n\n// first line contains Event name\n// second line is either 1 (if start year and end year are the same) or 2 dates\n if (event.startDate[2] == event.endDate[2])\n this.setText(event.name + \"\\n\" + event.startDate[2]);\n else\n this.setText(event.name + \"\\n\" + event.startDate[2] + \"–\" + event.endDate[2]);\n\n// creates the Line\n line = new Line(start, y, end, y);\n\n// applies CSS to the Label and Line\n this.setStyle(stylesheet.toString());\n this.getStyleClass().add(\"markerLabel\");\n line.setStyle(stylesheet.toString());\n line.getStyleClass().add(\"markerLine\");\n\n// sets right click on Label or Line to expand the Event\n this.setOnMouseClicked(mouseEvent -> {\n if (mouseEvent.getButton() == MouseButton.SECONDARY)\n expandElement(event);\n });\n line.setOnMouseClicked(mouseEvent -> {\n if (mouseEvent.getButton() == MouseButton.SECONDARY)\n expandElement(event);\n });\n }", "public void onClick(double lat, double lon)\n/* 60: */ {\n/* 61: 98 */ TileGIS self = this;\n/* 62: */ }", "@Override\n public boolean onMarkerClick(Marker marker) {\n Log.i(LOG_MAP, \"setOnMarkerClickListener\");\n\n return false;\n }", "@Override\n public boolean onMarkerClick(Marker marker) {\n Log.i(LOG_MAP, \"setOnMarkerClickListener\");\n\n return false;\n }", "private void drawMarker(Location location){\n LatLng currentPosition = new LatLng(location.getLatitude(),location.getLongitude());\r\n runlist.add(currentPosition);\r\n\r\n\r\n for(int i = 0; i<runlist.size();i++){\r\n\r\n\r\n\r\n Marker marker = mGoogleMap.addMarker(new MarkerOptions()\r\n .position(runlist.get(i))\r\n .title(\"TRACKING\")\r\n .snippet(\"Real Time Locations\"));\r\n\r\n\r\n\r\n }\r\n\r\n AddLines();\r\n //mGoogleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(runlist.get(0),13));\r\n mGoogleMap.animateCamera(CameraUpdateFactory.newLatLngZoom(runlist.get(0), 13.9f));\r\n\r\n\r\n }", "private void addMarker(HashMap<String, GeofenceInfoContent[]> geofenceToAdd){\n System.gc();\n MainActivity mainActivity = (MainActivity) getActivity();\n\n for(Map.Entry<String, GeofenceInfoContent[]> e : geofenceToAdd.entrySet()){\n if(!currentGeofencesInfoMap.containsKey(e.getKey())) {\n currentGeofencesInfoMap.put(e.getKey(), e.getValue());\n geofenceNamesBeingQueriedForInfo.remove(e.getKey());\n String curGeofenceName = e.getKey();\n GeofenceObjectContent geofence = mainActivity.getGeofenceMonitor().curGeofencesMap.get(curGeofenceName);\n Bitmap markerIcon = BitmapFactory.decodeResource(getResources(), R.drawable.basic_map_marker);\n LatLng position = new LatLng(geofence.getGeofence().getLocation().getLat(), geofence.getGeofence().getLocation().getLng());\n BitmapDescriptor icon = BitmapDescriptorFactory.fromBitmap(markerIcon);\n MarkerOptions geofenceMarkerOptions = new MarkerOptions()\n .position(position)\n .title(curGeofenceName)\n .icon(icon);\n Marker curGeofenceMarker = mMap.addMarker(geofenceMarkerOptions);\n currentGeofenceMarkers.add(curGeofenceMarker);\n }\n }\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_google_map);\n //quakeArrayList\n createMapView();\n addMarker();\n\n mMap.setInfoWindowAdapter(new GoogleMap.InfoWindowAdapter() {\n @Override\n public View getInfoWindow(Marker marker) {\n return null;\n }\n @Override\n public View getInfoContents(Marker marker) {\n LatLng l = marker.getPosition();\n View v = getLayoutInflater().inflate(R.layout.marker_window_layout, null);\n TextView v1 = (TextView) v.findViewById(R.id.marker_window_lat);\n TextView v2 = (TextView) v.findViewById(R.id.marker_window_lon);\n\n String[] tmp = marker.getSnippet().split(\"\\n\");\n\n v1.setText(\"Time Info : \" + tmp[0].replace(\"T\" , \"\\n\"));\n v2.setText(\"Magnitude : \" + tmp[1]);\n return v;\n }\n });\n mMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {\n @Override\n public boolean onMarkerClick(Marker marker) {\n marker.showInfoWindow();\n\n return false;\n }\n });\n }", "@Override\n public void newTweet(double lat, double lon, String title) {\n GoogleMaps.setMarker(browser, lat, lon, title, \"tweet\");\n }", "@Override\n public void onMapLongClick(LatLng latLng) {\n localizacaoAtual = latLng;\n this.setMarker(localizacaoAtual, false);\n Util.showMsgToastShort(CaronaOferecerActivity.this, getString(R.string.msg_ponto_adicionado));\n }" ]
[ "0.7168039", "0.70395386", "0.6973417", "0.6959398", "0.681531", "0.67437404", "0.66388786", "0.6629072", "0.6563915", "0.65541387", "0.6523191", "0.65054774", "0.6452441", "0.6450356", "0.6421148", "0.6397679", "0.6377784", "0.6365753", "0.63517445", "0.6333831", "0.63205767", "0.629306", "0.6278781", "0.6275526", "0.62654287", "0.6261762", "0.62598825", "0.6190202", "0.61853147", "0.618525", "0.61535525", "0.6150379", "0.6131465", "0.6112907", "0.61095065", "0.61001766", "0.6090352", "0.6086558", "0.60819817", "0.606039", "0.60601526", "0.60500604", "0.6034903", "0.6024375", "0.601369", "0.6011308", "0.5999606", "0.59964585", "0.59872454", "0.59827745", "0.5976672", "0.596325", "0.59608054", "0.5905801", "0.58743006", "0.58698", "0.5853889", "0.5849659", "0.5830788", "0.58184516", "0.58167654", "0.5814553", "0.58016783", "0.5789127", "0.5783063", "0.57759726", "0.57696134", "0.57632154", "0.5762195", "0.5750092", "0.57495975", "0.57423794", "0.5740676", "0.5736192", "0.5728107", "0.57250786", "0.5723825", "0.57178915", "0.5717164", "0.5712297", "0.57000846", "0.56951207", "0.56917214", "0.5691247", "0.5691247", "0.5685082", "0.56837595", "0.5683374", "0.56826746", "0.568002", "0.567863", "0.5673169", "0.5671772", "0.5668198", "0.5668198", "0.56570876", "0.56565887", "0.5648034", "0.56412935", "0.563776" ]
0.6456772
12
TODO Autogenerated method stub
@Override public void handle(ActionEvent event) { try { Parent root = FXMLLoader.load(getClass().getResource("Roomless")); Main.stage.setScene (new Scene(root, 700, 500)); Main.stage.show(); } catch (Exception exception) { exception.printStackTrace(); } }
{ "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
Gets the user input from the textfield and sets it to strings for insertion into the file. Also gets the pin that is generated and adds it to the file
@FXML public void saveNewAccount( ) { // Save user input String name = userName.getText( ); String mail = email.getText( ); // Call the to file method to write to data.txt UserToFile.toFile(name, pin, mail); // View the test after the info is saved viewTest( ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void newentry() {\r\n System.out.print(\"Enter regno: \");\r\n regno = KB.nextLine();\r\n System.out.print(\"Enter Name: \");\r\n name = KB.nextLine();\r\n System.out.print(\"Enter mark1: \");\r\n m1 = KB.nextLong();\r\n System.out.print(\"Enter mark2: \");\r\n m2 = KB.nextLong();\r\n System.out.print(\"Enter mark3: \");\r\n m3 = KB.nextLong();\r\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}", "private void saveInput() {\n\t rateId = txtRateId.getText();\t \n\t startSize = txtStartSize.getText();\n\t endSize = txtEndSize.getText();\n\t }", "protected void saveInput() {\r\n value = valueText.getText();\r\n }", "public void saveInput() \n {\n for (int i = 0; i < 10; i++) \n userInput[i] = textFields[i].getText(); \n }", "public void serialEvent(Serial myPort)\n{\n String read = myPort.readStringUntil(10);\n if(outputFileName!=\"\") output.print(str(millis())+ \" \"+read);\n String[] s = split(read, \" \");\n\n if (s.length ==9)\n {\n Setpoint = PApplet.parseFloat(s[1]); // * pull the information\n Input = PApplet.parseFloat(s[2]); // we need out of the\n Output = PApplet.parseFloat(s[3]); // string and put it\n SPLabel.setValue(s[1]); // where it's needed\n InLabel.setValue(s[2]); //\n OutLabel.setValue(trim(s[3])); //\n PLabel.setValue(trim(s[4])); //\n ILabel.setValue(trim(s[5])); //\n DLabel.setValue(trim(s[6])); //\n AMCurrent.setValue(trim(s[7])); //\n DRCurrent.setValue(trim(s[8]));\n if(justSent) // * if this is the first read\n { // since we sent values to \n SPField.setText(trim(s[1])); // the arduino, take the\n InField.setText(trim(s[2])); // current values and put\n OutField.setText(trim(s[3])); // them into the input fields\n PField.setText(trim(s[4])); //\n IField.setText(trim(s[5])); //\n DField.setText(trim(s[6])); //\n // mode = trim(s[7]); //\n AMLabel.setValue(trim(s[7])); //\n //dr = trim(s[8]); //\n DRCurrent.setValue(trim(s[8])); //\n justSent=false; //\n } //\n\n if(!madeContact) madeContact=true;\n }\n}", "String userInputFromTextArea();", "public static void main(String[] args) {\n \n Scanner taskScanner = new Scanner(System.in);\n \n System.out.println(\"Please enter your username\");\n String firstName = taskScanner.nextLine(); \n \n \n System.out.println(\"Please enter your DOB\");\n String dateOfBirth = taskScanner.nextLine(); \n \n System.out.println(\"What is your address\");\n String aaddress = taskScanner.nextLine(); \n \n System.out.println(\"Please enter your Phone Number\");\n long phoneNumber = taskScanner.nextLong();\n \n System.out.println(\"How tall are you in feets?\");\n double yourHeight = taskScanner.nextDouble();\n \n \n \t\n System.out.println(\"Form information\");\n \n System.out.println(\"First Name : \"+ firstName);\n \n //System.out.println(\"Last Name : \"+ lastName);\n \n System.out.println(\"dateOfBirth: \"+ dateOfBirth);\n \n System.out.println(\"PhoneNumber: \"+ phoneNumber);\n \n// System.out.println(\"YourHeight: \"+ yourHeight);\n \n System.out.println(\"address: \"+ aaddress);\n \t \n taskScanner.close();\n \t \n String = make\n \t\t \n \n \t\t\n \n \n \n \n \n \n \t\t\n \n\n}", "public void createAccount() {\n\t\t// Assigns variables based on user input\n\t\tString username = usernameField.getText();\n\t\tString firstName = firstNameField.getText();\n\t\tString lastName = lastNameField.getText();\n\t\tString address = addressField.getText();\n\t\tString postCode = postcodeField.getText();\n\t\tString phoneNumber = phoneNumberField.getText();\n\t\tlong phoneNumberLong;\n\t\tif (username.isEmpty() || firstName.isEmpty() || lastName.isEmpty() || address.isEmpty() || postCode.isEmpty()\n\t\t\t\t|| phoneNumber.isEmpty()) { // Checks if number is correct format\n\n\t\t\tAlert alert = new Alert(AlertType.ERROR); // Error message\n\t\t\talert.setTitle(\"Error\");\n\n\t\t\talert.setHeaderText(\"Could not create an user\");\n\t\t\talert.setContentText(\"Make sure you fill all fields and press button again\");\n\t\t\talert.showAndWait();\n\n\t\t\treturn;\n\t\t}\n\n\t\telse {\n\t\t\ttry {\n\t\t\t\tphoneNumberLong = Long.parseLong(phoneNumber);\n\t\t\t} catch (Exception e) {\n\t\t\t\tAlert alert = new Alert(AlertType.ERROR);\n\t\t\t\talert.setTitle(\"Error\");\n\n\t\t\t\talert.setHeaderText(\"Wrong format of phone number\");\n\t\t\t\talert.setContentText(\"Please enter correct phone number\");\n\t\t\t\talert.showAndWait();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tif(FileReader.exists(username)) {\n\t\t\t\tAlert alert = new Alert(AlertType.ERROR);\n\t\t\t\talert.setTitle(\"Error\");\n\n\t\t\t\talert.setHeaderText(\"User with the username \"+ username +\" already exists. \");\n\t\t\t\talert.setContentText(\"Please choose another username\");\n\t\t\t\talert.showAndWait();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tString userdata = \"\";\n\t\t\tuserdata += \"\\n Username: \" + username;\n\t\t\tuserdata += \"\\n First name: \" + firstName;\n\t\t\tuserdata += \"\\n Last name: \" + lastName;\n\t\t\tuserdata += \"\\n Address: \" + address;\n\t\t\tuserdata += \"\\n Post code: \" + postCode;\n\t\t\tuserdata += \"\\n Phone number: \" + phoneNumberLong;\n\t\t\t\n\n\t\t\tif(custom) {\n\t\t\t\tavatarIndex = 101;\n\t\t\t\t// Gives users the custom avatar\n\t\t\t\tFile file1 = new File(\"artworkImages/\" + username);\n\t\t\t\tfile1.mkdir();\n\t\t\t\tPath path = Paths.get(\"customAvatars/\" + username + \".png\");\n\t\t\t\tString path1 = \"tmpImg.png\";\n\t\t\t\tFile file = new File(path1);\n\n\t\t\t\ttry {\n\t\t\t\t\tFiles.copy(file.toPath(), path, StandardCopyOption.REPLACE_EXISTING);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tUser user = new User(username, firstName, lastName, address, postCode, phoneNumberLong, avatarIndex);\n\t\t\tFileReader.addUser(user); // Creates user\n\n\t\t\ttry {\n\t\t\t\tWriter.writeUserFile(user); // Adds user to memory\n\t\t\t} catch (IOException e) {\n\t\t\t\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\n\t\t\tAlert alert = new Alert(AlertType.INFORMATION); // Success message\n\t\t\talert.setTitle(\"Success\");\n\n\t\t\talert.setHeaderText(\"The user has been created\");\n\t\t\talert.setContentText(\"Close this window to return to login screen\");\n\t\t\talert.showAndWait();\n\n\t\t\tcreateAccountButton.getScene().getWindow().hide();\n\t\t}\n\n\t}", "@FXML\r\n public void createNewAccount(ActionEvent e) throws Exception{\r\n String name = nameField.getText(); //Get nameField text\r\n String grade = gradeField.getText(); //Get gradeField text\r\n String serial = \"1\"; //Create random serial code\r\n String email = emailField.getText(); //Get emailField text\r\n String pnumber = pnumberField.getText(); //Get pnumberField text\r\n Boolean once = true;\r\n\r\n ArrayList <ComboBox> boxList = new ArrayList<>(); //Create new ArrayList with ComboBox type\r\n Collections.addAll(boxList,courseComboBox1, courseComboBox2, courseComboBox3, courseComboBox4, courseComboBox5, courseComboBox6); //Add Course ComboBoxes to ArrayList\r\n\r\n String courseStr = \"\"; //Initialize courseStr (to be written to file)\r\n for (int i = 0; i <boxList.size(); i++){\r\n try{\r\n String tempC = boxList.get(i).getValue().toString();\r\n if (tempC != null){\r\n if (once) {\r\n courseStr = courseStr + tempC;\r\n once = false;\r\n }else{\r\n courseStr = courseStr + \"%\" + tempC;\r\n }\r\n }\r\n System.out.println(tempC);\r\n } catch (NullPointerException error){\r\n System.out.println(\"No Input\");\r\n }\r\n }\r\n\r\n\r\n try(BufferedWriter locFile = new BufferedWriter(new FileWriter(\"src/resources/peerTutorsData.txt\", true))){ //Write data to file\r\n locFile.write(name + \"~\" + courseStr + \"~\" + grade + \"~\" + serial + \"~\" + email + \"~\" + pnumber+\"\\n\");\r\n }\r\n\r\n }", "private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {\n ReadFile rf = new ReadFile();//instance class\n Password ClassPass = new Password();//instance class\n String levelPass = ClassPass.algorithmPass(TFAddPassword.getText());\n //validate not null fieldtext\n if ((TFAddPassword.getText().length() != 0) && (TFAddPhoneNumber.getText().length() != 0) && \n (TFAddAltEmail.getText().length() != 0)&& (!TFAddPhoto.getText().equals(\"Seleccionar archivo\")) && (jDCDate.getDate() != null)) \n {\n if (levelPass.equals(\"Nivel Alto.\") || levelPass.equals(\"Nivel Medio.\") || levelPass.equals(\"Nivel Medio alto.\")) \n {\n String formato = jDCDate.getDateFormatString(); \n Date fecha = jDCDate.getDate();\n SimpleDateFormat sdf = new SimpleDateFormat(formato);\n String passCypher = ClassPass.P_encode(\"meia\", TFAddPassword.getText());//encode\n int Tel = 0;\n Tel = Integer.parseInt(TFAddPhoneNumber.getText());\n String message = rf.InsertUser2(user,passCypher,String.valueOf(sdf.format(fecha).toString()),\n TFAddAltEmail.getText(), Tel,photo,false,true);\n if (message.equals(\"Modificado con exito.\")) {\n JOptionPane.showMessageDialog(null,message, \"Modificar Usuario\", JOptionPane.INFORMATION_MESSAGE);\n //Regresar al Login\n this.dispose();\n }\n else{\n JOptionPane.showMessageDialog(null,message, \"Crear Uusario\", JOptionPane.INFORMATION_MESSAGE);\n } \n }else{\n JOptionPane.showMessageDialog(null,\"Aumente nivel de contraseña.\", \"Campo Contraseña\", JOptionPane.INFORMATION_MESSAGE);\n }\n }\n else\n {\n JOptionPane.showMessageDialog(null,\"Existen todavia campos vacios.\", \"Campo Vacio\", JOptionPane.INFORMATION_MESSAGE);\n } \n\n }", "public synchronized void enterPincode(String pincode) {\n\t\ttry {\n\t\t\tWebActionUtil.waitForElement(pincodeTxtField, \"pincode Txt Field\", 30);\n\t\t\tWebActionUtil.typeText(pincodeTxtField, pincode, \"pincodeTxtField\");\n\t\t}\n\t\t catch (Exception e) \n\t\t{\n\t\t\t WebActionUtil.error(e.getMessage());\n\t\t\tWebActionUtil.error(\"Unable to enter pincode\");\n\t\t\tAssert.fail(\"Unable to enter pincode\");\n\t\t}\n\t}", "public void processUser(){\n Scanner sc = new Scanner(System.in);\n\n InputNote inputNote = new InputNote(view, sc, note);\n inputNote.inputNote();\n\n notebook.addNote(note);\n note.formLastNameAndFirstLetterOfName();\n System.out.println(note.toString());\n }", "@Override\r\n protected Text generateInputTag(String string)\r\n {\n String ds = inputFile.substring(inputFile.lastIndexOf(\"/\") + 1).split(\"-\")[0];\r\n return new Text(ds);\r\n }", "public void read() {\r\n\t\tJTextField txtCustomerNo = new JTextField();\r\n\t\ttxtCustomerNo.setText(\"\" + this.getCustomerNo());\r\n\t\tJTextField txtTitle = new JTextField();\r\n\t\ttxtTitle.requestFocus();\r\n\t\tJTextField txtFirstName = new JTextField();\r\n\t\tJTextField txtSurname = new JTextField();\r\n\t\tJTextField txtAddress = new JTextField();\r\n\t\tJTextField txtPhoneNo = new JTextField();\r\n\t\tJTextField txtEmail = new JTextField();\r\n\r\n\t\t\r\n\t\tObject[] message = { \"Customer Number:\", txtCustomerNo, \"Title:\", txtTitle, \"First Name:\", txtFirstName,\r\n\t\t\t\t\"Surname:\", txtSurname, \"Address:\", txtAddress, \"Phone Number:\", txtPhoneNo, \"Email:\", txtEmail, };\r\n\t\t\r\n\r\n\t\tint option = JOptionPane.showConfirmDialog(null, message, \"Enter customer details\",\r\n\t\t\t\tJOptionPane.OK_CANCEL_OPTION);\r\n\t\t\r\n\t\tName txtName = new Name(txtTitle.getText(), txtFirstName.getText(), txtSurname.getText());\r\n\r\n\t\tif (option == JOptionPane.OK_OPTION) {\r\n\t\t\tthis.name = txtName;\r\n\t\t\tthis.address = txtAddress.getText();\r\n\t\t\tthis.phoneNo = txtPhoneNo.getText();\r\n\t\t\tthis.emailAddress = txtEmail.getText();\r\n\t\t}\r\n\t}", "public void new_record()\n {\n /*\n Prompt for data:\n Last name\n First name\n Phone\n */\n \n //Craete a scanner object\n Scanner kb = new Scanner(System.in);\n \n //prompt for the last name\n System.out.print(\"Last name: \");\n \n //input the last name\n String lastName = kb.nextLine();\n \n //the Last_name must not be empty\n if(lastName.length() > 0 )\n {\n //get the first name and the phone\n System.out.print(\"First name: \");\n String firstName = kb.nextLine();\n \n System.out.print(\"Phone: \");\n String phone = kb.nextLine(); \n \n \n \n //create the output string\n \n \n \n \n //delare variables to hold file types\n FileWriter fWrite = null;\n \n //try to open the file for writing - append the data\n try\n {\n fWrite = new FileWriter(new File(filename), true);\n \n }\n catch(IOException ioe)\n {\n System.out.println(\"new_record: Exception opening the file for writing\");\n }\n //try to wrtie the data\n try\n {\n fWrite.write(lastName + \",\" + firstName + \",\" + phone + \"\\n\");\n \n }\n catch(IOException ioe)\n {\n System.out.println(\"new_record: Exception writing to the file\");\n }\n //try to close the file\n try\n {\n fWrite.close();\n \n }\n catch(IOException ioe)\n {\n System.out.println(\"new_record: Exception closing the file\");\n }\n \n }//end of test of Last_name\n \n }", "@Override\n public void onDialogPositiveClick(String newFilename){\n if(mEditTextMolFile.getText().toString().length()==0){\n Toast.makeText(getApplicationContext(),\"Empty edit text field. Not saved.\",Toast.LENGTH_LONG).show();\n return;\n }\n\n try{\n String[] ss = mEditTextMolFile.getText().toString().split(System.getProperty(\"line.separator\"));\n PrintWriter writer = new PrintWriter(getFilesDir()+\"/\"+newFilename+\".mol\");\n for(int i = 0; i<ss.length; i++){\n writer.println(ss[i]);\n }\n writer.close();\n if(!(newFilename.equals(\"mol\")||newFilename.equals(\"mol2d\"))){\n Toast.makeText(getApplicationContext(), \"mol file \" + newFilename + \" saved!\", Toast.LENGTH_LONG).show();\n }\n }catch (IOException e){\n e.printStackTrace();\n Toast.makeText(getApplicationContext(),\"Saving failed!\",Toast.LENGTH_LONG).show();\n }\n }", "private void firstTimePin() {\n\n // get prompts.xml view\n LayoutInflater li = LayoutInflater.from(mContext);\n View promptsView = li.inflate(R.layout.set_pin, null);\n AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(mContext, R.style.AppTheme_White_Dialog);\n\n // set prompts.xml to alertdialog builder\n alertDialogBuilder.setView(promptsView);\n\n final EditText newPin = (EditText) promptsView.findViewById(R.id.etSetPin);\n final EditText newConfirmPin = (EditText) promptsView.findViewById(R.id.etSetPinConfirm);\n\n\n alertDialogBuilder\n .setCancelable(false)\n .setPositiveButton(\"OK\", null)\n .setNegativeButton(\"Cancel\", null);\n // create alert dialog\n alertDialog = alertDialogBuilder.create();\n // show it\n alertDialog.setOnShowListener(new DialogInterface.OnShowListener() {\n\n @Override\n public void onShow(final DialogInterface dialog) {\n\n Button button = ((AlertDialog) dialog).getButton(AlertDialog.BUTTON_POSITIVE);\n button.setOnClickListener(new View.OnClickListener() {\n\n @Override\n public void onClick(View view) {\n // TODO Do something\n\n String newPinString = newPin.getText().toString().trim();\n String newConfirmPinString = newConfirmPin.getText().toString().trim();\n\n if (!validate(newPinString, newConfirmPinString, newPin, newConfirmPin)) {\n Toast.makeText(mContext, \"Error with input\", Toast.LENGTH_SHORT).show();\n return;\n }\n\n progressDialog = new ProgressDialog(SetWalletActivity.this,\n R.style.AppTheme_White_Dialog);\n progressDialog.setIndeterminate(true);\n progressDialog.setMessage(\"loading...\");\n progressDialog.getWindow().setLayout(400, ViewGroup.LayoutParams.WRAP_CONTENT);\n progressDialog.show();\n setPin(newPinString);\n\n\n }\n });\n Button btnCancel = ((AlertDialog) dialog).getButton(AlertDialog.BUTTON_NEGATIVE);\n btnCancel.setOnClickListener(new View.OnClickListener() {\n\n @Override\n public void onClick(View view) {\n // TODO Do something\n dialog.dismiss();\n\n Intent intentMainMenu = new Intent(mContext, MainMenuActivity.class);\n startActivity(intentMainMenu);\n\n finish();\n }\n });\n }\n });\n\n\n TextView msg = new TextView(this);\n msg.setText(\"SET YOUR NEW PIN\");\n msg.setTextSize(18);\n msg.setPadding(5, 5, 5, 5);\n //msg.setTextColor();\n msg.setGravity(Gravity.CENTER);\n alertDialog.setCustomTitle(msg);\n alertDialog.show();\n alertDialog.getWindow().setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_setup_pin);\n\n mAuth = FirebaseAuth.getInstance();\n mDatabaseUsers = FirebaseDatabase.getInstance().getReference().child(\"Users\");\n\n mProgress = new ProgressDialog(this);\n\n pinNumber = (EditText) findViewById(R.id.pin_number);\n pinBtn = (Button) findViewById(R.id.pin_btn);\n pinTitle = (TextView) findViewById(R.id.pin_title);\n\n pinBtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n if(pinNumber.getText().length() >= 4 && pinNumber.getText().length() <= 8) {\n if (repeat) {\n if (pinNumber.getText().toString().equals(currentPin)) {\n\n setupNewPin();\n\n } else {\n pinTitle.setText(\"Try Again\");\n repeat = false;\n currentPin = \"\";\n pinNumber.setText(\"\");\n Toast.makeText(SetupPinActivity.this, \"Pin does not match, input your pin again\", Toast.LENGTH_SHORT).show();\n }\n } else {\n currentPin = pinNumber.getText().toString();\n repeat = true;\n pinNumber.setText(\"\");\n pinTitle.setText(\"repeat your pin\");\n Toast.makeText(SetupPinActivity.this, \"Repeat your pin\", Toast.LENGTH_SHORT).show();\n }\n }else{\n Toast.makeText(SetupPinActivity.this, \"Minimum 4 number, Maximum 8 number\", Toast.LENGTH_SHORT).show();\n }\n\n }\n });\n }", "String getUsersInput(String outForUser) throws IOException;", "public void onClick(View v) {\n\n if ((mPinEditText.getText().toString().length() >= 3 &&\n mPinEditText.getText().toString().length() <= 10) &&\n mConfirmEditText.getText().toString().length() != 0 &&\n mOldPinEditText.getText().toString().length() != 0 &&\n mNameEditText.getText().toString().trim().length() != 0) {\n\n if (Integer.parseInt(mOldPinEditText.getText().toString()) == Integer.parseInt(sharedInfo.getString(\"personpin\", null))) {\n if (Integer.parseInt(mPinEditText.getText().toString()) == Integer.parseInt(mConfirmEditText.getText().toString())) {\n\n editor.putString(\"personname\", mNameEditText.getText().toString().trim());\n editor.putString(\"personpin\", mPinEditText.getText().toString());\n\n editor.apply();\n\n showToast(R.string.information_updated);\n finish();\n\n } else {\n showToast(R.string.mismatched_pin);\n }\n } else {\n showToast(R.string.old_pin_mismatched);\n }\n } else {\n showToast(R.string.invalid_information);\n }\n }", "public void setPIN (String PIN);", "private void WriteStringActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_WriteStringActionPerformed\r\n String string = StringText.getText();\r\n long serial = reader.readTag();\r\n if(string.equals(\"\")){\r\n string = \"Empty\";\r\n }\r\n reader.writeString(string);// TODO add your handling code here:\r\n statusText.setText(reader.getMessage());\r\n serialText.setText(\"Serial = \" + serial + \" hex:\" + Integer.toHexString((int)serial).toUpperCase());\r\n StringText.setText(\"\");\r\n}", "public static void enterNewTXTFile(String input, String id, String newName, String newHandle, String newTime, String newTweet)\n {\n try {\n String str = Integer.parseInt(id)+ \" \" +newName+ \" \" +newHandle+ \" \" +newTime+ \" \" +newTweet+ \" \";\n writer = new BufferedWriter(new FileWriter(input, true)); // continue to write to existing output file\n writer.write(str);\n writer.newLine();\n writer.close();\n \n } catch (Exception e) { System.out.println(e); }\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 createAccount()throws IOException{\n\t\ttry{\n\t\t\tFile accountInfo = new File(\"account.txt\");\n\t\t\tFile Information = new File(\"information.txt\");\n\t\t\tArrayList<String> temp = new ArrayList<String>();\n\t\t\tArrayList<String> info = new ArrayList<String>();\n\t\t\tScanner inputFromInformation = new Scanner(Information);\n\t\t\tScanner inputFromAccount = new Scanner(accountInfo);\n\t\t\twhile (inputFromAccount.hasNextLine()){\n\t\t\t\ttemp.add(inputFromAccount.nextLine());\n\t\t\t}\n\t\t\tScanner input = new Scanner(System.in);\n\t\t\t// This is where we will start the new account process\n\t\t\t// first by telling us who you are.\n\t\t\tSystem.out.println(\"Enter your First Name\");\n\t\t\tString firstName = input.next();\n\t\t\t\n\t\t\tSystem.out.println(\"Enter your Last Name\");\n\t\t\tString lastName = input.next();\n\t\t\t// This will give the user recommended\n\t\t\t// user names if they cannot think of one.\n\t\t\tRecommendedUserNames(firstName,lastName);\n\t\t\t// here they will be prompt to enter their preferred user name\n\t\t\tSystem.out.println(\"Enter your preferred username\");\n\t\t\tString UserName = input.next();\n\t\t\t// This will prompt the user for a password\n\t\t\t// The password will have to meet these requirements\n\t\t\tSystem.out.println(\"Your password should meet the following requirements:\");\n\t\t\tSystem.out.println(\"-It must have at least eight characters.\\n-It must consist of only letters and digits.\"\n\t\t\t\t\t\t\t+ \"\\n-It must contain more than two digits and two characters.\");\n\t\t\tSystem.out.println(\"\\nEnter your new Password\");\n\t\t\tString Password = input.next();\n\t\t\t\n\t\t\t// this is what will verify the user password and see if it meets the recommended requirements\n\t\t\t// for security reasons of course.\n\t\t\tString Pass;\n\n\t\t\tboolean check=false;\n\t\t\tif(validigits(Password)&&letter_digit_check(Password))check=true;\n\t\t\twhile(!check){\n\t\t\t\tSystem.out.println(\"Please recheck the password requirement and try again.\");\n\t\t\t\tPassword = input.next();\n\t\t\t\tif(validigits(Password)&&letter_digit_check(Password))check=true;\n\t\t\t}\n\t\t\tdo{\n\t\t\t\tSystem.out.println(\"\\nPlease re-enter the Password\");\n\t\t\t\tPass = input.next();\n\t\t\t\tif(!Pass.equals(Password))System.out.println(\"Passwords do not match!\");\n\t\t\t}while(!Pass.equals(Password));\n\t\t\tboolean CreateAccount = true;\n\t\t\tSystem.out.println(\"You need to fill the information for completion of your account registration\");\n\t\t\teditInfo(UserName,CreateAccount);\n\t\t\tPrintWriter output = new PrintWriter(accountInfo);\n\t\t\ttemp.add(UserName+\" \"+Password);\n\t\t\tfor (int i=0; i<temp.size(); i++){\n\t\t\t\toutput.println(temp.get(i));\n\t\t\t}\n\t\t\toutput.close();\n\t\t\tSystem.out.println(\"Your account has been created and your information has been saved\"\n\t\t\t\t\t+ \"\\nYou have been logged out for this session\\n\");\n\t\t\tstarter();\n\t\t}\n\t\tcatch (java.io.IOException ex){\n\t\t\tSystem.out.println(\"I/O Errors: File is not found\");\n\t\t}\t\n\t}", "@Override\r\n public void storePin() {\n DataStoreGP1 data = (DataStoreGP1) ds;\r\n data.pin = data.temp_p;\r\n System.out.println(\"Pin has been saved successfully..\");\r\n }", "@Override\n public void add_content() {\n Scanner _thisText = new Scanner(System.in);\n System.out.println(\"Enter Ad text:\");\n _adContent = _thisText.nextLine();\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n int inPin = Integer.parseInt(txtPin.getText());\n\n //Compares the input value with the set pin\n if(inPin == 6942){\n txtPin.setText(\"Pin Accepted\");\n txtPin.enable(false);\n btnPrint.setVisible(true);\n } else {\n txtPin.setText(\"\");\n JOptionPane.showMessageDialog(JOptionPane.getRootFrame(),\n \"Wrong pin number\",\n \"Wrong pin\",\n JOptionPane.WARNING_MESSAGE);\n }\n }", "public void ask() {\n Scanner scan = new Scanner(System.in);\n System.out.println(\"Please enter a number from 1 to 9\");\n System.out.println(\"1-Start\");\n System.out.println(\"2-Seahorse Valley\");\n System.out.println(\"3-Seahorses\");\n System.out.println(\"4-Seahorse upside-down\");\n System.out.println(\"5-Misiurewicz point\");\n System.out.println(\"6-Part of seahorse tail\");\n System.out.println(\"7-Satellite\");\n System.out.println(\"8-Antenna of satellite\");\n System.out.println(\"9-Seahorse Valley\");\n// System.out.println(\"10-Double spirals\");\n// System.out.println(\"11-Secondorder satellites\");\n// System.out.println(\"12-Imitating Julia sets\");\n// System.out.println(\"13-double-hook\");\n\n String s = Integer.toString(scan.nextInt());\n //changing file name\n setUpFile = \"input\" + s + \".txt\";\n\n System.out.println(\"Thank you. Now, please be patient as MS sets up for your optimal viewing pleasure.\");\n System.out.println(\"Meanwhile, read up here on the Mandelbrot Set: http://mathworld.wolfram.com/MandelbrotSet.html.\");\n }", "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}", "private void saveButtonActionPerformed(java.awt.event.ActionEvent evt) {\n try{\n int s=Integer.parseInt(starField.getText());\n airliner.setCodeName(CodenameField.getText());\n airliner.setAirlinerName(nameField.getText());\n \n airliner.setAirlinerStarRating(s);\n }catch(Exception e){\n JOptionPane.showMessageDialog(null, \"Wrong type detected\");\n \n }\n \n }", "public void shareLocation(View view) {\n\t\tLog.d(TAG, \"clicked!\");\n\t\t// Declare widgets\n\t\tEditText forename = (EditText) findViewById(R.id.forename);\n\t\tEditText surname = (EditText) findViewById(R.id.surname);\n\t\tTextView pinDisplay = (TextView) findViewById(R.id.pinDisplay);\n\n\t\t// Initiate the Shared Preferences\n\t\tSharedPreferences settings = getSharedPreferences(PREFS_NAME, 0);\n\t\tboolean isFirstRun = settings.getBoolean(\"isFirstRun\", true);\n\t\tSharedPreferences.Editor editor = settings.edit();\n\t\tLog.d(TAG, \"Set up preferences\");\n\n\t\t// Get text from widgets\n\t\tif (isFirstRun) {\n\t\t\tString forenameText = forename.getText().toString();\n\t\t\tString surnameText = surname.getText().toString();\n\t\t\tString name = forenameText + \" \" + surnameText;\n\t\t\teditor.putString(\"username\", name);\n\t\t\teditor.commit();\n\t\t\tLog.d(TAG, \"name generated ok\");\n\t\t\tif ((forenameText.length() < 1) || (surnameText.length() < 1)) {\n\t\t\t\tToast.makeText(this, R.string.fill_fields, Toast.LENGTH_LONG)\n\t\t\t\t\t\t.show();\n\t\t\t} else {\n\t\t\t\tLog.d(TAG, \"Generating pin\");\n\t\t\t\t// Generate the user pin\n\t\t\t\tString pin = generateUserPin(forenameText, surnameText);\n\t\t\t\t// Mark it as no longer first run, setup options will disappear\n\t\t\t\teditor.putBoolean(\"isFirstRun\", false);\n\t\t\t\teditor.putString(\"pin\", pin);\n\t\t\t\teditor.commit();\n\t\t\t\tpinDisplay.setText(pin);\n\t\t\t\tgetAndStoreLocation(pin, name, isFirstRun);\n\t\t\t}\n\t\t}\n\n\t\telse { // It is not the first run of the app\n\t\t\t\t// Pull the user's pin out from SharedPreferences\n\t\t\tString pin = settings.getString(\"pin\", \"\");\n\t\t\tString username = settings.getString(\"username\", \"\");\n\t\t\tpinDisplay.setText(pin);\n\t\t\tLog.d(TAG, \"Running!\");\n\t\t\tgetAndStoreLocation(pin, username, isFirstRun);\n\n\t\t}\n\n\t}", "public void startInfo() {\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Enter your name:\");\n\t\tString name = this.getInputString();\n\t\tSystem.out.println(\"Enter your mobile number:\");\n\t\tint number = this.getInputInteger();\n\t\tSystem.out.println(\"Enter your email:\");\n\t\tString email = this.getInputString();\n\t}", "private void getUserTextInput() {\n if (!TextUtils.isEmpty(mBinding.fragmentSearchZipcodeTxt.getText()))\n mZipcodeInput = Integer.parseInt(mBinding.fragmentSearchZipcodeTxt.getText().toString().trim());\n if (!TextUtils.isEmpty(mBinding.fragmentSearchCityTxt.getText()))\n mCityInput = mBinding.fragmentSearchCityTxt.getText().toString().trim();\n if (!TextUtils.isEmpty(mBinding.fragmentSearchMinSurfaceTxt.getText()))\n mMinSurfaceInput = Utils.convertAreaAccordingToPreferences(mActivity, mBinding.fragmentSearchMinSurfaceTxt.getText().toString().trim());\n if (!TextUtils.isEmpty(mBinding.fragmentSearchMaxSurfaceTxt.getText()))\n mMaxSurfaceInput = Utils.convertAreaAccordingToPreferences(mActivity, mBinding.fragmentSearchMaxSurfaceTxt.getText().toString().trim());\n if (!TextUtils.isEmpty(mBinding.fragmentSearchMinPriceTxt.getText()))\n mMinPriceInput = Utils.convertPriceAccordingToPreferences(mActivity, mBinding.fragmentSearchMinPriceTxt.getText().toString().trim());\n if (!TextUtils.isEmpty(mBinding.fragmentSearchMaxPriceTxt.getText()))\n mMaxPriceInput = Utils.convertPriceAccordingToPreferences(mActivity, mBinding.fragmentSearchMaxPriceTxt.getText().toString().trim());\n if (!TextUtils.isEmpty(mBinding.fragmentSearchMinFloorsTxt.getText()))\n mFloorsInput = Integer.parseInt(mBinding.fragmentSearchMinFloorsTxt.getText().toString().trim());\n if (!TextUtils.isEmpty(mBinding.fragmentSearchForSaleTxt.getText()))\n mForSaleDate = Converters.dateToTimestamp(Utils.convertStringToDate(mBinding.fragmentSearchForSaleTxt.getText().toString().trim()));\n if (!TextUtils.isEmpty(mBinding.fragmentSearchSoldTxt.getText()))\n mSoldDate = Converters.dateToTimestamp(Utils.convertStringToDate(mBinding.fragmentSearchSoldTxt.getText().toString().trim()));\n }", "public void actionPerformed(ActionEvent e){\r\n \r\n final int MAXNUM = 99;\r\n int num;\r\n try\r\n {\r\n num = Integer.parseInt(room.getText());\r\n if(num > MAXNUM){\r\n num = MAXNUM;\r\n }\r\n dormFile.seek((num - 1) * RECORD_SIZE);\r\n dormFile.writeInt(num);\r\n dormFile.writeUTF(first.getText());\r\n dormFile.writeUTF(last.getText());\r\n room.setText(\"\");\r\n last.setText(\"\");\r\n first.setText(\"\");\r\n } \r\n catch(NumberFormatException e2)\r\n {\r\n\r\n System.err.println(\"Invalid room number\");\r\n }\r\n\r\n catch(IOException e3)\r\n {\r\n System.err.println(\"Error writing file\");\r\n System.exit(1);\r\n }\r\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tint choice=0;\r\n\t\tint pin;\r\n\t\t\r\n\t\t\r\n\t\tScanner sc=new Scanner(System.in);\r\n\t\tRandom rand=new Random();\r\n\t\tdo\r\n\t\t{\r\n\t\t\tSystem.out.println(\"1. Create User \");\r\n\t\t\tSystem.out.println(\"2. Login \");\r\n\t\t\tSystem.out.println(\"3. Exit \");\r\n\t\t\tSystem.out.println(\"Enter a choice : \");\r\n\t\t\tchoice=sc.nextInt();\r\n\t\t\t//sc.nextLine();\r\n\t\t\tif(choice==1)\r\n\t\t\t{\r\n\t\t\t\tString name,phone,mail,lname;\r\n\t\t\t\tob[noAcc]=new Accountss();\r\n\t\t\t\tSystem.out.println(\"Enter the details...\");\r\n\t\t\t\tSystem.out.println(\"Enter the Name \t\t: \");\r\n\t\t\t\tname=sc.next();\r\n\t\t\t\tif(noAcc!=0)\r\n\t\t\t\t{\r\n\t\t\t\t\tfor(int i=0;i<noAcc;i++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(ob[i].name.toString().equals(name))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.println(\"\\n Enter your Last Name :\");\r\n\t\t\t\t\t\t\tlname=sc.next();\r\n\t\t\t\t\t\t\tname=name+lname;\r\n\t\t\t\t\t\t\tbreak;\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\tob[noAcc].name=new StringBuffer(name);\r\n\t\t\t\tSystem.out.println(\"Enter the Phone Number : \");\r\n\t\t\t\tphone=sc.next();\r\n\t\t\t\tint flag=1;\r\n\t\t\t\tdo {\r\n\t\t\t\t\tflag=1;\r\n\t\t\t\t\tif(phone.length()!=10)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tSystem.out.println(\"Phone Number Must Contains 10 digit.. Enter a new Number\");\r\n\t\t\t\t\t\tphone=sc.next();\r\n\t\t\t\t\t\tflag=0;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\tfor(int i=0;i<noAcc;i++)\r\n\t\t\t\t\t\tif(ob[i].phone.toString().equals(phone))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.println(\"Phone Number Already Exists.. Enter a new Number\");\r\n\t\t\t\t\t\t\tphone=sc.next();\r\n\t\t\t\t\t\t\tflag=0;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}while(flag!=1);\r\n\t\t\t\tob[noAcc].phone=new StringBuffer(phone);\r\n\t\t\t\tSystem.out.println(\"Enter the Mail : \");\r\n\t\t\t\tmail=sc.next();\r\n\t\t\t\t\r\n\t\t\t\tdo {\r\n\t\t\t\t\tflag=1;\r\n\t\t\t\t\tif(!mail.contains(\"@\")||!mail.contains(\".\"))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(\"Not a valid Email ID.. Enter a new Mail ID\");\r\n\t\t\t\t\t\tmail=sc.next();\r\n\t\t\t\t\t\tflag=0;\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\tfor(int i=0;i<noAcc;i++)\r\n\t\t\t\t\t\tif(ob[i].mail.toString().equals(mail))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.println(\"Mail ID Already Exists.. Enter a new Mail ID\");\r\n\t\t\t\t\t\t\tmail=sc.next();\r\n\t\t\t\t\t\t\tflag=0;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}while(flag!=1);\r\n\t\t\t\tob[noAcc].mail=new StringBuffer(mail);\t\t\t\r\n\t\t\t\tSystem.out.println(\"Enter the Address : \");\r\n\t\t\t\tob[noAcc].addr=new StringBuffer(sc.nextLine());\r\n\t\t\t\tsc.nextLine();\r\n\t\t\t\tob[noAcc].accNo+=noAcc;\r\n\t\t\t\tSystem.out.println(\"Account Number is : \"+ob[noAcc].accNo);\r\n\t\t\t\tpin=rand.nextInt(8999)+1000;\r\n\t\t\t\tSystem.out.println(\"Generated PIN = \"+pin);\r\n\t\t\t\tob[noAcc].pin=pin;\r\n\t\t\t\tnoAcc++;\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse if(choice==2)\r\n\t\t\t{\r\n\t\t\t\tint pin_number;\r\n\t\t\t\tint id=-1;\r\n\t\t\t\t//do{\r\n\t\t\t\tSystem.out.println(\"Enter the Account Number : \");\r\n\t\t\t\tint accNo=sc.nextInt();\r\n\t\t\t\tfor(int i=0;i<noAcc;i++)\r\n\t\t\t\t{\r\n\t\t\t\t\tif((ob[i].accNo)==accNo)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tid=i;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(id==-1)\r\n\t\t\t\t\tSystem.out.println(\"Account not Found...\");\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"Enter the Pin : \");\r\n\t\t\t\t\tpin_number=sc.nextInt();\r\n\t\t\t\t\tif(pin_number==ob[id].pin)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(\"Account Found..\");\r\n\t\t\t\t\t\tOptions(id);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tSystem.out.println(\"Incorrect PIN...\");\r\n\t\t\t\t\t\tid=-1;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t//}while(id!=-1);\r\n\t\t\t}\r\n\t\t\telse if(choice==3)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Have a nice Day :D\");\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Invalid Choice...\");\r\n\t\t\t}\r\n\r\n\t\t}while(choice!=3);\r\n\t\tsc.close();\r\n\t}", "public void registerInput( String pinName ) {\n\t//Bug: all we do is prevent inputs from being used twice, more later\n\tfor (String s: inputs) {\n\t if (s.equals( pinName )) {\n\t\tErrors.warn( \"Input reused: \" + name + \" \" + pinName );\n\t }\n\t}\n\tinputs.add( pinName );\n }", "public void actionPerformed(ActionEvent arg0) { // method called when the button is clicked\n\n FileWriter fw; // create variable for the FileWriter which writes to the file\n //catch for empty unfilled textfields\n if (!txtLogin.getText().isEmpty() || !passwordField.getText().isEmpty() || !confirmPasswordField.getText().isEmpty() || !txtEmail.getText().isEmpty()) {\n if (passwordField.getText().equals(confirmPasswordField.getText())) {\n Pattern p = Pattern.compile(\"^[_A-Za-z0-9-\\\\+]+(\\\\.[_A-Za-z0-9-]+)*@\"\n + \"[A-Za-z0-9-]+(\\\\.[A-Za-z0-9]+)*(\\\\.[A-Za-z]{2,})$\"); // Rejex which checks for a valid email address\n Matcher m = p.matcher(txtEmail.getText()); //Tries to match the input email to check whether it is a valid email coapturing all required aspects\n\n if (m.find()) { // when mathcer finds the email valid proceed below\n try {\n fw = new FileWriter(\"src//SandwichShop//users.txt\", true); // Assign the FileWriter fw to a file\n fw.write(txtLogin.getText() + \" \" + passwordField.getText() + \" \" + txtEmail.getText() + \" \\r\\n\"); // Write user details to the file\n fw.close(); //close the FileWriter\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n JOptionPane.showMessageDialog(null, \"Registration completed successfully!\");\n } else {\n JOptionPane.showMessageDialog(null, \"Enter correct E-mail, please.\");\n }\n } else {\n JOptionPane.showMessageDialog(null, \"\\\"Password\\\" field and \\\"Confirm Password\\\" field not match\");\n }\n } else {\n JOptionPane.showMessageDialog(null, \"One or more fields are empty!\");\n }\n }", "public static void main(String[] args){\n\t\tBufferedReader indata = new BufferedReader(new InputStreamReader(System.in));\r\n\t\tString input=null;\r\n\t\ttry {\r\n\t\t\tinput=indata.readLine();\r\n\t\t} catch (IOException e1) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\tFile file = new File(\"d:/addfile.txt\"); \r\n try { \r\n file.createNewFile();\r\n } catch (IOException e) { \r\n // TODO Auto-generated catch block \r\n e.printStackTrace(); \r\n }\r\n \r\n byte writebyte[] = new byte[1024];\r\n writebyte=input.getBytes();\r\n try{\r\n \tFileOutputStream in = new FileOutputStream(file);\r\n \ttry{\r\n \t\tin.write(writebyte, 0, writebyte.length); \r\n in.close();\r\n \t} catch (IOException e) { \r\n // TODO Auto-generated catch block \r\n e.printStackTrace(); \r\n } \r\n } catch (FileNotFoundException e) { \r\n // TODO Auto-generated catch block \r\n e.printStackTrace(); \r\n }\r\n \r\n if(input.equals(\"print\")){\r\n \ttry{\r\n \t\tFileInputStream out = new FileInputStream(file); \r\n \t\tInputStreamReader outreader = new InputStreamReader(out);\r\n \t\tint ch = 0;\r\n \t\twhile((ch=outreader.read())!=-1){\r\n \t\t\tSystem.out.print((char) ch);\r\n \t\t}\r\n \t\toutreader.close();\r\n \t}catch (Exception e) { \r\n \t\t// TODO: handle exception \r\n \t} \r\n }\r\n\t}", "public void readInPasswords(){\n String fileName = \"all_passwords.txt\";\n String nextLine = null;\n String [] temp;\n\n try{\n FileReader reader = new FileReader(fileName);\n BufferedReader bufferedReader = new BufferedReader(reader);\n \n while((nextLine = bufferedReader.readLine()) != null){\n temp = nextLine.split(\",\");\n if(temp[0].length() == 5)\n passwords.insertKey(temp[0], Double.parseDouble(temp[1]));\n }\n }catch(FileNotFoundException e){\n System.out.println(\"Unable to open file \" + fileName);\n }catch(IOException ex){\n System.out.println(\"Error reading file: \" + fileName);\n }\n \n }", "public void input_details_log()\r\n {\r\n System.out.print(\"\\n Enter your email id: \");\r\n Email=sc.nextLine();\r\n\r\n System.out.print(\" Enter your password: \");\r\n check_passwrd=sc.nextLine();\r\n }", "public static void main(String[] args) {\n String forename = Keyboard.getText(\"Please enter your forname\");\n //Step 2: ask user for surname\n String surname = Keyboard.getText(\"Please enter your surname\");\n //Step 3: ask user for mothers maiden name\n String maiden = Keyboard.getText(\"Please enter your mothers maiden name\");\n //Step 4: ask user for city in which they were born\n String town = Keyboard.getText(\"Please enter the town where you were born\");\n //Step 5: starwarsname = first 3 letter of surname + first 2 letters of first name + \" \" + first 3 letters of motehrs maiden name + first 2 letters of town you **were born in\n\nString starwarsname = (surname.substring(0,3)+(forename.substring(0,2)) + \" \"+ (maiden.substring(0,3)+ (town.substring(0,2))));\n\n //Step 6: display \"your star wars name is \" + starwarsname\n System.out.println(\"Your Star Wars name is \" + starwarsname);\n }", "private static int addPersonToFile(String name, String phoneNo, String email, String address){\r\n FileWriter fr = null;\r\n BufferedWriter br = null;\r\n PrintWriter pr = null;\r\n\r\n if (name.length() == 0) return 1; //nameField is empty\r\n if (phoneNo.length() == 0) return 2; //phoneNoField is empty\r\n if (email.length() == 0) return 3; //emailField is empty\r\n if (address.length() == 0) return 4; //addressField is empty\r\n\r\n int validate = phoneNoValidator(phoneNo);\r\n if (validate == 1) return 5; //phone number is not in correct format.\r\n validate = emailValidator(email);\r\n if (validate == 1) return 6; //email isn't in correct format.\r\n\r\n try{\r\n fr = new FileWriter(file, true);\r\n br = new BufferedWriter(fr);\r\n pr = new PrintWriter(br);\r\n Scanner scanner = new Scanner(file);\r\n\r\n String content = name+separator+phoneNo+separator+email+separator+address;\r\n\r\n while (scanner.hasNext()){\r\n String line = scanner.nextLine();\r\n if (content.equals(line)){\r\n return 7; //person already exists.\r\n }\r\n }\r\n\r\n if (contentSet.contains(content))\r\n return 7;\r\n\r\n /*kept this hashSet so that if someone accidentally presses the addPersonButton\r\n *repeatedly it can quickly tell that this person has already been added.\r\n */\r\n\r\n else {\r\n contentSet.add(content);\r\n pr.println(content);\r\n }\r\n\r\n }catch (IOException e){\r\n fileError();\r\n e.printStackTrace();\r\n }finally {\r\n try{\r\n if (pr != null) pr.close();\r\n if (br != null) br.close();\r\n if (fr != null) fr.close();\r\n }catch (IOException | NullPointerException e){\r\n e.printStackTrace();\r\n }\r\n }\r\n return 0;\r\n }", "private void getTextFromInput() {\n firstName = firstNameField.getText();\n lastName = lastNameField.getText();\n age = ageField.getText();\n email = emailField.getText().toLowerCase();\n }", "static void take_the_input() throws IOException{\n\t\tSystem.out.print(\"ENTER THE ADDRESS : \");\n\n\t\taddress = hexa_to_deci(scan.readLine());\n\t\tSystem.out.println();\n\n\t\twhile(true){\n\t\t\tprint_the_address(address);\n\t\t\tString instruction = scan.readLine();\n\t\t\tint label_size = check_for_label(instruction);\n\t\t\tinstruction = instruction.substring(label_size);\n\t\t\tmemory.put(address, instruction);\n\t\t\tif(stop_instruction(instruction))\n\t\t\t\tbreak;\n\t\t\taddress+=size_of_code(instruction);\n\t\t}\n\t\tSystem.out.println();\n\t\tSystem.out.print(\"DO YOU WANT TO ENTER ANY FURTHUR CODE (Y/N) : \");\n\t\tString choice = scan.readLine();\n\t\tSystem.out.println();\n\t\tif(choice.equals(\"Y\"))\n\t\t\ttake_the_input();\n\t}", "public void button_proband_ok(View view){\n String codePart1 = getEditText(R.id.pc_1);\n String codePart2 = getEditText(R.id.pc_2);\n String codePart3 = getEditText(R.id.pc_3);\n String codePart4 = getEditText(R.id.pc_4);\n String codePart5 = getEditText(R.id.pc_5);\n // ToDo: check if all are actually characters\n // (and not numbers/other symbols)\n _control.newUser( codePart1+codePart2+codePart3+codePart4+codePart5 );\n setContentView(R.layout.set_time);\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 }", "String getInput();", "@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int button) {\n\t\t\t\t\tString newIdentityValue = edtName.getText()\n\t\t\t\t\t.toString().trim();\n\t\t\t\t\tif (newIdentityValue.length() > 0) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tFileInputStream fis = openFileInput(\"s\"\t+ encryptedIdName);\n\t\t\t\t\t\t\tProperties properties = new Properties();\n\t\t\t\t\t\t\tproperties.load(fis);\n\t\t\t\t\t\t\tfis.close();\n\n\t\t\t\t\t\t\tnumberOfId = Integer.parseInt(properties.getProperty(\"n\"));\n\t\t\t\t\t\t\tproperties.setProperty(\"n\", String.valueOf(++numberOfId));\n\t\t\t\t\t\t\tproperties.setProperty(\"i\" + numberOfId, StaticBox.keyCrypto.encrypt(newIdentityValue));\n\t\t\t\t\t\t\tproperties.setProperty(\"t\" + numberOfId, StaticBox.keyCrypto.encrypt(\"\"));\n\t\t\t\t\t\t\tproperties.setProperty(\"w\" + numberOfId, StaticBox.keyCrypto.encrypt(\"\"));\n\n\t\t\t\t\t\t\tFileOutputStream fos = openFileOutput(\"s\"+ encryptedIdName, Context.MODE_PRIVATE);\n\t\t\t\t\t\t\tproperties.store(fos, null);\n\t\t\t\t\t\t\tfos.flush();\n\t\t\t\t\t\t\tfos.close();\n\t\t\t\t\t\t\tToast.makeText(getBaseContext(), \"Identity created\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\trefreshIdentityList();\n\t\t\t\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tToast.makeText(getBaseContext(),\n\t\t\t\t\t\t\t\t\"Fail create identity\",\n\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t}\n\t\t\t\t}", "void onPinEntered(String pin);", "public void addRecord(Scanner input) {\n\t\tString type;\n\t\tdo {\n\t\t\tSystem.out.print(\"Enter a reference type (book or journal)> \");\n\t\t\ttype = input.nextLine();\n\t\t} while (!matchedKeyword(type, REFERENCE_TYPES));\n\n\t\tString callNumber = \"\";\n\t\tdo {\n\t\t\tSystem.out.print(\"Enter a call number> \");\n\t\t\tcallNumber = input.nextLine();\n\t\t} while (callNumber.equals(\"\"));\n\n\t\tString authors = \"\";\n\t\tif (type.equalsIgnoreCase(\"book\") || type.equalsIgnoreCase(\"b\")) {\n\t\t\tSystem.out.print(\"Enter a list of authors separated by comma> \");\n\t\t\tauthors = input.nextLine();\n\t\t}\n\n\t\tSystem.out.print(\"Enter a title> \");\n\t\tString title = input.nextLine();\n\n\t\tString publisher = \"\";\n\t\tif (type.equalsIgnoreCase(\"book\") || type.equalsIgnoreCase(\"b\")) {\n\t\t\tSystem.out.print(\"Enter a publisher> \");\n\t\t\tpublisher = input.nextLine();\n\t\t}\n\n\t\tString organizer = \"\";\n\t\tif (type.equalsIgnoreCase(\"journal\") || type.equalsIgnoreCase(\"j\")) {\n\t\t\tSystem.out.print(\"Enter an organizer> \");\n\t\t\torganizer = input.nextLine();\n\t\t}\n\n\t\tint year = 0;\n\t\tdo {\n\t\t\tSystem.out.print(\"Enter a year (between 1000 and 9999)>\");\n\t\t\tString yearValue = input.nextLine();\n\t\t\tyear = yearValue.equals(\"\") ? 0 : Integer.parseInt(yearValue);\n\t\t} while (year < 1000 || year > 9999);\n\n\t\tboolean result = true;\n\t\tif (type.equalsIgnoreCase(\"book\") || type.equalsIgnoreCase(\"b\")) {\n\t\t\tresult = addBook(new Book(callNumber, authors, title, publisher,\n\t\t\t\t\tyear));\n\t\t\taddToHashMap(title.toLowerCase().split(\"[ ,\\n]+\"));\n\t\t} else {\n\t\t\tresult = addJournal(new Journal(callNumber, title, organizer, year));\n\t\t\taddToHashMap(title.toLowerCase().split(\"[ ,\\n]+\"));\n\t\t}\n\t\tif (!result)\n\t\t\tSystem.out.println(\"Add failed: there is another reference with the same call number and year\");\n\t}", "private void userInformation()\n {\n name = eName.getText().toString();\n userName = eUserName.getText().toString();\n email = eEmail.getText().toString();\n password = ePassword.getText().toString();\n password = encryptionAlgo.encryptPass(password);//initialize new encrypt password\n address = eAddress.getText().toString();\n favouriteWord = eFavourite.getText().toString();\n }", "@Override\n public void edit(){\n Integer Pointer=0;\n FileWriter editDetails = null;\n ArrayList<String> lineKeeper = saveText();\n\n /* Search into the list to find the Username, if it founds it, changes the\n * old information with the new information.\n * Search*/\n if(lineKeeper.contains(getUsername())){\n Pointer=lineKeeper.indexOf(getUsername());\n\n //Write the new information\n lineKeeper.set(Pointer+1, getPassword());\n lineKeeper.set(Pointer+2, getFirstname());\n lineKeeper.set(Pointer+3, getLastname());\n lineKeeper.set(Pointer+4, DMY.format(getDoB()));\n lineKeeper.set(Pointer+5, getContactNumber());\n lineKeeper.set(Pointer+6, getEmail());\n lineKeeper.set(Pointer+7, String.valueOf(getSalary()));\n lineKeeper.set(Pointer+8, getPositionStatus());\n Pointer=Pointer+9;\n homeAddress.edit(lineKeeper,Pointer);\n }//end if\n\n try{\n editDetails= new FileWriter(\"employees.txt\",false);\n for( int i=0;i<lineKeeper.size();i++){\n editDetails.append(lineKeeper.get(i));\n editDetails.append(System.getProperty(\"line.separator\"));\n }//end for\n editDetails.close();\n editDetails = null;\n }//end try\n catch (IOException ioe) {}//end catch\n }", "public void userNameInput()\n {\n if(forgotPasswordModel.userExists(textBox1.getText())) {\n\n user = forgotPasswordModel.getUser(textBox1.getText());\n userName = false;\n secQuestion = true;\n String txt = \"Your secret question is: \" + user.getSecretQ();\n labelHeader.setText(txt);\n textBox1Label.setText(\"Answer\");\n textBox1.promptTextProperty().set(\"Security Question Answer\");\n textBox1.setText(\"\");\n }\n else\n {\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setContentText(\"Username does not exist!\");\n alert.show();\n }\n }", "public void setInput(String input) { this.input = input; }", "INPUT createINPUT();", "public void takeUserInput() {\n\t\t\r\n\t}", "static void writeToMemo(String input, String user) throws IOException {\n String fileMemo = null;\n String FileName1 = \"CashierMemos.txt\";\n String FileName2 = \"ManagerMemos.txt\";\n String FileName3 = \"ReceiverMemos.txt\";\n String FileName4 = \"ReshelverMemos.txt\";\n\n if (user.equalsIgnoreCase(\"Cashier\")) {\n fileMemo = FileName1;\n } else if (user.equalsIgnoreCase(\"Manager\")) {\n fileMemo = FileName2;\n } else if (user.equalsIgnoreCase(\"Receiver\")) {\n fileMemo = FileName3;\n } else if (user.equalsIgnoreCase(\"Reshelver\")) {\n fileMemo = FileName4;\n }\n FileWriter write = new FileWriter(fileMemo, true);\n PrintWriter print_line = new PrintWriter(write);\n textLine = todayDate + \" \" + input;\n print_line.printf(\"%n\");\n print_line.printf(textLine);\n print_line.close();\n }", "public void openFile(){\n\t\ttry{\n\t\t\t//input = new Scanner (new File(\"input.txt\")); // creates file \"input.txt\" or will rewrite existing file\n\t\t\tFile inFile = new File(\"input.txt\");\n\t\t\tinput = new Scanner(inFile);\n\t\t\t//for (int i = 0; i < 25; i ++){\n\t\t\t\t//s = input.nextLine();\n\t\t\t\t//System.out.println(s);\n\t\t\t//}\n\t\t}catch (SecurityException securityException){ // catch errors\n\t\t\tSystem.err.println (\"You do not have the write access to this file.\");\n\t\t\tSystem.exit(1);\n\t\t}catch (FileNotFoundException fnf){// catch errors\n\t\t\tSystem.err.println (\"Trouble opening file\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t}", "private void Add() {\n\t\t\tString names2 = StudentNum.getText();\n\t\t\tString names1 = Studentname.getText();\n\t\t\tStudentname.setText(\"\");\n\t\t\tStudentNum.setText(\"\");\n\t\t\tif (!names2.equals(\"Student Number\")) {\n\t\t\t\tFile directory = new File(\"Schools\\\\\" + names2 + \".hi\");\n\t\t\t\tif (!directory.exists()) {\n\t\t\t\t\tif (directory.mkdir()) {\n\t\t\t\t\t\tworklabel.setText(\"Student has been added\");\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tPrintWriter out;\n\t\t\t\t\t\t\tPrintWriter out2;\n\t\t\t\t\t\t\tout = new PrintWriter(new FileWriter(\"Schools\\\\\"\n\t\t\t\t\t\t\t\t\t+ names2 + \".hi\" + \"\\\\\"\n\t\t\t\t\t\t\t\t\t+ \"Student Information.txt\", true));\n\t\t\t\t\t\t\tout.println(\"Student Name: \" + names1);\n\t\t\t\t\t\t\tout.println(\"Student Number: \" + names2);\n\t\t\t\t\t\t\tout.println(\"Address:\");\n\t\t\t\t\t\t\tout.println(\"Postal Code:\");\n\t\t\t\t\t\t\tout.println(\"Phone Number:\");\n\t\t\t\t\t\t\tout.println(\"Contact #1 Name:\");\n\t\t\t\t\t\t\tout.println(\"Contact #1 Number:\");\n\t\t\t\t\t\t\tout.println(\"Contact #1 Email:\");\n\t\t\t\t\t\t\tout.println(\"Contact #2 Name:\");\n\t\t\t\t\t\t\tout.println(\"Contact #2 Number:\");\n\t\t\t\t\t\t\tout.println(\"Contact #2 Email:\");\n\t\t\t\t\t\t\tout.println(\"Medical Alert #1:\");\n\t\t\t\t\t\t\tout.println(\"Medical Alert #2:\");\n\t\t\t\t\t\t\tout.println(\"Medical Alert #3:\");\n\t\t\t\t\t\t\tout.println(\"Medical Alert #4:\");\n\t\t\t\t\t\t\tout.println(\"Medical Alert #5:\");\n\t\t\t\t\t\t\tout.println(\"Accomodation #1:\");\n\t\t\t\t\t\t\tout.println(\"Accomodation #2:\");\n\t\t\t\t\t\t\tout.println(\"Accomodation #3:\");\n\t\t\t\t\t\t\tout.println(\"Accomodation #4:\");\n\t\t\t\t\t\t\tout.println(\"Accomodation #5:\");\n\t\t\t\t\t\t\tout.println(\"Volunteer Hours:\");\n\t\t\t\t\t\t\tout2 = new PrintWriter(new FileWriter(\"Schools\\\\\"+ names2+\".hi\" + \"\\\\\" + \"Transcript.txt\",true));\n\t\t\t\t\t\t\tout2.println(\"Course Code\t\tMark\tPassed\tAbsences\tLate\");\n\t\t\t\t\t\t\tout.close();\n\t\t\t\t\t\t\tout2.close();\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tworklabel.setText(\"Invalid\");\n\t\t\t\t}\n\t\t\t}\n\t\t}", "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 }", "@Override\r\n\t\t\tpublic void afterTextChanged(Editable edit) {\n\t\t\t\tpassword = edit.toString();\r\n\t\t\t}", "public static String Editor(String username){\n\t\tString main = username+\" \";\n\t\tScanner input = new Scanner(System.in);\n\t\tSystem.out.println(\"Enter your first and last name(for example: John Lennon):\");\n\t\tmain+=input.nextLine()+\" \";\n\t\tSystem.out.println(\"Enter your date of birth (as MM/DD/YYYY)\");\n\t\tmain+=input.nextLine()+\" \";\n\t\tSystem.out.println(\"Enter your bank name and account number (as BANKOFMARS-10789)\");\n\t\tmain+=input.nextLine()+\" \";\n\t\tSystem.out.println(\"Enter your social security number (as 109382193)\");\n\t\tmain+=input.nextLine();\n\t\tSystem.out.println(\"Your new information has been saved\");\n\t\treturn main;\n\n\t}", "public void onClick(View v) {\n if ((mPinEditText.getText().toString().length() >= 3 &&\n mPinEditText.getText().toString().length() <= 10) &&\n mConfirmEditText.getText().toString().length() != 0 &&\n mNameEditText.getText().toString().trim().length() != 0) {\n\n if (Integer.parseInt(mPinEditText.getText().toString()) == Integer.parseInt(mConfirmEditText.getText().toString())) {\n\n String namestring = mNameEditText.getText().toString().trim();\n String pinstring = mPinEditText.getText().toString().trim();\n\n editor.putString(\"personname\", namestring);\n editor.putString(\"personpin\", pinstring);\n\n editor.apply();\n\n Intent i = new Intent(InfoActivity.this, DaysActivity.class);\n startActivity(i);\n finish();\n } else {\n showToast(R.string.mismatched_pin);\n }\n } else {\n showToast(R.string.invalid_information);\n }\n }", "public void addLibrian() {\n\t\t JTextField name = new JTextField();\r\n\t\t JPasswordField password = new JPasswordField();\r\n\t\t JTextField email = new JTextField(); \r\n\t\t JTextField address = new JTextField(); \r\n\t\t JTextField city = new JTextField(); \r\n\t\t JTextField contact = new JTextField(); \r\n\t\t Object[] librian = {\r\n\t\t\t\t \"Name:\",name,\r\n\t\t\t\t \"Password:\",password,\r\n\t\t\t\t \"Email:\",email,\r\n\t\t\t\t \"Address:\",address,\r\n\t\t\t\t \"City:\",city,\r\n\t\t\t\t \"Contact:\",contact\r\n\t\t };\r\n\t\t int option = JOptionPane.showConfirmDialog(null, librian, \"New librian\", JOptionPane.OK_CANCEL_OPTION);\r\n\t\t if(option==JOptionPane.OK_OPTION) {\r\n // add to the librian database\r\n\t\t try {\r\n\t\t\t \r\n\t\t String query = \"insert into Librian(name,password,email,address,city,contact)\"\r\n\t\t\t\t +\" values(?,?,?,?,?,?)\";\r\n\t\t \r\n\t\t PreparedStatement s = SimpleLibraryMangement.connector.prepareStatement(query);\r\n\t\t s.setString(1, name.getText());\r\n\t\t s.setString(2, String.valueOf(password.getPassword()) );\r\n\t\t s.setString(3, email.getText());\r\n\t\t s.setString(4, address.getText());\r\n\t\t s.setString(5, city.getText());\r\n\t\t s.setString(6, contact.getText());\r\n\t\t s.executeUpdate();\r\n\t\t JOptionPane.showMessageDialog(null, \"Add librian successfully\", null, JOptionPane.INFORMATION_MESSAGE);\r\n\r\n\t\t } catch(Exception e) {\r\n\t\t\t JOptionPane.showMessageDialog(null, \"Add librian failed\", null, JOptionPane.ERROR_MESSAGE);\r\n\t\t\t e.printStackTrace();\r\n\t\t }\r\n\t\t } \r\n\t\t \r\n\t}", "public void newDataFile(Stage primaryStage) {\n String title = \"Upload Data File\";\n\n VBox vbox = vboxFormat();\n\n Label title1 = new Label(\"Input CSV File Name\");\n title1.setFont(new Font(\"Arial\", 15));\n Label direction2 = new Label(\"enter file name, hit enter, then done\");\n direction2.setFont(new Font(\"Arial\", 10));\n TextField userInput = new TextField(\"file name with .csv extension\");\n // TODO program text field event, this is where the file name will be collected,\n // send to another class to handle!\n // Input file class called to check syntax of file name and read.\n userInput.setOnAction(e -> {\n new InputFile(userInput.getText(), report);\n updateTable();\n }); // working\n\n // Add done button\n Button done = buttonFormat(\"Done\", 3);\n\n vbox.getChildren().addAll(title1, userInput, direction2, done);\n showDialogWindow(primaryStage, vbox, title, done);\n updateTable();\n }", "private void appendText()\n\t{\n\t\tString fieldText = \"\";\n\t\tString newText = \"\";\n\t\tfieldText = entry.getText();\n\t\t\n\t\tif(fieldText.equals (\"0\"))\n\t\t{\n\t\t\tnewText += append;\n\t\t\tfieldText = newText;\n\t\t\tentry.setText (fieldText);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfieldText += append;\n\t\t\tentry.setText (fieldText);\n\t\t}\n\t\t\n\t\tentry.grabFocus ( );\n\t\t\n\t}", "private String insert(String input_from_user) {\n\t\tSystem.out.println(\"Enter the position you want to insert a character in the string\"+input_from_user);\n\t\tint position = in.nextInt();\n\t\tchar get_char = in.next().charAt(0);\n\t\tString result = insertCharAt(input_from_user,get_char,position);\n\t\treturn result;\n\t}", "void readInput() {\n\t\ttry {\n\t\t\tBufferedReader input = new BufferedReader(new InputStreamReader(System.in));\n\t\t\t\n\t\t\tString line = input.readLine();\n\t\t\tString [] numbers = line.split(\" \");\n\n\t\t\tlenA = Integer.parseInt(numbers[0]);\n\t\t\tlenB = Integer.parseInt(numbers[1]); \n\n\t\t\twordA = input.readLine().toLowerCase(); \n\t\t\twordB = input.readLine().toLowerCase();\n\n\t\t\tg = Integer.parseInt(input.readLine());\n\n\t\t\tString key; \n\t\t\tString [] chars;\n\t\t\tpenaltyMap = new HashMap<String, Integer>();\n\n\t\t\tfor(int i=0;i<676;i++) {\n\t\t\t\tline = input.readLine();\n\t\t\t\tchars = line.split(\" \");\n\t\t\t\tkey = chars[0] + \" \" + chars[1];\n\t\t\t\tpenaltyMap.put(key, Integer.parseInt(chars[2]));\n\n\t\t\t}\n\n\t\t\tinput.close();\n\n\t\t} catch (IOException io) {\n\t\t\tio.printStackTrace();\n\t\t}\n\t}", "public static void addRecord() {\r\n\t\tScanner in = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter name: \");\r\n\t\tString name = in.nextLine();\r\n\t\tSystem.out.println(\"Enter number: \");\r\n\t\tString number = in.nextLine();\r\n\t\ttd.addRecord(name,number);\r\n\t\t\r\n\t\tSystem.out.println(\"Added record for \" + name + \" along with their number \" + number);\r\n\t}", "public void addPoint (String user, double point) throws IOException { \r\n this.point = this.point + point; \r\n Owner o = new Owner(user, password);\r\n String lineSplit[];\r\n out = new FileReader(\"Customer.txt\");\r\n BufferedReader read = new BufferedReader(out);\r\n \r\n String line;\r\n String data = \"\";\r\n \r\n while((line = read.readLine()) != null){\r\n lineSplit = null;\r\n lineSplit = line.split(\",\");\r\n userName = lineSplit[0];\r\n password = lineSplit[1];\r\n status = o.changeStatus(this.point);\r\n \r\n if(user.equals(userName)){\r\n data+=userName+\",\"+password+\",\"+status+\",\"+this.point+\"\\r\\n\";\r\n System.out.println(data);\r\n }\r\n else{\r\n data+=line+\"\\r\\n\";\r\n }\r\n }\r\n read.close();\r\n in = new FileWriter(\"Customer.txt\");\r\n in.write(data);\r\n in.close();\r\n }", "private static String inputStringHelper(Scanner scanner, String field) {\n System.out.println(\"Type in your new friend's \" + field + \": \");\n return scanner.nextLine();\n }", "@Override\n\tpublic void input(String text) {\n\t\t\n\t\tname = text;\n\t}", "public AddFingerprint() {\n \n initComponents();\n \n //String ename=fnameLbl.getText().trim(); \n }", "@Override\n\tpublic void saveData()\n\t{\n ssaMain.d1.pin = ssaMain.tmp_pin1;\n ssaMain.d1.balance = ssaMain.tmp_balance1;\n System.out.println(\"Your account has been established successfully.\");\n\t}", "@Override\n\t\tpublic void actionPerformed(ActionEvent arg0){\n\t\t String username = userSignInput.getText();\n\t\t String password = passSignInput.getText();\n\t\t if (username.contains(\"\\n\")){\n\t\t\tsignMessage.setText(\"Messages: username cannot contain the new line character.\");\n\t\t\tpanelSign.add(signMessage);\n\t\t\treturn;\n\t\t }\n\t\t for (int i = 0; i < username.length(); i++){\n\t\t\tif (username.charAt(i) == 44){\n\t\t\t signMessage.setText(\"Messages: username cannot contain the comma character.\");\n\t\t\t panelSign.add(signMessage);\n\t\t\t return;\n\t\t\t}\n\t\t }\n\t\t if (password.contains(\"\\n\")){\n\t\t\tsignMessage.setText(\"Messages: password cannot contain the new line character.\");\n\t\t\tpanelSign.add(signMessage);\n\t\t\treturn;\n\t\t }\n\t\t for (int i = 0; i < password.length(); i++){\n\t\t\tif (password.charAt(i) == 44){\n\t\t\t signMessage.setText(\"Messages: password cannot contain the comma character.\");\n\t\t\t panelSign.add(signMessage);\n\t\t\t return;\n\t\t\t}\n\t\t }\n\t\t /**if (username.contains(\",\")){\n\t\t signMessage.setText(\"Messages: */\n\t\t CreateAcc create = new CreateAcc(username, password);\n\t\t String results = create.writeFile(\"Example.csv\");\n\n\t\t //Username is acceptable\n\t\t if (results.equals(\"Success\")){\n\t\t\tsignMessage.setText(\"Messages: Success!\");\n\t\t\tpanelSign.add(signMessage);\n\t\t\tdispose();\n\n\t\t\tnew LoginGUI();//temporary\n\t\t\t//new GUI(\"Example.csv\", username);\n\n\t\t\n\n\t\t }\n\n\t\t //No username or password inputted\n\t\t else if (results.equals(\"Empty User\")){\n\t\t\tsignMessage.setText(\"Messages: Input a username.\");\n\t\t\tpanelSign.add(signMessage);\n\t\t }\n\t\t else if (results.equals(\"Empty Pass\")){\n\t\t\tsignMessage.setText(\"Messages: Input a password.\");\n\t\t\tpanelSign.add(signMessage);\n\t\t }\n\n\t\t //Inputted username already in use\n\t\t else if (results.equals(\"User Used\")){\n\t\t\tsignMessage.setText(\"Messages: Sorry, that username is already in use.\");\n\t\t\tpanelSign.add(signMessage);\n\t\t }\n\t\t else{\n\t\t\tsignMessage.setText(\"Messages: Error. Please input a username and password.\");\n\t\t\tpanelSign.add(signMessage);\n\t\t }\n\t\t //cl.show(panelBoth, \"1\");\n\t\t //this.show(panelBoth, \"1\");\n\t\t}", "public PointEditForm(RouteEditList backDisplay) {\n super(LangHolder.getString(Lang.editpoint));\n this.backDisplay=backDisplay;\n \n backCommand=new Command(LangHolder.getString(Lang.back), Command.BACK, 10);\n saveCommand=new Command(LangHolder.getString(Lang.save), Command.ITEM, 1);\n addCommand(backCommand);\n addCommand(saveCommand);\n setCommandListener(this);\n \n textName=new TextField(LangHolder.getString(Lang.label),null,30,TextField.ANY);\n append(textName);\n \n \n StringItem si = new StringItem(LangHolder.getString(Lang.example)+\"\\n\",MapUtil.emptyString);\n if (RMSOption.coordType==RMSOption.COORDMINSECTYPE) si.setText(\"60 23 41\\n(GG MM SS.S)\");\n else if (RMSOption.coordType==RMSOption.COORDMINMMMTYPE) si.setText(\"60 23.683\\n(GG MM.MMM)\");\n else if (RMSOption.coordType==RMSOption.COORDGGGGGGTYPE) si.setText(\"60.39471\\n(GG.GGGGG)\");\n append(si);\n textLat=new TextField(LangHolder.getString(Lang.latitude),null,12,TextField.NON_PREDICTIVE);\n append(textLat);\n textLon=new TextField(LangHolder.getString(Lang.longitude),null,12,TextField.NON_PREDICTIVE);\n append(textLon);\n //!NO-NUMERIC\n textAlt=new TextField(LangHolder.getString(Lang.altitude),null,6,TextField.ANY|TextField.NON_PREDICTIVE);\n append(textAlt);\n \n }", "public void setInput(String input);", "public void actionPerformed (ActionEvent ev){\n\t\t\tQAinput += qtextarea.getText() + \"/\" + atextarea.getText() ;\n\t\t\t\n\t\t\t//creating a new filename and write the array of questions and answers there. This works for Japanese as well\n\t\t\tFile filepath = new File(filename);\n\t\t\ttry {\n\t\t\t\tOutputStream out = new FileOutputStream(filepath);\n \t\t\t\tWriter writer = new OutputStreamWriter(out, StandardCharsets.UTF_8);\n\t\t\t\twriter.write(QAinput);\n\t\t\t\twriter.close();\n\t\t\t} catch(IOException ex) { System.out.print(\"caught\"); ex.printStackTrace(); }\n\n\t\t\t/*\n\t\t\tadding the filename to \"ListofDecks.txt\". This is done first by reading all of the data (all of filename that has been recorded previously)\n\t\t\tand then convert it to string and then you added your new filename to the string, and the last, you record the string to the file.\n\t\t\t*/\n\t\t\ttry {\t\n\t\t\t\tFile targetfile = new File (\"\");\n\t\t\t\tif (targetfile.exists()){\n\t\t\t\t\tBufferedReader reader = new BufferedReader (new FileReader (\"ListofDecks\"));\n\t\t\t\t\tString message = null;\n\t\t\t\t\tString fullmessage = null;\n\t\t\t\t\tfullmessage = \"\";\n\t\t\t\t\twhile ((message = reader.readLine()) != null ){\n\t\t\t\t\t\tfullmessage += message;\n\t\t\t\t\t}\t\n\t\t\t\t\treader.close();\n\t\t\t\t\tBufferedWriter writer = new BufferedWriter(new FileWriter (new File(\"ListofDecks\")));\n\t\t\t\t\twriter.write(fullmessage + filename + \"/\");\n\t\t\t\t\twriter.close();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tBufferedWriter writer = new BufferedWriter(new FileWriter (new File(\"ListofDecks\")));\n\t\t\t\t\twriter.write(filename + \"/\");\n\t\t\t\t\twriter.close();\n\t\t\t\t}\n\t\t\t} catch (IOException excc) { System.out.print(\"caught\"); excc.printStackTrace(); }\n\t\t\tframe.setVisible(false);\n\t\t\tmoriHomepage mori = new moriHomepage();\n\t\t}", "public void SaveInfo() {\n if (NameSurname_enter.getText() != null && validateString(NameSurname_enter.getText())) {\n patient.setName(NameSurname_enter.getText());\n } else {\n JOptionPane.showMessageDialog(null, \"Please, enter a valid name and surname. It should only contain characters and spaces. \", \"Warning\", JOptionPane.INFORMATION_MESSAGE);\n }\n if (Age_enter.getText() != null && validateInt(Age_enter.getText())) {\n patient.setAge(Integer.parseInt(Age_enter.getText()));\n } else {\n JOptionPane.showMessageDialog(null, \"Please, enter a valid age. It should be a number. \", \"Warning\", JOptionPane.INFORMATION_MESSAGE);\n }\n if (Sex_box.getSelectedItem().equals(\"Male\")) {\n patient.setSex(\"MALE\");\n } else {\n patient.setSex(\"FEMALE\");\n }\n\n }", "private static void addInputs() {\n\t\tinput.put('A',\"All pixels, three LSB\");\n\t\tinput.put('B', \"All pixels, two LSB\");\n\t\tinput.put('C', \"Every even pixel, three LSB\");\n\t\tinput.put('D', \"Every odd pixel, three LSB\");\n\t\tinput.put('E', \"Every pixel, one LSB\");\n\t\tinput.put('F', \"Every even pixel, two LSB\");\n\t\tinput.put('G', \"Every odd pixel, two LSB\");\n\t\tinput.put('H', \"Every third pixel, three LSB\");\n\t\tinput.put('I', \"Every third pixel, two LSB\");\n\t\tinput.put('J', \"Every even pixel, one LSB\");\n\t\tinput.put('K', \"Every odd pixel, one LSB\");\n\t\tinput.put('L', \"Every third pixel, one LSB\");\n\t\tinput.put('M', \"Every prime-numbered pixel, three LSB\");\n\t\tinput.put('N', \"Every prime-numbered pixel, two LSB\");\n\t\tinput.put('O', \"Every prime-numbered pixel, one LSB\");\n\t}", "@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tString buf = edit.getText().toString();\n\t\t\t\t\t\tif (\"\".equals(buf)) {\n\t\t\t\t\t\t\tToast.makeText(getApplicationContext(), \"你得先输入点东西\",\n\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tFileOutputStream fos = openFileOutput(FILE_NAME, Context.MODE_PRIVATE);//专用写内部存储文件的接口\n\t\t\t\t\t\t\tOutputStreamWriter osw = new OutputStreamWriter(fos);\n\t\t\t\t\t\t\tosw.write(buf);\n\t\t\t\t\t\t\tosw.flush();\n\t\t\t\t\t\t\tosw.close();\n\t\t\t\t\t\t\tfos.close();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tToast.makeText(getApplicationContext(), \"保存成功\",\n\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t} catch (FileNotFoundException e1) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t}", "public void addUser(View view){\n MongoClient mongo = new MongoClient( \"172.17.133.195\" , 27017 );\n //Create Database\n MongoDatabase database = mongo.getDatabase(\"myDb\");\n //create collection\n MongoCollection<Document> collection = database.getCollection(\"users\");\n //create document\n Document userPinDoc = new Document();\n\n\n EditText getUserName = (findViewById(R.id.enter_user));\n EditText getUserPin = (findViewById(R.id.enter_pin));\n\n String userName = getUserName.getText().toString();\n String userPin = getUserPin.getText().toString();\n\n Document newUser = new Document();\n newUser.put(\"name\", userName);\n newUser.put(\"pin\", userPin);\n\n collection.insertOne(newUser);\n\n //remove later\n database.drop();\n mongo.close();\n\n //userPinDoc.put(userName, userPin);\n\n Log.d(\"test\", userName);\n Log.d(\"test2\", userPin);\n\n\n }", "private void registerUser() throws FileNotFoundException, IOException\r\n\t{\r\n\t\tString username;\r\n\t\tString password;\r\n\t\tString fname;\r\n\t\tString lname;\r\n\t\tint attempt = 0;\r\n\t\tScanner input = new Scanner(System.in);\r\n\t\tRandom random = new Random();\r\n\t\t\r\n\t\t//PrintWriter wrapped around a BufferedWriter that is wrapped around a FileWriter\r\n\t\t//used to write on a file\r\n\t\tPrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter(\"UserAccount.txt\", true)));\t//true allows appending\r\n\t\t\r\n\t\t//gets user's first and last name\r\n\t\tSystem.out.println(\"Enter your first name: \");\r\n\t\tfname = input.nextLine();\r\n\t\tSystem.out.println(\"Enter your last name: \");\r\n\t\tlname = input.nextLine();\r\n\t\t\r\n\t\t//gets user's desired username\r\n\t\tSystem.out.println(\"Enter desired username: \");\r\n\t\tusername = input.nextLine();\r\n\t\tattempt++;\r\n\t\twhile (checkUserExists(username) != -1)\t\t//username already exists\r\n\t\t{\r\n\t\t\tSystem.out.println(\"\\nThat username already exists\");\r\n\t\t\tif (attempt == 2)\t\t//generate random username with 8 characters after 2 attempts\r\n\t\t\t{\r\n\t\t\t\tif (lname.length() < 6)\t\t\t\t//if last name has less than six characters\r\n\t\t\t\t\tusername = lname;\r\n\t\t\t\telse\t\t\t\t\t\t\t\t//else if last name has six characters or greater\r\n\t\t\t\t\tusername = lname.substring(0, 6);\r\n\t\t\t\tfor (int i = username.length(); i < 8; i++)\t\t\t//loop runs until username has 8 characters\r\n\t\t\t\t\tusername += random.nextInt(9) + 1;\t\t\t\t//concatenate random number between 0 - 9 to the username\r\n\t\t\t\tSystem.out.println(\"A randomly generated username has been chosen for you.\");\r\n\t\t\t\tSystem.out.println(\"Your username is \" + username);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Enter desired username: \");\r\n\t\t\t\tusername = input.nextLine();\r\n\t\t\t\tattempt++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tpw.println(username);\r\n\t\tuserAccounts[0][numOfUsers] = username;\r\n\t\tSystem.out.println(\"\");\r\n\t\t\r\n\t\t//get user's password\r\n\t\tSystem.out.println(\"Enter password (Must be 8 characters long): \");\r\n\t\tpassword = input.nextLine();\r\n\t\twhile (password.length() < 8)\t\t\t//continues to loop until pass is at least 8 characters long\r\n\t\t{\r\n\t\t\tSystem.out.println(\"\\nPassword must be at least eight characters long\");\r\n\t\t\tSystem.out.println(\"Enter password (Must be 8 characters long): \");\r\n\t\t\tpassword = input.nextLine();\r\n\t\t}\r\n\t\tpw.println(password);\r\n\t\tuserAccounts[1][numOfUsers] = password;\r\n\t\tnumOfUsers++;\r\n\t\tpw.close();\r\n\t}", "public void setInput(String input){\n this.input = input;\n }", "@Override\n public void start(Stage primaryStage) {\n TextArea taMyOutput = new TextArea();\n taMyOutput.setPrefHeight(100); // sets height of the TextArea to 400 pixels\n taMyOutput.setPrefWidth(100); // sets width of the TextArea to 300 pixels\n\n // Show total number of phones\n Button btnShowTotal = new Button(\"Show Phone\");\n TextField tfTotalNumberOfPhones = new TextField();\n \n tfTotalNumberOfPhones.setPromptText(\"0\");\n tfTotalNumberOfPhones.setEditable(false); // This box is not editable. Only displays result.\n \n btnShowTotal.setOnAction(e -> {\n tfTotalNumberOfPhones.setText(\"hELLO\");\n });\n\n // Add Phone\n\n Button btnAddPhone = new Button(\"Add Phone\");\n TextField tfPhoneID = new TextField();\n TextField tfPhoneModel = new TextField();\n TextField tfPhonePrice = new TextField();\n\n tfPhoneID.setPromptText(\"PhoneID\");\n tfPhoneModel.setPromptText(\"Phone Model\");\n tfPhonePrice.setPromptText(\"Phone Price\");\n\n\n btnAddPhone.setOnAction(e -> {\n if (tfPhoneID.getText().trim().equals(\"\")) { // If text field is empty \n taMyOutput.setText(\"Invalid\");\n } else {\n Phone phone = new Phone(tfPhoneID.getText(), tfPhoneModel.getText(), tfPhonePrice.getText());\n pm.addPhone(phone); // Add phone to list\n tfPhoneID.clear();\n tfPhoneModel.clear();\n tfPhonePrice.clear(); \n }\n });\n\n // Delete Phone\n TextField tfPhoneDel = new TextField();\n Button btnDelPhone = new Button(\"Delete Phone\");\n\n tfPhoneDel.setPromptText(\"Enter Phone ID\");\n\n btnDelPhone.setOnAction(e -> {\n\n pm.deletePhoneById(tfPhoneDel.getText());\n\n });\n\n // Search for phone by ID\n TextField tfPhoneSearch = new TextField();\n Button btnPhoneSearch = new Button(\"Search Phone By ID\");\n \n tfPhoneSearch.setPromptText(\"Search Phone ID\");\n btnPhoneSearch.setOnAction(e -> {\n\n Phone phoneObject = pm.searchForPhoneById(tfPhoneSearch.getText());\n taMyOutput.setText(phoneObject.getPhoneModel() + \" \" + phoneObject.getPhonePrice());\n\n });\n\n\n\n //Save to DB\n Button btnSaveDB = new Button (\"Save Phone to DB\");\n btnSaveDB.setOnAction(e -> {\n \n if (pm.findTotalPhones() > 0) {\n try {\n File phoneDB = new File(\"./resources/phoneDB.ser\");\n ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(phoneDB));\n out.writeObject(pm);\n out.close();\n taMyOutput.setText(\"Phone Database Saved\");\n } catch (Exception exception) {\n System.out.print(\"[Error] Cannont save DB. Cause: \");\n exception.printStackTrace();\n taMyOutput.setText(\"ERROR: Failed to save Phones DB!\");\n }\n } else {\n taMyOutput.setText(\"No Phones in List to save!\");\n }\n });\n\n // Load from DB\n Button btnLoadDB = new Button(\"Load Phones to DB\");\n TextField tfLoadPhones = new TextField();\n tfLoadPhones.setPromptText(\"Enter Path to DB\");\n\n btnLoadDB.setOnAction(e -> {\n\n try {\n File phoneDB = new File(\"./resources/phoneDB.ser\");\n ObjectInputStream in = new ObjectInputStream(new FileInputStream(phoneDB));\n pm = (PhoneManager) in.readObject();\n in.close();\n taMyOutput.setText(\"Phone Database Loaded\");\n\n } catch (Exception exception) {\n System.out.print(\"[Error] Cannont save DB. Cause: \");\n exception.printStackTrace();\n taMyOutput.setText(\"ERROR: Failed to save Phone DB!\");\n\n }\n });\n\n //Add Quit Button\n Button btnQuit= new Button(\"Quit\");\n btnQuit.setOnAction(e -> {\n Platform.exit();\n\n });\n\n\n \n\n // Adding and arranging all the nodes in the grid - add(node, column, row)\n GridPane gridPane1 = new GridPane();\n gridPane1.add(tfPhoneID, 0, 0);\n gridPane1.add(tfPhoneModel, 1, 0);\n gridPane1.add(tfPhonePrice, 2, 0);\n gridPane1.add(btnAddPhone, 3, 0); \n gridPane1.add(btnShowTotal, 0, 1);\n gridPane1.add(tfPhoneModel, 1, 1);\n gridPane1.add(tfPhoneDel, 0, 2);\n gridPane1.add(btnDelPhone, 1, 2);\n gridPane1.add(tfPhoneSearch, 0, 3);\n gridPane1.add(btnPhoneSearch, 1, 3);\n gridPane1.add(btnSaveDB, 0, 4);\n gridPane1.add(btnLoadDB, 0, 5);\n\t\tgridPane1.add(tfLoadPhones, 1, 5);\n gridPane1.add(taMyOutput, 0, 6, 2, 1);\n gridPane1.add(btnQuit, 0, 7);\n \n\n \n Scene scene1 = new Scene(gridPane1, 850, 550);\n \n\n if (getParameters().getRaw().size() == 0) {\n primaryStage.setTitle(\"Phone Manager Application\");\n } else {\n primaryStage.setTitle(getParameters().getRaw().get(0));\n }\n\n // Setting the scene to Stage\n primaryStage.setScene(scene1);\n // Displaying the stage\n primaryStage.show();\n }", "protected void paceoder() {\n\t\t\n\t\tif(!homepage.isimport){\n\t\t\tJOptionPane.showMessageDialog(null, \"先导入用户数据吧\");\n\t\t}else if((text_num.getText().isEmpty())|(text_price.getText().isEmpty())){\n \t\t\t\n \t\tJOptionPane.showMessageDialog(null, \"先输入数值喔\");\n \t}\n \telse if(!Userinfochange.isNumeric(text_num.getText())\n \t\t\t|!Userinfochange.isNumeric(text_price.getText())){\n \t\t\n \t\tJOptionPane.showMessageDialog(null, \"输入数字喔\");\n \t}\n \telse if( Integer.parseInt(text_num.getText())<0\n \t\t\t||Integer.parseInt(text_num.getText())%100!=0){\n\t\t\t\tJOptionPane.showMessageDialog(null, \"要输入整百股喔\");\n\t\t\t\t\n\t\t\t}\n \t \n \t\telse{\t\n \t\t\tMessageBox messagebox = new MessageBox(shell, SWT.YES | SWT.NO);\n \t\t\tmessagebox.setText(\"下单\");\n \t\t\tmessagebox.setMessage(\" 确认是否下单\");\n \n \t\t\tint val=messagebox.open();\n \t\t\t\n \t\t\tif(val == SWT.YES){\n \n \t\t\t\tString date = Integer.toString(text_dateTime.getYear())+\"/\"+Integer.toString(text_dateTime.getMonth()+1)+\n\t\t\t\t\t\t\t\"/\"+Integer.toString(text_dateTime.getDay());\n \t\t\tPlaceOder placeoder = new PlaceOder(tabitemindex,information[0].substring(21),text_code.getText(),\n\t\t\t\t\t\t\"卖空\",text_price.getText(),text_num.getText(),place,date);\n \t\t\tif(placeoder.update_trade()){\n \t\t\tMessagedialo window = new Messagedialo();\n \t\t\twindow.open(shell);\n \t\t\t}\n \t\t\telse{\n \t\t\t\t\n \t\t\t\thomepage.lbl_notice.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED));\n \t\t\t\thomepage.lbl_notice.setText(\"*卖空失败\");\n \t\t\t\t\t\n \t\t\t\tMessagedialofail window = new Messagedialofail();\n \t\t\twindow.open(shell);\n \t\t\t}\n \t\t\t}\n \t\t\n \t\n }\n\t\t\n\t}", "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(); }", "private void parseAndPopulate(String in) {\r\n\t\tIParser parser = new AbbyyOCRDataParser(in);\r\n\t\tocrData = parser.parse();\r\n\t\tStore.addData(ocrData);\r\n\t\t\r\n\t\tEditText np = (EditText)findViewById(R.id.patient_et);\r\n\t\tEditText nm = (EditText)findViewById(R.id.medicine_et);\r\n\t\tEditText cd = (EditText)findViewById(R.id.consumption_et);\r\n\t\t\r\n\t\tPatient2Medicine p2m = ocrData.getPatient2Medicine();\r\n\t\tnp.setText(ocrData.getPatient().getName());\r\n\t\tnm.setText(ocrData.getMedicine().getMedicine());\r\n\t\tcd.setText(p2m.getFrequencyOfIntake()\r\n\t\t\t\t+ \" \" + p2m.getQuantityPerIntake() + \" by \" + p2m.getMode());\r\n\t\t\r\n\t}", "public void getCredentials(){\n System.out.println(\"Enter Your Credit Card Number\");\n setCreditCardNumber(Integer.parseInt(Menu.getScanner().nextLine()));\n System.out.println(\"Enter your billing address\");\n setBillingAddress(Menu.getScanner().nextLine());\n System.out.println(\"Enter your CVC\");\n setCvc(Integer.parseInt(Menu.getScanner().nextLine()));\n }", "private void setInfo(String newinfo){\n SFNode textField = (SFNode)getField(\"text\");\n Node textNode = (Node)textField.getValue();\n \n\n // Get the \"string\" exposed field of the Text node\n MFString stringField = (MFString)textNode.getExposedField(\"string\");\n\n // Get the name of the user. This is a privileged method call that\n // will throw an AccessControlException when we do not give this\n // script the right to read that property.\n //String username = System.getProperty(\"user.name\");\n\n // Write the user name into the \"string\" field of the Text node\n //stringField.set1Value(1, username);\n stringField.set1Value(0, newinfo);\n }", "public void createTextBox(){\n // Check if theGreenFootImage was set, otherwise create a blanco image\n // with the specific heights.\n if(theGreenfootImage != null){\n image = new GreenfootImage(theGreenfootImage);\n }else{\n image = new GreenfootImage(fieldWidth, fieldHeight);\n }\n \n if(hasBackground){\n if(borderWidth == 0 || borderHeight == 0){\n createAreaWithoutBorder();\n } else{\n createAreaWithBorder(borderWidth, borderHeight);\n }\n }\n \n // Create the default dont with given fontsize and color.\n font = image.getFont();\n font = font.deriveFont(fontSize);\n image.setFont(font);\n image.setColor(fontColor);\n \n // Draw the string in the image with the input, on the given coordinates.\n image.drawString(input, drawStringX, drawStringY);\n \n setImage(image); // Place the image\n }", "private void insertFields()\n {\n RideDetails details=new RideDetails();\n details.setStartPt(editStartingPt.getText().toString());\n details.setEndPt(editEndingPt.getText().toString());\n\n try {\n details.setTravelDate(dateFormatter.parse(editDate.getText().toString()));\n\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n details.setNoSpot(Integer.parseInt(editNoSpot.getText().toString()));\n\n\n dbOperations(details);\n\n }", "public void addfile() {\n\t\tString name;\r\n\t\tSystem.out.println(\"Enter the file name you want to add\");\r\n Scanner sc = new Scanner(System.in);\r\n name = sc.nextLine();\r\n try {\r\n \t\tFile file = new File(\"g:\\\\LockedMe\\\\\"+name);\r\n \t\tif(file.createNewFile()) {\r\n \t\t\tSystem.out.println(\"New file created\");\r\n \t\t}\r\n \t\telse {\r\n \t\t\tif(file.exists())\r\n \t\t\t{\r\n \t\t\t\tSystem.out.println(\"file already exists\");\r\n \t\t\t}\r\n \t\t\telse\r\n \t\t\t{\r\n \t\t\t\tSystem.out.println(\"file does not exist\");\r\n \t\t\t}\r\n \t\t}\r\n }\r\n catch(Exception e)\r\n {\r\n \t e.printStackTrace();\r\n }\r\n\t}", "private boolean checkPassAndPin() {\n if (\"\".equals(pass.getText())) {\n infoBox(\"Passphrase cannot be left blank while saving or loading a file! Please try again!\", \"WARNING!\");\n return false;\n }\n try {\n thePin = Integer.parseInt(myPin.getText());\n if (thePin > 99999 || thePin < 1000) {\n infoBox(\"PIN must be between 1000 and 99999!\", \"Uh oh:\");\n return false;\n }\n } \n catch (NumberFormatException e) {\n infoBox(\"PIN cannot be left blank while saving or loading a file! Please try again!\", \"WARNING!\");\n return false;\n }\n \n //Generate a key from the passphrase, the PIN is global and is picked up from generation()\n generateSecurePassword(pass.getText());\n return true;\n }", "private void Postinfo (String uid, String inputname, String profilestring, String nation){\n }", "String input() {\n\n try {\n\n FileReader reader = new FileReader(\"the text.txt\");\n BufferedReader bufferedReader = new BufferedReader(reader);\n StringBuilder builder = new StringBuilder();\n String line;\n\n while ((line = bufferedReader.readLine()) != null)\n builder.append(line);\n\n return builder.toString();\n\n } catch (IOException e) {\n\n System.out.println(\"Input Failure\");\n return null;\n }\n }", "public static void createAccount()\r\n\t {\r\n\t\t String name;\r\n\t\t String username;\r\n\t\t String password;\r\n\t\t ArrayList<Book> booksLent = null;\r\n\t\t System.out.println(\"Enter your name\");\r\n\t\t Scanner src = new Scanner(System.in);\r\n\t\t name = src.next();\r\n\t\t System.out.println(\"Enter your username\");\r\n\t\t src = new Scanner(System.in);\r\n\t\t username = src.next();\r\n\t\t System.out.println(\"Enter your password\");\r\n\t\t src = new Scanner(System.in);\r\n\t\t password = src.next();\r\n\t\t \r\n\t\t Student stu = new Student(name, username, password, booksLent, 0);\r\n\t\t studentAccount = stu;\r\n\t\t FileReader.getStudents().add(stu);\r\n\t\t FileReader.update();\r\n\t\t Display.studentDisplay(studentAccount);\r\n\t }", "public void saveTextBoxs(){\n dni[indice] = Long.parseLong(txtDni.getText());\n nombre[indice] = txtNombre.getText();\n apellido[indice] = txtApellido.getText();\n direccion[indice] = txtDireccion.getText();\n telefono[indice] = txtTelefono.getText();\n fNacimiento[indice] = txtFechaNacimiento.getText();\n loadTextBoxs();\n }" ]
[ "0.5881867", "0.5681731", "0.5662768", "0.556267", "0.55446166", "0.55155694", "0.5380808", "0.5378274", "0.5331243", "0.53001386", "0.5256979", "0.52436393", "0.5243084", "0.52409446", "0.5231583", "0.522472", "0.5207937", "0.51918983", "0.5191213", "0.5188308", "0.5173991", "0.5165202", "0.5161145", "0.5147178", "0.5136727", "0.5118455", "0.5092742", "0.5089879", "0.50881046", "0.5066522", "0.50572765", "0.5050962", "0.5049341", "0.50468415", "0.5036607", "0.5027978", "0.501713", "0.5016598", "0.50164914", "0.50125575", "0.5005775", "0.4989899", "0.49839762", "0.49789494", "0.49650183", "0.4961316", "0.49573973", "0.49565667", "0.49439412", "0.49417996", "0.494081", "0.49332324", "0.492178", "0.49181503", "0.49090087", "0.48928607", "0.48926526", "0.48761246", "0.48741663", "0.48690936", "0.48671812", "0.4857923", "0.48560277", "0.48522377", "0.48494238", "0.48493773", "0.4848821", "0.4845999", "0.48450825", "0.4843506", "0.48432487", "0.48430234", "0.4842644", "0.48398316", "0.48383138", "0.48282415", "0.4825786", "0.48246482", "0.48079985", "0.48071724", "0.4806183", "0.48040703", "0.48036125", "0.48010466", "0.47955358", "0.47901642", "0.47867402", "0.47618604", "0.4761723", "0.47527733", "0.47502303", "0.47493705", "0.47484225", "0.47428855", "0.47365406", "0.47313052", "0.4728486", "0.47282404", "0.47244197", "0.47174746" ]
0.49938837
41
Views the test and allows the user to take it.
@FXML public void viewTest( ) { try { Parent root2 = FXMLLoader.load(getClass().getResource("../view/TestView.fxml")); Main.stage.setScene(new Scene (root2, 700, 500)); Main.stage.show(); } catch (Exception exception) { exception.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testShow() {\n\t}", "public static void testShowTodoView(){\n }", "@Test\r\n public void testShowAboutUs() {\r\n System.out.println(\"showAboutUs\");\r\n Controller instance = new Controller();\r\n instance.showAboutUs();\r\n }", "@Test\n public void first_player() {\n //Arrange scenario\n final TemplateEngineTester testHelper = new TemplateEngineTester();\n //Add a player to a new empty lobby\n when(request.queryParams(\"id\")).thenReturn(\"Name\");\n // To analyze what the Route created in the View-Model map you need\n // to be able to extract the argument to the TemplateEngine.render method.\n // Mock up the 'render' method by supplying a Mockito 'Answer' object\n // that captures the ModelAndView data passed to the template engine\n when(templateEngine.render(any(ModelAndView.class))).thenAnswer(testHelper.makeAnswer());\n\n // Invoke the test\n CuT.handle(request, response);\n\n //Check if UI received all necessary parameters\n testHelper.assertViewModelExists();\n testHelper.assertViewModelIsaMap();\n\n testHelper.assertViewModelAttribute(\"currentUser\", request.queryParams(\"id\"));\n testHelper.assertViewModelAttribute(\"title\", \"Welcome!\");\n testHelper.assertViewModelAttribute(\"message\", PostSignInRoute.WELCOME_MSG);\n }", "public void testGetViews() {\n }", "@Test(groups ={Slingshot,Regression})\n\tpublic void VerifyManageUserViewdetails() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Check whether the user can edit details by clicking View details of Active accounts\");\n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMVTestDatas\");\n\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.viewDetailsTableViewStduser(userProfile)\n\t\t.ClickEditdetails()\n\t\t.ChangeStandardUserview(userProfile); \t \t \t \t\t\n\t}", "@Test\n public void clickOnTask_ShowsDetailUi() {\n Song requestedSong = new Song(\"Details Requested\", \"For this task\", SOURCE);\n Playlist playlist = new Playlist(requestedSong);\n\n // When open task details is requested\n mPlaylistPresenter.openSongPlayer(playlist);\n\n // Then task detail UI is shown\n verify(mTasksView).showSongPlayerUI(any(Playlist.class));\n }", "@Test(groups ={Slingshot,Regression})\n\tpublic void verifyUsertable() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify AddnewView Button Overlay\"); \t \t \t \n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMVTestDatas\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.Verifyuserlistindb(userProfile);\n\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tTester tester = new Tester();\n\t\t\t\tTestEditor testEditor = new TestEditor(tester) {\n\n\t\t\t\t\tprivate static final long serialVersionUID = 1L;\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic Class<?>[] getTestActionClasses() {\n\t\t\t\t\t\tList<Class<?>> result = new ArrayList<Class<?>>(Arrays.asList(super.getTestActionClasses()));\n\t\t\t\t\t\tresult.add(CustomComponentAssertion.class);\n\t\t\t\t\t\treturn result.toArray(new Class<?>[result.size()]);\n\t\t\t\t\t}\n\n\t\t\t\t};\n\n\t\t\t\t/*\n\t\t\t\t * Customize and open the test editor.\n\t\t\t\t */\n\t\t\t\ttestEditor.setDecorationsBackgroundColor(new Color(68, 61, 205));\n\t\t\t\ttestEditor.setDecorationsForegroundColor(new Color(216, 214, 245));\n\t\t\t\ttestEditor.open();\n\t\t\t}", "@Test(groups ={Slingshot,Regression})\n\tpublic void VerifyMuMvManageView() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify whether user is able to create a new view successfully and it gets reflected in the list\");\n\n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMVTestDatas\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.ManageViews()\t \t\t\t\t\t \t \t\t\t\t \t \t\t\n\t\t.Addviewname(userProfile)\n\t\t.verifyLeadTabledata_AddnewViewAudit(userProfile)\n\t\t.AddnewUserslink()\n\t\t.AddUserRadioButton()\n\t\t.StandardUser_Creation()\t\t\t\t\t\t \t \t\t\n\t\t.verifynewview(userProfile)\n\t\t.VerifyenterValidData_StandardUserdetails(userProfile);\n\t\tnew BgbRegistrationAction()\n\t\t.AddNewStdUserdata(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.verifyAuditTable(userProfile);\t\t\t\t \t \t\t\n\n\t}", "@Test(groups ={Slingshot,Regression})\n\tpublic void EditViewLessthan15Accts() {\n\t\tReport.createTestLogHeader(\"MuMv\",\"Verify whether user is able to edit the existing view successfully and it gets reflected in the list\");\n\n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMvTestdataforFAA\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.ManageViews()\n\t\t.VerifyEditviewname(userProfile) \t\t\t\t\t\t \t \t\t\n\t\t.EditViewNameforLessthan15Accts(userProfile)\n\t\t.ClickAddUserRHNLink()\n\t\t.StandardUser_Creation()\t\t\t\t\t\t \t \t\t\n\t\t.verifyEditedview(userProfile)\n\t\t.enterValidData_StandardUserforEditview(userProfile);\n\t\tnew BgbRegistrationAction()\n\t\t.AddNewStdUserdata(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.verifyAuditTable(userProfile);\t\n\t}", "@Test\n public void testCreateView() {\n System.out.println(\"createView\");\n int i =1;\n AfinadorModelo modeloTest = new AfinadorModelo();\n AfinadorControlador controladorTest = new AfinadorControlador(modeloTest,i);\n String test = controladorTest.vista1.bpmOutputLabel.getText();\n if( test != \"APAGADO \")\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void new_player() {\n //Arrange scenario\n //Add a player to the lobby with a different name\n Player other = new Player(\"Other\");\n playerLobby.addPlayer(other);\n final TemplateEngineTester testHelper = new TemplateEngineTester();\n //Add a player to a new empty lobby\n when(request.queryParams(\"id\")).thenReturn(\"Name\");\n // To analyze what the Route created in the View-Model map you need\n // to be able to extract the argument to the TemplateEngine.render method.\n // Mock up the 'render' method by supplying a Mockito 'Answer' object\n // that captures the ModelAndView data passed to the template engine\n when(templateEngine.render(any(ModelAndView.class))).thenAnswer(testHelper.makeAnswer());\n\n // Invoke the test\n CuT.handle(request, response);\n\n //Check if UI received all necessary parameters\n testHelper.assertViewModelExists();\n testHelper.assertViewModelIsaMap();\n\n testHelper.assertViewModelAttribute(\"currentUser\", request.queryParams(\"id\"));\n testHelper.assertViewModelAttribute(\"title\", \"Welcome!\");\n testHelper.assertViewModelAttribute(\"message\", PostSignInRoute.WELCOME_MSG);\n testHelper.assertViewModelAttribute(\"playerList\", CuT.playerNames);\n }", "@Test(groups ={Slingshot,Regression})\n\tpublic void MuMV_ViewAndEditSuperUser() {\n\t\tReport.createTestLogHeader(\"MuMv_viewandedituser\", \"Verify the Super user creation and their Audit entry in DB\"); \t \t \t \n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"ViewuserVerifynew\");\t\t\t\t\t\t\t\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.viewDetailsTableViewuser(userProfile)\n\t\t.ClickEditdetails()\n\t\t.Viewtableverification()\n\t\t.VerifyUseramendeddetailsTitle()\n\t\t.VerifyChangeProfileAudit();\t\t\t\t\t\t\t \n\t}", "@Test\n public void testTIM(){\n loginToVisit();\n }", "@Test\r\n public void regButton(){\r\n onView(withId(R.id.edUserReg)).perform(typeText(\"Jade\"));\r\n onView(withId(R.id.Stud_id)).perform(typeText(\"Jade\"));\r\n onView(withId(R.id.edPassReg)).perform(typeText(\"hey\"));\r\n onView(withId(R.id.edPassConReg)).perform(typeText(\"hey\"));\r\n onView(withId(R.id.btnReg)).perform(click());\r\n }", "public final String gotoManageTestRequirement() throws ParseException, ApplicationException{\r\n\t\tloadScreen();\r\n\t\treturn \"/pages/manageTestRequirement\";\r\n\t}", "@Test\n\tpublic void loginTest() {\n\t\tSystem.out.println(\"Login Page Test\");\n\t}", "@Test(groups ={Slingshot,Regression})\n\tpublic void ManageViewDeleteView() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify whether user is able to delete a view\");\n\n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMvTestdataforFAA\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.ManageViews()\t \t\t\t\t\t \t \t\t\t\t \t \t\t\n\t\t.Addviewname(userProfile)\n\t\t.verifyLeadTabledata_AddnewViewAudit(userProfile)\n\t\t.backtoMangeruserlink()\n\t\t.ManageViews()\n\t\t.ViewDeletion(userProfile)\n\t\t.verifyLeadTable_ViewDeletionAudit(userProfile);\n\n\t}", "@RequestMapping(value = \"/test/load\", method = RequestMethod.GET)\n\tpublic ModelAndView loadTest(@ModelAttribute(\"attempt\") int attempt) {\n\t\tvideoService.createResultEntry(attempt);\n\t\tList<String> videoIds = videoService.getUnattemptedVideoId(attempt);\n\t\tString json = \"\";\n\t\tObjectMapper mapper = new ObjectMapper();\n\t\tModelAndView model = new ModelAndView(\"videoPlayer\");\n\t\tvideo = videoService.getVideoDetails(getRandomVideo(videoIds));\n\t\ttry {\n\t\t\tjson = mapper.writeValueAsString(video);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tmodel.addObject(\"videoDetails\", json);\n\t\tmodel.addObject(\"testMode\", true);\n\t\tmodel.addObject(\"remainingVideo\", videoIds.size() - 1);\n\t\treturn model;\n\t}", "public void goTestActivity()\n\t {\n\t }", "@Test\n public void testEditOperationAsUser(){\n loginAsUser();\n\n vinyardApp.navigationOperationsClick();\n vinyardApp.editOperation();\n String result = driver.getCurrentUrl();\n String expected = \"http://localhost:8080/edit_operation/1\";\n assertEquals(expected, result);\n }", "@Test\n public void functionalityTest() {\n new TestBuilder()\n .setModel(MODEL_PATH)\n .setContext(new ModelImplementationGroup3())\n .setPathGenerator(new RandomPath(new EdgeCoverage(100)))\n .setStart(\"e_GoToPage\")\n .execute();\n }", "@Test\n public void activityLaunch() {\n onView(withId(R.id.button_main)).perform(click());\n onView(withId(R.id.text_header)).check(matches(isDisplayed()));\n\n onView(withId(R.id.button_second)).perform(click());\n onView(withId(R.id.text_header_reply)).check(matches(isDisplayed()));\n }", "@PostMapping(\"/test\")\n public String userTestPage(Model model, @AuthenticationPrincipal ExamUserDetails examUserDetails) {\n\t\tUser user = userRepository.findByEmail(examUserDetails.getUsername());\n \tTest test= testRepository.findFirstByStatusOrderByIdAsc(true);\t\n \tif(test != null) {\n \t\tTestQuestion testQuestion = testQuestionsRepository.findTopByTestOrderByIdAsc(test);\n \t\tList<TestAnswer> testAnswers = testAnswersRepository.findAllByTestQuestion(testQuestion);\n \t\tif(examStatusRepository.countByUserAndTest(user, test)>0)\n \t\t\tmodel.addAttribute(\"message\", \"Exam Already Taken, You May Not Take It Twice!!!\"); \n \t\telse {\n \t\t\tCollections.shuffle(testAnswers);\n \t\tmodel.addAttribute(\"count\", 1);\n \t\tmodel.addAttribute(\"test\", test);\n \t\tmodel.addAttribute(\"testQuestion\", testQuestion);\n \t\tmodel.addAttribute(\"testAnswers\", testAnswers);\n \t\tmodel.addAttribute(\"timer\", test.getDuration());\n \t\t}\n \t}else \n \t\tmodel.addAttribute(\"message\", \"No Exams Currently Active For You\"); \t\n\t\tmodel.addAttribute(\"userName\", examUserDetails.getUsername());\n \treturn \"answerSheet\";\n }", "public static void testDeleteTodoView(){\n\n }", "@Test\r\n public void testConceptsButton() {\r\n WicketTester tester = new WicketTester(new GreenometerApplication());\r\n tester.startPage(StopLightPage.class);\r\n tester.assertRenderedPage(StopLightPage.class);\r\n\r\n tester.clickLink(\"ConceptsPageButton\", false);\r\n tester.assertRenderedPage(ConceptsPage.class);\r\n }", "@Test\n public void BrowseUser() {\n openActionBarOverflowOrOptionsMenu(getInstrumentation().getTargetContext());\n\n //Click search\n onView(withText(R.string.fetch_user))\n .perform(click());\n\n //Click hearth\n onView(withId(R.id.hearth_button))\n .perform(click());\n\n //Opens the overflow menu\n openActionBarOverflowOrOptionsMenu(getInstrumentation().getTargetContext());\n\n //Click search\n onView(withText(R.string.browse_local))\n .perform(click());\n\n //Click second element recycler\n onView(withRecyclerView(R.id.recycler)\n .atPositionOnView(1, R.id.img))\n .perform(click());\n\n }", "@Test(groups ={Slingshot,Regression})\n\tpublic void MuMV_ViewAndEditStdUserCancel() {\n\t\tReport.createTestLogHeader(\"MuMv_viewandedituser\", \"Verify whether user remains in the Edit user page on clicking 'Cancel' link.\"); \t \t \t \n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMvManageView12\");\t\t\t\t\t\t\t\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.viewDetailsTableViewStduser(userProfile)\n\t\t.ClickEditdetails()\n\t\t.BackAndCancel();\n\n\t}", "@Test(groups ={Slingshot,Regression})\n\tpublic void VerifyManageviewLinks() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify the Functionalities of links present in Manage views page\");\n\n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMvManageView\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.ManageViews()\t \t\t\t\t\t \t \t\t\t\t \t \t\t\n\t\t.ManageviewNavigationLinks();\t\t\t \t \t\t\n\n\t}", "public void testSetViews() {\n }", "@Test(groups ={Slingshot,Regression})\n\tpublic void VerifyAddNewUserLandingPage() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify the Add new User Landing page and their Overlay\");\n\n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMVTestDatas\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.ClickAddNewUserLink()\n\t\t.AddUserRadioButton()\n\t\t.AddUsersWhatisThisverlay()\n\t\t.AddNewUserNavigationVerification(); //have to update navigation link\n\t}", "public void testMainPage() {\n\t\tbeginAt(\"numguess.jsp\");\n\t\tassertTitleEquals(\"Number Guess\");\n\t\tassertTextPresent(\"Welcome to the Number Guess game\");\n\t\tassertFormElementPresent(\"guess\");\t\t\n\t}", "@Test(groups ={Slingshot,Regression})\n\tpublic void MuMV_ViewAndEditSuperUserNavigation() {\n\t\tReport.createTestLogHeader(\"MuMv_viewandedituser\", \"Verify link navigations in the breadcrumb in Edit user page when user type is selected as super user\"); \t \t \t \n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMVTestDataspl\");\t\t\t\t\t\t\t\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.viewDetailsTableViewuser(userProfile)\t\t\n\t\t.EditUserlinkNavigation()\n\t\t.ViewdetailsPageVerification()\n\t\t.ClickEditdetails()\n\t\t.Viewtableverification()\n\t\t.VerifyUseramendeddetailsTitle()\n\t\t.BreadCrumbNavigation()\n\t\t.backtoMangeruserlinkNavigation()\n\t\t.AddNewUserNavigationVerification();\n\t}", "@Test\n public void testSendInvitation() {\n try{\n System.out.println(\"sendInvitation\");\n String project_id = \"3\";\n String inviteUserId = \"6\";\n TeamController instance = new TeamController();\n// ModelAndView expResult = null;\n instance.setProjectId(3);\n instance.setUserId(1);\n ModelAndView result = instance.sendInvitation(project_id, inviteUserId);\n// assertEquals(\"redirect:/projectMainView/3/team/show\", result);\n ModelAndViewAssert.assertViewName(result, \"redirect:/projectMainView/3/team/show\");\n }catch(Exception e)\n {\n // TODO review the generated test code and remove the default call to fail.\n fail(\"Send invitation failed\");\n }\n }", "@Test(groups ={Slingshot,Regression})\n\tpublic void EditViewgreaterthan15Accts() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify whether the user is able to add the view edited in the list\");\n\n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"AddnewViewMorethan15Acctsmanage\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.ManageViews()\n\t\t.ValidateRemoveviewname(userProfile)\n\t\t.ClickAddNewUserLink()\n\t\t.StandardUser_Creation()\n\t\t.EditViewAdduserValidation(userProfile)\n\t\t.VerifyenterValidData_StandardUsers(userProfile);\n\t\tnew BgbRegistrationAction()\n\t\t.AddNewStdUserdata(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.verifyAuditTable(userProfile);\t\t\n\t}", "public View(Controller contr) {\n this.contr = contr;\n testRun();\n }", "@Override\n public void onClick(View view) {\n if (testMode) {\n startDashboard();\n } else {\n attemptLogin();\n }\n }", "@SustainScreen(name = \"Velocity Admin Test Page\", module = SustainModule.FORM, type = ScreenType.ADMIN, description = \"Screen to test velocity templates\")\n public ActionForward doExecute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) {\n MdEntity entity = MdEntity.entity(Case.class);\n request.setAttribute(\"entity\", entity);\n\n return mapping.findForward(\"test\");\n }", "@Test\n public void testAddDemotivatorPageAccessibleIFAuthorised(){\n \tFixtures.deleteAllModels();\n \tFixtures.loadModels(\"data/user.yml\");\n \t\n\t\t//Authenticating\n \tauthenticate();\n\n //Going to add Demotivator page\n \tResponse response = GET(\"/add\");\n \n assertNotNull(response);\n assertStatus(200, response);\n }", "@Test\n public void testifyBtn() throws InterruptedException {\n onView(withId(R.id.SaveButton)).check(matches(isDisplayed()));\n\n }", "public abstract void viewRun();", "@Override\n public void testRenderMyPage() {\n\n\tsetMockSupportedCarriers(dailyRhythmPortalService);\n\n\tEntitlementLookup entitlementLookup = EntitlementLookupFactory.getEntitlementLookup();\n\n\t// start and render the test page\n\tEntitlementLookupPage page = new EntitlementLookupPage(entitlementLookup, null, null);\n\ttester.startPage(page);\n\n\t// Check that the right page was rendered (no unexpected redirect or\n\t// intercept)\n\ttester.assertRenderedPage(EntitlementLookupPage.class);\n\ttester.assertNoErrorMessage();\n\n\tassertNavigation();\n }", "@Test\n public void testAddNewLane_success() throws Exception {\n Context targetContext = InstrumentationRegistry.getInstrumentation()\n .getTargetContext();\n\n\n Intent intent = new Intent(targetContext, CustomerActivity.class);\n intent.putExtra(LoginActivity.EXTRA_USER_ID, db.getCustomerByEmail(\"a\").getCustomerID());\n mActivityRule.launchActivity(intent);\n\n onView(withId(R.id.buttonRequestLane)).perform(click());\n\n onView(withId(R.id.playersNumBox)).perform(typeText(\"1\"));\n onView(withId(R.id.playersNumBox)).perform(closeSoftKeyboard());\n onView(withId(R.id.player_submit_button)).perform(click());\n\n\n\n onView(withId(R.id.qr_scanner_button)).perform(click());\n\n onView(withId(R.id.customer_lanes_text_view)).check(matches(withText(containsString(\"1\"))));\n\n }", "@Test\n\tpublic void testRedirectView_2()\n\t\tthrows Exception {\n\t\tString url = \"\";\n\n\t\tRedirectView result = new RedirectView(url);\n\n\t\t// add additional test code here\n\t\t// An unexpected exception was thrown in user code while executing this test:\n\t\t// java.lang.UnsupportedClassVersionError: org/jsecurity/web/RedirectView : Unsupported major.minor version 51.0\n\t\t// at java.lang.ClassLoader.defineClass1(Native Method)\n\t\t// at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)\n\t\t// at java.lang.ClassLoader.defineClass(ClassLoader.java:621)\n\t\t// at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)\n\t\t// at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)\n\t\t// at java.net.URLClassLoader.access$000(URLClassLoader.java:58)\n\t\t// at java.net.URLClassLoader$1.run(URLClassLoader.java:197)\n\t\t// at java.security.AccessController.doPrivileged(Native Method)\n\t\t// at java.net.URLClassLoader.findClass(URLClassLoader.java:190)\n\t\t// at java.lang.ClassLoader.loadClass(ClassLoader.java:306)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.UserDefinedClassLoader.loadClass(UserDefinedClassLoader.java:62)\n\t\t// at java.lang.ClassLoader.loadClass(ClassLoader.java:247)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.ExecutionContextImpl.getClass(ExecutionContextImpl.java:99)\n\t\t// at com.instantiations.eclipse.analysis.expression.model.SimpleTypeExpression.execute(SimpleTypeExpression.java:205)\n\t\t// at com.instantiations.eclipse.analysis.expression.model.InstanceCreationExpression.execute(InstanceCreationExpression.java:425)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.ExecutionRequest.execute(ExecutionRequest.java:286)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.communication.LocalExecutionClient$1.run(LocalExecutionClient.java:158)\n\t\t// at java.lang.Thread.run(Thread.java:695)\n\t\tassertNotNull(result);\n\t}", "public void startTest(){\n\t\t\tMainUIHandler.sendEmptyMessage(UI_START_TEST);\t\n\t\t}", "@Test\n public void testRender() {\n try{\n System.out.println(\"render\");\n HttpSession session = new MockHttpSession();\n session.setAttribute(\"session_user\", ujc.findUser(1));\n String project_id = \"3\";\n TeamController instance = new TeamController();\n// ModelAndView expResult = null;\n ModelAndView result = instance.render(session, project_id);\n// assertEquals(expResult, result);\n ModelAndViewAssert.assertViewName(result, \"team\");\n ModelAndViewAssert.assertModelAttributeAvailable(result, \"owner\");\n ModelAndViewAssert.assertModelAttributeAvailable(result, \"allMembers\");\n ModelAndViewAssert.assertModelAttributeAvailable(result, \"otherUsers\");\n ModelAndViewAssert.assertModelAttributeAvailable(result, \"project\");\n }\n catch(Exception e){\n // TODO review the generated test code and remove the default call to fail.\n fail(\"Redner failed\");\n }\n }", "@Test(groups ={Slingshot,Regression})\n\tpublic void ValidatetheAddNewViewOverlay() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify whether 'Confirm' and 'cancel' links in 'Add a new view' overlay are navigated to the respective pages\");\n\n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMVTestDatas\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.ClickAddNewUserLink()\n\t\t.AddUserRadioButton()\n\t\t.StandardUser_Creation()\n\t\t.ValidateaddnewviewOverlay();\t\n\t}", "@Test\n\tpublic void testRedirectView_3()\n\t\tthrows Exception {\n\t\tString url = \"\";\n\t\tboolean contextRelative = true;\n\n\t\tRedirectView result = new RedirectView(url, contextRelative);\n\n\t\t// add additional test code here\n\t\t// An unexpected exception was thrown in user code while executing this test:\n\t\t// java.lang.UnsupportedClassVersionError: org/jsecurity/web/RedirectView : Unsupported major.minor version 51.0\n\t\t// at java.lang.ClassLoader.defineClass1(Native Method)\n\t\t// at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)\n\t\t// at java.lang.ClassLoader.defineClass(ClassLoader.java:621)\n\t\t// at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)\n\t\t// at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)\n\t\t// at java.net.URLClassLoader.access$000(URLClassLoader.java:58)\n\t\t// at java.net.URLClassLoader$1.run(URLClassLoader.java:197)\n\t\t// at java.security.AccessController.doPrivileged(Native Method)\n\t\t// at java.net.URLClassLoader.findClass(URLClassLoader.java:190)\n\t\t// at java.lang.ClassLoader.loadClass(ClassLoader.java:306)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.UserDefinedClassLoader.loadClass(UserDefinedClassLoader.java:62)\n\t\t// at java.lang.ClassLoader.loadClass(ClassLoader.java:247)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.ExecutionContextImpl.getClass(ExecutionContextImpl.java:99)\n\t\t// at com.instantiations.eclipse.analysis.expression.model.SimpleTypeExpression.execute(SimpleTypeExpression.java:205)\n\t\t// at com.instantiations.eclipse.analysis.expression.model.InstanceCreationExpression.execute(InstanceCreationExpression.java:425)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.ExecutionRequest.execute(ExecutionRequest.java:286)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.communication.LocalExecutionClient$1.run(LocalExecutionClient.java:158)\n\t\t// at java.lang.Thread.run(Thread.java:695)\n\t\tassertNotNull(result);\n\t}", "@Before\n public void openNewStockPage() {\n onView(withId(R.id.button3)).perform(click());\n }", "@Test\n public void shouldShowForm() throws Exception {\n }", "@RequestMapping({\"/{datasetid}\", \"/{datasetid}/view\"})\n public String viewQATests(Model model,\n @PathVariable(\"datasetid\") String datasetId,\n @RequestParam(required = false) String message) {\n BreadCrumbs.set(model, \"QA Tests\");\n model.addAttribute(\"datasetId\", datasetId);\n model.addAttribute(\"qatests\", qaTestService.getByDatasetId(datasetId));\n QATest newQATest = new QATest();\n newQATest.setExpectedResult(\"true\");\n model.addAttribute(\"newqatest\", newQATest);\n if(message != null) model.addAttribute(\"message\", message);\n return \"qatests\";\n }", "@Test\r\n\tpublic void validEditTest() {\n\t\tadminUserEdit.clickAdminLink();\r\n\t\tadminUserEdit.clickUserListLink();\r\n\t\tadminUserEdit.clickEditUserLink();\r\n\t\t\r\n\t\t// Assertion\r\n\t\tString Actual = adminUserEdit.Assertion();\r\n\t\tString Expected = \"Hari\";\r\n\t\tassertEquals(Actual, Expected);\r\n\t\tscreenShot.captureScreenShot(\"TC019\");\r\n\t}", "@Override\n public void run() {\n activityTestRule.getActivity().findViewById(R.id.sell_button).performClick();\n }", "@Test(groups ={Slingshot,Regression})\n\tpublic void VerifyMuMvManageViewStandarduser() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify whether super user can assign the new view created to standard user\");\n\n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMVTestDatas\");\n\t\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"MeterReadCollectiveAndElec\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.viewDetailsTablestdUser(userProfile)\n\t\t.viewtableHandle(userProfile,smrProfile);\t \t\t\t\t\t\t \t \t\n\n\t}", "@Override\n\t\t\tpublic void onClick(View view) {\n\t\t\t\taddAlert(\"Fake Test Alert\");\n\t\t\t}", "@Test\n\tpublic void testRedirectView_1()\n\t\tthrows Exception {\n\n\t\tRedirectView result = new RedirectView();\n\n\t\t// add additional test code here\n\t\t// An unexpected exception was thrown in user code while executing this test:\n\t\t// java.lang.UnsupportedClassVersionError: org/jsecurity/web/RedirectView : Unsupported major.minor version 51.0\n\t\t// at java.lang.ClassLoader.defineClass1(Native Method)\n\t\t// at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)\n\t\t// at java.lang.ClassLoader.defineClass(ClassLoader.java:621)\n\t\t// at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)\n\t\t// at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)\n\t\t// at java.net.URLClassLoader.access$000(URLClassLoader.java:58)\n\t\t// at java.net.URLClassLoader$1.run(URLClassLoader.java:197)\n\t\t// at java.security.AccessController.doPrivileged(Native Method)\n\t\t// at java.net.URLClassLoader.findClass(URLClassLoader.java:190)\n\t\t// at java.lang.ClassLoader.loadClass(ClassLoader.java:306)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.UserDefinedClassLoader.loadClass(UserDefinedClassLoader.java:62)\n\t\t// at java.lang.ClassLoader.loadClass(ClassLoader.java:247)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.ExecutionContextImpl.getClass(ExecutionContextImpl.java:99)\n\t\t// at com.instantiations.eclipse.analysis.expression.model.SimpleTypeExpression.execute(SimpleTypeExpression.java:205)\n\t\t// at com.instantiations.eclipse.analysis.expression.model.InstanceCreationExpression.execute(InstanceCreationExpression.java:425)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.ExecutionRequest.execute(ExecutionRequest.java:286)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.communication.LocalExecutionClient$1.run(LocalExecutionClient.java:158)\n\t\t// at java.lang.Thread.run(Thread.java:695)\n\t\tassertNotNull(result);\n\t}", "@Test\n void getGreeting() {\n System.out.println(controller.getGreeting());\n }", "@Test\n public void fetchUser() {\n openActionBarOverflowOrOptionsMenu(getInstrumentation().getTargetContext());\n\n //Click search\n onView(withText(R.string.fetch_user))\n .perform(click());\n\n }", "@Test(groups = \"wso2.ds.dashboard\", description = \"test for viewer role\", dependsOnMethods = \"testAddDashboardAndAssignRolesBySetting\")\n public void testForViewer()\n throws XPathExpressionException, MalformedURLException {\n String dashboardId = dashboardTitle.toLowerCase();\n addLoginRole(USERNAME_VIEWER);\n login(USERNAME_VIEWER, PASSWORD_VIEWER);\n // Go to the dashboards page\n redirectToLocation(DS_HOME_CONTEXT, DS_DASHBOARDS_CONTEXT);\n WebElement dashboard = getDriver().findElement(By.id(dashboardId));\n assertEquals(DASHBOARD_TITLE, dashboard.findElement(By.id(\"ues-dashboard-title\")).getText());\n assertEquals(DASHBOARD_DESCRIPTION, dashboard.findElement(By.id(\"ues-dashboard-description\")).getText());\n assertTrue(getDriver().isElementPresent(By.cssSelector(\"#\" + dashboardId + \" .ues-view\")),\n \"view element is present in the current UI\");\n assertFalse(getDriver().isElementPresent(By.cssSelector(\"#\" + dashboardId + \" .ues-edit\")),\n \"design element is present in the current UI\");\n assertFalse(getDriver().isElementPresent(By.cssSelector(\"#\" + dashboardId + \" .ues-settings\")),\n \"settings element is present in the current UI\");\n dashboard.findElement(By.id(dashboardId)).findElement(By.id(\"ues-view\")).click();\n // Switch the driver to the new window and click on the edit/personalize link\n pushWindow();\n String bodyText = getDriver().findElement(By.tagName(\"body\")).getText();\n assertTrue(bodyText.contains(USERNAME_VIEWER), \"Expected Username is not matched\");\n getDriver().findElement(By.linkText(USERNAME_VIEWER)).click();\n String personalizeText = getDriver().findElement(By.cssSelector(\"i.ues-copy\")).getAttribute(\"title\").trim()\n .substring(0, 11);\n assertEquals(\"Personalize\", personalizeText, \"Unable to find the personalize button\");\n }", "@Test\n public void testHome() {\n GenericServiceMockup<Person> personService = new GenericServiceMockup<Person>();\n homeController.setPrivilegeEvaluator(mockup);\n homeController.setPersonBean(personService);\n ModelAndView result = homeController.home();\n assertEquals(\"Wrong view name for exception page\", HomeController.HOME_VIEW, result.getViewName());\n }", "public static void testAddTodoView(){\n }", "@Test\n\t public void testGetHomePage() throws Exception{ \n HomeController controller = new HomeController();\n /* We don't have to pass any valid values here because all it does is to send the user to the home page*/\n ModelAndView modelAndView = controller.getHomePage(null, null, null); \n assertEquals(\"home\", modelAndView.getViewName());\n }", "@Test\n public void TEST_FR_SELECTDIFFICULTY_UI() {\n GameData.gameDifficulty = \"unchanged\";\n ChooseDifficultyUI testUI = new ChooseDifficultyUI();\n clickButton(testUI, 1, \"easy\");\n clickButton(testUI, 2, \"medium\");\n clickButton(testUI, 3, \"hard\");\n }", "@Test\n void editTask() {\n }", "@Test\n public void mainRecipeTest() {\n onView(withId(R.id.rv_main)).check(matches(isDisplayed()));\n // Click on the first recipe in the recyclerview\n onView(withId(R.id.rv_main)).perform(actionOnItemAtPosition(0, click()));\n\n // Check that the recyclerview containing the steps is displayed\n onView(withId(R.id.rv_main)).check(matches(isDisplayed()));\n // Check that the favourite fab is displayed\n onView(withId(R.id.favorite_fab)).check(matches(isDisplayed()));\n // Click on the first recipe in the recyclerview\n onView(withId(R.id.rv_main)).perform(actionOnItemAtPosition(0, click()));\n }", "@Test\n public void openLoginActivity() {\n }", "@Then(\"^user should be able to see result page$\")\n public void user_should_be_able_to_see_result_page() throws Throwable {\n }", "@Test\n @Transactional\n public void smokeTestStream() throws Exception {\n\n final View view = viewTestTools.createView(\"TestView-\" + System.currentTimeMillis());\n\n try {\n // Hit the stream page for specified view.\n mockMvc\n .perform(get(\"/stream/\" + view.getId())\n .with(user(adminUserDetails)))\n //.andDo(print())\n .andExpect(status().isOk())\n // Contains some basic text\n .andExpect(content().string(containsString(view.getName())))\n .andExpect(content().string(containsString(view.getTopic())))\n .andExpect(content().string(containsString(\"Switch to View\")))\n .andExpect(content().string(containsString(\"href=\\\"/view/\" + view.getId() + \"\\\"\")));\n } finally {\n // Cleanup.\n viewRepository.delete(view);\n }\n }", "@Override\n\tpublic void homeTestRun() {\n\t\t\n\t}", "@Test\n @Transactional\n public void testUrlsRequireAuthentication() throws Exception {\n final View view = viewTestTools.createView(\"TestView\");\n\n // View \"stream\" page.\n testUrlRequiresAuthentication(\"/stream/\" + view.getId(), false);\n }", "public void startTrial(View view) {\n demo = false;\n updateCurrentFragment(new SetupFragment(), \"setup\");\n }", "@Test public void test() {\n click(\"#txfEmail\").\n type(SMALL_EMAIL_BODY).\n press(KeyCode.SHIFT).\n press(KeyCode.DIGIT2).\n release(KeyCode.SHIFT).\n release(KeyCode.DIGIT2).\n type(EMAIL_SERVER);\n click(\"#psfPassword\").type(PASS);\n click(\"#btnLogin\");\n sleep(3000);\n assertEquals(UStage.getInstance().getCurrentController().getClass(), CMain.class);\n verifyThat(\"#lblNickname\", hasText(NICK));\n verifyThat(\"#lblProfileName\", hasText(NAME));\n }", "@Test\n public void testHomePage() throws Exception{\n System.out.println(\"home\");\n HomeController controller = new HomeController();\n MockMvc mockMvc = standaloneSetup(controller).build();\n mockMvc.perform(get(\"/\")).andExpect(view().name(\"home\"));\n assertEquals(\"home\", controller.home());\n \n }", "@Parameters({ \"driver\" })\n\n\t@Test\n\t// Creation of second scenario for 'Web view interaction'on selendroid app\n\n\tpublic void WebViewInteraction() throws Exception {\n\t\tWebElement element;\n\t\t// click on Icon to fill Web Interaction details\n\t\telement = driver.findElement(By.id(\"io.selendroid.testapp:id/buttonStartWebview\"));\n\t\telement.click();\n\n\t\t// select Webdriver Test file\n\t\telement = driver.findElement(By.id(\"io.selendroid.testapp:id/spinner_webdriver_test_data\"));\n\t\telement.click();\n\n\t\telement = driver.findElement(By.id(\"android:id/text1\"));\n\t\telement.click();\n\n\t\t// Enter name\n\t\telement = driver.findElement(By.xpath(\"//*[@content-desc ='Enter your name here!']\"));\n\t\telement.click();\n\t\telement.clear();\n\t\telement.sendKeys(\"Rahul\");\n\t\n\n\t\t// Select preferred card\n\t\telement = driver.findElement(By.xpath(\"//*[@content-desc = 'Volvo']\"));\n\t\telement.click();\n\n\t\telement = driver.findElement(By.id(\"android:id/text1\"));\n\t\telement.click();\n\n\t\t// Send name to view the details\n\t\telement = driver.findElement(By.xpath(\"//*[@content-desc = 'Send me your name!']\"));\n\t\telement.click();\n\n\t}", "@Test\n public void userClicksAgree_RedirectsToRequestPickup(){\n //Validates the agree button exists\n onView(ViewMatchers.withId(R.id.button_rules_agree)).perform(click());\n\n //Checks that the Request ride page appears\n Activity mRequestRide = mInstrumentation.waitForMonitorWithTimeout(mRulesMonitor, 1000);\n Assert.assertNotNull(mRequestRide);\n }", "@RequestMapping(value = \"/enrollment.html\", method = RequestMethod.GET)\n public String displayForm(Model model) {\n model.addAttribute(\"fixture\", new FixtureModel());\n return \"fixtures/enrollment\";\n }", "@Test(description = \"Verify that task is created and visual editor is visible\")\n public void verifyIfHighPriority() {\n\n LoginPage loginPage = new LoginPage();\n TaskPage taskPage = new TaskPage();\n loginPage.login(\"[email protected]\", \"UserUser\");\n\n test = report.createTest(\"Task tab is visible!\");\n Assert.assertEquals(taskPage.taskTab(\"Demo Meeting!\"), \"TASK\");\n test.pass(\"Task tab is visible\");\n\n\n test = report.createTest(\"High Priority checkbox is clicked\");\n Assert.assertEquals(taskPage.highPriorityLabel(), \"High Priority\");\n taskPage.highPriorityCheckBox();\n test.pass(\"High Priority checkbox visible and clickable\");\n\n\n test = report.createTest(\"Visual editor is visible and the bar is displayed\");\n taskPage.visualEditor();\n taskPage.visualEditorBarIsDisplayed();\n Assert.assertTrue(taskPage.visualEditorBarIsDisplayed());\n test.pass(\"Visual editor is clicked and the bar is displayed\");\n\n }", "public void testRun() {\n\t\tsolo.waitForActivity(com.coky.app.Prijava.class, 2000);\n //Set default small timeout to 21743 milliseconds\n\t\tTimeout.setSmallTimeout(21743);\n //Click on Empty Text View\n\t\tsolo.clickOnView(solo.getView(com.coky.app.R.id.textEmail));\n //Enter the text: '[email protected]'\n\t\tsolo.clearEditText((android.widget.EditText) solo.getView(com.coky.app.R.id.textEmail));\n\t\tsolo.enterText((android.widget.EditText) solo.getView(com.coky.app.R.id.textEmail), \"[email protected]\");\n //Click on Empty Text View\n\t\tsolo.clickOnView(solo.getView(com.coky.app.R.id.textPassword));\n //Enter the text: 'test'\n\t\tsolo.clearEditText((android.widget.EditText) solo.getView(com.coky.app.R.id.textPassword));\n\t\tsolo.enterText((android.widget.EditText) solo.getView(com.coky.app.R.id.textPassword), \"test\");\n //Click on Prijavi se\n\t\tsolo.clickOnView(solo.getView(com.coky.app.R.id.prijavaBtn));\n //Wait for activity: 'com.coky.app.GlavnaAktivnost'\n\t\tassertTrue(\"com.coky.app.GlavnaAktivnost is not found!\", solo.waitForActivity(com.coky.app.GlavnaAktivnost.class));\n //Click on ImageView\n\t\tsolo.clickOnView(solo.getView(com.coky.app.R.id.btnDesno));\n //Click on Empty Text View\n\t\tsolo.clickOnView(solo.getView(com.coky.app.R.id.editNazivHraneNP));\n //Enter the text: 'Jabuke'\n\t\tsolo.clearEditText((android.widget.EditText) solo.getView(com.coky.app.R.id.editNazivHraneNP));\n\t\tsolo.enterText((android.widget.EditText) solo.getView(com.coky.app.R.id.editNazivHraneNP), \"Jabuke\");\n //Click on Empty Text View\n\t\tsolo.clickOnView(solo.getView(com.coky.app.R.id.editKolicinaNP));\n //Enter the text: '5'\n\t\tsolo.clearEditText((android.widget.EditText) solo.getView(com.coky.app.R.id.editKolicinaNP));\n\t\tsolo.enterText((android.widget.EditText) solo.getView(com.coky.app.R.id.editKolicinaNP), \"5\");\n //Click on Dodaj stavku\n\t\tsolo.clickOnView(solo.getView(com.coky.app.R.id.btnDodajStavkuNP));\n //Click on Dodaj paket\n\t\tsolo.clickOnView(solo.getView(com.coky.app.R.id.btnDodajPaketNP));\n //Click on Odustani\n\t\tsolo.clickOnView(solo.getView(com.coky.app.R.id.btnNatragNoviPaket));\n\t}", "@Test(groups ={Slingshot,Regression})\n\tpublic void VerifyNewUserDetailsactivation() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify the Super User Overlay Yes Button Selection\");\n\n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMVTestDatas\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.ClickAddNewUserLink()\n\t\t.AddUserRadioButton()\n\t\t.SuperUserCreation()\n\t\t.SuperUserOverlayyes(); \t \t \t \t \n\t}", "@Test\r\n public void DisplayCurrentUserAfterLogIn() {\n String username = ParseUser.getCurrentUser().getUsername();\r\n onView(withText(\"Welcome, \" + username)).check(ViewAssertions.matches(isDisplayed()));\r\n }", "@Test(timeout = 100)\n public void testAccessToDashboard() {\n System.out.println(\"Starting Dashboard access test\");\n }", "@Test\n public void detailsTest() {\n // TODO: test details\n }", "@Test\n public void detailsTest() {\n // TODO: test details\n }", "@Test\n\tpublic void test02_PreviewAPage() {\n\t\tinfo(\"Test 2: Preview a page\");\n\t\t/*Step Number: 1\n\t\t*Step Name: Step 1: Open form to create new page\n\t\t*Step Description: \n\t\t\t- Choose path to add new page\n\t\t\t- Click [Add Page] --> [Blank Page]/[From Template...]\n\t\t*Input Data: \n\t\t\t\n\t\t*Expected Outcome: \n\t\t\tForm to create new page is shown and in the [Rich Text] editor*/\n\t\tinfo(\"Go to Add a Wiki page\");\n\t\tString title = txData.getContentByArrayTypeRandom(1)+getRandomNumber();\n\t\tString content = txData.getContentByArrayTypeRandom(1)+getRandomNumber();\n\t\thp.goToWiki();\n\t\twHome.goToAddBlankPage();\n\t\t\n\t\t/*Step Number: 2\n\t\t*Step Name: Step 2: Create new page\n\t\t*Step Description: \n\t\t\t- Put the title for this page\n\t\t\t- Put the content of page\n\n\t\t*Input Data: \n\t\t\t\n\t\t*Expected Outcome: \n\t\t\tAll fields are inputed with values*/\n\t\trichEditor.addSimplePage(title, content);\n\t\t\n\t\t/*Step Number: 3\n\t\t*Step Name: Step 3: Preview a page\n\t\t*Step Description: \n\t\t\t- Click on Preview \n\t\t*Input Data: \n\t\t\t\n\t\t*Expected Outcome: \n\t\t\tContent of page is shown*/\n\t\t\n\t\twikiMg.PreviewASimplePage(title, content);\n \t}", "@Test\n\tpublic void testGetUrl_1()\n\t\tthrows Exception {\n\t\tRedirectView fixture = new RedirectView(\"\", true, true);\n\t\tfixture.setUrl(\"\");\n\t\tfixture.setEncodingScheme(\"\");\n\n\t\tString result = fixture.getUrl();\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}", "public void GoToTestDetails() {\n\t \t Intent intent = new Intent(this, TestDetails.class);\n\t \t intent.putExtra(\"Test value\", testList);\n\t \t startActivity(intent);\n\t }", "@Override\r\n\tpublic void onTestSuccess(ITestResult tr) {\n\t\tLog.info(tr.getName() + \"---Test method passed---\\n\");\r\n \ttry {\r\n\t\t\ttakeScreenShot(tr);\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "@Test(groups ={Slingshot,Regression})\n\tpublic void VerifyAddnewViewOverlay() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify whether Add new view overlay is getting displayed when there is no views \"); \t \t \t \n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMVTestDataspl\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.ClickAddNewUserLink()\n\t\t.AddUserRadioButton()\n\t\t.StandardUser_Creation()\n\t\t.AddnewViewOverlay();\n\n\t}", "@Test\r\n public void testStopLight() {\r\n // Start up the WicketTester and check that the start page renders.\r\n WicketTester tester = new WicketTester(new GreenometerApplication());\r\n tester.startPage(StopLightPage.class);\r\n tester.assertRenderedPage(StopLightPage.class);\r\n \r\n\r\n }", "@Test\n public void testViewProfile() {\n for (int i = 0; i < 10; i++) {\n presenter.onViewProfile();\n }\n Assert.assertEquals(10, view.getManageViewProfileClicks());\n }", "@Test\n public void openMainActivity() {\n }", "@Test\n public void clickOnFab_ShowsAddTaskUi() {\n mPlaylistPresenter.addNewTask();\n\n // Then add task UI is shown\n verify(mTasksView).showAddTask();\n }", "@Test\n public void testRegularOpen() {\n openUrl();\n }", "@Test\r\n\t//\r\n\tpublic void validateEditLinkTest(){\n\t\tString text=\"Success: Your account has been successfully updated.\";\r\n\t\tassertEquals(editPOM.validateEditTest(),text);\r\n\t\tSystem.out.println(\"5th test case working as expected\");\r\n\t\tscreenShot.captureScreenShot(\"Captured updated details text\");\r\n\t\t\r\n\t}", "@Then(\"view Dashboard\")\n\tpublic void view_dashboard() {\n\t\taddCust = new addCustomerPage(driver);\n\t\tAssert.assertEquals(\"Dashboard / nopCommerce administration\",addCust.getPageTitle());\n\t}", "@Test\n public void testRedButton4Vissible() {\n window.textBox(\"usernameText\").setText(\"karona\"); \n window.textBox(\"StoresNameTxt\").setText(\"store1\"); \n window.textBox(\"openHoursTxt\").setText(\"18:00-20:00\");\n window.textBox(\"CustomerNameTxt\").setText(\"ilias\");\n window.textBox(\"NumberOfSeatsTxt\").enterText(\"1\"); \n window.comboBox(\"HoursAvailable\").selectItem(1);\n window.button(\"makeReservation\").click();\n window.optionPane().okButton().click();\n window.button(\"redButton4\").requireVisible();\n }", "private void runTest(String path, int key){\n\t\t\n\t\tsaveTestList(path); \n\t\tgetSelectedPanel().clearResults();\n\t\tcontroller.runTest(path,key);\n\t}", "@Test //Index\n public void testPageNavigationAsUserIndex() {\n loginAsUser();\n\n vinyardApp.navigationCultureClick();\n final String expectedURL = \"http://localhost:8080/index\";\n final String result = driver.getCurrentUrl();\n assertEquals(expectedURL, result);\n }", "private void viewPageClicked(ActionEvent event) {\n\n Item tempItem = new Item();\n String itemURL = tempItem.itemURL;\n Desktop dk = Desktop.getDesktop();\n try{\n dk.browse(new java.net.URI(itemURL));\n }catch(IOException | URISyntaxException e){\n System.out.println(\"The URL on file is invalid.\");\n }\n\n showMessage(\"Visiting Item Web Page\");\n\n }" ]
[ "0.67456293", "0.6660416", "0.65465975", "0.65149593", "0.6510881", "0.6510535", "0.63569105", "0.6344836", "0.6312222", "0.628752", "0.62390625", "0.62336123", "0.62029934", "0.6179205", "0.6178903", "0.6108589", "0.60959214", "0.6088523", "0.60880864", "0.6066909", "0.6066872", "0.6043511", "0.6029563", "0.60254204", "0.60124743", "0.60026264", "0.5989306", "0.5981901", "0.5966507", "0.5962805", "0.5950379", "0.5937616", "0.5924967", "0.59171575", "0.5910107", "0.588036", "0.58781403", "0.5877555", "0.58693874", "0.586447", "0.58618647", "0.58523476", "0.5835535", "0.5835253", "0.5834315", "0.5832949", "0.58200955", "0.57999134", "0.5783237", "0.57831824", "0.5776699", "0.5775382", "0.57696676", "0.57687676", "0.576603", "0.5764207", "0.5749558", "0.5747131", "0.57447076", "0.5742552", "0.57421654", "0.57416767", "0.57407886", "0.57406616", "0.57404286", "0.5739136", "0.5733675", "0.57314444", "0.5731339", "0.5723696", "0.5720375", "0.5720103", "0.5718621", "0.57185996", "0.57180446", "0.5713404", "0.5713161", "0.5710583", "0.5690471", "0.5689765", "0.5682955", "0.5680941", "0.5674139", "0.5674139", "0.56721294", "0.56708914", "0.56656116", "0.5664071", "0.56611025", "0.56489295", "0.56408596", "0.56398433", "0.5639664", "0.56367", "0.5626698", "0.56214017", "0.56163675", "0.56161076", "0.5615224", "0.56117606" ]
0.60296845
22
Created by ankit on 26/2/16.
public interface AppService { @GET("/words.json") void getVocabListApiCall(Callback<BaseVocabResponseParser> vocabResponseParserCallback); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@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}", "private stendhal() {\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 void gored() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "private void poetries() {\n\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "private void kk12() {\n\n\t}", "@Override\n\tpublic void entrenar() {\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\tpublic void init() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public void mo38117a() {\n }", "@Override\n public void init() {\n\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "public void mo4359a() {\n }", "private void m50366E() {\n }", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "private void strin() {\n\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "private void init() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@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 rozmnozovat() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n public void init() {\n }", "@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}", "@Override\n protected void init() {\n }", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@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 public void init() {\n\n }", "@Override\n public void init() {\n\n }", "public void skystonePos4() {\n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\n void init() {\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "public void mo12628c() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\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 one() {\n\t\t\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\r\n\tpublic void init() {}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n public void init() {}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private void init() {\n\n\n\n }", "@Override\n\tpublic void init() {\n\t}", "@Override\n public int retroceder() {\n return 0;\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 }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void skystonePos6() {\n }", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "public void method_4270() {}", "@Override\n\tpublic void afterInit() {\n\t\t\n\t}", "@Override\n\tpublic void afterInit() {\n\t\t\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "public void mo6081a() {\n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n public int describeContents() { return 0; }" ]
[ "0.60900354", "0.6018141", "0.58612555", "0.58428204", "0.58152", "0.58152", "0.5789778", "0.5758899", "0.575317", "0.5741185", "0.57411826", "0.57395625", "0.5728231", "0.57248247", "0.57081455", "0.5703477", "0.5679848", "0.56788325", "0.5677151", "0.5657434", "0.56538725", "0.56538725", "0.56538725", "0.56538725", "0.56538725", "0.56349653", "0.5634364", "0.5614192", "0.56062734", "0.56008387", "0.5596008", "0.5595777", "0.55936384", "0.55746835", "0.5568037", "0.55522287", "0.553555", "0.55334485", "0.55284387", "0.5515836", "0.5515836", "0.5512313", "0.5510404", "0.55011666", "0.54781914", "0.54781914", "0.54781914", "0.54753673", "0.5474206", "0.5474206", "0.5474206", "0.5459336", "0.5459336", "0.5459336", "0.5457645", "0.5457645", "0.54538333", "0.54493546", "0.54376435", "0.54338634", "0.54335004", "0.5432003", "0.5431791", "0.5429135", "0.54273266", "0.54273266", "0.54273266", "0.54273266", "0.54273266", "0.54273266", "0.54273266", "0.5424241", "0.54144436", "0.5413909", "0.54110885", "0.54055655", "0.54041266", "0.54026", "0.5400962", "0.53981006", "0.5394922", "0.53939414", "0.5391713", "0.5391713", "0.5391713", "0.5391713", "0.5391713", "0.5391713", "0.53916115", "0.5388639", "0.5382222", "0.53752595", "0.5374081", "0.5363226", "0.5363226", "0.534699", "0.5342918", "0.5330553", "0.5330553", "0.53214484", "0.53149045" ]
0.0
-1
Creates new form Lentejas
public Lentejas() { initComponents(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Result newForm() {\n return ok(newForm.render(palletForm, setOfArticleForm));\n }", "FORM createFORM();", "public FormInserir() {\n initComponents();\n }", "@Command\n\tpublic void nuevoAnalista(){\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\n\n\t\t//parametros.put(\"recordMode\", \"NEW\");\n\t\tllamarFormulario(\"formularioAnalistas.zul\", null);\n\t}", "public String nuevo() {\n\n\t\tLOG.info(\"Submitado formulario, accion nuevo\");\n\t\tString view = \"/alumno/form\";\n\n\t\t// las validaciones son correctas, por lo cual los datos del formulario estan en\n\t\t// el atributo alumno\n\n\t\t// TODO simular index de la bbdd\n\t\tint id = this.alumnos.size();\n\t\tthis.alumno.setId(id);\n\n\t\tLOG.debug(\"alumno: \" + this.alumno);\n\n\t\t// TODO comprobar edad y fecha\n\n\t\talumnos.add(alumno);\n\t\tview = VIEW_LISTADO;\n\t\tmockAlumno();\n\n\t\t// mensaje flash\n\t\tFacesContext facesContext = FacesContext.getCurrentInstance();\n\t\tExternalContext externalContext = facesContext.getExternalContext();\n\t\texternalContext.getFlash().put(\"alertTipo\", \"success\");\n\t\texternalContext.getFlash().put(\"alertMensaje\", \"Alumno \" + this.alumno.getNombre() + \" creado con exito\");\n\n\t\treturn view + \"?faces-redirect=true\";\n\t}", "public static void create(Formulario form){\n daoFormulario.create(form);\n }", "private void nuevaLiga() {\r\n\t\tif(Gestion.isModificado()){\r\n\t\t\tint opcion = JOptionPane.showOptionDialog(null, \"¿Desea guardar los cambios?\", \"Nueva Liga\", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null,null, null);\r\n\t\t\tswitch(opcion){\r\n\t\t\tcase JOptionPane.YES_OPTION:\r\n\t\t\t\tguardar();\r\n\t\t\t\tbreak;\r\n\t\t\tcase JOptionPane.NO_OPTION:\r\n\t\t\t\tGestion.reset();\r\n\t\t\t\tbreak;\r\n\t\t\tcase JOptionPane.CANCEL_OPTION:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t\tGestion.reset();\r\n\t\tfrmLigaDeFtbol.setTitle(\"Liga de Fútbol\");\r\n\t}", "@GetMapping(value = \"/create\") // https://localhost:8080/etiquetasTipoDisenio/create\n\tpublic String create(Model model) {\n\t\tetiquetasTipoDisenio etiquetasTipoDisenio = new etiquetasTipoDisenio();\n\t\tmodel.addAttribute(\"title\", \"Registro de una nuev entrega\");\n\t\tmodel.addAttribute(\"etiquetasTipoDisenio\", etiquetasTipoDisenio); // similar al ViewBag\n\t\treturn \"etiquetasTipoDisenio/form\"; // la ubicacion de la vista\n\t}", "public creacionempresa() {\n initComponents();\n mostrardatos();\n }", "public CrearPedidos() {\n initComponents();\n }", "public void CrearNew(ActionEvent e) {\n List<Pensum> R = ejbFacade.existePensumID(super.getSelected().getIdpensum());\n if(R.isEmpty()){\n super.saveNew(e);\n }else{\n new Auxiliares().setMsj(3,\"PENSUM ID YA EXISTE\");\n }\n }", "private void azzeraInsertForm() {\n\t\tviewInserimento.getCmbbxTipologia().setSelectedIndex(-1);\n\t\tviewInserimento.getTxtFieldDataI().setText(\"\");\n\t\tviewInserimento.getTxtFieldValore().setText(\"\");\n\t\tviewInserimento.getTxtFieldDataI().setBackground(Color.white);\n\t\tviewInserimento.getTxtFieldValore().setBackground(Color.white);\n\t}", "public void onNew() {\t\t\n\t\tdesignWidget.addNewForm();\n\t}", "@GetMapping(\"/students/new\")\r\n\tpublic String createStudentForm(Model model) {\n\t\tStudent student =new Student();\r\n\t\tmodel.addAttribute(\"student\",student);\r\n\t\treturn \"create_student\";\r\n\t}", "public GestaoFormando() {\n \n initComponents();\n listarEquipamentos();\n listarmapainscritos();\n }", "@GetMapping(\"/restaurante/new\")\n\tpublic String newRestaurante(Model model) {\n\t\tmodel.addAttribute(\"restaurante\", new Restaurante());\n\t\tControllerHelper.setEditMode(model, false);\n\t\tControllerHelper.addCategoriasToRequest(categoriaRestauranteRepository, model);\n\t\t\n\t\treturn \"restaurante-cadastro\";\n\t\t\n\t}", "@GetMapping(\"/createRegistro\")\n\tpublic String crearValidacion(Model model) {\n\t\tList<Barrio> localidades = barrioService.obtenerBarrios();\n\t\tmodel.addAttribute(\"localidades\",localidades);\n\t\tmodel.addAttribute(\"persona\",persona);\n\t\tmodel.addAttribute(\"validacion\",validacion);\n\t\tmodel.addAttribute(\"registro\",registro);\n\t\tmodel.addAttribute(\"barrio\",barrio);\n\t\treturn \"RegistroForm\";\n\t}", "public SalidaCajaForm() {\n\t\tinicializarComponentes();\n }", "public frmTelaVendas() {\n initComponents();\n this.carrinho = new CarrinhoDeCompras();\n listaItens.setModel(this.lista);\n }", "@GetMapping(\"/producto/nuevo\")\n\tpublic String nuevoProductoForm(Model model) {\n\t\tmodel.addAttribute(\"producto\", new Producto());\n\t\treturn \"app/producto/form\";\n\t}", "@RequestMapping(value = \"/newrecipe\", method = RequestMethod.GET)\n\tpublic String newRecipeForm(Model model) {\n\t\tmodel.addAttribute(\"recipe\", new Recipe()); //empty recipe object\n\t\tmodel.addAttribute(\"categories\", CatRepo.findAll());\n\t\treturn \"newrecipe\";\n\t}", "public FormFuncionario(FormMenu telaPai) {\n initComponents();\n this.telaPai = telaPai;\n\n txtNome.setText(\"Nome\");\n lblNome.setVisible(false);\n txtSobrenome.setText(\"Sobrenome\");\n lblSobrenome.setVisible(false);\n campoMensagem.setVisible(false);\n lblMensagem.setVisible(false);\n\n }", "private void newTodo() {\r\n String myTodoName = \"Unknown\";\r\n for (Component component : panelSelectFile.getComponents()) {\r\n if (component instanceof JTextField) {\r\n if (component.getName().equals(\"Name\")) {\r\n JTextField textFieldName = (JTextField) component;\r\n myTodoName = textFieldName.getText();\r\n }\r\n }\r\n }\r\n if (myTodoName == null || myTodoName.isEmpty()) {\r\n JOptionPane.showMessageDialog(null, \"New Todo List name not entered!\");\r\n return;\r\n }\r\n myTodo = new MyTodoList(myTodoName);\r\n int reply = JOptionPane.showConfirmDialog(null, \"Do you want to save this todoList?\",\r\n \"Save New Todolist\", JOptionPane.YES_NO_OPTION);\r\n if (reply == JOptionPane.YES_OPTION) {\r\n saveTodo();\r\n }\r\n fileName = null;\r\n todoListGui();\r\n }", "public String newBoleta() {\n\t\tresetForm();\n\t\treturn \"/boleta/insert.xhtml\";\n\t}", "public TorneoForm() {\n initComponents();\n }", "public ViewCreatePagamento() {\n initComponents();\n clientesDAO cDAO = DaoFactory.createClientesDao(); \n matriculaDAO mDAO = DaoFactory.createMatriculaDao();\n \n cmbIDClientes.addItem(null);\n cDAO.findAll().forEach((p) -> {\n cmbIDClientes.addItem(p.getNome());\n });\n \n \n txtDataAtual.setText(DateFormat.getDateInstance().format(new Date()));\n }", "@Override\n\tpublic Oglas createNewOglas(NewOglasForm oglasForm) {\n\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\t\n\t\tOglas oglas = new Oglas();\n\t\tSystem.out.println(oglas.getId());\n\t\toglas.setNaziv(oglasForm.getNaziv());\n\t\toglas.setOpis(oglasForm.getOpis());\n\t\ttry {\n\t\t\toglas.setDatum(formatter.parse(oglasForm.getDatum()));\n\t\t\tSystem.out.println(oglas.getDatum());\n System.out.println(formatter.format(oglas.getDatum()));\n\t\t} catch (ParseException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn repository.save(oglas);\n\t}", "private void initialize() {\n setFrame(new JFrame());\n getFrame().setBounds(100, 100, 310, 270);\n getFrame().setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n getFrame().getContentPane().setLayout(null);\n\n JLabel lblTitle = new JLabel(\"Crear nuevo profesor\");\n lblTitle.setFont(new Font(\"Arial\", Font.BOLD | Font.ITALIC, 13));\n lblTitle.setBounds(10, 11, 264, 16);\n getFrame().getContentPane().add(lblTitle);\n\n JLabel lblNombre = new JLabel(\"Nombre\");\n lblNombre.setBounds(10, 36, 46, 14);\n getFrame().getContentPane().add(lblNombre);\n\n textNombre = new JTextField();\n textNombre.setBounds(66, 33, 86, 20);\n getFrame().getContentPane().add(textNombre);\n textNombre.setColumns(10);\n\n JLabel lbDni = new JLabel(\"DNI\");\n lbDni.setBounds(10, 61, 46, 14);\n getFrame().getContentPane().add(lbDni);\n\n textDni = new JTextField();\n textDni.setBounds(66, 58, 86, 20);\n getFrame().getContentPane().add(textDni);\n textDni.setColumns(10);\n\n JLabel lblEdad = new JLabel(\"Edad\");\n lblEdad.setBounds(10, 86, 46, 14);\n getFrame().getContentPane().add(lblEdad);\n\n textEdad = new JTextField();\n textEdad.setBounds(66, 83, 86, 20);\n getFrame().getContentPane().add(textEdad);\n textEdad.setColumns(10);\n\n JLabel lbCurso = new JLabel(\"Curso\");\n lbCurso.setBounds(10, 111, 46, 14);\n getFrame().getContentPane().add(lbCurso);\n\n textCurso = new JTextField();\n textCurso.setBounds(66, 108, 86, 20);\n getFrame().getContentPane().add(textCurso);\n textCurso.setColumns(10);\n\n JLabel lblSueldo = new JLabel(\"Sueldo\");\n lblSueldo.setBounds(10, 136, 46, 14);\n getFrame().getContentPane().add(lblSueldo);\n\n textSueldo = new JTextField();\n textSueldo.setBounds(66, 133, 86, 20);\n getFrame().getContentPane().add(textSueldo);\n textSueldo.setColumns(10);\n\n JLabel lblNewLabel = new JLabel(\"Todos los campos son obligatorios\");\n lblNewLabel.setForeground(Color.RED);\n lblNewLabel.setFont(new Font(\"Arial\", Font.BOLD | Font.ITALIC, 11));\n lblNewLabel.setBounds(10, 161, 264, 14);\n getFrame().getContentPane().add(lblNewLabel);\n\n JButton btnCrear = new JButton(\"Crear profesor\");\n btnCrear.setForeground(Color.WHITE);\n btnCrear.setBackground(Color.DARK_GRAY);\n btnCrear.setFont(new Font(\"Arial\", Font.BOLD, 12));\n btnCrear.addActionListener(new ActionListener() {\n\n /**\n * Al presionar el boton 'btnCrear' este crea un objeto de tipo Profesor y\n * accede la informacion dentreo de cada JTextField() asignanco al objeto creado\n * estos valores obtenidos.\n *\n * @param e el evento.\n * @see #Ficheros.\n */\n public void actionPerformed(ActionEvent e) {\n Profesor p = new Profesor();\n p.setNombre(textNombre.getText().toUpperCase());\n p.setDni(textDni.getText().toUpperCase());\n p.setEdad(Integer.parseInt(textEdad.getText()));\n p.setCurso(Integer.parseInt(textCurso.getText()));\n p.setSueldo(Integer.parseInt(textSueldo.getText()));\n try {\n Ficheros.guardar(p, Ficheros.D_PROFESORES);\n } catch (IOException e2) {\n System.out.println(\"Fichero no encontrado - guardarAlumno()\");\n }\n }\n });\n btnCrear.setBounds(10, 186, 119, 33);\n getFrame().getContentPane().add(btnCrear);\n\n JButton btnMostrar = new JButton(\"Mostrar profesores\");\n btnMostrar.setForeground(Color.WHITE);\n btnMostrar.setBackground(Color.DARK_GRAY);\n btnMostrar.setFont(new Font(\"Arial\", Font.BOLD, 12));\n btnMostrar.setBounds(139, 186, 145, 33);\n btnMostrar.addActionListener(new ActionListener() {\n /**\n * Muestra los profesores almacenados en los ficheros desde Class Ficheros.\n *\n * @param e el evento.\n * @see #Ficheros.\n */\n public void actionPerformed(ActionEvent e) {\n Profesor p = null;\n System.out.println(\"---- Profesores ----\");\n Ficheros.leerFicheros(p, Ficheros.D_PROFESORES);\n }\n });\n getFrame().getContentPane().add(btnMostrar);\n }", "public frm_tutor_subida_prueba() {\n }", "public void createPersonalInfos(JFrame jFrame, ControllerAdmin controllerAdminPersonalInfos){\n JLabel jLabelAcount = new JLabel(\"Compte\");\n jLabelAcount.setBounds(20, 20, 100, 28);\n\n JLabel jLabelId = new JLabel(\"Identifiant :\");\n jLabelId.setBounds(40, 50, 300, 28);\n JTextField jTextFieldId = new JTextField(controllerAdminPersonalInfos.getUser().getId());\n jTextFieldId.setBounds(40, 80, 300, 28);\n\n JLabel jLabelLastName = new JLabel(\"Nom :\");\n jLabelLastName.setBounds(40, 110, 300, 28);\n JTextField jTextFieldLastName = new JTextField(controllerAdminPersonalInfos.getUser().getLastName());\n jTextFieldLastName.setBounds(40, 140, 300, 28);\n\n JLabel jLabelFirstName = new JLabel(\"Prenom :\");\n jLabelFirstName.setBounds(40, 170, 300, 28);\n JTextField jTextFieldFirstName = new JTextField(controllerAdminPersonalInfos.getUser().getFirstName());\n jTextFieldFirstName.setBounds(40, 200, 300, 28);\n\n JLabel jLabelEmail = new JLabel(\"Email :\");\n jLabelEmail.setBounds(40, 230, 300, 28);\n JTextField jTextFieldEmail = new JTextField(controllerAdminPersonalInfos.getUser().getEmail());\n jTextFieldEmail.setBounds(40, 260, 300, 28);\n\n JLabel jLabelPassword = new JLabel(\"Mot de passe :\");\n jLabelPassword.setBounds(40, 290, 300, 28);\n JPasswordField jPasswordFieldPassword = new JPasswordField(controllerAdminPersonalInfos.getUser().getPassword());\n jPasswordFieldPassword.setBounds(40, 320, 300, 28);\n\n JButton jButtonModifPassword = new JButton(\"Modifier le mot de passe\");\n jButtonModifPassword.setBounds(350, 320, 200, 28);\n\n //set editabilite\n jTextFieldId.setEditable(false);\n jTextFieldLastName.setEditable(false);\n jTextFieldFirstName.setEditable(false);\n jTextFieldEmail.setEditable(false);\n jPasswordFieldPassword.setEditable(false);\n\n // Ajout des element à la JFrame\n jFrame.add(jLabelAcount);\n jFrame.add(jLabelId);\n jFrame.add(jTextFieldId);\n jFrame.add(jLabelLastName);\n jFrame.add(jTextFieldLastName);\n jFrame.add(jLabelFirstName);\n jFrame.add(jTextFieldFirstName);\n jFrame.add(jLabelEmail);\n jFrame.add(jTextFieldEmail);\n jFrame.add(jLabelPassword);\n jFrame.add(jButtonModifPassword);\n jFrame.add(jPasswordFieldPassword);\n\n jButtonModifPassword.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n createModifPassword(jFrame, controllerAdminPersonalInfos);\n jFrame.repaint();\n }\n });\n\n jFrame.setLayout(null);\n jFrame.setVisible(true);\n }", "@RequestMapping(\"/book/new\")\n public String newBook(Model model){\n model.addAttribute(\"book\", new Book ());\n return \"bookform\";\n }", "private void creerMethode() {\n if (estValide()) {\n methode = new Methode();\n methode.setNom(textFieldNom.getText());\n methode.setVisibilite(comboBoxVisibilite.getValue());\n methode.setType(comboBoxType.getValue());\n ArrayList<Parametre> temp = new ArrayList<>();\n for (Parametre parametre : parametreListView.getItems())\n temp.add(parametre);\n methode.setParametres(temp);\n close();\n }\n }", "public FrmInsertar() {\n initComponents();\n }", "public CadastroProdutoNew() {\n initComponents();\n }", "@GetMapping(\"/cliente/new\")\n\tpublic String newCliente(Model model) {\n\t\tmodel.addAttribute(\"cliente\", new Cliente());\n\t\tControllerHelper.setEditMode(model, false);\n\t\t\n\t\t\n\t\treturn \"cadastro-cliente\";\n\t\t\n\t}", "@RequestMapping(params = \"new\", method = RequestMethod.GET)\n\t@PreAuthorize(\"hasRole('ADMIN')\")\n\tpublic String createProductForm(Model model) { \t\n \t\n\t\t//Security information\n\t\tmodel.addAttribute(\"admin\",security.isAdmin()); \n\t\tmodel.addAttribute(\"loggedUser\", security.getLoggedInUser());\n\t\t\n\t model.addAttribute(\"product\", new Product());\n\t return \"products/newProduct\";\n\t}", "@GetMapping(\"/students/new\")\n\tpublic String createStudentForm(Model model) throws ParseException\n\t{\n\t\t\n\t\tStudent student=new Student(); //To hold form Data.\n\t\t\n\t\tmodel.addAttribute(\"student\",student);\n\t\t\n\t\t// go to create_student.html page\n\t\treturn \"create_student\";\n\t}", "public FormPpal() {\n initComponents();\n setIconImage(Toolkit.getDefaultToolkit().getImage(this.getClass().getResource(\"Imagenes/icon.png\")));\n setLocationRelativeTo(null);\n setTitle(\"Men\\372 principal\");\n setResizable(false);\n formBackUp = null;\n formBuscador = null;\n fb1 = null;\n fb2 = null;\n formListado = null;\n conn = new Conn();\n pacientesCumpleanos = new LinkedList();\n pacientesControl = new LinkedList();\n cargarCumpleanos();\n cargarControlesHoy();\n }", "public Ventaform() {\n initComponents();\n }", "@RequestMapping(value={\"/projects/add\"}, method= RequestMethod.GET)\r\n\tpublic String createProjectForm(Model model) {\r\n\t\tUser loggedUser= sessionData.getLoggedUser();\r\n\t\tmodel.addAttribute(\"loggedUser\", loggedUser);\r\n\t\tmodel.addAttribute(\"projectForm\", new Project());\r\n\t\treturn \"addProject\";\r\n\t}", "private void createBtnActionPerformed(java.awt.event.ActionEvent evt) {\n\n staff.setName(regName.getText());\n staff.setID(regID.getText());\n staff.setPassword(regPwd.getText());\n staff.setPosition(regPos.getSelectedItem().toString());\n staff.setGender(regGender.getSelectedItem().toString());\n staff.setEmail(regEmail.getText());\n staff.setPhoneNo(regPhone.getText());\n staff.addStaff();\n if (staff.getPosition().equals(\"Vet\")) {\n Vet vet = new Vet();\n vet.setExpertise(regExp.getSelectedItem().toString());\n vet.setExpertise_2(regExp2.getSelectedItem().toString());\n vet.addExpertise(staff.getID());\n }\n JOptionPane.showMessageDialog(null, \"User added to database\");\n updateJTable();\n }", "@RequestMapping(\"/new\")\n\tpublic String displayProjectForm(Model model) {\n\t\tProject aproject = new Project();\n\t//Iterable<Employee> employees = \tpro.getall();\n\t\n\t\tmodel.addAttribute(\"project\", aproject);\n\n\t\t//model.addAttribute(\"allEmployees\", employees);\n\t\t\n\t\t\n\t\treturn \"newproject\";\n\t\t\n\t}", "public void crear() {\n con = new Conexion();\n con.setInsertar(\"insert into lenguajes_programacion (nombre, fecha_creacion, estado) values ('\"+this.getNombre()+\"', '\"+this.getFecha_creacion()+\"', 'activo')\");\n }", "public Form_soal() {\n initComponents();\n tampil_soal();\n }", "protected void creaPagine() {\n Pagina pag;\n Pannello pan;\n\n try { // prova ad eseguire il codice\n\n /* crea la pagina e aggiunge campi e pannelli */\n pag = this.addPagina(\"generale\");\n\n pan = PannelloFactory.orizzontale(this);\n pan.add(Cam.data);\n pan.add(Cam.importo.get());\n pan.add(Cam.note.get());\n pag.add(pan);\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }", "public TelaLoja() {\n\t\t\ttitulo.setFont(new Font(\"Arial\", Font.BOLD, 14));\n\t\t\ttitulo.setBounds(70, 10, 200, 30);\n\t\t\toculos.setBounds(80, 40, 140, 30);\n\t\t\tcontato.setBounds(50, 80, 200, 30);\n\t\t\t\t\t\n\t\t\tjanela.setLayout(null);\n\t\t\t\n\t\t\tjanela.add(titulo);\n\t\t\tjanela.add(oculos);\n\t\t\tjanela.add(contato);\n\t\t\t\n\t\t\tjanela.setSize(300, 150);\n\t\t\tjanela.setLocationRelativeTo(null);\n\t\t\tjanela.setResizable(false);\n\t\t\tjanela.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\tjanela.setVisible(true);\t\n\t\t\toculos.addActionListener(this);\n\t\t\tcontato.addActionListener(this);\n\t\t}", "public static Result startNewForm() {\r\n\t\tString formName = ChangeOrderForm.NAME;\r\n\t\tDecision firstDecision = CMSGuidedFormFill.startNewForm(formName,\r\n\t\t\t\tCMSSession.getEmployeeName(), CMSSession.getEmployeeId());\r\n\t\treturn ok(backdrop.render(firstDecision));\r\n\t}", "public Add_Lecture_Form() {\n initComponents();\n \n this.setVisible(true);\n this.pack();\n this.setLocationRelativeTo(null);\n }", "protected void nuevo(){\n wp = new frmEspacioTrabajo();\n System.runFinalization();\n inicializar();\n }", "public frmNewArtist() {\n initComponents();\n lblID.setText(Controller.Agent.ManageController.getNewArtistID());\n lblGreeting.setText(\"Dear \"+iMuzaMusic.getLoggedUser().getFirstName()+\", please use the form below to add an artist to your ranks.\");\n \n }", "public Formulario() {\n initComponents();\n }", "public LibrosFormBean() {\r\n libr = new ConjuntoLibro();\r\n }", "public CreateAccount() {\n initComponents();\n selectionall();\n }", "public FormUtama() {\n initComponents();\n }", "private void newProject()\n\t{\n\t\tnew FenetreCreationProjet();\n\t}", "public FormularioPregunta() {\n initComponents();\n \n setLocationRelativeTo(this);\n }", "@RequestMapping(\"/save\")\n\tpublic String createProjectForm(Project project, Model model) {\n\t\t\n\tproRep.save(project);\n\tList<Project> getall = (List<Project>) proRep.getAll();\n\tmodel.addAttribute(\"projects\", getall);\n\t\n\treturn \"listproject\";\n\t\t\n\t}", "public CrearProductos() {\n initComponents();\n }", "public FGlavna() {\n initComponents();\n pripremiFormu();\n }", "@GetMapping(\"/add\")\n public String showSocioForm(Model model, Persona persona) {\n List<Cargo> cargos = cargoService.getCargos();\n model.addAttribute(\"cargos\", cargos);\n return \"/backoffice/socioForm\";\n }", "@GetMapping(\"/directorForm\")\n public String addDirectors(Model model) {\n\n model.addAttribute(\"newDirector\", new Director());\n return \"directorForm\";\n }", "private void creatingElements() {\n\t\ttf1 = new JTextField(20);\n\t\ttf2 = new JTextField(20);\n\t\ttf3 = new JTextField(20);\n\t\tJButton btn = new JButton(\"Add\");\n\t\tbtn.addActionListener(control);\n\t\tbtn.setActionCommand(\"add\");\n\t\t\n\t\tJPanel panel = new JPanel();\n\t\tpanel.add(tf1);\n\t\tpanel.add(tf2);\n\t\tpanel.add(btn);\n\t\tpanel.add(tf3);\n\t\t\n\t\tthis.add(panel);\n\t\t\n\t\tthis.validate();\n\t\tthis.repaint();\t\t\n\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n nuevoLote = new javax.swing.JDialog();\n etiquetaCodigoLote = new javax.swing.JLabel();\n campoCodigoLote = new javax.swing.JTextField();\n etiquetaCantidad = new javax.swing.JLabel();\n campoCantidad = new javax.swing.JFormattedTextField();\n botonGuardarLote = new javax.swing.JButton();\n botonCancelar = new javax.swing.JButton();\n panelCampos = new javax.swing.JPanel();\n etiquetaCodigoEgreso = new javax.swing.JLabel();\n campoCodigoEgreso = new javax.swing.JTextField();\n etiquetaCausaEspecial = new javax.swing.JLabel();\n campoCausaEspecial = new javax.swing.JTextField();\n etiquetaAlmacen = new javax.swing.JLabel();\n campoAlmacen = new javax.swing.JComboBox();\n etiquetaObservaciones = new javax.swing.JLabel();\n jspAreaTexto = new javax.swing.JScrollPane();\n campoObservaciones = new javax.swing.JTextArea();\n jspTabla = new javax.swing.JScrollPane();\n tablaLotesEgresados = new javax.swing.JTable();\n panelBotones = new javax.swing.JPanel();\n botonAgregarLote = new javax.swing.JButton();\n botonQuitarLote = new javax.swing.JButton();\n panelUltimo = new javax.swing.JPanel();\n botonRegistrarEgreso = new javax.swing.JButton();\n botonCancelarEgreso = new javax.swing.JButton();\n\n nuevoLote.setTitle(\"Agregar Lote\");\n nuevoLote.setMinimumSize(new java.awt.Dimension(259, 97));\n nuevoLote.setResizable(false);\n\n etiquetaCodigoLote.setText(\"Código del lote\");\n\n etiquetaCantidad.setText(\"Cantidad\");\n\n campoCantidad.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter()));\n\n botonGuardarLote.setText(\"Agregar\");\n botonGuardarLote.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n botonGuardarLoteActionPerformed(evt);\n }\n });\n\n botonCancelar.setText(\"Cancelar\");\n\n javax.swing.GroupLayout nuevoLoteLayout = new javax.swing.GroupLayout(nuevoLote.getContentPane());\n nuevoLote.getContentPane().setLayout(nuevoLoteLayout);\n nuevoLoteLayout.setHorizontalGroup(\n nuevoLoteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(nuevoLoteLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(nuevoLoteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(nuevoLoteLayout.createSequentialGroup()\n .addGroup(nuevoLoteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(etiquetaCantidad, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(etiquetaCodigoLote, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(nuevoLoteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(campoCodigoLote, javax.swing.GroupLayout.DEFAULT_SIZE, 164, Short.MAX_VALUE)\n .addComponent(campoCantidad)))\n .addGroup(nuevoLoteLayout.createSequentialGroup()\n .addGap(42, 42, 42)\n .addComponent(botonGuardarLote)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(botonCancelar)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n nuevoLoteLayout.setVerticalGroup(\n nuevoLoteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(nuevoLoteLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(nuevoLoteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(campoCodigoLote, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(etiquetaCodigoLote))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(nuevoLoteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(etiquetaCantidad)\n .addComponent(campoCantidad, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(nuevoLoteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(botonGuardarLote)\n .addComponent(botonCancelar))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n setBorder(javax.swing.BorderFactory.createTitledBorder(null, \"Egresar Lotes de Productos\", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Tahoma\", 1, 18))); // NOI18N\n setMaximumSize(new java.awt.Dimension(900, 500));\n setMinimumSize(new java.awt.Dimension(900, 500));\n setLayout(new java.awt.BorderLayout());\n\n panelCampos.setMaximumSize(new java.awt.Dimension(900, 173));\n panelCampos.setMinimumSize(new java.awt.Dimension(900, 173));\n\n etiquetaCodigoEgreso.setText(\"Código\");\n\n etiquetaCausaEspecial.setText(\"Causa Especial\");\n\n etiquetaAlmacen.setText(\"Almacén\");\n\n campoAlmacen.setModel(new vistas.modelos.AlmacenComboBoxModel());\n campoAlmacen.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n campoAlmacenItemStateChanged(evt);\n }\n });\n\n etiquetaObservaciones.setText(\"Observaciones\");\n\n campoObservaciones.setColumns(20);\n campoObservaciones.setRows(5);\n jspAreaTexto.setViewportView(campoObservaciones);\n\n javax.swing.GroupLayout panelCamposLayout = new javax.swing.GroupLayout(panelCampos);\n panelCampos.setLayout(panelCamposLayout);\n panelCamposLayout.setHorizontalGroup(\n panelCamposLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panelCamposLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(panelCamposLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panelCamposLayout.createSequentialGroup()\n .addGroup(panelCamposLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(etiquetaCausaEspecial, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(etiquetaAlmacen, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(etiquetaCodigoEgreso, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(panelCamposLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(campoAlmacen, 0, 181, Short.MAX_VALUE)\n .addComponent(campoCausaEspecial)\n .addComponent(campoCodigoEgreso)))\n .addGroup(panelCamposLayout.createSequentialGroup()\n .addComponent(etiquetaObservaciones)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jspAreaTexto, javax.swing.GroupLayout.PREFERRED_SIZE, 181, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(634, Short.MAX_VALUE))\n );\n panelCamposLayout.setVerticalGroup(\n panelCamposLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panelCamposLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(panelCamposLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(campoCodigoEgreso, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(etiquetaCodigoEgreso))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(panelCamposLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(campoCausaEspecial, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(etiquetaCausaEspecial))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(panelCamposLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(campoAlmacen, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(etiquetaAlmacen))\n .addGap(7, 7, 7)\n .addGroup(panelCamposLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(etiquetaObservaciones)\n .addComponent(jspAreaTexto, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n add(panelCampos, java.awt.BorderLayout.PAGE_START);\n\n tablaLotesEgresados.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null}\n },\n new String [] {\n \"Title 1\", \"Title 2\", \"Title 3\", \"Title 4\"\n }\n ));\n tablaLotesEgresados.setEnabled(false);\n tablaLotesEgresados.getTableHeader().setReorderingAllowed(false);\n jspTabla.setViewportView(tablaLotesEgresados);\n\n add(jspTabla, java.awt.BorderLayout.CENTER);\n\n botonAgregarLote.setText(\"Agregar Lote\");\n botonAgregarLote.setEnabled(false);\n botonAgregarLote.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n botonAgregarLoteActionPerformed(evt);\n }\n });\n\n botonQuitarLote.setText(\"Quitar Lote\");\n botonQuitarLote.setEnabled(false);\n botonQuitarLote.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n botonQuitarLoteActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout panelBotonesLayout = new javax.swing.GroupLayout(panelBotones);\n panelBotones.setLayout(panelBotonesLayout);\n panelBotonesLayout.setHorizontalGroup(\n panelBotonesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panelBotonesLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(panelBotonesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(botonQuitarLote, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(botonAgregarLote, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n panelBotonesLayout.setVerticalGroup(\n panelBotonesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panelBotonesLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(botonAgregarLote)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(botonQuitarLote)\n .addContainerGap(199, Short.MAX_VALUE))\n );\n\n add(panelBotones, java.awt.BorderLayout.LINE_START);\n\n panelUltimo.setMaximumSize(new java.awt.Dimension(900, 33));\n panelUltimo.setMinimumSize(new java.awt.Dimension(900, 33));\n panelUltimo.setPreferredSize(new java.awt.Dimension(900, 33));\n\n botonRegistrarEgreso.setText(\"Registrar Egreso\");\n botonRegistrarEgreso.setEnabled(false);\n botonRegistrarEgreso.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n botonRegistrarEgresoActionPerformed(evt);\n }\n });\n panelUltimo.add(botonRegistrarEgreso);\n\n botonCancelarEgreso.setText(\"Cancelar Egreso\");\n panelUltimo.add(botonCancelarEgreso);\n\n add(panelUltimo, java.awt.BorderLayout.PAGE_END);\n }", "public Result addNewRoomType() {\n\n DynamicForm dynamicform = Form.form().bindFromRequest();\n if (dynamicform.get(\"AdminAddRoom\") != null) {\n\n return ok(views.html.AddRoomType.render());\n }\n\n\n return ok(\"Something went wrong\");\n }", "@Override\r\n\tpublic void crearVehiculo() {\n\t\t\r\n\t}", "@RequestMapping(method = RequestMethod.GET)\n \tpublic String createForm(Model model, ForgotLoginForm form) {\n \t\tmodel.addAttribute(\"form\", form);\n \t\treturn \"forgotlogin/index\";\n \t}", "public NewJFrame() {\n initComponents();\n IniciarTabla();\n \n \n // ingreso al githup \n \n }", "private void initFormulario() {\n btnCadastro = findViewById(R.id.btnCadastro);\n editNome = findViewById(R.id.editNome);\n editEmail = findViewById(R.id.editEmail);\n editSenhaA = findViewById(R.id.editSenha);\n editSenhaB = findViewById(R.id.editSenhaB);\n chTermo = findViewById(R.id.chTermos);\n isFormOk = false;\n }", "public void addTeacherWindow(ControllerAdmin controllerAdmin) throws SQLException, ClassNotFoundException {\n JFrame addFrame = new JFrame();\n\n JButton jButtonCanceled = new JButton(\"Annuler\");\n jButtonCanceled.setBounds(380, 240, 100, 28);\n JButton jButtonAdd = new JButton(\"Ajouter\");\n jButtonAdd.setBounds(490, 240, 100, 28);\n\n JLabel jLabelIdStudent = new JLabel(\"Saissisez l'ID du professeur à créer : \");\n jLabelIdStudent.setBounds(20, 20, 250, 28);\n\n JTextField jTextFieldId = new JTextField();\n jTextFieldId.setBounds(280, 20, 200, 28);\n\n JLabel jLabelEmail = new JLabel(\"Saissisez l'Email du professeur : \");\n jLabelEmail.setBounds(20, 48, 250, 28);\n\n JTextField jTextFielEmailPart1 = new JTextField();\n jTextFielEmailPart1.setBounds(280, 48, 100, 28);\n JTextField jTextFielEmailPart2 = new JTextField(\"@ece.fr\");\n jTextFielEmailPart2.setBounds(380, 48, 100, 28);\n\n JLabel jLabelPassword = new JLabel(\"Saissisez le mot de passe du professeur : \");\n jLabelPassword.setBounds(20, 80, 280, 28);\n\n JTextField jTextFieldPassword = new JTextField();\n jTextFieldPassword.setBounds(280, 80, 200, 28);\n\n JLabel jLabelLastName = new JLabel(\"Saissisez le nom du professeur : \");\n jLabelLastName.setBounds(20, 108, 250, 28);\n\n JTextField jTextFieldLastName = new JTextField();\n jTextFieldLastName.setBounds(280, 108, 200, 28);\n\n JLabel jLabelFirstName = new JLabel(\"Saissisez le prénom du professeur : \");\n jLabelFirstName.setBounds(20, 140, 250, 28);\n\n JTextField jTextFieldFirstName = new JTextField();\n jTextFieldFirstName.setBounds(280, 140, 200, 28);\n\n JLabel jLabelSelectPromo = new JLabel(\"Selectionner une matière :\");\n jLabelSelectPromo.setBounds(20, 170, 250, 28);\n\n ArrayList<String> promotions = controllerAdmin.getAllIdCourse();\n String[] strCourse = new String[promotions.size()];\n for (int j = 0; j < promotions.size(); j++) {\n strCourse[j] = promotions.get(j);\n }\n JComboBox jComboBoxSelectCourse = new JComboBox(strCourse);\n jComboBoxSelectCourse.setBounds(280, 170, 100, 28);\n\n addFrame.add(jButtonCanceled);\n addFrame.add(jButtonAdd);\n addFrame.add(jLabelIdStudent);\n addFrame.add(jTextFieldId);\n addFrame.add(jLabelEmail);\n addFrame.add(jTextFielEmailPart1);\n addFrame.add(jTextFielEmailPart2);\n addFrame.add(jLabelPassword);\n addFrame.add(jTextFieldPassword);\n addFrame.add(jLabelLastName);\n addFrame.add(jTextFieldLastName);\n addFrame.add(jLabelFirstName);\n addFrame.add(jTextFieldFirstName);\n addFrame.add(jLabelSelectPromo);\n addFrame.add(jComboBoxSelectCourse);\n\n jButtonCanceled.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n addFrame.dispose();\n }\n });\n jButtonAdd.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n try {\n User user = new User();\n if (!jTextFieldId.getText().equals(\"\") && !jTextFielEmailPart1.getText().equals(\"\") && !jTextFieldFirstName.getText().equals(\"\") && !jTextFieldLastName.getText().equals(\"\")){\n if(!user.alreadyExist(jTextFieldId.getText())){\n Teacher teacher = new Teacher(jTextFieldId.getText(), jTextFielEmailPart1.getText() + jTextFielEmailPart2.getText(), jTextFieldPassword.getText(), jTextFieldLastName.getText(), jTextFieldFirstName.getText(), \"TEACHER\", Objects.requireNonNull(jComboBoxSelectCourse.getSelectedItem()).toString());\n teacher.createTeacher();\n }}\n else {\n addTeacherWindow(controllerAdmin);\n System.out.println(\"Erreur Id deja utilise\");\n AlertePopUp alertePopUp = new AlertePopUp();\n alertePopUp.AddFailId.setVisible(true);\n\n }\n } catch (SQLException | ClassNotFoundException throwables) {\n throwables.printStackTrace();\n }\n addFrame.dispose();\n }\n });\n\n addFrame.setTitle(\"Ajout d'un professeur\");\n addFrame.setSize(600,300);\n addFrame.setLocation(200, 100);\n addFrame.setLayout(null);\n addFrame.setVisible(true);\n }", "public FormularioCliente() {\n initComponents();\n }", "public void registrarMateria() {\n materia.setIdDepartamento(departamento);\n ejbFacade.create(materia);\n RequestContext requestContext = RequestContext.getCurrentInstance();\n requestContext.execute(\"PF('MateriaCreateDialog').hide()\");\n items = ejbFacade.findAll();\n departamento = new Departamento();\n materia = new Materia();\n\n FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_INFO, \"Información\", \"La materia se registró con éxito\");\n FacesContext.getCurrentInstance().addMessage(null, msg);\n requestContext.update(\"msg\");//Actualiza la etiqueta growl para que el mensaje pueda ser mostrado\n\n requestContext.update(\"MateriaListForm\");\n requestContext.update(\"MateriaCreateForm\");\n }", "public ServerskaForma() {\n initComponents();\n \n \n \n }", "private void submitNewUser() {\n\t\tboolean validationFlag = true;\n\t\tArrayList<HashMap<String, String>> signUpFields = new ArrayList<HashMap<String, String>>();\n\t\tint size = lnr_form.getChildCount();\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tLinearLayout v = (LinearLayout) lnr_form.getChildAt(i);\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tHashMap<String, String> field = (HashMap<String, String>) v.getTag();\n\n\t\t\tIjoomerEditText edtValue = null;\n\t\t\tSpinner spnrValue = null;\n\n\t\t\tif (field != null) {\n\t\t\t\tif (field.get(TYPE).equals(TEXT)) {\n\t\t\t\t\tedtValue = (IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrEdit)).findViewById(R.id.txtValue);\n\t\t\t\t} else if (field.get(TYPE).equals(TEXTAREA)) {\n\t\t\t\t\tedtValue = (IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrEditArea)).findViewById(R.id.txtValue);\n\t\t\t\t} else if (field.get(TYPE).equals(PASSWORD)) {\n\t\t\t\t\tedtValue = (IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrPassword)).findViewById(R.id.txtValue);\n\t\t\t\t} else if (field.get(TYPE).equals(MAP)) {\n\t\t\t\t\tedtValue = (IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrEditMap)).findViewById(R.id.txtValue);\n\t\t\t\t} else if (field.get(\"type\").equals(LABEL)) {\n\t\t\t\t\tedtValue = (IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrLabel)).findViewById(R.id.txtValue);\n\t\t\t\t} else if (field.get(TYPE).equals(DATE)) {\n\t\t\t\t\tedtValue = (IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrEditClickable)).findViewById(R.id.txtValue);\n\n\t\t\t\t\tif (edtValue.getText().toString().trim().length() > 0) {\n\t\t\t\t\t\tif (!IjoomerUtilities.birthdateValidator(edtValue.getText().toString().trim())) {\n\t\t\t\t\t\t\tedtValue.setFocusable(true);\n\t\t\t\t\t\t\tedtValue.setError(getString(R.string.validation_invalid_birth_date));\n\t\t\t\t\t\t\tvalidationFlag = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (field.get(TYPE).equals(MULTIPLESELECT)) {\n\t\t\t\t\tedtValue = (IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrEditClickable)).findViewById(R.id.txtValue);\n\t\t\t\t}\n\t\t\t\tif (field.get(TYPE).equals(TIME)) {\n\t\t\t\t\tedtValue = (IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrEditClickable)).findViewById(R.id.txtValue);\n\t\t\t\t}\n\n\t\t\t\tif (field.get(TYPE).equals(SELECT)) {\n\t\t\t\t\tspnrValue = (Spinner) ((LinearLayout) v.findViewById(R.id.lnrSpin)).findViewById(R.id.txtValue);\n\t\t\t\t\tfield.put(VALUE, spnrValue.getSelectedItem().toString());\n\t\t\t\t\tsignUpFields.add(field);\n\t\t\t\t} else if (field.get(TYPE).equals(PASSWORD) && field.get(NAME).equals(\"Retype Password\")) {\n\t\t\t\t\tint len = lnr_form.getChildCount();\n\t\t\t\t\tfor (int j = 0; j < len; j++) {\n\t\t\t\t\t\tLinearLayout view = (LinearLayout) lnr_form.getChildAt(i);\n\t\t\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\t\t\tHashMap<String, String> row = (HashMap<String, String>) view.getTag();\n\t\t\t\t\t\tif (row.get(TYPE).equals(PASSWORD) && field.get(NAME).equals(\"Password\")) {\n\t\t\t\t\t\t\tString password = ((IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrPassword)).findViewById(R.id.txtValue)).getText().toString();\n\t\t\t\t\t\t\tif (password.equals(edtValue.getText().toString())) {\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tedtValue.setError(getString(R.string.validation_password_not_match));\n\t\t\t\t\t\t\t\tvalidationFlag = 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}\n\t\t\t\t} else if (edtValue != null && edtValue.getText().toString().trim().length() <= 0 && (field.get(REQUIRED).equals(\"1\"))) {\n\t\t\t\t\tedtValue.setError(getString(R.string.validation_value_required));\n\t\t\t\t\tvalidationFlag = false;\n\t\t\t\t} else {\n\t\t\t\t\tfield.put(VALUE, edtValue.getText().toString().trim());\n\t\t\t\t\tsignUpFields.add(field);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (validationFlag) {\n\t\t\tfinal SeekBar proSeekBar = IjoomerUtilities.getLoadingDialog(getString(R.string.dialog_loading_register_newuser));\n\t\t\tnew IjoomerRegistration(this).submitNewUser(signUpFields, new WebCallListener() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onProgressUpdate(int progressCount) {\n\t\t\t\t\tproSeekBar.setProgress(progressCount);\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onCallComplete(final int responseCode, String errorMessage, ArrayList<HashMap<String, String>> data1, Object data2) {\n\t\t\t\t\tif (responseCode == 200) {\n\t\t\t\t\t\tIjoomerUtilities.getCustomOkDialog(getString(R.string.dialog_loading_profile), getString(R.string.registration_successfully), getString(R.string.ok),\n\t\t\t\t\t\t\t\tR.layout.ijoomer_ok_dialog, new CustomAlertNeutral() {\n\n\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\tpublic void NeutralMethod() {\n\n\t\t\t\t\t\t\t\t\t\tIntent intent = new Intent(\"clearStackActivity\");\n\t\t\t\t\t\t\t\t\t\tintent.setType(\"text/plain\");\n\t\t\t\t\t\t\t\t\t\tsendBroadcast(intent);\n\t\t\t\t\t\t\t\t\t\tIjoomerWebService.cookies = null;\n\n\t\t\t\t\t\t\t\t\t\tloadNew(IjoomerLoginActivity.class, IPropertyRegistrationActivity.this, true);\n\t\t\t\t\t\t\t\t\t\tfinish();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tIjoomerUtilities.getCustomOkDialog(getString(R.string.dialog_loading_profile),\n\t\t\t\t\t\t\t\tgetString(getResources().getIdentifier(\"code\" + responseCode, \"string\", getPackageName())), getString(R.string.ok), R.layout.ijoomer_ok_dialog,\n\t\t\t\t\t\t\t\tnew CustomAlertNeutral() {\n\n\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\tpublic void NeutralMethod() {\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}", "private void initFormCreateMode() {\n initSpinnerSelectionChamps();\n //TODO\n }", "public NewConsultasS() {\n initComponents();\n limpiar();\n bloquear();\n }", "public String crea() {\n c.setId(0);\n clienteDAO.crea(c); \n //Post-Redirect-Get\n return \"visualiza?faces-redirect=true&id=\"+c.getId();\n }", "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 }", "public telaAddPedidoII() {\n initComponents();\n }", "public CrearGrupos() throws SQLException {\n initComponents();\n setTitle(\"Crear Grupos\");\n setSize(643, 450);\n setLocationRelativeTo(this);\n cargarModelo();\n }", "public VistaAllLotes() {\n initComponents();\n controlFinca = new ControlFincas();\n controlLote = new ControLotes();\n ListamodeloLotes = new ArrayList<>();\n EncabezadoTblLotes = new String[]{\n \"No\",\"Bloque\", \"Número\", \"Área Total\", \"Fuente Hidrica\", \"Modificar\", \"Eliminar\"\n };\n lblId_Bloque.setVisible(false);\n modeloLotes = new ModeloLotes();\n idFinca = \"\";\n AreaBloque = \"\";\n fila = -1;\n CargarListaFincas();\n CargarListaFuentesHidricas();\n LimpiarFomulario();\n InicializarTblLotes();\n }", "public MostraVenta(String idtrasp, Object[][] clienteM1, Object[][] vendedorM1, String idmarc, String responsable,ListaTraspaso panel)\n{\n this.padre = panel;\n this.clienteM = clienteM1;\n this.vendedorM = vendedorM1;\n this.idtraspaso= idtrasp;\n this.idmarca=idmarc;\n//this.tipoenvioM = new String[]{\"INGRESO\", \"TRASPASO\"};\n String tituloTabla =\"Detalle Venta\";\n // padre=panel;\n String nombreBoton1 = \"Registrar\";\n String nombreBoton2 = \"Cancelar\";\n // String nombreBoton3 = \"Eliminar Empresa\";\n\n setId(\"win-NuevaEmpresaForm1\");\n setTitle(tituloTabla);\n setWidth(400);\n setMinWidth(ANCHO);\n setHeight(250);\n setLayout(new FitLayout());\n setPaddings(WINDOW_PADDING);\n setButtonAlign(Position.CENTER);\n setCloseAction(Window.CLOSE);\n setPlain(true);\n\n but_aceptar = new Button(nombreBoton1);\n but_cancelar = new Button(nombreBoton2);\n // addButton(but_aceptarv);\n addButton(but_aceptar);\n addButton(but_cancelar);\n\n formPanelCliente = new FormPanel();\n formPanelCliente.setBaseCls(\"x-plain\");\n //formPanelCliente.setLabelWidth(130);\n formPanelCliente.setUrl(\"save-form.php\");\n formPanelCliente.setWidth(ANCHO);\n formPanelCliente.setHeight(ALTO);\n formPanelCliente.setLabelAlign(Position.LEFT);\n\n formPanelCliente.setAutoWidth(true);\n\n\ndat_fecha1 = new DateField(\"Fecha\", \"d-m-Y\");\n fechahoy = new Date();\n dat_fecha1.setValue(fechahoy);\n dat_fecha1.setReadOnly(true);\n\ncom_vendedor = new ComboBox(\"Vendedor al que enviamos\", \"idempleado\");\ncom_cliente = new ComboBox(\"Clientes\", \"idcliente\");\n//com_tipo = new ComboBox(\"Tipo Envio\", \"idtipo\");\n initValues1();\n\n\n\n formPanelCliente.add(dat_fecha1);\n// formPanelCliente.add(com_tipo);\n// formPanelCliente.add(tex_nombreC);\n// formPanelCliente.add(tex_codigoBarra);\n // formPanelCliente.add(tex_codigoC);\nformPanelCliente.add(com_vendedor);\n formPanelCliente.add(com_cliente);\n add(formPanelCliente);\nanadirListenersTexfield();\n addListeners();\n\n }", "@GetMapping(\"/addPharmacist\")\n public String pharmacistForm(Model model) {\n model.addAttribute(\"pharmacist\", new Pharmacist());\n return \"addPharmacist\";\n }", "@FXML\r\n private void crearSolicitud() {\r\n try {\r\n //Carga la vista de crear solicitud rma\r\n FXMLLoader loader = new FXMLLoader();\r\n loader.setLocation(Principal.class.getResource(\"/vista/CrearSolicitud.fxml\"));\r\n BorderPane vistaCrear = (BorderPane) loader.load();\r\n\r\n //Crea un dialogo para mostrar la vista\r\n Stage dialogo = new Stage();\r\n dialogo.setTitle(\"Solicitud RMA\");\r\n dialogo.initModality(Modality.WINDOW_MODAL);\r\n dialogo.initOwner(primerStage);\r\n Scene escena = new Scene(vistaCrear);\r\n dialogo.setScene(escena);\r\n\r\n //Annadir controlador y datos\r\n ControladorCrearSolicitud controlador = loader.getController();\r\n controlador.setDialog(dialogo, primerStage);\r\n\r\n //Carga el numero de Referencia\r\n int numReferencia = DAORma.crearReferencia();\r\n\r\n //Modifica el dialogo para que no se pueda cambiar el tamaño y lo muestra\r\n dialogo.setResizable(false);\r\n dialogo.showAndWait();\r\n\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }", "public TelaCadastrarProduto() {\n initComponents();\n entidade = new Produto();\n setRepositorio(RepositorioBuilder.getProdutoRepositorio());\n grupo.add(jRadioButton1);\n grupo.add(jRadioButton2);\n }", "public tambahtoko() {\n initComponents();\n tampilkan();\n form_awal();\n }", "public FormCadastroAutomovel() {\n initComponents();\n }", "private void createForm(ArrayList<HashMap<String, String>> data) {\n\t\tLayoutInflater inflater = LayoutInflater.from(IPropertyRegistrationActivity.this);\n\t\tLinearLayout.LayoutParams params = new LinearLayout.LayoutParams(android.widget.LinearLayout.LayoutParams.MATCH_PARENT,\n\t\t\t\tandroid.widget.LinearLayout.LayoutParams.WRAP_CONTENT);\n\t\tparams.topMargin = 10;\n\n\t\tfields = data;\n\t\tLinearLayout layout = null;\n\t\tint len = fields.size();\n\t\tfor (int j = 0; j < len; j++) {\n\t\t\tfinal HashMap<String, String> field = fields.get(j);\n\t\t\tView fieldView = inflater.inflate(R.layout.iproperty_registration_dynamic_view_item, null);\n\n\t\t\tif (field.get(TYPE).equals(LABEL)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrLabel));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t} else if (field.get(TYPE).equals(PASSWORD)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEdit));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t\tif (field.get(NAME).contains(getString(R.string.phone)) || field.get(NAME).contains(getString(R.string.year))) {\n\t\t\t\t\tedit.setInputType(InputType.TYPE_CLASS_NUMBER);\n\t\t\t\t} else if (field.get(NAME).contains(getString(R.string.website)) || field.get(NAME).contains(getString(R.string.email))) {\n\t\t\t\t\tedit.setInputType(InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS);\n\t\t\t\t}\n\t\t\t} else if (field.get(TYPE).equals(TEXT)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEdit));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t\tif (field.get(NAME).contains(getString(R.string.phone)) || field.get(NAME).contains(getString(R.string.year))) {\n\t\t\t\t\tedit.setInputType(InputType.TYPE_CLASS_NUMBER);\n\t\t\t\t} else if (field.get(NAME).contains(getString(R.string.website)) || field.get(NAME).contains(getString(R.string.email))) {\n\t\t\t\t\tedit.setInputType(InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS);\n\t\t\t\t}\n\t\t\t} else if (field.get(TYPE).equals(TEXTAREA)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEditArea));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\n\t\t\t\tif (field.get(VALUE).toString().trim().length() > 0) {\n\t\t\t\t\tedit.setText(field.get(VALUE));\n\t\t\t\t} else {\n\t\t\t\t}\n\n\t\t\t} else if (field.get(TYPE).equals(MAP)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tfinal ImageView imgMap;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEditMap));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t\timgMap = ((ImageView) layout.findViewById(R.id.imgMap));\n\t\t\t\tif (field.get(NAME).equalsIgnoreCase(getString(R.string.state))) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tAddress address = IjoomerUtilities.getAddressFromLatLong(0, 0);\n\t\t\t\t\t\tedit.setText(address.getAdminArea().replace(address.getCountryName() == null ? \"\" : address.getCountryName(), \"\")\n\t\t\t\t\t\t\t\t.replace(address.getPostalCode() == null ? \"\" : address.getPostalCode(), \"\"));\n\t\t\t\t\t} catch (Throwable e) {\n\t\t\t\t\t\tedit.setText(\"\");\n\t\t\t\t\t}\n\t\t\t\t} else if (field.get(NAME).equalsIgnoreCase(getString(R.string.city_town))) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tAddress address = IjoomerUtilities.getAddressFromLatLong(0, 0);\n\t\t\t\t\t\tedit.setText(address.getSubAdminArea());\n\t\t\t\t\t} catch (Throwable e) {\n\t\t\t\t\t\tedit.setText(\"\");\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\timgMap.setOnClickListener(new OnClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\teditMap = edit;\n\t\t\t\t\t\tIntent intent = new Intent(IPropertyRegistrationActivity.this, IjoomerMapAddress.class);\n\t\t\t\t\t\tstartActivityForResult(intent, GET_ADDRESS_FROM_MAP);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t} else if (field.get(TYPE).equals(SELECT)) {\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrSpin));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tfinal Spinner spn;\n\t\t\t\tspn = ((Spinner) layout.findViewById(R.id.txtValue));\n\t\t\t\tspn.setAdapter(IjoomerUtilities.getSpinnerAdapter(field));\n\t\t\t\tif (field.get(NAME).equalsIgnoreCase(getString(R.string.country))) {\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tAddress address = IjoomerUtilities.getAddressFromLatLong(0, 0);\n\t\t\t\t\t\tString country = address.getCountryName();\n\t\t\t\t\t\tint selectedIndex = 0;\n\t\t\t\t\t\tJSONArray jsonArray = null;\n\n\t\t\t\t\t\tjsonArray = new JSONArray(field.get(OPTIONS));\n\t\t\t\t\t\tint optionSize = jsonArray.length();\n\t\t\t\t\t\tfor (int k = 0; k < optionSize; k++) {\n\t\t\t\t\t\t\tJSONObject options = (JSONObject) jsonArray.get(k);\n\n\t\t\t\t\t\t\tif (options.getString(VALUE).equalsIgnoreCase(country)) {\n\t\t\t\t\t\t\t\tselectedIndex = k;\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\tspn.setSelection(selectedIndex);\n\t\t\t\t\t} catch (Throwable e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\tspn.setSelection(0);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} else if (field.get(TYPE).equals(DATE)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEditClickable));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t\tedit.setOnClickListener(new OnClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(final View v) {\n\t\t\t\t\t\tIjoomerUtilities.getDateDialog(((IjoomerEditText) v).getText().toString(), true, new CustomClickListner() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void onClick(String value) {\n\t\t\t\t\t\t\t\t((IjoomerEditText) v).setText(value);\n\t\t\t\t\t\t\t\t((IjoomerEditText) v).setError(null);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t} else if (field.get(TYPE).equals(TIME)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEditClickable));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t\tedit.setOnClickListener(new OnClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(final View v) {\n\t\t\t\t\t\tIjoomerUtilities.getTimeDialog(((IjoomerEditText) v).getText().toString(), new CustomClickListner() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void onClick(String value) {\n\t\t\t\t\t\t\t\t((IjoomerEditText) v).setText(value);\n\t\t\t\t\t\t\t\t((IjoomerEditText) v).setError(null);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t} else if (field.get(TYPE).equals(MULTIPLESELECT)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEditClickable));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t\tedit.setOnClickListener(new OnClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(final View v) {\n\t\t\t\t\t\tIjoomerUtilities.getMultiSelectionDialog(field.get(NAME), field.get(OPTIONS), ((IjoomerEditText) v).getText().toString(), new CustomClickListner() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void onClick(String value) {\n\t\t\t\t\t\t\t\t((IjoomerEditText) v).setText(value);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (field.get(REQUIRED).equalsIgnoreCase(\"1\")) {\n\t\t\t\t((IjoomerTextView) layout.findViewById(R.id.txtLable)).setText(field.get(NAME) + \" *\");\n\t\t\t} else {\n\t\t\t\t((IjoomerTextView) layout.findViewById(R.id.txtLable)).setText(field.get(NAME));\n\t\t\t}\n\n\t\t\t((LinearLayout) fieldView.findViewById(R.id.lnrEdit)).setVisibility(View.GONE);\n\t\t\t((LinearLayout) fieldView.findViewById(R.id.lnrEditArea)).setVisibility(View.GONE);\n\t\t\t((LinearLayout) fieldView.findViewById(R.id.lnrSpin)).setVisibility(View.GONE);\n\t\t\t((LinearLayout) fieldView.findViewById(R.id.lnrEditClickable)).setVisibility(View.GONE);\n\t\t\t((LinearLayout) fieldView.findViewById(R.id.lnrLabel)).setVisibility(View.GONE);\n\n\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrReadOnly));\n\t\t\tlayout.setVisibility(View.VISIBLE);\n\n\t\t\t((IjoomerTextView) layout.findViewById(R.id.txtLable)).setText(field.get(NAME));\n\t\t\t((IjoomerEditText) layout.findViewById(R.id.txtValue)).setText(field.get(VALUE));\n\t\t\tfieldView.setTag(field);\n\t\t\tlnr_form.addView(fieldView, params);\n\t\t}\n\t}", "@RequestMapping(value = { \"/new\"}, method = RequestMethod.GET)\n\tpublic String newEntity(ModelMap model) {\n\t\tENTITY entity = createEntity();\n\n\t\tmodel.addAttribute(\"entity\", entity);\n\t\tmodel.addAttribute(\"edit\", false);\n\t\tmodel.addAttribute(\"loggedinuser\", getPrincipal());\n\t\treturn viewBaseLocation + \"/form\";\n\t}", "public newRelationship() {\n initComponents();\n }", "public frmAddIncidencias() {\n initComponents();\n }", "public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }", "@RequestMapping(\"/recipe/new\")\n public String newRecipe(Model model){\n model.addAttribute(\"recipe\", new RecipeCommand());\n \n return \"recipe/recipeForm\";\n }", "@Override\n\tpublic void createForm(ERForm form) {\n\t\t\tString sql = \"insert into project1.reimbursementInfo (userName, fullName, thedate, eventstartdate, thelocation, description, thecost, gradingformat, passingpercentage, eventtype, filename,status,reason) values (?,?,?,?,?,?,?,?,?,?,?,?,?);\";\n\t\t\ttry {PreparedStatement stmt = conn.prepareCall(sql);\n\t\t\t//RID should auto increment, so this isnt necessary\n\t\t\t\n\t\t\tstmt.setString(1, form.getUserName());\n\t\t\tstmt.setString(2, form.getFullName());\n\t\t\tstmt.setDate(3, Date.valueOf(form.getTheDate()));\n\t\t\tstmt.setDate(4, Date.valueOf(form.getEventStartDate()));\n\t\t\tstmt.setString(5, form.getTheLocation());\n\t\t\tstmt.setString(6, form.getDescription());\n\t\t\tstmt.setDouble(7, form.getTheCost());\n\t\t\tstmt.setString(8, form.getGradingFormat());\n\t\t\tstmt.setString(9, form.getPassingPercentage());\n\t\t\tstmt.setString(10, form.getEventType());\n\t\t\tstmt.setString(11, form.getFileName());\n\t\t\tstmt.setString(12, \"pending\");\n\t\t\tstmt.setString(13, \"\");\n\t\t\tstmt.executeUpdate();\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public NewUser() {\n initComponents();\n }", "public CrearQuedadaVista() {\n }", "public frmVerzamelingBeheer() {\n try {\n initComponents();\n \n lblId.setVisible(false);\n\n pnlEdit.setVisible(false);\n\n for (VerzamelingsType type : TypeService.GetAllTypes()) {\n cmbType.addItem(new VerzamelingsType(type.getId(), type.getNaam()));\n cmbEditType.addItem(new VerzamelingsType(type.getId(), type.getNaam()));\n }\n\n \n for (Categorie categorie : CategorieService.GetAllCategories()) {\n cmbCategorie.addItem(new Categorie(categorie.getId(), categorie.getNaam()));\n cmbEditCategorie.addItem(new Categorie(categorie.getId(), categorie.getNaam()));\n }\n \n //vertaling voor JOptionpane\n UIManager.put(\"OptionPane.cancelButtonText\", \"Annuleren\");\n UIManager.put(\"OptionPane.noButtonText\", \"Nee\");\n UIManager.put(\"OptionPane.okButtonText\", \"Oke\");\n UIManager.put(\"OptionPane.yesButtonText\", \"Ja\");\n \n this.setTitle(\"Verzamelingen beheren - Verzamelingenbeheer\");\n \n ShowEditItems(false);\n RefreshList();\n }\n catch (ExceptionInInitializerError ex)\n {\n JOptionPane.showMessageDialog(null, \"Er kan geen verbinding worden gemaakt met de database (\" + ex.getMessage() + \").\", \"Fout\", ERROR_MESSAGE);\n System.exit(1);\n }\n\n }", "private void createNewListTextField() {\n\t\tjpIntroduceNameList = new JPanel();\n\t\tjpIntroduceNameList.setOpaque(false);\n\t\tjertfTextList = new JERoundTextField(15,15,200);\n\t\tjertfTextList.setVisible(true);\n\t\tjpIntroduceNameList.setVisible(false);\n\t\tjpIntroduceNameList.add(jertfTextList);\n\t}", "public createNew(){\n\t\tsuper(\"Create\"); // title for the frame\n\t\t//layout as null\n\t\tgetContentPane().setLayout(null);\n\t\t//get the background image\n\t\ttry {\n\t\t\tbackground =\n\t\t\t\t\tnew ImageIcon (ImageIO.read(getClass().getResource(\"Wallpaper.jpg\")));\n\t\t}//Catch for file error\n\t\tcatch (IOException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tJOptionPane.showMessageDialog(null, \n\t\t\t\t\t\"ERROR: File(s) Not Found\\n Please Check Your File Format\\n\"\n\t\t\t\t\t\t\t+ \"and The File Name!\");\n\t\t}\n\t\t//Initialize all of the compenents \n\t\tlblBackground = new JLabel (background);\n\t\tlblTitle = new JLabel (\"Create Menu\");\n\t\tlblTitle.setFont(new Font(\"ARIAL\",Font.ITALIC, 30));\n\t\tlblName = new JLabel(\"Please Enter Your First Name.\");\n\t\tlblLastName= new JLabel (\"Please Enter Your Last Name.\");\n\t\tlblPhoneNumber = new JLabel (\"Please Enter Your Phone Number.\");\n\t\tlblAddress = new JLabel (\"Please Enter Your Address.\");\n\t\tlblMiddle = new JLabel (\"Please Enter Your Middle Name (Optional).\");\n\t\tbtnCreate = new JButton (\"Create\");\n\t\tbtnBack = new JButton (\"Back\");\n\t\t//set the font\n\t\tlblName.setFont(new Font(\"Times New Roman\",Font.BOLD, 18));\n\t\tlblLastName.setFont(new Font(\"Times New Roman\",Font.BOLD, 18));\n\t\tlblPhoneNumber.setFont(new Font(\"Times New Roman\",Font.BOLD, 18));\n\t\tlblAddress.setFont(new Font(\"Times New Roman\",Font.BOLD, 18));\n\t\tlblMiddle.setFont(new Font(\"Times New Roman\",Font.BOLD, 18));\n\n\t\t//add action listener\n\t\tbtnCreate.addActionListener(this);\n\t\tbtnBack.addActionListener(this);\n\t\t//set bounds for all the components\n\t\tbtnCreate.setBounds(393, 594, 220, 36);\n\t\ttxtMiddle.setBounds(333, 249, 342, 36);\n\t\ttxtName.setBounds(333, 158, 342, 36);\n\t\ttxtLastName.setBounds(333, 339, 342, 36);\n\t\ttxtPhoneNumber.setBounds(333, 429, 342, 36);\n\t\ttxtAddress.setBounds(333, 511, 342, 36);\n\t\tbtnBack.setBounds(6,716,64,36);\n\t\tlblTitle.setBounds(417, 0, 182, 50);\n\t\tlblMiddle.setBounds(333, 201, 342, 36);\n\t\tlblName.setBounds(387, 110, 239, 36);\n\t\tlblLastName.setBounds(387, 297, 239, 36);\n\t\tlblPhoneNumber.setBounds(369, 387, 269, 36);\n\t\tlblAddress.setBounds(393, 477, 215, 30);\n\t\tbtnBack.setBounds(6,716,64,36);\n\t\tlblTitle.setBounds(417, 0, 182, 50);\n\t\tlblBackground.setBounds(0, 0, 1000, 1000);\n\t\t//add components to frame\n\t\tgetContentPane().add(btnCreate);\n\t\tgetContentPane().add(txtMiddle);\n\t\tgetContentPane().add(txtLastName);\n\t\tgetContentPane().add(txtAddress);\n\t\tgetContentPane().add(txtPhoneNumber);\n\t\tgetContentPane().add(txtName);\n\t\tgetContentPane().add(lblMiddle);\n\t\tgetContentPane().add(lblLastName);\n\t\tgetContentPane().add(lblAddress);\n\t\tgetContentPane().add(lblPhoneNumber);\n\t\tgetContentPane().add(lblName);\n\t\tgetContentPane().add(btnBack);\n\t\tgetContentPane().add(lblTitle);\n\t\tgetContentPane().add(lblBackground);\n\t\t//set size, visible and action for close\n\t\tsetSize(1000,1000);\n\t\tsetVisible(true);\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\n\n\t}", "public Frame_Ajouter_Administrateur() {\n initComponents();\n }", "@PostMapping(\"/site_escalade/{idSiteEscalade}/secteur/{idSecteur}/voie/{idVoie}/longueur/create\")\r\n\tpublic String ajouterLongueur(Model model,@PathVariable(\"idSiteEscalade\") long idSiteEscalade,@PathVariable(\"idSecteur\") long idSecteur, @PathVariable(\"idVoie\") long idVoie, @ModelAttribute(\"longueurForm\") LongueurForm longueurForm,\r\n\t\t\tBindingResult result, final RedirectAttributes redirectAttributes) {\r\n\t\t\r\n\t\tUserGrimp usr = (UserGrimp) SecurityContextHolder.getContext().getAuthentication().getPrincipal();\r\n\t\tmodel.addAttribute(\"usr\", usr);\r\n\t\t\r\n\t\tVoie voie = voieRepository.findById(idVoie).get();\r\n\t\tmodel.addAttribute(\"voie\", voie);\r\n\t\t\r\n\t\tSecteur secteur = secteurRepository.findById(idSecteur).get();\r\n\t\tmodel.addAttribute(\"secteur\", secteur);\r\n\t\t\r\n\t\tSiteEscalade site = siteEscaladeRepository.findById(idSiteEscalade).get();\r\n\t\tmodel.addAttribute(\"site\", site);\r\n\t\t\t\t\r\n\t\t\tif (result.hasErrors()) {\r\n\t\t\t\tmodel.addAttribute(\"longueurForm\", longueurForm);\r\n\t\t\t\treturn \"formLongueur\";\r\n\t\t\t}\r\n\t\telse {\r\n\t\t\tLongueur newLongueur = new Longueur();\r\n\t\t\tnewLongueur.setDistance(longueurForm.getDistance());\r\n\t\t\tnewLongueur.setHauteur(longueurForm.getHauteur());\r\n\t\t\tVoie voies = voieRepository.findById(idVoie).get();\r\n\t\t\tnewLongueur.setVoie(voies);\r\n\t\t\tlongueurRepository.save(newLongueur);\r\n\t\t\tlogger.info(\"l'utilisateur \"+usr.getPseudo()+\" a créer une nouvelle longueur n°\"+newLongueur.getIdLongueur()+\" pour la voie n°\"+voie.getIdVoie());\r\n\t\t}\r\n\t\treturn\"redirect:/site_escalade/\"+idSiteEscalade+\"/secteur/\"+idSecteur+\"/voie/\"+ idVoie;\t\r\n\t}" ]
[ "0.69777775", "0.6718549", "0.66588974", "0.65665793", "0.654801", "0.65197074", "0.6435355", "0.6430779", "0.6414412", "0.6386485", "0.62747246", "0.6264712", "0.62329197", "0.6220089", "0.6209478", "0.6168929", "0.6168385", "0.6151237", "0.6134649", "0.61317855", "0.6119535", "0.6088283", "0.60523486", "0.60489327", "0.604355", "0.6043317", "0.6041032", "0.60291004", "0.602488", "0.6024855", "0.60176873", "0.6016729", "0.60058624", "0.59932536", "0.5986086", "0.59761155", "0.5973662", "0.596018", "0.59511244", "0.59447277", "0.5942452", "0.5942073", "0.59386826", "0.5938622", "0.5933294", "0.5929325", "0.59112555", "0.5910691", "0.5904426", "0.59029853", "0.59017575", "0.59015644", "0.589201", "0.58797175", "0.5878342", "0.58712876", "0.58647496", "0.5860715", "0.5858505", "0.5852849", "0.5849132", "0.58459693", "0.584281", "0.5842727", "0.5841452", "0.5840958", "0.5840524", "0.5837931", "0.5837841", "0.5831441", "0.58293676", "0.58173364", "0.5816319", "0.58161664", "0.58137614", "0.58122516", "0.58090705", "0.58085036", "0.58047104", "0.57926583", "0.57841367", "0.5778476", "0.57736933", "0.57655126", "0.57652485", "0.5755818", "0.57521033", "0.57426953", "0.5738694", "0.5733209", "0.57223344", "0.5717737", "0.5710439", "0.57079923", "0.5707814", "0.57071036", "0.5706789", "0.5706315", "0.57054126", "0.57012904" ]
0.59473544
39
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel12 = new javax.swing.JLabel(); jLabel13 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); jLabel9 = new javax.swing.JLabel(); jLabel6 = new javax.swing.JLabel(); jLabel7 = new javax.swing.JLabel(); jLabel10 = new javax.swing.JLabel(); jLabel11 = new javax.swing.JLabel(); jLabel14 = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jPanel1.setBackground(new java.awt.Color(255, 255, 255)); jLabel1.setFont(new java.awt.Font("Poppins Black", 0, 18)); // NOI18N jLabel1.setText("Lentejas"); jLabel3.setFont(new java.awt.Font("Poppins", 0, 12)); // NOI18N jLabel3.setText("Aporta buenas dosis de proteínas y fibra, así como una gran variedad de minerales, algunos en cantidades muy superiores a otros alimentos"); jLabel12.setFont(new java.awt.Font("Poppins", 0, 12)); // NOI18N jLabel12.setText("Las lentejas contienen un 23,5% de proteínas, pero las proteínas de la lenteja son pobres en metionina y cistina, lo que limita"); jLabel13.setFont(new java.awt.Font("Poppins", 0, 12)); // NOI18N jLabel13.setText("limita su aprovechamiento por el organismo, por lo que conviene consumir a lo largo del día otros alimentos. "); jLabel4.setFont(new java.awt.Font("Poppins", 1, 14)); // NOI18N jLabel4.setText("Beneficios:"); jLabel5.setFont(new java.awt.Font("Poppins", 0, 12)); // NOI18N jLabel5.setText("•\tPocas calorías y muy nutritivas: Son un alimento ligero que aporta solo 250 calorías por plato (unos 80 gramos de lentejas"); jLabel9.setFont(new java.awt.Font("Poppins", 0, 12)); // NOI18N jLabel9.setText("secas, la ración habitual por persona) haciéndolas apropiadas para menús de control de peso"); jLabel6.setFont(new java.awt.Font("Poppins", 0, 12)); // NOI18N jLabel6.setText("•\tFavorece el sistema nervioso: Debido a su contenido en vitaminas del grupo B, en especial la B1, B2, B5, B6 y ácido fólico."); jLabel7.setFont(new java.awt.Font("Poppins", 0, 12)); // NOI18N jLabel7.setText("•\tControl del colesterol: La fibra soluble e insoluble de las lentejas (un 10% de su peso) absorbe el colesterol, y evita que llegue al "); jLabel10.setFont(new java.awt.Font("Poppins", 0, 12)); // NOI18N jLabel10.setText("Con la cocción se pierde parte de su aporte, pero si se toman germinadas se ve incrementado."); jLabel11.setFont(new java.awt.Font("Poppins", 0, 12)); // NOI18N jLabel11.setText("flujo sanguíneo. Además, las lentejas contienen fitatos y antioxidantes con efecto anticolesterolemiante, "); jLabel14.setFont(new java.awt.Font("Poppins", 0, 12)); // NOI18N jLabel14.setText("mejorando el metabolismo celular y la utilización de ácidos grasos como fuente de energía "); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jLabel1) .addContainerGap(958, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addGap(0, 0, Short.MAX_VALUE) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel13) .addComponent(jLabel3) .addComponent(jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, 802, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel4) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addGap(23, 23, 23) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 799, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 800, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(53, 53, 53)) .addComponent(jLabel9, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 624, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 624, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(33, 33, 33))) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel7, javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addComponent(jLabel14, javax.swing.GroupLayout.PREFERRED_SIZE, 624, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(43, 43, 43)) .addComponent(jLabel11, javax.swing.GroupLayout.Alignment.TRAILING)))))) .addGap(67, 67, 67)))) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(36, 36, 36) .addComponent(jLabel3) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jLabel12) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel13) .addGap(39, 39, 39) .addComponent(jLabel4) .addGap(13, 13, 13) .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel9) .addGap(32, 32, 32) .addComponent(jLabel6) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jLabel10) .addGap(41, 41, 41) .addComponent(jLabel7) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel11) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel14) .addContainerGap()) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); pack(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n initComponents();\n }", "public AdjointForm() {\n initComponents();\n setDefaultCloseOperation(HIDE_ON_CLOSE);\n }", "public FormListRemarking() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n \n }", "public FormPemilihan() {\n initComponents();\n }", "public GUIForm() { \n initComponents();\n }", "public FrameForm() {\n initComponents();\n }", "public TorneoForm() {\n initComponents();\n }", "public FormCompra() {\n initComponents();\n }", "public muveletek() {\n initComponents();\n }", "public Interfax_D() {\n initComponents();\n }", "public quanlixe_form() {\n initComponents();\n }", "public SettingsForm() {\n initComponents();\n }", "public RegistrationForm() {\n initComponents();\n this.setLocationRelativeTo(null);\n }", "public Soru1() {\n initComponents();\n }", "public FMainForm() {\n initComponents();\n this.setResizable(false);\n setLocationRelativeTo(null);\n }", "public soal2GUI() {\n initComponents();\n }", "public EindopdrachtGUI() {\n initComponents();\n }", "public MechanicForm() {\n initComponents();\n }", "public AddDocumentLineForm(java.awt.Frame parent) {\n super(parent);\n initComponents();\n myInit();\n }", "public BloodDonationGUI() {\n initComponents();\n }", "public quotaGUI() {\n initComponents();\n }", "public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }", "public PatientUI() {\n initComponents();\n }", "public myForm() {\n\t\t\tinitComponents();\n\t\t}", "public Oddeven() {\n initComponents();\n }", "public intrebarea() {\n initComponents();\n }", "public Magasin() {\n initComponents();\n }", "public RadioUI()\n {\n initComponents();\n }", "public NewCustomerGUI() {\n initComponents();\n }", "public ZobrazUdalost() {\n initComponents();\n }", "public FormUtama() {\n initComponents();\n }", "public p0() {\n initComponents();\n }", "public INFORMACION() {\n initComponents();\n this.setLocationRelativeTo(null); \n }", "public ProgramForm() {\n setLookAndFeel();\n initComponents();\n }", "public AmountReleasedCommentsForm() {\r\n initComponents();\r\n }", "public form2() {\n initComponents();\n }", "public MainForm() {\n\t\tsuper(\"Hospital\", List.IMPLICIT);\n\n\t\tstartComponents();\n\t}", "public kunde() {\n initComponents();\n }", "public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n setRequestFocusEnabled(false);\n setVerifyInputWhenFocusTarget(false);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 465, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 357, Short.MAX_VALUE)\n );\n }", "public MusteriEkle() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public DESHBORDPANAL() {\n initComponents();\n }", "public frmVenda() {\n initComponents();\n }", "public GUIForm() {\n initComponents();\n inputField.setText(NO_FILE_SELECTED);\n outputField.setText(NO_FILE_SELECTED);\n progressLabel.setBackground(INFO);\n progressLabel.setText(SELECT_FILE);\n }", "public Botonera() {\n initComponents();\n }", "public FrmMenu() {\n initComponents();\n }", "public OffertoryGUI() {\n initComponents();\n setTypes();\n }", "public JFFornecedores() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(255, 255, 255));\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 .addGap(0, 983, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 769, Short.MAX_VALUE)\n );\n\n pack();\n }", "public EnterDetailsGUI() {\n initComponents();\n }", "public vpemesanan1() {\n initComponents();\n }", "public Kost() {\n initComponents();\n }", "public FormHorarioSSE() {\n initComponents();\n }", "public frmacceso() {\n initComponents();\n }", "public UploadForm() {\n initComponents();\n }", "public HW3() {\n initComponents();\n }", "public Managing_Staff_Main_Form() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }", "public sinavlar2() {\n initComponents();\n }", "public P0405() {\n initComponents();\n }", "public IssueBookForm() {\n initComponents();\n }", "public MiFrame2() {\n initComponents();\n }", "public Choose1() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n\n String oldAuthor = prefs.get(\"AUTHOR\", \"\");\n if(oldAuthor != null) {\n this.authorTextField.setText(oldAuthor);\n }\n String oldBook = prefs.get(\"BOOK\", \"\");\n if(oldBook != null) {\n this.bookTextField.setText(oldBook);\n }\n String oldDisc = prefs.get(\"DISC\", \"\");\n if(oldDisc != null) {\n try {\n int oldDiscNum = Integer.parseInt(oldDisc);\n oldDiscNum++;\n this.discNumberTextField.setText(Integer.toString(oldDiscNum));\n } catch (Exception ex) {\n this.discNumberTextField.setText(oldDisc);\n }\n this.bookTextField.setText(oldBook);\n }\n\n\n }", "public GUI_StudentInfo() {\n initComponents();\n }", "public JFrmPrincipal() {\n initComponents();\n }", "public Lihat_Dokter_Keseluruhan() {\n initComponents();\n }", "public bt526() {\n initComponents();\n }", "public Pemilihan_Dokter() {\n initComponents();\n }", "public Ablak() {\n initComponents();\n }", "@Override\n\tprotected void initUi() {\n\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\n\t// <editor-fold defaultstate=\"collapsed\" desc=\"Generated\n\t// Code\">//GEN-BEGIN:initComponents\n\tprivate void initComponents() {\n\n\t\tlabel1 = new java.awt.Label();\n\t\tlabel2 = new java.awt.Label();\n\t\tlabel3 = new java.awt.Label();\n\t\tlabel4 = new java.awt.Label();\n\t\tlabel5 = new java.awt.Label();\n\t\tlabel6 = new java.awt.Label();\n\t\tlabel7 = new java.awt.Label();\n\t\tlabel8 = new java.awt.Label();\n\t\tlabel9 = new java.awt.Label();\n\t\tlabel10 = new java.awt.Label();\n\t\ttextField1 = new java.awt.TextField();\n\t\ttextField2 = new java.awt.TextField();\n\t\tlabel14 = new java.awt.Label();\n\t\tlabel15 = new java.awt.Label();\n\t\tlabel16 = new java.awt.Label();\n\t\ttextField3 = new java.awt.TextField();\n\t\ttextField4 = new java.awt.TextField();\n\t\ttextField5 = new java.awt.TextField();\n\t\tlabel17 = new java.awt.Label();\n\t\tlabel18 = new java.awt.Label();\n\t\tlabel19 = new java.awt.Label();\n\t\tlabel20 = new java.awt.Label();\n\t\tlabel21 = new java.awt.Label();\n\t\tlabel22 = new java.awt.Label();\n\t\ttextField6 = new java.awt.TextField();\n\t\ttextField7 = new java.awt.TextField();\n\t\ttextField8 = new java.awt.TextField();\n\t\tlabel23 = new java.awt.Label();\n\t\ttextField9 = new java.awt.TextField();\n\t\ttextField10 = new java.awt.TextField();\n\t\ttextField11 = new java.awt.TextField();\n\t\ttextField12 = new java.awt.TextField();\n\t\tlabel24 = new java.awt.Label();\n\t\tlabel25 = new java.awt.Label();\n\t\tlabel26 = new java.awt.Label();\n\t\tlabel27 = new java.awt.Label();\n\t\tlabel28 = new java.awt.Label();\n\t\tlabel30 = new java.awt.Label();\n\t\tlabel31 = new java.awt.Label();\n\t\tlabel32 = new java.awt.Label();\n\t\tjButton1 = new javax.swing.JButton();\n\n\t\tlabel1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel1.setText(\"It seems that some of the buttons on the ATM machine are not working!\");\n\n\t\tlabel2.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel2.setText(\"Unfortunately these numbers are exactly what Professor has to use to type in his password.\");\n\n\t\tlabel3.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel3.setText(\n\t\t\t\t\"If you want to eat tonight, you have to help him out and construct the numbers of the password with the working buttons and math operators.\");\n\n\t\tlabel4.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tlabel4.setText(\"Denver's Password: 2792\");\n\n\t\tlabel5.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel5.setText(\"import java.util.Scanner;\\n\");\n\n\t\tlabel6.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel6.setText(\"public class ATM{\");\n\n\t\tlabel7.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel7.setText(\"public static void main(String[] args){\");\n\n\t\tlabel8.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel8.setText(\"System.out.print(\");\n\n\t\tlabel9.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel9.setText(\" -\");\n\n\t\tlabel10.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel10.setText(\");\");\n\n\t\ttextField1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\ttextField1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tlabel14.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel14.setText(\"System.out.print( (\");\n\n\t\tlabel15.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel15.setText(\"System.out.print(\");\n\n\t\tlabel16.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel16.setText(\"System.out.print( ( (\");\n\n\t\tlabel17.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel17.setText(\")\");\n\n\t\tlabel18.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel18.setText(\" +\");\n\n\t\tlabel19.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel19.setText(\");\");\n\n\t\tlabel20.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel20.setText(\" /\");\n\n\t\tlabel21.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel21.setText(\" %\");\n\n\t\tlabel22.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel22.setText(\" +\");\n\n\t\tlabel23.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel23.setText(\");\");\n\n\t\tlabel24.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel24.setText(\" +\");\n\n\t\tlabel25.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel25.setText(\" /\");\n\n\t\tlabel26.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel26.setText(\" *\");\n\n\t\tlabel27.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\t\tlabel27.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel27.setText(\")\");\n\n\t\tlabel28.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel28.setText(\")\");\n\n\t\tlabel30.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel30.setText(\"}\");\n\n\t\tlabel31.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel31.setText(\"}\");\n\n\t\tlabel32.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel32.setText(\");\");\n\n\t\tjButton1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tjButton1.setText(\"Check\");\n\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tjButton1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(28).addGroup(layout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING).addComponent(getDoneButton()).addComponent(jButton1)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, 774, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addGap(92).addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15, GroupLayout.PREFERRED_SIZE, 145,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(37))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(174)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(7)))\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label23, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20).addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(23).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16, GroupLayout.PREFERRED_SIZE, 177,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));\n\t\tlayout.setVerticalGroup(\n\t\t\t\tlayout.createParallelGroup(Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup().addGroup(layout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(19)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(78)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(76)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(75)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(27))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel23,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(29)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))))\n\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t.addGap(30)\n\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(25)\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(26).addComponent(jButton1).addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(getDoneButton()).addContainerGap(23, Short.MAX_VALUE)));\n\t\tthis.setLayout(layout);\n\n\t\tlabel16.getAccessibleContext().setAccessibleName(\"System.out.print( ( (\");\n\t\tlabel17.getAccessibleContext().setAccessibleName(\"\");\n\t\tlabel18.getAccessibleContext().setAccessibleName(\" +\");\n\t}", "public Pregunta23() {\n initComponents();\n }", "public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }", "public AvtekOkno() {\n initComponents();\n }", "public busdet() {\n initComponents();\n }", "public ViewPrescriptionForm() {\n initComponents();\n }", "public Ventaform() {\n initComponents();\n }", "public Kuis2() {\n initComponents();\n }", "public CreateAccount_GUI() {\n initComponents();\n }", "public Carrera() {\n initComponents();\n }", "public POS1() {\n initComponents();\n }", "public EqGUI() {\n initComponents();\n }", "public JFriau() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setTitle(\"BuNus - Budaya Nusantara\");\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setBackground(new java.awt.Color(204, 204, 204));\n setMinimumSize(new java.awt.Dimension(1, 1));\n setPreferredSize(new java.awt.Dimension(760, 402));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 750, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n }", "public nokno() {\n initComponents();\n }", "public dokter() {\n initComponents();\n }", "public ConverterGUI() {\n initComponents();\n }", "public hitungan() {\n initComponents();\n }", "public Modify() {\n initComponents();\n }", "public frmAddIncidencias() {\n initComponents();\n }", "public FP_Calculator_GUI() {\n initComponents();\n \n setVisible(true);\n }" ]
[ "0.731952", "0.72909003", "0.72909003", "0.72909003", "0.72862417", "0.7248404", "0.7213685", "0.72086793", "0.7195972", "0.71903807", "0.71843296", "0.7158833", "0.71475875", "0.70933676", "0.7081167", "0.7056787", "0.69876975", "0.6977383", "0.6955115", "0.6953839", "0.69452274", "0.6942602", "0.6935845", "0.6931919", "0.6928187", "0.6925288", "0.69251484", "0.69117147", "0.6911646", "0.6892842", "0.68927234", "0.6891408", "0.68907607", "0.68894386", "0.68836755", "0.688209", "0.6881168", "0.68787616", "0.68757504", "0.68741524", "0.68721044", "0.685922", "0.68570775", "0.6855737", "0.6855207", "0.68546575", "0.6853559", "0.6852262", "0.6852262", "0.68443567", "0.6837038", "0.6836797", "0.68291426", "0.6828922", "0.68269444", "0.6824652", "0.682331", "0.68175536", "0.68167555", "0.6810103", "0.6809546", "0.68085015", "0.68083894", "0.6807979", "0.68027437", "0.67950374", "0.67937446", "0.67921823", "0.67911226", "0.67900467", "0.6788873", "0.67881", "0.6781613", "0.67669237", "0.67660683", "0.6765841", "0.6756988", "0.675558", "0.6752552", "0.6752146", "0.6742482", "0.67395985", "0.673791", "0.6736197", "0.6733452", "0.67277217", "0.6726687", "0.67204696", "0.67168", "0.6714824", "0.6714823", "0.6708782", "0.67071444", "0.670462", "0.67010295", "0.67004406", "0.6699407", "0.6698219", "0.669522", "0.66916007", "0.6689694" ]
0.0
-1
Turn left from the current direction.
public Direction moveLeft() { switch(this){ case EAST : return NORTH; case SOUTH : return EAST; case WEST : return SOUTH; case NORTH : return WEST; } return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void moveLeft(){\n\t\tif(GameSystem.TWO_PLAYER_MODE){\n\t\t\tif(Game.getPlayer2().dying){\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif(animation==ANIMATION.DAMAGED||Game.getPlayer().dying||channelling||charging) return;\n\t\tmoving=true;\n\t\tbuttonReleased=false;\n\t\torientation=ORIENTATION.LEFT;\n\t\tif(animation!=ANIMATION.MOVELEFT) {\n\t\t\tanimation=ANIMATION.MOVELEFT;\n\t\t\tif(run!=null) sequence.startSequence(run);\n\t\t}\n\t\tfacing=FACING.LEFT;\n\t\tdirection=\"left\";\n\t\tsetNextXY();\n\t\tsetDestination(nextX,nextY);\n\t\tvelX=-1*spd/2;\n\t\tvelY=0;\n\t}", "public void turnLeft() {\r\n setDirection( modulo( myDirection-1, 4 ) );\r\n }", "private void turnLeft() {\n\n if(currentPosition.getX() == -1 && currentPosition.getY() == -1) {\n System.out.println(\"Robot is not placed, yet.\");\n return;\n }\n\n Position.Direction direction = currentPosition.getDirection();\n switch (direction) {\n case EAST:\n direction = Position.Direction.NORTH;\n break;\n case WEST:\n direction = Position.Direction.SOUTH;\n break;\n case NORTH:\n direction = Position.Direction.WEST;\n break;\n case SOUTH:\n direction = Position.Direction.EAST;\n break;\n }\n\n currentPosition.setDirection(direction);\n }", "public void moveLeft() {\n Coordinate leftCoord = new Coordinate(getX() - 1, getY());\n handleMove(leftCoord, InteractionHandler.LEFT);\n }", "public void rotateLeft() {\n\t\tthis.direction = this.direction.rotateLeft();\n\t}", "public void turnLeft() {\n\t\tthis.setSteeringDirection(getSteeringDirection()-5);\n\t\t}", "public void moveLeft() {\n\t\tsetPosX(getPosX() - steps);\n\t}", "public static void turnLeft() {\n LEFT_MOTOR.backward();\n RIGHT_MOTOR.forward();\n }", "public void moveLeft()\n {\n if (xPos == 0)\n {\n movementY = 0;\n movementX = 0;\n }\n\n // Set the movement factor - negative X because we are moving LEFT! \n movementX = -0.5;\n movementY = 0;\n }", "@Override\r\n\tpublic void rotateLeft() {\n\t\tfinal int THETA = 10;\r\n\t\tint dir = this.getDirection();\r\n\t\tthis.setDirection(dir - THETA);\r\n\t\t\r\n\t}", "public void left(){\n\t\tmoveX=-1;\n\t\tmoveY=0;\n\t}", "public void moveLeft() {\n speedX -= (speedX > 0) ? acceleration * 2 : acceleration;\n if (speedX < -maxSpeed) {\n speedX = -maxSpeed;\n }\n direction = Direction.LEFT;\n }", "public void moveLeft()\n\t{\n\t\tmoveLeft = true;\n\t}", "public void moveLeft() {\n if (!this.state.equals(\"onLeftWall\")) {\n this.dir = -1;\n this.xTargetSpeed = this.X_MAX_SPEED;\n }\n }", "protected void left() {\n move(positionX - 1, positionY);\n orientation = BattleGrid.RIGHT_ANGLE * 2;\n }", "public void moveLeft() {\r\n\t\tif (x > 0) x--; \r\n\t}", "public void turnLeft ()\n\t{\n\t\t//changeFallSpeed (-1);\n\t\tturnInt = -1;\n\t}", "private void moveLeft(){\n \n setGlobalLocation(getGlobalX() - speed, getGlobalY());\n animationSpeedLeft();\n }", "void moveLeft() {\n\t\tsetX(x-1);\r\n\t\tdx=-1;\r\n\t\tdy=0;\r\n\t}", "public void moveLeft() {\n \tif(!move.moveLeft()) {\n \t\tif(physinteractor(getX()-1,getY())) {\n \t\t\tmove.moveLeft();\n \t\t\tnonphysinteractor(getX(),getY());\n \t\t\tupdatemove();\n \t\t}\n }else {\n \tupdatemove();\n \tnonphysinteractor(getX(),getY());\n }\n }", "public void slideLeft() {\n turnLeft();\n move();\n turnRight();\n }", "public void moveLeft() {\n\t\tposX -= speed;\n\t}", "private void rotateLeft() {\n robot.leftBack.setPower(-TURN_POWER);\n robot.leftFront.setPower(-TURN_POWER);\n robot.rightBack.setPower(TURN_POWER);\n robot.rightFront.setPower(TURN_POWER);\n }", "private void playerMoveLeft()\n {\n \n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(false);\n this.setCurrentX(getCurrentX() - 1);\n if (this.getCurrentX() > -1) {\n if (!nextIsWall()) {\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n } else {\n this.setCurrentX(this.getCurrentX() + 1);\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n }\n } else {\n this.setCurrentX(getCurrentX() + 1);\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n }\n }", "public Vertex moveLeft() {\n for (Edge e : current.outEdges) {\n move(e.to.x == current.x - 1, e);\n }\n return current;\n }", "public void moveLeft()\n {\n if (this.x >= 2) {\n --x;\n } else {\n System.out.println(\"Move is outside of the field! Try again.\");\n }\n }", "public void moveLeft() {\r\n\t\t\r\n\t\tint leftSteps=10;\r\n\t\t\ttopX-= leftSteps;\r\n\t}", "public void moveLeft() {\n locX = locX - 1;\n }", "public void moveLeft() {\n if (xcoor >= movingSpeed) {\n xcoor = xcoor - movingSpeed * 2;\n }\n }", "public void moveLeft() {\n this.accelerateXL();\n this.moveX(this.getxSpeed());\n this.setPicX(0);\n this.setPicY(141);\n this.setLoopCells(true);\n }", "public boolean moveLeft() \r\n\t{\r\n\t\tboolean moved = false;\r\n\t\tif ( maze [currentRow] [currentCol].isOpenLeft() )\r\n\t\t{\r\n\t\t\tmaze [currentRow] [currentCol].removeWalker(Direction.LEFT);\r\n\t\t\tif ( currentCol-1 < 0 || maze [currentRow] [currentCol-1].isOpenRight() )\r\n\t\t\t{\r\n\t\t\t\tcurrentCol--;\r\n\t\t\t\tmoved = true;\r\n\t\t\t}\r\n\t\t\tif ( currentCol >= 0 )\r\n\t\t\t\tmaze [currentRow] [currentCol].InsertWalker();\r\n\t\t}\r\n\t\tSystem.out.println( \"Move Left: \" + moved );\r\n\t\treturn moved;\r\n\t}", "public void left () {\n Grid<Actor> gr = getGrid();\n if (gr == null)\n return;\n Location loc = getLocation();\n Location next = loc.getAdjacentLocation(Location.WEST);\n if (canMove(next)) {\n moveTo(next);\n }\n }", "public void moveLeft()\n\t{\n\t\tx = x - STEP_SIZE;\n\t}", "public void goLeft() {\n\t\tx -= dx;\n\t\tbgBack.setDx(true);\n\t\tbgBack.move();\n\t\tif(x < 200) {\n\t\t\tif(!bgBack.getReachBegin()) {\n\t\t\t\tx = 200;\n\t\t\t\tbgFront.setDx(true);\n\t\t\t\tbgFront.move();\n\t\t\t}\n\t\t\telse if(x < 50) {\n\t\t\t\tx = 50;\n\t\t\t}\n\t\t}\n\n\t}", "public void moveLeft() {\n this.velocity = this.velocity.add(leftVelocity());\n }", "public void moveLeft() {\n\t\t\n\t}", "@Override\r\n\tpublic void rotateLeft() {\n\t\tsetDirection((this.getDirection() + 3) % 4);\r\n\t}", "public void leftPressed() {\n System.out.println(\"leftPressed()\");\n current.translate(0, -1);\n display.showBlocks();\n }", "public Direction toLeft()\n {\n return new Direction(dirInDegrees - (FULL_CIRCLE / 4));\n }", "private boolean moveLeft() {\n\t\tint moduleSpeed = stats.getSPEED();\n\n\t\tgetTorax().setRotationg(getTorax().getRotationg() - rotationRate);\n\t\tgetLegs().setRotationg(getLegs().getRotationg() - rotationRate);\n\n\t\tgetSpeed().setX(Math.cos(Math.toRadians(getTorax().getRotationg() - 90)) * moduleSpeed);\n\t\tgetSpeed().setY(Math.sin(Math.toRadians(getTorax().getRotationg() - 90)) * moduleSpeed);\n\n\t\tincreaseInfection();\n\n\t\treturn true;\n\t}", "public void moveLeft(){\n if(currentText != null) {\n //The saved character index should no longer be restored\n savedCharacterIndex = -1;\n\n //Try to move the cursor\n characterIndex -= 1;\n //If the cursor did not wrap onto a new line then update it's position\n if (characterIndex >= 0) {\n updateXPosition(true);\n }\n //If the cursor wrapped onto a new line\n else {\n //If this was not the very first line move to the end of the previous line\n if (lineIndex > 0) {\n lineIndex--;\n currentText = texts.get(lineIndex);\n characterIndex = currentText.getCharacterEdges().length - 1;\n if (characterIndex < 0) {\n characterIndex = 0;\n }\n updatePosition();\n }\n //If this is the first line character index should not change and position does not need to be updated\n else {\n characterIndex = 0;\n }\n }\n }\n }", "private void LeftLeftLeft() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<1) {\n\t\t\t\tRobot.drivebase.run(.53, -.53);\n\t\t\t}\n \t\tif (Robot.autotime.get()>=1) {\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\n \t}\n\t\t}", "public static void turnleftBy(double angle) {\n leftMotor.rotate(-convertAngle(angle), true);\n rightMotor.rotate(convertAngle(angle), false);\n }", "public void setLeft() {\n\t\tstate = State.LEFT;\n\t}", "public Dir moveLeft() {\n\t\t\tint newDir = (this.ordinal() + SIZE - 1) % SIZE;\n\t\t\treturn dirArray[newDir];\n\t\t}", "private void turnLeft(View v){\n\t\tswitch(this.facingDirection){\n\t\tcase NORTH:\n\t\t\tfacingDirection = Direction.WEST;\n\t\t\tbreak;\n\t\tcase SOUTH:\n\t\t\tfacingDirection = Direction.EAST;\n\t\t\tbreak;\n\t\tcase WEST:\n\t\t\tfacingDirection = Direction.SOUTH;\n\t\t\tbreak;\n\t\tcase EAST:\n\t\t\tfacingDirection = Direction.NORTH;\n\t\t}\n\t}", "public void turnLeft()\r\n\t{\r\n\t\t\r\n\t\theading -= 2; //JW\r\n\t\t//Following the camera:\r\n\t\t\t//heading -= Math.sin(Math.toRadians(15))*distance; \r\n\t\t\t//heading -= Math.cos(Math.toRadians(15))*distance;\r\n\t}", "public void left() {\n if (x - movementSpeed > -55) {\r\n x = x - movementSpeed;\r\n }\r\n }", "public void goLeft()\r\n\t{\r\n\t\tthis.X--;\r\n\t}", "private void LeftRightLeft() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<1) {\n\t\t\t\tRobot.drivebase.run(.53, -.53);\n\t\t\t}\n \t\tif (Robot.autotime.get()>=1) {\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\n \t}\n \t}", "public void turnLeft() { turn(\"LEFT\"); }", "public void moveLeft(int speed)\n {\n if(getRotation()==0)\n {\n turn(180);\n move(speed);\n }\n else if(getRotation()==90)\n {\n turn(90);\n move(speed);\n }\n else if(getRotation()==180)\n {\n move(speed);\n }\n else if(getRotation()==270)\n {\n turn(-90);\n move(speed);\n }\n }", "public void turnLeft(double speed) {\n\t\tRobotMap.frontLeft.set(-speed);\n\t\tRobotMap.backLeft.set(-speed);\n\t\tRobotMap.frontRight.set(-speed);\n\t\tRobotMap.backRight.set(-speed);\n\t}", "public void moveLeft() {\n this.x -= 10;\n repaint();\n }", "public void rotLeft()\n\t{\n\t\t//only rotate if a PlayerShip is currently spawned\n\t\tIIterator iter = gameObj.getIterator();\n\t\twhile(iter.hasNext ())\n\t\t{\n\t\t\tGameObject current = (GameObject)iter.getNext();\n\t\t\tif(current instanceof PlayerShip)\n\t\t\t{\n\t\t\t\t((PlayerShip)current).moveLeft();\n\t\t\t\tSystem.out.println(\"Heading -20\");\n\t\t\t\tnotifyObservers();\n\t\t\t\treturn;\n\t\t\t}\t\n\t\t}\n\t\tSystem.out.println(\"There is no playerShip spawned\");\n\t}", "public boolean moveLeft() {\r\n\t\tif (this.x <= 0 == true) {\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\tthis.x -= 5;\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "public void left() {\n\t\tstate.left();\n\t}", "public void moveLeft()\n {\n if (!this.search_zone.isLeftBorder(this.x_position))\n {\n this.x_position = (this.x_position - 1);\n }\n }", "public void turnLeft(Agent agent) throws RemoteException {\n\t\tObject obj = agents.get(agent.getName());\n\t\tPoint point = (Point) obj;\n\t\tif (agent.getRow() != point.x || agent.getColumn() != point.y) {\n\t\t\tSystem.out.println(\"Incompativeis!!!\");\n\t\t\treturn;\n\t\t}\n\t\tsetDirection(agent.getRow(), agent.getColumn(), agent.getName(),\n\t\t\t\t\t\t\t\t\t\t\t\t\tagent.getDirection());\n\t}", "void moveLeft();", "public void moveLeft(){\n myRectangle.setX(myRectangle.getX() - PADDLE_SPEED);\n }", "public void rotateLeft() {\n\t\tif (rotLeft == null) {\n\t\t\tQuaternion quat = new Quaternion();\n\t\t\tquat.fromAngles(0f, (float) Math.toRadians(90), 0f);\n\t\t\trotLeft = quat.toRotationMatrix();\n\t\t}\n\n\t\tgetNode().getLocalRotation().apply(rotLeft);\n\t}", "private void applyLeftTurn(WorldSpatial.Direction orientation, float delta) {\n\t\tswitch(orientation){\n\t\tcase EAST:\n\t\t\tif(!getOrientation().equals(WorldSpatial.Direction.NORTH)){\n\t\t\t\tturnLeft(delta);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase NORTH:\n\t\t\tif(!getOrientation().equals(WorldSpatial.Direction.WEST)){\n\t\t\t\tturnLeft(delta);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SOUTH:\n\t\t\tif(!getOrientation().equals(WorldSpatial.Direction.EAST)){\n\t\t\t\tturnLeft(delta);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase WEST:\n\t\t\tif(!getOrientation().equals(WorldSpatial.Direction.SOUTH)){\n\t\t\t\tturnLeft(delta);\n\t\t\t}\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t\n\t\t}\n\t\t\n\t}", "public void goLeft() {\n if(page.left == null)\n {\n if(editText.getText().toString().equals(\"\")) {\n return;\n }\n page.addRelation(\"left\",editText.getText().toString());\n editText.setText(\"\");\n }\n\n page = page.left;\n addQueue();\n }", "public Direction left() {\n\t\treturn left;\n\t}", "public void leftPressed() {\n\t\tkeys.get(keys.put(Keys.LEFT, true));\n\t}", "public void moveLeft()\n\t{\n\t\tcol--;\n\t}", "public void rotatePieceLeft(){\r\n if (hasFalling()){\r\n FallingPiece test = falling.rotateLeft();\r\n if (!moveIfNoConflict(test, falling))\r\n Kick(test, falling);\r\n if(isGhostActivated())\r\n \t\t\tgenerateGhost();\r\n }\r\n }", "public void turnLeft();", "public Direction left() {\r\n\t\tint newDir = this.index - 1;\r\n\r\n\t\tnewDir = (newDir == 0) ? 4 : newDir;\r\n\t\treturn getEnum(newDir);\r\n\t}", "public void moveTileLeft(float delta) {\n if (x > destinationX + COMBAT_MOVEMENT_SPEED * delta) speedX = -COMBAT_MOVEMENT_SPEED;\n else {\n speedX = (destinationX - x) / delta;\n isMoving = false;\n isMovingLeft = false;\n }\n direction = Direction.LEFT;\n }", "private void LeftLeftRight() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<1) {\n\t\t\t\tRobot.drivebase.run(.53, -.53);\n\t\t\t}\n \t\tif (Robot.autotime.get()>=1) {\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\n \t}\n \t}", "@Override\n\tpublic boolean moveLeft() {\n\t\tboolean rs = super.moveLeft();\n\t\tif(rs == true){\n\t\t}\n\t\treturn rs;\n\t}", "public void turnLeft(int ticks){\n\t\tposition = (position + ticks)%40;\n\t\tcount++;\n\t\tcheckTurn(ticks);\n\t}", "void left() {\n startAnimation(leftSubCubes(), Axis.X, Direction.ANTICLOCKWISE);\n leftCubeSwap();\n }", "public void moveLeft() {\n if (rec.getUpperLeft().getX() - 5 < leftBorder) {\n rec.getUpperLeft().setX(leftBorder);\n } else {\n rec.getUpperLeft().setX(rec.getUpperLeft().getX() - 5);\n }\n\n }", "public void animateMovementLeft()\n {\n if(animationCount%frameRate == 0)\n {\n imageNumber = (imageNumber + 1)% (leftMvt.length);\n setImage(leftMvt[imageNumber]);\n }\n }", "public boolean slideLeft() {\n\t\tif (currentCol > 0) {\n\t\t\tboard[currentRow][currentCol] = board[currentRow][currentCol - 1];\n\t\t\tcurrentCol--;\n\t\t\tboard[currentRow][currentCol] = '0';\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "public void rotLeft()\n\t{\n\t\t//only rotate if a PlayerShip is currently spawned\n\t\tif(gameObj[1].size() > 0)\n\t\t{\n\t\t\t((PlayerShip)gameObj[1].get(0)).moveLeft();\n\t\t\tSystem.out.println(\"Heading +10 degrees\");\n\t\t}else {\n\t\t\tSystem.out.println(\"there is not currently a player ship spawned\");\n\t\t}\n\t}", "@Override\n\tpublic void moveLeft()\n\t{\n\t\tif (!isAtStart()) right.push(left.pop());\n\n\t}", "public void setLeft(boolean left) {\n\t\tthis.left = left;\n\t}", "public boolean moveLeft() {\n\t\tif (check(col-1, row)) {\n\t\t\tHiVolts.board.squares[row][col] = 0;\n\t\t\tcol = col - 1;\n\t\t\tHiVolts.board.squares[row][col] = 2;\n\t\t\tsuper.moveLeft();\n\t\t}\n\t\treturn true;\n\t}", "public void leftPressed() {\n\t\tif (edit) {\n\t\t\tcurrentDeck.left();\t\n\t\t}\n\t}", "public void setMoveLeft(boolean TorF) {\n moveLeft = TorF;\n }", "private boolean movingLeft() {\n return this.velocity.sameDirection(Vector2D.X_UNIT.opposite());\n }", "@Override\n public void turnLeft(Double angle) {\n angle = Math.toRadians(angle);\n double temp = vector.x;\n vector.x = vector.x * Math.cos(angle) - vector.y * Math.sin(angle);\n vector.y = temp * Math.sin(angle) + vector.y * Math.cos(angle);\n }", "public void changeDirection()\n {\n if(goLeft){\n goLeft = false;\n }else{\n goLeft = true;\n }\n }", "public void moveLeft(int delta){\n //if the object is not already moving at maximum speed\n if(x_velocity > -maximumSpeed){\n //then the object will accelerate towards maximum speed\n x_velocity -= accelerationSpeed*delta;\n if(x_velocity < -maximumSpeed){\n //and if the object exceeds maximum speed, set it to maximum speed\n x_velocity = -maximumSpeed;\n }\n }\n // if()\n moving = true;\n facing = Facing.LEFT;\n movingLeft = true;\n movingRight = false;\n \n \n }", "public Direction left() {\r\n\t\tif (this.direction == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tswitch (this.direction) {\r\n\t\tcase NORTH:\r\n\t\t\tthis.direction = Direction.WEST;\r\n\t\t\tbreak;\r\n\t\tcase WEST:\r\n\t\t\tthis.direction = Direction.SOUTH;\r\n\t\t\tbreak;\r\n\t\tcase SOUTH:\r\n\t\t\tthis.direction = Direction.EAST;\r\n\t\t\tbreak;\r\n\t\tcase EAST:\r\n\t\t\tthis.direction = Direction.NORTH;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn this.direction;\r\n\t}", "void setLeft(boolean left) {\n myLeft = left;\n }", "public static void setLeft(char left) {\n\t\t\tGamePreferences.left = left;\n\t\t}", "public boolean moveLeft() throws EatableObjectOnPlaceException {\r\n\t\tif (!treeOnLeft() && !mouseOnLeft()) {\r\n\t\t\tif (!onLeftBorder(positionX)) {\r\n\t\t\t\tpositionX = positionX - 1;\r\n\t\t\t\teatPerformingStep();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treturn moveRight();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public static int rotateLeft(int dir) {\n return (dir + 1) & 3;\n }", "public Direction toLeft(int deg)\n {\n return new Direction(dirInDegrees - deg);\n }", "public void leftDrive(double speed) {\n\t\tleft1.set(speed);\n\t\tleft2.set(speed);\n\t\tleft3.set(speed);\n\t}", "public void spinLeft(double speed) {\r\n \tspeed = Math.abs(speed);\r\n \tleftTopMotor.set(-1 * speed);\r\n \tleftBottomMotor.set(-1 * speed);\r\n \trightTopMotor.set(-1 * speed);\r\n \trightBottomMotor.set(-1 * speed);\r\n }", "public void setLeft(Lane left) {\r\n\t\tthis.left = left;\r\n\t}", "public boolean moveLeft()\n {\n\tboolean update;\n\tboolean action = false;\n\t\t\n\tdo\n\t{\n update = false;\n\t\t\t\n for (int y=0; y<cases.length-1; y++)\n {\n for (int x=0; x<cases[y].length; x++)\n\t\t{\n boolean merge;\n boolean move;\n\t\t\t\t\t\n do\n {\n merge = merge(cases[x][y+1],cases[x][y]);\n move = move(cases[x][y+1],cases[x][y]);\n\t\t\tupdate = (update || merge || move);\n if(!action && update)\n {\n action = update; \n }\n } while (merge || move);\n }\n }\n } while (update);\n \n return action;\n }", "public void sideLeft(double targetDistance, double power) {\n setDriveMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n setDriveMode(DcMotor.RunMode.RUN_USING_ENCODER);\n double currentDistance = 0;\n while (Math.abs(currentDistance) < targetDistance && opModeIsActive()) {\n currentDistance = frontRight.getCurrentPosition();\n frontLeft.setPower(power);\n frontRight.setPower(-power);\n backLeft.setPower(-power);\n backRight.setPower(power);\n }\n stopMotors();\n }", "private void driveLeft() {\n setSpeed(MIN_SPEED, MAX_SPEED);\n }" ]
[ "0.8525191", "0.8521289", "0.83128065", "0.83038956", "0.8278527", "0.81815547", "0.81277907", "0.8114062", "0.7970451", "0.7931179", "0.79119366", "0.79075664", "0.789386", "0.78930855", "0.78728366", "0.7784135", "0.77768725", "0.7764422", "0.7684714", "0.7674244", "0.7658333", "0.76328266", "0.7616203", "0.76034063", "0.758106", "0.75749695", "0.7574277", "0.7553766", "0.7548966", "0.7537939", "0.7535835", "0.75327104", "0.7526783", "0.7494885", "0.7493589", "0.7467034", "0.7456166", "0.74310064", "0.7356674", "0.73515296", "0.7337867", "0.7320969", "0.72975117", "0.7288052", "0.7273637", "0.7264773", "0.7259049", "0.7232406", "0.7230326", "0.7191049", "0.7168985", "0.71521246", "0.7147869", "0.71274954", "0.7122337", "0.7122115", "0.711324", "0.71014196", "0.7095816", "0.70889336", "0.70853627", "0.7080793", "0.7074366", "0.707081", "0.7060944", "0.7053628", "0.70498145", "0.7045934", "0.70417875", "0.70379287", "0.70279515", "0.70177096", "0.7015645", "0.7011795", "0.7001418", "0.69655246", "0.6950094", "0.6937915", "0.69365805", "0.69186157", "0.691732", "0.69169825", "0.6911819", "0.69117826", "0.6897034", "0.6864816", "0.6859264", "0.6826762", "0.6806865", "0.68009025", "0.6771529", "0.6722085", "0.6696114", "0.66887134", "0.66813755", "0.66796815", "0.66589063", "0.6652423", "0.66491276", "0.6648053" ]
0.75018007
33
Turn right from the current direction.
public Direction moveRight() { switch(this){ case EAST : return SOUTH; case SOUTH : return WEST; case WEST : return NORTH; case NORTH : return EAST; } return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void turnRight() {\r\n setDirection( modulo( myDirection+1, 4 ) );\r\n }", "private void right() {\n lastMovementOp = Op.RIGHT;\n rotate(TURNING_ANGLE);\n }", "public void moveRight(){\n\t\tif(GameSystem.TWO_PLAYER_MODE){\n\t\t\tif(Game.getPlayer2().dying){\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif(animation==ANIMATION.DAMAGED||Game.getPlayer().dying||channelling||charging) return;\n\t\tmoving=true;\n\t\tbuttonReleased=false;\n\t\torientation=ORIENTATION.RIGHT;\n\t\tif(animation!=ANIMATION.MOVERIGHT) {\n\t\t\tanimation=ANIMATION.MOVERIGHT;\n\t\t\tif(run!=null) sequence.startSequence(run);\n\t\t}\n\t\tfacing=FACING.RIGHT;\n\t\tdirection=\"right\";\n\t\tsetNextXY();\n\t\tsetDestination(nextX,nextY);\n\t\tvelX=spd/2;\n\t\tvelY=0;\n\t}", "public void rotateRight() {\n\t\tthis.direction = this.direction.rotateRight();\n\t}", "private void turnRight() {\n\n if(currentPosition.getX() == -1 && currentPosition.getY() == -1) {\n System.out.println(\"Robot is not placed, yet.\");\n return;\n }\n\n Position.Direction direction = currentPosition.getDirection();\n switch (direction) {\n case EAST:\n direction = Position.Direction.SOUTH;\n break;\n case WEST:\n direction = Position.Direction.NORTH;\n break;\n case NORTH:\n direction = Position.Direction.EAST;\n break;\n case SOUTH:\n direction = Position.Direction.WEST;\n break;\n }\n\n currentPosition.setDirection(direction);\n }", "public void turnRight() {\n\t\tthis.setSteeringDirection(getSteeringDirection()+5);\n\t}", "protected void right() {\n move(positionX + 1, positionY);\n orientation = 0;\n }", "public static void turnRight() {\n LEFT_MOTOR.forward();\n RIGHT_MOTOR.backward();\n }", "public void right(){\n\t\tmoveX=1;\n\t\tmoveY=0;\n\t}", "@Override\r\n\tpublic void rotateRight() {\n\t\tfinal int THETA = 10;\r\n\t\tint dir = this.getDirection();\r\n\t\tthis.setDirection(dir + THETA);\r\n\t\t\r\n\t}", "public void turnRight ()\n\t{\n\t\t//changeFallSpeed (1);\n\t\tturnInt = 1;\n\t}", "public void moveRight()\n\t{\n\t\tmoveRight = true;\n\t}", "public void moveRight() {\n Coordinate rightCoord = new Coordinate(getX() + 1, getY());\n handleMove(rightCoord, InteractionHandler.RIGHT);\n }", "private void rotateRight() {\r\n\t switch(direction){\r\n\t case Constants.DIRECTION_NORTH:\r\n\t direction = Constants.DIRECTION_EAST;\r\n\t break;\r\n\t case Constants.DIRECTION_EAST:\r\n\t direction = Constants.DIRECTION_SOUTH;\r\n\t break;\r\n\t case Constants.DIRECTION_SOUTH:\r\n\t direction = Constants.DIRECTION_WEST;\r\n\t break;\r\n\t case Constants.DIRECTION_WEST:\r\n\t direction = Constants.DIRECTION_NORTH;\r\n\t break;\r\n\t }\r\n\t }", "public void moveRight() {\n if (!this.state.equals(\"onRightWall\")) {\n this.dir = 1;\n this.xTargetSpeed = this.X_MAX_SPEED;\n }\n }", "public void moveRight() {\n speedX += (speedX < 0) ? acceleration * 2 : acceleration;\n if (speedX > maxSpeed) {\n speedX = maxSpeed;\n }\n direction = Direction.RIGHT;\n }", "@Override\r\n\tpublic void rotateRight() {\n\t\tsetDirection((this.getDirection() + 1) % 4);\r\n\t}", "public void slideRight() {\n turnRight();\n move();\n turnLeft();\n }", "public void moveRight() {\n\t\t\n\t}", "public void moveRight() {\n\t\tsetPosX(getPosX() + steps);\n\t}", "private void rotateRight() {\n robot.leftBack.setPower(TURN_POWER);\n robot.leftFront.setPower(TURN_POWER);\n robot.rightBack.setPower(-TURN_POWER);\n robot.rightFront.setPower(-TURN_POWER);\n }", "@Override\n public void turnRight(Double angle) {\n turnLeft(angle * -1);\n }", "public void moveRight()\n {\n if (xPos == xBound)\n {\n movementY = 0;\n movementX = 0;\n }\n\n // Set the movement factor - positive X because we are moving RIGHT! \n movementX = 0.5;\n movementY = 0;\n }", "public void moveRight() {\n \t\n \tif(!move.moveRight()) {\n \t\tif(physinteractor(getX()+1,getY())) {\n \t\t\tmove.moveRight();\n \t\t\tnonphysinteractor(getX(),getY());\n \t\t\tupdatemove();\n \t\t}\n }else {\n \t//System.out.print(\"I moved right\" + getX() + getY());\n \tupdatemove();\n \tnonphysinteractor(getX(),getY());\n }\n }", "public void moveRight() {\n locX = locX + 1;\n }", "public Direction toRight()\n {\n return new Direction(dirInDegrees + (FULL_CIRCLE / 4));\n }", "public void moveRight() {\n this.accelerateXR();\n this.moveX(this.getxSpeed());\n this.setPicX(0);\n this.setPicY(74);\n this.setLoopCells(true);\n }", "public void turnRight() { turn(\"RIGHT\"); }", "public void right() {\n if (x + movementSpeed < 450) {\r\n x = x + movementSpeed;\r\n }\r\n }", "public void right () {\n Grid<Actor> gr = getGrid();\n if (gr == null)\n return;\n Location loc = getLocation();\n Location next = loc.getAdjacentLocation(Location.EAST);\n if (canMove(next)) {\n moveTo(next);\n }\n }", "void moveRight() {\n\t\tsetX(x+1);\r\n\t\tdx=1;\r\n\t\tdy=0;\r\n\t}", "public void moveRight() {\n this.velocity = this.velocity.add(rightVelocity());\n }", "void moveRight();", "public void moveRight() {\n\t\tposX += speed;\n\t}", "public void moveRight() {\n if (xcoor <= Game.widthOfGameBoard - movingSpeed) {\n xcoor = xcoor + movingSpeed * 2;\n }\n }", "@Override\n\tpublic boolean moveRight() {\n\t\tboolean rs = super.moveRight();\n\t\tif(rs == true){\n\t\t}\n\t\treturn rs;\n\t}", "public void reverseDirection() {\n\t\tdirection *= -1;\n\t\ty += 10;\n\t}", "public void turnRight()\r\n\t{\r\n\t\theading += 2; //JW\r\n\t\t//Following the camera\r\n\t\t//heading += Math.sin(Math.toRadians(15)); \r\n\t\t//heading += Math.cos(Math.toRadians(15));\r\n\t}", "private void moveRight(){\n if(getXFromCamera() > -10 && getXFromCamera() < 10){\n getWorld().moveCamera(speed);\n }\n setGlobalLocation(getGlobalX() + speed, getGlobalY());\n animationSpeedRight();\n }", "public void moveRight()\n\t{\n\t\tx = x + STEP_SIZE;\n\t}", "public void turnRight(int ticks){\n\t\tposition = (position - ticks)%40;\n\t\tif (position < 0)\n\t\t\tposition+=40;\n\t\tcount++;\n\t\tcheckTurn(ticks);\n\t}", "public void moveRight() {\r\n\t\r\n\t\tint rightSteps=10;\r\n\t\t\ttopX+= rightSteps;\r\n\t}", "public void goRight() {\n\t\tx += dx;\n\t\tbgBack.setDx(false);\n\t\tbgBack.move();\n\t\tif(x > Game.WIDTH - 200) {\n\t\t\tif(!bgBack.getReachEnd()) {\n\t\t\t\tx = Game.WIDTH - 200;\n\t\t\t\tbgFront.setDx(false);\n\t\t\t\tbgFront.move();\n\t\t\t}\n\t\t\telse if(x > Game.WIDTH - 50) {\n\t\t\t\tx = Game.WIDTH - 50;\n\t\t\t}\n\t\t}\n\t}", "public void moveRight() {\r\n\t\tif (x < space.getSize() - 1) x++; \r\n\t}", "public void right() {\n\t\tstate.right();\n\t}", "public Vertex moveRight() {\n for (Edge e : current.outEdges) {\n move(e.to.x == current.x + 1, e);\n }\n return current;\n }", "private void applyRightTurn(WorldSpatial.Direction orientation, float delta) {\n\t\tswitch(orientation){\n\t\tcase EAST:\n\t\t\tif(!getOrientation().equals(WorldSpatial.Direction.SOUTH)){\n\t\t\t\tturnRight(delta);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase NORTH:\n\t\t\tif(!getOrientation().equals(WorldSpatial.Direction.EAST)){\n\t\t\t\tturnRight(delta);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SOUTH:\n\t\t\tif(!getOrientation().equals(WorldSpatial.Direction.WEST)){\n\t\t\t\tturnRight(delta);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase WEST:\n\t\t\tif(!getOrientation().equals(WorldSpatial.Direction.NORTH)){\n\t\t\t\tturnRight(delta);\n\t\t\t}\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t\n\t\t}\n\t\t\n\t}", "public void moveRight(int speed)\n {\n if(getRotation()==0)\n {\n move(speed);\n }\n else if(getRotation()==90)\n {\n turn(-90);\n move(speed);\n }\n else if(getRotation()==180)\n {\n turn(180);\n move(speed);\n }\n else if(getRotation()==270)\n {\n turn(90);\n move(speed);\n }\n }", "public void rotatePieceRight(){\r\n if (hasFalling()){\r\n FallingPiece test =falling.rotateRight();\r\n if (!moveIfNoConflict(test, falling))\r\n Kick(test, falling);\r\n if(isGhostActivated())\r\n \t\t\tgenerateGhost();\r\n }\r\n }", "public void moveRight(){\n myRectangle.setX(myRectangle.getX() + PADDLE_SPEED);\n }", "public void goRight()\r\n\t{\r\n\t\tthis.X++;\r\n\t}", "public Direction right() {\n\t\treturn right;\n\t}", "public Direction right() {\r\n\t\tint newDir = this.index + 1;\r\n\r\n\t\tnewDir = (this.index + 1 == 5) ? 1 : newDir;\r\n\t\treturn getEnum(newDir);\r\n\t}", "private boolean moveRight() {\n\t\tint moduleSpeed = stats.getSPEED();\n\n\t\tgetTorax().setRotationg(getTorax().getRotationg() + rotationRate);\n\t\tgetLegs().setRotationg(getLegs().getRotationg() + rotationRate);\n\n\t\tgetSpeed().setX(Math.cos(Math.toRadians(getTorax().getRotationg() - 90)) * moduleSpeed);\n\t\tgetSpeed().setY(Math.sin(Math.toRadians(getTorax().getRotationg() - 90)) * moduleSpeed);\n\n\t\tincreaseInfection();\n\n\t\treturn true;\n\t}", "public void moveRight(){\n if(currentText != null) {\n //The saved character index should no longer be restored\n savedCharacterIndex = -1;\n\n //Try to move the cursor\n characterIndex += 1;\n //If the cursor did not wrap onto a new line then update it's position\n if (characterIndex < currentText.getCharacterEdges().length) {\n updateXPosition(true);\n }\n //If the cursor wrapped onto a new line\n else {\n //If this was not the very last line move to the beginning of the next line\n if (lineIndex < texts.size() - 1) {\n lineIndex++;\n currentText = texts.get(lineIndex);\n characterIndex = 0;\n updatePosition();\n }\n //If this is the last line character index should not change and position does not need to be updated\n else {\n characterIndex = currentText.getCharacterEdges().length - 1;\n }\n }\n }\n }", "public boolean moveRight() \r\n\t{\r\n\t\tboolean moved = false;\r\n\t\tif ( maze [currentRow] [currentCol].isOpenRight() )\r\n\t\t{\r\n\t\t\tmaze [currentRow] [currentCol].removeWalker(Direction.RIGHT);\r\n\t\t\tif ( currentCol+1 >= size || maze [currentRow] [currentCol+1].isOpenLeft() )\r\n\t\t\t{\r\n\t\t\t\tcurrentCol++;\r\n\t\t\t\tmoved = true;\r\n\t\t\t}\r\n\t\t\tif ( currentCol < size )\r\n\t\t\t\tmaze [currentRow] [currentCol].InsertWalker();\r\n\t\t}\r\n\t\tSystem.out.println( \"Move Right: \" + moved );\r\n\t\treturn moved;\r\n\t}", "public void moveRight(int delta){\n if(x_velocity < maximumSpeed){\n x_velocity += accelerationSpeed*delta;\n if(x_velocity > maximumSpeed){\n x_velocity = maximumSpeed;\n }\n }\n moving = true;\n facing = Facing.RIGHT;\n movingRight = true;\n movingLeft = false;\n }", "public static void turnrightBy(double angle) {\n leftMotor.rotate(convertAngle(angle), true);\n rightMotor.rotate(-convertAngle(angle), false);\n }", "public void turnRight(double speed) {\n\t\tRobotMap.frontLeft.set(speed);\n\t\tRobotMap.backLeft.set(speed);\n\t\tRobotMap.frontRight.set(speed);\n\t\tRobotMap.backRight.set(speed);\n\t}", "@Override\n\tpublic void moveRight()\n\t{\n\t\tif (!isAtEnd()) left.push(right.pop());\n\t}", "public void turnRight(Agent agent) throws RemoteException {\n\t\tturnLeft(agent); // The processing is the same.\n\t}", "public void rotateRight() {\n\t\tif (rotRight == null) {\n\t\t\tQuaternion quat = new Quaternion();\n\t\t\tquat.fromAngles(0f, (float) Math.toRadians(-90), 0f);\n\t\t\trotRight = quat.toRotationMatrix();\n\t\t}\n\n\t\tgetNode().getLocalRotation().apply(rotRight);\n\t}", "public void moveTileRight(float delta) {\n if (x < destinationX - COMBAT_MOVEMENT_SPEED * delta) speedX = COMBAT_MOVEMENT_SPEED;\n else {\n speedX = (destinationX - x) / delta;\n isMoving = false;\n isMovingRight = false;\n }\n direction = Direction.RIGHT;\n }", "public void setMoveRight(boolean TorF) {\n moveRight = TorF;\n }", "public void rotRight()\n\t{\n\t\t//only rotate if a PlayerShip is currently spawned\n\t\tIIterator iter = gameObj.getIterator();\n\t\twhile(iter.hasNext())\n\t\t{\n\t\t\tGameObject current = (GameObject)iter.getNext();\n\t\t\tif(current instanceof PlayerShip)\n\t\t\t{\n\t\t\t\t((PlayerShip)current).moveRight();\n\t\t\t\tSystem.out.println(\"Heading +20\");\n\t\t\t\tnotifyObservers();\n\t\t\t\treturn;\n\t\t\t}\t\n\t\t}\n\t\tSystem.out.println(\"There is no playerShip spawned\");\n\t}", "public void moveRight()\n\t{\n\t\tcol++;\n\t}", "public Direction toRight(int deg)\n {\n return new Direction(dirInDegrees + deg);\n }", "public boolean getMoveRight() {\n\t\treturn moveRight;\n\t}", "private void LeftRightRight() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<1) {\n\t\t\t\tRobot.drivebase.run(.53, -.53);\n\t\t\t}\n \t\tif (Robot.autotime.get()>=1) {\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\n \t}\n\t\t\n\t}", "protected void down() {\n move(positionX, positionY + 1);\n orientation = BattleGrid.RIGHT_ANGLE;\n }", "public void rightPressed() {\n System.out.println(\"rightPressed()\");\n current.translate(0, 1);\n display.showBlocks();\n }", "public void goRight() {\n if(page.right == null)\n {\n if(editText.getText().toString().equals(\"\")) {\n return;\n }\n page.addRelation(\"right\",editText.getText().toString());\n editText.setText(\"\");\n }\n\n page = page.right;\n addQueue();\n }", "public void changeDirection(){\n\t\tthis.toRight ^= true;\n\t\t\n\t\tif(this.toRight)\n\t\t\tthis.nextElem = (this.currElem + 1) % players.size();\n\t\telse\n\t\t\tthis.nextElem = (this.currElem - 1 + players.size()) % players.size();\n\t}", "public FallingPiece moveRight(){\r\n return new FallingPiece(coord.moveRight(), innerPiece);\r\n }", "public void moveRight() {\n this.position.addColumn(1);\n }", "public void turnRight(boolean endWithBrake){\r\n Motor.B.rotate(DEGREES_PER_TURN, true);//Accesses Motor thread\r\n Motor.C.rotate(-1*DEGREES_PER_TURN, true);\r\n while(Motor.B.isMoving() || Motor.C.isMoving())\r\n ;//wait for motors to be done\r\n return;\r\n }", "public boolean isMoveRight() {\n return moveRight;\n }", "public Direction right() {\r\n\t\tif (this.direction == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tswitch (this.direction) {\r\n\t\tcase NORTH:\r\n\t\t\tthis.direction = Direction.EAST;\r\n\t\t\tbreak;\r\n\t\tcase WEST:\r\n\t\t\tthis.direction = Direction.NORTH;\r\n\t\t\tbreak;\r\n\t\tcase SOUTH:\r\n\t\t\tthis.direction = Direction.WEST;\r\n\t\t\tbreak;\r\n\t\tcase EAST:\r\n\t\t\tthis.direction = Direction.SOUTH;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn this.direction;\r\n\t}", "private void driveRight() {\n setSpeed(MAX_SPEED, MIN_SPEED);\n }", "private static void turnRight(Robot r) \n {\n for(int i=0; i<3;i++)\n {\n r.turnLeft();\n }\n }", "public boolean moveRight() {\r\n\t\tif (this.x >= 1050 == true) {\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\tthis.x += 5;\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "public void rotRight()\n\t{\n\t\t//only rotate if a PlayerShip is currently spawned\n\t\tif(gameObj[1].size() > 0)\n\t\t{\n\t\t\t((PlayerShip)gameObj[1].get(0)).moveRight();\n\t\t\tSystem.out.println(\"Heading -10 degrees\");\n\t\t}else {\n\t\t\tSystem.out.println(\"there is not currently a player ship spawned\");\n\t\t}\n\t}", "public void moveRight() {\n\t\tif (x1 < 24 && x2 < 24 && x3 < 24 && x4 < 24) {\n\t\t\tclearPiece();\n\t\t\tx1 += 1;\n\t\t\tx2 += 1;\n\t\t\tx3 += 1;\n\t\t\tx4 += 1;\n\t\t\tsetPiece();\n\t\t\trepaint();\n\t\t}\n\t}", "public void moveRight()\n {\n if (!this.search_zone.isRightBorder(this.x_position))\n {\n this.x_position = (this.x_position + 1);\n }\n }", "public void moveRight() {\n if (rec.getUpperLeft().getX() + rec.getWidth() + 5 > rightBorder) {\n rec.getUpperLeft().setX(rightBorder - rec.getWidth());\n } else {\n rec.getUpperLeft().setX(rec.getUpperLeft().getX() + 5);\n }\n }", "public void setMoveRight(boolean moveRight) {\n\t\tthis.moveRight = moveRight;\n\t}", "public static int rotateRight(int dir) {\n return (dir - 1) & 3;\n }", "public abstract void rotateRight();", "public void strafeRight()\r\n\t{\r\n\t\t//Following the camera:\r\n\t\tif(loc[1] > 1)\r\n\t\t{\r\n\t\t\tthis.loc[0] += Math.sin(Math.toRadians(heading))*distance; \r\n\t\t\tthis.loc[2] += Math.cos(Math.toRadians(heading))*distance;\r\n\t\t}\r\n\t}", "private void RightLeftRight() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<.5) {\n\t\t\t\tRobot.cubebase.clickdown();//pay attention: maybe this is clickup()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\t\t\t}\n \t\tif (Robot.autotime.get()>=.5&&Robot.autotime.get()<2.5) {\n \t\t\tRobot.cubebase.clickstop();\n\t\t\t\tRobot.cubebase.liftdown();//pay attention: maybe this is liftdown()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\t\t\t}\n \t\t //about 300cm note: 0.08*2->90*2=180cm 0.08*3->90*3=270cm 270+45=315cm->0.08*3+0.08/2=0.28s\n \t\tif (Robot.autotime.get()>=2.5&&Robot.autotime.get()<3.9) {\n\t\t\t\tRobot.cubebase.stoplift();\n\t\t\t\tRobot.drivebase.run(.53, -.53 );\n\t\t\t}\n \t\tif (Robot.autotime.get()>=3.9&&Robot.autotime.get()<5.9) {\n\t\t\t\tRobot.cubebase.stopall();\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t}\n \t\tif (Robot.autotime.get()>5.9&&Robot.autotime.get()<6.2) {\n\t\t\t\tRobot.pneumatics_drive.close1();\n\t\t\t}\n \t\tif (Robot.autotime.get()>6.2) {\n \t\t\tRobot.cubebase.stopall();\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n \t\t}}\n \t\t\n\t\t\n\t}", "public void rightPressed() {\n\t\tif (edit) {\n\t\t\tcurrentDeck.right();\n\t\t}\n\t}", "@Override\n\tpublic void run() {\n\t\tmoveRight();\n\t}", "public void moveRight() {\r\n speedX = 6;\r\n Texture r1 = changeImg (\"./graphics/characters/player/rightWalk1.png\");\r\n img = new Sprite (r1);\r\n if (centerX > startScrolling)\r\n bg.setBackX (bg.getBackX () + 6);\r\n bg.update ();\r\n }", "private void playerMoveRight()\n {\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(false);\n this.setCurrentX(getCurrentX() + 1);\n if (this.getCurrentX() < 11) {\n if (!nextIsWall()) {\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n } else {\n this.setCurrentX(this.getCurrentX() - 1);\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n }\n } else {\n this.setCurrentX(this.getCurrentX() - 1);\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n }\n }", "public void spinRight(double speed) {\r\n \tspeed = Math.abs(speed);\r\n \tleftTopMotor.set(speed);\r\n \tleftBottomMotor.set(speed);\r\n \trightTopMotor.set(speed);\r\n \trightBottomMotor.set(speed);\r\n }", "public void rightDrive(double speed) {\n\t\tright1.set(speed);\n\t\tright2.set(speed);\n\t\tright3.set(speed);\n\t}", "public void rightPressed() \n\t{\n\t\tkeys.get(keys.put(Keys.RIGHT, true));\n\t}", "public void animateMovementRight()\n {\n if(animationCount%frameRate == 0)\n {\n imageNumber = (imageNumber + 1)% (rightMvt.length);\n setImage(rightMvt[imageNumber]);\n }\n }", "public FallingPiece rotateRight(){\r\n return new FallingPiece(coord, innerPiece.rotateRight());\r\n }", "void reverseDirection();" ]
[ "0.8702539", "0.85356164", "0.85074335", "0.84644336", "0.83579403", "0.8292539", "0.8283267", "0.8251127", "0.82061327", "0.8193845", "0.7971751", "0.795733", "0.7928857", "0.7903448", "0.78905344", "0.7807404", "0.77573586", "0.77384114", "0.77215046", "0.76952046", "0.7684827", "0.7659651", "0.76358515", "0.75919724", "0.7583098", "0.7564018", "0.75607765", "0.7532385", "0.7489921", "0.7488778", "0.74718094", "0.7419692", "0.74050164", "0.7364508", "0.7321497", "0.7316855", "0.7309384", "0.73066807", "0.7301515", "0.7297423", "0.72814935", "0.7267746", "0.7266236", "0.7242385", "0.72155064", "0.7174235", "0.7170049", "0.716269", "0.7146921", "0.7136696", "0.71306264", "0.71078545", "0.710256", "0.7036703", "0.7029535", "0.70236087", "0.7015181", "0.70138973", "0.700764", "0.69965595", "0.6996032", "0.6993953", "0.69818026", "0.6981189", "0.69289124", "0.69199884", "0.690845", "0.69016916", "0.68952394", "0.6889587", "0.6882999", "0.6872809", "0.6854735", "0.684972", "0.68270564", "0.6826263", "0.6824316", "0.6814021", "0.681304", "0.6812608", "0.68084717", "0.6803053", "0.67954504", "0.6793241", "0.6790357", "0.67862445", "0.6785937", "0.67557627", "0.67372835", "0.67181444", "0.6717868", "0.6689557", "0.6668577", "0.6663278", "0.6649749", "0.6633192", "0.663283", "0.6622855", "0.6615968", "0.65854347" ]
0.74245065
31
Creates the default factory implementation.
public static Tp2Factory init() { try { Tp2Factory theTp2Factory = (Tp2Factory)EPackage.Registry.INSTANCE.getEFactory("http:///recette1-tp2-v0"); if (theTp2Factory != null) { return theTp2Factory; } } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new Tp2FactoryImpl(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Factory() {\n\t\tsuper();\n\t}", "public BuiltinFactoryImpl() {\n\t\tsuper();\n\t}", "public ObjectifyFactory factory() {\n return ofy().factory();\n }", "private ConcreteFactory() {}", "public static StaticFactoryInsteadOfConstructors create(){\n return new StaticFactoryInsteadOfConstructors();\n }", "public static Factory factory() {\n return ext_h::new;\n }", "public EsoFactoryImpl()\r\n {\r\n super();\r\n }", "public XCanopusFactoryImpl()\r\n {\r\n super();\r\n }", "public CommonsFactoryImpl() {\n\t\tsuper();\n\t}", "public Factory() {\n this(getInternalClient());\n }", "public EcoreFactoryImpl() {\r\n\t\tsuper();\r\n\t}", "public PiviFactoryImpl() {\r\n\t\tsuper();\r\n\t}", "public EcoreFactoryImpl() {\n super();\n }", "public ServiceFactoryImpl() {\n\t\tsuper();\n\t}", "public static StaticFactoryInsteadOfConstructors newInstance() {\n return new StaticFactoryInsteadOfConstructors();\n }", "public interface Factory {\r\n}", "public EcoreFactoryImpl()\n {\n super();\n }", "public ProyectoFactoryImpl() {\r\n\t\tsuper();\r\n\t}", "public PedidoFactoryImpl() {\n\t\tsuper();\n\t}", "default Factory<T> toFactory() {\n throw new UnsupportedOperationException();\n }", "private ServiceFactory() {}", "protected abstract S createDefault();", "public ObjectFactory() {}", "public ObjectFactory() {}", "public ObjectFactory() {}", "public CoreFactoryImpl() {\n\t\tsuper();\n\t}", "public LanterneFactoryImpl() {\n\t\tsuper();\n\t}", "public static BuiltinFactory init() {\n\t\ttry {\n\t\t\tBuiltinFactory theBuiltinFactory = (BuiltinFactory)EPackage.Registry.INSTANCE.getEFactory(\"http://www.soluvas.com/schema/story.builtin/1.0\"); \n\t\t\tif (theBuiltinFactory != null) {\n\t\t\t\treturn theBuiltinFactory;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new BuiltinFactoryImpl();\n\t}", "public FvFactoryImpl() {\n\t\tsuper();\n\t}", "public GpflFactoryImpl()\n {\n super();\n }", "public Testing2FactoryImpl() {\n\t\tsuper();\n\t}", "public static Factory factory() {\n return ext_dbf::new;\n }", "public PascalFactoryImpl()\n {\n super();\n }", "public ObjectFactory() {\r\n\t}", "public ObjectFactory() {\n\t}", "public MystFactoryImpl()\r\n {\r\n super();\r\n }", "public borFactoryImpl() {\n\t\tsuper();\n\t}", "public Factory() {\n\t\tclassMap = new TreeMap<String,Class<T> >();\n\t}", "public interface AbstractFactory {\n /**\n * Create cpu cpu.\n *\n * @return the cpu\n */\n Cpu createCpu();\n\n /**\n * Create main board main board.\n *\n * @return the main board\n */\n MainBoard createMainBoard();\n}", "public BasicSafetyCaseFactoryImpl() {\n\t\tsuper();\n\t}", "public interface Factory<T> {\n T create();\n}", "public static Factory factory() {\n return Document_print::new;\n }", "public ParameterizedInstantiateFactory() {\r\n super();\r\n }", "public interface Factory {\n LeiFeng createLeiFeng();\n}", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public static PedidoFactory init() {\n\t\ttry {\n\t\t\tPedidoFactory thePedidoFactory = (PedidoFactory) EPackage.Registry.INSTANCE\n\t\t\t\t\t.getEFactory(PedidoPackage.eNS_URI);\n\t\t\tif (thePedidoFactory != null) {\n\t\t\t\treturn thePedidoFactory;\n\t\t\t}\n\t\t} catch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new PedidoFactoryImpl();\n\t}", "public WdlFactoryImpl() {\n\t\tsuper();\n\t}", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }" ]
[ "0.77731436", "0.76486766", "0.74667984", "0.7430188", "0.7425205", "0.7364157", "0.72402287", "0.7239365", "0.71722776", "0.7160405", "0.71596897", "0.7150511", "0.71012115", "0.7100998", "0.7089295", "0.70861953", "0.7084425", "0.7056558", "0.70475817", "0.70462054", "0.7032594", "0.7027336", "0.70211387", "0.70211387", "0.70211387", "0.7005747", "0.69869524", "0.6978728", "0.6977554", "0.69731724", "0.69722575", "0.69408", "0.68847215", "0.6878918", "0.68729496", "0.68370944", "0.6811484", "0.6809534", "0.6806006", "0.68028957", "0.6800011", "0.67854184", "0.6762015", "0.67484313", "0.6740896", "0.6740896", "0.6740896", "0.6740896", "0.6740896", "0.6740896", "0.6740896", "0.6740896", "0.6740896", "0.6740896", "0.6740896", "0.6740896", "0.6740896", "0.6740896", "0.6740896", "0.6740896", "0.6740896", "0.6740896", "0.6740896", "0.6740896", "0.6740896", "0.6740896", "0.6740896", "0.6740896", "0.6740896", "0.6740896", "0.6740896", "0.6740896", "0.6740896", "0.6740896", "0.6740896", "0.6740896", "0.6740896", "0.6740896", "0.6740896", "0.6740896", "0.6740896", "0.6740896", "0.6740896", "0.6740896", "0.6740896", "0.6740896", "0.6740896", "0.6740896", "0.6740896", "0.6740896", "0.6740896", "0.6740896", "0.6738694", "0.6737374", "0.67329735", "0.67329735", "0.67329735", "0.67329735", "0.67329735", "0.67329735", "0.67329735" ]
0.0
-1
Creates an instance of the factory.
public Tp2FactoryImpl() { super(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Factory() {\n\t\tsuper();\n\t}", "public Factory() {\n this(getInternalClient());\n }", "public static StaticFactoryInsteadOfConstructors create(){\n return new StaticFactoryInsteadOfConstructors();\n }", "Instance createInstance();", "public ObjectifyFactory factory() {\n return ofy().factory();\n }", "public static StaticFactoryInsteadOfConstructors newInstance() {\n return new StaticFactoryInsteadOfConstructors();\n }", "private ConcreteFactory() {}", "public ObjectFactory() {}", "public ObjectFactory() {}", "public ObjectFactory() {}", "public static Factory factory() {\n return ext_h::new;\n }", "public XCanopusFactoryImpl()\r\n {\r\n super();\r\n }", "public PedidoFactoryImpl() {\n\t\tsuper();\n\t}", "private EntityFactory() {}", "public static Factory factory() {\n return ext_dbf::new;\n }", "public void create(){}", "private ServiceFactory() {}", "public static BookFactory getInstance()\r\n {\r\n \r\n if(bookFactoryInstance == null)\r\n {\r\n bookFactoryInstance = new BookFactory();\r\n }\r\n \r\n return bookFactoryInstance;\r\n }", "private Object createInstance() throws InstantiationException, IllegalAccessException {\n\t\treturn classType.newInstance();\n\t}", "public EsoFactoryImpl()\r\n {\r\n super();\r\n }", "public ProyectoFactoryImpl() {\r\n\t\tsuper();\r\n\t}", "public ParameterizedInstantiateFactory() {\r\n super();\r\n }", "public ObjectFactory() {\r\n\t}", "public ObjectFactory() {\n\t}", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }" ]
[ "0.7391671", "0.72116536", "0.7200527", "0.69749236", "0.6974179", "0.6835844", "0.670994", "0.66708535", "0.66708535", "0.66708535", "0.6663977", "0.6616158", "0.6615379", "0.66138345", "0.6588669", "0.6567762", "0.6533578", "0.65324074", "0.6525644", "0.65160364", "0.6474476", "0.6474007", "0.64715123", "0.6471304", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267", "0.64597267" ]
0.0
-1
Construct a new centralizer of the parent group using the explicitly given set. It is assumed that the given set indeeds forms the elements of a centralizer of the parent.
public Centralizer(final Group<T> parent, final T element) { if (parent == null || element == null) { throw new NullPointerException(); } mParent = parent; mElement = element; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void makeSet(int [] parent)\n\t\t{\n\t\t\tfor(int i = 0; i < edges; i++)\n\t\t\t\tparent[i] = i;\n\t\t}", "public static void makeSet(int[] parent, WeightedGraph graph) {\n //Make set, creating a new element for all Vertices in the graph with a parent pointer to itself.\n for (int i = 0; i < graph.getVertices(); i++) {\n parent[i] = i;\n }\n }", "Boolean superset(MultiSet<X> s);", "GeneralizationSet createGeneralizationSet();", "void unionTreeCoreset(int k,int n_1,int n_2,int d, Point[] setA,Point[] setB, Point[] centres, MTRandom clustererRandom) {\n\t\t//printf(\"Computing coreset...\\n\");\n\t\t//total number of points\n\t\tint n = n_1+n_2;\n\n\t\t//choose the first centre (each point has the same probability of being choosen)\n\t\t\n\t\t//stores, how many centres have been choosen yet\n\t\tint choosenPoints = 0; \n\t\t\n\t\t//only choose from the n-i points not already choosen\n\t\tint j = clustererRandom.nextInt(n-choosenPoints); \n\n\t\t//copy the choosen point\n\t\tif(j < n_1){\n\t\t\t//copyPointWithoutInit(&setA[j],&centres[choosenPoints]);\n\t\t\tcentres[choosenPoints] = setA[j].clone();\n\t\t} else {\n\t\t\tj = j - n_1;\n\t\t\t//copyPointWithoutInit(&setB[j],&centres[choosenPoints]);\n\t\t\tcentres[choosenPoints] = setB[j].clone();\n\t\t}\n\t\ttreeNode root = new treeNode(setA,setB,n_1,n_2, centres[choosenPoints],choosenPoints); //??\n\t\tchoosenPoints = 1;\n\t\t\n\t\t//choose the remaining points\n\t\twhile(choosenPoints < k){\n\t\t\tif(root.cost > 0.0){\n\t\t\t\ttreeNode leaf = selectNode(root, clustererRandom);\n\t\t\t\tPoint centre = chooseCentre(leaf, clustererRandom);\n\t\t\t\tsplit(leaf,centre,choosenPoints);\n\t\t\t\t//copyPointWithoutInit(centre,&centres[choosenPoints]);\n\t\t\t\tcentres[choosenPoints] = centre;\n\t\t\t} else {\n\t\t\t\t//create a dummy point\n\t\t\t\t//copyPointWithoutInit(root.centre,&centres[choosenPoints]);\n\t\t\t\tcentres[choosenPoints] = root.centre;\n\t\t\t\tint l;\n\t\t\t\tfor(l=0;l<root.centre.dimension;l++){\n\t\t\t\t\tcentres[choosenPoints].coordinates[l] = -1 * 1000000;\n\t\t\t\t}\n\t\t\t\tcentres[choosenPoints].id = -1;\n\t\t\t\tcentres[choosenPoints].weight = 0.0;\n\t\t\t\tcentres[choosenPoints].squareSum = 0.0;\n\t\t\t}\n\t\t\t\n\t\t\tchoosenPoints++;\n\t\t}\n\n\t\t//free the tree\n\t\tfreeTree(root);\n\n\t\t//recalculate clustering features\n\t\tint i;\n\t\tfor(i=0;i<n;i++){\n\t\t\t\t\n\t\t\tif(i < n_1) {\n\t\t\t\t\n\t\t\t\tint index = setA[i].centreIndex;\n\t\t\t\tif(centres[index].id != setA[i].id){\n\t\t\t\t\tcentres[index].weight += setA[i].weight;\n\t\t\t\t\tcentres[index].squareSum += setA[i].squareSum;\n\t\t\t\t\tint l;\n\t\t\t\t\tfor(l=0;l<centres[index].dimension;l++){\n\t\t\t\t\t\tif(setA[i].weight != 0.0){\n\t\t\t\t\t\t\tcentres[index].coordinates[l] += setA[i].coordinates[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\t\n\t\t\t\tint index = setB[i-n_1].centreIndex;\n\t\t\t\tif(centres[index].id != setB[i-n_1].id){\n\t\t\t\t\tcentres[index].weight += setB[i-n_1].weight;\n\t\t\t\t\tcentres[index].squareSum += setB[i-n_1].squareSum;\n\t\t\t\t\tint l;\n\t\t\t\t\tfor(l=0;l<centres[index].dimension;l++){\n\t\t\t\t\t\tif(setB[i-n_1].weight != 0.0){\n\t\t\t\t\t\t\tcentres[index].coordinates[l] += setB[i-n_1].coordinates[l];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private ISet<S> expand(ISet<S> set) {\n\t\t\tISet<S> expanded = ISets.empty();\n\t\t\tfor (S b : set) {\n\t\t\t\texpanded = expanded.union(b);\n\t\t\t\tif (!reasoner.entails(base.minus(expanded), sentence)) {\n\t\t\t\t\treturn expanded;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t}", "Set createSet();", "Set<CACell> automateNGetOuterLayerSet(CACrystal crystal, final Set<CACell> set);", "public MyMultiset() {\n\t\tthis.set = new HashSet<Node>();\n\t}", "protected void configureNorthCenter(LayoutOptions parent){\n LayoutOptions childOptions = new LayoutOptions(); \n parent.setChildOptions(childOptions); \n\t\t\n\t\t// options for north-center-west pane \n LayoutOptions west = new LayoutOptions();\n fixed(west);\n west.addOption(\"size\", \"40\"); \n childOptions.setWestOptions(west); \n \n // options for north-center-center pane \n LayoutOptions center = new LayoutOptions(); \n childOptions.setCenterOptions(center);\n\t}", "public Map<K, Set<V>> coreGetAllSupersetsOf(Collection<?> set, int mode) {\n // Skip elements in the collection having an incorrect type, as we are looking for subsets which simply\n // cannot contain the conflicting items\n Set<V> navSet = createNavigableSet(set, true);\n Iterator<V> it = navSet.iterator();\n\n List<SetTrieNode> frontier = new ArrayList<>();\n frontier.add(superRootNode);\n\n // For every value, extend the frontier with the successor nodes for that value.\n V from = null;\n V upto = null;\n\n // Use a flag for null safety so we do not rely on the comparator to treat null as the least element\n boolean isLeastFrom = true;\n while(it.hasNext()) {\n from = upto;\n upto = it.next();\n\n List<SetTrieNode> nextNodes = new ArrayList<>();\n\n // Based on the frontier, we need to keep scanning nodes whose values is in the range [from, upto]\n // until we find the nodes whose values equals upto\n // Only these nodes then constitute the next frontier\n Collection<SetTrieNode> currentScanNodes = frontier;\n do {\n Collection<SetTrieNode> nextScanNodes = new ArrayList<>();\n for(SetTrieNode currentNode : currentScanNodes) {\n if(currentNode.nextValueToChild != null) {\n NavigableMap<V, SetTrieNode> candidateNodes = isLeastFrom\n ? currentNode.nextValueToChild.headMap(upto, true)\n : currentNode.nextValueToChild.subMap(from, true, upto, true);\n\n for(SetTrieNode candidateNode : candidateNodes.values()) {\n if(Objects.equals(candidateNode.value, upto)) {\n nextNodes.add(candidateNode);\n } else {\n nextScanNodes.add(candidateNode);\n }\n }\n }\n }\n currentScanNodes = nextScanNodes;\n } while(!currentScanNodes.isEmpty());\n\n frontier = nextNodes;\n\n isLeastFrom = false;\n }\n\n Map<K, Set<V>> result = new HashMap<>();\n\n // Copy all data entries associated with the frontier to the result\n Stream<SetTrie<K, V>.SetTrieNode> stream = frontier.stream();\n\n if(mode != 0) {\n stream = stream.flatMap(node -> reachableNodesAcyclic(\n node,\n x -> (x.nextValueToChild != null ? x.nextValueToChild.values() : Collections.<SetTrieNode>emptySet()).stream()));\n }\n\n stream.forEach(currentNode -> {\n if(currentNode.keyToSet != null) {\n for(Entry<K, NavigableSet<V>> e : currentNode.keyToSet.entrySet()) {\n result.put(e.getKey(), e.getValue());\n }\n }\n });\n\n return result;\n }", "private void setParentBounds() {\n GraphRepresentation baseGraph = graphRepresentationFactory.getBaseGraph();\n\n Iterator<Task> iterator = tasks.iterator();\n while (iterator.hasNext()) {\n Task nextTask = iterator.next();\n List<Integer> nextTaskParents = baseGraph.getParents(nextTask.getIdentifier());\n nextTask.setParentBound(nextTaskParents.size());\n }\n }", "public SectionSets (Collection<Collection<Section>> sets)\r\n {\r\n this.sets = sets;\r\n }", "public void setParent(@CheckForNull final OtuSet parent) {\n\t\tthis.parent = parent;\n\t}", "<E extends CtElement> E setParent(E parent);", "protected void configureCenter(LayoutOptions parent){\n LayoutOptions childOptions = new LayoutOptions(); \n parent.setChildOptions(childOptions); \n \n // options for center-north pane \n //LayoutOptions north = new LayoutOptions();\n //childOptions.setNorthOptions(north); \n \n createOptions(childOptions, CardinalPoint.CENTER);\n \n // options for center-south pane \n LayoutOptions south = createOptions(childOptions, CardinalPoint.SOUTH);\n setAttribute(south, \"size\", \"34\");\n fixed(south);\n \n //childOptions.setSouthOptions(south);\n \n \n\t}", "public void setParentOne(int parent)\n\t{\n\t\tparentSetOne = parent;\n\t}", "ClusterSet() {\n }", "public static Set transformedSet(Set set, Transformer transformer) {\n/* 221 */ return TransformedSet.decorate(set, transformer);\n/* */ }", "@Override\n\tpublic void layoutContainer(Container parent) {\n\t\tPoint origin = new Point(parent.getWidth() / 2, parent.getHeight() / 2);\n\t\tdouble angle = Math.toRadians(360./edge.size());\n\t\tint radius = parent.getHeight() / 2 - 100;\n\t\tint compEdge = 150;\n\t\tfor (int i = 0; i < edge.size(); i++) {\n\t\t\tComponent comp = edge.get(i);\n\t\t\tdouble theta = i * angle;\n\t\t\tint dx = (int) (radius * Math.sin(theta));\n\t\t\tint dy = (int) (-radius * Math.cos(theta));\n\t\t\tint x = origin.x + dx - compEdge/2;\n\t\t\tint y = origin.y + dy - compEdge/2;\n\t\t\tcomp.setBounds(x, y, compEdge, compEdge);\n\t\t}\n\t\tDimension centerSize = center.getPreferredSize();\n\t\tint dx = (int) centerSize.getWidth()/2;\n\t\tint dy = (int) centerSize.getHeight()/2;\n\t\tcenter.setBounds(origin.x - dx, origin.y - dy, 2 * dx, 2 * dy);\n\t}", "private Set() {\n this(\"<Set>\", null, null);\n }", "public PTreeCredalSet(PotentialInterval intervalSet){\n super(intervalSet.getVariables());\n ProbabilityTree pTree;\n pTree=intervalsToPTreeCredalSet(intervalSet);\n setTree(pTree);\n }", "protected void setParent(Group parent) {\n internalGroup.setParent(parent.internalGroup);\n }", "public DisjointSet(Collection<E> c) {\n c.forEach(e -> {\n Node<E> n = new Node<>(e);\n theMap.put(e, n);\n theSet.add(n);\n });\n }", "public final IntSet setRule() throws RecognitionException {\n\t\tIntSet elements = new IntervalSet();\n\n\n\t\tGrammarAST id=null;\n\n\n\t\t\tIntSet s=null;\n\n\t\ttry {\n\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:680:2: ( ^( RULE id= ID ( modifier )? ARG RET ( ^( OPTIONS ( . )* ) )? ( ruleScopeSpec )? ( ^( AMPERSAND ( . )* ) )* ^( BLOCK ( ^( OPTIONS ( . )* ) )? ( ^( ALT ( BACKTRACK_SEMPRED )? setElement[elements] EOA ) )+ EOB ) ( exceptionGroup )? EOR ) )\n\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:680:4: ^( RULE id= ID ( modifier )? ARG RET ( ^( OPTIONS ( . )* ) )? ( ruleScopeSpec )? ( ^( AMPERSAND ( . )* ) )* ^( BLOCK ( ^( OPTIONS ( . )* ) )? ( ^( ALT ( BACKTRACK_SEMPRED )? setElement[elements] EOA ) )+ EOB ) ( exceptionGroup )? EOR )\n\t\t\t{\n\t\t\tmatch(input,RULE,FOLLOW_RULE_in_setRule1460); if (state.failed) return elements;\n\t\t\tmatch(input, Token.DOWN, null); if (state.failed) return elements;\n\t\t\tid=(GrammarAST)match(input,ID,FOLLOW_ID_in_setRule1464); if (state.failed) return elements;\n\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:680:18: ( modifier )?\n\t\t\tint alt61=2;\n\t\t\tint LA61_0 = input.LA(1);\n\t\t\tif ( (LA61_0==FRAGMENT||(LA61_0 >= PRIVATE && LA61_0 <= PUBLIC)) ) {\n\t\t\t\talt61=1;\n\t\t\t}\n\t\t\tswitch (alt61) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:680:19: modifier\n\t\t\t\t\t{\n\t\t\t\t\tpushFollow(FOLLOW_modifier_in_setRule1467);\n\t\t\t\t\tmodifier();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return elements;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t\tmatch(input,ARG,FOLLOW_ARG_in_setRule1471); if (state.failed) return elements;\n\t\t\tmatch(input,RET,FOLLOW_RET_in_setRule1473); if (state.failed) return elements;\n\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:680:38: ( ^( OPTIONS ( . )* ) )?\n\t\t\tint alt63=2;\n\t\t\tint LA63_0 = input.LA(1);\n\t\t\tif ( (LA63_0==OPTIONS) ) {\n\t\t\t\talt63=1;\n\t\t\t}\n\t\t\tswitch (alt63) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:680:40: ^( OPTIONS ( . )* )\n\t\t\t\t\t{\n\t\t\t\t\tmatch(input,OPTIONS,FOLLOW_OPTIONS_in_setRule1478); if (state.failed) return elements;\n\t\t\t\t\tif ( input.LA(1)==Token.DOWN ) {\n\t\t\t\t\t\tmatch(input, Token.DOWN, null); if (state.failed) return elements;\n\t\t\t\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:680:50: ( . )*\n\t\t\t\t\t\tloop62:\n\t\t\t\t\t\twhile (true) {\n\t\t\t\t\t\t\tint alt62=2;\n\t\t\t\t\t\t\tint LA62_0 = input.LA(1);\n\t\t\t\t\t\t\tif ( ((LA62_0 >= ACTION && LA62_0 <= XDIGIT)) ) {\n\t\t\t\t\t\t\t\talt62=1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if ( (LA62_0==UP) ) {\n\t\t\t\t\t\t\t\talt62=2;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tswitch (alt62) {\n\t\t\t\t\t\t\tcase 1 :\n\t\t\t\t\t\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:680:50: .\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tmatchAny(input); if (state.failed) return elements;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tdefault :\n\t\t\t\t\t\t\t\tbreak loop62;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tmatch(input, Token.UP, null); if (state.failed) return elements;\n\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:680:57: ( ruleScopeSpec )?\n\t\t\tint alt64=2;\n\t\t\tint LA64_0 = input.LA(1);\n\t\t\tif ( (LA64_0==SCOPE) ) {\n\t\t\t\talt64=1;\n\t\t\t}\n\t\t\tswitch (alt64) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:680:59: ruleScopeSpec\n\t\t\t\t\t{\n\t\t\t\t\tpushFollow(FOLLOW_ruleScopeSpec_in_setRule1489);\n\t\t\t\t\truleScopeSpec();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return elements;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:681:4: ( ^( AMPERSAND ( . )* ) )*\n\t\t\tloop66:\n\t\t\twhile (true) {\n\t\t\t\tint alt66=2;\n\t\t\t\tint LA66_0 = input.LA(1);\n\t\t\t\tif ( (LA66_0==AMPERSAND) ) {\n\t\t\t\t\talt66=1;\n\t\t\t\t}\n\n\t\t\t\tswitch (alt66) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:681:6: ^( AMPERSAND ( . )* )\n\t\t\t\t\t{\n\t\t\t\t\tmatch(input,AMPERSAND,FOLLOW_AMPERSAND_in_setRule1500); if (state.failed) return elements;\n\t\t\t\t\tif ( input.LA(1)==Token.DOWN ) {\n\t\t\t\t\t\tmatch(input, Token.DOWN, null); if (state.failed) return elements;\n\t\t\t\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:681:18: ( . )*\n\t\t\t\t\t\tloop65:\n\t\t\t\t\t\twhile (true) {\n\t\t\t\t\t\t\tint alt65=2;\n\t\t\t\t\t\t\tint LA65_0 = input.LA(1);\n\t\t\t\t\t\t\tif ( ((LA65_0 >= ACTION && LA65_0 <= XDIGIT)) ) {\n\t\t\t\t\t\t\t\talt65=1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if ( (LA65_0==UP) ) {\n\t\t\t\t\t\t\t\talt65=2;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tswitch (alt65) {\n\t\t\t\t\t\t\tcase 1 :\n\t\t\t\t\t\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:681:18: .\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tmatchAny(input); if (state.failed) return elements;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tdefault :\n\t\t\t\t\t\t\t\tbreak loop65;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tmatch(input, Token.UP, null); if (state.failed) return elements;\n\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault :\n\t\t\t\t\tbreak loop66;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tmatch(input,BLOCK,FOLLOW_BLOCK_in_setRule1514); if (state.failed) return elements;\n\t\t\tmatch(input, Token.DOWN, null); if (state.failed) return elements;\n\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:682:13: ( ^( OPTIONS ( . )* ) )?\n\t\t\tint alt68=2;\n\t\t\tint LA68_0 = input.LA(1);\n\t\t\tif ( (LA68_0==OPTIONS) ) {\n\t\t\t\talt68=1;\n\t\t\t}\n\t\t\tswitch (alt68) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:682:15: ^( OPTIONS ( . )* )\n\t\t\t\t\t{\n\t\t\t\t\tmatch(input,OPTIONS,FOLLOW_OPTIONS_in_setRule1519); if (state.failed) return elements;\n\t\t\t\t\tif ( input.LA(1)==Token.DOWN ) {\n\t\t\t\t\t\tmatch(input, Token.DOWN, null); if (state.failed) return elements;\n\t\t\t\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:682:25: ( . )*\n\t\t\t\t\t\tloop67:\n\t\t\t\t\t\twhile (true) {\n\t\t\t\t\t\t\tint alt67=2;\n\t\t\t\t\t\t\tint LA67_0 = input.LA(1);\n\t\t\t\t\t\t\tif ( ((LA67_0 >= ACTION && LA67_0 <= XDIGIT)) ) {\n\t\t\t\t\t\t\t\talt67=1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if ( (LA67_0==UP) ) {\n\t\t\t\t\t\t\t\talt67=2;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tswitch (alt67) {\n\t\t\t\t\t\t\tcase 1 :\n\t\t\t\t\t\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:682:25: .\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tmatchAny(input); if (state.failed) return elements;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tdefault :\n\t\t\t\t\t\t\t\tbreak loop67;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tmatch(input, Token.UP, null); if (state.failed) return elements;\n\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:683:7: ( ^( ALT ( BACKTRACK_SEMPRED )? setElement[elements] EOA ) )+\n\t\t\tint cnt70=0;\n\t\t\tloop70:\n\t\t\twhile (true) {\n\t\t\t\tint alt70=2;\n\t\t\t\tint LA70_0 = input.LA(1);\n\t\t\t\tif ( (LA70_0==ALT) ) {\n\t\t\t\t\talt70=1;\n\t\t\t\t}\n\n\t\t\t\tswitch (alt70) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:683:9: ^( ALT ( BACKTRACK_SEMPRED )? setElement[elements] EOA )\n\t\t\t\t\t{\n\t\t\t\t\tmatch(input,ALT,FOLLOW_ALT_in_setRule1537); if (state.failed) return elements;\n\t\t\t\t\tmatch(input, Token.DOWN, null); if (state.failed) return elements;\n\t\t\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:683:15: ( BACKTRACK_SEMPRED )?\n\t\t\t\t\tint alt69=2;\n\t\t\t\t\tint LA69_0 = input.LA(1);\n\t\t\t\t\tif ( (LA69_0==BACKTRACK_SEMPRED) ) {\n\t\t\t\t\t\talt69=1;\n\t\t\t\t\t}\n\t\t\t\t\tswitch (alt69) {\n\t\t\t\t\t\tcase 1 :\n\t\t\t\t\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:683:16: BACKTRACK_SEMPRED\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmatch(input,BACKTRACK_SEMPRED,FOLLOW_BACKTRACK_SEMPRED_in_setRule1540); if (state.failed) return elements;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tpushFollow(FOLLOW_setElement_in_setRule1544);\n\t\t\t\t\tsetElement(elements);\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return elements;\n\t\t\t\t\tmatch(input,EOA,FOLLOW_EOA_in_setRule1547); if (state.failed) return elements;\n\t\t\t\t\tmatch(input, Token.UP, null); if (state.failed) return elements;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault :\n\t\t\t\t\tif ( cnt70 >= 1 ) break loop70;\n\t\t\t\t\tif (state.backtracking>0) {state.failed=true; return elements;}\n\t\t\t\t\tEarlyExitException eee = new EarlyExitException(70, input);\n\t\t\t\t\tthrow eee;\n\t\t\t\t}\n\t\t\t\tcnt70++;\n\t\t\t}\n\n\t\t\tmatch(input,EOB,FOLLOW_EOB_in_setRule1559); if (state.failed) return elements;\n\t\t\tmatch(input, Token.UP, null); if (state.failed) return elements;\n\n\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:686:4: ( exceptionGroup )?\n\t\t\tint alt71=2;\n\t\t\tint LA71_0 = input.LA(1);\n\t\t\tif ( (LA71_0==CATCH||LA71_0==FINALLY) ) {\n\t\t\t\talt71=1;\n\t\t\t}\n\t\t\tswitch (alt71) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:686:5: exceptionGroup\n\t\t\t\t\t{\n\t\t\t\t\tpushFollow(FOLLOW_exceptionGroup_in_setRule1571);\n\t\t\t\t\texceptionGroup();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return elements;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t\tmatch(input,EOR,FOLLOW_EOR_in_setRule1578); if (state.failed) return elements;\n\t\t\tmatch(input, Token.UP, null); if (state.failed) return elements;\n\n\t\t\t}\n\n\t\t}\n\t\tcatch (RecognitionException re) {\n\t\t\t throw re; \n\t\t}\n\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn elements;\n\t}", "public SetSet() {\n\t}", "public static SortedSet transformedSortedSet(SortedSet set, Transformer transformer) {\n/* 322 */ return TransformedSortedSet.decorate(set, transformer);\n/* */ }", "public Coalition(Set<Integer> coalition, PlayerSet players) {\n super();\n this.definedOn = players;\n Iterator<Integer> it = coalition.iterator();\n int element;\n while(it.hasNext()){\n element = it.next();\n if(!players.contains(element)){\n throw new IllegalArgumentException(\"agument 1 is not a proper coalition (members must be from the PlayerSet)\");\n }\n this.add(element);\n }\n }", "public KDNode CompNode() {\n\t\t\n\t\tKDNode ptr = this;\n\t\twhile(ptr.parent_ptr != null) {\n\t\t\t\n\t\t\tif(ptr.is_node_set == true) {\n\t\t\t\treturn ptr;\n\t\t\t}\n\t\t\t\n\t\t\tptr = ptr.parent_ptr;\n\t\t}\n\t\t\n\t\treturn ptr;\n\t}", "protected DisjointSet(int n) \n\t{\n\t\t// All nodes start as leaf nodes.\n\t\tparents = new int[n];\n\t\tfor (int i=0; i<n; i++)\n\t\t{\n\t\t //The indes of the array indicates its value and the value at the index is its root\n\t\t\tparents[i] = i;\n\t\t}\n\t}", "public int getParentOne()\n\t{\n\t\treturn parentSetOne;\n\t}", "public void resolveParent() {\n\t\tif (parentGroup.isEmpty() && parentName.isEmpty()) {\n\t\t\tparentDimensionId = dimensionId;\n\t\t} else {\n\t\t\tfinal CelestialObject celestialObjectParent = CelestialObjectManager.get(parentGroup, parentName);\n\t\t\tif (celestialObjectParent != null) {\n\t\t\t\tparentDimensionId = celestialObjectParent.dimensionId;\n\t\t\t}\n\t\t}\n\t}", "public Set(){\n setSet(new int[0]);\n }", "public ParseTreeNode visit(WithSetNode calcSetNode) {\n return null;\n }", "public void setParent (CompoundExpression parent){\n _parent = parent;\n }", "public DisjointSet() {}", "public PointSET() {\n pointSet = new TreeSet<>();\n }", "public SecurityMetadataUniversalSet build() {\n return new SecurityMetadataUniversalSet(this);\n }", "public SortedSet(ISet<E> other) {\n\n }", "private void createSetFKParent(){\n Hashtable table=sqlTagsGeneratorTable.getImportedForeignKeyHash();\n Enumeration enum=table.keys();\n\n buffer.append(\" /**\\n\");\n buffer.append(\" * The <b><code>setFKParent</code></b> method is \");\n buffer.append(\"used to initializes Foreign\\n\");\n buffer.append(\" * Key columns within the HCYP_EVENTS table.\\n\");\n buffer.append(\" * @author Booker Northington II\\n\");\n buffer.append(\" * @version 1.0\\n\");\n buffer.append(\" * @param depth how many levels to initialize.\\n\");\n buffer.append(\" * @return none\\n\");\n buffer.append(\" * @since JDK1.3\\n\");\n buffer.append(\" */\\n\");\n buffer.append(spacer);\n buffer.append(\" public void setFKParent(int depth){\\n\");\n buffer.append(spacer);\n buffer.append(\" if(depth>0){\\n\");\n\n for(;enum.hasMoreElements();){\n String key=(String)enum.nextElement();\n SQLTagsGeneratorForeignKey object=(SQLTagsGeneratorForeignKey)\n table.get(key);\n String fkName=object.getFkName();\n buffer.append(\" \"+fkName+\"_PARENT=get\"+fkName+\"_PARENT\");\n buffer.append(\"(depth-1);\\n\");\n }\n buffer.append(\" }\\n\");\n buffer.append(\" return;\\n\");\n buffer.append(\" }// setFKParent() ENDS\\n\");\n }", "public PrincipalSet getParentPrincipals(boolean arg0)\n throws AuthorizationException {\n return null;\n }", "public static Set orderedSet(Set set) {\n/* 236 */ return (Set)ListOrderedSet.decorate(set);\n/* */ }", "public SetSet(Vector<IntSet> initials){\n\t\tfor(int i=0;i<initials.size();i++){\n\t\t\tcontents.addElement(initials.get(i));\n\t\t}\n\t}", "@objid (\"617c2b9e-55b6-11e2-877f-002564c97630\")\n @Override\n protected void setParent(GmCompositeNode parent) {\n if (parent != null && getParent() != parent) {\n getPersistedStyle().setCascadedStyle(parent.getPersistedStyle());\n }\n \n super.setParent(parent);\n }", "public void setParent (CompoundExpression parent)\r\n\t\t{\r\n\t\t\t_parent = parent;\r\n\t\t}", "void split(treeNode parent, Point newCentre, int newCentreIndex){\n\t\t\n\t\t//loop counter variable\n\t\tint i;\n\n\t\t//1. Counts how many points belong to the new and how many points belong to the old centre\n\t\tint nOld = 0;\n\t\tint nNew = 0;\n\t\tfor(i=0;i<parent.n;i++){\n\t\t\tPoint centre = determineClosestCentre(parent.points[i], parent.centre, newCentre);\n\t\t\tif(centre == newCentre){\n\t\t\t\tnNew++;\n\t\t\t} else {\n\t\t\t\tnOld++;\n\t\t\t} \n\t\t}\n\n\t\t//2. initalizes the arrays for the pointer\n\t\t\n\t\t//array for pointer on the points belonging to the old centre\n\t\tPoint[] oldPoints = new Point[nOld];\n\n\t\t//array for pointer on the points belonging to the new centre\n\t\tPoint[] newPoints = new Point[nNew];\n\n\t\tint indexOld = 0;\n\t\tint indexNew = 0;\n\n\t\tfor(i=0;i<parent.n;i++){\n\t\t\tPoint centre = determineClosestCentre(parent.points[i],parent.centre,newCentre);\n\t\t\tif(centre == newCentre){\n\t\t\t\tnewPoints[indexNew] = parent.points[i];\n\t\t\t\tnewPoints[indexNew].centreIndex = newCentreIndex;\n\t\t\t\tindexNew++;\n\t\t\t} else if(centre == parent.centre){\n\t\t\t\toldPoints[indexOld] = parent.points[i];\n\t\t\t\tindexOld++;\n\t\t\t} else {\n\t\t\t\t//printf(\"ERROR !!! NO CENTER NEAREST !! \\n\");\n\t\t\t}\n\t\t}\n\n\t\t//left child: old centre\n\t\ttreeNode lc = new treeNode(nOld, oldPoints, \n\t\t\t\t\t\tparent.centre, parent);\n\t\t/*lc.centre = parent.centre;\n\t\tlc.points = oldPoints;\n\t\tlc.n = nOld;\n\n\t\tlc.lc = null;\n\t\tlc.rc = null;\n\t\tlc.parent = parent;\n\n\t\ttreeNodeTargetFunctionValue(lc);*/\n\t\t\n\t\t//right child: new centre\n\t\ttreeNode rc = new treeNode(nNew, newPoints, newCentre, \n\t\t\t\t\t\t\t parent);\n\t\t/*rc.centre = newCentre;\n\t\trc.points = newPoints;\n\t\trc.n = nNew;\n\n\t\trc.lc = null;\n\t\trc.rc = null;\n\t\trc.parent = parent;\n\n\t\ttreeNodeTargetFunctionValue(rc);*/\n\n\t\t//set childs of the parent node\n\t\tparent.lc = lc;\n\t\tparent.rc = rc;\n\n\t\t//propagate the cost changes to the parent nodes\n\t\twhile(parent != null){\n\t\t\tparent.cost = parent.lc.cost + parent.rc.cost;\n\t\t\tparent = parent.parent;\n\t\t}\n\n\t}", "@Override\n\tpublic void onParentSet() {\n\t\t\n\t}", "public Set<V> put(K key, Collection<V> set) {\n // Remove any possibly existing prior association with the key\n Set<V> result = remove(key);\n\n // Note: The second argument is effectless, as we cannot encounter item type errors here\n NavigableSet<V> navSet = createNavigableSet(set, true);\n Iterator<V> it = navSet.iterator();\n\n SetTrieNode currentNode = superRootNode;\n while(it.hasNext()) {\n V v = it.next();\n\n SetTrieNode nextNode = currentNode.nextValueToChild == null ? null : currentNode.nextValueToChild.get(v);\n if(nextNode == null) {\n nextNode = new SetTrieNode(nextId++, currentNode, v);\n if(currentNode.nextValueToChild == null) {\n currentNode.nextValueToChild = new TreeMap<>(comparator);\n }\n currentNode.nextValueToChild.put(v, nextNode);\n }\n currentNode = nextNode;\n }\n\n if(currentNode.keyToSet == null) {\n currentNode.keyToSet = new HashMap<>();\n }\n\n currentNode.keyToSet.put(key, navSet);\n\n keyToNode.put(key, currentNode);\n\n return result;\n }", "public static java.util.Set synchronizedSet(java.util.Set arg0)\n { return null; }", "public Group(Set<Card> pCard)\r\n {\r\n if (pCard != null) \r\n {\r\n Iterator<Card> cardIterator = pCard.iterator();\r\n Card currentCard = cardIterator.next();\r\n Rank rankOfFirstCard = currentCard.getRank();\r\n aCards.add(currentCard);\r\n for (Iterator<Card> i = cardIterator; i.hasNext(); )\r\n {\r\n currentCard = i.next();\r\n if ( rankOfFirstCard.equals(currentCard.getRank()) )\r\n {\r\n aCards.add(currentCard);\r\n }\r\n else\r\n {\r\n throw new HandException(\"The given set of cards is not a Group\");\r\n }\r\n }\r\n }\r\n else\r\n {\r\n throw new HandException(\"The given set of cards was null\");\r\n }\r\n }", "TrieSet(String[] items, int start, int stop, int c) {\n \t // keep this -- it initializes the children array\n \t // (note all positions are initially null)\n this();\n \n //begin solution, replace with: //add code here\n if (items[start].length() == c) {\n terminal = true;\n start++;\n }\n for (char letter = 'A'; letter <= 'Z'; letter++) {\n int end = start;\n while (end < stop && items[end].charAt(c) == letter) end++;\n if (start != end)\n children[c2i(letter)] = new TrieSet(items, start, end, c+1);\n start = end;\n }\n //end solution\n }", "public SyncedTreeSet() {\n _treeSet = new TreeSet<T>();\n }", "public Coalition(int[] coalition, PlayerSet players) {\n super();\n TreeSet<Integer> seen = new TreeSet<Integer>();\n this.definedOn = players;\n\n for(int i = 0; i < coalition.length; i++){\n if(!seen.add(coalition[i])){\n throw new IllegalArgumentException(\"agument 1 is not a proper coalition (must be a set)\");\n }\n if(!players.contains(coalition[i])){\n throw new IllegalArgumentException(\"agument 1 is not a proper coalition (members must be from the PlayerSet)\");\n }\n this.add(coalition[i]);\n }\n }", "public OrderedSet (String setName) {\n initialize();\n name = setName;\n }", "public MyTreeSet()\r\n {\r\n root = null;\r\n }", "final void setParent(ShapeParent newParent)\n {\n this.parent = newParent;\n }", "public void initHashSetPlayers(Set<String> newSet) {\n this.primary = newSet;\n }", "public static String treeCanonicalForm (int i , int parent) \n\t{\n\t\tArrayList<String> children = new ArrayList<String>();\n\t\t\n\t\tfor(int j : adjList[i])\n\t\t\tif(j != parent)\n\t\t\t\tchildren.add(treeCanonicalForm(j, i));\n\t\t\n\t\tCollections.sort(children);\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(\"(\");\n\t\tfor(String x : children)\n\t\t\tsb.append(x);\n\t\tsb.append(\")\");\n\t\t\n\t\treturn sb.toString();\n\t}", "private void createCentipede() {\n\t\tcentipede = new ArrayList<>();\n\t\tfor(int i = 0; i < centipedeSize; i ++) {\n\t\t\tcentipede.add(new Segment(304 + 16 * i, 0));\n\t\t}\n\t}", "abstract CharArraySet build();", "void setParentsFirst( int parentsFirst );", "public void addCriticalOnset() throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"critical-onset\",\n null,\n childrenNames());\n }", "public StandardKeySet() {\n super(ForwardingMap.this);\n }", "public void addMajorOnset() throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"major-onset\",\n null,\n childrenNames());\n }", "public PrincipalSet getAllParentPrincipals(boolean arg0)\n throws AuthorizationException {\n return null;\n }", "public RegexNode ReduceSet()\n\t{\n\t\t// Extract empty-set, one and not-one case as special\n\n\t\tif (RegexCharClass.IsEmpty(_str))\n\t\t{\n\t\t\t_type = Nothing;\n\t\t\t_str = null;\n\t\t}\n\t\telse if (RegexCharClass.IsSingleton(_str))\n\t\t{\n\t\t\t_ch = RegexCharClass.SingletonChar(_str);\n\t\t\t_str = null;\n\t\t\t_type += (One - Set);\n\t\t}\n\t\telse if (RegexCharClass.IsSingletonInverse(_str))\n\t\t{\n\t\t\t_ch = RegexCharClass.SingletonChar(_str);\n\t\t\t_str = null;\n\t\t\t_type += (Notone - Set);\n\t\t}\n\n\t\treturn this;\n\t}", "private Set<ActiveGroupEntry> convertToEntrySet(Collection<String> groupIds)\n {\n Map<String, DataGroupInfo> map = DefaultDataGroupInfo.getKeyMap().getGroupsForKeys(groupIds);\n\n return map.entrySet().stream().map(\n entry -> new DefaultActiveGroupEntry(entry.getValue().getDisplayNameWithPostfixTopParentName(), entry.getKey()))\n .collect(Collectors.toSet());\n }", "public PTreeCredalSet(PotentialTable pot) {\n //super(pot.getVariables());\n super(pot.getListNonTransparents());\n Vector vTrans;\n Configuration confTrans;\n int nextremes;\n PotentialTable potrestricted;\n PotentialTree newpot;\n ProbabilityTree probTree=null;\n\n vTrans = pot.getListTransparents();\n confTrans = new Configuration(vTrans);\n nextremes = confTrans.possibleValues();\n\n if (nextremes > 1) {\n FiniteStates newTrans;\n \n probTree = new ProbabilityTree();\n newTrans = appendTransparentVariable(nextremes);\n probTree.assignVar(newTrans);\n for (int i = 0; i < nextremes; i++) {\n potrestricted = (PotentialTable) pot.restrictVariable(confTrans);\n newpot = potrestricted.toTree();\n probTree.replaceChild(newpot.getTree(), i);\n confTrans.nextConfiguration();\n }\n addVariable(newTrans);\n \n }\n else if(nextremes==1){\n potrestricted = (PotentialTable) pot.restrictVariable(confTrans);\n newpot = potrestricted.toTree();\n probTree=newpot.getTree();\n }\n setTree(probTree);\n\n }", "public void createSet(String element) {\n\t\t\n\t\tSet<String> set = new HashSet<String>();\n\t\tset.add(element);\n\t\t\n\t\tMap<String, Set<String>> map = new HashMap<String, Set<String>>();\t\t\n\t\tmap.put(element, set);\n\t\t\n\t\tdisjointSet.add(map);\n\t\n\t}", "public Set<Set<Integer>> calculate(Set<Integer> originalSet)\n\t{\n\t\tvalidateInputSet(originalSet);\n\n\t\tSet<Set<Integer>> sets = new HashSet<Set<Integer>>();\n\t\t//Base class returns the empty set.\n\t\tif (originalSet.isEmpty())\n\t\t{\n\t\t\tsets.add(new HashSet<Integer>());\n\t\t\treturn sets;\n\t\t}\n\t\t//Take the first element in head.\n\t\tList<Integer> list = new ArrayList<Integer>(originalSet);\n\t\tInteger head = list.get(0);\n\t\t//Generate a hash set without the first element\n\t\tSet<Integer> rest = new HashSet<Integer>(list.subList(1, list.size()));\n\t\t//Recursive call to iterate over every combination generated with the rest list.\n\t\tfor (Set<Integer> set : calculate(rest))\n\t\t{\n\t\t\t//Add every element and the head, the old set and the new set.\n\t\t\tSet<Integer> newSet = new HashSet<Integer>();\n\t\t\tnewSet.add(head);\n\t\t\tnewSet.addAll(set);\n\t\t\tsets.add(newSet);\n\t\t\tsets.add(set);\n\t\t}\n\t\treturn sets;\n\t}", "public Set retainAll(final int[] newSet) {\n Set s2 = new Set();\n for (int i = 0; i < size; i++) {\n for (int element : newSet) {\n if (set[i] == element) {\n s2.add(set[i]);\n }\n }\n }\n // for (int i = 0; i < size; i++) {\n // if (newSet.contains(set[i])) {\n // s2.add(set[i]);\n // }\n // }\n return s2;\n }", "public AbstractHashSet(Collection c) {\n\t\tmap = new DelegateAbstractHashMap(Math.max((int) (c.size() / .75f) + 1,\n\t\t\t\t16), this);\n\t\taddAll(c);\n\t}", "public void createCenterLine(Group rootGroup) {\n Group centerLine = new Group();\n centerLine.setLayoutX(WIDTH / 2 - LAYOUT / 2);\n\n for (double y = LAYOUT; y < HEIGHT; y += (1.93 * LAYOUT)) {\n Rectangle box = new Rectangle(0, y, LAYOUT, LAYOUT);\n box.setFill(Color.WHITE);\n centerLine.getChildren().add(box);\n }\n \n rootGroup.getChildren().add(centerLine);\n }", "public final EObject entryRuleCarrierSet() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleCarrierSet = null;\n\n\n try {\n // ../ac.soton.xtext.contextDsl/src-gen/ac/soton/xtext/parser/antlr/internal/InternalContextDsl.g:333:2: (iv_ruleCarrierSet= ruleCarrierSet EOF )\n // ../ac.soton.xtext.contextDsl/src-gen/ac/soton/xtext/parser/antlr/internal/InternalContextDsl.g:334:2: iv_ruleCarrierSet= ruleCarrierSet EOF\n {\n newCompositeNode(grammarAccess.getCarrierSetRule()); \n pushFollow(FollowSets000.FOLLOW_ruleCarrierSet_in_entryRuleCarrierSet595);\n iv_ruleCarrierSet=ruleCarrierSet();\n\n state._fsp--;\n\n current =iv_ruleCarrierSet; \n match(input,EOF,FollowSets000.FOLLOW_EOF_in_entryRuleCarrierSet605); \n\n }\n\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "public CanonicalOrder(final Embedding triangulation) {\n\t\tthis.triangulation = triangulation;\n\t\tthis.vertexOrder = new Vertex[triangulation.getNumberVerices()];\n\t\tthis.children = new HashMap<Integer, List<Integer>>();\n\t\t\n\t\tList<Embedding> embeddings = new LinkedList<>();\n\t\tembeddings.add(triangulation);\n\t}", "public DelegateAbstractHashMap(int initialCapacity, AbstractHashSet set) {\n\t\t\tsuper(initialCapacity);\n\t\t\tthis.set = set;\n\t\t}", "private void alignCenter(int newWidth) {\n for (Shape child : shape.getChildren()) {\n GraphicsAlgorithm ga = child.getGraphicsAlgorithm();\n int diff = (newWidth - ga.getWidth()) / 2;\n gaService.setLocation(ga, ga.getX() + diff, ga.getY());\n }\n }", "public final TreeToNFAConverter.set_return set() throws RecognitionException {\n\t\tTreeToNFAConverter.set_return retval = new TreeToNFAConverter.set_return();\n\t\tretval.start = input.LT(1);\n\n\t\tGrammarAST b=null;\n\n\n\t\t\tIntSet elements=new IntervalSet();\n\t\t\tif ( state.backtracking == 0 )\n\t\t\t\t((GrammarAST)retval.start).setSetValue(elements); // track set for use by code gen\n\n\t\ttry {\n\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:663:2: ( ^(b= BLOCK ( ^( ALT ( ^( BACKTRACK_SEMPRED ( . )* ) )? setElement[elements] EOA ) )+ EOB ) )\n\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:663:4: ^(b= BLOCK ( ^( ALT ( ^( BACKTRACK_SEMPRED ( . )* ) )? setElement[elements] EOA ) )+ EOB )\n\t\t\t{\n\t\t\tb=(GrammarAST)match(input,BLOCK,FOLLOW_BLOCK_in_set1390); if (state.failed) return retval;\n\t\t\tmatch(input, Token.DOWN, null); if (state.failed) return retval;\n\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:664:6: ( ^( ALT ( ^( BACKTRACK_SEMPRED ( . )* ) )? setElement[elements] EOA ) )+\n\t\t\tint cnt60=0;\n\t\t\tloop60:\n\t\t\twhile (true) {\n\t\t\t\tint alt60=2;\n\t\t\t\tint LA60_0 = input.LA(1);\n\t\t\t\tif ( (LA60_0==ALT) ) {\n\t\t\t\t\talt60=1;\n\t\t\t\t}\n\n\t\t\t\tswitch (alt60) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:664:7: ^( ALT ( ^( BACKTRACK_SEMPRED ( . )* ) )? setElement[elements] EOA )\n\t\t\t\t\t{\n\t\t\t\t\tmatch(input,ALT,FOLLOW_ALT_in_set1399); if (state.failed) return retval;\n\t\t\t\t\tmatch(input, Token.DOWN, null); if (state.failed) return retval;\n\t\t\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:664:13: ( ^( BACKTRACK_SEMPRED ( . )* ) )?\n\t\t\t\t\tint alt59=2;\n\t\t\t\t\tint LA59_0 = input.LA(1);\n\t\t\t\t\tif ( (LA59_0==BACKTRACK_SEMPRED) ) {\n\t\t\t\t\t\talt59=1;\n\t\t\t\t\t}\n\t\t\t\t\tswitch (alt59) {\n\t\t\t\t\t\tcase 1 :\n\t\t\t\t\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:664:15: ^( BACKTRACK_SEMPRED ( . )* )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmatch(input,BACKTRACK_SEMPRED,FOLLOW_BACKTRACK_SEMPRED_in_set1404); if (state.failed) return retval;\n\t\t\t\t\t\t\tif ( input.LA(1)==Token.DOWN ) {\n\t\t\t\t\t\t\t\tmatch(input, Token.DOWN, null); if (state.failed) return retval;\n\t\t\t\t\t\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:664:35: ( . )*\n\t\t\t\t\t\t\t\tloop58:\n\t\t\t\t\t\t\t\twhile (true) {\n\t\t\t\t\t\t\t\t\tint alt58=2;\n\t\t\t\t\t\t\t\t\tint LA58_0 = input.LA(1);\n\t\t\t\t\t\t\t\t\tif ( ((LA58_0 >= ACTION && LA58_0 <= XDIGIT)) ) {\n\t\t\t\t\t\t\t\t\t\talt58=1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse if ( (LA58_0==UP) ) {\n\t\t\t\t\t\t\t\t\t\talt58=2;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tswitch (alt58) {\n\t\t\t\t\t\t\t\t\tcase 1 :\n\t\t\t\t\t\t\t\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:664:35: .\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tmatchAny(input); if (state.failed) return retval;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\t\tdefault :\n\t\t\t\t\t\t\t\t\t\tbreak loop58;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tmatch(input, Token.UP, null); if (state.failed) return retval;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tpushFollow(FOLLOW_setElement_in_set1413);\n\t\t\t\t\tsetElement(elements);\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return retval;\n\t\t\t\t\tmatch(input,EOA,FOLLOW_EOA_in_set1416); if (state.failed) return retval;\n\t\t\t\t\tmatch(input, Token.UP, null); if (state.failed) return retval;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault :\n\t\t\t\t\tif ( cnt60 >= 1 ) break loop60;\n\t\t\t\t\tif (state.backtracking>0) {state.failed=true; return retval;}\n\t\t\t\t\tEarlyExitException eee = new EarlyExitException(60, input);\n\t\t\t\t\tthrow eee;\n\t\t\t\t}\n\t\t\t\tcnt60++;\n\t\t\t}\n\n\t\t\tmatch(input,EOB,FOLLOW_EOB_in_set1426); if (state.failed) return retval;\n\t\t\tmatch(input, Token.UP, null); if (state.failed) return retval;\n\n\t\t\tif ( state.backtracking==0 ) {\n\t\t\t\t\tretval.g = factory.build_Set(elements,b);\n\t\t\t\t\tb.followingNFAState = retval.g.right;\n\t\t\t\t\tb.setSetValue(elements); // track set value of this block\n\t\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\trecover(input,re);\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn retval;\n\t}", "GroupQueryBuilder addAssociatedGroupsKeys(Collection<String> keys, boolean parent);", "private void setKeySet(OwnSet<K> st){\n this.keySet = st; \n }", "public Group(Composite parent, int style) {\n super(parent, checkStyle(style));\n }", "private void compose() {\n for(Group group : inputGroupList){\n if(group.getGroups().size() > 0){\n LinkedList<Integer> upperGroups = group.getGroups();\n for(int i = 0; i < upperGroups.size(); i++){\n int id = upperGroups.get(i);\n Group upper = findById(id);\n upper.addChild(group);\n }\n } else{\n root.addChild(group);\n }\n }\n for(Address adr : inputAddressList){\n if(adr.getGroups().size() > 0){\n LinkedList<Integer> upperGroups = adr.getGroups();\n for(int i = 0; i < upperGroups.size(); i++){\n int id = upperGroups.get(i);\n Group upper = findById(id);\n upper.addChild(adr);\n adr.addParent(upper);\n }\n } else{\n root.addChild(adr);\n }\n }\n\n assert(root.getChildren().size() > 0);\n }", "SemanticRegion<T> parent();", "private List<Set<String>> getSubSets(Set<String> set) {\n\t\tString[] setArray = set.toArray(new String[0]);\n\t\tList<Set<String>> result = new ArrayList<Set<String>>();\n\t\tfor(int i = 0; i < setArray.length; i++){\n\t\t\tSet<String> subSet = new HashSet<String>();\n\t\t\tfor(int j = 0; j < setArray.length; j++){\n\t\t\t\tif(j != i) subSet.add(setArray[j]);\n\t\t\t}\n\t\t\tresult.add(subSet);\n\t\t}\n\t\treturn result;\n\t}", "public BSTSet intersection(BSTSet s) {\n int[] thisArray = BSTToArray();\n int[] sArray = s.BSTToArray();\n int[] interArray = justDuplicates(thisArray, sArray);\n\n sortArray(interArray);\n\n return new BSTSet(interArray);\n }", "private boolean SetRootOfSynset() {\t\t\r\n\t\tthis.roots = new ArrayList<ISynsetID>();\r\n\t\tISynset\tsynset = null;\r\n\t\tIterator<ISynset> iterator = null;\r\n\t\tList<ISynsetID> hypernyms =\tnull;\r\n\t\tList<ISynsetID>\thypernym_instances = null;\r\n\t\titerator = dict.getSynsetIterator(POS.NOUN);\r\n\t\twhile(iterator.hasNext())\r\n\t\t{\r\n\t\t\tsynset = iterator.next();\r\n \t\t\thypernyms =\tsynset.getRelatedSynsets(Pointer.HYPERNYM);\t\t\t\t\t// !!! if any of these point back (up) to synset then we have an inf. loop !!!\r\n \t\t\thypernym_instances = synset.getRelatedSynsets(Pointer.HYPERNYM_INSTANCE);\r\n \t\t\tif(hypernyms.isEmpty() && hypernym_instances.isEmpty())\r\n \t\t\t{\r\n\t\t\t\tthis.roots.add(synset.getID());\r\n\t\t\t}\r\n\t\t}\r\n\t\titerator = this.dict.getSynsetIterator(POS.VERB);\r\n\t\twhile(iterator.hasNext())\r\n\t\t{\r\n\t\t\tsynset = iterator.next();\r\n \t\t\thypernyms =\tsynset.getRelatedSynsets(Pointer.HYPERNYM);\t\t\t\t\t// !!! if any of these point back (up) to synset then we have an inf. loop !!!\r\n \t\t\thypernym_instances = synset.getRelatedSynsets(Pointer.HYPERNYM_INSTANCE);\r\n \t\t\tif(hypernyms.isEmpty() && hypernym_instances.isEmpty())\r\n \t\t\t{\r\n\t\t\t\tthis.roots.add(synset.getID());\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn ( this.roots.size() > 0 );\r\n\t}", "public ClosedHashSet(){\r\n super();\r\n buildHashSet(capacity(), hashSet);\r\n }", "protected Set<VALUEIN> createSetForNeighbors(final boolean isSetForPrimary) {\n return new HashSet<>();\n }", "private void setParentFeatures(ClassifiedFeature classifiedFeature, Classifier newClassifier) {\n Feature childFeature = classifiedFeature.getFeature();\r\n List<Feature> anchestors = FeatureModelUtil.getAllAchestorFeatures(childFeature);\r\n\r\n Classification classification = (Classification) classifiedFeature.eContainer();\r\n // set each anchestor alive\r\n for (Feature feature : anchestors) {\r\n // check if the parent features are contained in the view and therefore can be configured manually\r\n handleAutoCompleteFeature(feature, newClassifier, classification);\r\n }\r\n }", "L(final Set<String> v, final Set<C> c, final Set<C> cis, final Set<SortedSet<C>> cor, final Set<P> p, final Set<P> pis, final Set<SortedSet<P>> por) {\n\n this.v = v;\n this.c = c;\n this.cis = cis;\n this.cor = cor;\n this.p = p;\n this.pis = pis;\n this.por = por;\n }", "public PointSET() {\n //s = new TreeSet<Point2D>(Point2D.X_ORDER);\n }", "static List<AffinityGroup> setsToAffinityGroups(Set<Set<Guid>> uag) {\n List<AffinityGroup> output = new ArrayList<>();\n\n for(Set<Guid> s : uag) {\n AffinityGroup temp = new AffinityGroup();\n temp.setVmAffinityRule(EntityAffinityRule.POSITIVE);\n List<Guid> entities = new ArrayList<>();\n\n entities.addAll(s);\n temp.setVmIds(entities);\n output.add(temp);\n }\n\n return output;\n }", "public void makeSet(T e){\n\t\tnodes.put(e, new Node<T>(e));\r\n\t}", "public IdentificationSet() {\n map = new HashMap<>();\n init();\n }", "public SortedSet() {\n\n }", "public static Set synchronizedSet(Set set) {\n/* 162 */ return SynchronizedSet.decorate(set);\n/* */ }", "public static Set predicatedSet(Set set, Predicate predicate) {\n/* 192 */ return PredicatedSet.decorate(set, predicate);\n/* */ }", "public Graph subGraph(final Collection<Node> nodeSet) {\n final Graph newG = new Graph();\n newG.metrics = null;\n \n for(Attributes a : this.getAllAttributes())\n newG.addAttributes(a);\n for(EdgeType et : this.getEdgeTypes())\n newG.addEdgeType(et);\n \n final Map<Node,Node> map = new HashMap<Node,Node>();\n \n for(final Node n : nodeSet)\n {\n final NodeTypeHolder nth = newG.ntMap.get(n.getAttributes().getName());\n final Node newN = n.copy(nth.numNodes());\n final String nodeName = newN.getName();\n nth.nodeMap.put(nodeName, newN);\n map.put(n,newN);\n }\n for(final Map.Entry<Node,Node> pair : map.entrySet())\n {\n for(final Edge e : pair.getKey().getEdges())\n {\n final Node dst = map.get(e.getDest());\n if(dst != null) {\n newG.addEdge(e.getEdgeType(),pair.getValue(),dst,e.getWeight());\n }\n }\n }\n \n return newG;\n }", "protected ConstraintPanel getSetPanel() {\n\t\tif (setPanel == null) {\t\t\t\n\t\t\tsetPanel = new ConstraintPanel(this);\n\t\t\tsetPanel.setLayout(new BoxLayout(getSetPanel(), BoxLayout.X_AXIS));\n\t\t\tsetPanel.add(getPackSizeLabel(), null);\n\t\t\tsetPanel.add(getCollectionSizePanel(), null);\n\t\t}\n\t\treturn setPanel;\n\t}", "public void testSetParent() {\n GeneralizableElement mockParent = EasyMock.createMock(GeneralizableElement.class);\n instance.setParent(mockParent);\n assertSame(\"same value expected.\", mockParent, instance.getParent());\n\n mockParent = EasyMock.createMock(GeneralizableElement.class);\n instance.setParent(mockParent);\n assertSame(\"same value expected.\", mockParent, instance.getParent());\n }" ]
[ "0.5602945", "0.542042", "0.51618844", "0.51052094", "0.5092331", "0.50759375", "0.49615943", "0.49199134", "0.48441836", "0.4829269", "0.48166656", "0.48047835", "0.4793497", "0.47697377", "0.4759383", "0.4759374", "0.47536668", "0.46381223", "0.46234", "0.46127826", "0.45899183", "0.45800108", "0.45736608", "0.45701417", "0.45541725", "0.45446068", "0.4535803", "0.45314792", "0.45227242", "0.44951105", "0.44944373", "0.4466083", "0.44607937", "0.4459781", "0.44559518", "0.44400334", "0.44369045", "0.4435391", "0.4433416", "0.4427376", "0.44184464", "0.44167483", "0.44079316", "0.4346388", "0.4345382", "0.4329561", "0.43272057", "0.43265352", "0.43250743", "0.4324612", "0.4322606", "0.43112805", "0.43072444", "0.43064025", "0.4294639", "0.4269635", "0.42694944", "0.42644936", "0.4262825", "0.42499468", "0.42466977", "0.42439187", "0.42416546", "0.42409152", "0.42394295", "0.42386863", "0.4237668", "0.4235829", "0.42319506", "0.42294747", "0.42219767", "0.4217935", "0.42066738", "0.4202313", "0.41937375", "0.4193247", "0.41859618", "0.4185918", "0.417906", "0.41778174", "0.41756788", "0.41655675", "0.41649178", "0.41648012", "0.41593933", "0.41583163", "0.41544402", "0.4153967", "0.4148847", "0.4148143", "0.41456515", "0.41415104", "0.4137926", "0.4133946", "0.41301033", "0.4127187", "0.41222048", "0.41221952", "0.41181314", "0.41173726" ]
0.5642889
0
Creates new GAT GT4 file object. The constructor is called by the subclasses.
public RFTGT42FileAdaptor(GATContext gatContext, URI location) throws GATObjectCreationException { super(gatContext, location); // TODO: may be it is possible on the local host... if (!location.hasAbsolutePath()) { throw new AdaptorNotApplicableException( "cannot handle relative paths: " + location.getPath()); } try { rftgt42Location = URItoRFTGT42String(location); } catch (URISyntaxException e) { throw new GATObjectCreationException( "unable to create a valid rft URI: " + location, e); } catch(GATInvocationException e) { throw new GATObjectCreationException( "cannot handle relative paths in absolute URI's", e); } this.host = location.getHost(); if (this.host == null) { this.host = getLocalHost(); } this.securityType = Constants.GSI_SEC_MSG; this.authorization = null; this.proxy = null; try { proxy = GlobusSecurityUtils.getGlobusCredential(gatContext, "rftgt42", location, DEFAULT_GRIDFTP_PORT); } catch (CouldNotInitializeCredentialException e) { throw new GATObjectCreationException("gt42", e); } catch (CredentialExpiredException e) { throw new GATObjectCreationException("gt42", e); } catch (InvalidUsernameOrPasswordException e) { throw new GATObjectCreationException("gt42", e); } this.notificationConsumerManager = null; this.notificationConsumerEPR = null; this.notificationProducerEPR = null; this.status = null; this.fault = null; factoryPort = null; this.factoryUrl = PROTOCOL + "://" + host + ":" + DEFAULT_FACTORY_PORT + BASE_SERVICE_PATH + RFTConstants.FACTORY_NAME; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TGG createTGG();", "public Tass4Reader ( ) {\r\n\t\tsuper();\r\n\t}", "Gtr createGtr();", "public GRAB(String filename) {\n this.filename = filename;\n }", "protected GeneTAG() {/* intentionally empty block */}", "public GcdSequenceFormat()\n {\n }", "public Sc2Gears4DM() {\n\t}", "public HeapFile(File f, TupleDesc td) {\n // some code goes here\n \tm_f = f;\n \tm_td = td;\n }", "public AncFile() {\n }", "private static void createFile() throws Exception {\n\t\t // retrieve an instance of H4File\n\t\t FileFormat fileFormat = FileFormat.getFileFormat(FileFormat.FILE_TYPE_HDF4);\n\n\t\t if (fileFormat == null) {\n\t\t System.err.println(\"Cannot find HDF4 FileFormat.\");\n\t\t return;\n\t\t }\n\n\t\t // create a new file with a given file name.\n\t\t @SuppressWarnings(\"deprecation\")\n\t\t\t\tH4File testFile = (H4File) fileFormat.create(fname);\n\n\t\t if (testFile == null) {\n\t\t System.err.println(\"Failed to create file:\" + fname);\n\t\t return;\n\t\t }\n\n\t\t // open the file and retrieve the root group\n\t\t testFile.open();\n\t\t Group root = (Group) ((javax.swing.tree.DefaultMutableTreeNode) testFile.getRootNode()).getUserObject();\n\n\t\t // set the data values\n\t\t int[] dataIn = new int[20 * 10];\n\t\t for (int i = 0; i < 20; i++) {\n\t\t for (int j = 0; j < 10; j++) {\n\t\t dataIn[i * 10 + j] = 1000 + i * 100 + j;\n\t\t }\n\t\t }\n\n\t\t // create 2D 32-bit (4 bytes) integer dataset of 20 by 10\n\t\t Datatype dtype = testFile.createDatatype(Datatype.CLASS_INTEGER, 4, Datatype.NATIVE, Datatype.NATIVE);\n\t\t @SuppressWarnings(\"unused\")\n\t\t\t\tDataset dataset = testFile\n\t\t .createScalarDS(\"2D 32-bit integer 20x10\", root, dtype, dims2D, null, null, 0, dataIn);\n\n\t\t // close file resource\n\t\t //testFile.close();\n\t\t }", "public Garage() {\n\t\tid = generateId();\n\t}", "public HeapFile(File f, TupleDesc td) {\n // some code goes here\n this.f = f;\n this.td = td;\n }", "public AgreementFileLog()\n {\n m_fileLog = new AlternateFileLogger(AGREEMENT_LOG, 10000000, 2);\n m_fileLog.setLogLevel(DynamicConfiguration.getInstance().getAgreementLogLevel());\n m_fileLog.setLogType(LogType.AGREEMENT);\n }", "public static GenomeAdapter createGenome(File f) throws Throwable {\n return createGenome(TrackUtils.createTrack(f)[0]);\n }", "public Generateur() {\n }", "public GantBuilder ( ) { }", "public TesseractModelGA(File modelInputFile) throws IOException {\n super(modelInputFile, \"\", OptimizationType.SPEED);\n }", "public void constructWith(LzzFileInfo pro) {\n\t\tthis.id = pro.getId ();\n\n\t\tthis.fname = pro.getFname ();\n\n\t\tthis.ftype = pro.getFtype ();\n\n\t\tthis.fsavepath = pro.getFsavepath ();\n\n\t\tthis.furlpath = pro.getFurlpath ();\n\n\t\tthis.createTime = pro.getCreateTime ();\n\n\t\tthis.modifyTime = pro.getModifyTime ();\n\n\t\tthis.def1 = pro.getDef1 ();\n\n\t\tthis.def2 = pro.getDef2 ();\n\n\t\tthis.def3 = pro.getDef3 ();\n\n\t\tthis.def4 = pro.getDef4 ();\n\n\t\tthis.def5 = pro.getDef5 ();\n\n\t\tthis.def6 = pro.getDef6 ();\n\n\t\tthis.def7 = pro.getDef7 ();\n\n\t\tthis.def8 = pro.getDef8 ();\n\n\t\tthis.def9 = pro.getDef9 ();\n\n\t\tthis.def10 = pro.getDef10 ();\n\n\t\tthis.dr = pro.getDr ();\n\n\t}", "H4 createH4();", "TGGRule createTGGRule();", "public FileObject() {\n\t}", "public BrihaspatiProFile() {\n }", "public GTFTranslator()\r\n {\r\n // do nothing - no variables to instantiate\r\n }", "public GeppettoRecordingCreator(String name)\n\t{\n\t\t_fileName = name;\n\t}", "Object create(File file) throws IOException, SAXException, ParserConfigurationException;", "public MgtFactoryImpl()\n {\n super();\n }", "@Override\n\tpublic void createGerant(Gerant g) {\n\t\t\n\t}", "public OWLAnonymousIndividualHGDB()\r\n\t{\r\n\r\n\t}", "public GeometricObject() {\n dateCreated = new java.util.Date();\n }", "public RDT10(double pmunge, double plost, String filename) throws IOException {\n\t\tsuper(pmunge, plost, filename);\n\t\tsender = new RSender10();\n\t\treceiver = new RReceiver10();\n\t}", "public FileCreator() {\r\n initComponents();\r\n }", "private Grammar readGrammarFromG4( String filename )\n {\n String grammarString;\n try\n {\n File g4File = new File( filename );\n if ( g4File.exists() )\n {\n grammarString = new String( Files.readAllBytes( g4File.toPath() ) );\n return parseGrammarFromString( grammarString );\n }\n else\n {\n System.out.println( filename + \" not found.\" );\n return null;\n }\n }\n catch ( Throwable t )\n {\n fail( \"Unexpected error while reading g4 grammar: \" + t.getMessage() );\n }\n return null;\n }", "public Genetic() {\r\n }", "public Egrga() {\r\n\t}", "public GseqFactoryImpl() {\n\t\tsuper();\n\t}", "public SplitFile() {\n\t}", "private Gng() {\n }", "public MailcapFile() {\n/* 113 */ if (LogSupport.isLoggable()) {\n/* 114 */ LogSupport.log(\"new MailcapFile: default\");\n/* */ }\n/* */ }", "protected GeometricObject() \n\t{\n\t\tdateCreated = new java.util.Date();\n\t}", "public NGATAstro()\n\t{\n\t\tsuper();\n\t\tlogger = LogManager.getLogger(this);\n\t\tinitialiseLoggerReference(logger);\n\t}", "public AlignmentGeneration(){\n String filename = \"nlg.properties\";\n try {\n input = this.getClass().getClassLoader().getResourceAsStream(filename);\n if(input==null){\n logger.error(\"Unable to find \" + filename);\n return;\n }\n prop.load(input);\n this.host = prop.getProperty(\"host\");\n this.port = Integer.parseInt(prop.getProperty(\"port\"));\n this.coreUrl = String.format(\"http://%s:%d/\",host,port);\n }\n catch(IOException ex){\n ex.printStackTrace();\n } finally {\n if(input!=null)\n try{\n input.close();\n }\n catch (IOException e){\n e.printStackTrace();\n }\n }\n client = new OkHttpClient();\n this.headerVariable = \"content-type\";\n this.headerValue = \"application/x-www-form-urlencoded\";\n\n }", "public InventarioFile(){\r\n \r\n }", "public GeneticSequenceRecord() {\n\t\tsuper(jp.scid.bio.store.jooq.tables.GeneticSequence.GENETIC_SEQUENCE);\n\t}", "private void createGenotypes(File inFile)\r\n\t\tthrows Exception\r\n\t{\n\t\tBufferedReader in = new BufferedReader(new FileReader(inFile));\r\n\t\t// And write back out in Flapjack format\r\n\t\tBufferedWriter out = new BufferedWriter(new FileWriter(new File(wrkDir, \"geno\")));\r\n\t\tout.write(\"# fjFile = GENOTYPE\");\r\n\t\tout.newLine();\r\n\r\n\t\t// Skip the first two lines; we'll just assume marker order...\r\n\t\tin.readLine(); in.readLine();\r\n\t\t// ...and use the data we already have from the map\r\n\t\tfor (Marker m: markers)\r\n\t\t\tout.write(\"\\t\" + m.name);\r\n\t\tout.newLine();\r\n\r\n\r\n\t\t// Now process each line\r\n\t\tint index = 0;\r\n\t\tString str = null;\r\n\t\twhile ((str = in.readLine()) != null)\r\n\t\t{\r\n\t\t\tif (str.isEmpty())\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\tif (index == 0)\r\n\t\t\t\tout.write(\"RP\");\r\n\t\t\telse if (index == 1)\r\n\t\t\t\tout.write(\"DP\");\r\n\t\t\telse\r\n\t\t\t\tout.write(\"RP[1]/DP-\" + index);\r\n\r\n\t\t\tfor (String allele: str.split(\",\"))\r\n\t\t\t\tout.write(\"\\t\" + allele);\r\n\r\n\t\t\tout.newLine();\r\n\t\t\tindex++;\r\n\t\t}\r\n\r\n\t\tin.close();\r\n\t\tout.close();\r\n\t}", "public Humidity4Builder() {\r\n humidity4 = new Humidity4();\r\n }", "public GPHolder createDBBasedGP(){\r\n\t\treturn createDBBasedGP(null);\r\n\t}", "public FrameBodyTBPM(final RandomAccessFile file) throws java.io.IOException, InvalidTagException {\r\n super(file);\r\n }", "public Gasto() {\r\n\t}", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t\n\t\n\tpublic TSP(String dataFile, int FileType) {\n\n\t\t//Truck types are placed into a vector\n\t\tProblemInfo.truckTypes = new Vector();\n\n\t\t//Type of shipment insterion to be performed\n\t\t//ProblemInfo.insertShipType = new Object();\n\n\t\tboolean isDiagnostic = false;\n\t\tShipment tempShip;\n\t\tDepot thisDepot;\n\t\tint type;\n\t\tint depotNo;\n\t\tint countAssignLoop;\n\t\tboolean status;\n\t\tString outputFileName;\n\n\t\t/** @todo Need to put in a TSP file and read in TSP data. The readfile method will have to be changed to match the format of the\n\t\t * tsp file*/\n\t\t//read in the MDTSP data\n\t\t//readDataFromTextFile(ProblemInfo.inputPath + dataFile);\n\t\treadDataFromExcelFile(ProblemInfo.inputPath + dataFile, FileType);\n\t\tSettings.printDebug(Settings.COMMENT,\n\t\t\t\t\"Read Data File: \" + ProblemInfo.inputPath + dataFile);\n\t\tprintDataToConsole();\n\n\t\t//Ensure that the shipment linked list has been loaded with the data\n\t\tif (mainShipments.getTSPHead() == null) {\n\t\t\tSettings.printDebug(Settings.ERROR,\n\t\t\t\t\t\"TSP: Shipment linked list is empty\");\n\t\t}\n\n\t\t//Set up the shipment selection type\n\t\tif (FileType == 0) {\n\t\t\t//ProblemInfo.selectShipType = new SmallestPolarAngleToDepot();\n\t\t\t//Settings.printDebug(Settings.COMMENT, SmallestPolarAngleToDepot.WhoAmI());\n\t\t\t\n\t\t\t//ProblemInfo.selectShipType = new SmallestPolarAngleShortestDistToDepot(); \n\t //Settings.printDebug(Settings.COMMENT,SmallestPolarAngleShortestDistToDepot.WhoAmI());\n\t\t\t\n\t\t\t\n\t\t\t//Temp Location for required variables of spacefilling curve method\n\t\t\tint method = MainSFC.DragonCurve;\n\t\t int recursionLevel = 3;\n\t\t double translateX = 0;//.4;\n\t\t double translateY = 0;//.5;\n\t\t double rotate = Math.PI/4;\n\t\t double scaleX = 0;//1.5;\n\t\t double scaleY = 0;//1.5;\n\t\t double shearX = 0;//1.1;\n\t\t double shearY = 0;//1.1;\n\n\t\t SpaceFillingPathToDepot spaceFillingPath = new SpaceFillingPathToDepot(\n\t\t method, recursionLevel, translateX, translateY,\n\t\t rotate, scaleX, scaleY, shearX, shearY);\n\t\t ProblemInfo.selectShipType = spaceFillingPath; // new SpaceFillingPathToDepot();\n\t\t Settings.printDebug(Settings.COMMENT, spaceFillingPath.WhoAmI()); //SpaceFillingPathToDepot.WhoAmI());\n\t\t \n\t\t \n\t\t // ProblemInfo.selectShipType = new ClosestEuclideanDistToDepot(); \n\t\t //Settings.printDebug(Settings.COMMENT,ClosestEuclideanDistToDepot.WhoAmI());\n\t\t}\n \n\t\tif (FileType == 1 || FileType == 2 || FileType == 3 || FileType == 4) {\n\t ProblemInfo.selectShipType = new ClosestMatrixDist(); \n\t Settings.printDebug(Settings.COMMENT,ClosestMatrixDist.WhoAmI());\n\t\t}\n \n\t\t//set up the shipment insertion type\n\t\tProblemInfo.insertShipType = new LinearGreedyInsertShipment();\n\t\tSettings.printDebug(Settings.COMMENT, LinearGreedyInsertShipment.WhoAmI());\n\t\t\n\t\t//InsertAsGiven\n\t\tProblemInfo.insertShipType = new InsertAsGiven();\n\t\tSettings.printDebug(Settings.COMMENT, InsertAsGiven.WhoAmI());\n\t\t\n\t\t\n\t\t//Capture the CPU time required for solving the problem\n\t\tstartTime = System.currentTimeMillis();\n\t\t// captures the initial information on solving the problem\n\t\t// returns the total customer and total distance after the initial solution\n\t\toptInformation.add(\"Inital Solution \" + createInitialRoutes());\n\t\tSystem.out.println(\"Completed initial routes\");\n\t\t//Get the initial solution\n\t\t//Depending on the Settings status, display information on the routes\n\t\t//Trucks used, total demand, dist, travel time and cost\n\t\tSettings.printDebug(Settings.COMMENT, \"Created Initial Routes \");\n\t\tSettings.printDebug(Settings.COMMENT,\n\t\t\t\t\"Initial Stats: \" + mainDepots.getSolutionString());\n\t\t\n\t\t\n\t\t//At this point all shipments have been assigned\n //-------- CALL WRITE LONG/SHORT TO EXCEL BELOW -------------------------------------------------\n\t\t//writeLongSolutionToExcel(dataFile.substring(dataFile.lastIndexOf(\"/\") + 1));\n\t\t//writeShortSolutionExcel(dataFile.substring(dataFile.lastIndexOf(\"/\") + 1));\n\n\n\t\t//create a vector of search strategy/optimizations to execute\n\t\tmainOpts = new Vector(1); //vector capacity of 1\n\t\trunOptimizations();\n\n\t\t//Check for the quality and integrity of the solution\n\t\tSystem.out.println(\"Starting QA\");\n\t\ttspQA = new TSPQualityAssurance(mainDepots, mainShipments);\n\t\tif (tspQA.runQA() == false) {\n\t\t\tSettings.printDebug(Settings.ERROR, \"QA FAILED!\");\n\t\t}\n\t\telse {\n\t\t\tSettings.printDebug(Settings.COMMENT, \"QA succeeded\");\n\n\n\t\t}\n\t\t//--------------------------------------------------------------(TURN GUI ON/OFF )---------\n\t\t//ZeusGui guiPost = new ZeusGui(mainDepots, mainShipments);\n\t\t\n\n\t//====== Metaheuristic Call Section ===================================================\n\t\t\n\t\t\t//TSPInteger ga = new TSPInteger(mainDepots);\n\t\t//FireFly oldfly = new FireFly(mainDepots.getHead().getNext().getMainTrucks().getHead().getNext().getMainNodes());\n\t\tPopulation FFOptimization = new Population(mainDepots.getHead().getNext().getMainTrucks().getHead().getNext().getMainNodes());\n\n\t//====== END Metaheuristic Call Section ================================================\t\n\t\t\n\t\t\t\n\t\t\t//At this point all shipments have been assigned\n\t\t //-------- CALL WRITE LONG/SHORT TO EXCEL BELOW -------------------------------------------------\n\t\t\t\twriteLongSolutionToExcel(dataFile.substring(dataFile.lastIndexOf(\"/\") + 1));\n\t\t\t\twriteShortSolutionExcel(dataFile.substring(dataFile.lastIndexOf(\"/\") + 1));\n\t//Signal End of This TSP\n\tSystem.out.println(\" \\n\\n =================== END OF TSP SECTION =================== \\n\\n\");\n\t}", "public ModelSourceFile() {\n\t\t\n\t}", "public FileCodeGenXML(FileCodeGen fileGen)\n {\n this.fileGen = fileGen;\n }", "public File() {\n\t\tthis.name = \"\";\n\t\tthis.data = \"\";\n\t\tthis.creationTime = 0;\n\t}", "public CvFile() {\n }", "public Tigre() {\r\n }", "public TesseractModelGA(DataInputStream inputStream) throws IOException, GeoTessException {\n super(inputStream);\n }", "public GongDomObject(File file) throws ParserConfigurationException, InvalidTagException, SAXException, IOException {\r\n super(file);\r\n }", "public Tuple()\n {\n // Creat a new tuple\n data = new byte[max_size];\n tuple_offset = 0;\n tuple_length = max_size;\n }", "private FileLoader(){\n rows =new Vector<String>();\n //tsptwinstance= new TSPTWinstance();\n }", "public Id5320DataFile()\n\t{\n\t\tlineLength = OFF_CUSTOMER_NAME + LEN_CUSTOMER_NAME;\n\t}", "public CATMFGDWInvoicePush_FlatFile(){\n\n}", "public GeneTAG(int addr, TOP_Type type) {\n super(addr, type);\n readObject();\n }", "public abstract FastqSampleGroup create(File sampleDir) throws IOException;", "public Steganography() {}", "public ObjectFactory() {\n super(grammarInfo);\n }", "public Time4( Time4 time )\r\n {\r\n this.setTime( time.getHour(), time.getMinute(),\r\n time.getSecond() );\r\n }", "public PoseurFileManager()\r\n {\r\n // NOTHING YET\r\n currentFile = null;\r\n currentFileName = null;\r\n saved = true;\r\n poseIO = new PoseIO();\r\n }", "public void create() {\n\t\t\tdb.execSQL(AGENCYDB_CREATE+\".separete,.import agency.txt agency\");\n\t\t\tdb.execSQL(STOPSDB_CREATE+\".separete,.import stop_times.txt stop_times\");\n\t\t\t\n\t\t\t// Add 2 agencies for testing\n\t\t\t\n\t\t\t\n\t\t\tdb.setVersion(DATABASE_VERSION);\n\t\t}", "public PatternCreator() {\n \n BasicNeFileName =\n Tools.readString(\"Enter existing BasicNE file name: \");\n // \"/home/kwinkler/diasdem/DIAsDEM.workbench2/data/samples/de/heins/\"\n // + \"BasicNE.csv\";\n InitialCompositeNeFileName =\n Tools.readString(\"Enter existing DgapSourceCompositeNE file name: \");\n // \"/home/kwinkler/diasdem/DIAsDEM.workbench2/data/samples/de/heins/\"\n // + \"DgapSourceCompositeNE.csv\";\n ExtendedCompositeNeFileName =\n Tools.readString(\"Enter DgapExtendedCompositeNE file name to be created:\");\n // \"/home/kwinkler/diasdem/DIAsDEM.workbench2/data/samples/de/heins/\"\n // + \"DgapExtendedCompositeNE.csv\";\n \n try {\n MyCsvFile = new CsvFile(BasicNeFileName, false);\n BasicNEs = MyCsvFile.getValues();\n NumberOfBasicNEs = MyCsvFile.countTuples();\n }\n catch (IOException e) {\n System.out.println(\"Error: Cannot open BasicNeFileName ...\");\n }\n \n try {\n MyCsvFile = new CsvFile(InitialCompositeNeFileName, false);\n InitialCompositeNEs = MyCsvFile.getValues();\n NumberOfInitialCompositeNEs = MyCsvFile.countTuples();\n }\n catch (IOException e) {\n System.out.println(\"Error: Cannot open InitialCompositeNeFileName ...\");\n }\n \n this.extendInitialCompositeNEs();\n ExtendedCompositeNEs = MyCombinator.ExtendedCompositeNEs;\n \n try {\n if (!ExtendedCompositeNeFileName.endsWith(\".csv\")) {\n ExtendedCompositeNeFileName += \".csv\";\n }\n MyCsvFile.save(ExtendedCompositeNEs, ExtendedCompositeNeFileName);\n // System.out.println(\n // \"I successfully created the extended composite NE file \"\n // + ExtendedCompositeNeFileName);\n }\n catch (IOException e) {\n System.out.println(\"Error: Cannot write ExtendedCompositeNeFileName ...\");\n }\n \n }", "public Genret() {\r\n }", "private static Account createAndStoreAccount(String fileName, String GID, String name, Context activity) {\r\n\t\tAccount newAccount = new Account(GID, name); \r\n\t\tAccount.currentAccount = newAccount;\r\n\t\t\r\n\t try {\r\n\t //use buffering\r\n\t FileOutputStream fos = activity.openFileOutput(fileName, Context.MODE_PRIVATE);\r\n\t\t\tObjectOutputStream oos = new ObjectOutputStream(fos);\r\n\t\t\toos.writeObject(newAccount); \r\n\t try {\r\n\t \toos.writeObject(newAccount);\r\n\t }\r\n\t finally {\r\n\t \toos.close();\r\n\t }\r\n\t } \r\n\t catch(IOException ex){\r\n\t System.out.println(\"Cannot perform output.\");\r\n\t }\r\n\t\t\r\n\t\treturn newAccount;\r\n\t}", "public HeapFile(File f, TupleDesc td) {\n this.tupleDesc = td;\n this.file = f;\n this.fid = file.getAbsoluteFile().hashCode();\n this.numOfPages = (int)Math.ceil((double)f.length()/(double)BufferPool.PAGE_SIZE);\n if(f.length()==0) \n//\t\t\ttry {\n//\t\t\t\twritePage(new HeapPage(new HeapPageId(fid, 0), new byte[BufferPool.PAGE_SIZE]));\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\tthis.numOfPages = 0;\n// }\n }", "public GantBuilder ( final Project project ) { super ( project ) ; }", "gp(go goVar, String str) {\n super(str);\n this.f82115a = goVar;\n }", "public ShortFile(String shortFile) {\r\n newText = shortFile;\r\n }", "public PedGenie ( IOManager im, String application_id ) throws GEException\n {\n io_mgr = im;\n spec = io_mgr.getSpecification();\n Study[] study = io_mgr.getStudy();\n tSim = spec.getTopSim();\n dSim = spec.getDropSim();\n theAnalyses = spec.getCCAnalyses();\n nCycles = spec.getNumberOfSimulations();\n \n if( nCycles < 1000 )\n {\n sigCycles = nCycles;\n }\n else\n {\n sigCycles = 1000;\n }\n \n numGDef = spec.getGDef().getLocusCount();\n app_id = application_id;\n \n initializeSimulator(tSim, spec, study);\n initializeSimulator(dSim, spec, study);\n \n if( app_id.equals(\"hapConstructor\") )\n {\n int[] loci = new int[numGDef];\n \n for( int j =0; j < numGDef; j ++ )\n {\n loci[j] = j;\n }\n \n Study[] istudy = spec.getStudy();\n study_Gtypes = new compressGtype[istudy.length];\n initiate_cGtypes(istudy,loci);\n \n String[] models = spec.gethapC_models();\n List<String>a = new ArrayList<String>();\n \n for( int j = 0; j < models.length; j++ )\n {\n a.add(models[j]);\n }\n setupModels(a, spec);\n }\n \n if ( theAnalyses.length > 0 )\n {\n System.out.println(\"Getting subjects...\");\n for ( int i = 0; i < theAnalyses.length; ++i )\n {\n theAnalyses[i].setStudySubjects(study);\n }\n }\n }", "public Gas(Context context) {\n\t\tsuper(context);\n\t\t// TODO Auto-generated constructor stub\n\t}", "public GObject(String fileName) throws FileNotFoundException, IOException\n {\n\t BufferedReader reader = null;\n\t try \n\t {\n\t\t File file = new File(fileName); // Get file\n\t\t reader = new BufferedReader(new FileReader(file));\n\t\t \n\t\t int vertexSize = Integer.parseInt(reader.readLine().trim()); \n\t\t vertex = new Point3D [vertexSize];\n\t\t for(int i = 0 ; i < vertexSize ; i ++)\n\t\t {\n\t\t \t\tString [] vertexArray = reader.readLine().split(\" \");\n\t\t \t\tvertex[i] = new Point3D(Double.parseDouble(vertexArray[0]),Double.parseDouble(vertexArray[1]),Double.parseDouble(vertexArray[2]));\n\t\t }\n\t\t \n\t\t reader.readLine(); // Skip a line\n\t\t \n\t\t int faceSize = Integer.parseInt(reader.readLine().trim());\n\t\t face = new Face[faceSize];//Store the faces\n\t\t for(int i = 0 ; i < faceSize ; i++)\n\t\t {\n\t\t \t\tint number_of_faces = Integer.parseInt(reader.readLine().trim());\n\t\t \t\tSystem.out.println(number_of_faces);\n\t\t \t\tString [] index = (reader.readLine().split(\" \"));\n\t\t \t\t\n\t\t \t\tint [] index_v = new int [number_of_faces];\n\t\t \t\t\n\t\t \t\tfor(int j = 0 ; j < index.length; j++)\n\t\t \t\t{\n\t\t \t\t\tindex_v[j] = Integer.parseInt(index[j]);\n\t\t \t\t}\n\t\t \t\tString [] color = reader.readLine().split(\" \");\n\t\t \t\tColor color_v = new Color(Float.parseFloat(color[0]),Float.parseFloat(color[1]),Float.parseFloat(color[2])); // Get the colours\n\t\t \t\tface[i] = new Face(index_v,color_v);\n\t\t \t\tface[i].toString();\n\t\t } \n\t\t} catch (IOException e) \n\t\t{\n\t\t e.printStackTrace();\n\t\t} finally {\n\t\t try \n\t\t {\n\t\t reader.close();\n\t\t } catch (IOException e) \n\t\t {\n\t\t e.printStackTrace();\n\t\t }\n\t\t}\n }", "private void CreateGenomeData()\n {\n SymbolList blankList = new BlankSymbolList(totalLength);\n SimpleSequenceFactory seqFactory = new SimpleSequenceFactory();\n blankSequence = seqFactory.createSequence(blankList, null, null, null);\n \n try {\n \n for(int i =0;i<chromosomeCount;i++)\n {\n ArrayList<GeneDisplayInfo> currentChr = outputGenes.get(i);\n int geneCount = currentChr.size();\n\n for(int j =0; j < geneCount ; j++)\n {\n \n GeneDisplayInfo gene = currentChr.get(j);\n StrandedFeature.Template stranded = new StrandedFeature.Template();\n\n if(gene.Complement)\n stranded.strand = StrandedFeature.NEGATIVE;\n else\n stranded.strand = StrandedFeature.POSITIVE;\n stranded.location = new RangeLocation(gene.Location1,gene.Location2);\n //String s = \"Source\n \n stranded.type = \"Source\" + Integer.toString(i);\n if(gene.name ==\"Circular\")\n stranded.type = \"CircularF\" + Integer.toString(i);\n stranded.source = gene.name;\n Feature f = blankSequence.createFeature(stranded);\n \n }\n \n } \n \n \n int totalfeature =sourceGene.size(); \n for(int i =0; i < totalfeature ; i++)\n {\n\n GeneDisplayInfo gene = GeneData.targetGene.get(i);\n StrandedFeature.Template stranded = new StrandedFeature.Template();\n \n if(gene.Complement)\n stranded.strand = StrandedFeature.NEGATIVE;\n else\n stranded.strand = StrandedFeature.POSITIVE;\n stranded.location = new RangeLocation(gene.Location1,gene.Location2);\n stranded.type = \"Target\";\n stranded.source = gene.name;\n blankSequence.createFeature(stranded);\n \n }\n \n \n }\n catch (BioException ex) {\n Logger.getLogger(GeneData.class.getName()).log(Level.SEVERE, null, ex);\n } catch (ChangeVetoException ex) {\n Logger.getLogger(GeneData.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n\t\tcurdata = GenomeDataFactory.createGenomeData(blankSequence);\t\n \n \n }", "public abstract void createGenome(Genome newGenome);", "public BopeAutoGG() {\n\t\tsuper(BopeCategory.BOPE_CHAT);\n\n\t\t// Info.\n\t\tthis.name = \"Auto GG\";\n\t\tthis.tag = \"AutoGG\";\n\t\tthis.description = \"Automaticaly say good game paceaful or no!\";\n\n\t\t// Release.\n\t\trelease(\"B.O.P.E - Module - B.O.P.E\");\n\t}", "public GeotiffDataSource(DataSourceDescriptor descriptor,\n String filename, Hashtable properties)\n throws VisADException {\n super(descriptor, filename, \"Tiff data source\", properties);\n openData();\n }", "public static Gng init() {\n return new Gng();\n }", "public static MyFileContext create() {\n\t\treturn new MyContextImpl();\n\t}", "@DISPID(1611005956) //= 0x60060004. The runtime will prefer the VTID if present\n @VTID(31)\n boolean newWithGS();", "public MailcapFile(String new_fname) throws IOException {\n/* 83 */ if (LogSupport.isLoggable())\n/* 84 */ LogSupport.log(\"new MailcapFile: file \" + new_fname); \n/* 85 */ FileReader reader = null;\n/* */ try {\n/* 87 */ reader = new FileReader(new_fname);\n/* 88 */ parse(new BufferedReader(reader));\n/* */ } finally {\n/* 90 */ if (reader != null) {\n/* */ try {\n/* 92 */ reader.close();\n/* 93 */ } catch (IOException ex) {}\n/* */ }\n/* */ } \n/* */ }", "private void CreateNewFile() {\n\tcheckState();\n\t\n\tif (CanR=CanW=true)\n\t{\n\t\t\n\t\ttry {\n\t\t root = Environment.getExternalStorageDirectory();\n\t\t \n\t\t if (root.canWrite()){\n\t\t gpxfile = new File(root, \"Speed_SD.csv\");\n\t\t gpxwriter = new FileWriter(gpxfile,true);\n\t\t out = new BufferedWriter(gpxwriter);\nout.append(\"\"+\",\"+\"\"+\",\"+\"\");\n\t\t out.newLine();\n\t\t }\n\t\t} catch (IOException e) {\n\t\t //Log.e(, \"Could not write file \" + e.getMessage());\ne.printStackTrace();\n\t\t\n\t}\n\t\t\n}\n\t\t}", "public MTPostEditDistanceReportGenerator()\n {\n\n }", "public ShapeFile(){\n numShapes = 0;\n }", "public File generateFile()\r\n {\r\n return generateFile(null);\r\n }", "public Pig() {\n this.id = \"\";\n this.weight = 0;\n this.earTag = \"1230\";\n }", "public PertFactory() {\n for (Object[] o : classTagArray) {\n addStorableClass((String) o[1], (Class) o[0]);\n }\n }", "public Vector4d() {\n\t\t// intentionally left empty\n\t}", "public LdifFile()\n {\n }", "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 }", "protected MetadataUGWD() {/* intentionally empty block */}", "public ClassTemplate() {\n\t}", "protected GuiTestObject bed_4() \n\t{\n\t\treturn new GuiTestObject(\n getMappedTestObject(\"bed_4\"));\n\t}", "public final void createGattArray(final int length) {\r\n gattArray = new FileMincAttElem[length];\r\n }", "public File_Delet() {\n\t\tsuper();\n\t}", "public static FileMappedTupleList createNew(final File file, final int tupleLength, final int tupleCount)\n throws IOException {\n return new FileMappedTupleList(file, tupleLength, tupleCount);\n }" ]
[ "0.6507993", "0.58039373", "0.5727415", "0.54594445", "0.5400014", "0.53548175", "0.5252031", "0.52485925", "0.52388865", "0.5226496", "0.52128226", "0.51873636", "0.5147789", "0.5144815", "0.50834095", "0.50622874", "0.5037168", "0.5007542", "0.50039315", "0.49888748", "0.49765468", "0.49535143", "0.49161384", "0.48700044", "0.48690942", "0.48640797", "0.48611927", "0.4854504", "0.48537952", "0.48360232", "0.4830354", "0.48255295", "0.48198393", "0.48131195", "0.48053002", "0.479808", "0.47889486", "0.47855303", "0.47851968", "0.4772255", "0.47680634", "0.47513726", "0.475044", "0.4738379", "0.47376034", "0.47334787", "0.47276625", "0.4722845", "0.47096074", "0.47093514", "0.47069055", "0.469598", "0.4684149", "0.46744642", "0.46686703", "0.4663423", "0.466113", "0.46610534", "0.466063", "0.46523666", "0.46522048", "0.46392116", "0.46357805", "0.4625949", "0.46187875", "0.4611641", "0.46108022", "0.46052402", "0.46010745", "0.459484", "0.45899785", "0.4589671", "0.4589283", "0.4582397", "0.4581955", "0.4580631", "0.45758304", "0.4570582", "0.45627806", "0.45592383", "0.45575026", "0.4554169", "0.45479617", "0.45440942", "0.4542549", "0.45268792", "0.45258665", "0.45246825", "0.45163468", "0.4513264", "0.45037583", "0.45001605", "0.44978756", "0.44973484", "0.44967327", "0.44942686", "0.44937465", "0.44926807", "0.44916272", "0.44886935" ]
0.5331228
6
Copies the file to the location represented by URI dest. If the destination is on the local machine is calls the copyToLocal method. In other cases the copyThirdParty method is called. It passes a provider string to the call, and it tries the copy with all JavaCog provider.
protected synchronized boolean copy2(String destStr) throws GATInvocationException { EndpointReferenceType credentialEndpoint = getCredentialEPR(); TransferType[] transferArray = new TransferType[1]; transferArray[0] = new TransferType(); transferArray[0].setSourceUrl(rftgt42Location); transferArray[0].setDestinationUrl(destStr); RFTOptionsType rftOptions = new RFTOptionsType(); rftOptions.setBinary(Boolean.TRUE); // rftOptions.setIgnoreFilePermErr(false); TransferRequestType request = new TransferRequestType(); request.setRftOptions(rftOptions); request.setTransfer(transferArray); request.setTransferCredentialEndpoint(credentialEndpoint); setRequest(request); return status.equals(RequestStatusTypeEnumeration.Done.toString()) || status.equals(TransferStatusTypeEnumeration.Finished .toString()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"resource\")\r\n\tpublic static synchronized void copyFile(File source, File dest)\r\n\t\t\tthrows IOException {\r\n\t\tFileChannel srcChannel = null;\r\n\t\tFileChannel dstChannel = null;\r\n\t\ttry {\r\n\t\t\tsrcChannel = new FileInputStream(source).getChannel();\r\n\t\t\tdstChannel = new FileOutputStream(dest).getChannel();\r\n\t\t\tdstChannel.transferFrom(srcChannel, 0, srcChannel.size());\r\n\t\t} finally {\r\n\t\t\tsrcChannel.close();\r\n\t\t\tdstChannel.close();\r\n\t\t}\r\n\t}", "void copyFile(String sourceFile, String destinationFile, boolean overwrite) throws IOException;", "void copyFile(String sourceFile, String destinationFile) throws IOException;", "public static void copy(URL src, File dst) throws IOException {\n\n try (InputStream in = src.openStream()) {\n try (OutputStream out = new FileOutputStream(dst)) {\n dst.mkdirs();\n copy(in, out);\n }\n }\n }", "@Test(groups = \"Integration\")\n public void testCopyFileTo() throws Exception {\n File dest = Os.newTempFile(getClass(), \".dest.tmp\");\n File src = Os.newTempFile(getClass(), \".src.tmp\");\n try {\n Files.write(\"abc\", src, Charsets.UTF_8);\n host.copyTo(src, dest);\n assertEquals(\"abc\", Files.readFirstLine(dest, Charsets.UTF_8));\n } finally {\n src.delete();\n dest.delete();\n }\n }", "public void copyFile(String src, String dst) throws IOException {\n\n\t\tFile srcFile = new File(src);\n\t\tFile dstFile = new File(dst);\n\n\t\tcopyFile(srcFile, dstFile);\n\t}", "private void copy(File src, File dst) throws IOException \r\n {\r\n InputStream in = new FileInputStream(src);\r\n OutputStream out = new FileOutputStream(dst);\r\n \r\n // Transfer bytes from in to out\r\n byte[] buf = new byte[1024];\r\n int len;\r\n while ((len = in.read(buf)) > 0) \r\n {\r\n out.write(buf, 0, len);\r\n }\r\n in.close();\r\n out.close();\r\n }", "static void copyFile(File src, File dest) throws IOException {\r\n\t\tFileInputStream fis = new FileInputStream(src);\r\n\t\tFileOutputStream fos = new FileOutputStream (dest);\r\n\t\tbyte[] bytes = new byte[4*1048576];\r\n\t\tint numRead;\r\n\t\twhile ((numRead = fis.read(bytes)) > 0) {\r\n\t\t\tfos.write(bytes, 0, numRead);\r\n\t\t}\r\n\t\tfis.close();\r\n\t\tfos.close();\r\n\t}", "private static void copyFile(File scrFile, File file) {\n\t\r\n}", "@Override\n\tpublic URI copy(URI uri, URI toURI) throws StorageSecuirtyException,\n\t\t\tResourceAccessException {\n\t\treturn null;\n\t}", "@Override\n\tpublic void transferTo(File dest) throws IOException, IllegalStateException {\n\n\t}", "public static boolean copyFile(String src, String dst) {\n FileChannel inChannel = null;\n FileChannel outChannel = null;\n try {\n inChannel = new FileInputStream(new File(src)).getChannel();\n outChannel = new FileOutputStream(new File(dst)).getChannel();\n inChannel.transferTo(0, inChannel.size(), outChannel);\n } catch (FileNotFoundException e) {\n MessageGenerator.briefError(\"ERROR could not find/access file(s): \" + src + \" and/or \" + dst);\n return false;\n } catch (IOException e) {\n MessageGenerator.briefError(\"ERROR copying file: \" + src + \" to \" + dst);\n return false;\n } finally {\n try {\n if (inChannel != null)\n inChannel.close();\n if (outChannel != null)\n outChannel.close();\n } catch (IOException e) {\n MessageGenerator.briefError(\"Error closing files involved in copying: \" + src + \" and \" + dst);\n return false;\n }\n }\n return true;\n }", "private static void copyFile(File in, File out)\n\t{\n\t\ttry\n\t\t{\n\t\t\tFileChannel inChannel = new\tFileInputStream(in).getChannel();\n\t\t\tFileChannel outChannel = new FileOutputStream(out).getChannel();\n\t\t\tinChannel.transferTo(0, inChannel.size(), outChannel);\n\t\t\tinChannel.close();\n\t\t\toutChannel.close();\t\t\t\n\t\t} catch (Exception e)\n\t\t{\n\t\t\tDebug.e(\"RFO.copyFile(): \" + e);\n\t\t}\n\n\t}", "public boolean copyTo( final String _dest )\n\t{\n\t\tfinal FileStream destination = GlobalFileSystem.getFile( new File( _dest ).getParent() ) ;\n\t\tif( destination.exists() == false && destination.mkdirs() == false )\n\t\t{\n\t\t\tSystem.out.println( \"Failed to create directories.\" ) ;\n\t\t\treturn false ;\n\t\t}\n\n\t\tfinal FileStream stream = GlobalFileSystem.getFile( _dest ) ;\n\t\tif( stream == null )\n\t\t{\n\t\t\tSystem.out.println( \"Unable to acquire file stream for: \" + _dest ) ;\n\t\t\treturn false ;\n\t\t}\n\n\t\ttry( final ByteInStream in = getByteInStream() ;\n\t\t\t final ByteOutStream out = stream.getByteOutStream() )\n\t\t{\n\t\t\tif( out == null )\n\t\t\t{\n\t\t\t\treturn false ;\n\t\t\t}\n\n\t\t\tint length = 0 ;\n\t\t\tfinal byte[] buffer = new byte[48] ;\n\n\t\t\twhile( ( length = in.readBytes( buffer, 0, buffer.length ) ) > 0 )\n\t\t\t{\n\t\t\t\tout.writeBytes( buffer, 0, length ) ;\n\t\t\t}\n\n\t\t\treturn true ;\n\t\t}\n\t\tcatch( Exception ex )\n\t\t{\n\t\t\treturn false ;\n\t\t}\n\t}", "public static void copyResource(final Resource source, final Resource dest, final Project project)\n throws IOException {\n copyResource(source, dest, null, null, false,\n false, null, null, project);\n }", "@Override\n public void copyMetadata(URI destination) throws IOException {\n getFileIoProvider().nativeCopyFileUnbuffered(\n getVolume(), getMetaFile(), new File(destination), true);\n }", "public static IStatus copyFile(URL from, String to) {\n \t\ttry {\n \t\t\treturn copyFile(from.openStream(), to);\n \t\t} catch (Exception e) {\n \t\t\tTrace.trace(Trace.SEVERE, \"Error copying file\", e);\n \t\t\treturn new Status(IStatus.ERROR, TomcatPlugin.PLUGIN_ID, 0, NLS.bind(Messages.errorCopyingFile, new String[] {to, e.getLocalizedMessage()}), e);\n \t\t}\n \t}", "private static void copyFiles(File source, File dest) throws IOException {\n\t\tif(!source.equals(dest))\n\t\t\tFileUtils.copyFile(source, dest);\n\t}", "@Override\n public void copyBlockdata(URI destination) throws IOException {\n getFileIoProvider().nativeCopyFileUnbuffered(\n getVolume(), getBlockFile(), new File(destination), true);\n }", "public static void copyResource(final Resource source, final Resource dest) throws IOException {\n copyResource(source, dest, null);\n }", "public void copy(String name, String oldPath, String newPath);", "public boolean copyFile(final Uri source, final Uri target)\n\t\t\tthrows IOException\n\t{\n\t\tInputStream inStream = null;\n\t\tOutputStream outStream = null;\n\n\t\tUsefulDocumentFile destinationDoc = getDocumentFile(target, false, true);\n\t\tUsefulDocumentFile.FileData destinationData = destinationDoc.getData();\n\t\tif (!destinationData.exists)\n\t\t{\n\t\t\tdestinationDoc.getParentFile().createFile(null, destinationData.name);\n\t\t\t// Note: destinationData is invalidated upon creation of the new file, so make a direct call following\n\t\t}\n\t\tif (!destinationDoc.exists())\n\t\t{\n\t\t\tthrow new WritePermissionException(\n\t\t\t\t\t\"Write permission not found. This indicates a SAF write permission was requested. \" +\n\t\t\t\t\t\"The app should store any parameters necessary to resume write here.\");\n\t\t}\n\n\t\ttry\n\t\t{\n\t\t\tinStream = FileUtil.getInputStream(this, source);\n\t\t\toutStream = getContentResolver().openOutputStream(target);\n\n\t\t\tUtil.copy(inStream, outStream);\n\t\t}\n\t\tcatch(ArithmeticException e)\n\t\t{\n\t\t\tLog.d(TAG, \"File larger than 2GB copied.\");\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tthrow new IOException(\"Failed to copy \" + source.getPath() + \": \" + e.toString());\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tUtil.closeSilently(inStream);\n\t\t\tUtil.closeSilently(outStream);\n\t\t}\n\t\treturn true;\n\t}", "public Path copie(String source, String destination) throws IOException {\n Path root = Paths.get(source);\n Path cible = Paths.get(destination);\n\n Path copy;\n copy = Files.copy(root, cible.resolve(root.getFileName()), StandardCopyOption.REPLACE_EXISTING, StandardCopyOption.COPY_ATTRIBUTES);\n\n return copy;\n }", "public boolean copy(String path, InputStream is) throws SystemException;", "public void copyFile(File src, File dst) throws IOException {\n File file = new File(dst + File.separator + src.getName());\n file.createNewFile();\n Log.i(\"pictureSelect\", \"Dest file: \" + file.getAbsolutePath());\n\n InputStream in = new FileInputStream(src);\n OutputStream out = new FileOutputStream(file);\n\n // Transfer bytes from in to out\n byte[] buf = new byte[1024];\n int len;\n while ((len = in.read(buf)) > 0) {\n out.write(buf, 0, len);\n }\n in.close();\n out.close();\n scanSD(file);\n }", "public static void copyFileSourceToDestination(File src, File dest) throws IOException {\n\t\tInputStream is = null;\n\t\tOutputStream os = null;\n\t\ttry {\n\t\t\tis = new FileInputStream(src);\n\t\t\tos = new FileOutputStream(dest);\n\t\t\t// buffer size 1K\n\t\t\tbyte[] buf = new byte[1024];\n\t\t\tint bytesRead;\n\t\t\twhile ((bytesRead = is.read(buf)) > 0) {\n\t\t\t\tos.write(buf, 0, bytesRead);\n\t\t\t}\n\t\t} finally {\n\t\t\tis.close();\n\t\t\tos.close();\n\t\t}\n\t}", "public void copyOne(String from, String to) {\n\t\tFile source = new File(from);\n\t\tif (sourceExists(source)) {\n\t\t\tFile target = new File(to);\n\t\t\ttry{\n\t\t\t\tif(!targetExists(target)){\n\t\t\t\t\tFiles.copy(source.toPath(), target.toPath());\n\t\t\t\t\tSystem.out.println(\"File \" + target.getName()\n\t\t\t\t\t\t\t+ \" COPIED!\");\n\t\t\t\t} else if (target.exists() && confirmReplace()) {\n\t\t\t\t\tFiles.copy(source.toPath(), target.toPath(),\n\t\t\t\t\t\t\tREPLACE_EXISTING);\n\t\t\t\t\tSystem.out.println(\"File \" + target.getName() + \" REPLACED!\");\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.println(\"File WASN'T copied!\");\n\t\t\t\t}\n\t\t\t}catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public static final void copy(String source, String destination) {\n File sourceFile = new File(source);\n File destFile = new File(destination);\n\n if (destFile.exists()) {\n // Information error all ready exist the file\n }\n\n if (!sourceFile.exists()) {\n // General Server Error\n }\n\n if (sourceFile.isDirectory()) {\n copyDirectory(source, destination);\n } else {\n copyFile(source, destination);\n }\n\n //delete source folder after copy-paste\n }", "private void copyFile(InputStream ins, OutputStream outs) throws IOException {\n byte[] buffer = new byte[1024];\n int read;\n while((read = ins.read(buffer)) != -1) {\n outs.write(buffer, 0, read);\n }\n }", "public void transferTo(File dest) throws IOException, IllegalStateException {\r\n mFile.transferTo(dest);\r\n }", "private void copyFile(String source, String destination) throws IOException {\n File inputFile = new File(source);\n File outputFile = new File(destination);\n\t\n BufferedInputStream in = new BufferedInputStream(\n\t\t\t\t new FileInputStream(inputFile));\n BufferedOutputStream out = new BufferedOutputStream(\n\t\t\t\t new FileOutputStream(outputFile));\n int c;\n\tbyte[] tmp = new byte[4096];\n\t\n while ((c = in.read(tmp, 0, 4096)) != -1)\n\t out.write(tmp, 0, c);\n\t\n in.close();\n out.close();\n }", "public static void main(String[] args) throws IOException {\n\t\tString sourcePathHdfs=args[0];\n\t\tString destinationPath=args[1];\n\t\tnew CopyToLocal().copyToLocal(sourcePathHdfs, destinationPath);\n\t\t\n\t}", "public void copy(){\n\t\tFileInputStream is = null;\n\t\tFileOutputStream os = null;\n\t\ttry {\n\t\t\tis = new FileInputStream(source);\n\t\t\tos = new FileOutputStream(dest);\n\t\t\tif(dest.exists())\n\t\t\t\tdest.delete();\n\t\t\tint i = -1;\n\t\t\twhile((i = is.read()) != -1)\n\t\t\t\tos.write(i);\n\t\t\tsource.deleteOnExit();\n\t\t} catch (IOException e) {\n\t\t\tJOptionPane.showMessageDialog(null, e);\n\t\t} finally {\n\t\t\tif(is != null)\n\t\t\t\ttry {\n\t\t\t\t\tis.close();\n\t\t\t\t} catch (IOException ignored) {}\n\t\t\tif(os != null)\n\t\t\t\ttry {\n\t\t\t\t\tos.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, e);\n\t\t\t\t}\n\t\t}\n\t}", "private void copyFile(String source, String destination, Environment env) throws IOException, InvalidPathException {\n\t\tPath sourcePath = Paths.get(source);\n\t\tPath destinationPath = Paths.get(destination);\n\n\t\tif (sourcePath.equals(destinationPath)) {\n\t\t\tenv.writeln(\"The source and the destination can not be equal.\");\n\t\t\treturn;\n\t\t}\n\t\tif (!Files.exists(sourcePath)) {\n\t\t\tenv.writeln(\"The specified file does not exist.\");\n\t\t\treturn;\n\t\t}\n\t\tif (Files.isDirectory(sourcePath)) {\n\t\t\tenv.writeln(\"Copy command can not copy a directory.\");\n\t\t\treturn;\n\t\t}\n\t\tif (Files.isDirectory(destinationPath)) {\n\t\t\tdestinationPath = Paths.get(destinationPath.toString(), sourcePath.getFileName().toString());\n\t\t}\n\t\tif (Files.exists(destinationPath)) {\n\t\t\tenv.write(\n\t\t\t\t\t\"There already is a file with the same name at the specified destination. \\nDo you want to overwrite it? [y/n] \");\n\n\t\t\twhile (true) {\n\t\t\t\tString answer;\n\t\t\t\ttry {\n\t\t\t\t\tanswer = env.readLine().trim();\n\t\t\t\t} catch (ShellIOException ex) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (answer.equals(\"n\")) {\n\t\t\t\t\tenv.writeln(\"Operation canceled.\");\n\t\t\t\t\treturn;\n\t\t\t\t} else if (answer.equals(\"y\")) {\n\t\t\t\t\tenv.writeln(\"Operation confirmed.\");\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\tenv.writeln(\"Invalid answer. Answer 'y' for 'yes' or 'n' for 'no'.\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tBufferedInputStream inputStream = new BufferedInputStream(Files.newInputStream(sourcePath));\n\t\tBufferedOutputStream outputStream = new BufferedOutputStream(Files.newOutputStream(destinationPath));\n\t\twhile (true) {\n\t\t\tint b = inputStream.read();\n\t\t\tif (b == -1) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\toutputStream.write(b);\n\t\t}\n\n\t\tinputStream.close();\n\t\toutputStream.close();\n\t}", "private Promise<Void> copyResource(final Resource resource, final Path destination) {\n return resource.copy(destination)\n .thenPromise((Function<Resource, Promise<Void>>)resource1 -> promises.resolve(null))\n .catchErrorPromise(error -> {\n\n //resource may already exists\n if (error.getMessage().contains(\"exists\")) {\n\n //create dialog with overwriting option\n return createFromAsyncRequest((RequestCall<Void>)callback -> {\n\n //handle overwrite operation\n final ConfirmCallback overwrite = () -> {\n\n //copy with overwriting\n resource.copy(destination, true).then(ignored -> {\n callback.onSuccess(null);\n }).catchError(error1 -> {\n callback.onFailure(error1.getCause());\n });\n };\n\n //skip this resource\n final ConfirmCallback skip = () -> callback.onSuccess(null);\n\n //change destination name\n final ConfirmCallback rename = () ->\n dialogFactory.createInputDialog(\"Enter new name\", \"Enter new name\",\n value -> {\n final Path newPath = destination.parent().append(value);\n\n copyResource(resource, newPath)\n .then(callback::onSuccess)\n .catchError(error1 -> {\n callback.onFailure(error1.getCause());\n });\n },\n null).show();\n\n dialogFactory.createChoiceDialog(\"Error\",\n error.getMessage(),\n \"Overwrite\",\n \"Skip\",\n \"Change Name\",\n overwrite,\n skip,\n rename).show();\n });\n } else {\n //notify user about failed copying\n notificationManager.notify(\"Error copying resource\", error.getMessage(), FAIL, FLOAT_MODE);\n\n return promises.resolve(null);\n }\n });\n }", "@NotNull\n FileViewProvider createCopy(@NotNull VirtualFile copy);", "private boolean copyFile(FileInputStream srcStream, String filePath) {\n FileChannel srcChannel;\n FileOutputStream destStream;\n Throwable th;\n if (srcStream != null) {\n if (filePath != null) {\n FileOutputStream destStream2 = null;\n FileChannel dstChannel = null;\n FileChannel dstChannel2 = null;\n try {\n destStream2 = new FileOutputStream(createDestFile(filePath));\n FileChannel srcChannel2 = srcStream.getChannel();\n try {\n FileChannel dstChannel3 = destStream2.getChannel();\n try {\n srcChannel2.transferTo(0, srcChannel2.size(), dstChannel3);\n boolean isSuccess = true;\n try {\n srcChannel2.close();\n } catch (IOException e) {\n isSuccess = false;\n Log.e(TAG, \"rcChannel close error, IOException:\");\n }\n try {\n destStream2.close();\n } catch (IOException e2) {\n isSuccess = false;\n Log.e(TAG, \"destStream close error, IOException:\");\n }\n if (dstChannel3 != null) {\n try {\n dstChannel3.close();\n } catch (IOException e3) {\n Log.e(TAG, \"dstChannel close error, IOException:\");\n return false;\n }\n }\n return isSuccess;\n } catch (FileNotFoundException e4) {\n dstChannel2 = dstChannel3;\n dstChannel = srcChannel2;\n boolean isSuccess2 = false;\n Log.e(TAG, \"copyFile FileNotFoundException.\");\n if (dstChannel != null) {\n try {\n dstChannel.close();\n } catch (IOException e5) {\n isSuccess2 = false;\n Log.e(TAG, \"rcChannel close error, IOException:\");\n }\n }\n if (destStream2 != null) {\n try {\n destStream2.close();\n } catch (IOException e6) {\n Log.e(TAG, \"destStream close error, IOException:\");\n isSuccess2 = false;\n }\n }\n if (dstChannel2 == null) {\n return isSuccess2;\n }\n dstChannel2.close();\n return isSuccess2;\n } catch (IOException e7) {\n dstChannel2 = dstChannel3;\n dstChannel = srcChannel2;\n boolean isSuccess3 = false;\n try {\n Log.e(TAG, \"init IO error, IOException:\");\n if (dstChannel != null) {\n try {\n dstChannel.close();\n } catch (IOException e8) {\n isSuccess3 = false;\n Log.e(TAG, \"rcChannel close error, IOException:\");\n }\n }\n if (destStream2 != null) {\n try {\n destStream2.close();\n } catch (IOException e9) {\n Log.e(TAG, \"destStream close error, IOException:\");\n isSuccess3 = false;\n }\n }\n if (dstChannel2 == null) {\n return isSuccess3;\n }\n try {\n dstChannel2.close();\n return isSuccess3;\n } catch (IOException e10) {\n Log.e(TAG, \"dstChannel close error, IOException:\");\n return false;\n }\n } catch (Throwable th2) {\n srcChannel = dstChannel2;\n destStream = destStream2;\n th = th2;\n }\n } catch (Throwable th3) {\n destStream = destStream2;\n th = th3;\n srcChannel = dstChannel3;\n dstChannel = srcChannel2;\n if (dstChannel != null) {\n try {\n dstChannel.close();\n } catch (IOException e11) {\n Log.e(TAG, \"rcChannel close error, IOException:\");\n }\n }\n if (destStream != null) {\n try {\n destStream.close();\n } catch (IOException e12) {\n Log.e(TAG, \"destStream close error, IOException:\");\n }\n }\n if (srcChannel != null) {\n try {\n srcChannel.close();\n } catch (IOException e13) {\n Log.e(TAG, \"dstChannel close error, IOException:\");\n }\n }\n throw th;\n }\n } catch (FileNotFoundException e14) {\n dstChannel = srcChannel2;\n boolean isSuccess22 = false;\n Log.e(TAG, \"copyFile FileNotFoundException.\");\n if (dstChannel != null) {\n }\n if (destStream2 != null) {\n }\n if (dstChannel2 == null) {\n }\n } catch (IOException e15) {\n dstChannel = srcChannel2;\n boolean isSuccess32 = false;\n Log.e(TAG, \"init IO error, IOException:\");\n if (dstChannel != null) {\n }\n if (destStream2 != null) {\n }\n if (dstChannel2 == null) {\n }\n } catch (Throwable th4) {\n dstChannel = srcChannel2;\n srcChannel = null;\n destStream = destStream2;\n th = th4;\n if (dstChannel != null) {\n }\n if (destStream != null) {\n }\n if (srcChannel != null) {\n }\n throw th;\n }\n } catch (FileNotFoundException e16) {\n boolean isSuccess222 = false;\n Log.e(TAG, \"copyFile FileNotFoundException.\");\n if (dstChannel != null) {\n }\n if (destStream2 != null) {\n }\n if (dstChannel2 == null) {\n }\n } catch (IOException e17) {\n boolean isSuccess322 = false;\n Log.e(TAG, \"init IO error, IOException:\");\n if (dstChannel != null) {\n }\n if (destStream2 != null) {\n }\n if (dstChannel2 == null) {\n }\n }\n }\n }\n return false;\n }", "private static boolean copy(JFrame parent, String sourcename, String destname) {\n File destfileobj = new File(destname);\n if (destfileobj.isFile() && destfileobj.length() > 0)\n return false;\n boolean result = true;\n InputStream in = null;\n FileOutputStream out = null;\n try {\n in = Util.class.getClassLoader().getResourceAsStream(sourcename);\n if (in == null)\n return false; // This means the file is not relevant for this\n // setup, so we don't pop up a fatal dialog\n out = new FileOutputStream(destname);\n byte[] b = new byte[16384];\n while (true) {\n int numRead = in.read(b);\n if (numRead < 0)\n break;\n if (numRead > 0)\n out.write(b, 0, numRead);\n }\n } catch (IOException e) {\n result = false;\n }\n if (!close(out))\n result = false;\n if (!close(in))\n result = false;\n if (!result)\n OurDialog.fatal(parent, \"Error occurred in creating the file \\\"\" + destname + \"\\\"\");\n return true;\n }", "public static void copyFile(String from, String to) throws IOException{\r\n Path src = Paths.get(from); // set path of source directory from parent function\r\n Path dest = Paths.get(to); // set path of destination directory from parent function\r\n Files.copy(src, dest); //inbuilt function to copy files\r\n \r\n }", "public static void copyFile(File source, File destination) throws IOException {\n\tFileChannel sourceChannel = null;\n\tFileChannel destinationChannel = null;\n\ttry {\n\t if (destination.exists()) {\n\t\tdestination.delete();\n\t }\n\t sourceChannel = new FileInputStream(source).getChannel();\n\t destinationChannel = new FileOutputStream(destination).getChannel();\n\t int maxCount = (64 * 1024 * 1024) - (32 * 1024);// magic number for Windows, 64Mb - 32Kb\n\t long size = sourceChannel.size();\n\t long position = 0;\n\t while (position < size) {\n\t\tposition += sourceChannel.transferTo(position, maxCount, destinationChannel);\n\t }\n\t} catch (IOException e) {\n\t throw e;\n\t} finally {\n\t if (null != sourceChannel) {\n\t\tsourceChannel.close();\n\t }\n\t if (null != destinationChannel) {\n\t\tdestinationChannel.close();\n\t }\n\t}\n }", "public void copy(String scrpath,String destpath) throws IOException \n\t{\n\t\ttry {\n\t\t\tInputStream in=new FileInputStream(scrpath);\n\t\t\tFileOutputStream out=new FileOutputStream(destpath);\n\t\t\tbyte[] buffer=new byte[1024];\n\t\t\tint length=0;\n\t\t\twhile((length=in.read(buffer))>0) {\n\t\t\t\tSystem.out.println(length);\n\t\t\t\tout.write(buffer,0,length);\n\t\t\t}\n\t\t\tin.close();\n\t\t\tout.close();\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}", "public static void copyFile(File sourceFile, File destFile)\n throws IOException {\n if (!destFile.exists()) {\n destFile.createNewFile();\n }\n FileChannel source = null;\n FileChannel destination = null;\n try {\n source = new FileInputStream(sourceFile).getChannel();\n destination = new FileOutputStream(destFile).getChannel();\n destination.transferFrom(source, 0, source.size());\n } catch (Exception e) {} finally {\n if (source != null) {\n source.close();\n }\n if (destination != null) {\n destination.close();\n }\n }\n }", "@Test(groups = \"Integration\")\n public void testCopyStreamTo() throws Exception {\n String contents = \"abc\";\n File dest = new File(Os.tmp(), \"sssMachineLocationTest_dest.tmp\");\n try {\n host.copyTo(Streams.newInputStreamWithContents(contents), dest.getAbsolutePath());\n assertEquals(\"abc\", Files.readFirstLine(dest, Charsets.UTF_8));\n } finally {\n dest.delete();\n }\n }", "public static void copyFileOrDirectory(String source, String destination) throws KubernetesPluginException {\n File src = new File(source);\n File dst = new File(destination);\n try {\n // if source is file\n if (Files.isRegularFile(Paths.get(source))) {\n if (Files.isDirectory(dst.toPath())) {\n // if destination is directory\n FileUtils.copyFileToDirectory(src, dst);\n } else {\n // if destination is file\n FileUtils.copyFile(src, dst);\n }\n } else if (Files.isDirectory(Paths.get(source))) {\n FileUtils.copyDirectory(src, dst);\n }\n } catch (IOException e) {\n throw new KubernetesPluginException(\"Error while copying file\", e);\n }\n }", "@Override\r\n\tpublic String write(File origFile, String destPath) {\n\t\ttry {\r\n\t\t\tString uuid = UUID.randomUUID().toString().replaceAll(\"-\", \"\")\r\n\t\t\t\t\t+ \".jpg\";\r\n\t\t\tFile destFile = new File(destPath, uuid);\r\n\t\t\tFileUtils.copyFile(origFile, destFile);\r\n\t\t\treturn uuid;\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public static void copy(File srcDir, File relSrcFile, File destDir, File relDestFile) throws IOException {\n File finalSrcFile = (srcDir != null) ? new File(srcDir, relSrcFile.getPath()) : relSrcFile;\n File relDestDir = relDestFile.getParentFile();\n if (relDestDir != null) {\n File finalDestDir = (destDir != null) ? new File(destDir, relDestDir.getPath()) : relDestDir;\n finalDestDir.mkdirs();\n }\n File finalDestFile = new File(destDir, relDestFile.getPath());\n Files.copy(finalSrcFile.toPath(), finalDestFile.toPath(), StandardCopyOption.REPLACE_EXISTING, StandardCopyOption.COPY_ATTRIBUTES);\n }", "final public VFile copyTo(VDir parentDir,String newName) throws VlException\n {\n return (VFile)this.getTransferManager().doCopyMove(this,parentDir,newName,false);\n //return (VFile)doCopyMoveTo(parentDir,newName,false /*,options*/);\n }", "public static void copy(String destdir, String pathfile) throws Exception {\r\n \t\tFile file = new File(pathfile);\r\n \t\tFile destDir = new File(destdir);\r\n \t\tcopy(destDir, file);\r\n\t}", "public static void copyResource(final Resource source, final Resource dest,\n final FilterSetCollection filters, final Vector<FilterChain> filterChains,\n final boolean overwrite, final boolean preserveLastModified,\n final boolean append,\n final String inputEncoding, final String outputEncoding,\n final Project project)\n throws IOException {\n copyResource(source, dest, filters, filterChains, overwrite,\n preserveLastModified, append, inputEncoding,\n outputEncoding, project, /* force: */ false);\n }", "public static IStatus copyFile(InputStream in, String to) {\n \t\tOutputStream out = null;\n \t\n \t\ttry {\n \t\t\tout = new FileOutputStream(to);\n \t\n \t\t\tint avail = in.read(buf);\n \t\t\twhile (avail > 0) {\n \t\t\t\tout.write(buf, 0, avail);\n \t\t\t\tavail = in.read(buf);\n \t\t\t}\n \t\t\treturn Status.OK_STATUS;\n \t\t} catch (Exception e) {\n \t\t\tTrace.trace(Trace.SEVERE, \"Error copying file\", e);\n \t\t\treturn new Status(IStatus.ERROR, TomcatPlugin.PLUGIN_ID, 0, NLS.bind(Messages.errorCopyingFile, new String[] {to, e.getLocalizedMessage()}), e);\n \t\t} finally {\n \t\t\ttry {\n \t\t\t\tif (in != null)\n \t\t\t\t\tin.close();\n \t\t\t} catch (Exception ex) {\n \t\t\t\t// ignore\n \t\t\t}\n \t\t\ttry {\n \t\t\t\tif (out != null)\n \t\t\t\t\tout.close();\n \t\t\t} catch (Exception ex) {\n \t\t\t\t// ignore\n \t\t\t}\n \t\t}\n \t}", "public static void copyFile(File src, File dst) throws IOException {\n InputStream in = new FileInputStream(src);\n OutputStream out = new FileOutputStream(dst);\n byte[] buf = new byte[1024];\n int len;\n while ((len = in.read(buf)) > 0) out.write(buf, 0, len);\n in.close();\n out.close();\n }", "private File copyResources(String srcFileName, File sourceDir, File destinationDir) throws MojoExecutionException {\n File srcFile = new File(sourceDir.getAbsolutePath()+File.separator+srcFileName);\n if (srcFile.exists()) {\n getLog().info(\"Copying \"+srcFile.getName()+\"...\");\n try {\n File destFile = new File(destinationDir.getAbsolutePath()+File.separator+srcFile.getName());\n if (srcFile.isDirectory()) {\n FileUtils.copyDirectory(srcFile, destFile, false);\n } else {\n FileUtils.copyFile(srcFile, destFile, false);\n }\n return destFile;\n } catch (IOException ex) {\n throw new MojoExecutionException(\"Error copying resource '\"+srcFile.getName()+\"'\", ex);\n }\n } else {\n getLog().warn(\"No source file '\"+srcFile.getName()+\"' to copy\");\n return null;\n }\n }", "static void copyFile(File srcFile, File destFile) {\n\t\ttry {\n\t\t\tLong start = System.currentTimeMillis();\n\t\t\tdestFile.createNewFile();\n\t\t\tInputStream oInStream = new FileInputStream(srcFile);\n\t\t\tOutputStream oOutStream = new FileOutputStream(destFile);\n\n\t\t\t// Transfer bytes from in to out\n\t\t\tbyte[] oBytes = new byte[1024];\n\t\t\tint nLength;\n\t\t\tBufferedInputStream oBuffInputStream = \n\t\t\t\t\tnew BufferedInputStream( oInStream );\n\t\t\twhile ((nLength = oBuffInputStream.read(oBytes)) > 0) {\n\t\t\t\toOutStream.write(oBytes, 0, nLength);\n\t\t\t}\n\t\t\toInStream.close();\n\t\t\toOutStream.close();\n\t\t\tLong end = System.currentTimeMillis();\n\t\t\tSystem.out.println((end-start));\n\t\t} catch (IOException e) {\n\t\t\tlogger.info(\"Error in creating the excels :\" +e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public static void copyResource(final Resource source, final Resource dest,\n final FilterSetCollection filters, final Vector<FilterChain> filterChains,\n final boolean overwrite, final boolean preserveLastModified,\n final String inputEncoding, final String outputEncoding,\n final Project project)\n throws IOException {\n copyResource(source, dest, filters, filterChains, overwrite, preserveLastModified, false, inputEncoding, outputEncoding, project);\n }", "public static void copy(String owner, Path src, Path target) throws CWLException {\r\n final Path finalSrc = toFinalSrcPath(src);\r\n if (src.toFile().exists() && Files.isReadable(src)) {\r\n CopyOption[] options = new CopyOption[] {\r\n StandardCopyOption.COPY_ATTRIBUTES,\r\n StandardCopyOption.REPLACE_EXISTING\r\n };\r\n final Path finalTarget = toFinalTargetPath(src, target);\r\n if (!finalTarget.getParent().toFile().exists()) {\r\n logger.debug(\"mkdir \\\"{}\\\"\", finalTarget.getParent());\r\n mkdirs(owner, finalTarget.getParent());\r\n }\r\n logger.debug(\"copy \\\"{}\\\" to \\\"{}\\\"\", finalSrc, finalTarget);\r\n try {\r\n if (finalSrc.toFile().isDirectory()) {\r\n Files.walkFileTree(finalSrc, new FileVisitor<Path>() {\r\n @Override\r\n public FileVisitResult preVisitDirectory(Path dir,\r\n BasicFileAttributes attrs) throws IOException {\r\n Files.copy(dir, finalTarget.resolve(finalSrc.relativize(dir)),\r\n StandardCopyOption.COPY_ATTRIBUTES);\r\n return FileVisitResult.CONTINUE;\r\n }\r\n\r\n @Override\r\n public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {\r\n Files.copy(file, finalTarget.resolve(finalSrc.relativize(file)),\r\n StandardCopyOption.COPY_ATTRIBUTES);\r\n return FileVisitResult.CONTINUE;\r\n }\r\n\r\n @Override\r\n public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException {\r\n return FileVisitResult.CONTINUE;\r\n }\r\n\r\n @Override\r\n public FileVisitResult visitFileFailed(Path file, IOException exc) throws IOException {\r\n throw exc;\r\n }\r\n });\r\n } else {\r\n Files.copy(finalSrc, finalTarget, options);\r\n }\r\n } catch (IOException e) {\r\n throw new CWLException(\r\n ResourceLoader.getMessage(\"cwl.io.copy.failed\",\r\n finalSrc.toString(),\r\n finalTarget.toString(),\r\n e.getMessage()),\r\n 255);\r\n }\r\n } else {\r\n throw new CWLException(ResourceLoader.getMessage(\"cwl.io.file.unaccessed\", finalSrc.toString()),\r\n 255);\r\n }\r\n }", "public void copyFile(@NonNull File sourceFile, @NonNull File destFile) throws IOException {\n if (!destFile.getParentFile().exists()) {\n if (!destFile.getParentFile().mkdirs())\n Log.e(ConstantVariables.ERR, ConstantVariables.DIR_NOT_CREATED);\n } else {\n Log.e(ConstantVariables.ERR, ConstantVariables.DIR_ALREADY_EXISTS);\n }\n\n if (!destFile.exists()) {\n if (!destFile.createNewFile())\n Log.e(ConstantVariables.ERR, ConstantVariables.FILE_NOT_CREATED);\n } else\n Log.e(ConstantVariables.ERR, ConstantVariables.FILE_ALREADY_EXISTS);\n\n try (\n FileChannel source = new FileInputStream(sourceFile).getChannel();\n FileChannel destination = new FileOutputStream(destFile).getChannel();\n ) {\n destination.transferFrom(source, 0, source.size());\n }\n }", "public static void copy(String srcPath, String destPath, SourceType sourceType) throws IOException {\n if(StringUtils.isEmpty(srcPath) || StringUtils.isEmpty(destPath) || sourceType == null) {\n throw new IllegalArgumentException(String.format(\n \"Null or empty parameters srcDataPath:%s, dstDataPath:%s, sourceType:%s\", srcPath, destPath,\n sourceType));\n }\n\n FileSystem fs = getFileSystemBySourceType(sourceType);\n // delete all files in dst firstly because of different folder if has dstDataPath\n if(!fs.delete(new Path(destPath), true)) {\n // ignore delete failed, it's ok.\n }\n\n FileUtil.copy(fs, new Path(srcPath), fs, new Path(destPath), false, new Configuration());\n }", "public static boolean copyFile(File srcFile, File destFile) {\n boolean result = false;\n try {\n InputStream in = new FileInputStream(srcFile);\n try {\n result = copyToFile(in, destFile);\n } finally {\n in.close();\n }\n } catch (IOException e) {\n e.printStackTrace();\n result = false;\n }\n return result;\n }", "public void addFile(String source, String dest) throws IOException {\n\t\tConfiguration conf = this.getConfig();\r\n\r\n\t\tFileSystem fileSystem = FileSystem.get(conf);\r\n\t\t// Get the filename out of the file path\r\n\t\tString filename = source.substring(source.lastIndexOf('/') + 1,\r\n\t\t\t\tsource.length());\r\n\t\t// Create the destination path including the filename.\r\n\t\tif (dest.charAt(dest.length() - 1) != '/') {\r\n\t\t\tdest = dest + \"/\" + filename;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tdest = dest + filename;\r\n\t\t}\r\n\t\t// Check if the file already exists\r\n\t\tPath path = new Path(dest);\r\n\t\tif (fileSystem.exists(path)) {\r\n\t\t\tSystem.out.println(\"File \" + dest + \" already exists\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t// Create a new file and write data to it.\r\n\t\tFSDataOutputStream out = fileSystem.create(path);\r\n\t\tInputStream in = new BufferedInputStream(new FileInputStream(\r\n\t\t\t\tnew File(source)));\r\n\t\tbyte[] bytes = new byte[1024];\r\n\t\tint numBytes = 0;\r\n\t\twhile ((numBytes = in.read(bytes)) > 0) {\r\n\t\t\tout.write(bytes, 0, numBytes);\r\n\t\t}\r\n\r\n\t\t// Close all the file descripters\r\n\t\tin.close();\r\n\t\tout.close();\r\n\t\tfileSystem.close();\r\n\t}", "public static void copyFile(File src, File dst) throws IOException {\n if (!src.exists()) {\n throw new IOException(\"Source file does not exist: \" + src);\n }\n \n String dstAbsPath = dst.getAbsolutePath();\n String dstDir = dstAbsPath.substring(0, dstAbsPath.lastIndexOf(File.separator));\n File dir = new File(dstDir);\n if (!dir.exists() && !dir.mkdirs()) {\n throw new IOException(\"Fail to create the directory: \" + dir.getAbsolutePath());\n }\n\n try (InputStream in = new FileInputStream(src); OutputStream out = new FileOutputStream(dst)) {\n\n // Transfer bytes from in to out\n byte[] buf = new byte[10240];\n int len;\n while ((len = in.read(buf)) > 0) {\n out.write(buf, 0, len);\n }\n } catch (IOException e) {\n logger.warn(\"Unable to copy file \" + e.getMessage(), e);\n throw new IOException(\"Unable to copy file \", e);\n }\n }", "public static IStatus copyFile(String from, String to) {\n \t\ttry {\n \t\t\treturn copyFile(new FileInputStream(from), to);\n \t\t} catch (Exception e) {\n \t\t\tTrace.trace(Trace.SEVERE, \"Error copying file\", e);\n \t\t\treturn new Status(IStatus.ERROR, TomcatPlugin.PLUGIN_ID, 0, NLS.bind(Messages.errorCopyingFile, new String[] {to, e.getLocalizedMessage()}), e);\n \t\t}\n \t}", "private void copyFile( final File source, final File target )\n throws MojoExecutionException\n {\n if ( source.exists() == false )\n {\n throw new MojoExecutionException( \"Source file '\" + source.getAbsolutePath() + \"' does not exist!\" );\n }\n if ( target.exists() == true )\n {\n throw new MojoExecutionException( \"Target file '\" + source.getAbsolutePath() + \"' already existing!\" );\n }\n\n try\n {\n this.logger.debug( \"Copying file from '\" + source.getAbsolutePath() + \"' to \" + \"'\"\n + target.getAbsolutePath() + \"'.\" );\n PtFileUtil.copyFile( source, target );\n }\n catch ( PtException e )\n {\n throw new MojoExecutionException( \"Could not copy file from '\" + source.getAbsolutePath() + \"' to \" + \"'\"\n + target.getAbsolutePath() + \"'!\", e );\n }\n }", "public void copyFile(File src, File dst) throws IOException {\n\t\tInputStream in = new FileInputStream(src);\n\t\tOutputStream out = new FileOutputStream(dst);\n\n\t\t// Transfer bytes from in to out\n\t\tbyte[] buf = new byte[1024];\n\t\tint len;\n\t\twhile ((len = in.read(buf)) > 0) {\n\t\t\tif(logger.isDebugEnabled())\n\t\t\t\tlogger.debug(\"Copiando fichero \" + src.getAbsolutePath() + \" a \"\n\t\t\t\t\t+ dst.getAbsolutePath());\n\t\t\tout.write(buf, 0, len);\n\t\t}\n\t\tin.close();\n\t\tout.close();\n\t}", "public boolean copyToFile(final String source, final String destPath, final CopyOptions opts) throws IOException,\n InterruptedException {\n final Session session = startCopyToFile(source, destPath, opts);\n if (session == null) {\n return false;\n }\n try {\n session.join();\n return session.status().isOk();\n } finally {\n Utils.closeQuietly(session);\n }\n }", "public boolean copyFile(final File source, final File target)\n\t\t\tthrows WritePermissionException\n\t{\n\t\tFileInputStream inStream = null;\n\t\tOutputStream outStream = null;\n\t\tFileChannel inChannel = null;\n\t\tFileChannel outChannel = null;\n\t\ttry {\n\t\t\tinStream = new FileInputStream(source);\n\n\t\t\t// First try the normal way\n\t\t\tif (FileUtil.isWritable(target))\n\t\t\t{\n\t\t\t\t// standard way\n\t\t\t\toutStream = new FileOutputStream(target);\n\t\t\t\tinChannel = inStream.getChannel();\n\t\t\t\toutChannel = ((FileOutputStream) outStream).getChannel();\n\t\t\t\tinChannel.transferTo(0, inChannel.size(), outChannel);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (Util.hasLollipop())\n\t\t\t\t{\n\t\t\t\t\t// Storage Access Framework\n\t\t\t\t\tUsefulDocumentFile targetDocument = getDocumentFile(target, false, true);\n\t\t\t\t\tif (targetDocument == null)\n\t\t\t\t\t\treturn false;\n\t\t\t\t\toutStream =\n\t\t\t\t\t\t\tgetContentResolver().openOutputStream(targetDocument.getUri());\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tif (outStream != null) {\n\t\t\t\t\t// Both for SAF and for Kitkat, write to output stream.\n\t\t\t\t\tbyte[] buffer = new byte[4096]; // MAGIC_NUMBER\n\t\t\t\t\tint bytesRead;\n\t\t\t\t\twhile ((bytesRead = inStream.read(buffer)) != -1) {\n\t\t\t\t\t\toutStream.write(buffer, 0, bytesRead);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tLog.e(TAG,\n\t\t\t\t\t\"Error when copying file to \" + target.getAbsolutePath(), e);\n\t\t\treturn false;\n\t\t}\n\t\tfinally {\n\t\t\tUtil.closeSilently(inStream);\n\t\t\tUtil.closeSilently(outStream);\n\t\t\tUtil.closeSilently(inChannel);\n\t\t\tUtil.closeSilently(outChannel);\n\t\t}\n\t\treturn true;\n\t}", "private static void copyFile(Path srcPath, Path destPath) throws IOException {\n try (FileWriter outputStream = new FileWriter(destPath.toFile().getAbsolutePath(), false);\n FileReader inputStream = new FileReader(srcPath.toFile().getAbsolutePath())) {\n int i;\n while ((i = inputStream.read()) != -1) {\n outputStream.write(toChars(i));\n }\n }\n }", "private static void copyFile(String from, String to)\n\t{\n\t\tFile inputFile;\n\t File outputFile;\n\t\tint fIndex = from.indexOf(\"file:\");\n\t\tint tIndex = to.indexOf(\"file:\");\n\t\tif(fIndex < 0)\n\t\t\tinputFile = new File(from);\n\t\telse\n\t\t\tinputFile = new File(from.substring(fIndex + 5, from.length()));\n\t\tif(tIndex < 0)\n\t\t\toutputFile = new File(to);\n\t\telse\n\t\t\toutputFile = new File(to.substring(tIndex + 5, to.length())); \n\t\tcopyFile(inputFile, outputFile);\t\t\n\t}", "private boolean copyFile(File dest) {\n\t\tboolean result = false;\n\n\t\ttry {\n\t\t\tif (this.exists()) {\n\t\t\t\tif (!dest.exists()) dest.mkdirs();\n\t\t\t\t\n\t\t\t\tif (this.isDirectory() && dest.isDirectory()) {\n\t\t\t\t\tdest = new File(dest.getAbsolutePath().replace(\"\\\\\", \"/\") + \"/\" + this.getName());\n\t\t\t\t\tdest.mkdirs();\n\t\t\t\t\t\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (this.isFile() && dest.isDirectory()) {\n\t\t\t\t\tdest = new File(dest.getAbsolutePath().replace(\"\\\\\", \"/\") + \"/\" + this.getName());\n\t\t\t\t\tdest.createNewFile();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (this.isDirectory() && dest.isFile()) {\n\t\t\t\t\tdest = new File(dest.getParent().replace(\"\\\\\", \"/\") + \"/\" + this.getName());\n\t\t\t\t\tdest.mkdirs();\n\t\t\t\t\t\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (this.isFile() && dest.isFile()) {\n\t\t\t\t\tif (dest.exists()) {\n\t\t\t\t\t\tdest = new File(dest.getParent().replace(\"\\\\\", \"/\") + \"/\" + this.getName());\n\t\t\t\t\t\tdest.createNewFile();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (this.getName().equals(dest.getName())) {\n\t\t\t\t\t\t//targetFile.deleteOnExit();\n\t\t\t\t\t\t//targetFile = new File(targetFile.getAbsolutePath());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tBufferedInputStream inBuff = null;\n\t\t\t\tBufferedOutputStream outBuff = null;\n\t\t\t\t\n\t\t\t\ttry{\n\t\t\t\t\tinBuff = new BufferedInputStream(new FileInputStream(this));\n\t\t\t\t\toutBuff = new BufferedOutputStream(new FileOutputStream(dest));\n\n\t\t\t\t\tbyte[] b = new byte[1024 * 5];\n\t\t\t\t\tint length;\n\t\t\t\t\twhile ((length = inBuff.read(b)) != -1) {\n\t\t\t\t\t\toutBuff.write(b, 0, length);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\toutBuff.flush();\n\t\t\t\t\t\n\t\t\t\t\tresult = true;\n\t\t\t\t} catch(Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}finally{\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (inBuff != null) inBuff.close();\n\t\t\t\t\t\tif (outBuff != null) outBuff.close();\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "public static boolean copyFile(File srcFile, File destFile) {\n\t\tboolean result = false;\n\t\ttry {\n\t\t\tInputStream in = new FileInputStream(srcFile);\n\t\t\ttry {\n\t\t\t\tresult = FileOperationHelper.copyToFile(in, destFile);\n\t\t\t} finally {\n\t\t\t\tin.close();\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tresult = false;\n\t\t}\n\t\treturn result;\n\t}", "public void execute(Request request, Response response, boolean do_copy) throws IOException, HTTPException {\n\t\t\n\t\tURI uri = request.getUri();\n\t\tIDirectory source_parent = getParent(uri); // Get the parent directory of the source location.\n\t\tString source_base_name = UriUtil.baseName(uri); // Get the name of the location within that directory.\n\t\tString if_header = request.getHeader(HTTP.HEADER_IF); // Get the If header.\n\t\tString lock_token = getLockTokenFromIfHeader(if_header);\n\t\t\n\t\tDiagnostic.trace(\"Source name = \" + source_base_name, Diagnostic.RUN);\n\t\t\n\t\t// Deal with the destination location.\n\t\tString destination_header = request.getHeader(HTTP.HEADER_DESTINATION);\n\t\tif (destination_header == null) throw new HTTPException(\"No destination specified\");\n\t\t\n\t\ttry {\n\t\t\tURI destination_file_path = new URI(destination_header); // Get the file path of the destination location.\n\t\t\tIDirectory destination_parent = getParent(destination_file_path); // Get the parent directory of that location.\n\t\t\tString destination_base_name = UriUtil.baseName(destination_file_path); // Get the name of the location within that directory.\n\t\t\t\n\t\t\t// Should overwrite unless flag explicitly set to false in header.\n\t\t\t// See RFC 2518 8.8.6/7.\n\t\t\tboolean overwrite = shouldOverwrite(request);\n\t\t\t\n\t\t\t// Remember whether destination is non-null, for setting result code.\n\t\t\tboolean destination_not_null = destination_parent.contains(destination_base_name);\n\t\t\t\n\t\t\t// If a lock token was specified in an If header, the file must be currently locked with the given token.\n\t\t\tif (lock_token != null) lock_manager.checkWhetherLockedWithToken(uri, lock_token);\n\t\t\t\n\t\t\t// TODO check if the destination is locked, in which case must have lock token. Ditto for source in case of move.\n\t\t\t\n\t\t\t// Either copy the object or move it.\n\t\t\tif (do_copy) {\n\t\t\t\tfile_system.copyObject(source_parent, source_base_name, destination_parent, destination_base_name, overwrite);\n\t\t\t} else {\n\t\t\t\tfile_system.moveObject(source_parent, source_base_name, destination_parent, destination_base_name, overwrite);\n\t\t\t}\n\t\t\t\n\t\t\tif (destination_not_null) response.setStatusCode(HTTP.RESPONSE_NO_CONTENT);\n\t\t\telse response.setStatusCode(HTTP.RESPONSE_CREATED);\n\t\t\t\n\t\t\tresponse.close();\n\t\t}\n\t\tcatch (LockUseException e) {\n handleLockException(lock_token, e);\n\t\t}\n\t\tcatch (BindingAbsentException e) {\n\t\t\tthrow new HTTPException(\"Source object not found\", HTTP.RESPONSE_NOT_FOUND, true);\n\t\t}\n\t\tcatch (BindingPresentException e) {\n\t\t\tthrow new HTTPException(\"Destination non-null with no-overwrite\", HTTP.RESPONSE_PRECONDITION_FAILED, true);\n\t\t}\n\t\tcatch (PersistenceException e) {\n\t\t\tthrow new HTTPException(\"Couldn't create copy\", HTTP.RESPONSE_INTERNAL_SERVER_ERROR, true);\n\t\t}\n\t\tcatch (URISyntaxException e) {\n\t\t\tthrow new HTTPException(\"Invalid destination path\", HTTP.RESPONSE_BAD_REQUEST, true);\n\t\t}\n\t}", "public static void moveTo(String srcPath, String destPath, SourceType sourceType) throws IOException {\n if(StringUtils.isEmpty(srcPath) || StringUtils.isEmpty(destPath) || sourceType == null) {\n throw new IllegalArgumentException(String.format(\n \"Null or empty parameters srcDataPath:%s, dstDataPath:%s, sourceType:%s\", srcPath, destPath,\n sourceType));\n }\n\n FileSystem fs = getFileSystemBySourceType(sourceType);\n if(!fs.exists(new Path(destPath))) {\n throw new RuntimeException(destPath + \" does not exist.\");\n }\n\n FileUtil.copy(fs, new Path(srcPath), fs, new Path(destPath), false, new Configuration());\n }", "@Override\n public boolean doWork() {\n\n logger.debug(\"CopyCommand->doWork()\");\n\n // Parameter ermitteln\n strSrcFile = getValueForKey(CONST_PARAM_SCRFILE);\n strDestFile = getValueForKey(CONST_PARAM_DESTFILE);\n bIsDirectory = Boolean.parseBoolean(getValueForKey(CONST_PARAM_ISDIRECTORY));\n\n // TODO: richtigen Replaces einfuegen\n VarReplace objVarRepl = new VarReplace();\n strSrcFile = objVarRepl.replacePlaceholder(strSrcFile);\n strDestFile = objVarRepl.replacePlaceholder(strDestFile);\n\n if ((strSrcFile == null) || (strDestFile == null)) {\n return false;\n }\n else if (new File(strSrcFile).isDirectory()) {\n try {\n FileUtils.copyDirectory(new File(strSrcFile), new File(strDestFile));\n }\n catch (IOException ioe) {\n logger.error(\" unable to copy file: \" + ioe.getMessage());\n }\n return true;\n\n }\n else {\n try {\n if (new File(strDestFile).getName().startsWith(\"v\")\n || new File(strDestFile).getName().startsWith(\"z\")) {\n strDestFile = new File(strDestFile).getParent() + File.separator\n + new File(strDestFile).getName().toUpperCase();\n }\n logger.debug(\"srcFile: \" + strSrcFile + \", destFile: \" + strDestFile);\n\n if (!new File(strSrcFile).getParentFile().exists()) {\n logger.debug(\"srcFile parent folder existiert nicht: \" + new File(strSrcFile).getParent());\n }\n\n if (!new File(strSrcFile).exists()) {\n logger.debug(\"srcFile existiert nicht: \" + new File(strSrcFile).getAbsolutePath());\n }\n\n if (!new File(strDestFile).getParentFile().exists()) {\n logger.debug(\"destFile parent folder existstiert nicht: \"\n + new File(strDestFile).getParentFile().getAbsolutePath());\n new File(strDestFile).getParentFile().mkdirs();\n }\n\n FileUtils.copyFile(new File(strSrcFile), new File(strDestFile));\n }\n catch (IOException ioe) {\n\n logger.error(\" unable to copy file: \" + ioe.getMessage());\n\n ioe.printStackTrace();\n\n while (iCounter < 20) {\n\n logger.debug(\"IOException loop: \" + iCounter);\n\n try {\n logger.debug(\"wait 20 seconds\");\n Thread.sleep(TimeUnit.SECONDS.toMillis(20));\n }\n catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n try {\n FileUtils.copyFile(new File(strSrcFile), new File(strDestFile));\n logger.debug(\"break loop\");\n break;\n }\n catch (IOException e) {\n\n logger.debug(\"again an exception: \" + e.getMessage());\n }\n\n iCounter++ ;\n\n logger.debug(\"try it ounce again\");\n\n }\n\n }\n return true;\n }\n\n }", "private void copyCoverageFile(String sourceResourceName, String targetFileName, WorkflowJob job) throws Exception {\n FilePath directory = ensureWorkspaceExists(job);\n\n FilePath dest = directory.child(targetFileName);\n org.apache.commons.io.IOUtils.copy(getClass().getResourceAsStream(sourceResourceName), dest.write());\n }", "public TcDirEntry copy(TcDirEntry source, String destDirectory, String destName) {\r\n\t\ttry {\r\n\t\t\tsynchronized (SysRpcTcCopyDirEntryIn) {\r\n\t\t\t\tSysRpcTcCopyDirEntryIn.srcDirEntryPath = ((TcSysRpcDirEntry) source).getHandle();\r\n\t\t\t\tSysRpcTcCopyDirEntryIn.destDirPath = TcSysRpcDirEntry.convertDirEntryPathToHandle(destDirectory);\r\n\t\t\t\tSysRpcTcCopyDirEntryIn.destdirEntryName = destName;\r\n\t\t\t\tSysRpcTcCopyDirEntryIn.kind.value = source.getKind();\r\n\t\t\t\tclient.client.SysRpcTcCopyDirEntry_1(SysRpcTcCopyDirEntryIn, SysRpcTcCopyDirEntryOut);\r\n\t\t\t\tif (SysRpcTcCopyDirEntryOut.retVal) {\r\n\t\t\t\t\tTcDirEntry dirEntry = new TcSysRpcDirEntry(SysRpcTcCopyDirEntryOut.dirEntryPath.toString(), client);\r\n\t\t\t\t\treturn dirEntry;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tdisconnected(\"Disconnect in TcDirectoryModel - copy: \");\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public void copyFile(String destination, String fileName, InputStream in) {\r\n try {\r\n // write the inputStream to a FileOutputStream\r\n OutputStream out = new FileOutputStream(new File(destination + fileName));\r\n int read = 0;\r\n byte[] bytes = new byte[1024];\r\n while ((read = in.read(bytes)) != -1) {\r\n out.write(bytes, 0, read);\r\n }\r\n in.close();\r\n out.flush();\r\n out.close();\r\n } catch (IOException e) {\r\n System.out.println(e.getMessage());\r\n }\r\n }", "public static void copyResource(final Resource source, final Resource dest,\n final FilterSetCollection filters, final Vector<FilterChain> filterChains,\n final boolean overwrite, final boolean preserveLastModified,\n final boolean append,\n final String inputEncoding, final String outputEncoding,\n final Project project, final boolean force)\n throws IOException {\n if (!overwrite && !SelectorUtils.isOutOfDate(source, dest,\n FileUtils.getFileUtils().getFileTimestampGranularity())) {\n return;\n }\n final boolean filterSetsAvailable = (filters != null\n && filters.hasFilters());\n final boolean filterChainsAvailable = (filterChains != null\n && !filterChains.isEmpty());\n String effectiveInputEncoding;\n if (source instanceof StringResource) {\n effectiveInputEncoding = ((StringResource) source).getEncoding();\n } else {\n effectiveInputEncoding = inputEncoding;\n }\n File destFile = null;\n if (dest.as(FileProvider.class) != null) {\n destFile = dest.as(FileProvider.class).getFile();\n }\n if (destFile != null && destFile.isFile() && !destFile.canWrite()) {\n if (!force) {\n throw new ReadOnlyTargetFileException(destFile);\n }\n if (!FILE_UTILS.tryHardToDelete(destFile)) {\n throw new IOException(\n \"failed to delete read-only destination file \" + destFile);\n }\n }\n\n if (filterSetsAvailable) {\n copyWithFilterSets(source, dest, filters, filterChains,\n append, effectiveInputEncoding,\n outputEncoding, project);\n } else if (filterChainsAvailable\n || (effectiveInputEncoding != null\n && !effectiveInputEncoding.equals(outputEncoding))\n || (effectiveInputEncoding == null && outputEncoding != null)) {\n copyWithFilterChainsOrTranscoding(source, dest, filterChains,\n append, effectiveInputEncoding,\n outputEncoding,\n project);\n } else {\n boolean copied = false;\n if (source.as(FileProvider.class) != null\n && destFile != null && !append) {\n final File sourceFile =\n source.as(FileProvider.class).getFile();\n try {\n copyUsingFileChannels(sourceFile, destFile, project);\n copied = true;\n } catch (final IOException ex) {\n String msg = \"Attempt to copy \" + sourceFile\n + \" to \" + destFile + \" using NIO Channels\"\n + \" failed due to '\" + ex.getMessage()\n + \"'. Falling back to streams.\";\n if (project != null) {\n project.log(msg, Project.MSG_WARN);\n } else {\n System.err.println(msg);\n }\n }\n }\n if (!copied) {\n copyUsingStreams(source, dest, append, project);\n }\n }\n if (preserveLastModified) {\n final Touchable t = dest.as(Touchable.class);\n if (t != null) {\n setLastModified(t, source.getLastModified());\n }\n }\n }", "public int Copy(final String sSourceFile, final String sDestinationtFile, final int EXISITING_FILE_ACTION) throws Exception {\n OutputStream out = null;\n InputStream in = null;\n File fSrc = null;\n File fDest = null;\n File fDestDir = null;\n byte[] buf = null;\n int len = 0;\n int iFileCopied = 0;\n boolean bProcess = false;\n try {\n\n buf = new byte[4096];\n\n //reating source file object\n fSrc = new File(sSourceFile);\n if (!fSrc.exists()) {\n throw new Exception(\"Source File Does not exists!! :\" + sSourceFile);\n }\n\n //creating output file object\n fDest = new File(sDestinationtFile);\n\n //check for folder/directory\n if (fSrc.isDirectory()) {\n File[] fSubFiles = fSrc.listFiles();\n\n //creating destination directory\n if (!fDest.exists()) {\n fDest.mkdirs();\n }\n\n for (int i = 0; i < fSubFiles.length; i++) {\n String sSourceSubFile = sSourceFile + File.separator + fSubFiles[i].getName();\n String sDestinationtSubFile = sDestinationtFile + File.separator + fSubFiles[i].getName();\n\n iFileCopied = iFileCopied + Copy(sSourceSubFile, sDestinationtSubFile, EXISITING_FILE_ACTION);\n }\n\n //check for file \n } else {\n\n //creating input stream of source file\n in = new FileInputStream(fSrc);\n\n //check for destination file parent directory\n fDestDir = fDest.getParentFile();\n if (!fDestDir.exists()) {\n fDestDir.mkdirs();\n }\n\n //check for exisitng file\n //REPLACE EXISITNG FILE\n if (fDest.exists() && EXISITING_FILE_ACTION == FILE_REPLACE) {\n bProcess = true;\n out = new FileOutputStream(fDest);\n\n //APPEND EXISITNG FILE\n } else if (fDest.exists() && EXISITING_FILE_ACTION == FILE_APPEND) {//For Append the file.\n bProcess = true;\n out = new FileOutputStream(fDest, true);\n\n //COPY WITH TIMESTAMP WITH EXISITNG FILE\n } else if (fDest.exists() && EXISITING_FILE_ACTION == FILE_COPY_WITH_TIMESTAMP) {//For Append the file.\n bProcess = true;\n String sTimeStamp = fDest.lastModified() + \"_\";\n fDest = new File(fDest.getParent() + File.separator + sTimeStamp + fDest.getName());\n out = new FileOutputStream(fDest);\n\n //DO NOTHING EXISITNG FILE\n } else if (fDest.exists() && EXISITING_FILE_ACTION == FILE_DO_NOTHING) {//For Append the file.\n bProcess = false;\n\n //file does not exists\n } else if (!fDest.exists()) {\n bProcess = true;\n out = new FileOutputStream(fDest, true);\n\n }\n\n //loop to read buffer & copy in output file\n while ((len = in.read(buf)) > 0 && bProcess) {\n out.write(buf, 0, len);\n }\n\n iFileCopied = iFileCopied + 1;\n }\n\n return iFileCopied;\n } catch (Exception e) {\n throw e;\n } finally {\n try {\n in.close();\n } catch (Exception e) {\n }\n try {\n out.close();\n } catch (Exception e) {\n }\n in = null;\n out = null;\n fSrc = null;\n fDest = null;\n fDestDir = null;\n }\n }", "@Test\n public void testCopyFile() throws Exception {\n System.out.println(\"copyFile with existing source image file\");\n String sourcePath = System.getProperty(\"user.dir\")+fSeparator+\"src\"+fSeparator+\"test\"+fSeparator+\n \"java\"+fSeparator+\"resources\"+fSeparator+\"testImg.jpg\";\n File source = new File(sourcePath);\n \n File dest = new File(folder.toString()+fSeparator+\"Images\");\n FilesDao instance = new FilesDao();\n boolean result;\n try{\n instance.copyFile(source, dest);\n File copiedFile = new File(dest+fSeparator+\"testImg.jpg\");\n if(copiedFile.exists())\n result = true;\n else\n result = false;\n }catch(Exception ex){\n result = false;\n }\n boolean expResult = true;\n assertEquals(\"Some message\",expResult,result);\n }", "public static long copyFile(File source, File dest) throws IOException {\n\n\t\tif (source.isDirectory() || dest.isDirectory())\n\t\t\tthrow new IOException(\"wont copy directories\");\n\t\tInputStream i = null;\n\t\ttry {\n\t\t\ti = getInputStreamFromFile(source);\n\n\t\t\t// create parent directories\n\t\t\tif (dest.getParentFile().mkdirs()) {\n\t\t\t\t// all good\n\t\t\t} else\n\t\t\t\tthrow new IOException(\"\\\"\" + dest + \"\\\" cannot be created\");\n\t\t\treturn writeStreamToFile(i, dest);\n\n\t\t} finally {\n\t\t\tif (i != null)\n\t\t\t\ti.close();\n\t\t}\n\t}", "@Test\n public void testCopyFileUsingApacheCommonsIO() throws Exception {\n long start = System.nanoTime();\n CopyFile.copyFileUsingApacheCommonsIO(sourceFile, apacheDestFile);\n System.out.println(\"Time taken by apache using:\" + (System.nanoTime() - start) / 1000);\n }", "public static void copy(File destDir, File file) throws Exception {\r\n \t\tString name = file.getName();\r\n \t\tif (!destDir.exists()) destDir.mkdirs();\r\n \t\tFile oldFile = new File(destDir.getAbsolutePath() + File.separatorChar + name);\r\n \t\tif (oldFile.exists()) oldFile.delete();\r\n\t\tFile fileout = new File(destDir.getAbsolutePath() + File.separatorChar + name);\r\n\t FileInputStream fileinstr = new FileInputStream(file);\r\n\t FileOutputStream fileoutstr = new FileOutputStream(fileout);\r\n\t BufferedOutputStream bufout = new BufferedOutputStream(fileoutstr); \r\n\t byte [] b = new byte[1024];\r\n\t\tint len = 0;\r\n\t\twhile ( (len=fileinstr.read(b))!= -1 ) {\r\n\t\t bufout.write(b,0,len);\r\n\t\t}\r\n\t\tbufout.flush();\r\n\t\tbufout.close();\r\n\t\tfileinstr.close();\r\n\t}", "@Override\n public void finish() {\n storeProperties();\n // retrieve the full list of files according to the selected mode\n List<org.jajuk.base.File> files = getFiles();\n if (files == null) {\n return;\n }\n // define the target directory\n final Date curDate = new Date();\n // Do not use ':' character in destination directory, it's\n // forbidden under Windows\n final SimpleDateFormat stamp = new SimpleDateFormat(\"yyyyMMdd-HHmm\", Locale.getDefault());\n final String dirName = \"Party-\" + stamp.format(curDate);\n final java.io.File destDir = new java.io.File(((String) data.get(Variable.DEST_PATH)), dirName);\n if (!destDir.mkdir()) {\n Log.warn(\"Could not create destination directory \" + destDir);\n }\n Log.debug(\"Going to copy \" + files.size() + \" files to directory {{\"\n + destDir.getAbsolutePath() + \"}}\");\n // perform the actual copying\n UtilPrepareParty.copyFiles(files, destDir, isTrue(Variable.NORMALIZE_FILENAME),\n isTrue(Variable.ONE_MEDIA_ENABLED) && isTrue(Variable.CONVERT_MEDIA),\n (String) data.get(Variable.ONE_MEDIA), (String) data.get(Variable.CONVERT_COMMAND));\n }", "public static void copyAll(File source, File dest, boolean replaceExisting) throws IOException {\n\n Files.walkFileTree(source.toPath(), new FileTreeWalker(FileTreeWalker.Action.COPY,\n source.toPath(), dest.toPath(), replaceExisting));\n\n }", "@Source(\"gr/grnet/pithos/resources/editcopy.png\")\n ImageResource copy();", "private static void copyFile(InputStream is, OutputStream os) throws IOException {\n\n final byte[] buf = new byte[4096];\n int cnt = is.read(buf, 0, buf.length);\n while (cnt >= 0) {\n os.write(buf, 0, cnt);\n cnt = is.read(buf, 0, buf.length);\n }\n os.flush();\n }", "@Override\n\tprotected void copy(Object source, Object dest) {\n\t\t\n\t}", "Permanent copyPermanent(Permanent copyFromPermanent, UUID copyToPermanentId, Ability source, CopyApplier applier);", "public boolean copy2IoBuffer(final String source, final ByteBufferCollector destBuf, final CopyOptions opt)\n throws InterruptedException {\n final Session session = startCopy2IoBuffer(source, destBuf, opt);\n if (session == null) {\n return false;\n }\n try {\n session.join();\n return session.status().isOk();\n } finally {\n Utils.closeQuietly(session);\n }\n }", "public static void copyFile(String from, String to) throws IOException{\r\n Path src = Paths.get(from);\r\n Path dest = Paths.get(to);\r\n Files.copy(src, dest, StandardCopyOption.REPLACE_EXISTING);\r\n }", "public boolean copyTo (String destinationFile) {\r\n\t\tlogger.debug(\"(File)From \"+this.fullPath+ \" To \"+destinationFile);\r\n\t\ttry {\r\n\t\t\tFile source = new File(this.fullPath);\r\n\t\t\tFiles.copy(source.toPath(),Paths.get(destinationFile),NOFOLLOW_LINKS);\r\n\t\t\t// Prévoir une procédure de recréation du lien copy de lien\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public static boolean wget(URL source, Path dest) {\r\n if (source == null) {\r\n throw new IllegalArgumentException(\"The source URL is null\");\r\n }\r\n if (dest == null) {\r\n throw new IllegalArgumentException(\"The destination file path is null\");\r\n }\r\n boolean successful = true;\r\n try (FileOutputStream out = new FileOutputStream(dest.toFile())) {\r\n try (InputStream in = source.openStream()) {\r\n int numread = 0;\r\n int bufSize = 1024;\r\n byte[] buffer = new byte[bufSize];\r\n while ((numread = in.read(buffer, 0, bufSize)) != -1) {\r\n out.write(buffer, 0, numread);\r\n }\r\n }\r\n } catch (IOException e) {\r\n logger.warn(\"Fail to download file from \\\"{}\\\" to \\\"{}\\\", {}\", source, dest.toFile().getAbsolutePath(),\r\n e.getMessage());\r\n successful = false;\r\n }\r\n return successful;\r\n }", "public void objServiceCopy(String sourceObjectPathString,\r\n\t\t\tString targetLocPathString) throws ServiceException {\n\t\tString objectName = \"linkedDocument\" + System.currentTimeMillis();\r\n\t\tObjectIdentity sampleObjId = new ObjectIdentity(REPOSITORY_NAME);\r\n\t\tDataObject sampleDataObject = new DataObject(sampleObjId, \"dm_document\");\r\n\t\tsampleDataObject.getProperties().set(\"object_name\", objectName);\r\n\r\n\t\t// add the folder to link to as a ReferenceRelationship\r\n\t\tObjectPath objectPath = new ObjectPath(sourceObjectPathString);\r\n\t\tObjectIdentity<ObjectPath> sampleFolderIdentity = new ObjectIdentity<ObjectPath>(\r\n\t\t\t\tobjectPath, REPOSITORY_NAME);\r\n\t\tReferenceRelationship sampleFolderRelationship = new ReferenceRelationship();\r\n\t\tsampleFolderRelationship.setName(Relationship.RELATIONSHIP_FOLDER);\r\n\t\tsampleFolderRelationship.setTarget(sampleFolderIdentity);\r\n\t\tsampleFolderRelationship.setTargetRole(Relationship.ROLE_PARENT);\r\n\t\tsampleDataObject.getRelationships().add(sampleFolderRelationship);\r\n\r\n\t\tObjectPath folderPath = new ObjectPath();\r\n\t\tfolderPath.setPath(targetLocPathString);\r\n\r\n\t\tObjectIdentity<ObjectPath> toFolderIdentity = new ObjectIdentity<ObjectPath>();\r\n\t\ttoFolderIdentity.setValue(folderPath);\r\n\t\ttoFolderIdentity.setRepositoryName(REPOSITORY_NAME);\r\n\r\n\t\tObjectLocation toLocation = new ObjectLocation();\r\n\t\ttoLocation.setObjectIdentity(toFolderIdentity);\r\n\r\n\t\tDataPackage dataPackage = new DataPackage(sampleDataObject);\r\n\t\tOperationOptions operationOptions = null;\r\n\r\n\t\tthis.objectService.copy(new ObjectIdentitySet(sampleObjId),\r\n\t\t\t\ttoLocation, dataPackage, operationOptions);\r\n\r\n\t\t/*\r\n\t\t * // identify the object to copy ObjectPath objPath = new\r\n\t\t * ObjectPath(sourceObjectPathString); ObjectIdentity<ObjectPath>\r\n\t\t * docToCopy = new ObjectIdentity<ObjectPath>();\r\n\t\t * docToCopy.setValue(objPath);\r\n\t\t * docToCopy.setRepositoryName(REPOSITORY_NAME);\r\n\t\t * \r\n\t\t * // identify the folder to copy to ObjectPath folderPath = new\r\n\t\t * ObjectPath(); folderPath.setPath(targetLocPathString);\r\n\t\t * \r\n\t\t * \r\n\t\t * ObjectIdentity<ObjectPath> toFolderIdentity = new\r\n\t\t * ObjectIdentity<ObjectPath>(); toFolderIdentity.setValue(folderPath);\r\n\t\t * toFolderIdentity.setRepositoryName(REPOSITORY_NAME); ObjectLocation\r\n\t\t * toLocation = new ObjectLocation();\r\n\t\t * toLocation.setObjectIdentity(toFolderIdentity);\r\n\t\t * \r\n\t\t * DataPackage dataPackage = new DataPackage();\r\n\t\t * \r\n\t\t * OperationOptions operationOptions = null; DataObject docDataObj = new\r\n\t\t * DataObject(docToCopy, DM_DOCUMENT);\r\n\t\t * \r\n\t\t * //Copy copy = Copy();\r\n\t\t * \r\n\t\t * //SysObjectCopyOperation copyOperation = new SysObjectCopyOperation()\r\n\t\t * \r\n\t\t * ObjectRelationship objRelationship = new ObjectRelationship();\r\n\t\t * objRelationship.setName(Relationship.VIRTUAL_DOCUMENT_RELATIONSHIP);\r\n\t\t * objRelationship.setTargetRole(Relationship.ROLE_CHILD);\r\n\t\t * \r\n\t\t * docDataObj.getRelationships().add(new\r\n\t\t * ObjectRelationship(objRelationship));\r\n\t\t * dataPackage.addDataObject(docDataObj);\r\n\t\t */\r\n\r\n\t\t// this.objectService.copy(new ObjectIdentitySet(docToCopy),\r\n\t\t// toLocation, dataPackage, operationOptions);\r\n\t}", "public JSONObject copy(final String uri, final Map<String, String> srcCreds, final String targetUri, final Map<String, String> targetCreds) throws Exception {\n\t\tJSONObject targetDetails = new JSONObject();\n\t\ttargetDetails.put(JSON_TARGET, targetUri);\n\t\ttargetDetails.put(JSON_CREDENTIALS, new JSONObject(targetCreds));\n\t\treturn transfer(uri, srcCreds, targetDetails.toString());\n\t}", "protected void downloadTo(VFSTransfer transfer,VFile targetLocalFile)\n throws VlException\n {\n // copy contents into local file:\n vrsContext.getTransferManager().doStreamCopy(transfer,this,targetLocalFile); \n }", "public void copiaImg() {\r\n\t\t\r\n\t\ttry {\r\n\t\t\tString tipo = caminhoImagem.replaceAll(\".*\\\\.\", \"\");\r\n\t\t\tSystem.out.println(tipo);\r\n\t\t\tString l = caminhoImagem;\r\n\t\t\tString i = \"../MASProject/imagens/\" + idObra.getText() + \".\" + tipo;\r\n\t\t\tcaminhoImagem = i;\r\n\t\t\t@SuppressWarnings(\"resource\")\r\n\t\t\tFileInputStream fisDe = new FileInputStream(l);\r\n\t\t\t@SuppressWarnings(\"resource\")\r\n\t\t\tFileOutputStream fisPara = new FileOutputStream(i);\r\n\t\t\tFileChannel fcPara = fisDe.getChannel();\r\n\t\t\tFileChannel fcDe = fisPara.getChannel();\r\n\t\t\tif (fcPara.transferTo(0, fcPara.size(), fcDe) == 0L) {\r\n\t\t\t\tfcPara.close();\r\n\t\t\t\tfcDe.close();\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tJOptionPane.showMessageDialog(null, e);\r\n\t\t}\r\n\t}", "default <S, D> D copy(S src, D dist) {\n BeanUtils.copyProperties(src, dist);\n return dist;\n }", "@Test\n public void testCopyFileUsingChannel() throws Exception {\n long start = System.nanoTime();\n CopyFile.copyFileUsingChannel(sourceFile, channelDestFile);\n System.out.println(\"Time taken by file channel using:\" + (System.nanoTime() - start) / 1000);\n }", "public static void main(String[] args) {\n\t\ttry {\n\t\t\tcopy(new RandomAccessFile(\"copyfrom.jpg\", \"r\"), new RandomAccessFile(\"copyto.jpg\",\"rw\"));\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}", "static FilePath copyJar( PrintStream log, FilePath dst, Class<?> representative, String seedName )\n {\n try\n {\n // in normal execution environment, the master should be loading 'representative' from this jar, so\n // in that way we can find it.\n File jar = Which.jarFile( representative );\n FilePath copiedJar = dst.child( seedName + \".jar\" );\n\n if ( jar.isDirectory() )\n {\n // but during the development and unit test environment, we may be picking the class up from the classes dir\n Zip zip = new Zip();\n zip.setBasedir( jar );\n File t = File.createTempFile( seedName, \"jar\" );\n t.delete();\n zip.setDestFile( t );\n zip.setProject( new Project() );\n zip.execute();\n jar = t;\n }\n else if ( copiedJar.exists() //\n && copiedJar.digest().equals( Util.getDigestOf( jar ) ) ) //\n // && copiedJar.lastModified() == jar.lastModified() )\n {\n log.println( seedName + \".jar already up to date\" );\n return copiedJar;\n }\n\n // Theoretically could be a race condition on a multi-executor Windows slave; symptom would be an IOException during the build.\n // Could perhaps be solved by synchronizing on dst.getChannel() or similar.\n new FilePath( jar ).copyTo( copiedJar );\n log.println( \"Copied \" + seedName + \".jar\" );\n return copiedJar;\n }\n catch ( IOException | InterruptedException e )\n {\n throw new RuntimeException( e.getMessage(), e);\n }\n }", "@Override\n public void copyImageIntoAppDir(Context context) {\n try {\n mImagePath.create(context, \"newFile\", \".jpg\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n File destFile = mImagePath.getFile();\n\n// try {\n// Util.copyFile(srcFile, destFile);\n// } catch (IOException e) {\n// e.printStackTrace();\n// }\n\n String infoString = mImagePath.toString();\n\n Log.d(\"infoString \", \" \" + infoString);\n mContractview.showImageInfo(infoString);\n\n }" ]
[ "0.5867529", "0.57350665", "0.55590063", "0.55009604", "0.5497152", "0.5461068", "0.5455335", "0.53968763", "0.53881663", "0.5360355", "0.52752805", "0.527185", "0.5249168", "0.5247354", "0.5213362", "0.5184906", "0.5183302", "0.5179898", "0.5170906", "0.5170277", "0.5145371", "0.5144307", "0.5132275", "0.5125629", "0.51209086", "0.512025", "0.51177543", "0.5099916", "0.5098753", "0.5082844", "0.50819004", "0.506145", "0.5060024", "0.50557417", "0.50547075", "0.5044868", "0.5030115", "0.49977043", "0.49630028", "0.49623102", "0.49439815", "0.49344143", "0.4924801", "0.492214", "0.4917654", "0.49008802", "0.4886253", "0.4885507", "0.48603654", "0.48551232", "0.48452622", "0.48413384", "0.48376983", "0.48345", "0.48295766", "0.4815471", "0.48136315", "0.47839186", "0.4783071", "0.47796345", "0.47795674", "0.4756012", "0.47505108", "0.47485948", "0.4745942", "0.47454953", "0.47444698", "0.47256586", "0.47182167", "0.47159928", "0.4685726", "0.46680853", "0.46528038", "0.46527505", "0.46452338", "0.46194983", "0.46187207", "0.46177274", "0.46110302", "0.45955494", "0.45921665", "0.4591625", "0.4576241", "0.45661658", "0.45548385", "0.45409253", "0.45314237", "0.4509928", "0.45015866", "0.4481628", "0.44799984", "0.44788995", "0.44669804", "0.4458829", "0.44579175", "0.44573703", "0.44513866", "0.44458118", "0.44455233", "0.44267192" ]
0.55433756
3
TODO: Warning this method won't work in the case the id fields are not set
@Override public boolean equals(Object object) { if (!(object instanceof AtributosEntidadEntity)) { return false; } AtributosEntidadEntity other = (AtributosEntidadEntity) object; if ((this.atributoEntidadId == null && other.atributoEntidadId != null) || (this.atributoEntidadId != null && !this.atributoEntidadId.equals(other.atributoEntidadId))) { return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setId(Integer id) { this.id = id; }", "private Integer getId() { return this.id; }", "public void setId(int id){ this.id = id; }", "public void setId(Long id) {this.id = id;}", "public void setId(Long id) {this.id = id;}", "public void setID(String idIn) {this.id = idIn;}", "public void setId(int id) { this.id = id; }", "public void setId(int id) { this.id = id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public void setId(long id) { this.id = id; }", "public void setId(long id) { this.id = id; }", "public int getId(){ return id; }", "public int getId() {return id;}", "public int getId() {return Id;}", "public int getId(){return id;}", "public void setId(long id) {\n id_ = id;\n }", "private int getId() {\r\n\t\treturn id;\r\n\t}", "public Integer getId(){return id;}", "public int id() {return id;}", "public long getId(){return this.id;}", "public int getId(){\r\n return this.id;\r\n }", "@Override public String getID() { return id;}", "public Long id() { return this.id; }", "public Integer getId() { return id; }", "@Override\n\tpublic Integer getId() {\n return id;\n }", "@Override\n public Long getId () {\n return id;\n }", "@Override\n public long getId() {\n return id;\n }", "public Long getId() {return id;}", "public Long getId() {return id;}", "public String getId(){return id;}", "@Override\r\n\tpublic Long getId() {\n\t\treturn null;\r\n\t}", "public Integer getId() { return this.id; }", "@Override\r\n public int getId() {\n return id;\r\n }", "@Override\n\t\tpublic long getId() {\n\t\t\treturn 0;\n\t\t}", "public int getId() {\n return id;\n }", "public long getId() { return _id; }", "public int getId() {\n/* 35 */ return this.id;\n/* */ }", "public long getId() { return id; }", "public long getId() { return id; }", "public void setId(Long id) \n {\n this.id = id;\n }", "@Override\n\tpublic Long getId() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Long getId() {\n\t\treturn null;\n\t}", "public void setId(String id) {\n this.id = id;\n }", "@Override\n\tpublic void setId(Long id) {\n\t}", "public Long getId() {\n return id;\n }", "public long getId() { return this.id; }", "public int getId()\n {\n return id;\n }", "public void setId(int id){\r\n this.id = id;\r\n }", "protected abstract String getId();", "@Test\r\n\tpublic void testSetId() {\r\n\t\tbreaku1.setId(5);\r\n\t\texternu1.setId(6);\r\n\t\tmeetingu1.setId(7);\r\n\t\tteachu1.setId(8);\r\n\r\n\t\tassertEquals(5, breaku1.getId());\r\n\t\tassertEquals(6, externu1.getId());\r\n\t\tassertEquals(7, meetingu1.getId());\r\n\t\tassertEquals(8, teachu1.getId());\r\n\t}", "@Override\n\tpublic int getId(){\n\t\treturn id;\n\t}", "public int getID() {return id;}", "public int getID() {return id;}", "public String getId() { return id; }", "public String getId() { return id; }", "public String getId() { return id; }", "@Override\n public int getField(int id) {\n return 0;\n }", "public int getId ()\r\n {\r\n return id;\r\n }", "public void setId(Long id)\n/* */ {\n/* 66 */ this.id = id;\n/* */ }", "public int getId(){\r\n return localId;\r\n }", "void setId(int id) {\n this.id = id;\n }", "@Override\n public Integer getId() {\n return id;\n }", "@Override\n\tpublic Object selectById(Object id) {\n\t\treturn null;\n\t}", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "@Override\n public int getId() {\n return id;\n }", "@Override\n public int getId() {\n return id;\n }", "public void setId(int id)\n {\n this.id=id;\n }", "@Override\r\n public int getID()\r\n {\r\n\treturn id;\r\n }", "@Override\n\tpublic Integer getId() {\n\t\treturn null;\n\t}", "public int getId()\r\n {\r\n return id;\r\n }", "public void setId(Long id){\n this.id = id;\n }", "@java.lang.Override\n public int getId() {\n return id_;\n }", "@java.lang.Override\n public int getId() {\n return id_;\n }", "final protected int getId() {\n\t\treturn id;\n\t}", "private void clearId() {\n \n id_ = 0;\n }", "public abstract Long getId();", "public void setId(Long id) \r\n {\r\n this.id = id;\r\n }", "@Override\n public long getId() {\n return this.id;\n }", "public String getId(){ return id.get(); }", "@SuppressWarnings ( \"unused\" )\n private void setId ( final Long id ) {\n this.id = id;\n }", "public void setId(long id){\n this.id = id;\n }", "public void setId(long id){\n this.id = id;\n }", "public void setId(Integer id)\r\n/* */ {\r\n/* 122 */ this.id = id;\r\n/* */ }", "public Long getId() \n {\n return id;\n }", "@Override\n\tpublic void setId(int id) {\n\n\t}", "public void test_getId() {\n assertEquals(\"'id' value should be properly retrieved.\", id, instance.getId());\n }", "@Override\r\n\tpublic Object getId() {\n\t\treturn null;\r\n\t}", "public int getID(){\n return id;\n }", "public String getID(){\n return Id;\n }", "public int getId()\n {\n return id;\n }" ]
[ "0.68948644", "0.6837785", "0.67038405", "0.6639133", "0.6639133", "0.65911627", "0.6576973", "0.6576973", "0.6573157", "0.6573157", "0.6573157", "0.6573157", "0.6573157", "0.6573157", "0.65598476", "0.65598476", "0.6543178", "0.6523156", "0.65143406", "0.6486455", "0.6475413", "0.64253694", "0.6417849", "0.64156985", "0.6400779", "0.6365434", "0.63546157", "0.63499856", "0.6346203", "0.63227576", "0.631763", "0.63001484", "0.629182", "0.629182", "0.62824625", "0.62701356", "0.62650704", "0.6263972", "0.6261773", "0.62577695", "0.6254688", "0.62506694", "0.62461007", "0.62461007", "0.62423015", "0.62379855", "0.62379855", "0.623057", "0.6222287", "0.62187535", "0.6218387", "0.6210061", "0.62075466", "0.62007535", "0.6199978", "0.6191151", "0.6188524", "0.6188524", "0.6188345", "0.6188345", "0.6188345", "0.6185662", "0.6182675", "0.6173944", "0.6173008", "0.6165809", "0.6164505", "0.61599946", "0.61553764", "0.61553764", "0.61553764", "0.61553764", "0.61553764", "0.61553764", "0.61553764", "0.6154299", "0.6154299", "0.6140791", "0.61329263", "0.612767", "0.61260307", "0.61032844", "0.6102886", "0.6102886", "0.6101522", "0.6101417", "0.61006045", "0.6098037", "0.6098024", "0.6093603", "0.6091251", "0.60907245", "0.60907245", "0.6090395", "0.6087628", "0.6075129", "0.6071766", "0.6070483", "0.6069239", "0.6068642", "0.6068207" ]
0.0
-1
create status, bound togerther
public void submit(Runnable task){ StatusTask stask = new StatusTask(task,this); pending.add(stask); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public CreateStatus()\n {\n super(new DataMap(), null);\n }", "ShipmentStatus createShipmentStatus();", "public Ludo() {\n this.status = \"Created\";\n }", "public Status() {\n }", "public Status() {\n\n }", "public CreateStatus(DataMap data)\n {\n super(data, null);\n }", "org.hl7.fhir.ObservationStatus addNewStatus();", "public void buildAccountStatus() {\n try (PreparedStatement prep = Database.getConnection()\n .prepareStatement(\"CREATE TABLE IF NOT EXISTS account_status (user_id\"\n + \" TEXT UNIQUE, status INT, FOREIGN KEY (user_id) REFERENCES users\"\n + \"(id)\" + \" ON DELETE CASCADE ON UPDATE CASCADE);\")) {\n prep.executeUpdate();\n } catch (final SQLException e) {\n e.printStackTrace();\n }\n }", "public Status(){\n this(StatusDescription.REGISTERED);\n }", "@Override\n public void addStatusEvent(Status status) {\n }", "private void getStatus() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void onStatus(Map<String, Object> arg0) {\n\t\t\tSystem.out.println(\"Method createMeetiong status: \" + arg0);\r\n\t\t}", "protected Status() {\r\n\t\t;\r\n\t}", "@Override\n protected void createEntity() {\n ProjectStatus status = createProjectStatus(5);\n setEntity(status);\n }", "void setStatus(STATUS status);", "public void setStatus(Status status) {\r\n\t this.status = status;\r\n\t }", "public void setStatus(String status) { this.status = status; }", "private StatusMessage() {\n\n\t}", "private StatusMessage() {\n\n\t}", "public void setStatus(java.lang.Object status) {\n this.status = status;\n }", "public void setStatus(STATUS status) {\n this.status = status;\n }", "@Override\n\t\tpublic void setStatus(int status) {\n\t\t\t\n\t\t}", "public StatusResource() {\n this.statusService = DeathStar.getStatusService();\n logger.log(Level.FINE, \"Status resource instantiated: {0}\", this);\n }", "private STATUS(String name) {\n this.name = name;\n }", "protected StatusLine createStatusLine(ProtocolVersion ver, int status, String reason) {\n/* 422 */ return new BasicStatusLine(ver, status, reason);\n/* */ }", "public void setStatus(long status) {\r\n this.status = status;\r\n }", "@Override\n\tpublic void getStatus() {\n\t\t\n\t}", "public void status(leapstream.scoreboard.core.model.Status status) {\n Stati stati = status.is();\n foreground(stati);\n background(stati);\n label.text(\"\" + stati);\n }", "private BinStatusUpdate buildNewStatus() {\n return BinStatusUpdate.newBuilder()\n .setAmount(StuffAmount.newBuilder().setStuffAmount(bin.getStuffAmount()).build())\n .setStuff(Stuff.newBuilder().setStuffName(bin.getStuffName()).build())\n .setMaxAmount(bin.MAX_AMOUNT)\n .build();\n }", "public void setStatus(Status newStatus){\n status = newStatus;\n }", "protected void init_status(String id) {\n\t\tstatus.put(id, 1);\n\t\t\n\t}", "public void setStatus(Integer status) {\r\n this.status = status;\r\n }", "public void setStatus(Integer status) {\r\n this.status = status;\r\n }", "private void populateStatus() {\n\t\t\n\t\tstatusList.add(new Status(MainActivity.profileUrls[1], \"Mohamed\", \"14 minutes ago\"));\n\t\tstatusList.add(new Status(MainActivity.profileUrls[4], \"Ahmed Adel\", \"10 minutes ago\"));\n\t\tstatusList.add(new Status(MainActivity.profileUrls[0], \"Manar\", \"Yesterday, 5:08 PM\"));\n\t\tstatusList.add(new Status(MainActivity.profileUrls[5], \"Ramadan\", \"Today, 10:30 AM\"));\n\t\t\n\t}", "private void setStatus(com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n status_ = value;\n }", "public void setStatus(Integer status) {\n this.status = status;\n }", "public void setStatus(Integer status) {\n this.status = status;\n }", "public void setStatus(Integer status) {\n this.status = status;\n }", "public void setStatus(Integer status) {\n this.status = status;\n }", "public void setStatus(Integer status) {\n this.status = status;\n }", "public void setStatus(Integer status) {\n this.status = status;\n }", "public void setStatus(Integer status) {\n this.status = status;\n }", "public void setStatus(Integer status) {\n this.status = status;\n }", "public void setStatus(Integer status) {\n this.status = status;\n }", "public void setStatus(Integer status) {\n this.status = status;\n }", "public void setStatus(Integer status) {\n this.status = status;\n }", "public void setStatus(Integer status) {\n this.status = status;\n }", "public void setStatus(Integer status) {\n this.status = status;\n }", "public void setStatus(Integer status) {\n this.status = status;\n }", "public void setStatus(Integer status) {\n this.status = status;\n }", "public void setStatus(Integer status) {\n this.status = status;\n }", "public void setStatus(Integer status) {\n this.status = status;\n }", "public void setStatus(Integer status) {\n this.status = status;\n }", "public void setStatus(Integer status) {\n this.status = status;\n }", "public StatusComponent()\n {\n }", "public void setStatus(Status status) {\r\n this.status = status;\r\n }", "public void buildOrderStatus() {\n try (PreparedStatement prep = Database.getConnection().prepareStatement(\n \"CREATE TABLE IF NOT EXISTS order_status (order_id TEXT, status INT,\"\n + \" time REAL, \"\n + \" FOREIGN KEY (order_id) REFERENCES orders(id)\"\n + \" ON DELETE CASCADE ON\"\n + \" UPDATE CASCADE);\")) {\n prep.executeUpdate();\n } catch (final SQLException exc) {\n exc.printStackTrace();\n }\n }", "public void setStatus(Status status)\n {\n this.status = status;\n }", "public void setStatus(int status) {\n this.status = status;\n }", "public void setStatus(int status) {\n this.status = status;\n }", "public TimeEntry status(StatusEnum status) {\n this.status = status;\n return this;\n }", "@Override\n\tpublic void setStatus(int status);", "public RegisterStatus() {\n registerStatus=NOT_REGISTERED;\n }", "public void setStatus(Status status) {\n this.status = status;\n }", "public void setStatus(Status status) {\n this.status = status;\n }", "public void setStatus(Status status) {\n this.status = status;\n }", "public void setStatus(Status status) {\n this.status = status;\n }", "public void setStatus(CanaryStatus status) {\n this.status = status;\n }", "public void setStatus(JobStatus status);", "public void addNewStatusToWall(String status, String userUuid);", "public void setStatus(String status) {\n this.status = status;\n }", "public void setStatus(String status) {\n this.status = status;\n }", "public void setStatus(String status) {\r\n this.status = status;\r\n }", "public void setStatus(String status) {\r\n this.status = status;\r\n }", "public void setStatus(String status) {\r\n this.status = status;\r\n }", "public void setStatus(int status);", "public void setStatus(int status);", "public void setStatus(int v) \n {\n \n if (this.status != v)\n {\n this.status = v;\n setModified(true);\n }\n \n \n }", "public void setStatus(Integer status) {\n\t\tthis.status = status;\n\t}", "public void setStatus(Integer status) {\n\t\tthis.status = status;\n\t}", "public void setStatus(Integer status)\n {\n data().put(_STATUS, status);\n }", "public void setStatus(int status){\r\n\t\tthis.status=status;\r\n\t}", "public void setStatus(String status) {\n this.status = status;\n }", "public void setStatus(String status) {\n this.status = status;\n }", "public void setStatus(String status) {\n this.status = status;\n }", "public void setStatus(String status) {\n this.status = status;\n }", "public void setStatus(String status) {\n this.status = status;\n }", "public void setStatus(String status) {\n this.status = status;\n }", "public void setStatus(String status) {\n this.status = status;\n }", "public void setStatus(String status) {\n this.status = status;\n }", "public void setStatus(String status) {\n this.status = status;\n }", "public void setStatus(String status) {\n this.status = status;\n }", "public void setStatus(String status) {\n this.status = status;\n }", "public void setStatus(String status) {\n this.status = status;\n }", "public void setStatus(String status) {\n this.status = status;\n }", "public void setStatus(String status) {\n this.status = status;\n }", "public void setStatus(String status) {\n this.status = status;\n }", "public void setStatus(String status) {\n this.status = status;\n }", "public retStatus Status(){\n // Your code here\n this.mutex.lock();\n\n retStatus r = new retStatus(State.Pending, this.values.get(this.me));\n if (done) {\n r.state = State.Decided;\n }\n\n this.mutex.unlock();\n return r;\n }", "protected ClientStatus() {\n }", "private void statusCheck() {\n\t\tif(status.equals(\"waiting\")) {if(waitingPlayers.size()>1) status = \"ready\";}\n\t\tif(status.equals(\"ready\")) {if(waitingPlayers.size()<2) status = \"waiting\";}\n\t\tif(status.equals(\"start\")) {\n\t\t\tif(players.size()==0) status = \"waiting\";\n\t\t}\n\t\tview.changeStatus(status);\n\t}" ]
[ "0.70997614", "0.6857577", "0.67059004", "0.6576269", "0.6571218", "0.6505527", "0.6399027", "0.6383543", "0.63467884", "0.6345806", "0.63423437", "0.6331272", "0.6319495", "0.63036007", "0.6291896", "0.62720215", "0.62684846", "0.62586915", "0.62586915", "0.6257018", "0.6256134", "0.6253266", "0.62479997", "0.6233994", "0.6228005", "0.6223895", "0.6222651", "0.62129164", "0.6201969", "0.6201279", "0.6199193", "0.61979055", "0.61979055", "0.6182374", "0.61815995", "0.6175913", "0.6175913", "0.6175913", "0.6175913", "0.6175913", "0.6175913", "0.6175913", "0.6175913", "0.6175913", "0.6175913", "0.6175913", "0.6175913", "0.6175913", "0.6175913", "0.6175913", "0.6175913", "0.6175913", "0.6175913", "0.6175913", "0.61373407", "0.61357224", "0.6125263", "0.61166537", "0.6114352", "0.6114352", "0.6112708", "0.61122006", "0.60936344", "0.6090548", "0.6090548", "0.6090548", "0.6090548", "0.609032", "0.6089908", "0.60890174", "0.6074356", "0.6074356", "0.60463744", "0.6044276", "0.6044276", "0.6042247", "0.6042247", "0.6039665", "0.6036088", "0.6036088", "0.6023565", "0.60206795", "0.60206115", "0.60206115", "0.60206115", "0.60206115", "0.60206115", "0.60206115", "0.60206115", "0.60206115", "0.60206115", "0.60206115", "0.60206115", "0.60206115", "0.60206115", "0.60206115", "0.60206115", "0.60206115", "0.6020282", "0.60185236", "0.60164607" ]
0.0
-1
find task in running map update status, list
public void info(StatusTask t, String msg){ t.setStaus(msg); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public IndexedList<Task> search(TaskStatus status) {\n\t\tLinkedList<Task> result=new LinkedList<Task>();\n\t\tfor(Task task : tasks) {\n\t\t\tif(task.getStatus()==status)\n\t\t\t\tresult.add(task);\n\t\t}\n\t\treturn result;\n\t}", "public List<TaskDescription> getActiveTasks();", "@Override\n\tpublic Collection<TaskStatus> getTaskStatus(){\n \tcheckInitialized();\n \t\n \t@SuppressWarnings(\"unchecked\")\n\t\tCollection<Collection<TaskStatus>> statusTree=Collections.EMPTY_LIST;\n \tfinal MultiTask<Collection<TaskStatus>> mtask;\n \ttry {\n\t\t\t mtask = breeder.executeCallable(new GetTaskStatus(this));\n\t\t\t statusTree = mtask.get();\n \t} catch (ExecutionException ex){\n \t\tlog.fatal(\"Could not get status of tasks for job \"+this.getId(), ex);\n \t} catch(InterruptedException ex) {\n \t\tlog.fatal(\"Could not get status of tasks for job \"+this.getId(), ex);\n \t}\n\t\t\t\n\t\t// Flatten into single collection\n\t\tList<TaskStatus> result = new ArrayList<TaskStatus>((int)(statusTree.size()*this.getThreadCount()));\n\t\tfor(Collection<TaskStatus> statusForNode: statusTree) {\n\t\t\tresult.addAll(statusForNode);\n\t\t}\n\t\t\n\t\treturn result;\n \n\t}", "TaskStatus getStatus();", "ResponseEntity<List<Status>> findTaskStatuses();", "public int[] findTaskPosition(Task t) {\n\t\tint[] result;\n\t\tif (t.isWbsParent())\n\t\t\tresult = new int[2];\n\t\telse\n\t\t\tresult = new int[1];\n\t\t\t\n\t\tIterator i = list.iterator();\n\t\tTask task;\n\t\tint resultIndex = 0;\n\t\tint pos = 0;\n\t\twhile (i.hasNext()) {\n\t\t\ttask = ((TaskReference)i.next()).getTask();\n\t\t\tif (task == t) {\n\t\t\t\tresult[resultIndex++] = pos;\n\t\t\t\tif (resultIndex == result.length)\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tpos++;\n\t\t}\n\t\treturn result;\n\t}", "List<Task> getTaskdetails();", "int activeTasks();", "List<EmpTaskInfo> queryEmpTasksByCond(Map paramMap);", "TaskList getList();", "public void findTask() {\n System.out.println(LINEBAR);\n System.out.println(\"Below are a list of tasks matching your description\\n\");\n\n String targetDesc = userIn.substring(FIND_HEADER);\n\n int matching = 0;\n\n for (Task t : tasks.TaskList) {\n String currDesc = t.taskDescription;\n\n if (currDesc.contains(targetDesc)) {\n matching++;\n System.out.println(matching + \". \" + t);\n }\n }\n\n if (matching == 0) {\n System.out.println(\"No matches found\\n\");\n }\n System.out.println(LINEBAR);\n }", "public List<Task> findTask(String input) throws LukeNoResultException {\n ArrayList<Task> result = new ArrayList<>();\n for (int i = 0; i < this.tasks.size(); i++) {\n Task current = this.tasks.get(i);\n if (current.getDescription().contains(input)) {\n result.add(current);\n }\n }\n if (result.size() <= 0) {\n throw new LukeNoResultException(input);\n }\n return result;\n }", "public List<GeobatchRunInfo> getRunInfo(Boolean updateStatus, String... compositeId){\n if (updateStatus == null || !updateStatus) {\n return getRunInfo(compositeId);\n } else {\n List<GeobatchRunInfo> runInfoList = new LinkedList<GeobatchRunInfo>();\n List<GeobatchRunInfo> searchResult = getRunInfo(compositeId);\n if (searchResult != null && !searchResult.isEmpty()) {\n for(GeobatchRunInfo runInfo: searchResult){\n runInfoList.add(updateRunInfoStatus(runInfo));\n }\n }\n return runInfoList;\n }\n }", "long[] getServiceNameTasks(java.lang.String serviceName, java.lang.String status, java.lang.String action) throws java.io.IOException;", "@Override\n\tpublic List<Task> getTasks() {\n\t\treturn details.getPendingTasks();\n\t}", "public static List<Task> findAllRunningTasks() {\r\n List<Task> outTasks = new ArrayList<Task>();\r\n List<ITask> iTasks = findAllTasks(DEFAULT_INDEX, DEFAULT_PAGESIZE, null, SortOrder.ASCENDING, RUNNING_MODE, null);\r\n\r\n for (ITask iTask : iTasks) {\r\n outTasks.add(convertITaskToTask(iTask));\r\n }\r\n return outTasks;\r\n }", "public List<ScheduledTask> getAllPendingTasks() {\n \t\tSet<String> smembers = jedisConn.smembers(ALL_TASKS);\n \t\tList<ScheduledTask> alltasks = new ArrayList<>();\n \t\tGson gson = new Gson();\n \t\t// the get actual tasks by the ids\n \t\tfor (String member : smembers) {\n \t\t\tString string = jedisConn.get(PENDING_TASK(member));\n \t\t\tScheduledTask task = gson.fromJson(string, ScheduledTask.class);\n \t\t\talltasks.add(task);\n \t\t}\n \t\treturn alltasks;\n \t}", "List<TaskImpl> getTasksByProcessInstanceIdStatusFormName(Long processInstanceId, List<Status> statusList, List<String> formName);", "public TaskEntry activeTasksListLookup(InterestPacket interest)\n\t{\n\t\tfor (TaskEntry entry: activeTasksList.values()){\n\t\t\tif ( interest.isMatching(entry.getInterest())) \n\t\t\t\treturn entry ;\n\t\t}\n\t\treturn null ;\n\t}", "public List<TaskMaster> retrieveCompletedTaskByProjectId(Long projectId);", "public List<Map<String, Object>> waitIncrementTaskFinished(final String distSQL) {\n for (int i = 0; i < 10; i++) {\n List<Map<String, Object>> listJobStatus = queryForListWithLog(distSQL);\n log.info(\"show status result: {}\", listJobStatus);\n Set<String> actualStatus = new HashSet<>();\n Collection<Integer> incrementalIdleSecondsList = new LinkedList<>();\n for (Map<String, Object> each : listJobStatus) {\n assertTrue(Strings.isNullOrEmpty((String) each.get(\"error_message\")), \"error_message: `\" + each.get(\"error_message\") + \"`\");\n actualStatus.add(each.get(\"status\").toString());\n String incrementalIdleSeconds = each.get(\"incremental_idle_seconds\").toString();\n incrementalIdleSecondsList.add(Strings.isNullOrEmpty(incrementalIdleSeconds) ? 0 : Integer.parseInt(incrementalIdleSeconds));\n }\n if (Collections.min(incrementalIdleSecondsList) <= 5) {\n Awaitility.await().pollDelay(3L, TimeUnit.SECONDS).until(() -> true);\n continue;\n }\n if (actualStatus.size() == 1 && actualStatus.contains(JobStatus.EXECUTE_INCREMENTAL_TASK.name())) {\n return listJobStatus;\n }\n }\n return Collections.emptyList();\n }", "boolean hasTask();", "synchronized Map<String, MaintenanceOp> getScheduledMaintenance() {\n return Maps.newHashMap(Maps.transformValues(_scheduledTasks, new Function<Task, MaintenanceOp>() {\n @Override\n public MaintenanceOp apply(Task task) {\n return task.op;\n }\n }));\n }", "List<Task> getAllTasks();", "@GetMapping(\"/bytaskid/{id}\")\r\n public List<TaskStatus> getByTaskId(@PathVariable(value = \"id\") Long id) {\r\n\r\n List<TaskStatus> tsk = dao.findByTaskID(id);\r\n return tsk;\r\n\r\n }", "void refreshTaskInformation();", "@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\r\n\t\tprivate void checkJobInstanceStatus() {\r\n \t\r\n \tString checkId = UUID.randomUUID().toString();\r\n \t\r\n \tlogger.info(checkId + \", [LivingTaskManager]: start checkJobInstanceStatus\"\r\n \t\t\t+ \", mapSize:\" + livingJobInstanceClientMachineMap.size() \r\n \t\t\t+ \", keySet:\" + LoggerUtil.displayJobInstanceId(livingJobInstanceClientMachineMap.keySet()));\r\n \t\r\n \tint checkAmount = 0;\r\n \t\r\n \tIterator iterator = livingJobInstanceClientMachineMap.entrySet().iterator();\r\n \t\twhile(iterator.hasNext()) { \r\n \t\t\tMap.Entry entry = (Map.Entry)iterator.next();\r\n \t\t\tServerJobInstanceMapping.JobInstanceKey key = (ServerJobInstanceMapping.JobInstanceKey)entry.getKey();\r\n \t\t\t\r\n \t\t\tList<RemoteMachine> machineList = (List<RemoteMachine>)entry.getValue();\r\n \t\t\t\r\n \t\t\tif(CollectionUtils.isEmpty(machineList)) {\r\n \t\t\t\tlogger.info(checkId + \", [LivingTaskManager]: checkJobInstanceStatus machineList isEmpty\"\r\n \t \t\t\t+ \", mapSize:\" + livingJobInstanceClientMachineMap.size() + \", key:\" + key);\r\n \t\t\t\tcontinue ;\r\n \t\t\t}\r\n \t\t\t\r\n \t\t\tsynchronized(machineList) {\r\n \t\t\t\tIterator<RemoteMachine> iteratorMachineList = machineList.iterator();\r\n \t\t\t\twhile(iteratorMachineList.hasNext()) {\r\n \t\t\t\t\t\r\n \t\t\t\t\tRemoteMachine client = iteratorMachineList.next();\r\n \t\t\t\t\t\r\n \t\t\t\t\tResult<String> checkResult = null;\r\n try {\r\n client.setTimeout(serverConfig.getHeartBeatCheckTimeout());\r\n InvocationContext.setRemoteMachine(client);\r\n checkResult = clientService.heartBeatCheckJobInstance(key.getJobType(), key.getJobId(), key.getJobInstanceId());\r\n handCheckResult(key, checkResult, client);\r\n } catch (Throwable e) {\r\n logger.error(\"[LivingTaskManager]: task checkJobInstanceStatus error, key:\" + key, e);\r\n handCheckResult(key, null, client);\r\n } finally {\r\n \tcheckAmount ++;\r\n }\r\n \t\t\t\t\t\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\t\r\n \t\t}\r\n \t\t\r\n \t\tlogger.info(checkId + \", [LivingTaskManager]: finish checkJobInstanceStatus\"\r\n \t\t\t\t+ \", mapSize:\" + livingJobInstanceClientMachineMap.size() + \", checkAmount:\" + checkAmount);\r\n }", "public List<TaskMaster> retrieveAllTaskOfProject(Long projectId);", "List<ReadOnlyTask> getTaskList();", "List<ReadOnlyTask> getTaskList();", "net.zyuiop.ovhapi.api.objects.license.Task getServiceNameTasksTaskId(java.lang.String serviceName, long taskId) throws java.io.IOException;", "@SuppressWarnings(\"unchecked\")\n public List<Item> getActiveTasks() {\n Session session = this.factory.openSession();\n List<Item> list = session.createQuery(\"from Item where status = 0\").list();\n session.close();\n return list;\n }", "public void findTask(String keyword) {\n int index = 1;\n for (Task task : taskList) {\n if (task.toString().contains(keyword)) {\n if (isNoTaskYetFound(index)) {\n System.out.println(\"Here are the matching tasks in your list:\");\n }\n\n System.out.println(String.format(\"%d. %s\", index++, task.toString()));\n }\n }\n\n if (isNoTaskYetFound(index)) {\n System.out.println(\"There are no matching results\");\n }\n }", "void getTasks( AsyncCallback<java.util.List<org.openxdata.server.admin.model.TaskDef>> callback );", "@Override\r\n\tpublic List<ExecuteTask> getByTask(int taskId) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask\"\r\n\t\t\t\t+ \" WHERE et_task_id = ?\";\r\n\t\treturn getForList(sql,taskId);\r\n\t}", "public CommandResult execute() {\n int i = 0;\n int found = 0;\n for (Task task : Duke.taskList) {\n i++;\n if (task.description.contains(keyword)) {\n System.out.println(i + \".[\" + task.getTaskID() + \"]\" +\n \"[\" + task.getStatusIcon() +\n \"] \" + task.description + \" \" + task.getDate());\n found++;\n }\n }\n if (found == 0) {\n return new CommandResult(\"No results found :(\");\n } else {\n return new CommandResult(System.lineSeparator() + found + \" results found!\");\n }\n }", "boolean updateActiveTask(Task task);", "List<ExtDagTask> taskList(ExtDagTask extDagTask);", "public Map<String, Integer> getAllReadyTasks() {\n if (!regCenter.isExisted(ReadyNode.ROOT)) {\n return Collections.emptyMap();\n }\n List<String> jobNames = regCenter.getChildrenKeys(ReadyNode.ROOT);\n Map<String, Integer> result = new HashMap<>(jobNames.size(), 1);\n for (String each : jobNames) {\n String times = regCenter.get(ReadyNode.getReadyJobNodePath(each));\n if (!Strings.isNullOrEmpty(times)) {\n result.put(each, Integer.parseInt(times));\n }\n }\n return result;\n }", "java.util.List<String>\n getTaskIdList();", "long[] getServiceNameTasks(java.lang.String serviceName) throws java.io.IOException;", "Object getTaskId();", "public ArrayList<Task> listNotStarted() {\n ArrayList<Task> tasks = new ArrayList<>();\n for (Task t : this.tasks) {\n if (t.getStatus() == 0) {\n tasks.add(t);\n }\n }\n return tasks;\n }", "Set<Task> getAllTasks();", "public static void findTask(String input) {\n int taskCount = 1;\n ui.showToUser(ui.DIVIDER, \"Here are the matching tasks in your list:\");\n for (Task task : Tasks) {\n if (task.getDescription().contains(input)){\n ui.showToUser(taskCount + \".\" + task.toString());\n taskCount++;\n }\n }\n ui.showToUser(ui.DIVIDER);\n }", "List<TaskSummary> getTasksByProcessInstanceId(Long processInstanceId, String locale);", "public Task getTask(Integer tid);", "Collection<EntityUpdateRequest> pendingUpdates();", "public void updateTask() {}", "public static List<ITask> findWorkedTaskOfSessionUser() {\r\n return findTaskOfSessionUser(DEFAULT_INDEX, DEFAULT_PAGESIZE, null, SortOrder.ASCENDING, FINISHED_MODE, null);\r\n }", "@GET(\"/task/.json\")\n Call<Map<String, Task>> getAllTasks();", "public List<PendingClusterTask> pendingTasks() {\n final var currentTimeMillis = threadPool.relativeTimeInMillis();\n return allBatchesStream().flatMap(e -> e.getPending(currentTimeMillis)).toList();\n }", "public Collection<Node> getTasks(Processor p) {\n return p.getScheduledTasks();\n }", "private void doViewAllCompletedTasks() {\n ArrayList<Task> t1 = todoList.getListOfCompletedTasks();\n if (t1.size() > 0) {\n for (Task task : t1) {\n System.out.println(task.getTime() + \" \" + task.getDescription() + \" \" + task.getDate());\n }\n } else {\n System.out.println(\"No completed tasks available.\");\n }\n }", "public List<GeobatchRunInfo> search(String fileId) {\n SearchFilter filter;\n if(fileId != null){\n filter = new AndFilter(new FieldFilter(BaseField.DESCRIPTION,\n fileId, SearchOperator.EQUAL_TO), new CategoryFilter(CATEGORY_NAME,\n SearchOperator.EQUAL_TO));\n }else{\n filter = new CategoryFilter(CATEGORY_NAME,\n SearchOperator.EQUAL_TO);\n }\n ResourceList list = geostoreClient.searchResources(filter, 0,\n Integer.MAX_VALUE, true, false);\n List<GeobatchRunInfo> resources = new LinkedList<GeobatchRunInfo>();\n if (list.getList() != null && !list.getList().isEmpty()) {\n for (Resource resource : list.getList()) {\n resources.add(getRunStatus(resource));\n }\n }\n \n // sort by last execution\n Collections.sort(resources, new GeoBatchRunInfoComparator());\n \n return resources;\n }", "java.util.List<com.google.cloud.aiplatform.v1.PipelineTaskDetail> \n getTaskDetailsList();", "public List<String> getRunningESBTaskList() throws Exception {\n return ntaskManager.getRunningTaskList();\n }", "public List<TaskMaster> retrieveTasksForIntervalById(long userId, Calendar startTime, Calendar endTime);", "@Override\r\n public List getExecutingTask() {\n return null;\r\n }", "public static List<ITask> findWorkTaskOfSessionUser() {\r\n\r\n return findTaskOfSessionUser(DEFAULT_INDEX, DEFAULT_PAGESIZE, null, SortOrder.ASCENDING, RUNNING_MODE, null);\r\n }", "public void updateTasks(List<Task> listOfTasks);", "public ArrayList<Task> getVisibleTasks() {\n ArrayList<Task> visibleTasks = new ArrayList<>();\n forAllTasks(new Consumer(visibleTasks) {\n /* class com.android.server.wm.$$Lambda$DisplayContent$TaskStackContainers$rQnI0Y8R9ptQ09cGHwbCHDiG2FY */\n private final /* synthetic */ ArrayList f$0;\n\n {\n this.f$0 = r1;\n }\n\n @Override // java.util.function.Consumer\n public final void accept(Object obj) {\n DisplayContent.TaskStackContainers.lambda$getVisibleTasks$0(this.f$0, (Task) obj);\n }\n });\n return visibleTasks;\n }", "Set<StandbyTask> getStandbyTasks();", "public List<TaskMaster> retrieveIncompleteTask(Long userId);", "public int indexOf(Task t) {\r\n return tasks.indexOf(t);\r\n }", "private boolean containsTask(Task task) {\n Iterator<Task> iterator = tasks.iterator();\n while (iterator.hasNext()) {\n Task nextTask = iterator.next();\n if (nextTask.getIdentifier().equals(task.getIdentifier())) {\n return true;\n }\n }\n\n return true;\n }", "public TaskList matchTasks(String match) {\n TaskList output = new TaskList();\n try {\n for (int f = 0; f < this.getSize(); f++) {\n Task selectedTask = this.getSingleTask(f);\n if (selectedTask.toString().contains(match)) {\n output.addTask(selectedTask);\n }\n }\n } catch (DukeException e) {\n return new TaskList();\n }\n\n return output;\n }", "@Override\r\n\tpublic List<ExecuteTask> getAll() {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask\";\r\n\t\treturn getForList(sql);\r\n\t}", "public List<Task> listTasks(String extra);", "public java.util.List<java.lang.String> getDebugRunningsList() {\n return java.util.Collections.unmodifiableList(result.debugRunnings_);\n }", "public Map<Long, Collection<TaskShortInfo>> findAllPendingTasksForUserAndTeamMembers(User user) {\n return taskRepository.findAllPendingTasksForUserAndTeamMembers(user.getId(), user.getRolesName());\n }", "public ArrayList<Task> retrieveTaskList() {\r\n\r\n\r\n return taskList;\r\n }", "public ArrayList<Task> getAllTasks() {\n \treturn this.taskBuffer.getAllContents();\n }", "public interface ComputeTaskStatusSnapshot {\n /**\n * @return Session ID of the task being executed.\n */\n IgniteUuid sessionId();\n\n /**\n * @return Task name of the task this session belongs to.\n */\n String taskName();\n\n /**\n * @return ID of the node on which task execution originated.\n */\n UUID originatingNodeId();\n\n /**\n * @return Start of computation time for the task.\n */\n long startTime();\n\n /**\n * @return End of computation time for the task.\n */\n long endTime();\n\n /**\n * @return Nodes IDs on which the task jobs will execute.\n */\n List<UUID> jobNodes();\n\n /**\n * @return All session attributes.\n */\n Map<?, ?> attributes();\n\n /**\n * @return Status of the task.\n */\n ComputeTaskStatusEnum status();\n\n /**\n * @return Reason for the failure of the task.\n */\n @Nullable Throwable failReason();\n\n /**\n * @return {@code true} if change of task attributes is available.\n */\n boolean fullSupport();\n\n /**\n * @return User who created the task, {@code null} if security is not available.\n */\n @Nullable Object createBy();\n\n /**\n * @return {@code True} if task is internal.\n */\n boolean internal();\n}", "void completeTask(String userId, List<TaskSummary> taskList, Map<String, Object> results);", "TrackerTasks getTrackerTasks(final Integer id);", "private void doViewAllTasks() {\n ArrayList<Task> t1 = todoList.getListOfTasks();\n if (t1.size() > 0) {\n for (Task task : t1) {\n System.out.println(task.getTime() + \" \" + task.getDescription() + \" \" + task.getDate());\n }\n } else {\n System.out.println(\"No tasks available.\");\n }\n }", "public Map<String, TaskBean> getUpdatedTasksList(String _operation, String _idUser) {\r\n\r\n\t\tString METHOD = \"getModifiedTasksList\";\r\n\r\n\t\tMap<String, TaskBean> tasksBean = new HashMap<String, TaskBean>();\r\n\r\n\t\t// on retourne les donnees sous la forme JSON (JavaScript Object Notation)\r\n\t\tString messageErreur = null;\r\n\t\tint code_erreur = 0;\r\n\r\n\t\tlog.debug(\"\\n\" + INFOS_CLASSE + \" : operation : \" + _operation ); \r\n\t\tif (_operation == null){\r\n\t\t\tmessageErreur = \"undefined operation\";\r\n\t\t\tcode_erreur = 531;\r\n\t\t} else {\r\n\t\t\tif (!_operation.equalsIgnoreCase(Sps2GeneralConstants.SPS_GET_UPDATED_TASKS_LIST)){\r\n\t\t\t\tmessageErreur = \"bad operation\";\r\n\t\t\t\tcode_erreur = 534;\r\n\t\t\t}\r\n\t\t\tif (_idUser == null) {\r\n\t\t\t\tmessageErreur = \"undefined idUser\";\r\n\t\t\t\tcode_erreur = 535;\r\n\t\t\t}\r\n\t\t} // if (operation == null){\r\n\r\n\t\t// redirection vers la page d'erreur, \"action inconnue\"\r\n\t\tif (messageErreur != null ) {\r\n\t\t\t// retourne le message d'erreur\r\n\t\t\tlog.debug(\"\\n\" + INFOS_CLASSE + \" : pb : \" + messageErreur); \r\n\t\t\tTaskBean taskBean = new TaskBean();\r\n\t\t\ttaskBean.getError().setMessage(\"error : \" + messageErreur);\r\n\t\t\ttaskBean.getError().setCode(code_erreur);\r\n\t\t\ttasksBean.put(\"0\", taskBean);\r\n\r\n\t\t\treturn tasksBean;\r\n\t\t} // if (messageErreur != null ) {\r\n\r\n\t\ttry {\r\n\t\t\tlog.debug(\"\\n\" + INFOS_CLASSE + \" : \" + METHOD + \" : _idUser : \" + _idUser); \r\n\r\n\t\t\tFacadeTasks facadeTasks = new FacadeTasks();\r\n\t\t\ttasksBean = facadeTasks.getUpdatedTasksList(_idUser);\r\n\r\n\t\t\tlog.debug(\"\\n\" + INFOS_CLASSE + \" : tasksBean size : \" + tasksBean.size()); \r\n\r\n\t\t\tList<String> cles = new ArrayList<String>(tasksBean.keySet());\r\n\t\t\tCollections.sort(cles, new CreationDatesComparator(tasksBean));\r\n\r\n\t\t\t// reconstitution du tableau en fonction de la liste des cles triees\r\n\t\t\tMap<String, TaskBean> sortedTasks = \r\n\t\t\t\tnew HashMap<String, TaskBean>();\r\n\r\n\t\t\tfor(String id : cles){\r\n\t\t\t\tTaskBean taskBean = tasksBean.get(id);\r\n\t\t\t\tsortedTasks.put(id, taskBean);\r\n\t\t\t} // for\r\n\t\t\treturn sortedTasks;\r\n\t\t} catch (FacadeSps2Exception exception) {\r\n\t\t\tlog.info(\"\\n\" + INFOS_CLASSE + \" : getTasksList : FacadeSps2Exception : \" + exception.getMessage());\r\n\t\t\treturn tasksBean;\r\n\t\t} catch (Exception exception) {\r\n\t\t\tTaskBean taskBean = new TaskBean();\r\n\t\t\ttaskBean.getError().setMessage(\"Exception : \" + exception.getMessage());\r\n\t\t\ttaskBean.getError().setCode(FacadeSps2Exception.SPS_EXCEPTION);\r\n\t\t\ttasksBean.put(\"0\", taskBean);\r\n\t\t\treturn tasksBean;\r\n\t\t} // try { \t\t\r\n\r\n\t}", "ObservableList<Task> getCurrentUserTaskList();", "WorkingTask getWorkingTask();", "List<FileTask> getOverlays();", "public void execute() {\n\n try {\n checkTask();\n Ui.printLines();\n Ui.printMatchingTasks();\n int index = 1;\n\n for (Task task : TaskList.taskArrayList) {\n String task_description = task.toString();\n\n if (task_description.contains(command)) {\n System.out.println(index + \". \" + task);\n index++;\n }\n\n }\n Ui.printLines();\n } catch (InvalidTask invalidTask) {\n Ui.printLines();\n Ui.printInvalidTask();\n Ui.printLines();\n }\n }", "String getTaskId();", "public List<TaskMaster> retrieveTaskByProjectId(Long projectId);", "int getTaskIdCount();", "public List<ScheduledTask> getAllPendingTasksByUser(int userId) {\n \t\tSet<String> smembers = jedisConn.smembers(USER_TASKS(String.valueOf(userId)));\n \t\tList<ScheduledTask> alltasks = new ArrayList<>();\n \t\tGson gson = new Gson();\n \t\t// for each user task id, get the actual task \n \t\tfor (String member : smembers) {\n \t\t\tString string = jedisConn.get(PENDING_TASK(member));\n \t\t\tScheduledTask task = gson.fromJson(string, ScheduledTask.class);\n \t\t\talltasks.add(task);\n \t\t}\n \t\treturn alltasks;\n \t}", "List<Workflow> findByIdTask( int nIdTask );", "private List<TaskObject> getAllTasks(){\n RealmQuery<TaskObject> query = realm.where(TaskObject.class);\n RealmResults<TaskObject> result = query.findAll();\n result.sort(\"completed\", RealmResults.SORT_ORDER_DESCENDING);\n\n tasks = new ArrayList<TaskObject>();\n\n for(TaskObject task : result)\n tasks.add(task);\n\n return tasks;\n }", "@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)\n public List<TaskSummary> getTasksByProcessInstance(Long processInstanceId, Status taskStatus) {\n TaskServiceSession taskSession = null;\n try {\n StringBuilder qBuilder = new StringBuilder(\"select new org.jbpm.task.query.TaskSummary(t.id, t.taskData.processInstanceId, name.text, subject.text, description.text, t.taskData.status, t.priority, t.taskData.skipable, t.taskData.actualOwner, t.taskData.createdBy, t.taskData.createdOn, t.taskData.activationTime, t.taskData.expirationTime, t.taskData.processId, t.taskData.processSessionId) \");\n qBuilder.append(\"from Task t \");\n qBuilder.append(\"left join t.taskData.createdBy \");\n qBuilder.append(\"left join t.taskData.actualOwner \");\n qBuilder.append(\"left join t.subjects as subject \");\n qBuilder.append(\"left join t.descriptions as description \");\n qBuilder.append(\"left join t.names as name \");\n qBuilder.append(\"where t.taskData.processInstanceId = \");\n qBuilder.append(processInstanceId);\n if(taskStatus != null) {\n qBuilder.append(\" and t.taskData.status = '\");\n qBuilder.append(taskStatus.name());\n qBuilder.append(\"'\");\n }\n taskSession = taskService.createSession();\n uTrnx.begin();\n List<TaskSummary> taskSummaryList = (List<TaskSummary>)taskSession.query(qBuilder.toString(), 10, 0);\n uTrnx.commit();\n return taskSummaryList;\n }catch(Exception x) {\n throw new RuntimeException(x);\n }finally {\n if(taskSession != null)\n taskSession.dispose();\n }\n }", "String getTaskId(int index);", "@Override\n\tpublic Location getLocationById(Integer id) {\n\t\t\n\t\tint i = 0;\n\t\t\n\t\tfor(i=0;i<locationList.size();i++)\n\t\t{\n\t\t\tif(locationList.get(i).getIdTask()==id)\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn locationList.get(i);\n\t}", "public List<Task> getpublishTask(Integer uid);", "List<PushTemplate> selectPushTemplate(String taskDefKey);", "public ArrayList<Task> getFinishedTasks(){\r\n return finished;\r\n }", "public void updateTaskViews(){\n for (Task task : taskManager.getTasksList()){\n TextView textToChange = (TextView) root.findViewById(task.getIdInView());\n if (textToChange == null){\n submit(task.getName(), task.getIdInView(), task.getTimeForTask(), task.isFinished());\n } else {\n textToChange.setText(task.getName());\n }\n }\n }", "private int[] getTaskCountByStatus() {\n int[] counts = new int[2];\n int doneCount = 0;\n int toDoCount = 0;\n for (Task t : taskStore) {\n if (t.getIsDone()) {\n doneCount++;\n } else {\n toDoCount++;\n }\n }\n counts[0] = toDoCount;\n counts[1] = doneCount;\n return counts;\n }", "public ArrayList<TaskItem> getAllTasksByStatus(int status)\n {\n ArrayList<TaskItem> allTasksList = new ArrayList<>();\n\n //String allTasks = \"SELECT * FROM \" + TABLE_TASKS + \" WHERE \" + KEY_STATUS + \" = 0\" + \" ORDER BY \" + KEY_CATEGORY + \" DESC\";\n String allTasks = \"SELECT * FROM \" + TABLE_TASKS + \" WHERE \" + TASK_STATUS + \" = \" + \"'\" + status + \"'\" + \" ORDER BY \" + TASK_DATE + \" DESC, \" + TASK_ID + \" DESC, \" + TASK_CATEGORY + \" DESC\";\n\n SQLiteDatabase db = getReadableDatabase();\n\n Cursor allTasksCursor = db.rawQuery(allTasks, null);\n\n if(allTasksCursor.moveToFirst())\n {\n do {\n\n allTasksList.add(\n TaskItem.createTask(allTasksCursor.getString(1),\n allTasksCursor.getString(2),\n Integer.parseInt(allTasksCursor.getString(3)),\n Integer.parseInt(allTasksCursor.getString(0)),\n allTasksCursor.getString(4),\n allTasksCursor.getString(5)));\n }\n while (allTasksCursor.moveToNext());\n }\n\n allTasksCursor.close();\n db.close();\n\n return allTasksList;\n }", "public IndexedList<Task> search() {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic ArrayList<Task> getAllTasks() {\n\t\treturn null;\r\n\t}", "public void checkTask(String task){\r\n\t\t\r\n\t}", "private static String getStatus(Task task) {\n Status myStatus = task.getStatus();\n if (myStatus == Status.UP_NEXT) {\n return \"UP_NEXT\";\n } else if (myStatus == Status.IN_PROGRESS) {\n return \"IN_PROGRESS\";\n } else {\n return myStatus.toString();\n }\n }" ]
[ "0.6195987", "0.6122089", "0.61209023", "0.5944223", "0.5893366", "0.5847923", "0.57782894", "0.5746328", "0.57281023", "0.5725363", "0.57251227", "0.5723526", "0.57025194", "0.56975174", "0.56912565", "0.56868595", "0.56765115", "0.56287277", "0.56022507", "0.560141", "0.5595611", "0.55911416", "0.5542351", "0.5534059", "0.55231684", "0.55151457", "0.55089074", "0.5500415", "0.5494406", "0.5494406", "0.54879254", "0.54784715", "0.5470105", "0.54664296", "0.5407482", "0.5403515", "0.54034865", "0.53899413", "0.5382038", "0.5359947", "0.5358168", "0.53537333", "0.5352642", "0.5347636", "0.5338474", "0.5331703", "0.5328779", "0.5328691", "0.5322758", "0.5304552", "0.5302371", "0.5297263", "0.5275303", "0.5273248", "0.5271112", "0.52655023", "0.52513266", "0.5237671", "0.5236653", "0.5236615", "0.5236603", "0.5233986", "0.52315426", "0.5231267", "0.52210605", "0.52188677", "0.52179897", "0.51950794", "0.51887804", "0.5180962", "0.516687", "0.5155118", "0.5149812", "0.51489544", "0.51489264", "0.51447225", "0.51297307", "0.5121321", "0.51187116", "0.51154643", "0.5097742", "0.5096274", "0.50934446", "0.5092195", "0.5091994", "0.50875914", "0.50871736", "0.5073342", "0.50655663", "0.50609845", "0.5058271", "0.50570244", "0.5053019", "0.5052959", "0.50464445", "0.5033315", "0.5032222", "0.50321364", "0.50224227", "0.5020552", "0.50151783" ]
0.0
-1
/ Start with the empty list.
public static void main(String[] args) { LinkedListRep llist = new LinkedListRep(); llist.head = new Node(8); Node second = new Node(10); Node third = new Node(12); Node fourth = new Node(16); Node fifth = new Node(9); Node sixth = new Node(14); llist.head.next = second; second.next = third; third.next = fourth; fourth.next = fifth; fifth.next = sixth; //sixth.next = llist.head; System.out.print("\nLinked list: "); llist.printList(); llist.push(15); System.out.print("\nlist after inserting node 15: "); llist.printList(); llist.insertAfter(third.next, 25); System.out.print("\nlist after inserting node 25: "); llist.printList(); llist.deleteNode(6); System.out.print("\nlist after deleting node 9: "); llist.printList(); llist.insertAfter(llist.head.next, 30); System.out.print("\nlist after inserting node 30: "); llist.printList(); llist.append(45); System.out.print("\nlist after appending node 45: "); llist.printList(); llist.deleteNodeIterative(8); System.out.print("\nlist after deleting node 8 after 15: "); llist.printList(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void makeEmpty() {\r\n\t\tArrays.fill(list, -1);\r\n\t}", "public void EmptyList(){\n BusStopSearcherPresenter.setListview(initList(emptylist));\n }", "List() {\n this.length = 0;\n }", "public void makeEmpty() {\n System.out.println(\"List is now empty\");\n head = null;\n tail = null;\n\n }", "public void makeEmpty() {\n // remove Squares until empty\n while (!exploreList.isEmpty()) {\n exploreList.getNext();\n }\n }", "public void emptyList() {\n coursesTaken = new ArrayList<CourseTaken>();\r\n }", "public void clearInitialize(){\n index=0;\n for(int i =0; i < list.length;i++){\n list[i]=0;\n }\n hasFilled = false;\n\n }", "public void makeEmpty() {\n for (int i = 0; i < buckets.length; i++) {\n buckets[i] = new SList();\n }\n size = 0;\n }", "public void clearListNotIndex(){\n for(int z=0; z<list.length; z++){\n list [z] = 0;\n }\n }", "private void initList() {\n\n }", "public static <T>\n LazyList<T> empty() {\n return EMPTY;\n }", "public void reset() {\n this.list.clear();\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 List() {\n\t\tthis.head = null; \n\t}", "public void makeEmpty(){\n front = null;\n numItems =0;\n }", "public Lista()\n {\n empty=true;\n next = null;\n }", "@Override\n public void makeEmpty() {\n this.head = null;\n this.tail = null;\n }", "public List() {\n this.list = new Object[MIN_CAPACITY];\n this.n = 0;\n }", "@Nonnull\n public static <T> PlayList<T> empty()\n {\n return new PlayList<>();\n }", "@Override\n public boolean isEmpty()\n {\n return list.size()<1;\n }", "public void Reset()\n {\n this.list1.clear();\n }", "public List()\n\t{\n\t\tthis(null, null);\n\t}", "public static <T> List<T> getOrEmptyList(List<T> list) {\n return list == null ? Collections.emptyList() : list;\n }", "public list() {\r\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 void testIsEmpty() {\r\n assertTrue( list.isEmpty());\r\n list.add(\"A\");\r\n assertFalse(list.isEmpty());\r\n }", "void clear() {\n\t\tfor (int list = getFirstList(); list != -1;) {\n\t\t\tlist = deleteList(list);\n\t\t}\n\t}", "List<Wine> emptyMethodReturnList(){\n return List.of();\n }", "private Lists() { }", "private void fillContentListWithDefaultValues(List<Content> contentList, Integer start, Integer prevLastIndex) {\n\n\t\tfor (int i = start; i < prevLastIndex; i++)\n\t\t\tcontentList.add(null);\n\t}", "@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 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}", "myArrayList() {\n\t\thead = null;\n\t\ttail = null;\n\t}", "@Override\n public List<Object> list() {\n return null;\n }", "public Builder clearList() {\n list_ = com.google.protobuf.LazyStringArrayList.EMPTY;\n bitField0_ = (bitField0_ & ~0x08000000);\n onChanged();\n return this;\n }", "public void emptyArrayList_ListOfMiniCartItems() {\n ListOfMiniCartItems.clear();\n System.out.println(\" Clear Mini-Cart Item Array List: \" + ListOfMiniCartItems);\n }", "@Test\n void testGetHeadWithEmptyList() {\n MyList l = new MyList();\n assertEquals(null, l.getHead());\n }", "public boolean empty() {\n return list.isEmpty();\n }", "@Test\n public void isEmpty() {\n assertTrue(myList.isEmpty());\n\n //given\n myList.add(0);\n\n //then\n assertFalse(myList.isEmpty());\n }", "public void clearList() {\n\t\thead = null;\n\t\tlength = 0;\n\t}", "public linkedList() { // constructs an initially empty list\r\n\r\n }", "@Test\r\n\tpublic void testIsEmpty() {\r\n\t\tAssert.assertFalse(list.isEmpty());\r\n\t\tlist.clear();\r\n\t\tAssert.assertTrue(list.isEmpty());\r\n\t}", "List() {\n final int ten = 10;\n list = new int[ten];\n size = 0;\n }", "@Override\n\tpublic String startAll() {\n\t\treturn null;\n\t}", "public boolean empty() {\n\t\treturn list.size() == 0;\n\t}", "public boolean empty() {\n if (list.size() == 0) {\n return true;\n }\n else {\n return false;\n }\n }", "public void makeEmpty();", "public void makeEmpty();", "@Override\n\tpublic ListIterator<T> listIterator() {\n\t\treturn null;\n\t}", "@Test\r\n\tpublic void testIsEmpty() {\r\n\t\ttestArray = new ArrayBasedList<String>();\r\n\t\tassertTrue(testArray.isEmpty());\r\n\t\ttestArray.add(\"hi\");\r\n\t\tassertTrue(!testArray.isEmpty());\r\n\t}", "public List()\n {\n list = new Object [10];\n }", "@Test\n public void clearForEmptyList() {\n myList.clear();\n\n //then\n assertTrue(myList.isEmpty());\n assertEquals(\"[]\", myList.toString());\n }", "public void makeEmpty( )\n {\n header.next = null;\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 void empty() {\n int StartSize = stockList.size();\r\n // While array is not empty.\r\n while (stockList.size() > 0) {\r\n // For every item in the \"stockList\" array.\r\n for (int i = 0; i < StartSize; i++) {\r\n // Remove the beanBag object at the current position in the \"stockList\".\r\n stockList.remove(i);\r\n // Set the global int \"nextReservationNumber\" to 0.\r\n nextReservationNum = 0;\r\n }\r\n }\r\n }", "public MyArrayList ()\r\n {\r\n \tlist = new Object[100];\r\n \tnumElements = 0;\r\n }", "public EmptyList(int head, WeirdList tail) {\n super(head, tail);\n }", "public void emptySelectionLists() {\n\t\tArrayList selectionsCopy = new ArrayList();\n\t\tselectionsCopy.addAll(selections);\n\t\tIterator it = selectionsCopy.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tXsdNode node = (XsdNode) it.next();\n\t\t\tunselectNode(node);\n\t\t}\n\t\tlineNode = null;\n\t\telementFilters = new HashMap();\n\t}", "public SLList()\n {\n head = tail = null;\n }", "public void testEmptyList() {\n SortedLinkedList s = new SortedLinkedList();\n assertEquals(s.getName(0), null);\n assertEquals(s.getQuantity(0), -1);\n assertEquals(s.length(), 0);\n assertTrue(s.isMember(null)); \n }", "public void clearList() {\n\t\tthis.head = null;\n\t\tthis.tail = null;\n\t\tlength = 0;\n\t}", "public static <T> List<T> createList() {\n\t\treturn Collections.emptyList();\n\t}", "@SuppressWarnings(\"unchecked\")\r\n public void createList() {\r\n items = new int[MAX_LIST];\r\n NumItems = 0;\r\n }", "public void clear() {\n\t\tlists.clear();\n\t}", "public void makeEmpty() {\n defTable = new DList[sizeBucket];\n for(int i=0; i<sizeBucket; i++) {\n defTable[i] = new DList();\n }\n size = 0;\n }", "public void makeEmpty( )\n {\n doClear( );\n }", "public void empty() {\n _items.clear();\n }", "public void makeEmpty() {\r\n\t\theader.next = null;\r\n\t\tlast = null;\r\n\t}", "public static void printEmptyTaskListMessage() {\n botSpeak(Message.EMPTY_TASK_LIST_MESSAGE);\n }", "@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}", "boolean isEmpty(int list) {\n\t\treturn m_lists.getField(list, 0) == -1;\n\t}", "public static java.util.List singletonList(java.lang.Object arg0)\n { return null; }", "public boolean supportsEmptyInList() {\n \t\treturn true;\n \t}", "public void imprimirLista() {\n NodoListaDoble<T> tmp = raiz;\n\n if (this.raiz == null) {\n System.out.println(\"Lista vacia\");\n } else {\n System.out.println(\"--------------------------\");\n while (tmp != null) {\n System.out.println(tmp.toString());\n tmp = tmp.getSiguiente();\n }\n System.out.println(\"--------------------------\");\n }\n }", "public boolean isEmpty(){\n\n \treturn list.size() == 0;\n\n }", "public ArrayList()\n {\n list = new int[SIZE];\n length = 0;\n }", "public boolean isEmpty(){\n return this.listSize == 0;\n }", "public void doEmptyTableList() {\n tableList.deleteList();\n }", "eList()\r\n {\r\n head = null;\r\n keyword = new String();\r\n }", "private void addToEmptyList(T data) {\n this.first = this.last = new Node(data);\n this.nrOfElements++;\n }", "public OccList reset()\n {\n size = 0;\n return this;\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 ArrayList() {\n elements = new Object[DEFAULT_CAPACITY];\n }", "public void makeEmpty() {\r\n for (int i = 0; i < tableSize; i++) {\r\n table[i] = new DList<Entry<K, V>>();\r\n }\r\n }", "public boolean isEmpty()\n\t{\n\t\treturn list.isEmpty();\n\t}", "public AList() {\n size = 0;\n items = (Item[]) new Object[100];\n }", "public AList() {\n size = 0;\n items = (Item[]) new Object[100];\n }", "public boolean isEmpty() {\n return list.isEmpty();\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 static MutableLinearList start () {\r\n\t\t\r\n\t\tMutableLinearList list = new MutableLinearList();\r\n\t\tMutableLinearList item2 = new MutableLinearList();\r\n\t\tMutableLinearList item3 = new MutableLinearList();\r\n\t\t\r\n\t\tlist.head = 42;\r\n\t\tlist.tail = item2;\r\n\t\t\r\n\t\titem2.head = 8;\r\n\t\titem2.tail = item3;\r\n\t\t\r\n\t\titem3.head = 15;\r\n\t\titem3.tail = null;\r\n\t\t\r\n\t\t\r\n/*\t\t// alternative Implementierung:\r\n\t\tMutableLinearList list = new MutableLinearList();\r\n\t\tlist.head = 15;\r\n\t\tlist.addInFront(8);\r\n\t\tlist.addInFront(42);\r\n*/\t\t\r\n\t\t\r\n\t\treturn list;\r\n\t}", "public synchronized void emptyField(){\n List<Player> pList = Arrays.asList(players);\r\n \r\n Iterator<Player> pIter = pList.iterator();\r\n while(pIter.hasNext()){\r\n //for(Player player: players){\r\n Player player = pIter.next();\r\n \r\n if(player == null){\r\n continue;\r\n }\r\n System.out.println(\"NUMBER OF CARDS: \" + player.getCardsInHand().size());\r\n \r\n Iterator<Card> cardIter = player.getCardsInHand().iterator();\r\n \r\n while(cardIter.hasNext()){\r\n try{\r\n collectCard(cardIter.next());\r\n }catch(Exception ex){\r\n }\r\n \r\n }\r\n }\r\n }", "public boolean isEmpty() {\n\t\treturn list.isEmpty();\n\t}", "public ListaEncadeada() {\n first = null;\n }", "@SuppressWarnings(\"unchecked\")\n public ArrayList() {\n list = (E[])new Object[DEFAULT_CAP];\n capacity = 10;\n size = 0;\n }", "@Test(timeout = TIMEOUT)\n public void testIsEmptyAndClear() {\n assertTrue(list.isEmpty());\n\n // Should not be empty after adding elements\n list.addAtIndex(0, \"0a\"); // 0a\n list.addAtIndex(1, \"1a\"); // 0a, 1a\n list.addAtIndex(2, \"2a\"); // 0a, 1a, 2a\n list.addAtIndex(3, \"3a\"); // 0a, 1a, 2a, 3a\n list.addAtIndex(4, \"4a\"); // 0a, 1a, 2a, 3a, 4a\n assertFalse(list.isEmpty());\n\n // Clearing the list should empty the array and reset size\n list.clear();\n assertTrue(list.isEmpty());\n assertEquals(0, list.size());\n assertArrayEquals(new Object[ArrayList.INITIAL_CAPACITY],\n list.getBackingArray());\n }", "protected EmptyIterator() {\n\t\t\tsuper();\n\t\t}", "public AList() {\n items = (TypeHere[]) new Object[100];\n size = 0;\n }", "@Override\n public boolean isEmpty() { return true; }", "public void clear(){\n\n \tlist = new ArrayList();\n\n }", "boolean isListRemainingEmpty();" ]
[ "0.7441376", "0.72091085", "0.7084822", "0.7012727", "0.68550754", "0.6854575", "0.67008024", "0.6644196", "0.6638317", "0.6631182", "0.6536848", "0.64784336", "0.64734524", "0.64686", "0.64615214", "0.64556545", "0.6455385", "0.64428717", "0.6442474", "0.6405756", "0.6383242", "0.6377493", "0.6374951", "0.6358054", "0.6348998", "0.6348998", "0.63408065", "0.6340002", "0.6336054", "0.6332871", "0.63319576", "0.63160896", "0.6298173", "0.6288608", "0.6281791", "0.6281541", "0.62244886", "0.62209094", "0.6214617", "0.6212585", "0.62081593", "0.6205941", "0.6202451", "0.6197122", "0.61894435", "0.6188655", "0.6181698", "0.61808264", "0.61808264", "0.61751956", "0.61664146", "0.61606634", "0.6157877", "0.6156016", "0.61443764", "0.61369014", "0.6126348", "0.61059916", "0.61056066", "0.6097476", "0.6087771", "0.6087761", "0.607833", "0.60718113", "0.6069781", "0.60620373", "0.6059104", "0.6051033", "0.6019564", "0.6018969", "0.60147536", "0.60137653", "0.60126585", "0.60099226", "0.60005015", "0.59979194", "0.59959155", "0.5987092", "0.5981177", "0.5979712", "0.597819", "0.59778106", "0.5973883", "0.59700257", "0.59698594", "0.5968588", "0.5964533", "0.5964533", "0.59529585", "0.59528255", "0.5952808", "0.5947635", "0.5943158", "0.59395826", "0.5937117", "0.5928321", "0.59282935", "0.5926861", "0.5924929", "0.5924905", "0.59214455" ]
0.0
-1
Inserts a new Node at front of the list.
public void push(int new_data) { Node new_node = new Node(new_data); new_node.next = head; head = new_node; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void insertAtFront(T insertItem) {\n\t\tNode<T> node = new Node<T>(insertItem);\n\t\t\n\t\tif (isEmpty()) // firstNode and lastNode refer to same object\n\t\t\tfirstNode = lastNode = node;\n\t\telse { // firstNode refers to new node\n\t\t\tnode.nextNode = firstNode;\n\t\t\tfirstNode = node;\n\t\t\t// you can replace the two previous lines with this line: firstNode\n\t\t\t// = new ListNode( insertItem, firstNode );\n\t\t}\n\t\tsize++;\n\t}", "public void insertAtFront(T data) {\n \t\n \t//create a new node\n Node<T> aNode = new Node<>(data);\n \n //if list is empty we assign a new node as First and Last node;\n if (isEmpty()) { \t\n firstNode = lastNode = aNode;\n } \n //if list is not empty we use setNext method of Node class to link this new node with first\n //other words: firtNode is not first anymore, first node is just new made\n //and AFTER this we say that first node is new node we just made\n else { \n aNode.setNext(firstNode);\n firstNode = aNode;\n }\n }", "public void insertFront(Node newNode) {\n\t\tif(size == 0) {\n\t\t\thead = newNode;\n\t\t\ttail = newNode;\n\t\t} else {\n\t\t\thead.prev = newNode;\n\t\t\tnewNode.prev = null;\n\t\t\tnewNode.next = head;\n\t\t\thead = newNode;\n\t\t}\n\n\t\tsize++;\n\t}", "public Node insertBefore(Node node);", "void insertBefore(Object data)\n\t{\n\t\tNode temp = new Node(data);\n\t\tif (length == 0) \n\t\t{\n\t\t\tthrow new RuntimeException(\"List Error: cannot call insertBefore() on empty List\");\n\t\t}\n\t\tif (cursor == null) \n\t\t{\n\t\t\tthrow new RuntimeException(\"List Error: cannot call insertBefore() on cursor that is off the list\");\n\t\t}\n\t\tif (cursor == front) \n\t\t{\n\t\t\tprepend(data); //if the cursor is at the front of the list, you can just call prepend since you will be inserting the element before the front element \n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\ttemp.prev = cursor.prev; //the new node temp's previous becomes the cursors previous\t\n temp.next = cursor; //the new node temp's next becomes the cursor\n cursor.prev.next = temp; //cursor's previous next element becomes temp\n cursor.prev = temp; //cursor's previous becomes temp\n length++;\n index++;\n\t\t}\n\t}", "private void addToFront(ListNode node) {\n\t // new node inserted into the linked list\n\t node.prev = head;\n\t node.next = head.next;\n\n\t \n\t head.next.prev = node;\n\t head.next = node;\n\t }", "@Test\n\tpublic void addNodeAtFront() {\n\t\tSystem.out.println(\"Adding a node at the front of the list\");\n\t\tdll.push(3);\n\t\tdll.push(2);\n\t\tdll.push(1);\n\t\tdll.print();\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 addToFront(T elem) {\n\t\tNode newNode = new Node();\n\t\tnewNode.value = elem;\n\t\tnewNode.next = first;\n\t\tfirst = newNode;\t\n\t}", "public void insertFirst(int data) { // insert at front of list\n\t\tNode newNode = new Node(data); // creation of new node.\n\t\tif (first == null) // means LinkedList is empty.\n\t\t\tlast = newNode; // newNode <--- last\n\t\telse\n\t\t\tfirst.previous = newNode; // newNode <-- old first\n\t\tnewNode.next = first; // newNode --> old first\n\t\tfirst = newNode; // first --> newNode\n\t}", "public void addFrontNode(T a) {\r\n head = new ListNode(a, head);\r\n }", "@Override\n public void prepend(T elem) {\n if(isEmpty()) { //if list is empty\n first = new DLNode(elem, null, null);//new element created, there's nothing before and after it yet\n last = first;\n }\n else{ //list in not empty\n \n first = new DLNode(elem, null, first); //new element goes to the front, there nothing before it, the old first element is after it\n \n first.next.prev = first; //ensure that reference to our first element is pointing to the new first element\n }\n \n }", "void prepend(Object data)\n\t{\n\t\tNode temp = new Node(data);\n\t\tif (front == null) \n\t\t{\n\t\t\tfront = back = temp; // if the list is empty the node will be the first node in the list making it the front and back node\n\t\t\tlength++;\n index = 0; //added because i failed the test scripts because i wasn't managing the indicies\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfront.prev=temp; //the temp node is inserted before the front\n\t\t\ttemp.next=front; //the node after temp will be the front because temp was inserted before the front\n\t\t\tfront = temp; //the front is now the temp node\n\t\t\tlength++;\n index++;//added because i failed the test scripts because i wasn't managing the indicies\n\t\t}\n\t}", "public Node<T> addBefore(Node<T> listNode, T t) \r\n {\r\n Node<T> beforeNewNode = listNode.prev;\r\n Node<T> newNode = new Node<T>(t, beforeNewNode, listNode);\r\n beforeNewNode.next = newNode;\r\n listNode.prev = newNode;\r\n size++;\r\n return newNode;\r\n }", "public void addToFront(T value) {\n\t\tstart = new Node<T>(value, start);\n\t}", "@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 }", "@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}", "void pushFront(T value) throws ListException;", "private void prependNode(Node prependNode) {\n\t\tNode currentNode = head;\n\t\tif(currentNode==null) {\n\t\t\thead = prependNode;\n\t\t} else {\n\t\t\tprependNode.next = currentNode;\n\t\t\thead = prependNode;\n\t\t}\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 addToFront(T data){\n Node<T> temp = new Node<>();\n\n temp.setData(data);\n temp.setNext(head.getNext());\n\n head.setNext(temp);\n }", "private void addToFront(Node node) {\n \n if(head == null) {\n head = node;\n tail = node;\n } \n else {\n node.next = head;\n head.prev = node;\n head = node;\n }\n }", "public void addFront(E d) {\n\t\t// make new node to contain d\n\t\tListNode<E> node = new ListNode<E>(d);\n\t\tif (this.head == null) {\n\t\t\t// the list is empty so make the head point at the node\n\t\t\tthis.head = node;\n\t\t\tthis.last = node;\n\t\t} else {\n\t\t\t// the list it not empty, so the old head's next points at the node\n\t\t\t// the head points at the node\n\t\t\tnode.next = this.head;\n\t\t\tthis.head = node;\n\t\t}\n\t\tthis.size++;\n\t}", "public void addBefore(Node node){\n node.next = head;\n head = node;\n count.incrementAndGet();\n }", "public void insertAtBeginning(int data) {\r\n if(head==null) {\r\n head = new ListNode(data);\r\n return;\r\n }\r\n ListNode new_node = new ListNode(data);\r\n new_node.next=head;\r\n head=new_node;\r\n }", "@Override\n public void addBefore(E element) {\n Node<E> newNodeList = new Node<>(element, cursor);\n\n if (prev == null) {\n head = newNodeList;\n cursor = newNodeList;\n } else {\n prev.setNext(newNodeList);\n cursor = newNodeList;\n }\n\n size++;\n }", "public void addToFront(T element){\n LinearNode<T> node = new LinearNode<T>(element);\n node.setNext(front);\n front = node;\n // modify rear when adding to an empty list\n if (isEmpty()){\n rear = node;\n }\n count++;\n }", "public void addFront (E val) {\n\t\tNode <E> n = new Node(val, head);\n\t\thead = n;\n\t\tcount ++;\n\t}", "@Test\n\tpublic void addNodeBeforeGiveNode() {\n\t\tSystem.out.println(\"Given a node as prev_node, insert a new node Before the given node \");\n\t\tdll.push(4);\n\t\tdll.push(3);\n\t\tdll.push(1);\n\t\tdll.InsertBefore(dll.head.next, 2);\n\t\tdll.print();\n\t}", "static ListNode insertAtBeginning(ListNode head, int data) {\n\n ListNode newNode = new ListNode(data);\n\n if (head == null) {\n return newNode;\n }\n\n newNode.next = head;\n head = newNode;\n\n return head;\n }", "private void addNodeAtTheBeginning(int data) {\n ListNode newNode = new ListNode(data);\n if (head == null) {\n head = newNode;\n return;\n }\n newNode.next = head;\n head = newNode;\n }", "public void insertAtBeginning(int data) {\r\n //creating node\r\n Node node = new Node(data);\r\n //setting the next reference of node to refer to head or start of list\r\n node.setNext(head);\r\n // setting the head to refer node\r\n head = node;\r\n }", "@Override\n public void insertAtBeginning(T value) {\n Node<T> new_node = new Node<>(value);\n new_node.next = start;\n start = new_node;\n }", "private void addToFront(ListNode node) {\n node.prev = head;\n node.next = head.next;\n \n //wire the head next prev to node and the connect head to node\n head.next.prev = node;\n head.next = node;\n }", "public void bringToFront(int index) {\n\t\tif (index<this.size()){\n\t\t\tNode front = this.head;\n\t\t\tNode oneBack = new Node(\"\");\n\t\t\tfor (int counter=0; counter < index; counter++){\n\t\t\t\toneBack = front;\n\t\t\t\tfront = front.next;\n\t\t\t}\n\t\t\toneBack.next=front.next;\n\t\t\tfront.next = head;\n\t\t\thead = front;\n\t\t}\n\t}", "void prepend(int element) {\n Node newHead = new Node(element,head);\n head = newHead;\n }", "@Override\n public void prepend(T element){\n if(isEmpty()){\n add(element);\n } else{\n this.first = new DLLNode<T>(element, null, this.first);\n this.first.successor.previous = this.first;\n }\n }", "@Override\n\tpublic void prepend(Object data) {\n\t\tNode newNode = new Node(data);\n\t\tnewNode.setNext(this.head);\n\t\thead = newNode;\n\t\tsize++;\n\n\t}", "private void addNodeBefore(SinglyLinkedList.Node<E> node, int idx) throws IndexOutOfBoundsException {\n if (idx == 0) {\n node.next = head;\n head = node;\n\n len += 1;\n return;\n }\n\n addNodeAfter(node, idx - 1);\n }", "private void prepend(T t) {\n Node<T> n = new Node<T>();\n n.data = t;\n n.next = head;\n head = n;\n }", "public void addFront(int data) //O(1)\n\t{\n\t\tSinglyLinkedListNode node = new SinglyLinkedListNode();\n\t\tnode.setData(data);\n\t\tif(head == null)\n\t\t{\n\t\t\t head = node;\n\t\t\t node.setNext(null);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tnode.setNext(head);\n\t\t\thead = node;\n\t\t}\n\t}", "public void prepend(final T data) {\n Node<T> newNode = new Node<>(data);\n if (head != null) {\n newNode.setNext(head);\n }\n head = newNode;\n numElement++;\n }", "protected void insertBeginning(T value) {\r\n\t\tthis.getHead().setPrev(new SNode<T>(value, this.getHead().getPrev()));\r\n\t\tthis.size++;\r\n\t}", "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}", "private Node insertBefore(E element, Node node) {\n \treturn new Node(node.pred, element);\n }", "public void addFront(int data) {\n\t\t\tNode newNode = new Node(data); \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t//check if head...\r\n\t\t\tif(head == null) {\r\n\t\t\t\thead = newNode;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Move the next pointer of new node to head\r\n\t\t\tnewNode.next = head;\r\n\t\t\t\r\n\t\t\t// assign head to new node \r\n\t\t\thead = newNode;\r\n\t\t}", "public void insertAtBeginning(int element) {\n\t\thead = new Node(element, head);\n\t}", "public void insertAtStart(int data) {\n Node node = new Node();\n node.data =data;\n node.next=null;\n node.next=head;\n head=node;\n }", "public boolean insertFront(int value) {\n if (cnt == size)\n return false;\n Node node = new Node(value);\n if (head == null) {\n head = node;\n tail = node;\n node.pre = node;\n node.next = node;\n } else {\n node.next = head;\n node.pre = head.pre;\n head.pre.next = node;\n head.pre = node;\n head = node;\n }\n cnt++;\n return true;\n }", "private void addFront(String x)\n {\n head = new Node(x, head);\n if (tail == null)\n tail = head;\n\n size++;\n }", "public void pushFront(String value)\n {\n\tStringListNode node = new StringListNode(value);\n\tnode.next = head;\n\tif (null == head) {\t// the list was empty\n\t tail = node;\n\t}\n\telse {\n\t head.prev = node;\n\t}\n\thead = node;\n }", "public void addFirst(E e) { // adds element e to the front of the list\n // TODO\n if (size == 0) {\n tail = new Node<>(e, null);\n tail.setNext(tail);\n } else {\n Node<E> newest = new Node<>(e, tail.getNext());\n tail.setNext(newest);\n }\n size++;\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 insertAtFirst(int data)\r\n\t{\r\n\t\tSystem.out.println(\"iam inserting at front :\");\r\n\t\tNode new_front = new Node(data);\r\n\t\tnew_front.right = root;\r\n\t\troot = new_front;\r\n\t}", "public void insertFirst(T data ) {\n\n\t\tNode<T> newNode = new Node<T>(data);\n\t\tnewNode.next = head;\n\t\thead = newNode;\n\t}", "public void addToFront(T data) {\n if (data == null) {\n throw new IllegalArgumentException(\"You can't insert null \"\n + \"data in the structure.\");\n }\n if (size == 0) {\n head = new DoublyLinkedListNode<T>(data);\n tail = head;\n size += 1;\n } else {\n DoublyLinkedListNode<T> newnode =\n new DoublyLinkedListNode<T>(data);\n newnode.setNext(head);\n head.setPrevious(newnode);\n head = newnode;\n size += 1;\n }\n }", "public void addAtStart(T value) {\n Node<T> newNode = new Node<>();\n newNode.data = value;\n newNode.next = head;\n head = newNode;\n }", "private static void insertAtHead(int data) {\n\tNode newnode=new Node(data);\n\tnewnode.next=head;\n\tnewnode.prev=null;\n\tif(head!=null)\n\t\thead.prev=newnode;\n\thead=newnode;\n\t\n}", "public void insertAtFront(int data){\n CircNode newLink = new CircNode(data);\n if(size==0){\n head = newLink;\n tail = newLink;\n newLink.next = head;\n }\n else{\n CircNode temp = head;\n newLink.next = temp;\n head = newLink;\n tail.next = head;\n }\n size++;\n }", "public void prependNode(int data) {\n\t\tNode currentNode = headNode;\n\t\tif(currentNode == null) {\n\t\t\tNode newNode = new Node(data);\n\t\t\theadNode = newNode;\n\t\t} else {\n\t\t\tif(currentNode!=null) {\n\t\t\t\tNode newNode = new Node(data);\n\t\t\t\theadNode = newNode;\n\t\t\t\tnewNode.setNextNode(currentNode);\n\t\t\t}\n\t\t}\n\t}", "public void prepend(Integer data) {\n\t\tListNode tmp = new ListNode(data, head);\n\n\t\tif (null != this.head) {\n\t\t\t// asign new head:make tmp the new head:Step2\n\t\t\tthis.head = tmp;\n\t\t} else {\n\t\t\t// but if list is empty then the temp is the only element and is new\n\t\t\t// tail as wells as head[see next statement executed]\n\t\t\tthis.tail = tmp;// tmp is new tail\n\t\t}\n\t\tthis.head = tmp;\n\t\tlength++;\n\t}", "private void addBefore(Node n, E x) {\n\n\t\tNode newNode = new Node(x, n);\n\n\t\tNode q = mHead;\n\n\t\tNode p = mHead.next;\n\n\t\twhile (p != n) {\n\t\t\tq = p;\n\t\t\tp = p.next;\n\t\t}\n\n\t\tq.next = newNode;\n\n\t}", "public void insertAtBegin(int data){\n Node newNode = new Node(data);\n if (head == null){\n head = newNode;\n }else {\n Node node = head;\n head = newNode;\n newNode.next = node;\n node.prev = newNode;\n }\n\n }", "Node insertBefore(Node newChild, Node refChild);", "private void insertFirst(T data){\n Node<T> node = new Node<T>(data);\n this.begin = node;\n this.end = node;\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 push_front(T element);", "private Node prepend(E element) {\n \treturn new Node(sentinel, element);\n }", "public synchronized void insertAtBegin(ListNode tmp) {\n\t\ttmp.setNext(head);\n\t\tif (null != this.head) {\n\t\t\t// asign new head:make tmp the new head:Step2\n\t\t\tthis.head = tmp;\n\t\t} else {\n\t\t\t// but if list is empty then the temp is the only element and is new\n\t\t\t// tail as wells as head[see next statement executed]\n\t\t\tthis.tail = tmp;// tmp is new tail\n\t\t}\n\t\tthis.head = tmp;\n\t\tlength++;\n\t}", "public void addAtFront(String str) {\n newNode = new Node(str);\n next = newNode.getNext();\n head = newNode;\n }", "public void addAtStart(T v) {\n if (this.head == null) {\n add(v);\n return;\n };\n\n Node node = new Node(v, this.head);\n this.head = node;\n this.length++;\n }", "public Node<E> addToBeginning(Node<E> node){\n node.setNext(head.getNext());\n head.getNext().setPrevious(node);\n node.setPrevious(head);\n head.setNext(node);\n size++;\n return node;\n }", "public void insertFirst( T data )\n {\n //create a new linkedListNode\n LinkedListNode<T> newNode = new LinkedListNode<T>();\n //assign that node some data\n newNode.setData(data);\n //point new node where current pointer is\n newNode.setNext(head);\n //set head pointer to this new node\n this.head = newNode;\n \n }", "public void addAtStart(Node node) {\n if(this.head == null) {\n add(node);\n return;\n };\n\n node.next = this.head;\n this.head = node;\n this.length++;\n }", "public void insertAtStart(int data) {\n\t\tNode node = new Node();\n\t\tnode.data = data;\n\t\tnode.next = null;\n\t\tnode.next = head;\n\t\thead = node;\n\t}", "public void insertBefore(int value, int newVal) {\n try {\n ListNode nodeValue = new ListNode(value);\n ListNode newValue = new ListNode(newVal);\n ListNode current = this.root;\n\n while (current.data != value) {\n current = current.next;\n }\n newValue.next = current.next;\n current.next = newValue;\n } catch (NullPointerException e) {\n System.out.println(\"You have reached the end of the list.\");\n }\n }", "public void addAtStart(T data) {\n Node<T> newNode = new Node<T>();\n newNode.data = data;\n\n newNode.next = head;\n head = newNode;\n size++;\n }", "public void addFirst(Object e) {\n if(head == null) {\n tail = head = new Node(e, null, null);\n return;\n }\n\n Node n = new Node(e, null, head);\n head.setPrevious(n);\n head = n;\n }", "@Override\r\n public void addFront(T b) {\r\n head = head.addFront(b);\r\n }", "private void InsertAt(IntRepList.OpNode node, IntRepList.OpNode current) {\n current.prev.next = node;\n node.prev = current.prev;\n node.next = current;\n }", "public native VertexList insertBefore(VertexNode target, VertexNode vertex);", "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 insertAtBeginning(String data)\n\t{ \n\t\t\n\t\tNode node=new Node();\n\t\tnode.data = data;\n\t\tnode.next = null;\n\t\t\n\t\tnode.next = head;\n\t\t\n\t\thead =node;\n\t}", "public void insertFirst( T data ) {\n\t\t//make a new node \n\t\tLinkedListNode<T> newNode = new LinkedListNode<T>();\n\t\t///add data to this node\n\t\tnewNode.setData(data);\n\t\t//if the head isn't null\n\t\tif(head != null){\n\t\t\t//insert the new node at the head\n\t\t\tinsertFirstNode(newNode);\n\t\t}\n\t\t//otherwise\n\t\telse{\n\t\t\t//the head is the new node\n\t\t\thead = newNode;\n\t\t}\n\t}", "private void moveToHead(ListNode node) { \n\t removeFromList(node);\n\t addToFront(node);\n\t }", "public void insertFirst( T data ) \n {\n DLLNode newNode;\n\n if(isEmpty()){\n \t newNode = new DLLNode(data, null, null);\n \t head = newNode;\n \t tail = newNode;\n }\n \n else{\n \t \n \t newNode = new DLLNode(data, null, head);\n \t head.prev = newNode;\n \t head = newNode;\n }\n \t \n \n }", "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 }", "public void addFirst(T element)\r\n {\r\n Node<T> newNode = new Node<T>(element);\r\n \r\n if (front == null)\r\n front = rear = newNode;\r\n else\r\n {\r\n newNode.next = front;\r\n front = newNode;\r\n }\r\n numElements++;\r\n }", "public /*@ non_null @*/ JMLListEqualsNode<E> prepend(E item) {\n // cons() handles any necessary cloning\n return cons(item, this);\n }", "public void addBefore(E val, int idx) throws IndexOutOfBoundsException {\n addNodeBefore(new SinglyLinkedList.Node<>(val), idx);\n }", "void addFirst(Key k) {\n\t\tfirstNode = new Node(k, getFirstNode()); // creates new node, pointing to the previous first node and sets it to firstNode\n\t\tif(size++==0) lastNode = firstNode;\n\t}", "public void prepend(int val) {\n int i = -34;\n if(head != null) {\n Node node = head;\n head = new Node();\n\n node.prev = head;\n head.next = node;\n head.val = val;\n }\n else if(head == null) {\n\n head = new Node();\n head.val = val;\n tail = head;\n }\n\n size++;\n }", "public void addtoFront(int tx, int ty, Node current) {\n\tif(board[tx][ty] == '#' || board[tx][ty] == '$') {\n\t tmp = new Node(tx, ty);\n\t tmp.setPrev(current); // For tracing back Nodes\n\t Frontier.enqueue(tmp);\n\t}\n }", "public void addAtFront(double element){\r\n\t head = new DoubleNode(element, head);\r\n\t cursor = head; \r\n\t precursor = null; \r\n\t \r\n }", "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 void insertBefore( DLLNode<T> current, T data ){\n\t\t//UNUSED METHOD.....\n\t\t\n\t\t//create new node that contains data\n\t\tDLLNode<T> newNode = new DLLNode<T>();\n\t\tnewNode.setData(data);\n\t\t\n\t\tnewNode.setNext(current);\n\t\tcurrent.setPrev(newNode);\n\t\thead = newNode;\n\t\t\n\t\t//DL deleted\n//\t\tnewNode.setPrev(current.getPrev());\n//\t\tnewNode.setNext(current);\n//\t\tcurrent.setPrev(newNode);\n//\t\tcurrent.getPrev().setNext(newNode);\n\t\t\n\t\t//increase size by 1\n\t\tsize++;\n\t}", "@Override\n\tpublic void preVisit(ASTNode node) {\n\t\tnodeList.add(node);\n\t}", "public void insert(int value, int pos){\n if (head != null) {\n // Have a first node\n head = head.insert(value,pos);\n } else {\n // List empty\n this.add(value);\n }\n }", "public Node<T> addFirst(T t) { \r\n Node<T> currFirst = sentinel.next;\r\n Node<T> newNode = new Node<T>(t, sentinel, currFirst);\r\n sentinel.next = newNode;\r\n currFirst.prev = newNode;\r\n size++;\r\n return newNode; \r\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 static Node insertFirst(Node head, Node n) {\n if (head == null || n == null) return n;\n n.next = head;\n return n;\n }" ]
[ "0.77055687", "0.7557348", "0.75421846", "0.750921", "0.74947965", "0.741063", "0.73950857", "0.7375097", "0.7315058", "0.7314422", "0.728739", "0.7266867", "0.7262627", "0.7212639", "0.7212253", "0.72048944", "0.7202923", "0.7194186", "0.71732014", "0.7150107", "0.71446306", "0.71354043", "0.7073128", "0.7039347", "0.7013741", "0.70126504", "0.69355017", "0.6905432", "0.6899815", "0.6893053", "0.68812627", "0.68764293", "0.6852762", "0.6852644", "0.68291575", "0.68275714", "0.6825585", "0.6822883", "0.6821328", "0.68101066", "0.6802112", "0.6749537", "0.6723198", "0.6720888", "0.6718838", "0.6713125", "0.6712313", "0.6702989", "0.67027074", "0.66966766", "0.6682679", "0.668134", "0.6677064", "0.6665751", "0.6658674", "0.6657585", "0.66542614", "0.6624744", "0.6615412", "0.66116947", "0.65993553", "0.6598383", "0.6595471", "0.65917236", "0.658269", "0.6567827", "0.6558939", "0.655657", "0.65551865", "0.65292674", "0.65206844", "0.6520269", "0.6500515", "0.6497366", "0.6492297", "0.6479939", "0.6474199", "0.646947", "0.64619434", "0.6445937", "0.644357", "0.6436174", "0.6416876", "0.6415198", "0.64145386", "0.64141357", "0.64093363", "0.6405189", "0.64046496", "0.6402843", "0.63998747", "0.6398078", "0.6395541", "0.6391726", "0.63912636", "0.63886243", "0.6380958", "0.6380707", "0.6379777", "0.63777393", "0.637594" ]
0.0
-1
Inserts a new node after the given prev_node.
public void insertAfter(Node prev_node, int new_data) { if (prev_node == null) { System.out.println("\nThe given previous node cannot be null"); return; } Node new_node = new Node(new_data); new_node.next = prev_node.next; prev_node.next = new_node; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void insert_after(int data, Node prev_node){\n if(prev_node == null){\n System.out.println(\"Given Node is null !\");\n return;\n }\n Node cursor = this.head;\n Node new_node = new Node(data);\n new_node.next = prev_node.next;\n prev_node.next = new_node;\n new_node.prev = prev_node;\n if(new_node.next != null){\n new_node.next.prev = new_node;\n }\n System.out.println(\"Node Added !\");\n this.print_list();\n return;\n }", "public void insertAfter(Node prevNode, E data) {\n if (isNull(prevNode)) {\n System.out.println(\"PrevNode cannot be null\");\n return;\n }\n\n Node<E> node = new Node<>(data);\n node.previous = prevNode;\n node.next = prevNode.next;\n prevNode.next = node;\n if (nonNull(node.next)) {\n node.next.previous = node;\n }\n }", "public void addAfter(Node prevNode , Integer newdata){\n if (prevNode==null){\n return;\n }\n\n Node n = new Node(newdata);\n n.next = prevNode.next;\n prevNode.next = n;\n\n }", "public void InsertAfter(Node prev_Node, int new_data) {\n\t\tif (prev_Node == null) {\n\t\t\tSystem.out.println(\"The given previous node cannot be NULL \");\n\t\t\treturn;\n\t\t}\n\t\tNode new_node = new Node(new_data); //Create a new node with 8 as data.\n\t\tnew_node.next = prev_Node.next;\n\t\tprev_Node.next = new_node;\n\t\tnew_node.prev = prev_Node;\n\t\tif (new_node.next != null)\n\t\t\tnew_node.next.prev = new_node;\n\t}", "@Test\n\tpublic void addNodeAfterGiveNode() {\n\t\tSystem.out.println(\"Given a node as prev_node, insert a new node after the given node \");\n\t\tdll.push(4);\n\t\tdll.push(2);\n\t\tdll.push(1);\n\t\tdll.InsertAfter(dll.head.next, 3);\n\t\tdll.print();\n\t}", "public Node insertAfter(Node node);", "@Test\n\tpublic void addNodeBeforeGiveNode() {\n\t\tSystem.out.println(\"Given a node as prev_node, insert a new node Before the given node \");\n\t\tdll.push(4);\n\t\tdll.push(3);\n\t\tdll.push(1);\n\t\tdll.InsertBefore(dll.head.next, 2);\n\t\tdll.print();\n\t}", "public Node setPrevNode(Node node);", "public void insertAfter(Node node, int data) {\n\t\tif (node == null) {\n\t\t\tSystem.out.println(\"The given previous node cannot be NULL \");\n\t\t\treturn;\n\t\t}\n\t\t/* 2. allocate node 3. put in the data */\n\t\tNode new_node = new Node(data);\n\n\t\t/* 4. Make next of new node as next of prev_node */\n\t\tnew_node.next = node.next;\n\n\t\t/* 5. Make the next of prev_node as new_node */\n\t\tnode.next = new_node;\n\n\t\t/* 6. Make prev_node as previous of new_node */\n\t\tnode.previous = node;\n\n\t\t/* 7. Change previous of new_node's next node */\n\t\tif (new_node.next != null)\n\t\t\tnew_node.next.previous = new_node;\n\t}", "public void setPrevNode(Node<T> prevNode) {\n\t\tthis.prevNode = prevNode;\n\t}", "public Node insertBefore(Node node);", "Node insertBefore(Node newChild, Node refChild);", "public void setPrev(Node<T> prev) {\n\t\tthis.prev = prev;\n\t}", "private void InsertAt(IntRepList.OpNode node, IntRepList.OpNode current) {\n current.prev.next = node;\n node.prev = current.prev;\n node.next = current;\n }", "public void insert(Node newNode)\r\n {\n newNode.prev = prev;\r\n prev.next = newNode;\r\n prev = newNode;\r\n System.out.println(\"Node with Traffic Data \" + Arrays.toString(newNode.trafficEntry.toStringArray()) + \" Inserted before Node with Traffic Data \" + Arrays.toString(trafficEntry.toStringArray()));\r\n }", "public void setPrev(Node prev)\r\n\t{\r\n\t\tthis.prev = prev;\r\n\t}", "public void setPrev(Node prev) {\n this.prev = prev;\n }", "public void insertAfterCurrent(T aData) {\r\n\t\t// Can't insert if there is nothing at current\r\n\t\tif (curr == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tListNode newNode = new ListNode(aData, curr.link);\r\n\t\tif (curr != null && prev == null) { // at the head\r\n\t\t\thead.link = newNode; // curr.link = newNode;\r\n\t\t} else if (curr != null && prev != null) { // If it's in the middle\r\n\t\t\tcurr.link = newNode;\r\n\t\t}\r\n\r\n\t}", "public void insertAfterCurernt(T aData){\r\n if(curr == null){\r\n return;\r\n }\r\n curr.link = new ListNode(aData,curr.link);\r\n }", "public void insertAtBack(L insertItem){\n\t\tListNode node = new ListNode(insertItem);\n\t\tif(isEmpty()) //firstNode and lastNode refer to same Object\n\t\tfirstNode = lastNode = node;\n\t\telse{ //lastNode's nextNode refers to new node\n\t\t\tlastNode.nextNode = node;\n\t\t\tlastNode = node;\n\t\t\t//you can replace the two previous lines with this line: lastNode = lastNode.nextNode = new ListNode( insertItem );\n\t\t}\n\t}", "public void insertAfter(ListNode next){\n ListNode cur = this.next;\n this.next = next;\n next.next = cur;\n }", "public void setPrevNode(int node) {\n\t\tthis.previousNode = node;\n\t}", "public void insertAtBack(T insertItem) {\n\t\tNode<T> node = new Node<T>(insertItem);\n\t\t\n\t\tif (isEmpty()) // firstNode and lastNode refer to same Object\n\t\t\tfirstNode = lastNode = node;\n\t\telse { // lastNode's nextNode refers to new node\n\t\t\tlastNode.nextNode = node;\n\t\t\tlastNode = node;\n\t\t\t// you can replace the two previous lines with this line: lastNode =\n\t\t\t// lastNode.nextNode = new ListNode( insertItem );\n\t\t}\n\t\tsize++;\n\t}", "public void setPrev(DNode newPrev) { prev = newPrev; }", "public void addBefore(Node node){\n node.next = head;\n head = node;\n count.incrementAndGet();\n }", "void insert(ListNode pNode) {\n\t\tpPrev = pNode.pPrev;\r\n\t\tpNext = pNode;\r\n\t\tpNode.pPrev.pNext = this;\r\n\t\tpNode.pPrev = this;\r\n\t}", "public void setPrevious(Node<T> previous) {\r\n this.previous = previous;\r\n }", "private void prependNode(Node prependNode) {\n\t\tNode currentNode = head;\n\t\tif(currentNode==null) {\n\t\t\thead = prependNode;\n\t\t} else {\n\t\t\tprependNode.next = currentNode;\n\t\t\thead = prependNode;\n\t\t}\n\t}", "public native VertexList insertAfter(VertexNode target, VertexNode vertex);", "private Node insertBefore(E element, Node node) {\n \treturn new Node(node.pred, element);\n }", "private void addBetween(E e, Node<E> previous, Node<E> after) {\n\t\tNode<E> newest = new Node<E>(e, previous, after);\n\t\tprevious.setNext(newest);\n\t\tafter.setPrev(newest);\n\t\tsize++;\n\t}", "public void setPrevious(DoubleNode<T> node)\n {\n\n previous = node;\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 }", "private Node insert(Node curr, Node node) {\n\t\tif(curr==null){\n\t\t\tcurr = node;\n\t\t\treturn curr;\n\t\t}\n\t\telse if(curr.getId() > node.getId()){\n\t\t\t curr.setLeft(insert(curr.getLeft(),node));\n\t\t}\n\t\telse if(curr.getId() < node.getId()){\n\t\t\t curr.setRight(insert(curr.getRight(),node));\n\t\t}\n\t\treturn curr;\n\t}", "void sortedInsert(Node newnode) {\r\n\t\tif (sorted == null || sorted.data >= newnode.data) {\r\n\t\t\tnewnode.next = sorted;\r\n\t\t\tsorted = newnode;\r\n\t\t} else {\r\n\t\t\tNode current = sorted;\r\n\t\t\t/* Locate the node before the point of insertion */\r\n\t\t\twhile (current.next != null && current.next.data < newnode.data) {\r\n\t\t\t\tcurrent = current.next;\r\n\t\t\t}\r\n\t\t\tnewnode.next = current.next;\r\n\t\t\tcurrent.next = newnode;\r\n\t\t}\r\n\t}", "public void setPrevious(DoublyLinkedNode<E> prev) {\n this.prevNode = prev;\n }", "@Override\r\n\t\tpublic Node insertBefore(Node newChild, Node refChild) throws DOMException\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}", "private void addNode(Node node) {\n node.prev = fakeHead;\n node.next = fakeHead.next;\n \n fakeHead.next.prev = node;\n fakeHead.next = node;\n }", "public void insertAfterData(int data,int newData){\n Node node = head;\n Node newNode = new Node(newData);\n while (node != null && node.data != data){\n node = node.next;\n }\n\n if (node == null){\n System.out.println(\"Not possible\");\n return;\n }\n\n Node tempNode = node.next;\n if (tempNode == null){\n node.next = newNode;\n newNode.prev = node;\n }else {\n node.next = newNode;\n newNode.next = tempNode;\n newNode.prev = node;\n tempNode.prev = newNode;\n }\n }", "public void insertAfter( DLLNode<T> current, T data ){\n\t\t//create new node that contains data\n\t\tDLLNode<T> newNode = new DLLNode<T>();\n\t\tnewNode.setData( data );\n\t\t\n\t\t//DL's code\n\t\tDLLNode<T> nextNode = current.next;\n\t\t\n\t\tnewNode.setPrev( current );\n\t\t//DL's code\n\t\tnewNode.setNext( nextNode );\n\t\t\n\t\t//DL's code\n\t\tif (nextNode != null)\n\t\t\tnextNode.setPrev(newNode);\t\t\t\n\t\t\t//current.getPrev().setNext( newNode );\n\t\t\n\t\t//DL's code\n\t\tcurrent.setNext(newNode);\n\t\t\n\t\t//increase size by 1\n\t\tsize++;\n\t}", "void reorderNode(LinkedEntries.LinkNode insert, LinkedEntries.LinkNode before) {\n removeNode(insert);\n if (before == null) {\n addNode(insert, getHeader());\n } else {\n addNode(insert, before);\n }\n }", "Optional<Node<UnderlyingData>> prevNode(Node<UnderlyingData> node);", "private void addAfter(Node n, String data)\n {\n Node next = n.next;\n n.next = new Node(data, next);\n size++;\n }", "void insertAfter(Object data)\n\t{\n\t\tNode temp = new Node(data);\n\t\tif (length==0) \n\t\t{\n\t\t\tthrow new RuntimeException(\"List Error: cannot call insertAfter() on empty List\");\n\t\t}\n\t\tif (cursor == null) \n\t\t{\n\t\t\tthrow new RuntimeException(\"List Error: cannot call insertAfter() on cursor that is off the list\");\n\t\t}\n\t\tif (cursor == back) \n\t\t{\n\t\t\tappend(data); //if the cursor is at the back of the list then you can just all append since you will be inserting the element into the back element\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\ttemp.next = cursor.next; //the new node temp's next will be the cursor's next\n\t\t\ttemp.prev = cursor; //the new node temp's previous will become the cursor\n\t\t\tcursor.next.prev = temp; //cursor's next previous element becomes temp\n\t\t\tcursor.next = temp; //cursor's next becomes temp\n\t\t\tlength++;\n\t\t}\n\t}", "public void setPrev(SlideNode node) {\n\t\tthis.prev = node;\n\t}", "public static native Element insertAfter(Element elem, Element sibling)/*-{\r\n\t\treturn $wnd.Ext.DomHelper.insertAfter(elem, sibling);\r\n\t}-*/;", "public void insert(Node n);", "public Node setNextNode(Node node);", "private void recursiveInsert(eNode head_ref, eNode toInsert)\r\n {\r\n if(head_ref.getNext() == null)\r\n head_ref.setNext(toInsert);\r\n else\r\n recursiveInsert(head_ref.getNext(), toInsert);\r\n }", "private void addNode(DLinkedNode node) {\n\t\tnode.prev = head;\n\t\tnode.next = head.next;\n\n\t\thead.next.prev = node;\n\t\thead.next = node;\n\t}", "public Node appendNode(Node node);", "public void addNodeAfterThis( int newdata ) {\r\n\t\tlink = new IntNode( newdata, link );\r\n\t}", "private void addNode(DLinkedNode node) {\n\t\t\tnode.pre = head;\n\t\t\tnode.post = head.post;\n\n\t\t\thead.post.pre = node;\n\t\t\thead.post = node;\n\t\t}", "private void addToFront(ListNode node) {\n\t // new node inserted into the linked list\n\t node.prev = head;\n\t node.next = head.next;\n\n\t \n\t head.next.prev = node;\n\t head.next = node;\n\t }", "public void setPrevious(Node p) {\n previous = p;\n }", "public void addNode(Node newNode){\r\n\t\t\tNode temp = this.head;\r\n\t\t\tnewNode.prev = null;\r\n\t\t\tif(this.head == null){\r\n\t\t\t\tthis.head = newNode;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\twhile(temp.next!=null){\r\n\t\t\t\t\ttemp = temp.next;\r\n\t\t\t\t}\r\n\t\t\t\ttemp.next = newNode;\r\n\t\t\t\tnewNode.prev = temp;\r\n\t\t\t}\r\n\t\t}", "public void insertBefore( DLLNode<T> current, T data ){\n\t\t//UNUSED METHOD.....\n\t\t\n\t\t//create new node that contains data\n\t\tDLLNode<T> newNode = new DLLNode<T>();\n\t\tnewNode.setData(data);\n\t\t\n\t\tnewNode.setNext(current);\n\t\tcurrent.setPrev(newNode);\n\t\thead = newNode;\n\t\t\n\t\t//DL deleted\n//\t\tnewNode.setPrev(current.getPrev());\n//\t\tnewNode.setNext(current);\n//\t\tcurrent.setPrev(newNode);\n//\t\tcurrent.getPrev().setNext(newNode);\n\t\t\n\t\t//increase size by 1\n\t\tsize++;\n\t}", "private void addNode(DLinkedNode node){\n node.pre = head;\n node.post = head.post;\n\n head.post.pre = node;\n head.post = node;\n }", "public void insertAfter(Object item) {\n this.next = new SListNode(item, next);\n }", "public void addSiblingAfterNode(Node siblingNode, String nodeToAdd) throws Exception {\n if (siblingNode == null || nodeToAdd == null)\n return;\n if (fileContents == null) {\n fileContents = convertFileToStringArray(m_file);\n }\n\n Integer endTagLineNumber = getEndTagLineNumber(siblingNode);\n\n String endLine = fileContents[endTagLineNumber - 1];\n String newLine = endLine + getIndentation(siblingNode) + nodeToAdd + FILE_NEW_LINE;\n if (bDebug) {\n System.out.println(\"Old line: \" + endLine);\n System.out.println(\"New line: \" + newLine);\n }\n fileContents[endTagLineNumber - 1] = newLine;\n\n }", "public void insertAtFront(T insertItem) {\n\t\tNode<T> node = new Node<T>(insertItem);\n\t\t\n\t\tif (isEmpty()) // firstNode and lastNode refer to same object\n\t\t\tfirstNode = lastNode = node;\n\t\telse { // firstNode refers to new node\n\t\t\tnode.nextNode = firstNode;\n\t\t\tfirstNode = node;\n\t\t\t// you can replace the two previous lines with this line: firstNode\n\t\t\t// = new ListNode( insertItem, firstNode );\n\t\t}\n\t\tsize++;\n\t}", "public void insertFront(Node newNode) {\n\t\tif(size == 0) {\n\t\t\thead = newNode;\n\t\t\ttail = newNode;\n\t\t} else {\n\t\t\thead.prev = newNode;\n\t\t\tnewNode.prev = null;\n\t\t\tnewNode.next = head;\n\t\t\thead = newNode;\n\t\t}\n\n\t\tsize++;\n\t}", "public Node<T> addBefore(Node<T> listNode, T t) \r\n {\r\n Node<T> beforeNewNode = listNode.prev;\r\n Node<T> newNode = new Node<T>(t, beforeNewNode, listNode);\r\n beforeNewNode.next = newNode;\r\n listNode.prev = newNode;\r\n size++;\r\n return newNode;\r\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 }", "private static void insertAtEnd(int data) {\n\tNode newnode=new Node(data);\n\tnewnode.next=null;\n\tNode n=head;\n\tNode last=head;\n\twhile(last.next!=null)\n\t{\n\t\tlast=last.next;\n\t}\n\tlast.next=newnode;\n\tnewnode.prev=last;\n\treturn;\n\t\n}", "private void addElementNode(BaleElement nbe,int prior)\n{\n if (nbe.getBubbleType() != BaleFragmentType.NONE) {\n BaleElement.Branch bbe = (BaleElement.Branch) nbe;\n if (cur_parent == root_element) {\n\t int j = -1;\n\t for (int i = new_children.size() - 1; i >= 0; --i) {\n\t BaleElement celt = new_children.get(i);\n\t if (celt.isComment() || celt.isEmpty()) j = i;\n\t else break;\n\t }\n\t if (j >= 0) {\n\t while (j < new_children.size()) {\n\t BaleElement celt = new_children.remove(j);\n\t bbe.add(celt);\n\t }\n\t }\n }\n else {\n\t int j = -1;\n\t for (int i = cur_parent.getElementCount() - 1; i >= 0; --i) {\n\t BaleElement celt = cur_parent.getBaleElement(i);\n\t if (celt.isComment() || celt.isEmpty()) j = i;\n\t else break;\n\t }\n\t if (j >= 0) {\n\t while (j < cur_parent.getElementCount()) {\n\t BaleElement celt = cur_parent.getBaleElement(j);\n\t cur_parent.remove(j,j);\n\t bbe.add(celt);\n\t }\n\t }\n }\n }\n else if (nbe.isComment() && prior > 0 && cur_parent != root_element) {\n BaleElement.Branch bbe = (BaleElement.Branch) nbe;\n int n = cur_parent.getElementCount();\n prior -= 1;\t\t\t// is this what we want?\n int j = n-prior;\n for (int i = 0; i < prior; ++ i) {\n\t BaleElement celt = cur_parent.getBaleElement(j);\n\t cur_parent.remove(j,j);\n\t bbe.add(celt);\n }\n }\n else if (nbe.isComment() && prior > 0 && cur_parent == root_element) {\n BaleElement.Branch bbe = (BaleElement.Branch) nbe;\n int n = new_children.size();\n int j = n-prior+1;\n for (int i = 0; i < prior-1; ++ i) {\n\t BaleElement celt = new_children.get(j);\n\t new_children.remove(j);\n\t bbe.add(celt);\n }\n }\n\n if (cur_parent == root_element) {\n new_children.add(nbe);\n }\n else {\n cur_parent.add(nbe);\n }\n}", "public void insertRight(Node node, Node newNode) {\n\t\tif(node == tail) {\n\t\t\tthis.insertRear(newNode);\n\t\t} else {\n\t\t\tnewNode.prev = node;\n\t\t\tnewNode.next = node.next;\n\n\t\t\tnode.next.prev = newNode;\n\t\t\tnode.next = newNode;\n\n\t\t\tsize++;\n\t\t}\n\t}", "public static native Element insertBefore(Element elem, Element sibling)/*-{\r\n\t\treturn $wnd.Ext.DomHelper.insertBefore(elem, sibling);\r\n\t}-*/;", "public void insertAfter(String insertData, String findData) {\n\t\t// write you code for insertAfter using the specification above\n\t\tNode compare = new Node(findData);\n\t\tNode nodref = head;\n\t\twhile (nodref != null){\n\t\t\tif (nodref.equals(compare)){\n\t\t\t\tNode adder = new Node(insertData);\n\t\t\t\tadder.next = nodref.next;\n\t\t\t\tnodref.next = adder; \n\t\t\t\tnumElements++;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tnodref = nodref.next;\n\t\t}\n\t\treturn;\n\t}", "protected void linkBeforeNode(Node<U> newNode, Node<U> node) {\n\t\t\tmLength++;\n\t\t\tif (mHead == null) {\n\t\t\t\tmHead = newNode;\n\t\t\t\tmTail = newNode;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (node == null) {\n\t\t\t\tnode = mHead;\n\t\t\t}\n\t\t\tif (node == mHead) {\n\t\t\t\tmHead = newNode;\n\t\t\t}\n\n\t\t\tnewNode.setNext(node);\n\t\t\tif (node.getPrev() != null) {\n\t\t\t\tnode.getPrev().setNext(newNode);\n\t\t\t}\n\t\t\tnewNode.setPrev(node.getPrev());\n\t\t\tnode.setPrev(newNode);\n\t\t}", "public void insert(TreeNode insertNode) {\n\t\tif(root == null) {\n\t\t\troot = insertNode; \n\t\t\tlength++;\n\t\t\treturn;\n\t\t}\n\n\t\tTreeNode currentNode = root; \n\n\t\twhile(true) {\n\t\t\tif(insertNode.getData() >= currentNode.getData()) {\n\t\t\t\tif(currentNode.getRightChild() == null) {\n\t\t\t\t\tcurrentNode.setRightChild(insertNode);\n\t\t\t\t\tlength++;\n\t\t\t\t\treturn;\n\t\t\t\t} else {\n\t\t\t\t\tcurrentNode = currentNode.getRightChild();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif(currentNode.getLeftChild() == null) {\n\t\t\t\t\tcurrentNode.setLeftChild(insertNode);\n\t\t\t\t\tlength++;\n\t\t\t\t\treturn;\n\t\t\t\t} else {\n\t\t\t\t\tcurrentNode = currentNode.getLeftChild();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "protected void linkAfterNode(Node<U> newNode, Node<U> node) {\n\t\t\tmLength++;\n\t\t\tif (mTail == null) {\n\t\t\t\tmHead = newNode;\n\t\t\t\tmTail = newNode;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (node == null) {\n\t\t\t\tnode = mTail;\n\t\t\t}\n\t\t\tif (node == mTail) {\n\t\t\t\tmTail = newNode;\n\t\t\t}\n\n\t\t\tnewNode.setNext(node.getNext());\n\t\t\tif (node.getNext() != null) {\n\t\t\t\tnode.getNext().setPrev(newNode);\n\t\t\t}\n\t\t\tnewNode.setPrev(node);\n\t\t\tnode.setNext(newNode);\n\t\t}", "public void insertAfter( long after, T data){\n Node<T> node = new Node<T>(data);\n if(this.isEmpty()|| after == 0) {\n this.insertFirst(data);\n }\n else if(after >= size) { //if new Node inserted in the end of list\n this.insertEnd(data);\n }\n else{\n Node<T> current = begin;\n for(int i = 0; i < after; i++)\n current = current.next;\n node.next = current.next;\n current.next.previous = node;\n node.previous = current;\n current.next = node;\n }\n size++;\n }", "public void setPrev(Node p)\n {\n p.next = this.prev.next;\n p.prev = this.prev;\n this.prev.next = p;\n this.prev = p;\n }", "private void insert(Node<E> x) {\n\t\tlast = last.next = x;\n\t}", "public void setPrev(ListElement<T> prev)\n\t{\n\t\tthis.prev = prev;\n\t}", "public void insertAfter(int data) {\n\n\tpublic int insertAfter(int data) {\n\t\tNode node = new Node(data);\n\n\t\tint flag = 0;\n\t\tNode temp = head;\n\t\tNode prev = head;\n\t\twhile (temp != null) {\n\t\t\tprev = temp;\n\t\t\ttemp = temp.next;\n\t\t\tif (prev.data == 30) {\n\t\t\t\tprev.next = node;\n\t\t\t\tnode.next = temp;\n\t\t\t\tprev.next = node;\n\t\t\t\tnode.next = temp;\n\t\t\t\tflag = 1;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\n\t\treturn flag;\n\t}\n\n\t// list printing\n\tpublic void printList() {\n\t\tNode temp = head;\n\t\twhile (temp != null) {\n\t\t\tSystem.out.print(temp.data + \"->\");\n\t\t\ttemp = temp.next;\n\t\t}\n\t\tSystem.out.println(\"\");\n\t}\n\n\n}", "public void addElement(XmlNode newNode) {\n\t\t\n\t\t// get selected Fields and add xmlElement after last seleted one\n\n\t\tXmlNode lastDataField = null;\n\t\t\n\t\tif (highlightedFields.size() > 0) {\n\t\t\tlastDataField = highlightedFields.get(highlightedFields.size()-1);\n\t\t} else {\n\t\t\t// add after last child of protocol (if there are any!)\n\t\t\tint numChildren = getRootNode().getChildren().size();\n\t\t\tif (numChildren > 0) \n\t\t\t\tlastDataField = rootNode.getChild(numChildren - 1);\n\t\t\t// otherwise, lastDataField is null, and new xmlElement will be 1st child of protocol\n\t\t}\n\t\t\n\t\t// if no xmlElement selected (none exist!), add at top (1st child of protocol)\n\t\tif (lastDataField == null) {\n\t\t\tnewNode.setParent(rootNode);\n\t\t\trootNode.addChild(newNode);\n\t\t\tnodeSelected(newNode, true);\n\t\t}\n\t\telse {\n\t\t// otherwise, add after the xmlElement.\n\t\t\tXmlNode parentNode = lastDataField.getParentNode();\n\t\t\tint indexToInsert = lastDataField.getMyIndexWithinSiblings() + 1;\n\n\t\t\tnewNode.setParent(parentNode);\n\t\t\tparentNode.addChild(indexToInsert, newNode);\n\t\t\t\n\t\t\tnodeSelected(newNode, true);\n\t\t}\n\t}", "public void append(Node newNode)\r\n {\n newNode.prev = this;\r\n newNode.next = next;\r\n if (next != null)\r\n {\r\n next.prev = newNode;\r\n }\r\n next = newNode;\r\n System.out.println(\"Node added with Traffic Data \" + Arrays.toString(newNode.trafficEntry.toStringArray()) + \" added ontop of \" \r\n + prev.trafficEntry.convertToString());\r\n \r\n }", "public void insertAfter(T element) {\n setNext( new LLNode<T>(element, getNext()));\n }", "public void removeNodeAfter() { cursor = cursor.getNext().getNext(); }", "public void insert(int x){\n Node new_node = new Node(x); \n new_node.next = head;\n new_node.prev = null;\n if(head != null)\n head.prev = new_node;\n head = new_node;\n }", "public void setPrev(ListEntry prev) {\n if (prev != null)\n this.prev = prev;\n else\n this.prev = null;\n }", "private void addBetween(E e, Node<E> predecessor, Node<E> successor) {\n Node<E> newest = new Node<>(e, predecessor, successor);\n predecessor.setNext(newest);\n successor.setPrev(newest);\n size++;\n }", "public void addNodeBefore(CustomerNode<Customer> target, CustomerNode<Customer> c){\r\n\t\tsize++;\r\n\t\tCustomerNode<Customer> temp = new CustomerNode<Customer>(new Customer(c.getElement().getArrivalTime(), \r\n\t\t\t\tc.getElement().getID(), c.getElement().getOrderTime(), \r\n\t\t\t\tc.getElement().getPaid(), c.getElement().getPatience()));\r\n\t\tif(target == first){\r\n\t\t\ttemp.setNext(target);\r\n\t\t\ttarget.setPrev(temp);\r\n\t\t\tfirst = temp;\r\n\t\t\t\r\n\t\t\treturn;\r\n\t\t}\r\n\t\ttemp.setNext(target);\r\n\t\ttemp.setPrev(target.getPrev());\r\n\t\ttarget.setPrev(temp);\r\n\t\ttemp.getPrev().setNext(temp);\r\n\t}", "private Node<E> addAfter(Node current, E toAdd) {\n\t\tif ((((Comparable<E>) toAdd).compareTo((E) current.data)) >= 0) {\n\t\t\tif (current.rightChild == null) {\n\t\t\t\tcurrent.rightChild = new Node(toAdd, current, null, null);\n\t\t\t\treturn current.rightChild;\n\t\t\t} else {\n\t\t\t\treturn addAfter(current.rightChild, toAdd);\n\t\t\t}\n\t\t} else {\n\t\t\tif (current.leftChild == null) {\n\t\t\t\tcurrent.leftChild = new Node(toAdd, current, null, null);\n\t\t\t\treturn current.leftChild;\n\t\t\t} else {\n\t\t\t\treturn addAfter(current.leftChild, toAdd);\n\t\t\t}\n\t\t}\n\t}", "private void addBefore(Node n, E x) {\n\n\t\tNode newNode = new Node(x, n);\n\n\t\tNode q = mHead;\n\n\t\tNode p = mHead.next;\n\n\t\twhile (p != n) {\n\t\t\tq = p;\n\t\t\tp = p.next;\n\t\t}\n\n\t\tq.next = newNode;\n\n\t}", "public void setPrev(DListNode2 prev1){\r\n this.prev = prev1;\r\n }", "private void insert(RBNode<T> node) {\r\n RBNode<T> current = this.root;\r\n //need to save the information of parentNode\r\n //because need the parentNode to connect the new node to the tree\r\n RBNode<T> parentNode = null;\r\n\r\n //1. find the insert position\r\n while(current != null) {\r\n parentNode = current;//store the parent of current, because current is going to move\r\n int cmp = node.key.compareTo(current.key);\r\n if(cmp < 0)//if insert data is smaller than current data, then go into left subtree\r\n current = current.left;\r\n else//if insert data is bigger than or equal to current data, then go into right subtree\r\n current = current.right;\r\n }\r\n\r\n //find the position, let parentNode as the parent of newNode\r\n node.parent = parentNode;\r\n\r\n //2. connect newNode to parentNode\r\n if(parentNode != null) {\r\n int cmp = node.key.compareTo(parentNode.key);\r\n if(cmp < 0)\r\n parentNode.left = node;\r\n else\r\n parentNode.right = node;\r\n } else {\r\n //if parentNode is null, means tree was empty, let root = newNode\r\n this.root = node;\r\n }\r\n\r\n //3. fix the current tree to be a RBTree again\r\n insertFixUp(node);\r\n }", "public void addAfter(DoublyLinkedNode<E> node) {\n if (node.getNext() != null) {\n this.linkWith(node.getNext());\n }\n node.linkWith(this);\n }", "public void insert(SplayNode n) {\n\t\t\t SplayNode y = null;\n\t\t\t SplayNode temp = this.root;\n\t\t while(temp != null) {\n\t\t y = temp;\n\t\t if(n.data < temp.data)\n\t\t temp = temp.left;\n\t\t else\n\t\t temp = temp.right;\n\t\t }\n\t\t n.parent = y;\n\n\t\t if(y == null) //newly added node is root\n\t\t this.root = n;\n\t\t else if(n.data < y.data)\n\t\t y.left = n;\n\t\t else\n\t\t y.right = n;\n\n\t\t this.splay(n);\n\t\t }", "private void addNodeAfter(SinglyLinkedList.Node<E> node, int idx) throws IndexOutOfBoundsException {\n SinglyLinkedList.Node<E> before = indexNode(idx);\n\n node.next = before.next;\n before.next = node;\n\n len += 1;\n }", "private void insertNodeIntoTree(Node node) {\n\t\troot = insert(root,node);\t\n\t}", "private void addToFront(ListNode node) {\n node.prev = head;\n node.next = head.next;\n \n //wire the head next prev to node and the connect head to node\n head.next.prev = node;\n head.next = node;\n }", "public void addEOGEdge(Node prev, Node next) {\n prev.getNextEOG().add(next);\n next.getPrevEOG().add(prev);\n }", "public void insertAfter( LinkedListNode<T> currentNode, T data )\n {\n //create a new linkedListNode\n LinkedListNode<T> newNode = new LinkedListNode<T>();\n //assign that node some data\n newNode.setData(data);\n //point new node where current pointer is\n newNode.setNext(currentNode.getNext());\n //set head pointer to this new node\n currentNode.setNext(newNode);\n }", "public void insertAtBack(T data) {\n \t//we create a new node\n Node<T> aNode = new Node<>(data);\n //and again if there is no node we make a new node as first and last node\n if (isEmpty()) {\n firstNode = lastNode = aNode;\n } \n //otherwise we set a new node as last node\n //and we assign to last node the next node of the last one\n //so the last node is new created node now\n else {\n lastNode.setNext(aNode);\n lastNode = lastNode.getNext();\n }\n }", "public native VertexList insertBefore(VertexNode target, VertexNode vertex);", "private Node insertNode(Node parent, Node curr, EventPair eventPair) {\n\t\tif(curr == null || curr.isNull)\n\t\t{\n\t\t\tif(parent != null)\n\t\t\t{\n\t\t\t\tlastInsertedNode = createNode(eventPair, Color.RED, parent);\n\t\t\t\treturn lastInsertedNode;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tlastInsertedNode = createNode(eventPair, Color.BLACK, parent);\n\t\t\t\treturn lastInsertedNode;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tboolean toLeft = false;\n\t\t\tif(curr.ID > eventPair.ID)\n\t\t\t{\n\t\t\t\tNode n = insertNode(curr, curr.left, eventPair);\n\t\t\t\tif (n == curr.parent)\n\t\t\t\t\treturn n;\n\t\t\t\tcurr.left = n;\n\t\t\t\ttoLeft = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tNode n = insertNode(curr, curr.right, eventPair);\n\t\t\t\tif (n == curr.parent)\n\t\t\t\t\treturn n;\n\t\t\t\tcurr.right = n;\n\t\t\t\ttoLeft = false;\n\t\t\t}\n\t\t\tif(toLeft) {\n\t\t\t\tif(curr.color == Color.RED && curr.left.color == Color.RED) {\n\t\t\t\t\tNode sibling = getSibling(curr);\n\t\t\t\t\tif(sibling == null || sibling.color == Color.BLACK) {\n\t if(isLeftChild(curr)) {\n\t rotateRight(curr, true);\n\t } else {\n\t \trotateRight(curr.left, false);\n\t curr = curr.parent;\n\t rotateLeft(curr, true);\n\t }\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\t\t\t\t\t\tcurr.color = Color.BLACK;\n\t sibling.color = Color.BLACK;\n\t if(curr.parent.parent != null) {\n\t curr.parent.color = Color.RED;\n\t }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(curr.color == Color.RED && curr.right.color == Color.RED) {\n\t Node sibling = getSibling(curr);\n\t if(sibling == null || sibling.color == Color.BLACK) {\n\t if(!isLeftChild(curr)) {\n\t \trotateLeft(curr, true);\n\t } else {\n\t \trotateLeft(curr.right, false);\n\t \tcurr = curr.parent;\n\t rotateRight(curr, true);\n\t }\n\t } else {\n\t \tcurr.color = Color.BLACK;\n\t sibling.color = Color.BLACK;\n\t if(curr.parent.parent != null) {\n\t \tcurr.parent.color = Color.RED;\n\t }\n\t }\n\t }\n\t\t\t}\n\t\t}\n\t\treturn curr;\n\t}", "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 }" ]
[ "0.7714007", "0.7703291", "0.749035", "0.7363684", "0.7278735", "0.7167269", "0.69951516", "0.69431865", "0.6797346", "0.67273456", "0.66700226", "0.6528341", "0.6395045", "0.63334036", "0.6302479", "0.62602663", "0.6251535", "0.61896676", "0.60857624", "0.6080741", "0.6055037", "0.60437864", "0.5999628", "0.599246", "0.5974581", "0.58741546", "0.58381605", "0.58307976", "0.58207744", "0.57818633", "0.57756096", "0.576799", "0.576489", "0.5743625", "0.57420033", "0.5737157", "0.5725277", "0.5684078", "0.567334", "0.566429", "0.56600535", "0.5650955", "0.5640183", "0.5632623", "0.5606294", "0.5594806", "0.55796987", "0.55672556", "0.55661327", "0.55610555", "0.555212", "0.5551701", "0.55465406", "0.55448353", "0.55355453", "0.5534195", "0.551883", "0.5511581", "0.55104345", "0.54996", "0.548294", "0.54810846", "0.5474592", "0.5472607", "0.5465922", "0.54449844", "0.544175", "0.5437079", "0.54274434", "0.5416798", "0.54139304", "0.54137796", "0.54087716", "0.5402519", "0.53958875", "0.5395859", "0.5391717", "0.53883916", "0.53810257", "0.5376856", "0.5376674", "0.53765047", "0.5369028", "0.5356727", "0.53567183", "0.5355034", "0.5353059", "0.5347196", "0.5345619", "0.53379226", "0.5325397", "0.532418", "0.5308114", "0.5306518", "0.5299528", "0.52954084", "0.5294787", "0.52943784", "0.5269602", "0.526467" ]
0.80891424
0
Appends a new node at the end.
public void append(int new_data) { Node new_node = new Node(new_data); if (head == null) { head = new Node(new_data); return; } new_node.next = null; Node last = head; while (last.next != null) last = last.next; last.next = new_node; return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Node appendNode(Node node);", "void append(SNode node);", "public Node<E> append(Node<E> node){\n this.addToEnd(node);\n return node;\n }", "@Test\n\tpublic void addNodeAtEnd() {\n\t\tSystem.out.println(\"Adding a node at the End of the list\");\n\t\tdll.append(1);\n\t\tdll.append(2);\n\t\tdll.append(3);\n\t\tdll.print();\n\t}", "public void addNode() {\n if (nodeCount + 1 > xs.length)\n resize();\n nodeCount++;\n }", "public void appendNodeToEnd(Node n){\n\t Node end = n;\n\t Node current = this;\n\t \n\t while(current.next != null){\n\t current = current.next;\n\t }\n\t \n\t current.next = end;\n\t //System.out.println(current.next.data);\n\t }", "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 }", "void append(int new_data) {\n\t\tNode new_node = new Node(new_data);\n\t\tNode last = head;\n\t\tnew_node.next = null;\n\t\tif (head == null) {\n\t\t\tnew_node.prev = null;\n\t\t\thead = new_node;\n\t\t\treturn;\n\t\t}\n\t\twhile (last.next != null)\n\t\t\tlast = last.next;\n\t\tlast.next = new_node;\n\t\tnew_node.prev = last;\n\t}", "void append(String new_data) {\n // 1. allocate node \n // 2. put in the data \n Node new_node = new Node(new_data);\n\n Node last = head;\n // used in step 5\n\n // 3. This new node is going to be the last node, so\n // make next of it as NULL\n new_node.next = null;\n\n // 4. If the Linked List is empty, then make the new\n // node as head \n if (head == null) {\n new_node.prev = null;\n head = new_node;\n return;\n }\n\n // 5. Else traverse till the last node \n while (last.next != null) {\n last = last.next;\n }\n\n // 6. Change the next of last node \n last.next = new_node;\n\n // 7. Make last node as previous of new node \n new_node.prev = last;\n }", "public void append(Node newNode)\r\n {\n newNode.prev = this;\r\n newNode.next = next;\r\n if (next != null)\r\n {\r\n next.prev = newNode;\r\n }\r\n next = newNode;\r\n System.out.println(\"Node added with Traffic Data \" + Arrays.toString(newNode.trafficEntry.toStringArray()) + \" added ontop of \" \r\n + prev.trafficEntry.convertToString());\r\n \r\n }", "@Override\n public ListNode<T> append(T e) {\n \treturn new ListNode<T>(e,this);\n }", "void addNode()\n {\n Node newNode = new Node(this.numNodes);\n this.nodeList.add(newNode);\n this.numNodes = this.numNodes + 1;\n }", "@Override\n public void addToEnd(T data){\n Node<T> dataNode = new Node<>();\n\n dataNode.setData(data);\n dataNode.setNext(null);\n\n Node<T> tempHead = this.head;\n while(tempHead.getNext() != null) {\n tempHead = tempHead.getNext();\n }\n\n tempHead.setNext(dataNode);\n }", "void append(int new_data)\n {\n /* 1. allocate node\n * 2. put in the data */\n Node new_node = new Node(new_data);\n\n Node last = head;/* used in step 5*/\n\n /* 3. This new node is going to be the last node, so\n * make next of it as NULL*/\n new_node.setNext(null);\n\n /* 4. If the Linked List is empty, then make the new\n * node as head */\n if(head == null)\n {\n new_node.setPrev(null);\n head = new_node;\n return;\n }\n\n /* 5. Else traverse till the last node */\n while(last.getNext() != null)\n last = last.getNext();\n\n /* 6. Change the next of last node */\n last.setNext(new_node);\n\n /* 7. Make last node as previous of new node */\n new_node.setPrev(last);\n }", "public void append(int nodeValue)\n {\n ListNode newNode = new ListNode(nodeValue);\n\n // Check if the head is null\n if(this.head == null && this.tail == null)\n {\n this.head = newNode;\n this.tail = newNode;\n } else {\n\n ListNode currNode = this.head;\n ListNode prevNode = this.head;\n\n // Traverse the list\n while(currNode.getNextNode() != null)\n {\n // System.out.println(\"STUCK\");\n // System.out.println(\"CURRENT NODE VALUE: \" + currNode.getValue());\n // System.out.println(\"NEXT NODE FROM CURRENT: \" + currNode.getNextNode().getValue());\n prevNode = currNode;\n currNode = currNode.getNextNode();\n \n }\n\n // Wire the two nodes together\n currNode.setNextNode(newNode);\n newNode.setPrevNode(currNode);\n this.tail = newNode;\n }\n\n this.size = size + 1;\n\n }", "public void addANodeToEnd(E addData)\n\n\t{\n\t\tNode position = head;\n\t\t// when the link is null, stop the loop and add a node \n\t\twhile (position.link != null) {\n\t\t\t// get next node\n\t\t\tposition = position.link;\n\t\t}\n\t\t// add a new node to the end\n\t\tposition.link = new Node(addData, null);\n\n\t}", "@Override\n\tpublic void append(Object data) throws IOException {\n\n\t\tNode newNode = new Node(data);\n\t\tif (head == null) {\n\t\t\thead = newNode;\n\t\t} else {\n\t\t\tNode currentNode = head;\n\t\t\t\n\t\t\twhile (currentNode.getNext() != null) {\n\t\t\t\tcurrentNode = currentNode.getNext();\t\n\t\t\t}\n\t\t\t\n\n\t\t\tFileOutputStream fos = new FileOutputStream(\"res/test.dat\");\n\t\t\tObjectOutputStream oos = new ObjectOutputStream(fos);\n\t\t\t\n\t\t\toos.writeObject(currentNode.getElement()); \n\t\t\t\n\t\t\toos.reset();\n\n\t\t\toos.close();\n\t\t\tfos.close();\n\t\t\t\n\t\t\tcurrentNode.setNext(newNode);\n\n\t\t}\n\t\tthis.size++;\t\n\t\n\n\t}", "public void addNode() {\r\n \r\n Nod nod = new Nod(capacitate_noduri);\r\n numar_noduri++;\r\n noduri.add(nod);\r\n }", "public void appendToEnd(T data){\n\t Node end = new Node(data);\n\t Node current = this;\n\t \n\t while(current.next != null){\n\t current = current.next;\n\t }\n\t \n\t current.next = end;\n\t //System.out.println(current.next.data);\n\t }", "private Node append(E element) {\n \treturn new Node(sentinel.pred, element);\n }", "public Builder<T> append(Node<T> node) {\n basicBuilder.append(node);\n return this;\n }", "void append(E data) {\n Node<E> node = new Node<>(data);\n if (isNull(head)) {\n head = node;\n return;\n }\n\n Node<E> last = head;\n while (nonNull(last.next)) {\n last = last.next;\n }\n\n last.next = node;\n node.previous = last;\n }", "public final void addLast(Node n) {\n this.tail.set(n);\n this.tail = n;\n this.size++;\n }", "public FreeMindWriter endNode() {\n if( nodeDepth < 1 ) throw new IllegalStateException( \"There are no open nodes\" );\n tagClose();\n out.println( \"</node>\" );\n nodeDepth--;\n \n return this;\n }", "private void appendNode(int data) {\n\t\tNode currentNode = head;\n\t\tNode newNode = new Node(data);\n\n\t\tif(currentNode==null) {\n\t\t\thead = newNode;\n\t\t\treturn;\n\t\t}\n\t\tif(currentNode.next==null) {\n\t\t\tcurrentNode.next=newNode;\n\t\t} else {\n\t\t\twhile(currentNode.next!=null) {\n\t\t\t\tcurrentNode = currentNode.next;\n\t\t\t}\n\t\t\tcurrentNode.next = newNode;\n\t\t}\n\t\tSystem.out.println(\" Added new Node to the linkedList \");\n\t}", "public void append(PartialTree tree) {\r\n \tNode ptr = new Node(tree);\r\n \tif (rear == null) {\r\n \t\tptr.next = ptr;\r\n \t} else {\r\n \t\tptr.next = rear.next;\r\n \t\trear.next = ptr;\r\n \t}\r\n \trear = ptr;\r\n \tsize++;\r\n }", "public void append(final T data) {\n Node<T> newNode = new Node<>(data);\n if (head == null) {\n head = newNode;\n } else {\n Node<T> iterator = head;\n while (iterator.getNext() != null) {\n iterator = iterator.getNext();\n }\n iterator.setNext(newNode);\n }\n numElement++;\n }", "public void insertEnd(T newdata){\n\n if (head == null){\n push(newdata);\n return;\n }\n\n Node n = new Node(newdata);\n n.next = null;\n Node last = head;\n while (last.next!=null){\n last = last.next;\n }\n last.next = n;\n }", "private void addNodeAtTheEnd(int data) {\n ListNode newNode = new ListNode(data);\n if (head == null) {\n head = newNode;\n return;\n }\n ListNode current = head;\n while (current.next != null) {\n current = current.next;\n }\n current.next = newNode;\n }", "public void appendData(T data){\n Node<T> newEnd = new Node<>(data); // new Node referenced by newEnd\n Node<T> thisNode = this; // grab this Node\n\n // traverse list and append to the tail\n while (thisNode.next != null){\n thisNode = thisNode.next;\n }\n thisNode.next = newEnd;\n }", "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 }", "public void addNodeToTheEnd(int data){\n Node newNode = new Node(data);\n if(head == null){\n head = newNode;\n }else{\n // Very Important!\n Node last = head;\n while(last.next != null){\n last = last.next;\n }\n // Make iteration with while loop first, find the last node and add the new Node out of While loop!\n last.next=newNode;\n }\n }", "protected void addingNode( SearchNode 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 }", "@Override\n public void visit(Node node) {\n nodes.add(node);\n }", "private void addAfter(Node n, String data)\n {\n Node next = n.next;\n n.next = new Node(data, next);\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 }", "@Test\n\tpublic void addNodeAfterGiveNode() {\n\t\tSystem.out.println(\"Given a node as prev_node, insert a new node after the given node \");\n\t\tdll.push(4);\n\t\tdll.push(2);\n\t\tdll.push(1);\n\t\tdll.InsertAfter(dll.head.next, 3);\n\t\tdll.print();\n\t}", "public void appendNode(int data) {\n\t\tNode currentNode = headNode;\n\t\tif(currentNode == null) {\n\t\t\tNode newNode = new Node(data);\n\t\t\theadNode = newNode;\n\t\t\treturn;\n\t\t}\n\t\twhile(currentNode.getNextNode()!=null) {\n\t\t\tcurrentNode = currentNode.getNextNode();\n\t\t}\n\t\tcurrentNode.setNextNode(new Node(data));\n\t}", "private void addNode(Node<AnyType> t) {\n \n if ( isEmpty() ) {\n \n headNode = t;\n tailNode = headNode;\n \n } else { \n \n Node<AnyType> node = getNode( size-1 );\n node.setNextNode( t );\n t.setPreviousNode( node );\n \n tailNode = t;\n \n }\n \n size++;\n \n }", "public void addToEnd( int newdata ) {\t\t\r\n\t\tif( link == null )\r\n\t\t\tlink = new IntNode( newdata, null );\r\n\t\telse {\r\n\t\t\tIntNode current = link;\r\n\t\t\twhile( current.link != null ) {\r\n\t\t\t\tcurrent = current.link;\r\n\t\t\t} // end while\r\n\t\t\tIntNode newNode = new IntNode( newdata, null );\r\n\t\t\tcurrent.link = newNode;\r\n\t\t} // end else\r\n\t}", "public void addNode(Node node){subNodes.add(node);}", "public void addAtEnd(String str) {\n newNode = new Node(str);\n newNode = tail;\n tail = null;\n }", "public void addElement(XmlNode newNode) {\n\t\t\n\t\t// get selected Fields and add xmlElement after last seleted one\n\n\t\tXmlNode lastDataField = null;\n\t\t\n\t\tif (highlightedFields.size() > 0) {\n\t\t\tlastDataField = highlightedFields.get(highlightedFields.size()-1);\n\t\t} else {\n\t\t\t// add after last child of protocol (if there are any!)\n\t\t\tint numChildren = getRootNode().getChildren().size();\n\t\t\tif (numChildren > 0) \n\t\t\t\tlastDataField = rootNode.getChild(numChildren - 1);\n\t\t\t// otherwise, lastDataField is null, and new xmlElement will be 1st child of protocol\n\t\t}\n\t\t\n\t\t// if no xmlElement selected (none exist!), add at top (1st child of protocol)\n\t\tif (lastDataField == null) {\n\t\t\tnewNode.setParent(rootNode);\n\t\t\trootNode.addChild(newNode);\n\t\t\tnodeSelected(newNode, true);\n\t\t}\n\t\telse {\n\t\t// otherwise, add after the xmlElement.\n\t\t\tXmlNode parentNode = lastDataField.getParentNode();\n\t\t\tint indexToInsert = lastDataField.getMyIndexWithinSiblings() + 1;\n\n\t\t\tnewNode.setParent(parentNode);\n\t\t\tparentNode.addChild(indexToInsert, newNode);\n\t\t\t\n\t\t\tnodeSelected(newNode, true);\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}", "void append(int value) {\n\t\tNode n = new Node(value);\n\t\tif (length == 0) {\n\t\t\thead = n;\n\t\t\ttail = n;\n\t\t} else {\n\t\t\ttail.next = n;\n\t\t\ttail = n;\n\t\t}\n\t\tlength++;\n\t\t//print();\n\t}", "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 appendNode(ListNode<E> node) {\r\n\t\tif (last != null) {\r\n\t\t\tlast.next = node;\r\n\t\t\tlast = last.next;\r\n\t\t} else {\r\n\t\t\theader.next = node;\r\n\t\t\tlast = node;\r\n\t\t\t;\r\n\t\t}\r\n\t}", "@Override\n\tpublic void addNode(Node node) {\n\t\tfrontier.addLast(node);\n\t\tif(frontier.size() > maxSize)\n\t\t\tmaxSize = frontier.size();\n\t}", "private void addEnd(String x)\n {\n if (tail == null)\n {\n tail = new Node(x, null);\n head = tail;\n }\n else\n {\n tail.next = new Node(x, null);\n tail = tail.next;\n }\n size++;\n }", "public void insertEnd(T data){\n Node<T> node = new Node<T>(data);\n if(this.isEmpty()) {\n this.insertFirst(data);\n }\n else{\n this.end.next = node;\n node.previous = this.end;\n this.end = node;\n }\n size++;\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(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 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 addLastNode(E e){\r\n ListNode n = new ListNode(e, null);\r\n if(head == null) head = n;\r\n else {\r\n ListNode c = head;\r\n while(c.getLink() != null){\r\n c = c.getLink();\r\n }\r\n c.setLink(n);\r\n }\r\n }", "public Node insertAfter(Node node);", "public abstract void appendBlock();", "public void addNodeAfterThis( int newdata ) {\r\n\t\tlink = new IntNode( newdata, link );\r\n\t}", "public void append(Money d) {\r\n // TODO Code here for append\r\n // Step 1: create the new node with data d\r\n MoneyNode newNode = new MoneyNode(d);\r\n\r\n // Step 2: Append after the last node; make last node point to new node\r\n last.next = newNode;\r\n\r\n // Step 3: update, increase length\r\n last = newNode;\r\n length++;\r\n\r\n // Step 4: check the empty linked list manually, no code, just trace\r\n }", "public void addEnd(int data) {\n\t\tNode newNode = new Node(data);\n\n\t\tif(head == null) {\n\t\t\thead = newNode;\n\t\t} else {\n\t\t\tNode temp = head;\n\n\t\t\twhile(temp.next != null) {\n\t\t\t\ttemp = temp.next;\n\t\t\t}\n\t\t\ttemp.next = newNode;\n\t\t}\n\t}", "public void addAtEnd( int d ) {\n\t\tif( head == null ) {\n\t\t\tNode temp = new Node();\n\t\t\ttemp.data = d;\n\n\t\t\thead = tail = temp;\n\n\t\t} else {\n\t\t\tNode temp = new Node();\n\t\t\ttemp.data = d;\n\n\t\t\ttail.next = temp;\n\t\t\ttail = tail.next;\n\t\t}\n\t}", "void addLast(Key key) {\n\t\tlastNode.next = new Node(key, null);\n\t\tlastNode = lastNode.next;\n\t\tsize++;\n\t}", "public Node<T> addLast(T t) { \r\n Node<T> currLast = sentinel.prev;\r\n Node<T> newNode = new Node<T>(t, currLast, sentinel);\r\n currLast.next = newNode;\r\n sentinel.prev = newNode;\r\n size++;\r\n return newNode;\r\n }", "public void add(Node<T> n){\n\t\tconnect.add(n);\n\t}", "public void addLast(String data){\n tail = new Node(data, null, tail);\n Node second = tail.prev;\n if(second!=null)\n second.next = tail;\n else\n head = tail;\n size++;\n }", "public void append(int data){\n\t\tif (this.head == null)\n\t\t\tthis.head = new Node(data);\n\t\telse {\n\t\t\tNode current = this.head;\n\t\t\twhile (current.next != null){\n\t\t\t\tcurrent = current.next;\n\t\t\t}\n\t\t\tcurrent.next = new Node(data);\n\t\t}\n\t}", "public void append(int data) {\n // created object of 'Node' class\n Node node = new Node();\n\n // initializing 'node' of the linked-list\n node.data = data;\n node.next = null; // at the time of node creation, the 'next' not refer to any other node\n\n // if the linked-list is empty which means 'head' is refer to 'null'\n if (head == null) {\n //Creating a first or head node\n head = node;\n } else {\n Node n = head; // n is our temporary node\n while (n.next != null) {\n n = n.next; // jumping to next node as 'n.next' contains next node address\n }\n n.next = node;\n }\n }", "public PersistentLinkedList<T> addLast(T data) {\n return add(this.treeSize, data);\n }", "void appendToTail(int d){\n Node end = new Node(d);\n Node begin = this.head;\n\n while(begin.next != null)\n {\n begin = begin.next;\n }\n\n begin.next = end;\n }", "public void append(int data){\n\t\tif(head==null){\n\t\t\thead = new Node(data);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tNode current = head;\n\t\tNode newNode = new Node(data);\n\t\t\n\t\t// traverse to last node\n\t\twhile(current.getNext()!=null){\n\t\t\tcurrent = current.getNext();\n\t\t}\n\t\t\n\t\tcurrent.setNext(newNode);\n\t}", "private static void insertAtEnd(int data) {\n\tNode newnode=new Node(data);\n\tnewnode.next=null;\n\tNode n=head;\n\tNode last=head;\n\twhile(last.next!=null)\n\t{\n\t\tlast=last.next;\n\t}\n\tlast.next=newnode;\n\tnewnode.prev=last;\n\treturn;\n\t\n}", "@Override\n\tpublic IDnaStrand append(String dna) {\n\t\tNode newNode = new Node(dna);\n \n if (myFirst == null) {\n myFirst = newNode;\n myLast = newNode;\n newNode.next = null;\n }\n else {\n \tmyLast.next= newNode;\n \tmyLast = newNode;\n }\n \n\t\t\n\t\n\t\tmySize += dna.length();\n\t\tmyAppends += 1;\n\t\t\n\t\treturn this;\n\t}", "@Override\r\n\t\tpublic Node appendChild(Node newChild) throws DOMException\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}", "public void addEnd(Type value){\n if( !this.isEmpty() ){\n this.end = new MyDoubleNode(value, this.end, null);\n this.end.prev.next = this.end;\n }else{\n this.start = this.end = new MyDoubleNode(value);\n }\n this.size++;\n }", "public void append(E it) {\r\n\t\ttail = tail.setNext(new Link<E>(it, null));\r\n\t\tcnt++;\r\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 }", "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 addChild(WSLNode node) {children.addElement(node);}", "public void add(Node newNode) {\r\n\t\tif (this.size() == 0) {\r\n\t\t\thead = newNode;\r\n\t\t\ttail = newNode;\r\n\t\t}else {\r\n\t\t\ttail.setNext(newNode); \r\n\t\t\ttail = newNode;\r\n\t\t}\r\n\t\tthis.setSize(this.size() + 1);\r\n\t}", "public void append(Word d){\n\t\tWordNode wn = new WordNode(d.words);\n\t\tlast.next = wn;\n\t\tlast = wn;\n\t\tlength++;\n\t}", "void append(Object data)\n\t{\n\t\tNode temp = new Node(data);\n\t\tif (back == null) \n\t\t{\n\t\t\tfront = back = temp; //if the list is empty, then the new node temp becomes the front and back of the list as its the only node within the list\n\t\t\tlength++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tback.next = temp; //the next node after the back node becomes the new node temp since it was inserted into the back of the list\n\t\t\ttemp.prev = back; //the new node temp's previous node becomes the back since temp is now the new back of the list\n\t\t\tback = temp; //the new back of the list now becomes the new node temp\n\t\t\tlength++;\n\t\t}\n\t}", "public void append(int data) {\r\n ListNode temp = head;\r\n while(temp.next !=null) {\r\n temp = temp.next;\r\n }\r\n ListNode new_node = new ListNode(data);\r\n temp.next=new_node;\r\n }", "public boolean append(E elem) {\r\n\t\tNode<E> newTail = new Node<E>(elem, tail, null);\r\n\t\tif (size == 0) {\r\n\t\t\ttail = newTail;\r\n\t\t\thead = tail;\r\n\t\t} else if (size == 1) {\r\n\t\t\ttail = newTail;\r\n\t\t\thead.next = tail;\r\n\t\t} else {\r\n\t\t\tNode<E> prevTail = tail;\r\n\t\t\ttail = newTail;\r\n\t\t\tprevTail.next = tail;\r\n\t\t}\r\n\t\tindices.add(tail);\r\n\t\tsize++;\r\n\t\treturn true;\r\n\t}", "public void addAfter(Node prevNode , Integer newdata){\n if (prevNode==null){\n return;\n }\n\n Node n = new Node(newdata);\n n.next = prevNode.next;\n prevNode.next = n;\n\n }", "public void append(int val) {\n if(tail != null) {\n Node node = tail;\n tail = new Node();\n node.next = tail;\n\n tail.prev = node;\n tail.val = val;\n } else if(tail == null) {\n\n tail = new Node();\n tail.val = val;\n head = tail;\n }\n\n size++;\n }", "@Override\n\tpublic Position<E> addLast(E e) {\n\t\treturn addBetween(tail.prev, tail, e);\n\t}", "private void addNode(NeuralNode node) {\r\n\t\tinnerNodes.add(node);\r\n\t}", "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 append(int value) {\n\t\t\n\t\tNode temp = new Node(value);\n\t\t\n\t\t// no node available therefore this is 1st node\n\t\tif(this.head == null) {\n\t\t\thead = temp;\n\t\t}\n\t\t// 1 and more than one node available\n\t\telse {\n\t\t\tNode it = this.head; // it pointed to head pointed\n\t\t\twhile(it.next != null) { //it++ up to it.next get null\n\t\t\t\tit = it.next;\n\t\t\t}\n\t\t\t// it pointed to last node\n\t\t\tit.next = temp; // insert value at last\n\t\t\ttemp.next = null;\n\t\t}\n\t}", "void addNode(Node n) {\n nodes.put(n.id, 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}", "@Override\n public void insertAtEnd(T value) {\n Node<T> new_node = new Node<T>(value);\n if (start == null) {\n start = new_node;\n }\n if (end == null) {\n end = new_node;\n } else {\n end.next = new_node;\n end = new_node;\n }\n\n }", "void addNode(String node);", "@Override\n public boolean add(E e) {\n if (root != null) {\n if (!root.addElement(e)) {\n return false;\n }\n root = root.balance();\n } else {\n root = new Node(e, null, null, 1);\n }\n size++;\n return true;\n }", "public void addLastNode(int data)\n {\n if (tail == null)\n head = tail = new Node(data); //empty list\n else\n {\n tail.next = new Node(data); //link new node as last node\n tail = tail.next; //make tail pointer points to last node\n }\n }", "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 add(Node node) {\n node.next = tail;\n node.prev = tail.prev;\n tail.prev.next = node;\n tail.prev = node;\n size++;\n }", "public void insertnode ()\n\t// insert an empty node\n\t{\n\t\tif (Pos.haschildren() && !GF.askInsert()) return;\n\t\tNode n = new Node(Pos.node().number());\n\t\tPos.insertchild(new TreeNode(n));\n\t\tn.main(Pos);\n\t\tgetinformation();\n\t\tPos = Pos.lastChild();\n\t\tsetlast();\n\t\tshowinformation();\n\t\tcopy();\n\t}", "private Node<E> addAfter(Node current, E toAdd) {\n\t\tif ((((Comparable<E>) toAdd).compareTo((E) current.data)) >= 0) {\n\t\t\tif (current.rightChild == null) {\n\t\t\t\tcurrent.rightChild = new Node(toAdd, current, null, null);\n\t\t\t\treturn current.rightChild;\n\t\t\t} else {\n\t\t\t\treturn addAfter(current.rightChild, toAdd);\n\t\t\t}\n\t\t} else {\n\t\t\tif (current.leftChild == null) {\n\t\t\t\tcurrent.leftChild = new Node(toAdd, current, null, null);\n\t\t\t\treturn current.leftChild;\n\t\t\t} else {\n\t\t\t\treturn addAfter(current.leftChild, toAdd);\n\t\t\t}\n\t\t}\n\t}", "public void addElement() {\n\t\tXmlNode newNode = new XmlNode(rootNode, this);// make a new default-type field\n\t\taddElement(newNode);\n\t}" ]
[ "0.7891073", "0.74369913", "0.73098916", "0.70744115", "0.701907", "0.69117206", "0.68176407", "0.6763058", "0.66805106", "0.6611023", "0.6604931", "0.6576764", "0.6573439", "0.65598506", "0.6537451", "0.653661", "0.6529761", "0.6529399", "0.6462868", "0.6411195", "0.6393337", "0.63894", "0.6379399", "0.6359474", "0.63409364", "0.63382053", "0.631707", "0.62943536", "0.6282355", "0.6282252", "0.6279456", "0.62784356", "0.62488264", "0.62407017", "0.6239561", "0.6210114", "0.6206794", "0.61341244", "0.6132516", "0.6119031", "0.6098403", "0.6083902", "0.6081878", "0.60713845", "0.606569", "0.606028", "0.60466975", "0.6029566", "0.6027896", "0.60246176", "0.60229456", "0.60199314", "0.6014334", "0.6003519", "0.5986654", "0.5983197", "0.5979667", "0.59734637", "0.59637845", "0.59547627", "0.5947189", "0.5931062", "0.5925935", "0.59203875", "0.59203434", "0.59194946", "0.5902943", "0.5897496", "0.5890173", "0.58870816", "0.587765", "0.5857694", "0.5855399", "0.5852902", "0.58483946", "0.58432376", "0.5841445", "0.58392334", "0.5839084", "0.5827017", "0.58181536", "0.5809228", "0.57984924", "0.57898754", "0.57803905", "0.57705003", "0.57694656", "0.576649", "0.5764974", "0.5756003", "0.5755554", "0.57539713", "0.57497287", "0.57494205", "0.57488084", "0.5737902", "0.57366055", "0.57306045", "0.57273084", "0.5724775" ]
0.67636585
7