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
Wrapper method to display all data
public int display(){ return display(root); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void displayAll() {\n\t\tSystem.out.println(\"Title \"+this.getTitle());\n\t\tSystem.out.println(\"Artist \"+this.getArtist());\n\t\tSystem.out.println(\"Genre \"+this.genre);\n\t}", "public void displayData();", "public void displayAll() {\n\t\t\n\t\tbankop.display();\n\t\n\t}", "void showAll();", "public void ViewAllData(View v){\n Cursor res = myDB.viewAllData();\n // if there are no data\n if (res.getCount() == 0) {\n // show an error message\n showMessage(\"Error\", \"Nothing found\");\n return;\n }\n\n StringBuffer buffer = new StringBuffer();\n while(res.moveToNext()){\n buffer.append(\"Id :\" + res.getString(0) + \"\\n\");\n buffer.append(\"Name :\" + res.getString(1) + \"\\n\");\n buffer.append(\"Surname :\" + res.getString(2) + \"\\n\");\n buffer.append(\"Marks :\" + res.getString(3) + \"\\n\\n\");\n }\n\n // then show all the data inside the buffer\n showMessage(\"Data\", buffer.toString());\n }", "public void printAll()\n {\n r.showAll();\n }", "public void displayAll() \n\t{\n\t\tSystem.out.printf(\"%n--[ My Contact List ]--%n\");\n\t\tSystem.out.printf(\"%n%-20s%-15s%-20s%-15s%n\", \"Name\", \"Phone\", \"Email\",\n\t\t\t\t\"Company\");\n\t\tSystem.out.printf(\"%n%-20s%-15s%-20s%-15s%n\", \"----\", \"-----\", \"-----\",\n\t\t\t\t\"-------\");\n\t\tfor (BusinessContact b : this.contacts) \n\t\t{\n\t\t\tSystem.out.printf(\"%n%-20s%-15s%-20s%-15s%n\", b.getLastName()\n\t\t\t\t\t+ \", \" + b.getFirstName(), b.getPhoneNumber(),\n\t\t\t\t\tb.getEmailAddress(), b.getCompany());\n\t\t}\n\t}", "private void showAll() {\n getAll();\n //show persons\n MainActivity.instance().displayPersonsRunnable = new DisplayPersonsRunnable(MainActivity.instance());\n this.thread = new Thread(MainActivity.instance().displayPersonsRunnable);\n this.thread.start();\n }", "public void display()\n\t{\n\t\tSystem.out.println(data+\" \");\n\t}", "private void displayAll() {\n\t\tif(inventoryObject.totalNumCards() == 0) { // checks to see if there are 0 StockIndexCards\n\t\t\tSystem.out.println(\"The Inventory is empty\\n\");\n\t\t\tgetUserInfo();\n\t\t}\n\t\telse {\n\t\tSystem.out.println(inventoryObject.displayAll());\n\t\tgetUserInfo();\n\t\t}\n\t}", "@Override\n\tpublic String showAll() {\n\t\treturn null;\n\t}", "private void displayAll()\n {\n for (int i = 0; i < cache.size(); ++i)\n {\n Record r = cache.get(i); \n System.out.println(r.key() + \" \" + r.value());\n }\n }", "public void show() {\n if(heading.isEmpty()) {\r\n System.out.println(\"Error:Table:show:no data in heading, nothing to show\");\r\n return;\r\n }\r\n if(rows.isEmpty()) {\r\n System.out.println(\"Error:Table:show:no data in rows, nothing to show\");\r\n return;\r\n }\r\n for(String h : heading) {\r\n System.out.print(h + \" | \");\r\n }\r\n System.out.println(\"\");\r\n Set<String> keys = rows.keySet();\r\n for(String k : keys) {\r\n rows.get(k).show();\r\n System.out.println(\"\");\r\n }\r\n System.out.println(\"\");\r\n }", "private void displayData() {\n ChildStatement childStmt = app.getChildStatement();\n\n //---Child\n childModelViewSynchronizer = new ModelViewSynchronizer<Child>(CHILD_CLASS,\n getChildMetadata(), rootView, AppConstants.EMPTY_STRING);\n childModelViewSynchronizer.setLabels();\n childModelViewSynchronizer.setHeaderTitle(R.id.section_child_particulars,\n R.string.label_child);\n childModelViewSynchronizer.displayDataObject(childStmt.getChildItem().getChild());\n\n //---CDA Trustee\n cdaTrusteeModelViewSynchronizer = new ModelViewSynchronizer<Adult>(ADULT_CLASS,\n getCdaTrusteeMetaData(), rootView, AppConstants.EMPTY_STRING);\n cdaTrusteeModelViewSynchronizer.setLabels();\n cdaTrusteeModelViewSynchronizer.setHeaderTitle(R.id.section_cdat_particulars,\n R.string.label_adult_type_cdat);\n cdaTrusteeModelViewSynchronizer.displayDataObject(childStmt.getChildDevAccountTrustee());\n\n //---Child Development Bank Account\n cdaBankModelViewSynchronizer = new ModelViewSynchronizer<CdaBankAccount>(CDA_BANK_ACCOUNT_CLASS,\n getChildDevAccountMetaData(), rootView, AppConstants.EMPTY_STRING);\n cdaBankModelViewSynchronizer.setLabels();\n cdaBankModelViewSynchronizer.setHeaderTitle(R.id.section_cda_details,\n R.string.label_child_dev_acc_detail);\n cdaBankModelViewSynchronizer.displayDataObject(childStmt.getCdaBankAccount());\n\n //--- To From Date\n displayFromToDates();\n\n //Screen - Title and Instructions\n fragmentContainer.setFragmentTitle(rootView,\n R.string.title_activity_family_view_cda_details);\n fragmentContainer.setInstructions(rootView.findViewById(R.id.screen_instructions),\n CURRENT_POSITION, 0, false);\n }", "public void printAll() {\r\n\t\t\t\t\r\n\t\tSystem.out.println(\"################\");\r\n\t\tSystem.out.println(\"Filename:\" +getFileName());\r\n\t\tSystem.out.println(\"Creation Date:\" +getCreationDate());\r\n\t\tSystem.out.println(\"Genre:\" +getGenre());\r\n\t\tSystem.out.println(\"Month:\" +getMonth());\r\n\t\tSystem.out.println(\"Plot:\" +getPlot());\r\n\t\tSystem.out.println(\"New Folder Name:\" + getNewFolder());\r\n\t\tSystem.out.println(\"New Thumbnail File Name:\" +getNewThumbnailName());\r\n\t\tSystem.out.println(\"New File Name:\" +getNewFilename());\r\n\t\tSystem.out.println(\"Season:\" +getSeason());\r\n\t\tSystem.out.println(\"Episode:\" +getEpisode());\r\n\t\tSystem.out.println(\"Selected:\" +getSelectEdit());\r\n\t\tSystem.out.println(\"Title:\" +getTitle());\r\n\t\tSystem.out.println(\"Year:\" +getYear());\r\n\t\tSystem.out.println(\"Remarks:\" +getRemarks());\r\n\t\tSystem.out.println(\"################\");\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public void displayRecords() {\n\t\tSystem.out.println(\"****Display Records****\");\n\t\tSystem.out.print(\"Firstname \\tLastname \\tAddress \\t\\tCity \\t\\tState \\t\\t\\tZIP \\t\\tPhone \\n\");\n\t\tfor (int i = 0; i < count; i++) {\n\t\t\tif (details[i] == null) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tSystem.out.println(details[i]);\n\t\t}\n\t\tSystem.out.println();\n\t}", "public void show() {\n for (int i = 0; i < rowCount; i++) {\n for (int j = 0; j < columnCount; j++)\n System.out.printf(\"%9.4f \", data[i][j]);\n System.out.println();\n }\n }", "public void displayAllPatients() {\r\n\t\ttry {\r\n\t\t\tString query= \"SELECT * FROM patients\";\r\n\t\t\tStatement stm= super.getConnection().createStatement();\r\n\t\t\tResultSet results= stm.executeQuery(query);\r\n\t\t\twhile(results.next()) {\r\n\t\t\t\tString[] row= new String[7];\r\n\t\t\t\trow[0]= results.getInt(1)+\"\";\r\n\t\t\t\trow[1]= results.getString(2);\r\n\t\t\t\trow[2]= results.getString(3);\r\n\t\t\t\trow[3]= results.getString(4);\r\n\t\t\t\trow[4]= results.getString(5);\r\n\t\t\t\trow[5]= results.getInt(6)+\"\";\r\n\t\t\t\tmodelHostory.addRow(row);\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\t}", "public void displayAll() {\r\n \t Item currentItem;\r\n \t \r\n \t System.out.println(\"-----BOOKS-----\");\r\n \t for(int i=0; i<items.size(); i++) {\r\n \t currentItem = items.get(i);\r\n \t \t //This next line checks if the current item is a book.\r\n \t if(currentItem.getItemType() == Item.ItemTypes.BOOK) \r\n \t System.out.println(currentItem.toString());\r\n \t }\r\n \t \t\r\n \t System.out.println(\"-----MAGAZINES-----\");\r\n \t for(int i=0; i<items.size(); i++) {\r\n \t currentItem = items.get(i);\r\n \t \t //This next line checks if the current item is a magazine.\r\n \t if(currentItem.getItemType() == Item.ItemTypes.MAGAZINE)\r\n \t System.out.println(currentItem.toString());\r\n \t }\r\n\r\n }", "public synchronized void PrintDisplayList()\t{\n\t\tSystem.out.print(\"\\n\\tCar Model:\"+getModel()+\"\\n\\tBase Price is:\"\n +getBasePrice());\n\t\tfor(OptionSet Temp: opset)\n System.out.print(Temp.DisplayOptionSet());\n }", "public void displayAll(){\n System.out.println(\"guestCounter: \" + guestCounter);\n for(int i=0;i<guestCounter;i++){\n guest[i].dispGuest();\n }\n }", "void display() {\n System.out.println(id + \" \" + name);\n }", "public void displayData(){\n\n //Function to display the entries\n int i , j;\n for(i=0;i<number_of_rows;++i){\n\n for(j=0;j<number_of_cols;++j){\n\n System.out.print(dataEntries[i][j]);\n }\n System.out.println(\" \");\n }\n }", "void display() {\n System.out.println(id + \" \" + name + \" \" + age);\n }", "public void printData(){\n for(int i=0; i<list.size(); i++){\n System.out.print(list.get(i) + \" \");\n }\n System.out.println();\n }", "void display() {\n for (int i = 0; i < this.questions.size(); i++)\n this.questions.get(i).display(i, gradeable());\n }", "public void printAll() {\n \tfor (int i = 0; i < Table.size(); i++) {\n \t\tList<T> data = Table.get(i);\n \t\tdata.placeIterator();\n \t\twhile (!data.offEnd()) {\n \t\t\tSystem.out.print(data.getIterator() + \"\\n\");\n \t\t\tdata.advanceIterator();\n \t\t}\n \t\t\n \t}\n }", "public void show() {\r\n\t\tSystem.out.println(\"Id \\t Name \\t Address\");\r\n\t\t\r\n\t\tfor (int index = 0; index < emp.size(); index++) {\r\n\t\t\tSystem.out.println(emp.get(index).empId + \"\\t\" + emp.get(index).name +\"\\t\" + emp.get(index).adress);\r\n\t\t}\r\n\t}", "private void printAllItems() {\n Set<ClothingItem> items = ctrl.getAllItems();\n items.stream().forEach(System.out::println);\n }", "private static void displayItems()\n {\n System.out.println(\"\\n\\tCurrent List of Products in the Store:\\n\");\n for(Sales s : store)\n System.out.println(s.toString());\n }", "protected void display() {\n\r\n\t}", "void display()\n\t {\n\t\t System.out.println(\"Student ID: \"+id);\n\t\t System.out.println(\"Student Name: \"+name);\n\t\t System.out.println();\n\t }", "public void showContent() {\n createStream().forEach(System.out::println);\n }", "void displayAllPosts();", "void display() {\r\n\t\tSystem.out.println(id + \" \" + name);\r\n\t}", "public static void showAllHouse(){\n ArrayList<House> houseList = getListFromCSV(FuncGeneric.EntityType.HOUSE);\n displayList(houseList);\n showServices();\n }", "public void display() {\n\t\tSystem.out.println(\"[\" + recDisplay(head) + \"]\");\n\t}", "@Override\r\n\tpublic void viewAllUsers() {\n\t\tList<User> allUsers = new ArrayList<User>();\r\n\t\tallUsers = udao.getAllUsers();\r\n\t\t\r\n\t\tSystem.out.println(\"ALL USERS:\");\r\n\t\tSystem.out.println(\"ID\\tUsername\\tName\");\r\n\t\t\r\n\t\tfor(int i = 0; i < allUsers.size(); i++) {\r\n\t\t\tUser tempUser = allUsers.get(i);\r\n\t\t\tSystem.out.println(tempUser.getUserID() + \"\\t\" + tempUser.getUsername() + \"\\t\"\r\n\t\t\t\t\t+ tempUser.getFirstName() + \" \" + tempUser.getLastName());\r\n\t\t}\r\n\r\n\t}", "@Override\r\n\tpublic void display() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void display() {\n\t\t\r\n\t}", "public void printList() {\n userListCtrl.showAll();\n }", "public void viewList() {\n\t\tSystem.out.println(\"Your have \" + contacts.size() + \" contacts:\");\n\t\tfor (int i=0; i<contacts.size(); i++) {\n\t\t\tSystem.out.println((i+1) + \". \" \n\t\t\t\t\t+ contacts.get(i).getName() + \" number: \" \n\t\t\t\t\t+ contacts.get(i).getPhoneNum());\n\t\t}\n\t}", "@Override\n public void display(){\n System.out.println(\"Student id: \"+getStudentId()+\"\\nName is: \"+getName()+\"\\nAge :\"+getAge()+\"\\nAcademic year: \"+getSchoolYear()\n +\"\\nNationality :\"+getNationality());\n }", "@Override\r\n public void display() { //implements abstract display() method from Division.java\r\n System.out.println(\"Division Name: \" + getDivisionName());\r\n System.out.println(\"Account Number: \" + getAccountNumber());\r\n\r\n System.out.println(\"Country: \" + getCountry());\r\n System.out.println(\"Language Spoken: \" + getLanguageSpoken() + \"\\n\");\r\n\r\n }", "private void displayData() {\n dataBase = mHelper.getWritableDatabase();\n Cursor mCursor = dataBase.rawQuery(\"SELECT * FROM \"\n + DbHelper.TABLE_NAME, null);\n\n userId.clear();\n user_fName.clear();\n user_lName.clear();\n user_size.clear();\n user_pay.clear();\n user_produce.clear();\n user_genre.clear();\n if (mCursor.moveToFirst()) {\n do {\n userId.add(mCursor.getString(mCursor.getColumnIndex(DbHelper.KEY_ID)));\n user_fName.add(mCursor.getString(mCursor.getColumnIndex(DbHelper.KEY_FNAME)));\n user_lName.add(mCursor.getString(mCursor.getColumnIndex(DbHelper.KEY_LNAME)));\n user_size.add(mCursor.getString(mCursor.getColumnIndex(DbHelper.KEY_SIZE)));\n user_pay.add(mCursor.getString(mCursor.getColumnIndex(DbHelper.KEY_PAY)));\n user_produce.add(mCursor.getString(mCursor.getColumnIndex(DbHelper.KEY_PRODUCE)));\n user_genre.add(mCursor.getString(mCursor.getColumnIndex(DbHelper.KEY_GENRE)));\n\n } while (mCursor.moveToNext());\n }\n DisplayAdapter disadpt = new DisplayAdapter(DisplayActivity.this, userId, user_fName, user_lName, user_size, user_pay, user_produce, user_genre);\n userList.setAdapter(disadpt);\n mCursor.close();\n }", "private void displayData(){\n\t\t\t//Get the emergency contact info\n\t\t\tEmergencyContactInfo emergencyContactInfo = DataStore.getEmergencyContactInfo(getActivity());\n\t\t\t\t\t\t\t\t\n\t\t\tif(emergencyContactInfo != null)\n\t\t\t\tmContactsSection.displayData(emergencyContactInfo);\n\t\t\t\n\t\t}", "public void display() {\n System.out.println(toString());\n }", "public static String showAll(){\n return resultsMap.toString();\n }", "public void display() {\n\t\t\n\t}", "public void display() {\n\t\t\n\t}", "@Override\r\n\tpublic void print()\r\n\t{\t//TODO méthode à compléter (TP1-ex11)\r\n\t\tfor (IndexEntry indexEntry : data) {\r\n\t\t\tif(indexEntry ==null){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.println(indexEntry.toString());\r\n\t\t}\r\n\t}", "public void display() {\n System.out.println(\"Title: \" + this.title);\n System.out.println(\"Description: \" + this.des);\n System.out.println(\"Price Per Night: $\" + this.price);\n System.out.println(\"Max Guests: \" + this.guests);\n System.out.println(\"Length of stay: \" + this.days + \" days\");\n System.out.println(\"Total for stay: $\" + this.total);\n System.out.println(\"-----------------------------------\");\n }", "private void printAll() {\n int numberToPrint = searchResultsTable.getItems().size();\n\n FXMLCustomerController printController = new FXMLCustomerController();\n printController = (FXMLCustomerController) printController.load();\n printController.setUpPrint(numberToPrint);\n\n if (printController.okToPrint()) {\n System.out.println(\"Printing\");\n printController.getStage().show();\n for (SearchRowItem eachItem : searchResultsTable.getItems()) {\n printController.setCustomerDetails(eachItem);\n printController.print();\n System.out.println(\"Printed : \" + eachItem.toString());\n }\n printController.endPrint();\n //printController.getStage().hide();\n }\n }", "public void show()\n {\n System.out.println( getFullName() + \", \" +\n String.format(Locale.ENGLISH, \"%.1f\", getAcademicPerformance()) + \", \" +\n String.format(Locale.ENGLISH,\"%.1f\", getSocialActivity()) + \", \" +\n String.format(Locale.ENGLISH,\"%.1f\", getCommunicability()) + \", \" +\n String.format(Locale.ENGLISH,\"%.1f\", getInitiative()) + \", \" +\n String.format(Locale.ENGLISH,\"%.1f\", getOrganizationalAbilities())\n );\n }", "public void viewAll() {\n click(viewAllLink);\n }", "public void DisplayAllEmployees(){\r\n String format = \"%-20s %-20s %-9s\";\r\n System.out.println(\"\\n\");\r\n System.out.printf(format, \"|\"+\" Name \", \"|\"+\" Department \", \"|\"+\" phone number|\"+\"\\n\");\r\n System.out.println(\"----------------------------------------------------------\");\r\n for(Employee employee: listOfEmployees){\r\n System.out.format(format,\"|\"+employee.name,\"|\"+employee.departmentName,\"|\"+employee.contactNumber+\" |\"+ \"\\n\");\r\n }\r\n }", "public void display() {\n \t\tSystem.out.printf(\"|%6s \", String.valueOf(idNumber));\n\t\tSystem.out.printf(\"|%13s |\", name);\n\t\tSystem.out.printf(\"%10s |\", quantity);\n\t\tSystem.out.printf(\"%8.2f |\", price);\n\t\tSystem.out.printf(\"%16s |\", \" \");\n\t\tSystem.out.printf(\"%16s |\", \" \");\n\t\tSystem.out.println();\n }", "public void display()\r\n\t{\r\n\t\t\r\n\t}", "public void display() {\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tSystem.out.print(a[i] + \"\\t\");\n\t\t}\n\t\tSystem.out.println();\n\t}", "public void displayAll(int index) \n\t{\n\t\tBusinessContact b = this.contacts.get(index);\n\t\tSystem.out.printf(\"%n%-20s%-15s%-20s%-15s%n\", \"Name\", \"Phone\", \"Email\",\n\t\t\t\t\"Company\");\n\t\tSystem.out.printf(\"%n%-20s%-15s%-20s%-15s%n\", \"----\", \"-----\", \"-----\",\n\t\t\t\t\"-------\");\n\t\tSystem.out.printf(\"%n%-20s%-15s%-20s%-15s%n\", b.getLastName() + \", \"\n\t\t\t\t+ b.getFirstName(), b.getPhoneNumber(), b.getEmailAddress(),\n\t\t\t\tb.getCompany());\n\t}", "private void viewAllStudents() {\n Iterable<Student> students = ctrl.getStudentRepo().findAll();\n students.forEach(System.out::println);\n }", "@Override\n\tpublic void getAll() {\n\t\tfor (int i = 0; i < dto.length; i++) {\n\t\t\tSystem.out.println(dto[i]);\n\t\t}\n\n\t}", "public void displayAll()\n {\n try\n {\n int i=0;\n for(HardwareDevice equip:equipment)\n {\n System.out.println(\"Equipment Number : \"+i);\n i++;\n equip.DisplayHardwareDevice();\n }\n }\n catch(NumberFormatException aE)\n {\n JOptionPane.showMessageDialog(frame, aE.getMessage(), \"Error\", JOptionPane.ERROR_MESSAGE);\n }\n }", "public void display(){\r\n System.out.println(\"The Vacancy Number is : \" + getVacancyNumber());\r\n System.out.println(\"The Designation is : \" + getDesignation());\r\n System.out.println(\"The Job Type is : \" + getJobType());\r\n }", "public void display () {\n System.out.println(rollNo + \" \" + name + \" \" + college );\n }", "public static void showAllVilla(){\n ArrayList<Villa> villaList = getListFromCSV(FuncGeneric.EntityType.VILLA);\n displayList(villaList);\n showServices();\n }", "public void printData () {\n System.out.println (products.toString ());\n }", "@Override\n\tpublic void display() {\n\t\tSystem.out.println(\"Pasos dados por \" + a.nombre + \" \" + a.distancia + \" m = \" + pasosActividad + \" / Pasos en total = \" + pasosTotal);\n\t}", "public void displayAllRooms(){\n for(int i=0;i<roomCounter;i++){\n myHotel[i].Display();\n System.out.println();\n }\n }", "public void showInfo(){\n\t\tfor (int i = 0; i < this.cd.size(); i++) {\n\t\t\tthis.cd.get(i).showInfo();\n\t\t}\n\t\tSystem.out.println(\"\\tToatl amount: \" + calTotalAmount());\n\t}", "public void displayData(MongoCollection<Document> collection) {\n\n\t\ttry {\n\t\t\tFindIterable<Document> iterDoc = collection.find(); \n\t\t\tMongoCursor<Document> it = iterDoc.iterator(); \n\n\t\t\twhile (it.hasNext()) { \n\t\t\t\tSystem.out.println(it.next()); \n\t\t\t}\n\t\t}catch(Exception e) {}\n\t}", "public void display() {\n\t}", "public void displayAllInfo(){\nSystem.out.println(\"Dimensions of the room - length in feet : \" + room.getLengthInFeet() + \" width in feet :\" + room.getWidthInFeet());\nSystem.out.println(\"Price per square foot :\" + pricePerSquareFoot);\nSystem.out.println(\"Total Cost :\" + calculateTotalCost());\n}", "@Override\n\tpublic void display() {\n\n\t}", "@Override\n\tpublic void display() {\n\n\t}", "@Override\n\tpublic void display() {\n\n\t}", "public void print() {\n for (int i = 0; i < headers.length; i++) {\n System.out.printf(headers[i] + \", \"); // Print column headers.\n }\n System.out.printf(\"\\n\");\n for (int i = 0; i < (data.length - 1); i++) {\n for (int j = 0; j < data[i].length; j++) {\n System.out.printf(data[i][j] + \" \"); // Print value at i,j.\n }\n System.out.printf(\"\\n\");\n }\n }", "@Override\n\tpublic void display() {\n\t\t\n\t}", "@Override\n\tpublic void display() {\n\t\t\n\t}", "public void showInfo() {\n\t\tfor (String key : list.keySet()) {\n\t\t\tSystem.out.println(\"\\tID: \" + key + list.get(key).toString());\n\t\t}\n\t}", "private void displayData() {\n if (mOutlet1State) {\n //print value\n mCurrent1.setText(returnCurrent(4));\n } else {\n mCurrent1.setText(R.string.off);\n }\n //print timer data\n if (mTimer1State) {\n //print time remaining\n mTimer1.setText(returnControllerTime(7));\n } else {\n mTimer1.setText(R.string.disabled);\n }\n\n //outlet 2\n //print current\n if (mOutlet2State) {\n //print value\n mCurrent2.setText(returnCurrent(12));\n } else {\n mCurrent2.setText(R.string.off);\n }\n //print timer data\n if (mTimer2State) {\n //print time remaining\n mTimer2.setText(returnControllerTime(15));\n } else {\n mTimer2.setText(R.string.disabled);\n }\n }", "public void showResults(){\n customerCount = simulation.getCustomerCount();\n phoneCount = simulation.getPhoneCount();\n doorCount = simulation.getDoorCount();\n unhelpedCount = simulation.getUnhelped();\n totalCus.setText(\"Total number of Customers: \"+customerCount+\"\\t\\t\");\n doorCus.setText(\"Number of Door Customers: \"+doorCount+\"\\t\\t\");\n phoneCus.setText(\"Number of Phone Customers: \"+phoneCount+\"\\t\\t\");\n unhelped.setText(\"Number of Customers left unhelped at the end: \"+unhelpedCount);\n }", "public void showListData() {\n List<Operator> operators = operatorService.queryAll();\n String[][] datas = new String[operators.size()][8];\n for (int i = 0; i < datas.length; i++) {\n datas[i][0] = operators.get(i).getId().toString();\n datas[i][1] = operators.get(i).getName();\n datas[i][2] = operators.get(i).getSex();\n datas[i][3] = operators.get(i).getAge().toString();\n datas[i][4] = operators.get(i).getIdentityCard();\n datas[i][5] = operators.get(i).getWorkDate().toString();\n datas[i][6] = operators.get(i).getTel();\n datas[i][7] = operators.get(i).getAdmin().toString();\n }\n operatorManagetable.setModel(new DefaultTableModel(\n datas, new String[]{\"编号\", \"用户名\", \"性别\", \"年龄\", \"证件号\", \"工作时间\", \"电话号码\", \"是否为管理员\"}\n ));\n scrollPane1.setViewportView(operatorManagetable);\n }", "public void showAllTask(View v){\n Cursor res = taskManager.showAllTask();\n if(res.getCount()==0){\n //Toast.makeText(this,\"No Data Available\",Toast.LENGTH_LONG).show();\n showTaskMessage(\"Error\",\"No Data Found\");\n return;\n }else{\n StringBuffer buffer = new StringBuffer();\n while(res.moveToNext()){\n buffer.append(\"taskId : \"+res.getString(0)+\"\\n\");\n buffer.append(\"taskName : \"+res.getString(1)+\"\\n\");\n buffer.append(\"taskDescription : \"+res.getString(2)+\"\\n\");\n }\n showTaskMessage(\"Data\",buffer.toString());\n }\n }", "abstract public void showAllStudents();", "@Override\r\n\tpublic void display() {\n\r\n\t}", "public void showData()\n\t\t{\n\t\t\ttry {\n\t\t\t\tcon=DriverManager.getConnection(\"jdbc:mysql://localhost:3306/MundheElectronics1\",\"root\",\"vishakha\");\n\t\t\t\tString sql=\"select *from ComplaintsData\";\n\t\t\t\tps=con.prepareStatement(sql);\n\t\t\t\trs=ps.executeQuery();\n\t\t\t\ttable.setModel(DbUtils.resultSetToTableModel(rs));\n\t\t\t\t\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}", "protected List<Map<String, Object>> show() {\n List<Map<String, Object>> output = new ArrayList<>();\n try {\n ResultSet rs;\n try (PreparedStatement stmt = DBConnect.getConnection()\n .prepareStatement(String.format(\"SELECT * FROM %s WHERE userID = ?\", table))) {\n stmt.setLong(1, userId);\n rs = stmt.executeQuery();\n }\n output = DBConnect.resultsList(rs);\n rs.close();\n DBConnect.close();\n } catch (SQLException e) {\n Logger.getLogger(DBConnect.class.getName()).log(Level.SEVERE, \"Failed select\", e);\n }\n return output;\n }", "public PrintAllRecords() {\n initComponents();\n }", "public void view() {\r\n\t\tfor (int i = 0; i < this.getTableNumber(); i++) {\r\n\t\t\tthis.getTables(i).view();\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}", "public void showCatalogue() {\n for (Record r : cataloue) {\n System.out.println(r);\n }\n }", "@Override\n\tpublic void displayTheDatabase() {\n\t\t\n\t}", "void display(){\n System.out.println(\"Name:\"+name);\n System.out.println(\"Age:\"+age);\n System.out.println(\"Faculty:\"+faculty);\n System.out.println(\"Department:\"+department);\n System.out.println(\"IsHandicapped:\"+isHandicapped);\n }", "public void displayEmployees(){\n System.out.println(\"NAME --- SALARY --- AGE \");\n for (Employee employee : employees) {\n System.out.println(employee.getName() + \" \" + employee.getSalary() + \" \" + employee.getAge());\n }\n }", "private void displayListings() {\r\n\r\n //Lists all current listings\r\n System.out.println(\"Current Listings: \\n\" + cars.getListings());\r\n placeBid();\r\n }", "public void listAll() {\n\t\tfor (Cineplex m: records) {\n\t\t\tSystem.out.printf(\"(ID: %s) %s\\n\", m.getId(), m.getName());\n\t\t}\n\t}", "@Override\n public void display() {\n\n }", "void display() {\n System.out.println(\"============================================================================================\");\n System.out.println(\"Name of the book:: \" + Bname);\n System.out.println(\"Price of the book:: Rs \" + price);\n System.out.println(\"============================================================================================\");\n }", "public void display()\n {\n for (int i = 0; i < length; i++)\n {\n System.out.print(list[i] + \" \");\n }\n\n System.out.println();\n }", "private void printData() {\n\n\t\tfor (int i = 0; i < data.size(); i++) {\n\t\t\tlog(\" *** data index \" + i + \" = \" + data.elementAt(i));\n\t\t}\n\t}", "public void display() {\n\t\tdisplayColumnHeaders();\n\t\taddHyphens();\n\t\tfor (int row = 0; row < 3; row++) {\n\t\t\taddSpaces();\n\t\t\tSystem.out.print(\" row \" + row + ' ');\n\t\t\tfor (int col = 0; col < 3; col++)\n\t\t\t\tSystem.out.print(\"| \" + getMark(row, col) + \" \");\n\t\t\tSystem.out.println(\"|\");\n\t\t\taddSpaces();\n\t\t\taddHyphens();\n\t\t}\n\t}" ]
[ "0.76403314", "0.75942403", "0.73437047", "0.73257947", "0.71045804", "0.70949316", "0.7074664", "0.70687", "0.69947726", "0.69237775", "0.69108504", "0.68128747", "0.68024004", "0.67370075", "0.6700686", "0.66936237", "0.66932935", "0.66648835", "0.6648856", "0.6624713", "0.66243243", "0.66193014", "0.66164434", "0.6609", "0.66044074", "0.6597553", "0.6597054", "0.6574332", "0.6560573", "0.6558125", "0.65460587", "0.6541242", "0.6535501", "0.65306544", "0.65283436", "0.6515555", "0.65073526", "0.64944476", "0.6488165", "0.6488165", "0.64823383", "0.6472197", "0.64674085", "0.645772", "0.6442969", "0.64357024", "0.6432451", "0.6428147", "0.6428141", "0.6428141", "0.64084977", "0.64046454", "0.63839805", "0.63827217", "0.6370854", "0.6365846", "0.6359624", "0.63450515", "0.6343689", "0.6342236", "0.6340775", "0.6340545", "0.63394433", "0.6333925", "0.63279974", "0.6325178", "0.6324015", "0.6319035", "0.6311223", "0.6304583", "0.6275783", "0.6271205", "0.6260912", "0.6257377", "0.6257377", "0.6257377", "0.6242205", "0.62394947", "0.62394947", "0.6235573", "0.6233634", "0.6231304", "0.62302893", "0.62273115", "0.6226317", "0.6222", "0.62190324", "0.6211496", "0.6211233", "0.62025005", "0.6197429", "0.61957467", "0.6186142", "0.61704624", "0.6169796", "0.61686873", "0.6155565", "0.6154464", "0.6154126", "0.615352", "0.6153086" ]
0.0
-1
If the tree exists, delete tree
private void deleteTree(tnode root){ if (root != null) root = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void deleteTree(TreeNode node) \n {\n root = null; \n }", "public void delete() {\n this.root = null;\n }", "public boolean removeTree(String treeName);", "public boolean Delete(int num) {\r\n\t\t//initialize boolean field, set to true if value found in tree\r\n\t\tboolean found;\r\n\t\t//initialize the parent node using the TreeNodeWrapper\r\n\t\tTreeNodeWrapper p = new TreeNodeWrapper();\r\n\t\t//initialize the child node using the TreeNodeWrapper\r\n\t\tTreeNodeWrapper c = new TreeNodeWrapper();\r\n\t\t//initialize largest field to re-allocate parent/child nodes\r\n\t\tTreeNode largest;\r\n\t\t//initialize nextLargest field to re-allocate parent/child nodes\r\n\t\tTreeNode nextLargest;\r\n\t\t//found set to true if FindNode methods locates value in the tree\r\n\t\tfound = FindNode(num, p, c);\r\n\t\t//if node not found return false\r\n\t\tif(found == false)\r\n\t\t\treturn false;\r\n\t\telse //identify the case number\r\n\t\t{\r\n\t\t\t//case 1: deleted node has no children\r\n\t\t\t//if left and right child nodes of value are both null node has no children\r\n\t\t\tif(c.Get().Left == null && c.Get().Right == null)\r\n\t\t\t\t//if parent left node is equal to child node then deleted node is a left child\r\n\t\t\t\tif(p.Get().Left == c.Get())\r\n\t\t\t\t\tp.Get().Left = null;\r\n\t\t\t\telse //deleted node is a right child\r\n\t\t\t\t\tp.Get().Right = null;\r\n\t\t\t//case 2: deleted node has 1 child\r\n\t\t\t//if deleted node only has 1 child node\r\n\t\t\telse if(c.Get().Left == null || c.Get().Right == null)\r\n\t\t\t{\r\n\t\t\t\t//if parent left node is equal to child node then deleted node is a left child\r\n\t\t\t\tif(p.Get().Left == c.Get())\r\n\t\t\t\t{\r\n\t\t\t\t\t//if deleted node is a left child then set deleted node child node as child to parent node\r\n\t\t\t\t\tif(c.Get().Left != null) //deleted node has a left child\r\n\t\t\t\t\t\tp.Get().Left = c.Get().Left;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tp.Get().Left = c.Get().Right;\r\n\t\t\t\t}\r\n\t\t\t\telse //if deleted node is a right child then set deleted node child node as child to parent node\r\n\t\t\t\t{\r\n\t\t\t\t\tif(c.Get().Left != null) //deleted node has a left child\r\n\t\t\t\t\t\tp.Get().Right = c.Get().Left;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tp.Get().Right = c.Get().Right;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//case 3: deleted node has two children\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t//set the nextLargest as the left child of deleted node\r\n\t\t\t\tnextLargest = c.Get().Left;\r\n\t\t\t\t//set the largest as the right node of the nextLargest node\r\n\t\t\t\tlargest = nextLargest.Right;\r\n\t\t\t\t//if right node is not null then left child has a right subtree\r\n\t\t\t\tif(largest != null) \r\n\t\t\t\t{\r\n\t\t\t\t\t//while loop to move down the right subtree and re-allocate after node is deleted\r\n\t\t\t\t\twhile(largest.Right != null) //move down right subtree\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tnextLargest = largest;\r\n\t\t\t\t\t\tlargest = largest.Right;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//overwrite the deleted node\r\n\t\t\t\t\tc.Get().Data = largest.Data; \r\n\t\t\t\t\t// save the left subtree\r\n\t\t\t\t\tnextLargest.Right = largest.Left; \r\n\t\t\t\t}\r\n\t\t\t\telse //left child does not have a right subtree\r\n\t\t\t\t{\r\n\t\t\t\t\t//save the right subtree\r\n\t\t\t\t\tnextLargest.Right = c.Get().Right; \r\n\t\t\t\t\t//deleted node is a left child\r\n\t\t\t\t\tif(p.Get().Left == c.Get()) \r\n\t\t\t\t\t\t//jump around deleted node\r\n\t\t\t\t\t\tp.Get().Left = nextLargest; \r\n\t\t\t\t\telse //deleted node is a right child\r\n\t\t\t\t\t\tp.Get().Right = nextLargest; //jump around deleted node\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//return true is delete is successful\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "private BinarySearchTree deleteTree(BinarySearchTree tree, Comparable key){\r\n\t\t\r\n\t\t//If it is a leaf\r\n\t\tif(tree.getLeftChild() == null && tree.getRightChild() == null){\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t//Tree has only 1 leaf\r\n\t\telse if( (tree.getLeftChild() == null && tree.getRightChild() != null) ||\r\n\t\t\t\t (tree.getLeftChild() != null && tree.getRightChild() == null)){\r\n\t\t\t\r\n\t\t\t//Make a new tree out of the leaf and make it the new root\r\n\t\t\tif(tree.getLeftChild() != null){\r\n\t\t\t\treturn tree.getLeftChild();\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\treturn tree.getRightChild();\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Has two leaves. This case is slightly more complicated\r\n\t\telse{\r\n\t\t\t//get the leftmost item in the right child subtree. This becomes the \r\n\t\t\t//new root. This allows the BinarySearchTree to stay a valid \r\n\t\t\t//BinarySearchTree\r\n\t\t\tKeyedItem replacementItem = findLeftMost(tree.getRightChild());\r\n\t\t\t\r\n\t\t\t//Delete the tree with that item so it can be moved to the new root\r\n\t\t\tBinarySearchTree replacementTree = deleteLeftMost(tree.getRightChild());\r\n\t\t\t\r\n\t\t\t//change the root to the new item\r\n\t\t\ttree.setRootItem(replacementItem);\r\n\t\t\t\r\n\t\t\t//Set the new roots right tree to the replacement tree\r\n\t\t\ttree.attachRightSubtree(replacementTree);\r\n\t\t\treturn tree;\r\n\t\t}\r\n\t}", "public void deleteNode() {\n TreeNode pNode = this.getParentNode();\n int id = this.getSelfId();\n\n if (pNode != null) {\n pNode.deleteChildNode(id);\n }\n }", "void deleteTreeRef(TreeNode nodeRef) \n { \n \tif(nodeRef == null) return;\n \t\n \t\n \tdeleteTreeRef(nodeRef.left);\n\n \tdeleteTreeRef(nodeRef.right);\n \t\n \t\n \t System.out.println(\"Deleting node:\" + nodeRef.val);\n \t deleteTree(nodeRef); \n \n nodeRef=null; \n }", "public void deleteNode ()\n {\n ConfigTreeNode node = _tree.getSelectedNode();\n ConfigTreeNode parent = (ConfigTreeNode)node.getParent();\n int index = parent.getIndex(node);\n ((DefaultTreeModel)_tree.getModel()).removeNodeFromParent(node);\n int ccount = parent.getChildCount();\n node = (ccount > 0) ?\n (ConfigTreeNode)parent.getChildAt(Math.min(index, ccount - 1)) : parent;\n if (node != _tree.getModel().getRoot()) {\n _tree.setSelectionPath(new TreePath(node.getPath()));\n }\n DirtyGroupManager.setDirty(group, true);\n }", "public boolean delete(String name)\r\n\t{\r\n\t\t// Find the location of the Node with the search method and assign it to current\r\n\t\tNode current = search(name);\r\n\t\t\r\n\t\t// Return False if the Node was not found\r\n\t\tif(current == null)\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t// Special case of deleting the root Node\r\n\t\tif(current == getRoot())\r\n\t\t{\r\n\t\t\t// Root has no children (aka is a leaf)\r\n\t\t\tif(getRoot().isLeaf())\r\n\t\t\t{\r\n\t\t\t\t// Deleting the Root (aka destroying the Binary Tree)\r\n\t\t\t\tdestroy();\r\n\t\t\t}\r\n\t\t\t// Root only has a left child\r\n\t\t\telse if(getRoot().getRightChild() == null)\r\n\t\t\t{\r\n\t\t\t\t// Make the left child of the deleted Root the new Root\r\n\t\t\t\tsetRoot(current.getLeftChild());\r\n\t\t\t\tcurrent.getLeftChild().setParent(null);\r\n\t\t\t\tdecrementCounter();\r\n\t\t\t}\r\n\t\t\t// Root only has a right child\r\n\t\t\telse if(getRoot().getLeftChild() == null)\r\n\t\t\t{\r\n\t\t\t\t// Make the right child of the deleted Root the new Root\r\n\t\t\t\tsetRoot(current.getRightChild());\r\n\t\t\t\tcurrent.getRightChild().setParent(null);\r\n\t\t\t\tdecrementCounter();\r\n\t\t\t}\r\n\t\t\t// Root has two children\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t// Find the minimum of the Right Subtree of the Node to delete to use as the replacement\r\n\t\t\t\tNode minimum = findMinimum(current.getRightChild());\r\n\t\t\t\t\r\n\t\t\t\t// Copy the String from the minimum Node to the original Node we were supposed to delete\r\n\t\t\t\tcurrent.setName(minimum.getName());\r\n\t\t\t\t\r\n\t\t\t\t// Delete what used to be the minimum from the Tree\r\n\t\t\t\t// The minimum is the right child of its parent\r\n\t\t\t\tif(minimum.getParent().getRightChild() == minimum)\r\n\t\t\t\t{\r\n\t\t\t\t\t// Minimum by definition cannot have a left child, however:\r\n\t\t\t\t\t// The minimum has no children\r\n\t\t\t\t\tif(minimum.getRightChild() == null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// Just delete the minimum\r\n\t\t\t\t\t\tminimum.getParent().setRightChild(null);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// The minimum has a right child\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// Delete the minimum but connect its child and its parent\r\n\t\t\t\t\t\tminimum.getParent().setRightChild(minimum.getRightChild());\r\n\t\t\t\t\t\tminimum.getRightChild().setParent(minimum.getParent());\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Node was deleted so adjust the counter accordingly\r\n\t\t\t\t\tdecrementCounter();\r\n\t\t\t\t}\r\n\t\t\t\t// The minimum is the left child of its parent\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t// Minimum by definition cannot have a left child, however:\r\n\t\t\t\t\t// The minimum has no children\r\n\t\t\t\t\tif(minimum.getRightChild() == null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// Just delete the minimum\r\n\t\t\t\t\t\tminimum.getParent().setLeftChild(null);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// The minimum has a right child\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// Delete the minimum but connect its child and its parent\r\n\t\t\t\t\t\tminimum.getParent().setLeftChild(minimum.getRightChild());\r\n\t\t\t\t\t\tminimum.getRightChild().setParent(minimum.getParent());\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Node was deleted so adjust the counter accordingly\r\n\t\t\t\t\tdecrementCounter();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}// END special root case\r\n\t\t// Deleting any other Node besides the root\r\n\t\telse\r\n\t\t{\r\n\t\t\t// Node to delete has no children (aka is a leaf)\r\n\t\t\tif(current.isLeaf())\r\n\t\t\t{\r\n\t\t\t\t// Delete the Node by finding out what type of child it is\r\n\t\t\t\t// Node is a left child\r\n\t\t\t\tif(current.getParent().getLeftChild() == current)\r\n\t\t\t\t{\r\n\t\t\t\t\tcurrent.getParent().setLeftChild(null);\r\n\t\t\t\t}\r\n\t\t\t\t// Node is a right child\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tcurrent.getParent().setRightChild(null);\r\n\t\t\t\t}\r\n\t\t\t\t// Node was deleted so adjust the counter accordingly\t\r\n\t\t\t\tdecrementCounter();\r\n\t\t\t}\r\n\t\t\t// Node to delete only has a left child\r\n\t\t\telse if(current.getRightChild() == null)\r\n\t\t\t{\r\n\t\t\t\t// Connect the Node to delete's parent and left child\r\n\t\t\t\t// Need to first find out what type of child the Node to delete is\r\n\t\t\t\t// Node is a left child\r\n\t\t\t\tif(current.getParent().getLeftChild() == current)\r\n\t\t\t\t{\r\n\t\t\t\t\tcurrent.getLeftChild().setParent(current.getParent());\r\n\t\t\t\t\tcurrent.getParent().setLeftChild(current.getLeftChild());\r\n\t\t\t\t}\r\n\t\t\t\t// Node is a right child\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tcurrent.getLeftChild().setParent(current.getParent());\r\n\t\t\t\t\tcurrent.getParent().setRightChild(current.getLeftChild());\r\n\t\t\t\t}\r\n\t\t\t\t\t// Node was deleted so adjust the counter accordingly\r\n\t\t\t\t\tdecrementCounter();\r\n\t\t\t}\r\n\t\t\t// Node to delete only has a right child\r\n\t\t\telse if(current.getLeftChild() == null)\r\n\t\t\t{\r\n\t\t\t\t// Connect the Node to delete's parent and right child\r\n\t\t\t\t// Need to first find out what type of child the Node to delete is\r\n\t\t\t\t// Node is a left child\r\n\t\t\t\tif(current.getParent().getLeftChild() == current)\r\n\t\t\t\t{\r\n\t\t\t\t\tcurrent.getRightChild().setParent(current.getParent());\r\n\t\t\t\t\tcurrent.getParent().setLeftChild(current.getRightChild());\r\n\t\t\t\t}\r\n\t\t\t\t// Node is a right child\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tcurrent.getRightChild().setParent(current.getParent());\r\n\t\t\t\t\tcurrent.getParent().setRightChild(current.getRightChild());\r\n\t\t\t\t}\r\n\t\t\t\t\t// Node was deleted so adjust the counter accordingly\r\n\t\t\t\t\tdecrementCounter();\r\n\t\t\t}\r\n\t\t\t// Node to delete has two children\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t// Find the minimum of the Right Subtree of the Node to delete to use as the replacement\r\n\t\t\t\tNode minimum = findMinimum(current.getRightChild());\r\n\t\t\t\t\r\n\t\t\t\t// Copy the String from the minimum Node to the Node we were supposed to delete\r\n\t\t\t\tcurrent.setName(minimum.getName());\r\n\t\t\t\t\r\n\t\t\t\t// Delete what used to be the minimum from the Tree\r\n\t\t\t\t// The minimum is the right child of its parent\r\n\t\t\t\tif(minimum.getParent().getRightChild() == minimum)\r\n\t\t\t\t{\r\n\t\t\t\t\t// Minimum by definition cannot have a left child, however:\r\n\t\t\t\t\t// The minimum has no children\r\n\t\t\t\t\tif(minimum.getRightChild() == null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// Just delete the minimum\r\n\t\t\t\t\t\tminimum.getParent().setRightChild(null);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// The minimum has a right child\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// Delete the minimum but connect its child and its parent\r\n\t\t\t\t\t\tminimum.getParent().setRightChild(minimum.getRightChild());\r\n\t\t\t\t\t\tminimum.getRightChild().setParent(minimum.getParent());\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Node was deleted so adjust the counter accordingly\r\n\t\t\t\t\tdecrementCounter();\r\n\t\t\t\t}\r\n\t\t\t\t// The minimum is the left child of its parent\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t// Minimum by definition cannot have a left child, however:\r\n\t\t\t\t\t// The minimum has no children\r\n\t\t\t\t\tif(minimum.getRightChild() == null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// Just delete the minimum\r\n\t\t\t\t\t\tminimum.getParent().setLeftChild(null);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// The minimum has a right child\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// Delete the minimum but connect its child and its parent\r\n\t\t\t\t\t\tminimum.getParent().setLeftChild(minimum.getRightChild());\r\n\t\t\t\t\t\tminimum.getRightChild().setParent(minimum.getParent());\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Node was deleted so adjust the counter accordingly\r\n\t\t\t\t\tdecrementCounter();\r\n\t\t\t\t}\r\n\t\t\t}\t\t\t\r\n\t\t}// END of deleting any case except for Root\r\n\t\t\r\n\t\t// Balance the tree only if necessary - the current depth of the tree is greater than what it should be based on \r\n\t\t// the total amount of Nodes in the tree\r\n\t\tif(depth() > howManyLevels())\r\n\t\t{\r\n\t\t\tbalance();\r\n\t\t}\r\n\t\t// A Node was deleted so return true\r\n\t\treturn true;\r\n\t}", "private static void delTree(BoardTree root) {\n if (root.children == null) return;\n for (BoardTree child : root.children) {\n delTree(child);\n }\n root.children.clear();\n root = null;\n }", "public static void testTreeDelete()\n {\n ArrayList<Tree<String>> treelist = new ArrayList<Tree<String>>();\n treelist.add(new BinaryTree<String>());\n treelist.add(new AVLTree<String>());\n treelist.add(new RBTree<String>());\n treelist.add(new SplayTree<String>());\n\n System.out.println(\"Start TreeDelete test\");\n for(Tree<String> t : treelist)\n {\n\n try\n {\n RobotRunner.loadDictionaryIntoTree(\"newDutch.dic\", t);\n// RobotRunner.loadDictionaryIntoTree(\"smallDutch.dic\", t);\n// RobotRunner.loadDictionaryIntoTree(\"Dutch.dic\", t); //Won't work with BinaryTree and SplayTree, too many items == StackOverflow\n// RobotRunner.loadDictionaryIntoTree(\"dict.txt\", t); //Won't work with BinaryTree and SplayTree, too many items == StackOverflow\n }\n catch(IOException e)\n {\n System.out.println(e);\n }\n System.out.println(\"\\nStart Testcase\");\n\n SystemAnalyser.start();\n t.delete(\"aanklotsten\");\n SystemAnalyser.stop();\n\n SystemAnalyser.printPerformance();\n\n System.out.println(\"Stop Testcase\\n\");\n }\n System.out.println(\"Values after test.\");\n SystemAnalyser.printSomeTestValues();\n }", "@Override\n /*\n * Delete an element from the binary tree. Return true if the element is\n * deleted successfully Return false if the element is not in the tree\n */\n public boolean delete(E e) {\n TreeNode<E> parent = null;\n TreeNode<E> current = root;\n while (current != null) {\n if (e.compareTo(current.element) < 0) {\n parent = current;\n current = current.left;\n } else if (e.compareTo(current.element) > 0) {\n parent = current;\n current = current.right;\n } else {\n break; // Element is in the tree pointed at by current\n }\n }\n if (current == null) {\n return false; // Element is not in the tree\n }// Case 1: current has no left children\n if (current.left == null) {\n// Connect the parent with the right child of the current node\n if (parent == null) {\n root = current.right;\n } else {\n if (e.compareTo(parent.element) < 0) {\n parent.left = current.right;\n } else {\n parent.right = current.right;\n }\n }\n } else {\n// Case 2: The current node has a left child\n// Locate the rightmost node in the left subtree of\n// the current node and also its parent\n TreeNode<E> parentOfRightMost = current;\n TreeNode<E> rightMost = current.left;\n while (rightMost.right != null) {\n parentOfRightMost = rightMost;\n rightMost = rightMost.right; // Keep going to the right\n }\n// Replace the element in current by the element in rightMost\n current.element = rightMost.element;\n// Eliminate rightmost node\n if (parentOfRightMost.right == rightMost) {\n\n parentOfRightMost.right = rightMost.left;\n } else // Special case: parentOfRightMost == current\n {\n parentOfRightMost.left = rightMost.left;\n }\n }\n size--;\n return true; // Element inserted\n }", "public static void delete(Node node){\n // There should be 7 cases here\n if (node == null) return;\n\n if (node.left == null && node.right == null) { // sub-tree is empty case\n if (node.key < node.parent.key) { // node น้อยกว่าข้างบน\n node.parent.left = null;\n }\n else {\n node.parent.right = null;\n }\n\n return;\n }\n\n else if (node.left != null && node.right == null) { // right sub-tree is empty case\n if (node.left.key < node.parent.key) { // sub-tree อยู่ทางซ้ายของ parent\n node.left.parent = node.parent;\n node.parent.left = node.left;\n }\n else {\n node.left.parent = node.parent;\n node.parent.right = node.left;\n }\n return;\n }\n else if (node.right != null && node.left == null) { // left sub-tree is empty case\n if (node.right.key < node.parent.key) { // sub-tree อยู่ทางซ้ายของ parent\n node.right.parent = node.parent;\n node.parent.left = node.right;\n }\n else {\n node.right.parent = node.parent;\n node.parent.right = node.right;\n }\n return;\n }\n else { // full node case\n // หา min ของ right-subtree เอา key มาเขียนทับ key ของ node เลย\n Node n = findMin(node.right);\n node.key = n.key;\n delete(n);\n }\n }", "public TreeNode<T> delete(TreeNode<T> root, T info) {\n\t\tif(null == root || info == null) {\n\t\t\treturn root;\n\t\t} else {\n\t\t\treturn deleteNode(root, info);\n\t\t}\t\t\n\t}", "public void deleteNode(BinaryTreeNode node) // Only leaf nodes and nodes with degree 1 can be deleted. If a degree 1 node is deleted, it is replaced by its subtree.\r\n {\n if(!node.hasRightChild() && !node.hasLeftChild()){\r\n if(node.mActualNode.mParent.mRightChild == node.mActualNode) {\r\n\r\n node.mActualNode.mParent.mRightChild = null;\r\n }\r\n else if(node.mActualNode.mParent.mLeftChild == node.mActualNode) {\r\n\r\n node.mActualNode.mParent.mLeftChild = null;\r\n }\r\n //node.mActualNode = null;\r\n\r\n }\r\n //if deleted node has degree 1 and has only left child\r\n else if(node.hasLeftChild() && !node.hasRightChild()){\r\n node.mActualNode.mLeftChild.mParent = node.mActualNode.mParent;\r\n //if deleted node is left child of his father\r\n if(node.mActualNode.mParent.mLeftChild == node.mActualNode)\r\n node.mActualNode.mParent.mLeftChild = node.mActualNode.mLeftChild;\r\n //if deleted node is right child of his father\r\n else {\r\n\r\n node.mActualNode.mParent.mRightChild = node.mActualNode.mLeftChild;\r\n }\r\n }\r\n // if deleted node has degree 1 and has only right child\r\n else if(node.hasRightChild() && !node.hasLeftChild()){\r\n node.mActualNode.mRightChild.mParent = node.mActualNode.mParent;\r\n\r\n //if node is left child of his father\r\n if(node.mActualNode.mParent.mLeftChild == node.mActualNode) {\r\n\r\n\r\n node.mActualNode.mParent.mLeftChild = node.mActualNode.mRightChild;\r\n\r\n }\r\n //if node is right child of his father\r\n else\r\n node.mActualNode.mParent.mRightChild = node.mActualNode.mRightChild;\r\n\r\n\r\n }\r\n else\r\n System.out.println(\"Error : node has two child\");\r\n\r\n }", "@Override\n\tpublic boolean delete(K key) {\n\t\troot = actualDelete(root, key);\n\t\treturn true;\n\t}", "public void delete(int key) {\n\n\n // There should be 6 cases here\n // Non-root nodes should be forwarded to the static function\n if (root == null) System.out.println(\"Empty Tree!!!\"); // ไม่มี node ใน tree\n else {\n\n Node node = find(key);\n\n if (node == null) System.out.println(\"Key not found!!!\"); //ไม่เจอ node\n\n\n else if(node == root){ //ตัวที่ลบเป็น root\n if (root.left == null && root.right == null) { //ใน tree มีแค่ root ตัสเดียว ก็หายไปสิ จะรอไร\n root = null;\n }\n else if (root.left != null && root.right == null) { //่ root มีลูกฝั่งซ้าย เอาตัวลูกขึ้นมาแทน\n root.left.parent = null;\n root = root.left;\n }\n else { //่ root มีลูกฝั่งขวา เอาตัวลูกขึ้นมาแทน\n Node n = findMin(root.right);\n root.key = n.key;\n delete(n);\n }\n\n }\n\n\n else { //ตัวที่ลบไม่ใช่ root\n delete(node);\n }\n }\n }", "void deleteTreeRef(Node nodeRef) {\n\t\tSystem.out.println(\"\\nSize of given Tree before delete : \" + sizeOfTreeWithRecursion(nodeRef));\n\t\tdeleteTree(nodeRef);\n\t\tnodeRef = null;\n\n\t\tSystem.out.println(\"\\nSize of given Tree after delete : \" + sizeOfTreeWithRecursion(nodeRef));\n\t}", "public boolean delete(Integer key){\n\n TreeNode parent=null;\n TreeNode curr=root;\n\n while (curr!=null && (Integer.compare(key,curr.data)!=0)){\n parent=curr;\n curr=Integer.compare(key,curr.data)>0?curr.right:curr.left;\n }\n\n if(curr==null){ // node does not exist\n\n return false;\n }\n\n TreeNode keyNode=curr;\n\n if(keyNode.right!=null){ //has right subtree\n\n // Find the minimum of Right Subtree\n\n TreeNode rKeyNode=keyNode.right;\n TreeNode rParent=keyNode;\n\n while (rKeyNode.left!=null){\n rParent=rKeyNode;\n rKeyNode=rKeyNode.left;\n }\n\n keyNode.data=rKeyNode.data;\n\n // Move Links to erase data\n\n if(rParent.left==rKeyNode){\n\n rParent.left=rKeyNode.right;\n }else{\n\n rParent.right=rKeyNode.right;\n }\n rKeyNode.right=null;\n\n }else{ // has only left subtree\n\n if(root==keyNode){ // if node to be deleted is root\n\n root=keyNode.left; // making new root\n keyNode.left=null; // unlinking initial root's left pointer\n }\n else{\n\n if(parent.left==keyNode){ // if nodes to be deleted is a left child of it's parent\n\n parent.left=keyNode.left;\n }else{ // // if nodes to be deleted is a right child of it's parent\n\n parent.right=keyNode.left;\n }\n\n }\n\n }\n return true;\n }", "@Override\n\tpublic TreeNode remove() {\n\t\treturn null;\n\t}", "public void deleteNode(TreePath path) {\n \t\tSpatial node = (Spatial) path.getLastPathComponent();\n \t\ttreeModel.deleteNode(node);\n \t\trepaint();\n \t}", "@Test\n public void remove_BST_0_CaseRootOneChildren()\n {\n BinarySearchTree bst = new BinarySearchTree();\n No root = new No(20);\n bst.insert(null, root);\n bst.insert(root, new No(10));\n //bst.printTree();\n //System.err.println(); // Print[ERR] Devido a prioridade do buffer de impressao (out, err)\n \n assertEquals(root, bst.remove(root));\n assertEquals(new Integer(1), bst.size());\n //bst.printTree();\n }", "public boolean delete(int m) {\r\n \r\n System.out.println(\"We are deleting \" + m);\r\n\tbtNode current = root;\r\n btNode parent = root;\r\n boolean LeftChild = true;\r\n\r\n while(current.getData() != m) \r\n {\r\n parent = current;\r\n if(m < current.getData()) \r\n {\r\n LeftChild = true;\r\n current = current.left;\r\n }\r\n else { \r\n LeftChild = false;\r\n current = current.right;\r\n }\r\n if(current == null) \r\n return false; \r\n } // end while\r\n // found node to delete\r\n\r\n // if no children, simply delete it\r\n if(current.left==null && current.right==null)\r\n {\r\n if(current == root) // if root,\r\n root = null; // tree is empty\r\n else if(LeftChild)\r\n parent.left = null; // disconnect\r\n else // from parent\r\n parent.right = null;\r\n }\r\n\r\n // if no right child, replace with left subtree\r\n else if(current.right==null)\r\n if(current == root)\r\n root = current.left;\r\n else if(LeftChild)\r\n parent.left = current.left;\r\n else\r\n parent.right = current.left;\r\n\r\n // if no left child, replace with right subtree\r\n else if(current.left==null)\r\n if(current == root)\r\n root = current.right;\r\n else if(LeftChild)\r\n parent.left = current.right;\r\n else\r\n parent.right = current.right;\r\n\r\n else // two children, so replace with inorder successor\r\n {\r\n // get successor of node to delete (current)\r\n btNode successor = getNext(current);\r\n\r\n // connect parent of current to successor instead\r\n if(current == root)\r\n root = successor;\r\n else if(LeftChild)\r\n parent.left = successor;\r\n else\r\n parent.right = successor;\r\n\r\n // connect successor to current's left child\r\n successor.left = current.left;\r\n } // end else two children\r\n // (successor cannot have a left child)\r\n return true; // success\r\n }", "public void deleteNode(int key){\n\t\t//System.out.println(\" in delete Node \");\n\t\tNode delNode = search(key);\n\t\tif(delNode != nil){\n\t\t\t//System.out.println(\" del \" + delNode.id);\n\t\t\tdelete(delNode);\n\t\t}else{\n\t\t\tSystem.out.println(\" Node not in RB Tree\");\n\t\t}\n\t}", "private void deleteNode(Cat valueToDelete, Node root){\n Node temp = findNode(valueToDelete, root);\n if(temp.getRight()==null){\n Node parent = temp.getParent();\n if(temp.getLeft()==null){\n temp.setParent(null);\n if(temp==parent.getRight()){\n parent.setRight(null);\n fixBalanceValues(parent,-1);\n }\n else{\n parent.setLeft(null);\n fixBalanceValues(parent,1);\n }\n \n }\n else{\n //copy value of leftchild into the node to deletes data and delete it's leftchild\n temp.setData(temp.getLeft().getData());\n temp.setLeft(null);\n fixBalanceValues(temp, 1);\n }\n }\n Node nodeToDelete = temp.getRight();\n if(nodeToDelete.getLeft()==null){\n temp.setData(nodeToDelete.getData());\n temp.setRight(null);\n nodeToDelete.setParent(null);\n fixBalanceValues(temp,-1);\n }\n else{\n while(nodeToDelete.getLeft()!=null){\n nodeToDelete=nodeToDelete.getLeft(); \n } \n temp.setData(nodeToDelete.getData());\n Node parent = nodeToDelete.getParent();\n parent.setLeft(null);\n nodeToDelete.setParent(null);\n fixBalanceValues(parent,1);\n }\n \n \n }", "public void delete(K key)\r\n\t{\r\n\t\tif(search(key) == null) \r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif(root == null) \r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tBSTNode<E,K> node = root;\r\n\t\tBSTNode<E,K> child = null;\r\n\t\tBSTNode<E,K> parent1 = null;\r\n\t\tBSTNode<E,K> parent2 = null;;\r\n\t\tboolean Left = true;\r\n\t\tboolean Left2 = false;\r\n\t\tboolean found = false;\r\n\t\t\r\n\t\twhile(!found)\r\n\t\t{\r\n\t\t\tif(node.getKey().compareTo(key) == 0)\r\n\t\t\t{\r\n\t\t\t\tfound = true;\r\n\t\t\t}\r\n\t\t\telse if(key.compareTo(node.getKey())<=-1)\r\n\t\t\t{\r\n\t\t\t\tif(node.getLeft() != null)\r\n\t\t\t\t{\r\n\t\t\t\t\tparent1 = node;\r\n\t\t\t\t\tnode = node.getLeft();\r\n\t\t\t\t\tLeft = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if(key.compareTo(node.getKey()) >= 1)\r\n\t\t\t{\r\n\t\t\t\tif(node.getRight() != null)\r\n\t\t\t\t{\r\n\t\t\t\t\tparent1 = node;\r\n\t\t\t\t\tnode = node.getRight();\r\n\t\t\t\t\tLeft = false;\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(node.getLeft() != null && node.getRight() != null)\r\n\t\t{\r\n\t\t\tchild = node.getRight();\r\n\t\t\tparent2 = node;\r\n\t\t\twhile(child.getLeft() != null)\r\n\t\t\t{\r\n\t\t\t\tparent2 = child;\r\n\t\t\t\tchild = child.getLeft();\r\n\t\t\t\tLeft2 = true;\r\n\t\t\t}\r\n\t\t\tif(Left2)\r\n\t\t\t{\r\n\t\t\t\tparent2.setLeft(child.getLeft());\t\r\n\t\t\t}\r\n\t\t\telse \r\n\t\t\t{\r\n\t\t\t\tparent2.setRight(child.getLeft());\r\n\t\t\t}\r\n\t\t\tchild.setLeft(node.getLeft());\r\n\t\t\tchild.setRight(node.getRight());\r\n\t\t}\r\n\t\telse if(node.getLeft() == null && node.getRight() != null)\r\n\t\t{\r\n\t\t child = node.getRight();\r\n\t\t}\r\n\t\telse if(node.getLeft() != null && node.getRight() == null)\r\n\t\t{\r\n\t\t\tchild = node.getLeft();\r\n\t\t}\r\n\t\telse if(node.getLeft() == null && node.getRight() == null)\r\n\t\t{\r\n\t\t\tif(Left)\r\n\t\t\t{\r\n\t\t\t\tparent1.setLeft(null);\r\n\t\t\t} \r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tparent1.setRight(null);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif(root == node)\r\n\t\t{\r\n\t\t\troot = child;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif(Left) \r\n\t\t{\r\n\t\t\tparent1.setLeft(child);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tparent1.setRight(child);\r\n\t\t}\r\n\t}", "@Override\n public synchronized boolean deleteNode(Node n){\n if((n.getNodes().size() > 0)) {\n return false;\n }\n //delete all node-tags\n for(Tag t : n.getTags()){\n removeNodeTag(n,t);\n }\n boolean dbResult = dbHandler.deleteNode(n.getID());\n if(dbResult) {\n this.allNodes.remove(n);\n return true;\n }\n else {\n return false;\n }\n }", "private static void leftRightDelete() {\n System.out.println(\"LeftRight Tree Delete Case\");\n AVLTree<Integer> tree1 = new AVLTree<Integer>();\n System.out.println(\"Before insert nodes, tree is empty: \"+tree1.isEmpty());\n \n Integer[] numbers = {50, 30, 60, 40, 10, 70, 35};\n for (int i=0; i<numbers.length; i++) {\n tree1.insert(numbers[i]);\n }\n \n System.out.println(\"After insert nodes, tree is empty: \"+tree1.isEmpty());\n System.out.println(\"Tree looks like: \");\n tree1.printTree();\n tree1.print();\n \n tree1.delete(70);\n System.out.println(\"After delete nodes 70, Tree looks like: \"); \n tree1.printTree();\n tree1.print();\n \n System.out.println(\"Tree is balanced: \"+tree1.checkForBalancedTree());\n System.out.println(\"Tree is a BST: \"+tree1.checkForBinarySearchTree()+\"\\n\");\n }", "private BinaryNode<E> _delete(BinaryNode<E> node, E e) {\n\t\tif (node == null) {\n\t\t\treturn null;\n\t\t}\n\t\tif (comparator.compare(e, node.getData()) < 0) // <, so go left\n\t\t\tnode.setLeftChild(_delete(node.getLeftChild(), e));// recursive call\n\t\telse if (comparator.compare(e, node.getData()) > 0) // >, so go right\n\t\t\tnode.setRightChild(_delete(node.getRightChild(), e));// recursive call\n\t\telse { // FOUND THE NODE\n\t\t\tfoundNode = true;\n\t\t\tnode = _deleteNode(node);\n\t\t}\n\t\treturn node;\n\t}", "private BinarySearchTree deleteLeftMost(BinarySearchTree tree){\r\n\t\t\r\n\t\tif(tree.getLeftChild() == null){\r\n\t\t\t//this is the node we want. No left child\r\n\t\t\t//Right child might exist\r\n\t\t\t\r\n\t\t\treturn tree.getRightChild();\r\n\t\t}\r\n\t\telse{\r\n\t\t\tBinarySearchTree replacement = deleteLeftMost(tree.getLeftChild());\r\n\t\t\ttree.attachRightSubtree(replacement);\r\n\t\t\treturn tree;\r\n\t\t}\r\n\t}", "private static void rightLeftDelete() {\n System.out.println(\"RightLeft Tree Delete Case\");\n AVLTree<Integer> tree1 = new AVLTree<Integer>();\n System.out.println(\"Before insert nodes, tree is empty: \"+tree1.isEmpty());\n \n Integer[] numbers = {50, 30, 60, 40, 55, 70, 57};\n for (int i=0; i<numbers.length; i++) {\n tree1.insert(numbers[i]);\n }\n \n System.out.println(\"After insert nodes, tree is empty: \"+tree1.isEmpty());\n System.out.println(\"Tree looks like: \");\n tree1.printTree();\n tree1.print();\n \n tree1.delete(40);\n System.out.println(\"After delete nodes 40, Tree looks like: \"); \n tree1.printTree();\n tree1.print();\n System.out.println(\"Tree is balanced: \"+tree1.checkForBalancedTree());\n System.out.println(\"Tree is a BST: \"+tree1.checkForBinarySearchTree()+\"\\n\");\n \n System.out.println(\"Does 40 exist in tree? \"+tree1.search(40));\n System.out.println(\"Does 50 exist in tree? \"+tree1.search(50));\n System.out.print(\"Does null exist in tree? \");\n System.out.println(tree1.search(null));\n System.out.println(\"Try to insert 55 again: \");\n tree1.insert(55);\n System.out.println(\"Try to insert null: \");\n tree1.insert(null);\n System.out.println(\"Try to delete null: \");\n tree1.delete(null);\n System.out.println(\"Try to delete 100: nothing happen!\");\n tree1.delete(100);\n tree1.print();\n }", "public void delete(E data){\n \t// Preform a regular delete\n \t// Check to make sure the tree remains an RBT tree\n\tNode<E> z = search(data);\n\tNode<E> x = sentinel;\n\tNode<E> y = z;\n\tCharacter y_original_color = y.getColor();\n\tif (z.getLeftChild() == sentinel) {\n\t\tx = z.getRightChild();\n\t\ttransplant(z, z.getRightChild());\n\t} else if (z.getRightChild() == sentinel) {\n\t\tx = z.getLeftChild();\n\t\ttransplant(z, z.getLeftChild());\n\t} else {\n\t\ty = getMin(z.getRightChild());\n\t\ty_original_color = y.getColor();\n\t\tx = y.getRightChild();\n\t\tif (y.getParent() == z) {\n\t\t\tx.setParent(y);\n\t\t} else {\n\t\t\ttransplant(y, y.getRightChild());\n\t\t\ty.setRightChild(z.getRightChild());\n\t\t\ty.getRightChild().setParent(y);\n\t\t}\n\t\t\n\t\ttransplant(z, y);\n\t\ty.setLeftChild(z.getLeftChild());\n\t\ty.getLeftChild().setParent(y);\n\t\ty.setColor(z.getColor());\n\t}\n\t\n\tif (y_original_color == 'B') {\n\t\tfixDelete(x);\n\t}\n\t\t\n \n }", "public void delete(Comparable<T> item)\r\n {\r\n root = delete(root,item);\r\n }", "public int delete(int k) {\n\t\tif (this.empty()) {// empty tree, nothing to erase\n\t\t\treturn -1;\n\t\t}\n\t\tAVLNode root = (AVLNode) this.root;\n\t\tAVLNode node = (AVLNode) root.delFindNode(k);\n\t\tif (node == null) {// no node with key==k in this tree\n\t\t\treturn -1;\n\t\t}\n\t\tchar side = node.parentSide();\n\t\tboolean rootTerm = (node.getLeft().getKey() != -1 && node.getRight().getKey() != -1);\n\t\tif (side == 'N' && (rootTerm == false)) {\n\t\t\treturn this.deleteRoot(node);\n\t\t}\n\t\tif (side == 'L') {\n\t\t\tif (node.isLeaf()) {\n\t\t\t\tint leftEdge = node.parent.getHeight() - node.getHeight();\n\t\t\t\tint rightEdge = node.parent.getHeight() - node.parent.getRight().getHeight();\n\t\t\t\tAVLNode parent = (AVLNode) node.parent;\n\t\t\t\tif (leftEdge == 1 && rightEdge == 1) {// first case (\"easy one\", just delete)\n\t\t\t\t\tnode.parent.setLeft(new AVLNode());\n\t\t\t\t\tnode.setParent(null);\n\t\t\t\t\tparent.updateSize();\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t\tif (leftEdge == 1 && rightEdge == 2) {\n\t\t\t\t\tnode.parent.setLeft(new AVLNode());\n\t\t\t\t\tnode.setParent(null);\n\t\t\t\t\tparent.setHeight(parent.getHeight() - 1);\n\t\t\t\t\tparent.setSize();\n\t\t\t\t\treturn this.delRecTwos(parent);\n\t\t\t\t} else {// leftEdge==2&&rightEdge==1\n\t\t\t\t\tnode.parent.setLeft(new AVLNode());\n\t\t\t\t\tnode.setParent(null);\n\t\t\t\t\treturn this.delRecTriOne(parent, side);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ((node.left != null && node.right == null) || (node.left == null && node.right != null)) {// node is //\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// unary\n\t\t\t\tint leftEdge = node.parent.getHeight() - node.getHeight();\n\t\t\t\tint rightEdge = node.parent.getHeight() - node.parent.getRight().getHeight();\n\t\t\t\tif ((leftEdge == 1 && rightEdge == 1)) {\n\t\t\t\t\tif (node.left != null) {\n\t\t\t\t\t\tAVLNode parent = node.delUnaryLeft();\n\t\t\t\t\t\tparent.updateSize();\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t} else {// node.right!=null\n\t\t\t\t\t\tAVLNode parent = node.delUnaryRight();\n\t\t\t\t\t\tparent.updateSize();\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ((leftEdge == 1 && rightEdge == 2)) {\n\t\t\t\t\tif (node.left != null) {\n\t\t\t\t\t\treturn this.delRecTwos(node.delUnaryLeft());\n\t\t\t\t\t} else {// node.right!=null\n\t\t\t\t\t\treturn this.delRecTwos(node.delUnaryRight());\n\t\t\t\t\t}\n\t\t\t\t} else {// leftEdge==2&&rightEdge==1\n\t\t\t\t\tif (node.left != null) {\n\t\t\t\t\t\treturn this.delRecTriOne(node.delUnaryLeft(), side);\n\t\t\t\t\t} else {// node.right!=null\n\t\t\t\t\t\treturn this.delRecTriOne(node.delUnaryRight(), side);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\tif (side == 'R') {\n\t\t\tif (node.isLeaf()) {\n\t\t\t\tint rightEdge = node.parent.getHeight() - node.getHeight();\n\t\t\t\tint leftEdge = node.parent.getHeight() - node.parent.getLeft().getHeight();\n\t\t\t\tAVLNode parent = (AVLNode) node.parent;\n\t\t\t\tif (leftEdge == 1 && rightEdge == 1) {// first case (\"easy one\", just delete)\n\t\t\t\t\tnode.parent.setRight(new AVLNode());\n\t\t\t\t\tnode.setParent(null);\n\t\t\t\t\tparent.updateSize();\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t\tif (leftEdge == 2 && rightEdge == 1) {\n\t\t\t\t\tnode.parent.setRight(new AVLNode());\n\t\t\t\t\tnode.setParent(null);\n\t\t\t\t\tparent.setHeight(parent.getHeight() - 1);\n\t\t\t\t\tparent.setSize();\n\t\t\t\t\treturn this.delRecTwos(parent);\n\t\t\t\t} else {// leftEdge==1&&rightEdge==2\n\t\t\t\t\tnode.parent.setRight(new AVLNode());\n\t\t\t\t\tnode.setParent(null);\n\t\t\t\t\treturn this.delRecTriOne(parent, side);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ((node.getLeft().getHeight() != -1 && node.getRight().getHeight() == -1)\n\t\t\t\t\t|| (node.getLeft().getHeight() == -1 && node.getRight().getHeight() != -1)) {// node is unary\n\t\t\t\tint rightEdge = node.parent.getHeight() - node.getHeight();\n\t\t\t\tint leftEdge = node.parent.getHeight() - node.parent.getLeft().getHeight();\n\t\t\t\tif ((leftEdge == 1 && rightEdge == 1)) {\n\t\t\t\t\tif (node.left != null) {\n\t\t\t\t\t\tAVLNode parent = node.delUnaryLeft();\n\t\t\t\t\t\tparent.updateSize();\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t} else {// node.right!=null\n\t\t\t\t\t\tAVLNode parent = node.delUnaryRight();\n\t\t\t\t\t\tparent.updateSize();\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ((leftEdge == 2 && rightEdge == 1)) {\n\t\t\t\t\tif (node.left != null) {\n\t\t\t\t\t\treturn this.delRecTwos(node.delUnaryLeft());\n\t\t\t\t\t} else {// node.right!=null\n\t\t\t\t\t\treturn this.delRecTwos(node.delUnaryRight());\n\t\t\t\t\t}\n\t\t\t\t} else {// leftEdge==1&&rightEdge==2\n\t\t\t\t\tif (node.left != null) {\n\t\t\t\t\t\treturn this.delRecTriOne(node.delUnaryLeft(), side);\n\t\t\t\t\t} else {// node.right!=null\n\t\t\t\t\t\treturn this.delRecTriOne(node.delUnaryRight(), side);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\t// we get here only if node is binary, and thus not going through any other\n\t\t// submethod\n\t\tAVLNode successor = this.findSuccessor(node); // successor must be unary/leaf\n\t\tif (node.checkRoot()) {\n\t\t\tthis.root = successor;\n\t\t}\n\t\tint numOp = this.delete(successor.key);\n\t\tsuccessor.setHeight(node.getHeight());\n\t\tsuccessor.size = node.getSize();\n\t\tsuccessor.setRight(node.getRight());\n\t\tnode.right.setParent(successor);\n\t\tnode.setRight(null);\n\t\tsuccessor.setLeft(node.getLeft());\n\t\tnode.left.setParent(successor);\n\t\tnode.setLeft(null);\n\t\tsuccessor.setParent(node.getParent());\n\t\tif (node.parentSide() == 'L') {\n\t\t\tnode.parent.setLeft(successor);\n\t\t} else if (node.parentSide() == 'R') {// node.parentSide()=='R'\n\t\t\tnode.parent.setRight(successor);\n\t\t}\n\t\tnode.setParent(null);\n\t\treturn numOp;\n\n\t}", "public boolean delete(int key) {\n Node current = root;\n Node parent = root;\n boolean isLeftChild = true;\n while (current.iData != key) {\n parent = current;\n if (key < current.iData) {\n // go left\n isLeftChild = true;\n current = current.leftChild;\n } else {\n isLeftChild = false;\n current = current.rightChild;\n }\n if (current == null)\n // end of the line, didn't find it\n return false;\n } //end while\n\n // found node to delete\n\n if (current.leftChild == null && current.rightChild == null) {\n // if no children, simply delete it\n if (current == root)\n // if root, tree is empty\n root = null;\n else if (isLeftChild)\n parent.leftChild = null;\n else\n parent.rightChild = null;\n } else if (current.rightChild == null) {\n // if no right child, replace with left subtree\n if (current == root)\n root = current.leftChild;\n else if (isLeftChild)\n parent.leftChild = current.leftChild;\n else\n parent.rightChild = current.leftChild;\n } else if (current.leftChild == null) {\n // if no left child, replace with right subtree\n if (current == root)\n root = current.rightChild;\n else if (isLeftChild)\n parent.leftChild = current.rightChild;\n else\n parent.rightChild = current.rightChild;\n } else {\n // two children, so replace with inorder successor\n // get successor of node to delete\n Node successor = getSuccessor(current);\n\n // connect parent of current to successor instead\n if (current == root)\n root = successor;\n else if (isLeftChild)\n parent.leftChild = successor;\n else\n parent.rightChild = successor;\n\n // connect successor to current's left child\n successor.leftChild = current.leftChild;\n } // end else two children\n // succssor cannot have a left child\n return true;\n }", "public boolean delete(Integer searchKey) {\n\t\tif(root == null) {\n\t\t\t// Empty BST\n\t\t\treturn false; \n\t\t} else if(root.getData() == searchKey) {\t\t\t\t\t\t\t\t\t\t// the root is the item we are looking to delete\n\t\t\tif(root.getLeftChild() == null && root.getRightChild() == null) { \t\t\t// root has no children \n\t\t\t\troot = null;\n\t\t\t\tlength--;\n\t\t\t\treturn true;\n\t\t\t} else if(root.getLeftChild() == null) {\t\t\t\t\t\t\t\t\t// root jut has right child\n\t\t\t\troot = root.getRightChild();\n\t\t\t\tlength--;\n\t\t\t\treturn true;\n\t\t\t} else if(root.getRightChild() == null) { \t\t\t\t\t\t\t\t\t// root just has left child\n\t\t\t\troot = root.getLeftChild();\n\t\t\t\tlength--;\n\t\t\t\treturn true; \n\t\t\t} else { \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// has two children, replace root with its successor\n\t\t\t\tTreeNode successorParent = root.getRightChild();\n\t\t\t\tif(successorParent.getLeftChild() == null) { \t\t\t\t\t\t\t// the successor is the roots right child\n\t\t\t\t\tTreeNode successor = successorParent;\n\t\t\t\t\tsuccessor.setLeftChild(root.getLeftChild());\n\t\t\t\t\troot = successor;\n\t\t\t\t\tlength--;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Go down the tree until we have located the successor and its parent\n\t\t\t\twhile(successorParent.getLeftChild().getLeftChild() != null) {\n\t\t\t\t\tsuccessorParent = successorParent.getLeftChild();\n\t\t\t\t}\n\t\t\t\tTreeNode successor = successorParent.getLeftChild();\n\t\t\t\t\n\t\t\t\tsuccessorParent.setLeftChild(successor.getRightChild());\t\t\t\t// make sure successors parent points to the correct place\n\n\t\t\t\t// Replace the current root with successor \n\t\t\t\tsuccessor.setLeftChild(root.getLeftChild());\n\t\t\t\tsuccessor.setRightChild(root.getRightChild());\n\t\t\t\troot = successor;\n\t\t\t\tlength--;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} else {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the item we are looking to delete is not the root, it is somewhere else in the tree or it doesn't exist at all\n\t\t\tTreeNode current = root; \n\n\t\t\t// Find the parent of the child to delete, or potentially find out that data does not exist in the tree and return false\n\t\t\twhile((current.getLeftChild() == null || current.getLeftChild().getData() != searchKey) && (current.getRightChild() == null || current.getRightChild().getData() != searchKey)) {\n\t\t\t\tif(searchKey > current.getData()) {\n\t\t\t\t\tif(current.getRightChild() == null) {\n\t\t\t\t\t\treturn false; \n\t\t\t\t\t} else {\n\t\t\t\t\t\tcurrent = current.getRightChild();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif(current.getLeftChild() == null) {\n\t\t\t\t\t\treturn false; \n\t\t\t\t\t} else {\n\t\t\t\t\t\tcurrent = current.getLeftChild();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If the program has reached this point in the code, we know that either its left child or its right child must be \n\t\t\t// the node that we are looking to delete\n\t\t\tTreeNode parent = current;\n\t\t\tTreeNode child; \n\t\t\tboolean isRightChild; \n\t\t\t\n\t\t\t// Figure out if child is on the left or right\n\t\t\tif(searchKey > parent.getData()) {\n\t\t\t\tchild = parent.getRightChild();\n\t\t\t\tisRightChild = true; \n\t\t\t} else {\n\t\t\t\tchild = parent.getLeftChild();\n\t\t\t\tisRightChild = false; \n\t\t\t}\n\t\t\t\n\t\t\tif(child.getLeftChild() == null && child.getRightChild() == null) {\t\t\t// child has no children\n\t\t\t\treturn setChild(parent ,null ,isRightChild);\n\t\t\t} else if(child.getLeftChild() == null) {\t\t\t\t\t\t\t\t\t// child just has a right child \n\t\t\t\treturn setChild(parent, child.getRightChild(), isRightChild);\n\t\t\t} else if(child.getRightChild() == null) {\t\t\t\t\t\t\t\t\t// child just has a left child \n\t\t\t\treturn setChild(parent, child.getLeftChild(), isRightChild);\n\t\t\t} else {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// has two children, replace child with its successor\n\t\t\t\tTreeNode successorParent = child.getRightChild();\n\t\t\t\tif(successorParent.getLeftChild() == null) {\t\t\t\t\t\t\t// the successor is the roots right child\n\t\t\t\t\treturn setChild(parent, child.getRightChild(), isRightChild);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Go down the tree until we have located the successor and its parent\n\t\t\t\twhile(successorParent.getLeftChild().getLeftChild() != null) {\n\t\t\t\t\tsuccessorParent = successorParent.getLeftChild();\n\t\t\t\t}\n\t\t\t\tTreeNode successor = successorParent.getLeftChild();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tsuccessorParent.setLeftChild(successor.getRightChild());\t\t\t\t// make sure successors parent points to the correct place\n\n\t\t\t\tsuccessor.setLeftChild(child.getLeftChild());\n\t\t\t\tsuccessor.setRightChild(child.getRightChild());\n\t\t\t\treturn setChild(parent, successor, isRightChild);\n\t\t\t}\n\t\t}\n\t}", "public boolean delete()\n\t{\n\t\treturn deleteRecursive( file ) ;\n\t}", "public boolean deleteTreeBidInfoForKey(String treeKey) {\n\t\tTreeBidInfo t2 = cacheTree.removeTreeBidInfo(treeKey);\n\t\tif (t2 != null) {\n\t\t\tt2 = null;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "@Override /**\r\n\t\t\t\t * Delete an element from the binary tree. Return true if the element is deleted\r\n\t\t\t\t * successfully Return false if the element is not in the tree\r\n\t\t\t\t */\r\n\tpublic boolean delete(E e) {\n\t\tTreeNode<E> parent = null;\r\n\t\tTreeNode<E> current = root;\r\n\t\twhile (current != null) {\r\n\t\t\tif (e.compareTo(current.element) < 0) {\r\n\t\t\t\tparent = current;\r\n\t\t\t\tcurrent = current.left;\r\n\t\t\t} else if (e.compareTo(current.element) > 0) {\r\n\t\t\t\tparent = current;\r\n\t\t\t\tcurrent = current.right;\r\n\t\t\t} else\r\n\t\t\t\tbreak; // Element is in the tree pointed at by current\r\n\t\t}\r\n\r\n\t\tif (current == null)\r\n\t\t\treturn false; // Element is not in the tree\r\n\r\n\t\t// Case 1: current has no left child\r\n\t\tif (current.left == null) {\r\n\t\t\t// Connect the parent with the right child of the current node\r\n\t\t\tif (parent == null) {\r\n\t\t\t\troot = current.right;\r\n\t\t\t} else {\r\n\t\t\t\tif (e.compareTo(parent.element) < 0)\r\n\t\t\t\t\tparent.left = current.right;\r\n\t\t\t\telse\r\n\t\t\t\t\tparent.right = current.right;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t// Case 2: The current node has a left child\r\n\t\t\t// Locate the rightmost node in the left subtree of\r\n\t\t\t// the current node and also its parent\r\n\t\t\tTreeNode<E> parentOfRightMost = current;\r\n\t\t\tTreeNode<E> rightMost = current.left;\r\n\r\n\t\t\twhile (rightMost.right != null) {\r\n\t\t\t\tparentOfRightMost = rightMost;\r\n\t\t\t\trightMost = rightMost.right; // Keep going to the right\r\n\t\t\t}\r\n\r\n\t\t\t// Replace the element in current by the element in rightMost\r\n\t\t\tcurrent.element = rightMost.element;\r\n\r\n\t\t\t// Eliminate rightmost node\r\n\t\t\tif (parentOfRightMost.right == rightMost)\r\n\t\t\t\tparentOfRightMost.right = rightMost.left;\r\n\t\t\telse\r\n\t\t\t\t// Special case: parentOfRightMost == current\r\n\t\t\t\tparentOfRightMost.left = rightMost.left;\r\n\t\t}\r\n\r\n\t\tsize--;\r\n\t\treturn true; // Element deleted successfully\r\n\t}", "private NodeTest delete(NodeTest root, int data)\n\t{\n\t\t//if the root is null then there's no tree\n\t\tif (root == null)\n\t\t{\n\t\t\tSystem.out.println(\"There was no tree.\");\n\t\t\treturn null;\n\t\t}\n\t\t//if the data is less go to the left\n\t\telse if (data < root.data)\n\t\t{\n\t\t\troot.left = delete(root.left, data);\n\t\t}\n\t\t//otherwise go to the right\n\t\telse if (data > root.data)\n\t\t{\n\t\t\troot.right = delete(root.right, data);\n\t\t}\n\t\t//else, we have a hit, so find out how we are going to delete it\n\t\telse\n\t\t{\n\t\t\t//if there are no children then return null\n\t\t\t//because we can delete the NodeTest without worries\n\t\t\tif (root.left == null && root.right == null)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Delete, no children NodeTests\");\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t//if there is no right-child then return the left\n\t\t\t//\n\t\t\telse if (root.right == null)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Delete, no right-children NodeTests\");\n\t\t\t\treturn root.left;\n\t\t\t}\n\t\t\t//if there is no left child return the right\n\t\t\telse if (root.left == null)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Delete, no left-children NodeTests\");\n\t\t\t\treturn root.right;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//if it is a parent NodeTest, we need to find the max of the lowest so we can fix the BST\n\t\t\t\troot.data = findMax(root.left);\n\t\t\t\troot.left = delete(root.left, root.data);\n\t\t\t}\n\t\t}\n\n\t\treturn root;\n\t}", "public void delete(E e) {\n\t\tNode node = getNode(root, e);\n\t\tif (node == null) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tNode parentOfLast = getNode(size >> 1);\n\t\tif (parentOfLast.right != null) {\n\t\t\tnode.data = parentOfLast.right.data;\n\t\t\tparentOfLast.right = null;\n\t\t}\n\t\telse {\n\t\t\tnode.data = parentOfLast.left.data;\n\t\t\tparentOfLast.left = null;\n\t\t}\n\t\tsize--;\n\t}", "public void delete(Integer data) {\n ArrayList<Node> parents = new ArrayList<>();\n Node nodeDel = this.root;\n Node parent = this.root;\n Node imBalance;\n Integer balanceFactor;\n boolean isLeftChild = false;\n if (nodeDel == null) {\n return;\n }\n while (nodeDel != null && !nodeDel.getData().equals(data)) {\n parent = nodeDel;\n if (data < nodeDel.getData()) {\n nodeDel = nodeDel.getLeftChild();\n isLeftChild = true;\n } else {\n nodeDel = nodeDel.getRightChild();\n isLeftChild = false;\n }\n parents.add(nodeDel);\n }\n\n if (nodeDel == null) {\n return;\n// delete a leaf node\n } else if (nodeDel.getLeftChild() == null && nodeDel.getRightChild() == null) {\n if (nodeDel == root) {\n root = null;\n } else {\n if (isLeftChild) {\n parent.setLeftChild(null);\n } else {\n parent.setRightChild(null);\n }\n }\n }\n// deleting a node with degree of one\n else if (nodeDel.getRightChild() == null) {\n if (nodeDel == root) {\n root = nodeDel.getLeftChild();\n } else if (isLeftChild) {\n parent.setLeftChild(nodeDel.getLeftChild());\n } else {\n parent.setRightChild(nodeDel.getLeftChild());\n }\n } else if (nodeDel.getLeftChild() == null) {\n if (nodeDel == root) {\n root = nodeDel.getRightChild();\n } else if (isLeftChild) {\n parent.setLeftChild(nodeDel.getRightChild());\n } else {\n parent.setRightChild(nodeDel.getRightChild());\n }\n }\n // deleting a node with degree of two\n else {\n Integer minimumData = minimumData(nodeDel.getRightChild());\n delete(minimumData);\n nodeDel.setData(minimumData);\n }\n parent.setHeight(maximum(height(parent.getLeftChild()), height(parent.getRightChild())));\n balanceFactor = getBalance(parent);\n if (balanceFactor <= 1 && balanceFactor >= -1) {\n for (int i = parents.size() - 1; i >= 0; i--) {\n imBalance = parents.get(i);\n balanceFactor = getBalance(imBalance);\n if (balanceFactor > 1 || balanceFactor < -1) {\n if (imBalance.getData() > parent.getData()) {\n parent.setRightChild(rotateCase(imBalance, data, balanceFactor));\n } else\n parent.setLeftChild(rotateCase(imBalance, data, balanceFactor));\n break;\n }\n }\n }\n }", "private void delete(BTreeNode<T> currentNode, I id) {\n int indexKey = findIndexKey(currentNode, id);\n\n if (indexKey != -1) {\n if (currentNode.isLeaf()) {\n removeFromLeaf(currentNode, indexKey);\n } else {\n //TODO: Remover dato de nodo que no sea hoja\n removeFromNonLeaf(currentNode, indexKey);\n }\n\n if (currentNode != root && currentNode.getNumKeys() < 2) {\n checkMinKeys(currentNode);\n }\n } else {\n if (currentNode.isLeaf()) {\n System.out.println(\"No existe en el arbol\");\n } else {\n int indexChild = findChildOrIndex(currentNode, id);\n\n delete(currentNode.getChild(indexChild), id);\n }\n }\n }", "public static void delTree(File file) {\r\n File[] files = file.listFiles();\r\n if (files != null) { \r\n for (int i = 0; i < files.length; i++) {\r\n if (files[i].isDirectory()) {\r\n delTree(files[i]);\r\n }\r\n }\r\n }\r\n files = file.listFiles();\r\n if (files != null) {\r\n for (int i = 0; i < files.length; i++) {\r\n files[i].delete();\r\n }\r\n }\r\n }", "private static void rightRightDelete() {\n System.out.println(\"LeftLeft Tree Delete Case\");\n AVLTree<Integer> tree1 = new AVLTree<Integer>();\n System.out.println(\"Before insert nodes, tree is empty: \"+tree1.isEmpty());\n \n Integer[] numbers = {50, 30, 60, 40, 70, 55, 65};\n for (int i=0; i<numbers.length; i++) {\n tree1.insert(numbers[i]);\n }\n \n System.out.println(\"After insert nodes, tree is empty: \"+tree1.isEmpty());\n System.out.println(\"Tree looks like: \");\n tree1.printTree();\n tree1.print();\n \n tree1.delete(40);\n System.out.println(\"After delete nodes 40, Tree looks like: \"); \n tree1.printTree();\n tree1.print();\n \n System.out.println(\"Tree is balanced: \"+tree1.checkForBalancedTree());\n System.out.println(\"Tree is a BST: \"+tree1.checkForBinarySearchTree()+\"\\n\");\n }", "public boolean deleteLeaf(int d, Leaf root){\n //hacemos la búsqueda del nodo y de su padre\n Leaf f, s;\n s = fetch(d, root);\n f = getFather(s, root);\n \n //Preguntamos si tiene hijos\n boolean l = s.left != null;\n boolean r = s.right != null;\n \n //Si no tiene hijos\n if(!l && !r){\n //Eliminamos nodo según caso 1\n //Si es el hijo de la izquierda, la apuntamos a NULL, caso contrario apuntamos hijo derecho a NULL.\n if(f.left == s){\n f.left = null;\n }else{\n f.right = null;\n }\n return true;\n }else if(!l && r){\n //Eliminamos nodo según caso 2, solo hijos a la derecha\n if (f.left == s){ //Si es el hijo de la izquierda\n f.left = s.right; //los hijos derechos del nodo eliminado se cuelgan en el brazo izquierdo de su padre\n }else{ //Si es el hijo de la derecha\n f.right = s.right;//los hijos erechos del nodo eliminado se cuelgan del brazo derecho de su padre\n }\n return true;\n }else if(l && !r){\n //Eliminamos nodo según caso 2, solo hijos a la izquierda\n if (f.left == s){\n f.left = s.left;\n }else{\n f.right = s.left;\n }\n return true;\n }else if(l && r){\n //Eliminamos nodo según caso 3\n //Obtenemos el nodo mas a la izquierda de su derecha\n Leaf ml = mostLeft(s.right);\n //Sustituimos el dato del nodo hijo por el de mas a la izquierda\n s.setData(ml.getData());\n //Eliminamos most left\n return deleteLeaf(ml.getData(), ml);\n }else{\n return false;\n }\n }", "private boolean _deleteLeaf(Node node, T value) {\n if (node == null)\n // not found\n return false;\n /** if the value is found */\n if (value.compareTo(node.element) == 0) {\n // is it a leaf? if yes, delete it\n if(node.left == null && node.right == null){\n node = null;\n return true;\n }\n else{\n // not a leaf\n return false;\n }\n }\n /** Otherwise, continue the search recursively */\n return value.compareTo(node.element) < 0 ? _deleteLeaf(node.left, value) : _deleteLeaf(node.right, value);\n }", "public void deleteBranch(int id) {\n Node<T> delNode = search(id);\n Node<T> parent = delNode.getParent();\n if (delNode.getParent() != null) {\n Collection<Node<T>> children = parent.getChildren();\n for (Node<T> child : children) {\n if (child.getId() == id) child = null;\n }\n }\n }", "public void delete(Key key) {\n\troot = delete(root, key);\t\n}", "void deleteNode(ZVNode node);", "public void delete(int index) {\n\t\tNode node = getNode(index+1);\n\t\tNode parentOfLast = getNode(size >> 1);\n\t\tnode.data = parentOfLast.right != null ? parentOfLast.right.data : parentOfLast.left.data;\n\t\tif (parentOfLast.right != null) {\n\t\t\tparentOfLast.right = null;\n\t\t}\n\t\telse {\n\t\t\tparentOfLast.left = null;\n\t\t}\n\t}", "public void delete(Key key)\n\t{\n\t\troot=delete(root,key);\n\t}", "private TSTNode<E> deleteNodeRecursion(TSTNode<E> currentNode) {\n \n if(currentNode == null) return null;\n if(currentNode.relatives[TSTNode.EQKID] != null || currentNode.data != null) return null; // can't delete this node if it has a non-null eq kid or data\n\n TSTNode<E> currentParent = currentNode.relatives[TSTNode.PARENT];\n\n // if we've made it this far, then we know the currentNode isn't null, but its data and equal kid are null, so we can delete the current node\n // (before deleting the current node, we'll move any lower nodes higher in the tree)\n boolean lokidNull = currentNode.relatives[TSTNode.LOKID] == null;\n boolean hikidNull = currentNode.relatives[TSTNode.HIKID] == null;\n\n ////////////////////////////////////////////////////////////////////////\n // Add by Cheok. To resolve java.lang.NullPointerException\n // I am not sure this is the correct solution, as I have not gone\n // through this sourc code in detail.\n if (currentParent == null && currentNode == this.rootNode) {\n // if this executes, then current node is root node\n rootNode = null;\n return null;\n }\n // Add by Cheok. To resolve java.lang.NullPointerException\n ////////////////////////////////////////////////////////////////////////\n\n // now find out what kind of child current node is\n int childType;\n if(currentParent.relatives[TSTNode.LOKID] == currentNode) {\n childType = TSTNode.LOKID;\n } else if(currentParent.relatives[TSTNode.EQKID] == currentNode) {\n childType = TSTNode.EQKID;\n } else if(currentParent.relatives[TSTNode.HIKID] == currentNode) {\n childType = TSTNode.HIKID;\n } else {\n // if this executes, then current node is root node\n rootNode = null;\n return null;\n }\n\n if(lokidNull && hikidNull) {\n // if we make it to here, all three kids are null and we can just delete this node\n currentParent.relatives[childType] = null;\n return currentParent;\n }\n\n // if we make it this far, we know that EQKID is null, and either HIKID or LOKID is null, or both HIKID and LOKID are NON-null\n if(lokidNull) {\n currentParent.relatives[childType] = currentNode.relatives[TSTNode.HIKID];\n currentNode.relatives[TSTNode.HIKID].relatives[TSTNode.PARENT] = currentParent;\n return currentParent;\n }\n\n if(hikidNull) {\n currentParent.relatives[childType] = currentNode.relatives[TSTNode.LOKID];\n currentNode.relatives[TSTNode.LOKID].relatives[TSTNode.PARENT] = currentParent;\n return currentParent;\n }\n\n int deltaHi = currentNode.relatives[TSTNode.HIKID].splitchar - currentNode.splitchar;\n int deltaLo = currentNode.splitchar - currentNode.relatives[TSTNode.LOKID].splitchar;\n int movingKid;\n TSTNode<E> targetNode;\n \n // if deltaHi is equal to deltaLo, then choose one of them at random, and make it \"further away\" from the current node's splitchar\n if(deltaHi == deltaLo) {\n if(Math.random() < 0.5) {\n deltaHi++;\n } else {\n deltaLo++;\n }\n }\n\n\tif(deltaHi > deltaLo) {\n movingKid = TSTNode.HIKID;\n targetNode = currentNode.relatives[TSTNode.LOKID];\n } else {\n movingKid = TSTNode.LOKID;\n targetNode = currentNode.relatives[TSTNode.HIKID];\n }\n\n while(targetNode.relatives[movingKid] != null) targetNode = targetNode.relatives[movingKid];\n \n // now targetNode.relatives[movingKid] is null, and we can put the moving kid into it.\n targetNode.relatives[movingKid] = currentNode.relatives[movingKid];\n\n // now we need to put the target node where the current node used to be\n currentParent.relatives[childType] = targetNode;\n targetNode.relatives[TSTNode.PARENT] = currentParent;\n\n if(!lokidNull) currentNode.relatives[TSTNode.LOKID] = null;\n if(!hikidNull) currentNode.relatives[TSTNode.HIKID] = null;\n\n // note that the statements above ensure currentNode is completely dereferenced, and so it will be garbage collected\n return currentParent;\n }", "private void deleteNode(TSTNode<E> nodeToDelete) {\n if(nodeToDelete == null) return;\n nodeToDelete.data = null;\n \n while(nodeToDelete != null) {\n nodeToDelete = deleteNodeRecursion(nodeToDelete);\n }\n }", "private Node<E> delete(E item, Node<E> root){\n\t\t/** the item to delete does not exist */\n\t\tif(root == null){\n\t\t\tdeleteReturn = null;\n\t\t\treturn root;\n\t\t}\n\t\t\n\t\tint comparison = item.compareTo(root.item);\n\t\t\n\t\t/** delete from the left subtree */\n\t\tif(comparison < 0){\n\t\t\troot.left = delete(item, root.left);\n\t\t\treturn root;\n\t\t}\n\t\t/** delete from the right subtree */\n\t\telse if(comparison > 0){\n\t\t\troot.right = delete(item, root.right);\n\t\t\treturn root;\n\t\t}\n\t\t/** the node to delete is found */\n\t\telse{\n\t\t\tdeleteReturn = root.item;\n\t\t\t\n\t\t\t/** the node is a leaf */\n\t\t\tif(root.left == null && root.right == null){\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t/** the node has one left child */\n\t\t\telse if(root.left != null && root.right == null){\n\t\t\t\treturn root.left;\n\t\t\t}\n\t\t\t/** the node has one right child */\n\t\t\telse if(root.left == null && root.right != null){\n\t\t\t\treturn root.right;\n\t\t\t}\n\t\t\t/** the node has two children */\n\t\t\telse{\n\t\t\t\t/**\n\t\t\t\t* the left child becomes the local root\n\t\t\t\t*/\n\t\t\t\tif(root.left.right == null){\n\t\t\t\t\troot.item = root.left.item;\n\t\t\t\t\troot.left = root.left.left;\n\t\t\t\t\treturn root;\n\t\t\t\t}\n\t\t\t\t/**\n\t\t\t\t* find the left-rightmost node and replace the local root's\n\t\t\t\t* item with that of left-rightmost node.\n\t\t\t\t*/\n\t\t\t\telse{\n\t\t\t\t\troot.item = findRightmost(root.left);\n\t\t\t\t\treturn root;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n public boolean delete(E e) {\n TreeNode<E> curr = root;\n while(curr!= null){\n if(e.compareTo(curr.element)<0){\n curr = curr.left;\n }else if (e.compareTo(curr.element)>0){\n curr = curr.right;\n }else{\n break; // we found the element to delete\n }\n }\n \n if(curr == null){\n return false; // we did not found the element\n }else{\n \n if(curr.left == null){\n transplant(curr, curr.right);\n }else if(curr.right == null){\n transplant(curr, curr.left);\n }else{\n TreeNode<E> min = minimum(curr);\n if(min.parent != curr){\n transplant(min, min.right);\n min.right = curr.right;\n min.right.parent = min;\n }\n transplant(curr, min);\n min.left = curr.left;\n min.left.parent = min;\n }\n return true;\n }\n }", "public boolean delete(int key) {\n Node Current = root;\n Node Parent = root;\n boolean isLeftChild = true;\n // Find Node\n while (Current.id != key) {\n Parent = Current;\n if (key < Current.id) {\n Current = Current.left;\n isLeftChild = true;\n } else {\n Current = Current.Right;\n isLeftChild = false;\n }\n if (Current == null) return false;\n }\n\n if (Current.Right == null && Current.left == null) {\n if (Current == root) root = null;\n if (isLeftChild)\n Parent.left = null;\n else Parent.Right = null;\n return true;\n }\n\n // and Delete Node has One Child\n else if (Current.Right == null) {\n if (Current == root)\n root = Current.left;\n\n if (isLeftChild) {\n Parent.left = Current.left;\n } else {\n Parent.Right = Current.left;\n }\n\n } else if (Current.left == null) {\n if (Current == root)\n root = Current.Right;\n if (isLeftChild) {\n Parent.left = Current.Right;\n } else {\n Parent.Right = Current.Right;\n }\n }\n // has two Child\n else {\n Node Successor = getSuccessor(Current);\n if (Current == root) root = Successor;\n else if (isLeftChild) {\n Parent.left = Successor;\n } else {\n Parent.Right = Successor;\n }\n Successor.left = Current.left;\n }\n return true;\n }", "private Node caseNoChildren(Node deleteThis) {\r\n\r\n Node parent = deleteThis.getParent();\r\n\r\n if (parent == null) {\r\n this.root = null; // Kyseessä on juuri\r\n return deleteThis;\r\n }\r\n if (deleteThis == parent.getLeft()) {\r\n parent.setLeft(null);\r\n } else {\r\n parent.setRight(null);\r\n }\r\n return deleteThis;\r\n }", "abstract AbstractTree<T> removeSubtree(Node<T> subtreeRoot);", "public boolean removeNode(Node n);", "public void clear() {\n tree.clear();\n }", "public Boolean DeleteAndMerge(Node node) {\n\t\tif (node.getLeftChild() == null) {\n\t\t\tDeleteAllChild(node);\n\t\t\treturn true;\n\t\t}\n\n\t\tif (node.getParent().getLeftChild() == node) {\n\t\t\t// Node tempNode=node.getLeftChild();\n\t\t\tint level = node.getLevel();\n\t\t\tNode pa = node.getParent();\n\t\t\tPreorderLevel(node.getLeftChild());\n\t\t\tnode.getParent().setLeftChild(node.getLeftChild());\n\t\t\tnode.getLeftChild().setParent(node.getParent());\n\t\t\tnode.getLeftChild().setLevel(node.getLevel());\n\t\t\tNode tempNode = node.getRightChild();\n\t\t\tnode = node.getLeftChild();\n\n\t\t\tfor (;;) {\n\t\t\t\tif (node.getRightChild() == null) {\n\t\t\t\t\tnode.setRightChild(tempNode);\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\tnode = node.getRightChild();\n\n\t\t\t\t\tnode.setLevel(level);\n\t\t\t\t\tnode.setParent(pa);\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\t\t\tint level = node.getLevel();\n\t\t\tNode tNode = node.getParent().getLeftChild();\n\n\t\t\tfor (;;) {\n\t\t\t\tif (tNode.getRightChild() == node)\n\t\t\t\t\tbreak;\n\t\t\t\ttNode = tNode.getRightChild();\n\t\t\t}\n\t\t\ttNode.setRightChild(node.getLeftChild());\n\n\t\t\tNode parent = node.getParent();\n\t\t\tNode rNode = node.getRightChild();\n\t\t\tnode = node.getLeftChild();\n\t\t\tPreorderLevel(node);\n\t\t\tfor (;;) {\n\t\t\t\tif (node.getRightChild() == null)\n\t\t\t\t\tbreak;\n\t\t\t\telse {\n\t\t\t\t\tnode.setParent(parent);// 改变子结点的父结点\n\t\t\t\t\t// 修改结点层级\n\t\t\t\t\tif (node.getParent() == null) {\n\t\t\t\t\t\tnode.setLevel(0);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnode.setLevel(level);\n\t\t\t\t\t}\n\t\t\t\t\tnode = node.getRightChild();\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tnode.setParent(parent);\n\t\t\tnode.setLevel(level);\n\t\t\tnode.setRightChild(rNode);\n\t\t\t// if (rNode.getParent() == null) {\n\t\t\t// rNode.setLevel(0);\n\t\t\t// } else {\n\t\t\t// rNode.setLevel(rNode.getParent().getLevel() + 1);\n\t\t\t// }\n\t\t}\n\n\t\treturn true;\n\n\t}", "private void deleteHierarchyData(TreePath[] selRows) {\r\n SponsorHierarchyBean delBean;\r\n CoeusVector delData = new CoeusVector();\r\n TreePath treePath=selRows[selRows.length-1];\r\n DefaultMutableTreeNode selNode = (DefaultMutableTreeNode)treePath.getLastPathComponent();\r\n int selRow=sponsorHierarchyTree.getRowForPath(treePath);\r\n String optionPaneMsg=EMPTY_STRING;\r\n if(selNode.isRoot()) return;\r\n if(!selNode.getAllowsChildren()) {\r\n if(selRows.length > 1) {\r\n optionPaneMsg = coeusMessageResources.parseMessageKey(\"maintainSponsorHierarchy_exceptionCode.1252\");\r\n }else {\r\n optionPaneMsg = \"Do you want to remove the sponsor \"+selNode.toString()+\" from the hierarchy?\";\r\n }\r\n int optionSelected = CoeusOptionPane.showQuestionDialog(optionPaneMsg,CoeusOptionPane.OPTION_YES_NO,CoeusOptionPane.DEFAULT_NO);\r\n if(optionSelected == CoeusOptionPane.SELECTION_YES) {\r\n for (int index=selRows.length-1; index>=0; index--) {\r\n treePath = selRows[index];\r\n selRow = sponsorHierarchyTree.getRowForPath(treePath);\r\n selNode = (DefaultMutableTreeNode)treePath.getLastPathComponent();\r\n int endIndex = selNode.toString().indexOf(\":\");\r\n Equals getRowData = new Equals(\"sponsorCode\",selNode.toString().substring(0,endIndex == -1 ? selNode.toString().length():endIndex));\r\n CoeusVector cvFilteredData = getDeleteData(cvHierarchyData.filter(getRowData));\r\n delBean = (SponsorHierarchyBean)cvFilteredData.get(0);\r\n delBean.setAcType(TypeConstants.DELETE_RECORD);\r\n flushBean(delBean);//Added for bug fix Start #1830\r\n model.removeNodeFromParent(selNode);\r\n delData.addAll(cvFilteredData);\r\n saveRequired = true;\r\n }\r\n }\r\n } else {\r\n \r\n// int optionSelected = CoeusOptionPane.showQuestionDialog(\"Do you want to remove the Group \"+selNode.toString()+\" all its children from the hierarchy.\",CoeusOptionPane.OPTION_YES_NO,CoeusOptionPane.DEFAULT_YES);\r\n int optionSelected = -1;\r\n try{\r\n if(selNode != null && selNode.getLevel() == 1 && isPrintingHierarchy && isFormsExistInGroup(selNode.toString())){\r\n optionSelected = CoeusOptionPane.showQuestionDialog(\"Do you want to remove the group \"+selNode.toString()+\" , all its children and associated sponsor forms from the hierarchy?\",CoeusOptionPane.OPTION_YES_NO,CoeusOptionPane.DEFAULT_NO);\r\n }else{\r\n optionSelected = CoeusOptionPane.showQuestionDialog(\"Do you want to remove the Group \"+selNode.toString()+\" , all its children from the hierarchy.\",CoeusOptionPane.OPTION_YES_NO,CoeusOptionPane.DEFAULT_NO);\r\n }\r\n }catch(CoeusUIException coeusUIException){\r\n CoeusOptionPane.showDialog(coeusUIException);\r\n return ;\r\n }\r\n if(optionSelected == CoeusOptionPane.SELECTION_YES) {\r\n //Case#2445 - proposal development print forms linked to indiv sponsor, should link to sponsor hierarchy - Start\r\n if(isPrintingHierarchy && selectedNode.getLevel() == 1){\r\n TreeNode root = (TreeNode)sponsorHierarchyTree.getModel().getRoot();\r\n TreePath result = findEmptyGroup(sponsorHierarchyTree, new TreePath(root));\r\n if( result == null){\r\n try{\r\n deleteForms(selNode.toString());\r\n }catch(CoeusUIException coeusUIException){\r\n CoeusOptionPane.showDialog(coeusUIException);\r\n return ;\r\n }\r\n }\r\n }\r\n Equals getRowData = new Equals(fieldName[selNode.getLevel()],selNode.toString());\r\n CoeusVector cvFilteredData = getDeleteData(cvHierarchyData.filter(getRowData));//Modified for bug fix Start #1830\r\n model.removeNodeFromParent(selNode);\r\n for (int i=0; i<cvFilteredData.size(); i++) {\r\n delBean = (SponsorHierarchyBean)cvFilteredData.get(i);\r\n delBean.setAcType(TypeConstants.DELETE_RECORD);\r\n flushBean(delBean);//Added for bug fix Start #1830\r\n saveRequired = true;\r\n }\r\n delData.addAll(cvFilteredData);\r\n }\r\n }\r\n if(selRow < sponsorHierarchyTree.getRowCount() && \r\n ((DefaultMutableTreeNode)sponsorHierarchyTree.getPathForRow(selRow).getLastPathComponent()).getAllowsChildren() && !selNode.getAllowsChildren())\r\n sponsorHierarchyTree.setSelectionPath(treePath.getParentPath());\r\n else\r\n if(selRow >= sponsorHierarchyTree.getRowCount())\r\n selRow = 0;\r\n sponsorHierarchyTree.setSelectionRow(selRow);\r\n \r\n groupsController.refreshTableData(delData);\r\n }", "private void delete(Node curr, int ID, AtomicReference<Node> rootRef) {\n\t\tif(curr == null || curr.isNull) {\n return;\n }\n if(curr.ID == ID) {\n if(curr.right.isNull || curr.left.isNull) {\n deleteDegreeOneChild(curr, rootRef);\n } else {\n Node n = findSmallest(curr.right);\n \tcurr.ID = n.ID;\n curr.count = n.count;\n delete(curr.right, n.ID, rootRef);\n }\n }\n if(curr.ID < ID) {\n delete(curr.right, ID, rootRef);\n } else {\n delete(curr.left, ID, rootRef);\n }\n\t}", "public void delete(Key key) {\n root = delete(root, key);\n }", "public void delete(int key){\n\t\tBSTNode currentNode = root;\n\t\tBSTNode parent = null;\n\t\twhile (currentNode != null && currentNode.getKey() != key){\n\t\t\tparent = currentNode;\n\t\t\tif (key < currentNode.getKey()){\n\t\t\t\tcurrentNode = currentNode.getLeft();\n\t\t\t}else{\n\t\t\t\tcurrentNode = currentNode.getRight();\n\t\t\t}\n\t\t}\n\t\tif (currentNode == null){\n\t\t\tSystem.out.println(\"No such key is found in the tree\");\n\t\t\treturn;\n\t\t}\n\t\tif (currentNode.getLeft() == null && currentNode.getRight() == null){\n\t\t\t//Leaf Node\n\t\t\tif (currentNode.getKey() > parent.getKey()){\n\t\t\t\tparent.setRight(null);\n\t\t\t}else{\n\t\t\t\tparent.setLeft(null);\n\t\t\t}\n\t\t}else if (currentNode.getLeft() == null){\n\t\t\tif (currentNode.getKey() > parent.getKey()){\n\t\t\t\tparent.setRight(currentNode.getRight());\n\t\t\t}else{\n\t\t\t\tparent.setLeft(currentNode.getRight());\n\t\t\t}\n\t\t}else if(currentNode.getRight() == null){\n\t\t\tif (currentNode.getKey() > parent.getKey()){\n\t\t\t\tparent.setRight(currentNode.getLeft());\n\t\t\t}else{\n\t\t\t\tparent.setLeft(currentNode.getLeft());\n\t\t\t}\n\t\t}else{\n\t\t\t// this is case where this node has two children\n\t\t\tBSTNode node = currentNode.getLeft();\n\t\t\tBSTNode parentTemp = currentNode;\n\t\t\twhile (node.getRight() != null){\n\t\t\t\tparentTemp = node;\n\t\t\t\tnode = node.getRight();\n\t\t\t}\n\t\t\t// switch the value with the target node we are deleting.\n\t\t\tcurrentNode.setKey(node.getKey());\n\t\t\t// remove this node but don't forget about its left tree\n\t\t\tparentTemp.setRight(node.getLeft());\n\t\t}\n\t}", "public void deleteMin() {\n root = deleteMin(root);\n }", "public void deleteMin() {\n root = deleteMin(root);\n }", "public static TreeNode delete(TreeNode t, String target)\n {\n \n if(t == null)\n return null;\n \n else if(target.compareTo((String)t.getValue()) < 0)\n t.setLeft(delete(t.getLeft(), target));\n else if(target.compareTo((String)t.getValue()) > 0)\n t.setRight(delete(t.getRight(), target));\n else\n {\n //t.getValue() == v\n //ndoe thats leaf or one child\n if(t.getLeft() == null)\n return t.getRight();\n else if (t.getRight() == null)\n return t.getLeft();\n \n \n //if node has 2 children\n t.setValue(min(t.getRight()));\n \n //recursive call \n t.setRight(delete(t.getRight(), (String)t.getValue()));\n }\n return t;\n \n }", "public void delete(Node x) {\n if (!redoDone)\n redoStack.clear();\n else\n redoDone = false;\n BSTTrackingData log = new BSTTrackingData(x, x.left, x.right, x.parent, null, 'd');\n Boolean isRoot = x == root;\n Node toRemove = x;\n Node succ = null;\n if (x.left != null & x.right != null) { //if Case 3 - PartA change toRemove to the successor and remove it from the tree\n succ = successorForDelete(x); //use side function to get the successor (adjusted to improve retrack runtime)\n toRemove = succ;\n log.setSuccParent(succ.parent); //update log accordingly\n }\n stack.push(log);\n deleteUpToChild(toRemove); //function to handle removal of node with up to 1 child.\n if (succ != null) { //Case 3 part B - Place the successor in x's location in the tree.\n //update parent\n succ.parent = x.parent;\n if (isRoot) {\n root = succ;\n } else {\n if (x.parent.right == x) x.parent.right = succ;\n else x.parent.left = succ;\n }\n //update both children\n succ.right = x.right;\n if (x.right != null)\n x.right.parent = succ;\n succ.left = x.left;\n if (x.left != null)\n x.left.parent = succ;\n }\n\n }", "public void delete(String key) {\n key = key.toLowerCase();\n BTreeNode leftChild = root.getChild(0);\n BTreeNode rightChild = root.getChild(1);\n\n if (!root.isLeaf() && root.getN() == 1 && leftChild.getN() < T_VAR && rightChild.getN() < T_VAR) {\n root = mergeSingleKeyRoot();\n }\n if (root.keyExist(key)) {\n if (root.isLeaf()) {\n root.deleteKey(key);\n }\n else {\n root.handleCase2(key);\n }\n }\n else {\n root.handleCase4(key);\n }\n }", "public boolean deleteTreeBidCardForKey(String treeKey) {\n\t\tTreeBidCard t = cacheTree.removeTreeBidCard(treeKey);\n\t\tif (t != null) {\n\t\t\tt = null;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "@Override\r\n public E delete(E target) {\r\n E node = find(target);\r\n if (node == null){\r\n return null;\r\n }\r\n return deleteHelper(root,target,0);\r\n }", "private boolean deleteFromRBTree(int node, int index) {\n \n TreeMap<Integer, Integer> map = getTreeMap(index);\n \n assert(map != null);\n \n Integer key = Integer.valueOf(node);\n\n Integer multiplicity = map.get(key);\n \n if (multiplicity == null) {\n return false;\n }\n \n if (multiplicity.intValue() > 0) {\n multiplicity = Integer.valueOf(multiplicity.intValue() - 1);\n if (multiplicity.intValue() > 0) {\n map.put(key, multiplicity);\n }\n }\n if (multiplicity.intValue() == 0) {\n map.remove(key);\n }\n \n return true;\n }", "public static Node delete (BST bst, String name){\n\t\tNode bstRoot = bst.getRoot();\n\t\tNode deletedNode = findByName(bstRoot, name); // The node to be removed from the bst.\n\t\tNode substituteNode = floorOrCeiling(deletedNode); // The substitute node for the removed one.\n\t\t\n\t\t\n\t\tSystem.out.println(\"\\nThe node to be deleted:\");\n\t\tSystem.out.println(deletedNode);\n\n\t\tSystem.out.println(\"\\nThe substitute for the deleted node:\");\n\t\tSystem.out.println(substituteNode);\n\t\t\n\t\t/* If the node to be removed is an external node, which has no children nodes,\n\t\t then there is no need for the substitute node. Thus, we can simply set the nodes\n\t\t that point to the external nodes to null to remove the node.\n\t\t*/\n\t\tif ((deletedNode.getRight()==null)&&(deletedNode.getLeft()==null)){\n\t\t\tif(deletedNode.getName().compareTo(deletedNode.getParent().getName())<0)\n\t\t\t\tdeletedNode.getParent().setLeft(null);\t\t\t\n\t\t\telse\n\t\t\t\tdeletedNode.getParent().setRight(null);\n\t\t\t\n\t\t\tdeletedNode.setLeft(null);\n\t\t\tdeletedNode.setRight(null);\n\t\t\tdeletedNode.setParent(null);\n\t\t\t\n\t\t\treturn bstRoot;\n\t\t}\n\t\t\n\t\t/* If the node to be removed is not a root node, we'll apply the general approach.\n\t\t*/\n\t\tif (deletedNode.getParent()!=null){\n\n\t\t\t/* If the name of the parent node of the substitute node precedes the one of the substitute,\n\t\t\t * then, set the right child of the parent node to a null unless the substitute node is a child\n\t\t\t * of the deleted node.\n\t\t\t */\n\t\t\tif(substituteNode.getParent().getName().compareTo(substituteNode.getName())<0)\t\t\t\n\t\t\t\tif(substituteNode == deletedNode.getRight())\n\t\t\t\t\tsubstituteNode.getParent().setRight(substituteNode.getRight());\n\t\t\t\telse\t\n\t\t\t\tsubstituteNode.getParent().setRight(null);\n\t\t\t\n\t\t\t/* If the name of the parent node of the substitute node succeeds the one of the substitute,\n\t\t\t * then, set the left child of the parent node to a null unless the substitute node is a child\n\t\t\t * of the deleted node.\n\t\t\t */\n\t\t\telse\n\t\t\t\tif(substituteNode == deletedNode.getLeft())\n\t\t\t\t\tsubstituteNode.getParent().setLeft(substituteNode.getLeft());\n\t\t\t\telse\n\t\t\t\t\tsubstituteNode.getParent().setLeft(null);\n\t\t\t\n\t\t\t\n\t\t\t/* If the name of the parent node of the deleted node succeed the one of the substitute,\n\t\t\t * then, set substitute node as the left child of the parent node of the deleted node.\n\t\t\t * Otherwise, set the substitute to the right child.\n\t\t\t */\n\t\t\tif(deletedNode.getParent().getName().compareTo(substituteNode.getName())>0)\n\t\t\t\tdeletedNode.getParent().setLeft(substituteNode);\n\t\t\t\t\n\t\t\telse\n\t\t\t\tdeletedNode.getParent().setRight(substituteNode);\t\t\t\n\t\t\t\n\n\t\t\t/* Duplicates the binding that the deleted node previously had.\n\t\t\t */\n\t\t\tsubstituteNode.setLeft(deletedNode.getLeft());\n\t\t\tsubstituteNode.setRight(deletedNode.getRight());\n\t\t\tsubstituteNode.setParent(deletedNode.getParent());\n\t\t\t\n\t\t\t\n\t\t\t/* If the deleted node has any child, then set the substitute node as their parent node.\n\t\t\t */\n\t\t\tif (deletedNode.getRight()!=null)\n\t\t\t\tdeletedNode.getRight().setParent(substituteNode);\n\t\t\t\n\t\t\tif (deletedNode.getLeft()!=null)\n\t\t\tdeletedNode.getLeft().setParent(substituteNode);\n\t\t\t\n\t\t\tdeletedNode.setLeft(null);\n\t\t\tdeletedNode.setRight(null);\n\t\t\tdeletedNode.setParent(null);\n\t\t}\t\n\t\t/* If the node to be removed is a root node, we'll approach a bit differently.\n\t\t*/\t\t\t\n\t\telse{\n\t\t\t/* Sets the child node of the parent of the substitute one to null.\n\t\t\t*/\t\t\t\n\t\t\tif(substituteNode.getParent().getName().compareTo(substituteNode.getName())<0)\n\t\t\t\tsubstituteNode.getParent().setRight(null);\n\t\t\telse\n\t\t\t\tsubstituteNode.getParent().setLeft(null);\n\t\t\t\n\t\t\t/* Duplicates the binding that the deleted node previously had without setting the parent node.\n\t\t\t */\n\t\t\tsubstituteNode.setLeft(deletedNode.getLeft());\n\t\t\tsubstituteNode.setRight(deletedNode.getRight());\n\t\t\t\n\t\t\t\n\t\t\t/* If the deleted node has any child, then set the substitute node as their parent node.\n\t\t\t*/\t\t\t\n\t\t\tif (deletedNode.getRight()!=null)\n\t\t\t\tdeletedNode.getRight().setParent(substituteNode);\n\t\t\t\n\t\t\tif (deletedNode.getLeft()!=null)\n\t\t\tdeletedNode.getLeft().setParent(substituteNode);\t\n\t\t\t\n\t\t\t\n\t\t\tdeletedNode.setLeft(null);\n\t\t\tdeletedNode.setRight(null);\n\t\t\tdeletedNode.setParent(null);\n\t\t\t\n\t\t\tSystem.out.println(\"\\nThe node \" + deletedNode + \" is removed from the tree successfully\\n\");\n\t\t\t\n\t\t\treturn substituteNode;\n\t\t}\n\t\t\n\t\tSystem.out.println(\"\\nThe node \" + deletedNode + \" is removed from the tree successfully\\n\");\n\n\n\t\treturn bstRoot;\n\t\t\n\t}", "@Override\n public void delete(K key){\n try {\n this.rootNode = deleteNode(this.rootNode, key);\n } catch (IllegalArgumentException e) {\n System.out.println(e.getMessage());\n }\n }", "void arbitraryRemove(Nodefh node){\n\t\n\t\tif(node.Parent.Child == node){\n\t\t\tif(node.Right != null && node.Right != node){\n\t\t\t\tnode.Parent.Child = node.Right;\n\t\t\t\tif(node.Left!=null && node.Left != node){\n\t\t\t\t\tnode.Left.Right = node.Right;\n\t\t\t\t\tnode.Right.Left = node.Left;\n\t\t\t\t\tnode.Parent = null;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tnode.Right.Left = node.Right;\n\t\t\t\t\tnode.Parent = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tnode.Parent.Child = null;\n\t\t\t\tnode.Parent = null;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tif(node.Left != null && node.Left != node){\n\t\t\t\tnode.Left.Right = node.Right;\n\t\t\t\tnode.Right.Left = node.Left;\n\t\t\t}\n\t\t\tnode.Parent = null;\n\n\t\t}\n\t\tif(node.Child!=null){\n\t\t\tNodefh temp = node.Child;\n\t\t\tif(node.Child.Right!=null){\n\t\t\t\ttemp = node.Child.Right;\n\t\t\t}\n\t\t\tfhInsert(node.Child);\n\t\t\twhile(temp!=node.Child.Right){\n\t\t\t\tfhInsert(temp);\n\t\t\t\ttemp = temp.Right;\n\t\t\t}\n\n\t\t}\n\n\t}", "public TreeNode deleteNode1(TreeNode root, int key) {\n if (root == null) {\n return root;\n }\n\n // delete current node if root is the target node\n if (root.val == key) {\n // replace root with root->right if root->left is null\n if (root.left == null) {\n return root.right;\n }\n\n // replace root with root->left if root->right is null\n if (root.right == null) {\n return root.left;\n }\n\n // replace root with its successor if root has two children\n TreeNode p = findSuccessor(root);\n root.val = p.val;\n root.right = deleteNode1(root.right, p.val);\n return root;\n }\n if (root.val < key) {\n // find target in right subtree if root->val < key\n root.right = deleteNode1(root.right, key);\n } else {\n // find target in left subtree if root->val > key\n root.left = deleteNode1(root.left, key);\n }\n return root;\n }", "public void testRemove() {\r\n tree.insert(\"apple\");\r\n tree.insert(\"act\");\r\n tree.insert(\"bagel\");\r\n\r\n tree.remove(\"apple\");\r\n tree.remove(\"bagel\");\r\n\r\n tree.insert(\"ab\");\r\n tree.remove(\"ab\");\r\n\r\n try {\r\n tree.remove(\"apple\");\r\n }\r\n catch (ItemNotFoundException e) {\r\n assertNotNull(e);\r\n }\r\n }", "public boolean deleteNode(Type val){\n MyBinNode aux = this.root;\n MyBinNode parent = this.root;\n boolean left = true;\n \n while(aux.value.compareTo(val) != 0){\n parent = aux;\n if(aux.value.compareTo(val) > 0){\n left = true;\n aux = aux.left;\n }else{\n left = false;\n aux = aux.right;\n }\n if(aux == null){\n return false;\n }\n }\n \n if(aux.left==null && aux.right==null){\n if(aux == this.root){\n this.root = null;\n }else if(left){\n parent.left = null;\n }else{\n parent.right = null;\n }\n }else if(aux.right == null){\n if(aux == this.root){\n this.root = aux.left;\n }else if(left){\n parent.left = aux.left;\n }else{\n parent.right = aux.left;\n }\n }else if(aux.left == null){\n if(aux == this.root){\n this.root = aux.right;\n }else if(left){\n parent.left = aux.right;\n }else{\n parent.right = aux.right;\n }\n }else{\n MyBinNode replace = getToReplace(aux);\n if(aux == this.root){\n this.root = replace;\n }else if(left){\n parent.left = replace;\n }else{\n parent.right = replace;\n }\n replace.left = aux.left;\n }\n return true;\n }", "private void deleteNode(Node<K> p) {\n // If strictly internal, copy successor's element to p and then make p\n // point to successor.\n if (p.left != null && p.right != null) {\n Node<K> s = successor(p); // 节点有 2 个子节点时,找到实际删除的后继节点\n p.key = s.key; // 将后继节点的值复制到原来节点上,原来的节点只是值被删除,节点本身不删除\n p = s; // 将实际要删除的节点位置指向后继节点位置\n } // p has 2 children //\n // //////////////////////////////////////////////////////////////////\n // Start fixup at replacement node, if it exists. //\n Node<K> replacement = (p.left != null ? p.left : p.right); // 实际删除的节点最多只有一个子节点,并且一定是红色子节点\n if (replacement != null) { // 如果有一个红色子节点\n // Link replacement to parent //\n replacement.parent = p.parent; // 将此节点上移\n if (p.parent == null) //\n root = replacement; //\n else if (p == p.parent.left) // 实际被删除的节点 p 为左子\n p.parent.left = replacement; //\n else // 实际被删除的节点 p 为右子\n p.parent.right = replacement; //\n // //\n // Null out links so they are OK to use by fixAfterDeletion. //\n p.left = p.right = p.parent = null; //\n // //\n // Fix replacement //////////////////////////////////////////////////////////////////\n if (p.color == BLACK) // 删除情形 5. 因为 replacement 是红节点,所以这里 p 的颜色一定是黑色的\n fixAfterDeletion(replacement); // 修复只要将此红节点上移并置黑就完成了\n } else if (p.parent == null) { // return if we are the only node. //////////////////////////////////////////////////////////////////\n root = null; // 根节点被删除\n } else { // No children. Use self as phantom replacement and unlink. // 被删除的节点没有子节点时\n if (p.color == BLACK) // 如果是红色的节点,直接删除就完成\n fixAfterDeletion(p); // 如果被删除的是黑色节点,则会破坏红黑树性质 5,需要修复红黑树\n\n if (p.parent != null) {\n if (p == p.parent.left)\n p.parent.left = null;\n else if (p == p.parent.right)\n p.parent.right = null;\n p.parent = null;\n }\n }\n }", "public Boolean DeleteAllChild(Node node) {\n\t\tnode.setLeftChild(null);//\n\n\t\tif (node.getParent() == null) {\n\t\t\tSystem.out.println(\"error in delete root node!\");\n\t\t\treturn false;\n\t\t}\n\t\tif (node.getParent().getLeftChild() == node) {\n\t\t\tnode.getParent().setLeftChild(node.getRightChild());\n\t\t} else {\n\t\t\tNode tNode = node.getParent().getLeftChild();\n\t\t\tfor (;;) {\n\t\t\t\tif (tNode.getRightChild() == node)\n\t\t\t\t\tbreak;\n\t\t\t\ttNode = tNode.getRightChild();\n\t\t\t}\n\t\t\ttNode.setRightChild(node.getRightChild());\n\t\t}\n\t\treturn true;\n\t}", "public void deleteNode(int val) {\n\n Node nodeToDelete = find(val);\n\n if (nodeToDelete != null) {\n\n if (nodeToDelete.leftChild == null && nodeToDelete.rightChild == null) {\n\n //case1 - node has no child\n deleteCase1(nodeToDelete);\n } else if (nodeToDelete.leftChild != null && nodeToDelete.rightChild != null) {\n // case 3- node has both left and right child\n deleteCase3(nodeToDelete);\n } else {\n // Case 2 - node has left or right child not both\n deleteCase2(nodeToDelete);\n }\n\n }\n\n\n }", "public boolean delete(int x) {\n BstDeleteReturn output = deleteHelper(root,x );\n root = output.root;\n if (output.deleted) {\n size--;\n }\n\n return output.deleted;\n }", "private Node delete(Order ord2) {\n\t\treturn null;\n\t}", "private Node<E> delete(Node<E> localRoot, E item) {\r\n\t\tif(localRoot == null) {\r\n\t\t\t// item is not in the tree.\r\n\t\t\tdeleteReturn = null;\r\n\t\t\treturn localRoot;\r\n\t\t}\t\r\n\t\t// Search for item to delete\r\n\t\tint compResult = item.compareTo(localRoot.data);\r\n\t\tif(compResult < 0) {\r\n\t\t\t// item is smaller than localRoot.data\r\n\t\t\tlocalRoot.left = delete(localRoot.left, item);\r\n\t\t\treturn localRoot;\r\n\t\t}\r\n\t\telse if(compResult > 0) {\r\n\t\t\t// item is larger than localRoot.data\r\n\t\t\tlocalRoot.right = delete(localRoot.right, item);\r\n\t\t\treturn localRoot;\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// item is at the local root\r\n\t\t\tdeleteReturn = localRoot.data;\r\n\t\t\tif(localRoot.left == null) {\r\n\t\t\t\t// if there is no left child, return the right child which can also be null\r\n\t\t\t\treturn localRoot.right;\r\n\t\t\t}\r\n\t\t\telse if(localRoot.right == null) {\r\n\t\t\t\t// if theres no right child, return the left child\r\n\t\t\t\treturn localRoot.left;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t//Node being deleted has two children, replace the data with inorder predecessor\r\n\t\t\t\tif(localRoot.left.right == null) {\r\n\t\t\t\t\t// the left child has no right child\r\n\t\t\t\t\t//replace the data with the data in the left child\r\n\t\t\t\t\tlocalRoot.data = localRoot.left.data;\r\n\t\t\t\t\t// replace the left child with its left child\r\n\t\t\t\t\tlocalRoot.left = localRoot.left.left;\r\n\t\t\t\t\treturn localRoot;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t//Search for in order predecessor(IP) and replace deleted nodes data with IP\r\n\t\t\t\t\tlocalRoot.data = findLargestChild(localRoot.left);\r\n\t\t\t\t\treturn localRoot;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static TreapNode deleteNode(TreapNode root, int key)\n {\n // base case: the key is not found in the tree\n if (root == null) {\n return null;\n }\n\n // if the key is less than the root node, recur for the left subtree\n if (key < root.data) {\n root.left = deleteNode(root.left, key);\n }\n\n // if the key is more than the root node, recur for the right subtree\n else if (key > root.data) {\n root.right = deleteNode(root.right, key);\n }\n\n // if the key is found\n else {\n // Case 1: node to be deleted has no children (it is a leaf node)\n if (root.left == null && root.right == null)\n {\n // deallocate the memory and update root to null\n root = null;\n }\n\n // Case 2: node to be deleted has two children\n else if (root.left != null && root.right != null)\n {\n // if the left child has less priority than the right child\n if (root.left.priority < root.right.priority)\n {\n // call `rotateLeft()` on the root\n root = rotateLeft(root);\n\n // recursively delete the left child\n root.left = deleteNode(root.left, key);\n }\n else {\n // call `rotateRight()` on the root\n root = rotateRight(root);\n\n // recursively delete the right child\n root.right = deleteNode(root.right, key);\n }\n }\n\n // Case 3: node to be deleted has only one child\n else {\n // choose a child node\n TreapNode child = (root.left != null)? root.left: root.right;\n root = child;\n }\n }\n\n return root;\n }", "public boolean removeBST(T data) {\n\t\n\t\tif (!isEmpty()) {\n\t\t\ttry {\n\t\t\t\tfound = false;\n\t\t\t\troot = recRemove(data, this.root);\n\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.out.println(\"BST is empty!\");\n\t\t}\n\t\t\n\t\tlength -= 1;\n\t\treturn found;\n\t}", "@Override\n\tpublic boolean delete(E e) {\n\t\tTreeNode<E> parent = null;\n\t\tTreeNode<E> curr = root;\n\t\t\n\t\twhile(curr != null) {\n\t\t\tif(e.compareTo( curr.element) < 0) {\n\t\t\t\tparent = curr;\n\t\t\t\tcurr = curr.left;\n\t\t\t}\n\t\t\telse if(e.compareTo(curr.element) > 0) {\n\t\t\t\tparent = curr;\n\t\t\t\tcurr = curr.right;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tbreak; \n\t\t\t}\n\t\t}\n\t\t\n\t\tif(curr == null) {\n\t\t\treturn false; // this element was not found.\n\t\t}\n\t\t\n\t\tif(curr.left == null) {\n\t\t\t if(parent == null) {\n\t\t\t\t root = curr.right;\n\t\t\t }\n\t\t\t else {\n\t\t\t\t if(e .compareTo(parent.element) < 0) {\n\t\t\t\t\t parent.left = curr.right;\n\t\t\t\t }\n\t\t\t\t else {\n\t\t\t\t\t parent.right = curr.right;\n\t\t\t\t }\n\t\t\t }\n\t\t}\n\t\telse {\n\t\t\tTreeNode<E> parentOfRightMost = curr;\n\t\t\tTreeNode<E> rightMost = curr.left;\n\t\t\t\n\t\t\twhile(rightMost.right != null) {\n\t\t\t\trightMost = rightMost.right;\n\t\t\t}\n\t\t\t\n\t\t\tcurr.element = rightMost.element;\n\t\t\t\n\t\t\tif(parentOfRightMost == curr) {\n\t\t\t\tparentOfRightMost.left = rightMost.left;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tparentOfRightMost.right = rightMost.left;\n\t\t\t}\n\t\t}\n\t\tsize--;\n\t\treturn true;\n\t}", "public void deleteNode(TreeNode node) {\n if (node != null) {\n /* One child situation */\n if (node.getLeft() == null) {\n transplantNode(node, node.getRight());\n } else if (node.getRight() == null) {\n transplantNode(node, node.getLeft());\n } else {\n // Node has two children, so replacement is not that simple.\n TreeNode replacement = getMinimumNodeInSubTree(node.getRight());\n if (replacement.getParent() != node) {\n transplantNode(replacement, replacement.getRight());\n replacement.setRight(node.getRight());\n replacement.getRight().setParent(replacement);\n }\n transplantNode(node, replacement);\n replacement.setLeft(node.getLeft());\n replacement.getLeft().setParent(replacement);\n }\n }\n }", "private AvlNode deleteNode(AvlNode root, int value) {\n\r\n if (root == null)\r\n return root;\r\n\r\n // If the value to be deleted is smaller than the root's value,\r\n // then it lies in left subtree\r\n if ( value < root.key )\r\n root.left = deleteNode(root.left, value);\r\n\r\n // If the value to be deleted is greater than the root's value,\r\n // then it lies in right subtree\r\n else if( value > root.key )\r\n root.right = deleteNode(root.right, value);\r\n\r\n // if value is same as root's value, then This is the node\r\n // to be deleted\r\n else {\r\n // node with only one child or no child\r\n if( (root.left == null) || (root.right == null) ) {\r\n\r\n AvlNode temp;\r\n if (root.left != null)\r\n temp = root.left;\r\n else\r\n temp = root.right;\r\n\r\n // No child case\r\n if(temp == null) {\r\n temp = root;\r\n root = null;\r\n }\r\n else // One child case\r\n root = temp; // Copy the contents of the non-empty child\r\n\r\n temp = null;\r\n }\r\n else {\r\n // node with two children: Get the inorder successor (smallest\r\n // in the right subtree)\r\n AvlNode temp = minValueNode(root.right);\r\n\r\n // Copy the inorder successor's data to this node\r\n root.key = temp.key;\r\n\r\n // Delete the inorder successor\r\n root.right = deleteNode(root.right, temp.key);\r\n }\r\n }\r\n\r\n // If the tree had only one node then return\r\n if (root == null)\r\n return root;\r\n\r\n // STEP 2: UPDATE HEIGHT OF THE CURRENT NODE\r\n root.height = Math.max(height(root.left), height(root.right)) + 1;\r\n\r\n // STEP 3: GET THE BALANCE FACTOR OF THIS NODE (to check whether\r\n // this node became unbalanced)\r\n int balance = balance(root).key;\r\n\r\n // If this node becomes unbalanced, then there are 4 cases\r\n\r\n // Left Left Case\r\n if (balance > 1 && balance(root.left).key >= 0)\r\n return doRightRotation(root);\r\n\r\n // Left Right Case\r\n if (balance > 1 && balance(root.left).key < 0) {\r\n root.left = doLeftRotation(root.left);\r\n return doRightRotation(root);\r\n }\r\n\r\n // Right Right Case\r\n if (balance < -1 && balance(root.right).key <= 0)\r\n return doLeftRotation(root);\r\n\r\n // Right Left Case\r\n if (balance < -1 && balance(root.right).key > 0) {\r\n root.right = doRightRotation(root.right);\r\n return doLeftRotation(root);\r\n }\r\n\r\n return root;\r\n }", "public boolean delete(int data) {\n if(!search(data)) return false;\n \n root = delete(data, root);\n return true;\n\n // Node temp = root;\n // Node trailTemp = null;\n\n // while(temp.data != data) {\n // trailTemp = temp;\n // if(temp.data < data) {\n // temp = temp.right;\n // }\n // else if(temp.data > data) {\n // temp = temp.left;\n // }\n \n // }\n\n // if(temp.left == null && temp.right == null) {\n // if(trailTemp.left == temp) {\n // trailTemp.left = null;\n // }\n // else if(trailTemp.right == temp) {\n // trailTemp.right = null;\n // }\n // }\n\n // else if(temp.left == null) {\n // Node rightTemp = temp.right;\n // if(trailTemp.left == temp) {\n // trailTemp.left = rightTemp;\n // }\n // else if(trailTemp.right == temp) {\n // trailTemp.right = rightTemp;\n // }\n // temp = null;\n // }\n // else if(temp.right == null) {\n // Node leftTemp = temp.left;\n // if(trailTemp.left == temp) {\n // trailTemp.left = leftTemp;\n // }\n // else if(trailTemp.right == temp) {\n // trailTemp.right = leftTemp;\n // }\n // temp = null;\n // }\n // else {\n // Node minTemp = minRightSubTree(temp.right);\n // temp.data = minTemp.data;\n // Node trailMinTemp = null;\n // Node minTemp2 = temp.right;\n // while(minTemp2.left != null) {\n // trailMinTemp = minTemp2;\n // minTemp2 = minTemp2.left;\n // }\n \n // if(minTemp2.left == null && minTemp2.right == null) {\n // trailMinTemp.left = null;\n // }\n // else if(minTemp2.left == null) {\n // Node rightTemp = minTemp2.right;\n // trailMinTemp.left = rightTemp;\n // minTemp2 = minTemp = null;\n // }\n // }\n \n // return true;\n }", "public void delete(int time) {\n\t\troot = delete(root, time);\n\t}", "public boolean delete(int number) {\r\n\t\tif (root == null) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn recursiveDelete(number, root, null);\r\n\t\t}\r\n\t}", "public void delete(SplayNode n) {\n\t\t this.splay(n);\n\n\t\t SplayTree leftSubtree = new SplayTree();\n\t\t leftSubtree.root = this.root.left;\n\t\t if(leftSubtree.root != null)\n\t\t leftSubtree.root.parent = null;\n\n\t\t SplayTree rightSubtree = new SplayTree();\n\t\t rightSubtree.root = this.root.right;\n\t\t if(rightSubtree.root != null)\n\t\t rightSubtree.root.parent = null;\n\n\t\t if(leftSubtree.root != null) {\n\t\t \tSplayNode m = leftSubtree.maximum(leftSubtree.root);\n\t\t leftSubtree.splay(m);\n\t\t leftSubtree.root.right = rightSubtree.root;\n\t\t this.root = leftSubtree.root;\n\t\t }\n\t\t else {\n\t\t this.root = rightSubtree.root;\n\t\t }\n\t\t }", "public static native void deleteTreesBelow(String dir) throws IOException;", "@Test\n public void remove_BST_1_CaseLeafRight()\n {\n BinarySearchTree bst = new BinarySearchTree();\n No root = new No(6);\n No leaf = new No(9);\n \n bst.insert(null, root);\n //bst.printTree();\n \n bst.insert(root, new No(2));\n //bst.printTree();\n \n bst.insert(root, leaf);\n //bst.printTree();\n //System.err.println(); // Print[ERR] Devido a prioridade do buffer de impressao (out, err)\n \n assertEquals(leaf, bst.remove(leaf));\n assertEquals(new Integer(2), bst.size());\n //bst.printTree();\n }", "public void delete(Item<K,V> i) {\n if (i.getL() == null && i.getR() == null) {\n if (i.getP() != null) {\n declineChild(i, null);\n } else {\n root = null;\n }\n } else if (i.getL() != null && i.getR() != null) {\n Item<K,V> s = successor(i);\n declineChild(s, s.getR());\n i.setK(s.getK());\n i.setV(s.getV());\n } else {\n Item<K,V> x = i.getL();\n if (x == null) {\n x = i.getR();\n }\n if (i.getP() != null) {\n declineChild(i, x);\n } else {\n root = x;\n x.setP(null);\n }\n }\n size -= 1;\n }", "public int delete(int k){\n\t WAVLNode x = treePosForDel(this, k); // find the node to delete\r\n\t int cnt = 0; // rebalance operations counter\r\n\t if(x.key!=k) { // if a node with a key of k doesnt exist in the tree there is nothing to delete, return -1\r\n\t\t return -1;\r\n\t }\r\n\t if(this.root.key==x.key&&this.root.rank==0) {//root is a leaf\r\n\t\t this.root=EXT_NODE;// change the root pointer to EXT_NODE\r\n\t\t return 0;\r\n\t }\r\n\t else if(this.root.key==x.key&&(this.root.right==EXT_NODE||this.root.left==EXT_NODE)) {//root is onary\r\n\t\t if(x.left!=EXT_NODE) { // x is a root with a left child\r\n\t\t\t x.left.parent = null;\r\n\t\t\t this.root = x.left; // change the root pointer to the root's left child\r\n\t\t\t x.left.sizen=1;\r\n\t\t\t return 0;\r\n\t\t }\r\n\t\t x.right.parent = null; // x is a root with a right child \r\n\t\t x.right.sizen=1;\r\n\t\t this.root = x.right; // change the root pointer to the root's right child\r\n\t\t return 0;\r\n\t }\r\n\t WAVLNode z;\r\n\t if(isInnerNode(x)) {// x is an inner node, requires a call for successor and swap\r\n\t\t z = successorForDel(x); // find the successor of x\r\n\t\t x = swap(x,z); // put x's successor instead of x and delete successor \r\n\t }\r\n\t\t if(x.rank == 0) {//x is a leaf\r\n\t\t\t if(parentside(x.parent, x).equals(\"left\")) { // x is a left child of it's parent, requires change in pointers \r\n\t\t\t\t x.parent.left = EXT_NODE;\r\n\t\t\t\t z = x.parent;\r\n\t\t\t\t x = x.parent.left;\r\n\t\t\t }\r\n\t\t\telse { // x is a right child of it's parent, requires change in pointers \r\n\t\t\t\t x.parent.right = EXT_NODE;\r\n\t\t\t\t z = x.parent;\r\n\t\t\t\t x = x.parent.right; \r\n\t\t\t }\r\n\t\t }\r\n\t\t else {//x is onary\r\n\t\t\t boolean onaryside = onaryLeft(x); // check if x is onary with a left child\r\n\t\t\t WAVLNode x_child = EXT_NODE;\r\n\t\t\t if (onaryside) {\r\n\t\t\t\t x_child=x.left; // get a pointer for x child\r\n\t\t\t }\r\n\t\t\t else {\r\n\t\t\t\t x_child=x.right;\r\n\t\t\t }\r\n\t\t\t if(parentside(x.parent, x).equals(\"left\")) { // x is a left child of its parent, change pointers for delete and rebalance loop\r\n\t\t\t\t x.parent.left=x_child;\r\n\t\t\t\t x_child.parent=x.parent;\r\n\t\t\t\t z=x.parent;\r\n\t\t\t\t x=x_child;\r\n\t\t\t\t \r\n\t\t\t }\r\n\t\t\t else {// x is a left child of its parent, change pointers for delete and rebalance loop\r\n\t\t\t\t x.parent.right=x_child;\r\n\t\t\t\t x_child.parent=x.parent;\r\n\t\t\t\t z=x.parent;\r\n\t\t\t\t x=x_child;\r\n\t\t\t }\r\n\t\t }\r\n\t if (z.left.rank==-1&&z.right.rank==-1) {//special case, z becomes a leaf, change pointers and demote\r\n\t\t demote(z);\r\n\t\t x=z;\r\n\t\t z=z.parent;\r\n\t\t cnt++;\r\n\t }\r\n\t \r\n\t while(z!=null&&z.rank-x.rank==3) { // while the tree is not balanced continue to balance the tree\r\n\t\t if(parentside(z, x).equals(\"left\")) { // x is z's left son\r\n\t\t\t if(z.rank-z.right.rank==2) {//condition for demote\r\n\r\n\t\t\t\t demote(z);\r\n\r\n\t\t\t\t x=z;\r\n\t\t\t\t z=z.parent;\r\n\t\t\t\t cnt++;\r\n\t\t\t }\r\n\t\t\t else {\r\n\t\t\t\t if(z.right.rank-z.right.left.rank==2&&z.right.rank-z.right.right.rank==2) {//condition for doubledemote left\r\n\t\t\t\t\t doubleDemoteLeft(z);\r\n\t\t\t\t\t x=z;\r\n\t\t\t\t\t z=z.parent;\r\n\t\t\t\t\t cnt+=2;\r\n\t\t\t\t\t \r\n\t\t\t\t }\r\n\t\t\t\t else if((z.right.rank-z.right.left.rank==1||z.right.rank-z.right.left.rank==2)&&z.right.rank-z.right.right.rank==1) {// condition for rotate left for del\r\n\t\t\t\t\t rotateLeftDel(z);\r\n\t\t\t\t\t cnt+=3;\r\n\t\t\t\t\t break; // tree is balanced\r\n\t\t\t\t }\r\n\t\t\t\t else {//condition for doublerotate left for del\r\n\t\t\t\t\t doubleRotateLeftDel(z);\r\n\t\t\t\t\t \r\n\t\t\t\t\t cnt=cnt+5;\r\n\t\t\t\t\t break; // tree is balanced\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t }\r\n\t\t else { // x is z's right son, conditions are symmetric to left side\r\n\t\t\t if(z.rank-z.left.rank==2) {\r\n\t\t\t\t demote(z);\r\n\t\t\t\t x=z;\r\n\t\t\t\t z=z.parent;\r\n\t\t\t\t cnt++;\r\n\t\t\t\t \r\n\t\t\t }\r\n\t\t\t else {\r\n\t\t\t\t if(z.left.rank-z.left.right.rank==2&&z.left.rank-z.left.left.rank==2) {\r\n\t\t\t\t\t doubleDemoteright(z);\r\n\t\t\t\t\t x=z;\r\n\t\t\t\t\t z=z.parent;\r\n\t\t\t\t\t cnt+=2;\r\n\t\t\t\t }\r\n\t\t\t\t else if((z.left.rank-z.left.right.rank==1||z.left.rank-z.left.right.rank==2)&&z.left.rank-z.left.left.rank==1) {\r\n\t\t\t\t\t rotateRightDel(z);\r\n\t\t\t\t\t cnt+=3;\r\n\t\t\t\t\t break;\r\n\t\t\t\t }\r\n\t\t\t\t else {\r\n\r\n\t\t\t\t\t doubleRotateRightDel(z);\r\n\t\t\t\t\t cnt+=5;\r\n\t\t\t\t\t break;\r\n\t\t\t\t }\r\n\t\t\t\t \r\n\t\t\t }\r\n\t\t }\r\n\t }\r\n\t return cnt;\r\n }", "public int deleteRoot(AVLNode node) { // root is unary node or leaf\n\t\tif (node.isLeaf()) {\n\t\t\tthis.root = null;\n\t\t} else { // root is unary\n\t\t\tif (node.getRight().getHeight() != -1) { // root has a right child\n\t\t\t\tthis.root = node.getRight();\n\t\t\t\tnode.getRight().setParent(null);\n\t\t\t\tnode.setRight(null);\n\t\t\t} else { // root has a left child\n\t\t\t\tthis.root = node.getLeft();\n\t\t\t\tnode.getLeft().setParent(null);\n\t\t\t\tnode.setLeft(null);\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}" ]
[ "0.7594081", "0.7466455", "0.7105491", "0.68708694", "0.6815698", "0.6675795", "0.6638881", "0.6588636", "0.65602005", "0.6536757", "0.65267706", "0.65024835", "0.64376396", "0.640024", "0.6377503", "0.6373802", "0.6373676", "0.6367904", "0.63636136", "0.63413936", "0.63385487", "0.63203436", "0.6276115", "0.62507963", "0.6248354", "0.62470907", "0.62327814", "0.6222917", "0.6218364", "0.62068677", "0.6186402", "0.61860496", "0.6175127", "0.61673754", "0.61638993", "0.6158276", "0.6149559", "0.6140457", "0.6137871", "0.61337316", "0.61319834", "0.61265415", "0.61250997", "0.6112518", "0.6111788", "0.61036056", "0.6099846", "0.6096549", "0.6096311", "0.6095794", "0.6089266", "0.6076401", "0.6073431", "0.60719883", "0.60708135", "0.6066652", "0.6060971", "0.60609376", "0.604608", "0.6040414", "0.6037599", "0.6022203", "0.60166895", "0.60085475", "0.60069436", "0.6005802", "0.6005403", "0.6005403", "0.60050136", "0.6003533", "0.6002132", "0.59970886", "0.598761", "0.59801996", "0.5976977", "0.5959715", "0.5937226", "0.5934349", "0.59330976", "0.59284216", "0.59197694", "0.5916054", "0.59126633", "0.5900854", "0.5899197", "0.5888557", "0.5888223", "0.5878561", "0.5862318", "0.5859479", "0.5858227", "0.5853548", "0.5848268", "0.5833475", "0.5829099", "0.5827211", "0.5825967", "0.58248955", "0.5820105", "0.5811121" ]
0.7347209
2
/ holder.tvDiscount.setText(TextUtils.concat(productHuntList.get(position).getSubCatName() + " " + mContext.getString(R.string.in) + " " + productHuntList.get(position).getCategoryName()));
@Override public void onBindViewHolder(@NonNull final ProductHuntViewHolder holder, final int position) { holder.tvDiscount.setText(productHuntList.get(position).getHuntTitle()); holder.tvPostedOn.setText(TextUtils.concat(mContext.getString(R.string.expected_delivery_date) + " : ")); holder.tvPostedDate.setText(AppUtils.getInstance().formatDate(productHuntList.get(position).getExpectedDeliveryDate(), SERVICE_DATE_FORMAT, DATE_FORMAT)); holder.tvInstructions.setText(productHuntList.get(position).getDescription()); if (!productHuntList.get(position).getBuddyAcceptCount().equals("") && Integer.parseInt(productHuntList.get(position).getBuddyAcceptCount()) > 0) { int buddyCount = Integer.parseInt(productHuntList.get(position).getBuddyAcceptCount()); holder.tvBuddies.setVisibility(View.VISIBLE); holder.tvBuddies.setText(TextUtils.concat(productHuntList.get(position).getBuddyAcceptCount() + " " + mContext.getString(buddyCount == 1 ? R.string.buddy_has : R.string.buddies_have) + " " + mContext.getString(R.string.accepted_request))); }else { holder.tvBuddies.setVisibility(View.GONE); } if (productHuntList.get(position).getHuntImage() == null || productHuntList.get(position).getHuntImage().equals("")){ holder.tvNoOfItems.setText(TextUtils.concat("0 " + mContext.getString(R.string.txt_images))); holder.ivProductImage.setImageResource(R.drawable.ic_placeholder); }else { holder.tvNoOfItems.setText(TextUtils.concat(productHuntList.get(position).getHuntImage().split(",").length + " " + mContext.getString(R.string.txt_images))); if (productHuntList.get(position).getHuntImage() != null && productHuntList.get(position).getHuntImage().split(",").length > 0) { AppUtils.getInstance().setImages(mContext, productHuntList.get(position).getHuntImage().split(",")[0], holder.ivProductImage, 0, R.drawable.ic_placeholder); } } holder.rlPostRow.setBackgroundColor(AppUtils.getInstance().getProductBackgroundColor(mContext, position % 5)); if (productHuntList.get(position).getProductType().equals("1")) { holder.tvPostedDate.setVisibility(View.VISIBLE); holder.tvPostedOn.setVisibility(View.VISIBLE); }else { holder.tvPostedDate.setVisibility(View.GONE); holder.tvPostedOn.setVisibility(View.GONE); } if (productHuntList.get(position).getBuddyId().equals("") || productHuntList.get(position).getBuddyId().equals("0")) { holder.ivMenu.setVisibility(View.VISIBLE); }else { holder.ivMenu.setVisibility(View.GONE); } holder.ivMenu.setOnClickListener(v -> { holder.ivMenu.setVisibility(View.GONE); showPopupWindow(holder.ivMenu, position, holder.rlPostRow); }); holder.rlPostRow.setOnClickListener(v -> { productHuntListingFragment.openBuddyListActivity(position); }); if (productHuntList.get(position).getBuddyAcceptCount().equals("0")) { if (productHuntList.get(position).getIsRead().equals("1")) { holder.ivIcon.setVisibility(View.INVISIBLE); } else { if (productHuntList.get(position).getNotificationAction().equals("15")) { holder.ivIcon.setVisibility(View.VISIBLE); } else holder.ivIcon.setVisibility(View.INVISIBLE); } }else { if (productHuntList.get(position).getIsRead().equals("1")) { holder.ivIcon.setVisibility(View.INVISIBLE); } else { holder.ivIcon.setVisibility(View.VISIBLE); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onBindViewHolder(@NonNull subfavViewHolder holder, int position) {\nholder.favval.setText(String.valueOf(ctgr.getItems().get(position)));\n }", "private void updateExpensesCategoriesBreakdown() {\n TextView amountEntertainment = (TextView) findViewById(R.id.amount_categoryBreakdown_entertainment);\n TextView amountFood = (TextView) findViewById(R.id.amount_categoryBreakdown_food);\n TextView amountGifts = (TextView) findViewById(R.id.amount_categoryBreakdown_gifts);\n TextView amountMisc = (TextView) findViewById(R.id.amount_categoryBreakdown_misc);\n TextView amountShopping = (TextView) findViewById(R.id.amount_categoryBreakdown_shopping);\n TextView amountTravel = (TextView) findViewById(R.id.amount_categoryBreakdown_travel);\n\n amountEntertainment.setText(R.string.str_dollarSign);\n amountFood.setText(R.string.str_dollarSign);\n amountGifts.setText(R.string.str_dollarSign);\n amountMisc.setText(R.string.str_dollarSign);\n amountShopping.setText(R.string.str_dollarSign);\n amountTravel.setText(R.string.str_dollarSign);\n\n amountEntertainment.append(database.getCategoryExpenditure(\"entertainment\", selectedMonth).toString());\n amountFood.append(database.getCategoryExpenditure(\"food\", selectedMonth).toString());\n amountGifts.append(database.getCategoryExpenditure(\"gifts\", selectedMonth).toString());\n amountMisc.append(database.getCategoryExpenditure(\"misc\", selectedMonth).toString());\n amountShopping.append(database.getCategoryExpenditure(\"shopping\", selectedMonth).toString());\n amountTravel.append(database.getCategoryExpenditure(\"travel\", selectedMonth).toString());\n }", "@Override\n public void onBindViewHolder(ProductViewHolder holder, int position) {\n zikar product = zikarList.get(position);\n\n //binding the data with the viewholder views\n holder.textViewID1.setText((String.valueOf(product.getId())));\n holder.textViewTitle.setText(product.getZikarName());\n holder.textViewPrice.setText(String.valueOf(product.getCounter()));\n holder.textViewRemainingCount.setText(String.valueOf(product.getRemainingCounter()));\n\n\n\n }", "@RequiresApi(api = Build.VERSION_CODES.N)\n @Override\n public void onBindViewHolder(ConcessionCheckoutItemAdapter.ConcessionCheckoutItemViewHolder holder, int position) {\n // - get element from your dataset at this position\n // - replace the contents of the view with that element\n holder.nameTextView.setText(concessionDataset.get(position).getConcessionName());\n holder.qtyTextView.setText(\"x\"+concessionDataset.get(position).getQuantity());\n holder.priceTextView.setText(retrieveLocalCurrencyFormat(\n concessionDataset.get(position).getConcessionPrice()*\n concessionDataset.get(position).getQuantity()));\n\n }", "@Override\n public void onBindViewHolder(ViewHolder viewHolder, int i) {\n FoodItem food = mItems.get(i);\n //The string that contains the name of the product gets taken from food and gets inserted in\n //the viewHolder for the name\n viewHolder.tvNature.setText(food.getName());\n //The int that contains the amount of the product gets taken from food and gets inserted in\n //the viewHolder for the amount\n viewHolder.tvAmountNature.setText(String.valueOf(food.getAmount()));\n }", "public String getPriceAndDiscount() {\n return _context.getResources().getString(_context.getResources().getIdentifier(\"price_and_discount\", \"string\", _context.getPackageName()), getDiscount(), getOriginalPrice(), getSalePrice());\n\n }", "@Override\n public void onBindViewHolder( CategoryViewHolder holder, int position) {\n Category category = categories.get(position);\n\n\n Typeface plain = AppTypeFace.NewInstance(mContext).getTypeFace();\n //holder.category_name.setSelected(true);\n holder.category_name.setTypeface(plain);\n StringBuilder sb = new StringBuilder(\"\");\n sb.append(category.getCategory())\n .append(\"(\")\n .append(category.getPromotion_count())\n .append(\")\");\n\n holder.category_name.setText(sb.toString());\n holder.brand_name.setText(\"\");\n }", "@Override\n public void onBindViewHolder(ViewHolder holder, int position) {\n int animal = mData.get(position);\n holder.myTextView.setText(\"\" + animal);\n }", "private void displayquintity(int numberOFCoffee){\n TextView quintityText= findViewById(R.id.quantity_text_view);\n quintityText.setText(\"\"+numberOFCoffee);\n\n }", "@Override\n public void onClick(View view) {\n helper.increaseQty(item);\n holder.mQuantity.setText(String.valueOf(String.valueOf(helper.getQuantityFromTable(item))));\n holder.mPrice.setText(\"$\" + getNewPrice(item, holder));\n// holder.mTotal.setText(\"$\"+total);\n\n }", "@Override\n public void onBindViewHolder(ViewHolder holder, int position) {\n // - get element from your dataset at this position\n // - replace the contents of the view with that element\n double amount= mDataset.get(position).Amount;\n String am=String.format(\"%.2f\",amount);\n\n holder.mAmount.setText(\"\"+am);\n\n double balance= mDataset.get(position).Balance;\n String bal=String.format(\"%.2f\",balance);\n\n holder.mBalance.setText(\"\"+bal);\n\n\n String description=mDataset.get(position).Description;\n if(!description.isEmpty()){\n holder.mDescription.setText(\"\"+description);\n }\n\n\n Date date= mDataset.get(position).Date;\n if(date!=null) {\n holder.mAmount.setText(\"\"+date.toString());\n }\n }", "@Override\n protected void populateViewHolder(CartListHolder viewHolder, CartListGetData model, final int position) {\n itemid.add(model.getItemid());\n itemname.add(model.getItemname());\n itemprice.add(model.getItemprice());\n itmeimage.add(model.getImageid());\n viewHolder.setTitleName(model.getItemname());\n viewHolder.setPrice(model.getItemprice());\n //viewHolder.setPrice(model.getPrice());\n viewHolder.setImage(getApplicationContext(), model.getImageid());\n total = total + Float.parseFloat(model.getItemprice());\n tax = (total/100)*10;\n taxtext.setText(tax+\"\");\n pricetext.setText(total+\"\");\n totalcarttext.setText(String.valueOf(tax+total));\n System.out.println(\"count : \"+count++);\n }", "private void updatePriceView() {\n int subTotal = 0;\n int cartQuantity = 0;\n int calculatedDiscount = 0;\n\n DecimalFormat decimalFormatter = new DecimalFormat(\"₹#,##,###.##\");\n\n for (CartItem cartItem : cartList) {\n cartQuantity += cartItem.getQuantity();\n subTotal += cartItem.getQuantity() * cartItem.getPrice();\n }\n\n switch (discountType) {\n case AMOUNT:\n calculatedDiscount = discount;\n break;\n case PERCENTAGE:\n calculatedDiscount = (subTotal * discount) / 100;\n break;\n }\n\n subTotalView.setText(decimalFormatter.format(subTotal));\n\n String count = \"(\" + cartQuantity;\n\n if (cartQuantity < 2) {\n count += \" Item)\";\n } else {\n count += \" Items)\";\n }\n\n textNumberItems.setText(count);\n discountView.setText(decimalFormatter.format(calculatedDiscount));\n total = subTotal - calculatedDiscount;\n totalView.setText(decimalFormatter.format(total));\n updateCartNotification(cartQuantity);\n }", "@Override\n public void onBindViewHolder(ViewHolder holder, int position) {\n c.moveToPosition(position);\n holder.tv1.setText(c.getInt(0)+\"\");\n holder.tv2.setText(c.getString(1));\n holder.tv3.setText(c.getString(2));\n }", "@Override\n public void onBindViewHolder(MyViewHolder holder, int position) {\n\n holder.tv.setText(arraylist.get(position));\n }", "@Override\r\n protected void\r\n onBindViewHolder(@NonNull itemsViewholder holder,\r\n int position, @NonNull item model)\r\n {\r\n\r\n // Add Nom from model class (here\r\n // \"item.class\")to appropriate view in Card\r\n // view (here \"item.xml\")\r\n holder.Nom.setText(model.getNom());\r\n holder.Quantite.setText(String.valueOf(model.getStock()));\r\n\r\n double Totall= model.getPrix()*model.getStock();\r\n DecimalFormat df = new DecimalFormat(\"#0.00\");\r\n String STotall= String.valueOf(df.format(Totall));\r\n holder.Total.setText(STotall+\"€\");\r\n\r\n toto += Totall;\r\n // PanierActivity.total_cart=model.getPrix()*model.getStock();\r\n\r\n PanierActivity.total_panier.setText(String.valueOf(toto)+\"€\");\r\n hello+=Totall;\r\n\r\n\r\n\r\n\r\n\r\n }", "@Override\n public void onBindViewHolder(@NonNull CustomViewHolder customViewHolder, int i) {\n ListItem listItem = listItems.get(i);\n customViewHolder.temp.setText(Double.toString(listItem.getMain().getTemp()));\n// Main main = mainList.get(i);\n// customViewHolder.temp.setText(Double.toString(main.getTemp()));\n customViewHolder.date.setText(listItem.getDtTxt());\n }", "@Override\n public void onBindViewHolder(final MyViewHolder holder, int position) {\n holder.foodName.setText(mDataset.get(position).first);\n holder.restaurantName.setText(mDataset.get(position).second);\n holder.addBtn.setOnClickListener(new Button.OnClickListener() {\n public void onClick(View v) {\n SharedPreferences pref = (SharedPreferences) getSharedPreferences(\"CART\", MODE_PRIVATE);\n String cart = pref.getString(\"cart\", \"\");\n String item = holder.foodName.getText().toString() + \":\" + holder.restaurantName.getText().toString();\n if(cart.isEmpty()){\n cart = item;\n }else{\n cart = cart + \"~\" + item;\n }\n pref.edit().putString(\"cart\", cart).apply();\n }\n });\n }", "@Override\n public View getView(final int position, View convertView, ViewGroup parent) {\n final MoneyTrackerItem productItem=parkingList.get(position);\n\n ViewHolder holder = null;\n LayoutInflater inflater = (LayoutInflater) activity\n .getSystemService(Activity.LAYOUT_INFLATER_SERVICE);\n // If holder not exist then locate all view from UI file.\n if (convertView == null) {\n\n // inflate UI from XML file\n convertView = inflater.inflate(R.layout.money_tracker_list_item, parent, false);\n // get all UI view\n holder = new ViewHolder(convertView);\n // set tag for holder\n convertView.setTag(holder);\n\n\n } else {\n // if holder created, get tag from view\n holder = (ViewHolder) convertView.getTag();\n }\n\n /* productItem = parkingList.get(position);\n Log.e(\"book\",\"\"+book);*/\n\n holder.clinicName.setText(productItem.getClinicName());\n Log.e(\"packageName\",\"\"+productItem.getClinicName());\n holder.clinicName.setTypeface(Typeface.createFromAsset(getContext().getAssets(),\"Fonts/Roboto-Regular.ttf\"));\n\n holder.totalAmount.setText(\"Total Amount : \"+productItem.getAmount()+\" Rs/-\");\n //holder.actulPrice.setPaintFlags(holder.actulPrice.getPaintFlags()| Paint.STRIKE_THRU_TEXT_FLAG);\n holder.totalAmount.setTypeface(Typeface.createFromAsset(getContext().getAssets(),\"Fonts/Roboto-Light.ttf\"));\n\n holder.online.setText(productItem.getOnline());\n holder.online.setTypeface(Typeface.createFromAsset(getContext().getAssets(),\"Fonts/Roboto-Light.ttf\"));\n\n holder.offline.setText(productItem.getOffline());\n holder.offline.setTypeface(Typeface.createFromAsset(getContext().getAssets(),\"Fonts/Roboto-Light.ttf\"));\n\n holder.patients.setText(productItem.getPatients());\n holder.patients.setTypeface(Typeface.createFromAsset(getContext().getAssets(),\"Fonts/Roboto-Light.ttf\"));\n\n\n return convertView;\n }", "private void displayQuantity(int numOfCoffeee) {\n TextView quantityTextView = (TextView) findViewById(R.id.quantity_text_view);\n quantityTextView.setText(\"\" + numOfCoffeee);\n }", "@Override\n public void onBindViewHolder(final View_Holder holder, final int position) {\n String cleanString = list.get(position).viewAll.replaceAll(\"[£,.]\", \"\");\n\n //format price\n double parsed = Double.parseDouble(cleanString);\n String formatted = NumberFormat.getCurrencyInstance().format((parsed/1000));\n\n //Use the provided View Holder on the onCreateViewHolder method to populate the current row on the RecyclerView\n holder.day.setText(list.get(position).day);\n holder.viewAll.setText(formatted);\n }", "@Override\n public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {\n ((TextView)((ViewHolder)holder).layout.getChildAt(0)).setText(data[position].split(\"_\")[1]);\n }", "public void tredningProductData()\n {\n trendingProductsArrayList.add ( new TrendingProducts ( R.drawable.imgb,\"Sofa Boleria\\n₹ 850/Month\"));\n trendingProductsArrayList.add ( new TrendingProducts ( R.drawable.imgc,\"Dining Table\\n₹ 850/Month\"));\n trendingProductsArrayList.add ( new TrendingProducts ( R.drawable.imga,\"Faberic sofa\\n₹ 850/Month\"));\n trendingrecyclerView.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.HORIZONTAL, true));\n trendingProductsAdapter = new TrendingProductsAdapter( trendingProductsArrayList,getActivity ());\n trendingrecyclerView.setAdapter(trendingProductsAdapter);\n trendingrecyclerView.scrollToPosition(0);\n trendingrecyclerView.scrollTo(0, 0);\n\n categoryData();\n\n }", "@Override\n public void onBindViewHolder(ProductosHolder holder, int position) {\n holder.txtnombre.setText(productoList.get(position).getNombre());\n holder.txtdescripcion.setText(productoList.get(position).getDescripcion());\n\n }", "@Override\n public void onBindViewHolder(ViewHolder holder, int position) {\n String animal = mData.get(position);\n holder.myTextView.setText(animal);\n }", "public String getDiscounts(){\r\n\t return \"Fines: \" + fines;\r\n }", "@Override\n public void onBindViewHolder(MyAdapter.ViewHolder holder, int position) {\n // - get element from your dataset at this position\n // - replace the contents of the view with that element\n View holder1, holder2, holder3, holder4;\n holder1 = holder.mView.findViewById(R.id.subText);\n holder2 = holder.mView.findViewById(R.id.dueDateText);\n // holder3 = holder.mView.findViewById(R.id.gradeText);\n// holder4 = holder.mView.findViewById(R.id.descText);\n if (mDataset.get(position).getCourse() != null) {\n ((TextView) holder1).setText(mDataset.get(position).getCourse().getSub());\n }\n if (mDataset.get(position).getDueDate() != null) {\n ((TextView) holder2).setText((CharSequence) mDataset.get(position).getDueDate());\n }\n // ((TextView) holder3).setText(mDataset.get(position).get);\n// ((TextView) holder4).setText(mDataset[position]);\n //.setText(mDataset[position]));\n //setText(mDataset[position]);\n }", "@Override\n public void onBindViewHolder(ViewHolder holder, int position) {\n String tmp = String.valueOf(mDataset.get(position).getLikes());\n // - get element from your dataset at this position\n // - replace the contents of the view with that element\n holder.nName.setText(mDataset.get(position).getName());\n holder.mLikes.setText(tmp);\n holder.mImageView.setImageResource(mDataset.get(position).getPicture());\n }", "public String getDiscount() {\n return discount;\n }", "@Override\n public void onClick(View v) {\n Cursor c=myDatabase.queryStudent();\n if (c!=null){\n StringBuilder sb=new StringBuilder();\n //that means there\n while (c.moveToNext()){\n int sno=c.getInt(0);\n String sname=c.getString(1);\n String scourse=c.getString(2);\n sb.append(sno+\":\"+sname+\":\"+scourse+\"\\n\");\n }\n //let us apply on textview\n tv.setText(sb.toString());\n }\n }", "public StringBuffer getSkuDetail() {\n List<CheckoutCommerceItemBean> commerceItems;\n productsInfo.append(\"\");\n if (null != reviewOrderBean) {\n if (null != reviewOrderBean.getComponent()) {\n if (null != reviewOrderBean.getComponent()\n .getPaymentDetails()) {\n if (null != reviewOrderBean.getComponent()\n .getPaymentDetails().getCommerceItems()) {\n commerceItems = reviewOrderBean.getComponent()\n .getPaymentDetails().getCommerceItems();\n for (int i = 0; i < commerceItems.size(); i++) {\n\n productsInfo.append(commerceItems.get(i)\n .getCatalogRefId());\n productsInfo.append(\";\");\n /* sku quantity\n productsInfo.append(commerceItems.get(i)\n .getQuantity());\n productsInfo.append(\";\");*/\n productsInfo.append(String.format(\n \"%.2f\", Double.valueOf(commerceItems.get(i)\n .getAmount())));\n if (i != commerceItems.size() - 1) //avoid adding \"|\" at last product\n productsInfo.append(\"|\");\n\n }\n\n\n }\n }\n }\n }\n return productsInfo;\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n String SlectedCountry = countryNameTwo[+position];\n Toast.makeText(getApplicationContext(), SlectedCountry, Toast.LENGTH_SHORT).show();\n\n }", "@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n //getting the layoutinflater\n ViewHolder viewHolder = new ViewHolder();\n if(convertView==null) {\n LayoutInflater inflater = LayoutInflater.from(mCtx);\n\n //creating a view with our xml layout\n convertView = inflater.inflate(R.layout.list_item, null, true);\n\n //getting text views\n viewHolder.productcat = convertView.findViewById(R.id.text_pro_cat);\n viewHolder.productname = convertView.findViewById(R.id.pro_name11);\n viewHolder.productQ = convertView.findViewById(R.id.pro_price);\n viewHolder.productbidP = convertView.findViewById(R.id.text_b_price);\n convertView.setTag(viewHolder);\n\n }else{\n viewHolder = (ViewHolder)convertView.getTag();\n }\n Product pro = ProductList.get(position);\n viewHolder.productcat.setText(pro.getPcategory());\n viewHolder.productname.setText(pro.getPname());\n viewHolder.productQ.setText(pro.getPquntity());\n viewHolder.productbidP.setText(pro.getPbidprice());\n\n //returning the listitem\n return convertView;\n }", "public void getDiscount(){\n System.out.println(\"10% off, final price: \" + price * 0.9);\n }", "java.lang.String getCouponDescription();", "java.lang.String getCouponDescription();", "private void displayQuantity() {\n Log.d(\"Method\", \"displayQuantity()\");\n TextView quantityTextView = (TextView) findViewById(\n R.id.quantity_text_view);\n\n quantityTextView.setText(String.format(Locale.getDefault(), \"%d\", coffeeCount));\n displayTotal();\n }", "@Override\n public void onChanged(@Nullable final CART_MODEL words) {\n if (words != null && words.getcartcount() != null) {\n textView.setText(words.getcartcount());\n }\n }", "@Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\n TextView t[] = new TextView[5];\n TextView text = (TextView) findViewById(R.id.textView);\n\n t[0] = (TextView) findViewById(R.id.editText);\n t[1] = (TextView) findViewById(R.id.editText2);\n t[2] = (TextView) findViewById(R.id.editText3);\n t[3] = (TextView) findViewById(R.id.editText4);\n t[4] = (TextView) findViewById(R.id.editText5);\n Cursor c;\n String[] category = {\"Food\", \"Education\", \"Personal\", \"Travel\", \"Misc\"};\n String cat, price;\n float sum;\n float total = 0;\n if(adapterView.getSelectedItemPosition()!=0)\n {\n switch (adapterView.getSelectedItemPosition()) {\n\n case 1:\n c = helper.expense(7);\n for (int x = 0; x < 5; x++) {\n sum = 0;\n\n if (c.moveToFirst()) {\n do {\n cat = c.getString(2);\n price = c.getString(3);\n if (cat.equals(category[x])) {\n sum += Float.parseFloat(price);\n }\n\n }\n while (c.moveToNext());\n\n }\n total += sum;\n t[x].setText(String.valueOf(sum));\n }\n break;\n case 2:\n c = helper.expense(30);\n for (int x = 0; x < 5; x++) {\n sum = 0;\n\n if (c.moveToFirst()) {\n do {\n cat = c.getString(2);\n price = c.getString(3);\n if (cat.equals(category[x])) {\n sum += Float.parseFloat(price);\n }\n\n }\n while (c.moveToNext());\n\n }\n total += sum;\n\n t[x].setText(String.valueOf(sum));\n }\n\n break;\n\n case 3:\n c = helper.expense(120);\n for (int x = 0; x < 5; x++) {\n sum = 0;\n\n if (c.moveToFirst()) {\n do {\n cat = c.getString(2);\n price = c.getString(3);\n if (cat.equals(category[x])) {\n sum += Float.parseFloat(price);\n }\n\n }\n while (c.moveToNext());\n\n }\n total += sum;\n\n t[x].setText(String.valueOf(sum));\n }\n\n break;\n case 4:\n c = helper.expense(182);\n for (int x = 0; x < 5; x++) {\n sum = 0;\n\n if (c.moveToFirst()) {\n do {\n cat = c.getString(2);\n price = c.getString(3);\n if (cat.equals(category[x])) {\n sum += Float.parseFloat(price);\n }\n\n }\n while (c.moveToNext());\n\n }\n total += sum;\n t[x].setText(String.valueOf(sum));\n }\n\n break;\n case 5:\n c = helper.expense(365);\n for (int x = 0; x < 5; x++) {\n sum = 0;\n\n if (c.moveToFirst()) {\n do {\n cat = c.getString(2);\n price = c.getString(3);\n if (cat.equals(category[x])) {\n sum += Float.parseFloat(price);\n }\n\n }\n while (c.moveToNext());\n\n }\n total += sum;\n t[x].setText(String.valueOf(sum));\n }\n\n break;\n\n }\n\n\n text.setText(\"Total Expenses : Rs. \" + String.valueOf(total));\n\n }\n else\n {\n for (int ind=0;ind<5;ind++)\n {\n t[ind].setText(String.valueOf(0.0));\n }\n text.setText(\"Please Select Duration First To view Expenses\");\n }\n }", "private void displayQuantity(int numberOfCoffees) {\n TextView quantityTextView = (TextView) findViewById(\n R.id.quantity_text_view);\n quantityTextView.setText(\"\" + numberOfCoffees);\n }", "public void addCart(View view) {\n TextView textView = findViewById(R.id.price_total2);\n double price = Double.parseDouble(textView.getText().toString().replace(\"$\", \"\"));\n String text = \"$\" + String.valueOf(++price);\n textView.setText(text);\n Log.i(TAG, \"Value Successfully Increased! :\" /**+ ++i**/);\n }", "@Override\n public void onItemClick(AdapterView<?> parent, final View view,\n int position, long id) {\n Categoria item = (Categoria) parent.getItemAtPosition(position);\n Toast.makeText(getApplicationContext(), \"SELECIONADO \" + item.getDescricao(), Toast.LENGTH_LONG).show();\n }", "public static void calculateTotal(){\n int i=0;\n total=0;\n while(i<CustomAdapter.selecteditems.size()){\n total+= CustomAdapter.selecteditems.get(i).getPrice() * CustomAdapter.selecteditems.get(i).getQuantity();\n i++;\n }\n String s=\"Rs \"+String.valueOf(total);\n tv_total.setText(s);\n }", "@Override\n public void onBindViewHolder(ViewHolder holder, int position) {\n // http://www.androidhive.info/2016/01/android-working-with-recycler-view/\n Treatment treatment = treatmentList.get(position);\n holder.compl.setText(treatment.complaint);\n holder.date.setText(treatment.date);\n holder.treat.setText(treatment.prescription);\n }", "@Override\n public void onBindViewHolder(@NonNull HomeFeedAdapter.ViewHolder holder, int position) {\n\n Glide.with(context).load(modelArrayList.get(position).getImageurl()).into(holder.imageView);\n holder.summary.setText(modelArrayList.get(position).getText().toString());\n\n\n }", "public ViewHolder(View itemView) {\n super(itemView);\n productDetails = (TextView) itemView.findViewById(R.id.category_item_layout_for_view_product_product_details);\n price = (TextView) itemView.findViewById(R.id.category_item_layout_for_view_product_MRP);\n sp = (TextView) itemView.findViewById(R.id.category_item_layout_for_view_product_SP);\n //qty = (Spinner) itemView.findViewById(R.id.category_item_layout_for_view_product_qty);\n productImage = (ImageView) itemView.findViewById(R.id.category_item_layout_for_view_product_image);\n addToCart = (TextView) itemView.findViewById(R.id.category_item_layout_for_view_product_addToCart);\n }", "@Override\n public void onBindViewHolder(RecyclerView.ViewHolder holder, final int position) {\n if (holder instanceof ViewHolder) {\n final SubHomeModerImage model = getItem(position);\n final ViewHolder genericViewHolder = (ViewHolder) holder;\n\n //genericViewHolder.txt_quatity.setText(model.getQuantity());\n genericViewHolder.moreitem_check_name.setText(model.getIngredientsName());\n genericViewHolder.txt_price.setText(\"$ \"+model.getIngredientsPrice());\n\n }\n }", "@Override\n public void onClick(View v)\n {\n\n try\n {\n String item_id = list.get(position).getItem_id();\n String item_name = list.get(position).getItem_name();\n String totalPrice = list.get(position).getTotalPrice();\n String stockQty=list.get(position).getItem_qty();\n String dicount=list.get(position).getDiscount();\n String gst=list.get(position).getGst_per();\n String unit_price=list.get(position).getUnit_price();\n String purchase_price=list.get(position).getItem_purchase();\n String status=list.get(position).getStatus();\n String changedUnit=list.get(position).getUnit();\n\n\n String qty = view.sumValue.getText().toString().trim();\n Log.d(TAG, \"onClick:Qty\"+qty);\n Log.d(\"qty\", stockQty);\n Log.d(\"item\",item_name);\n Log.d(\"item_id\", item_id);\n Log.d(\"totalPrice\", totalPrice);\n Log.d(\"purchase_price\",purchase_price);\n Log.d(\"GST\",gst);\n\n Log.d(\"discount\",dicount);\n Log.d(\"UnitPrice:\",unit_price);\n Log.d(\"Status\",status);\n int quantity = Integer.parseInt(qty);\n quantity++;\n if(quantity<=Integer.parseInt(stockQty) || status.equalsIgnoreCase(\"infinite\"))\n {\n double totalAmont = Double.parseDouble(totalPrice) * quantity;\n Log.d(\"totalAount\", String.valueOf(totalAmont));\n view.sumValue.setText(String.valueOf(quantity));\n Log.d(TAG, \"onClick:Qty\"+quantity);\n // addItem(item_id,String.valueOf(quantity),totalPrice,dicount,gst,totalAmont,unit_price);\n addItem(item_id,String.valueOf(quantity),totalPrice,dicount,gst,totalAmont,unit_price,changedUnit);\n\n\n getTotalQunatity();\n notifyDataSetChanged();\n }else\n {\n Toast.makeText(context,\"Stock not Available\",Toast.LENGTH_LONG).show();\n }\n\n }catch (Exception e)\n {\n Log.d(TAG, \"onClick:Add Item\",e);\n\n\n }\n\n\n\n }", "@Override\n public void onBindViewHolder(ViewHolder holder, int position) {\n\n\n// holder.numberProcedure.setText(String.valueOf(position + 1));\n holder.titleProcedure.setText(mData.get(position).getTitle());\n holder.titleProcedure.setTag(position);\n String numarPasi = String.valueOf(mData.get(position).getSteps().size());\n String textNumarPasi;\n textNumarPasi = \"contine \" + numarPasi + \" pasi\";\n\n holder.numberStepsProcedure.setText(textNumarPasi);\n\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n String SlectedCountry = countryName[+position];\n Toast.makeText(getApplicationContext(), SlectedCountry, Toast.LENGTH_SHORT).show();\n\n }", "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 }", "@Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n String SlectedCountry = countryNameThree[+position];\n Toast.makeText(getApplicationContext(), SlectedCountry, Toast.LENGTH_SHORT).show();\n\n }", "@Override\n public void onBindViewHolder(@NonNull RecyclerView.ViewHolder viewHolder, int i) {\n CountryViewHolder countryViewHolder = (CountryViewHolder) viewHolder;\n countryViewHolder.textViewCountryName.setText(countryArrayList.get(i).getName());\n countryViewHolder.textViewCountryCapital.setText(\"Capital\"+\" \"+countryArrayList.get(i).getCapital());\n\n\n }", "@Override\n public void onBindViewHolder(final MyViewHolder holder, final int position) {\n String name;\n boolean isFilterCateSelected;\n final String seletedImage, unseletedImage;\n name = aL_categoryDatas.get(position).getName();\n\n\n // make first character of character is uppercase\n if (name != null && !name.isEmpty())\n\n /*String[] fullname=name.split(\" \");\n String firstindx=fullname[0].substring(0,1).toUpperCase()+fullname[0].substring(1).toLowerCase();\n Log.d(\"1.indx\",firstindx);\n String middleindx=\"\";\n if(fullname.length>1){\n middleindx=fullname[1];\n Log.d(\"2.indx\",middleindx);\n name=firstindx+\" \"+middleindx;\n }\n if(fullname.length>2) {\n String lastindx=fullname[2];\n lastindx=lastindx.substring(0,1).toUpperCase()+lastindx.substring(1).toLowerCase();\n Log.d(\"3.indx\",lastindx);\n name=name+\" \"+lastindx;\n }*/\n name = name.substring(0, 1).toUpperCase() + name.substring(1).toLowerCase();\n //aL_categoryDatas.get(position).setName(name);\n\n seletedImage = aL_categoryDatas.get(position).getActiveimage();\n unseletedImage = aL_categoryDatas.get(position).getDeactiveimage();\n isFilterCateSelected = aL_categoryDatas.get(position).isSelected();\n holder.tV_category.setTextColor(ContextCompat.getColor(mActivity, R.color.heading_color));\n if (arrayListSelction.contains(name)) {\n setCategoryImage(holder.iV_category, seletedImage, holder.tV_category, name, selectedColor);\n } else {\n setCategoryImage(holder.iV_category, unseletedImage, holder.tV_category, name, unSelectedColor);\n }\n // set values like category image and name\n if (isFilterCateSelected)\n setCategoryImage(holder.iV_category, seletedImage, holder.tV_category, name, selectedColor);\n else\n setCategoryImage(holder.iV_category, unseletedImage, holder.tV_category, name, unSelectedColor);\n\n // To select or unselect category\n holder.view.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n boolean isViewSelected = aL_categoryDatas.get(holder.getAdapterPosition()).isSelected();\n if (!isViewSelected) {\n arrayListSelction.add(aL_categoryDatas.get(position).getName());\n\n aL_categoryDatas.get(holder.getAdapterPosition()).setSelected(true);\n setCategoryImage(holder.iV_category, seletedImage, holder.tV_category, aL_categoryDatas.get(holder.getAdapterPosition()).getName(), selectedColor);\n\n } else {\n\n for (int i = 0; i < arrayListSelction.size(); i++) {\n if (arrayListSelction.get(i).equals(aL_categoryDatas.get(position).getName())) {\n arrayListSelction.remove(i);\n }\n }\n aL_categoryDatas.get(holder.getAdapterPosition()).setSelected(false);\n setCategoryImage(holder.iV_category, unseletedImage, holder.tV_category, aL_categoryDatas.get(holder.getAdapterPosition()).getName(), unSelectedColor);\n }\n }\n });\n }", "@Override\n public void onBindViewHolder(CommonViewHolder holder, int position) {\n holder.mTitle.setText(context.getString(R.string.exam_practice) + (position + 1));\n holder.mDescription.setText(R.string.exam_detail_decs);\n holder.mLogo.setImageResource(R.drawable.exam);\n }", "@Override\n public void onBindViewHolder(cartViewholder holder, int position) {\n holder.serviceQuantity.setNumber(listData.get(position).getQuantity());\n Locale locale =new Locale(\"en\",\"US\");\n NumberFormat fmt = NumberFormat.getCurrencyInstance(locale);\n holder.cartPrice.setText(fmt.format(Integer.parseInt(listData.get(position).getPrice())));\n holder.cartName.setText(listData.get(position).getService_Name());\n holder.setItemClickListener(new ItemClickListener() {\n @Override\n public void Onclick(View view, int position, boolean isLongClick) {\n Log.d(\"Onclick\",\"cartAdapter\");\n }\n });\n\n\n }", "@Override\n public void onBindViewHolder(vh3 holder, int position) {\n\n\n\n\n holder.noadds.setVisibility(View.INVISIBLE);\n holder.item.setText(orderDetails.get(position).getName() + \"\");\n holder.qty.setText(orderDetails.get(position).getQuantity() + \"\");\n holder.price.setText(orderDetails.get(position).getItemPrice() + \"\");\n holder.total.setText((orderDetails.get(position).getTotalPrice()+\"\"));\n\n\n additions_adb=new Additions_Adb(context,orderDetails.get(position).getAdditions());\n holder.addslist.setAdapter(additions_adb);\n LinearLayoutManager linearLayoutManager =new LinearLayoutManager(context);\n linearLayoutManager.setOrientation(LinearLayoutManager.HORIZONTAL);\n holder.addslist.setLayoutManager(linearLayoutManager);\n\n if (orderDetails.get(position).getAdditions().isEmpty()){\n holder.noadds.setVisibility(View.VISIBLE);\n }\n\n\n\n }", "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 String getUnitPrice() {\n\t\tPrice discountP=null;\n\t\tdouble disAmount=this.price.getBasePrice();\n\t\tPrice p=new Price(this.price.getBasePrice());\n\t\tif(this.getDiscount()!=null){\n\t\t\tif(this.getDiscount().getSkuLimit() > 0 && !this.price.getBasePriceUnit().equalsIgnoreCase(\"lb\") && this.getDiscount().getSkuLimit() != this.getQuantity()) {\n\t\t\t\t\n\t\t\t\tdisAmount=this.price.getBasePrice();\n\t\t\t\t\n\t\t\t//APPDEV-4148-Displaying unit price if quantity is greater than sku limit - START\n\t\t\t\t\n\t\t\t\tif(this.getDiscount().getSkuLimit() < this.getQuantity()){\n\t\t\t\t\tif(this.getDiscount().getDiscountType().equals(EnumDiscountType.PERCENT_OFF))\n\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tdisAmount=((this.price.getBasePrice() * this.getQuantity()) - ((this.price.getBasePrice() * this.getDiscount().getSkuLimit()) * this.getDiscount().getAmount() )) / this.getQuantity();\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tdisAmount=((this.price.getBasePrice() * (this.getQuantity())) - (this.getDiscount().getAmount() * this.getDiscount().getSkuLimit()))/ this.getQuantity() ;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t//APPDEV-4148-Displaying unit price if quantity is greater than sku limit - END\n\t\t\t\t\n\t\t\t} else if(this.getDiscount().getSkuLimit() > 0 && this.price.getBasePriceUnit().equalsIgnoreCase(\"lb\") && this.getDiscount().getDiscountType().equals(EnumDiscountType.DOLLAR_OFF)) {\n\t\t\t\tdisAmount=this.price.getBasePrice();\n\t\t\t} else {\n\t\t\t\tif(this.getDiscount().getMaxPercentageDiscount() > 0) {\n\t\t\t\t\tdisAmount = this.orderLine.getPrice()/this.orderLine.getQuantity();\n\t\t\t\t} else {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tdiscountP=PricingEngine.applyDiscount(p,1,this.getDiscount(),this.price.getBasePriceUnit());\n\t\t\t\t\t\tdisAmount=discountP.getBasePrice();\n\t\t\t\t\t} catch (PricingException 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}\n\t\t\n\t\t//Apply the coupon discount on top of line item discount and calculate the final base price.\n\t\tif (this.getCouponDiscount() != null) {\n\t\t\ttry {\n\t\t\t\tdiscountP = PricingEngine.applyCouponDiscount(null!=discountP?discountP:p, 1/this.getQuantity(), this.getCouponDiscount(), this.price.getBasePriceUnit());\n\t\t\t\tdisAmount = discountP.getBasePrice();\n\t\t\t} catch (PricingException e) {\n\t\t\t\tdisAmount = 0.0;\n\t\t\t}\n\t\t} \n\t\t\t \n\t\treturn CURRENCY_FORMATTER.format(disAmount) + \"/\" + this.price.getBasePriceUnit().toLowerCase();\n\t}", "@Override\n public void onBindViewHolder(MinhaViewHolder holder, int position) {\n holder.imagemCategoria.setImageResource(mLista.get(position).getFoto());\n holder.destino.setText(mLista.get(position).getDestino());\n holder.custoTotal.setText(mLista.get(position).getValor());\n holder.data.setText(mLista.get(position).getData());\n\n\n }", "private String getConcerMan() {\n\t\tString concerman = \"\";\n\t\tif (mGuanzhuList.size()==1) {\n\t\t\treturn mGuanzhuList.get(0).getId();\n\t\t}\n\t\tif (mGuanzhuList.size()>1) {\n\t\t\tfor (int i = 0; i < mGuanzhuList.size(); i++) {\n\t\t\t\tCategory category = mGuanzhuList.get(i);\n\t\t\t\tif (i==0) {\n\t\t\t\t\tconcerman += category.getId() ;\t\n\t\t\t\t}else {\n\t\t\t\t\tconcerman += \"|\"+ category.getId();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn concerman;\n\t}", "@Override\n public void onClick(View v) {\n\n if (quoteEntity.isIskeyvisible()) {\n quoteEntity.setIskeyvisible(false);\n holder.rvhlknowmore.setVisibility(View.GONE);\n\n holder.ivArrow.setImageDrawable(mContext.getResources().getDrawable(R.drawable.down_arrow_grey));\n\n\n } else {\n quoteEntity.setIskeyvisible(true);\n holder.ivArrow.setImageDrawable(mContext.getResources().getDrawable(R.drawable.up_arrow_blue));\n\n String pre=\"\",par=\"\",spe=\"\";\n if(quoteEntity.getPre_Closer_Fixed() != null) {\n pre = \" = \" + quoteEntity.getPre_Closer_Fixed() + \" %\";\n }\n else\n {\n pre = \" = \";\n }\n\n if(quoteEntity.getPart_Pmt_Fixed() != null) {\n par = \" = \" + quoteEntity.getPart_Pmt_Fixed() + \" %\";\n }\n else\n {\n par = \" = \";\n }\n\n if(quoteEntity.getWomen_roi() != null) {\n spe = \" = \" + quoteEntity.getWomen_roi() + \" %\";\n }\n else\n {\n spe = \" = \";\n }\n\n\n holder.tvDetailsCount1.setText(pre);\n holder.tvDetailsCount2.setText(par);\n holder.tvDetailsCount3.setText(\" = Yes\");\n holder.tvDetailsCount4.setText(spe);\n holder.tvDetailsCount5.setText(\" = Yes\");\n holder.tvDetailsCount6.setText(\" = Yes\");\n\n\n\n holder.rvhlknowmore.setVisibility(View.VISIBLE);\n\n\n }\n }", "@Override\n public void onBindViewHolder(ViewHolder holder, int position) {\n Abastecimento abastecimento = mData.get(position);\n holder.myTextView.setText(abastecimento.getPosto());\n holder.myTextView2.setText(String.valueOf(abastecimento.getValor()));\n }", "@Override\n public void onBindViewHolder(ViewHolder holder, int position) {\n // - get element from your dataset at this position\n // - replace the contents of the view with that element\n holder.tv.setText(arr.get(position));\n\n // .setText(arr[position]);\n // ((ImageView)temp.findViewById(R.id.iconimage)).setImageResource(ico[position]);\n\n }", "@Override\n public void onBindViewHolder(final ContractListCategoryHolder holder, final int position) {\n if (categories.get(position).getId().equalsIgnoreCase(\"free trial\") &&\n categories.get(position).getName().equalsIgnoreCase(\"from registration\") &&\n categories.get(position).getVat() == 0 &&\n position == 0) {\n holder.tvCategoryTitle.setText(\"Free trial (First Month)\");\n holder.llCategoryTitle.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n txtSelectedContract.setText(\"Trial Version\");\n subscriptionType = 1;\n selectedAmount = 0;\n selectedVat = 0;\n dialogPricing.dismiss();\n planType = \"freeSubscribe\";\n planTitle = \"Free Trial\";\n }\n });\n holder.ivArrow.setVisibility(View.GONE);\n } else {\n holder.tvCategoryTitle.setText(categories.get(position).getName());\n String month = \"\", year = \"\";\n Log.e(TAG, \"onBindViewHolder month: \"+ categories.get(position).getPrices().getMonthly());\n Log.e(TAG, \"onBindViewHolder year: \"+ categories.get(position).getPrices().getYearly());\n if (categories.get(position).getPrices().getMonthly() != null) {\n month = \"Monthly Subscription (Tzs %%/Month)\".replace(\"%%\", categories.get(position).getPrices().getMonthly().toString());\n } else {\n holder.tvMonth.setVisibility(View.GONE);\n }\n\n if (categories.get(position).getPrices().getYearly() != null) {\n year = \"Yearly Subscription (Tzs %%/Year)\".replace(\"%%\", categories.get(position).getPrices().getYearly().toString());\n } else {\n holder.tvYear.setVisibility(View.GONE);\n }\n\n holder.tvMonth.setText(month);\n holder.tvYear.setText(year);\n\n if (position == selectedPosition) {\n holder.llCategorySub.setVisibility(View.VISIBLE);\n holder.ivArrow.animate().rotationBy(180f).setInterpolator(new LinearInterpolator()).start();\n// holder.ivArrow.setBackground(getResources().getDrawable(R.drawable.ic_close));\n } else {\n holder.llCategorySub.setVisibility(View.GONE);\n holder.ivArrow.setBackground(getResources().getDrawable(R.drawable.ic_open));\n }\n\n holder.llCategoryTitle.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n// holder.llCategorySub.setVisibility(holder.llCategorySub.getVisibility() == View.VISIBLE ? View.GONE : View.VISIBLE);\n lastPosition = selectedPosition;\n if (holder.llCategorySub.getVisibility() == View.VISIBLE) {\n selectedPosition = -1;\n } else {\n selectedPosition = position;\n }\n notifyDataSetChanged();\n }\n });\n\n holder.tvMonth.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n selectedAmount = categories.get(position).getPrices().getMonthly();\n selectedVat = categories.get(position).getVat();\n subscriptionType = 2;\n txtSelectedContract.setText(\"Tzs %% / Month\".replace(\"%%\", categories.get(position).getPrices().getMonthly().toString()));\n dialogPricing.dismiss();\n planType = categories.get(position).getId();\n planTitle = categories.get(position).getName();\n }\n });\n\n holder.tvYear.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n selectedAmount = categories.get(position).getPrices().getYearly();\n selectedVat = categories.get(position).getVat();\n subscriptionType = 3;\n txtSelectedContract.setText(\"Tzs %% / year\".replace(\"%%\", categories.get(position).getPrices().getYearly().toString()));\n dialogPricing.dismiss();\n planType = categories.get(position).getId();\n planTitle = categories.get(position).getName();\n }\n });\n\n }\n\n }", "@Override\n public void onBindViewHolder(ViewHolder holder, int position) {\n // - get element from your dataset at this position\n // - replace the contents of the view with that element\n holder.mname.setText(mDataset.get(position).getCode());\n holder.mprice.setText(mDataset.get(position).getStock_name());\n }", "private void onBasketTotalChanged(String total){\n binding.textViewTotalValue.setText(String.format(\"$%s\", total));\n }", "@Override\n public void onBindViewHolder(final DaftarMhs_list.ViewHolder holder, final int position) {\n holder.namamhs.setText(list_data.get(position).getNrp());\n holder.nrp.setText(list_data.get(position).getNama());\n// holder.status.setText(list_data.get(position).getStatus());\n\n// holder.checkBox.setTag(R.integer.btnplusview, convertView);\n\n }", "@Override\n public void onBindViewHolder(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\n holder.tvCategoryName.setText(categorieList.get(position).getName().toUpperCase());\n\n switch (categorieList.get(position).getName()) {\n case \"Historia\":\n holder.ivCateItem.setImageDrawable(context.getResources().getDrawable(R.drawable.ic_account_balance_white_48dp));\n break;\n case \"Restaurantes\":\n holder.ivCateItem.setImageDrawable(context.getResources().getDrawable(R.drawable.ic_restaurant_white_48dp));\n break;\n case \"Hoteles\":\n holder.ivCateItem.setImageDrawable(context.getResources().getDrawable(R.drawable.ic_hotel_white_48dp));\n break;\n case \"Servicios Turisticos\":\n holder.ivCateItem.setImageDrawable(context.getResources().getDrawable(R.drawable.ic_local_see_white_48dp));\n break;\n case \"Comida rapida\":\n holder.ivCateItem.setImageDrawable(context.getResources().getDrawable(R.drawable.ic_local_pizza_white_48dp));\n break;\n case \"Servicios\":\n holder.ivCateItem.setImageDrawable(context.getResources().getDrawable(R.drawable.ic_business_center_white_48dp));\n break;\n case \"Eventos\":\n holder.ivCateItem.setImageDrawable(context.getResources().getDrawable(R.drawable.ic_event_white_48dp));\n break;\n case \"Lugares de interes\":\n holder.ivCateItem.setImageDrawable(context.getResources().getDrawable(R.drawable.ic_place_white_48dp));\n break;\n case \"Comercios\":\n holder.ivCateItem.setImageDrawable(context.getResources().getDrawable(R.drawable.ic_store_white_48dp));\n break;\n default:\n holder.ivCateItem.setImageDrawable(context.getResources().getDrawable(android.R.drawable.ic_dialog_info));\n break;\n }\n\n Glide.with(context).load(categorieList.get(position).getImage()).centerCrop().into(holder.ivImageCategory);\n holder.rlContainer.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n listener.onClickCategory(categorieList.get(position));\n }\n });\n\n }", "@Override\n public void onBindViewHolder(final ViewHolder holder, final int position) {\n\n\n // holder.setIsRecyclable(false);\n\n\n holder.expenseType.setText(mDataset.get(position).getTubewellname());\n\n String ss = mDataset.get(position).getIsActive();\n\n if (ss!=null && ss.equalsIgnoreCase(\"Active\")){\n holder.cardView.setBackgroundColor(mContext.getResources().getColor(R.color.green_alert));\n Log.v(\"ggggg_act\",ss+\"\");\n }else {\n holder.cardView.setBackgroundColor(mContext.getResources().getColor(R.color.gray));\n Log.v(\"ggggg_de\",ss+\"\");\n }\n\n\n\n Log.v(\"slkas\",mDataset.get(position)+\"\");\n\n /* t1=new TextToSpeech(mContext, new TextToSpeech.OnInitListener() {\n @Override\n public void onInit(int status) {\n if(status != TextToSpeech.ERROR) {\n t1.setLanguage(new Locale(\"hin\"));\n }\n }\n });\n*/\n\n holder.btn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n String strrrr = mDataset.get(position).getResponse();\n tubewellInfoMethod(strrrr);\n }\n });\n\n\n\n }", "@Override\n public int getItemCount() {\n return discountArrayList.size();\n }", "public String getItem()\n {\n // put your code here\n return \"This item weighs: \" + weight + \"\\n\" + description + \"\\n\";\n }", "@RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)\n @Override\n public void onBindViewHolder(final RecycleAdapter_AddProduct.MyViewHolder holder, final int position) {\n\n holder.title.setText(categories.getProductsArrayList().get(position).getNama_barang());\n holder.price.setText(categories.getProductsArrayList().get(position).getHarga());\n //holder.quantityTxt.setText(categories.getProductsArrayList().get(position).getQuantity() + \"\");\n holder.textViewtoko.setText(categories.getProductsArrayList().get(position).getNama());\n Glide.with(getContext()).load(\"http://192.168.43.153/e_comm_covid/assets/img/\"+categories.getProductsArrayList().get(position).getGambar()).into(holder.image);\n\n /*holder.title.setText(categories.getProductsArrayList().get(position).getName());\n holder.price.setText(categories.getProductsArrayList().get(position).getPrice());\n holder.quantityTxt.setText(categories.getProductsArrayList().get(position).getQuantity() + \"\");\n Glide.with(getContext()).load(\"http://192.168.43.153/e_comm_covid/assets/img/\"+categories.getProductsArrayList().get(position).getImage()).into(holder.image);\n\n //holder.image.setImageDrawable(getResources().getDrawable(categories.getProductsArrayList().get(position).getImage()));\n\n holder.quantity = categories.getProductsArrayList().get(position).getQuantity();\n int totalPrice = holder.quantity * Integer.parseInt(categories.getProductsArrayList().get(position).getPrice());\n\n\n if (position == recentPos) {\n Log.e(\"pos\", \"\" + recentPos);\n // start animation\n holder.quantityTxt.startAnimation(startAnimation);\n } else {\n holder.quantityTxt.clearAnimation();\n\n }\n\n if (categories.getProductsArrayList().get(position).getQuantity() > 0) {\n holder.quantityTxt.setVisibility(View.VISIBLE);\n holder.llMinus.setVisibility(View.VISIBLE);\n } else {\n holder.quantityTxt.setVisibility(View.GONE);\n holder.llMinus.setVisibility(View.GONE);\n }\n\n\n categories.getProductsArrayList().get(position).setPriceAsPerQuantity(\"\" + totalPrice);\n\n\n holder.llPlus.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n if (holder.quantity < 10) {\n\n recentPos = position;\n holder.quantity = holder.quantity + 1;\n categories.getProductsArrayList().get(position).setQuantity(holder.quantity);\n categories.getProductsArrayList().get(position).setPriceAsPerQuantity(\"\" + holder.quantity * Integer.parseInt(categories.getProductsArrayList().get(position).getPrice()));\n\n holder.quantityTxt.setText(\"\" + holder.quantity);\n }\n notifyDataSetChanged();\n\n }\n });\n\n\n holder.llMinus.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n if (holder.quantity > 0 && holder.quantity <= 10) {\n\n recentPos = position;\n\n holder.quantity = holder.quantity - 1;\n categories.getProductsArrayList().get(position).setQuantity(holder.quantity);\n categories.getProductsArrayList().get(position).setPriceAsPerQuantity(\"\" + holder.quantity * Integer.parseInt(categories.getProductsArrayList().get(position).getPrice()));\n\n holder.quantityTxt.setText(\"\" + holder.quantity);\n\n\n }\n\n notifyDataSetChanged();\n\n }\n });*/\n holder.clik_add.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent intent = new Intent(getContext(), Detail_product.class);\n intent.putExtra(\"id_barang\",categories.getProductsArrayList().get(position).getId_barang());\n intent.putExtra(\"nama_barang\",categories.getProductsArrayList().get(position).getNama_barang());\n intent.putExtra(\"gambar\",categories.getProductsArrayList().get(position).getGambar());\n intent.putExtra(\"harga\",categories.getProductsArrayList().get(position).getHarga());\n intent.putExtra(\"stok\",categories.getProductsArrayList().get(position).getStok());\n intent.putExtra(\"toko\",categories.getProductsArrayList().get(position).getNama());\n startActivity(intent);\n }\n });\n holder.btn_beli.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent intent = new Intent(getContext(), Proses_checout.class);\n intent.putExtra(\"id_barang\",categories.getProductsArrayList().get(position).getId_barang());\n intent.putExtra(\"nama_barang\",categories.getProductsArrayList().get(position).getNama_barang());\n intent.putExtra(\"gambar\",categories.getProductsArrayList().get(position).getGambar());\n intent.putExtra(\"harga\",categories.getProductsArrayList().get(position).getHarga());\n intent.putExtra(\"stok\",categories.getProductsArrayList().get(position).getStok());\n intent.putExtra(\"toko\",categories.getProductsArrayList().get(position).getNama());\n startActivity(intent);\n\n }\n });\n\n }", "public void whippedCreamToast(View view) {\n\n CheckBox checkBox1 = (CheckBox) findViewById(R.id.checkbox_cream);\n boolean hasWhippedCream = checkBox1.isChecked();\n if (hasWhippedCream) {\n Toast.makeText(this, \"Price of \" + quantity + \" coffee increased by \" + quantity * 1 + \" zł.\", Toast.LENGTH_SHORT).show();\n /**\n * można dodać nowe pole txt które wyświetli aktualną cenę kawy z dodatkami lub bez\n * do tego drugi pole txt w którm wpiszemy cenę samej kawy\n *displayItemPrice(itemPrice + 1);\n **/\n }\n }", "@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n ViewHolder viewHolder = new ViewHolder();\n if (convertView == null) {\n convertView = inflate.inflate(R.layout.adapter_audititems_item, null, true);\n }\n\n viewHolder.title_category = (TextView) convertView.findViewById(R.id.title_category);\n viewHolder.txt_rightarrow = (TextView) convertView.findViewById(R.id.txt_rightarrow);\n viewHolder.txt_rightarrow.setText(R.string.rightarrow);\n Helper.getTypeFace(context, context.getString(R.string.contentfontname), viewHolder.title_category);\n Helper.getTypeFace(context, context.getString(R.string.fontawsome), viewHolder.txt_rightarrow);\n\n AuditItems productCnsts = (AuditItems) catCnstsArrayList.get(position);\n viewHolder.title_category.setText(productCnsts.getLoc_name());\n\n\n return convertView;\n }", "@Override\n public void onBindViewHolder(ViewHolder arg0, int arg1) {\n TextView textView = (TextView) arg0.itemView;\n textView.setPadding(20, 20, 20, 20);\n textView.setBackgroundColor(Color.WHITE);\n textView.setText(arg1 + \"\");\n }", "public String getProductLabel(){\n return productLabel.getText().trim();\n }", "@Override\n public void onClick(View v) \n {\n // Decrease purchased quantity\n if (productQuantity > 1)\n {\n productQuantityTextView.setText(Integer.toString(--productQuantity));\n }\n }", "@Override\n public void onBindViewHolder(QuoteCursorAdapter.ViewHolder viewHolder, final Cursor cursor) {\n\n viewHolder.symbol.setText(cursor.getString(cursor.getColumnIndex(\"symbol\")));\n viewHolder.bidPrice.setText(cursor.getString(cursor.getColumnIndex(\"bid_price\")));\n int sdk = Build.VERSION.SDK_INT;\n if (cursor.getInt(cursor.getColumnIndex(\"is_up\")) == 1) {\n if (sdk < Build.VERSION_CODES.JELLY_BEAN) {\n viewHolder.change.setBackgroundDrawable(\n mContext.getResources().getDrawable(R.drawable.percent_change_pill_green));\n } else {\n viewHolder.change.setBackground(\n mContext.getResources().getDrawable(R.drawable.percent_change_pill_green));\n }\n } else {\n if (sdk < Build.VERSION_CODES.JELLY_BEAN) {\n viewHolder.change.setBackgroundDrawable(\n mContext.getResources().getDrawable(R.drawable.percent_change_pill_red));\n } else {\n viewHolder.change.setBackground(\n mContext.getResources().getDrawable(R.drawable.percent_change_pill_red));\n }\n }\n if (Utils.showPercent) {\n viewHolder.change.setText(cursor.getString(cursor.getColumnIndex(\"percent_change\")));\n } else {\n viewHolder.change.setText(cursor.getString(cursor.getColumnIndex(\"change\")));\n }\n\n String contentDescription = \"Bid Price of \" + viewHolder.symbol.getText() + \" stock is\" +\n \" \" + viewHolder.bidPrice.getText();\n viewHolder.linearLayout.setContentDescription(contentDescription);\n\n }", "private void setTitle(){\n float sum = getSubSum();\n if ((sum == 0) && (subList.size() == 0)){\n //if (sum == 0) {\n String newSummary = \"No Subscriptions\";\n summaryText.setText(newSummary);\n } else {\n String newSummary = \"Monthly Cost: $\" + String.valueOf(sum);\n summaryText.setText(newSummary);\n }\n }", "public void create_final_string_product(){\n\n // initialize tablelayout variable\n TableLayout tableLayout = (TableLayout) findViewById(R.id.mainTable);\n\n for(Map.Entry<Integer,ArrayList<Integer>> entry : to_refer_each_item.entrySet()){\n\n TableRow tr = (TableRow) tableLayout.getChildAt(entry.getKey());\n\n // get subtype name of product\n LinearLayout l_pn = (LinearLayout) tr.getChildAt(0);\n TextView tv_pn = (TextView) l_pn.getChildAt(0);\n String text_pn = tv_pn.getText().toString();\n\n LinearLayout l_pc = (LinearLayout) findViewById(R.id.product_linearlayout);\n // get color of product\n TextView text_pc_yv = (TextView) l_pn.getChildAt(1);\n String text_pc = text_pc_yv.getText().toString();\n String[] text_pc_str = text_pc.split(\":\");\n String final_text_pc = text_pc_str[1].replace(\" \", \"\");\n // define array list object\n ArrayList<Integer> list = entry.getValue();\n Order_Detail_Object orderDetailObject = null;\n for(int i = 0; i < list.size();i++) {\n // set checkbox in according to product items\n CheckBox c = (CheckBox)findViewById(list.get(i));\n /* check status of checkbox */\n if(c.isChecked()) {\n\n // create string variable to concat\n String text_str = text_pn;\n /* get data from haspMap of Order_Detail_Object object as\n orderDetailObject from database*/\n orderDetailObject = new Order_Detail_Object\n (text_str + \";\" + c.getText().toString() + \";\" + final_text_pc);\n // function pass ProductId and orderDetailObject\n AddToFinalOrder(orderDetailObject);\n }\n }\n }\n }", "@Override\n public void onBindViewHolder(RepoAdapterViewHolder repoAdapterViewHolder, int pos) {\n String weatherForThisDay = mRepoData[pos];\n repoAdapterViewHolder.mRepoTextView.setText(weatherForThisDay);\n }", "@Override\n public void onBindViewHolder(MemberDrugsAdapter.DrugsViewHolder holder, int position) {\n boolean isEnglish = Locale.getDefault().getLanguage().equals(\"en\");\n mCursor.moveToPosition(position); // get to the right location in the cursor\n\n drug_ID = mCursor.getInt(mCursor.getColumnIndex(DataContract.DrugListEntry.COLUMN_DRUG_L_ID));\n member_ID = mCursor.getInt(mCursor.getColumnIndex(DataContract.DrugListEntry.COLUMN_MEMBER_L_ID));\n\n cursor = getSingleDrug();\n cursor1 = getSingleMember();\n int drug_c_name, drug_s_name;\n\n cursor.moveToFirst();\n cursor1.moveToFirst();\n\n // Indices for the _id, drug_c_name, drug_s_name and drug_concentration columns\n int idIndex = cursor.getColumnIndex(DataContract.DrugsEntry._ID);\n if(isEnglish) {\n drug_c_name = cursor.getColumnIndex(DataContract.DrugsEntry.COLUMN_DRUG_COMMERCIAL_NAME);\n drug_s_name = cursor.getColumnIndex(DataContract.DrugsEntry.COLUMN_DRUG_SCIENTIFIC_NAME);\n }\n else {\n drug_c_name = cursor.getColumnIndex(DataContract.DrugsEntry.COLUMN_DRUG_COMMERCIAL_NAME_ARABIC);\n drug_s_name = cursor.getColumnIndex(DataContract.DrugsEntry.COLUMN_DRUG_SCIENTIFIC_NAME_ARABIC);\n }\n int concentration = cursor.getColumnIndex(DataContract.DrugsEntry.COLUMN_DRUG_CONCENTRATION);\n\n // Determine the values of the wanted data\n final int id = cursor.getInt(idIndex);\n String _CName = cursor.getString(drug_c_name);\n String _SName = cursor.getString(drug_s_name);\n String _DC = cursor.getString(concentration);\n\n //Set values\n holder.itemView.setTag(id);\n holder.tv_drug_c_name.setText(_CName);\n holder.tv_drug_s_name.setText(_SName);\n holder.tv_concentration.setText(_DC);\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Toast.makeText(Cardio.this,cardios.get(position).getTitle(), Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onBindViewHolder(DetailAdapter.ViewHolder holder, int position) {\n // - get element from your dataset at this position\n // - replace the contents of the view with that element\n //holder.mTextView.setText(mDataset[position]);\n holder.informacion.setText(mDataset[position]); //informacion es el dato que nos entrega el arreglo\n }", "@Override\n public void onBindViewHolder(ViewHolder holder, int position) {\n // - get element from your dataset at this position\n // - replace the contents of the view with that element\n final Establishment est = Establishment.getEstablishmentByUrl(mDataset.get(position));\n final SpannableStringBuilder builder = new SpannableStringBuilder();\n\n builder.append(est.name);\n builder.append(\"\\n\");\n int point = builder.length();\n builder.setSpan(new TextAppearanceSpan(mContext,\n R.style.ListPrimaryTextAppearance), 0, point, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);\n builder.setSpan(new EllipsizeLineSpan(), 0, point, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);\n\n\n builder.append(est.location.address);\n builder.setSpan(new TextAppearanceSpan(mContext,\n R.style.ListSecondaryTextAppearance), point, builder.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);\n builder.setSpan(new EllipsizeLineSpan(), point, builder.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);\n\n holder.mTextView.setText(builder);\n }", "@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n View listItemView = convertView;\n if (listItemView == null) {\n listItemView = LayoutInflater.from(getContext()).inflate(\n R.layout.main_menu_item, parent, false);\n }\n\n String currentItem = getItem(position);\n String[] itemParts = currentItem.split(\",\");\n TextView textIcon = (TextView) listItemView.findViewById(R.id.text_icon);\n textIcon.setTypeface(awsomefont);\n textIcon.setText(itemParts[0]);\n TextView textItem = (TextView) listItemView.findViewById(R.id.text_item);\n textItem.setText(itemParts[1]);\n return listItemView;\n\n }", "@Override\n public void onBindViewHolder(CategoryBookRecyclerAdapter.ViewHolder holder, final int arg1) {\n\n holder.productDetails.setText(dataSet.get(arg1).getName());\n final String prodDe = dataSet.get(arg1).getId();\n String rsPriceSymbol = context.getResources().getString(R.string.price);\n holder.price.setText( rsPriceSymbol + \" \" +String.valueOf(dataSet.get(arg1).getPrice()) );\n holder.price.setPaintFlags( holder.price.getPaintFlags() | Paint.STRIKE_THRU_TEXT_FLAG);\n String rsSPSymbol = context.getResources().getString(R.string.sp);\n holder.sp.setText(rsSPSymbol + \" \" +String.valueOf(dataSet.get(arg1).getSp()) );\n holder.productImage.setImageBitmap(dataSet.get(arg1).getImage());\n\n //holder.productImage.setOnClickListener(new ProductImageListener(prodDe));\n //Bitmap bmp = BitmapFactory.decodeResource(context.getResources(), R.drawable.ibpsfour);\n //holder.customImage.setImageBitmap(bmp);\n //holder.customImage.setOnClickListener(new View.OnClickListener() {\n\n /* @Override\n public void onClick(View v) {\n // TODO Auto-generated method stub\n Toast.makeText(context, \"Book details to be opened in new intent...\", Toast.LENGTH_SHORT).show();\n }\n });*/\n\n /*holder.addToCart.setOnClickListener(new View.OnClickListener() {\n\n @Override\n public void onClick(View v) {\n // TODO Auto-generated method stub\n MainApplication mainApplication = MainApplication.getInstance();\n mainApplication.addToCart(new Product(prodDe));\n if (getActivity() instanceof MainActivity){\n ((MainActivity)getActivity()).updateCartCounter(1);\n }\n //Toast.makeText(context, \"Total Number of Products in Cart is \" + mainApplication.getCart().getProductCount(), Toast.LENGTH_SHORT).show();\n }\n });*/\n\n }", "@Override\r\n\t public void onClick(View arg0) {\n\r\n\t\t String cat = et2.getText().toString();\r\n\t\t if(!cat.trim().equals(\"\"))\r\n\t\t {\r\n\t\t\t closeDialogs();\r\n\r\n\t\t et2.setText(\"\");\r\n\r\n\t\t addCategory(cat,getActivity());\r\n\t\t\t\t //addProduct(department,product);\r\n\t\t //notify the list so that changes can take effect\r\n\t\t ExpAdapter.notifyDataSetChanged();\r\n\t\t expandAll();\r\n\t\t // dialog.dismiss();\r\n\t\t }\r\n\t\t else\r\n\t\t {\r\n\t\t\t Toast.makeText(getActivity(),\"Enter Category Name\",Toast.LENGTH_SHORT).show();\r\n\t\t\t// Toast.makeText(, \"Colosed\", Toast.LENGTH_SHORT).show();\r\n\t\t }\r\n\t }", "@SuppressLint(\"SetTextI18n\")\n @Override\n public void bindView(View view, Context context, Cursor cursor) {\n if(Utils.weAreLollipop())view.findViewById(R.id.card).setElevation(contex.getResources().getDimension(R.dimen.elevation));\n String title=cursor.getString(cursor.getColumnIndexOrThrow(Contract.ITEM_TITLE));\n long itemID=cursor.getLong(cursor.getColumnIndexOrThrow(Contract.ITEM_ID));\n String date=cursor.getString(cursor.getColumnIndexOrThrow(Contract.ITEM_DATE));\n String sub=cursor.getString(cursor.getColumnIndexOrThrow(Contract.ITEM_SUBTITLE));\n TextView titleTextView= (TextView) view.findViewById(R.id.title);\n TextView subTextView= (TextView) view.findViewById(R.id.sub);\n TextView idTextView= (TextView) view.findViewById(R.id.item_id);\n TextView dateTextView= (TextView) view.findViewById(R.id.date);\n titleTextView.setText(title!=null?title:\"\");\n subTextView.setText(sub!=null?sub:\"\");\n idTextView.setText(\"\"+itemID);\n dateTextView.setText(date!=null?date:\"\");\n }", "@Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n if (!TextUtils.isEmpty(typecode.getSelectId())) {\n String code = typecode.getSelectId();\n Cursor c = getActivity().getContentResolver().query(Drug.CONTENT_URI,\n new String[]{Drug.CODE, Drug.SELL, Drug.COST, Drug.TOOTHTYPE}, \"drugcode = ?\", new String[]{code}, Drug.DEFAULT_SORTING);\n if (c.moveToFirst()) {\n cost = c.getString(1);\n real = c.getString(2);\n toothType = c.getString(3);\n\n if (!TextUtils.isEmpty(real)) {\n money.setText(real);\n\n }\n\n setAsRemoveButton(mClose);\n\n }\n\n\n }\n\n\n }", "@Override\n public void onClick(View v) {\n counter[0] = counter[0] + 1;\n holder.quantity.setText(String.valueOf(counter[0]));\n sum[0] += newItem.getPrice();\n items.add(newItem.getTitle());\n adapterInterface.onClick(sum[0], items);\n }", "@Override\n public void onClick(View v) {\n\n if (item.getId() != 1) {\n\n name.setText(item.getName());\n\n }\n\n if (item.getId() == 2) {\n\n // name.setText(item.getName());\n\n }\n\n }", "@Override\n public void onBindViewHolder(MyViewHolder viewHolder, int i) {\n viewHolder.name.setText(ps.get(i).getName());\n viewHolder.schar.setText(ps.get(i).getScharr());\n viewHolder.schdep.setText(ps.get(i).getSchdep());\n viewHolder.actar.setText(ps.get(i).getActarr());\n viewHolder.actdep.setText(ps.get(i).getActdep());\n viewHolder.tnum.setText(ps.get(i).getNumber());\n\n\n\n }", "public String categoryDesc() { //to show the description of the category\n String desc = \"\";\n if (category.equals(\"H\")) {\n desc = \"Trump category: Hardness\";\n } else if (category.equals(\"S\")) {\n desc = \"Trump category: Specific Gravity\";\n } else if (category.equals(\"C\")) {\n desc = \"Trump category: Cleavage\";\n } else if (category.equals(\"CA\")) {\n desc = \"Trump category: Crustal Abundance\";\n } else if (category.equals(\"EV\")) {\n desc = \"Trump category: Economic Value\";\n }\n return desc;\n }", "@Override\n public void onClick(View v) {\n String curStr = resultDisplay.getText().toString();\n\n // If there is only one char in string\n if (curStr.length() == 1) {\n resultDisplay.setText(String.valueOf(0));\n } else {\n // Remove the last char in string\n int lastIndex = curStr.length() - 1;\n String newStr = curStr.substring(0,lastIndex);\n\n // Set the newStr to ResultDisplay\n resultDisplay.setText(newStr);\n }\n }", "public String getCategory_name(){return category_name;}", "public String getItemString() \r\n \t{\r\n \t\tString itemString = \"Regarde s'il y a des objets ici: \";\r\n \t\t\r\n \t\tif (!items.getHashMap().isEmpty())\r\n \t\t{\r\n \t\t\tSet<String> cles = items.getKeys();\r\n \t\t\tfor (String nom : cles) \r\n \t\t\t{\r\n \t\t\t\tif(nom != \"beamer\")\r\n \t\t\t\t{\r\n \t\t\t\t\tItem valeurs = items.getValue(nom);\r\n \t\t\t\t\titemString += \"\\n\" + valeurs.getDescriptionItem() + \" qui pèse \" + valeurs.toString() + \" kg\";\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\telse\r\n \t\t{\r\n \t\t\titemString = \"Il n'y a pas d'objet ici\";\r\n \t\t}\r\n \t\t\r\n \r\n \t\r\n \t\t/********** L'ArrayList des potions **********/\r\n \t\titemString += \"\\n\";\r\n \t\tfor (int i = 0; i < potion.size(); i++) {\r\n \t\t\titemString += \"\\n\" + potion.get(i).getNomPotion();\r\n \t\t}\r\n \t\t/****************************************************************/\r\n \r\n \t\treturn itemString;\r\n \r\n \t}", "@Override\n public void onBindViewHolder(@NonNull ViewHolder holder, int position) {\n\n String Abilityname=random.get(position).getAbility().getName();\n// String Typename=random2.get(position).getType().getName();\n holder.abilities.setText(Abilityname);\n// holder.types.setText(Typename);\n\n // holder.text.setText(Abilityname);\n\n }", "@Override\n\t\t\t\t\t\t\t\t\tpublic void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\t\t\t\t\t\t\t\t\t\tString visualInspection = commonList.get(position);\n\t\t\t\t\t\t\t\t\t\tLog.e(\"TAG\", \"Value for visualInspection:\" + visualInspection);\n\t\t\t\t\t\t\t\t\t\tdropVisualInspect.setText(visualInspection);\n\t\t\t\t\t\t\t\t\t\t// visualInspectionText =\n\t\t\t\t\t\t\t\t\t\t// visualInspection;\n\t\t\t\t\t\t\t\t\t\tdialog.dismiss();\n\n\t\t\t\t\t\t\t\t\t}" ]
[ "0.6480935", "0.6347177", "0.61378115", "0.611932", "0.5924885", "0.5893213", "0.5863139", "0.585941", "0.5843845", "0.5827557", "0.5797775", "0.57747847", "0.5729664", "0.57105064", "0.5707473", "0.56933403", "0.56930465", "0.56707996", "0.5669717", "0.5655493", "0.5646075", "0.5626171", "0.5621147", "0.5620853", "0.5614325", "0.559452", "0.5543327", "0.5541961", "0.5519177", "0.54522693", "0.54510695", "0.54499435", "0.543385", "0.54255", "0.5416168", "0.5416168", "0.54158294", "0.5403817", "0.53974557", "0.53849924", "0.5375995", "0.53723013", "0.5368292", "0.5365187", "0.5365089", "0.53639376", "0.53568786", "0.5354209", "0.5338883", "0.5332623", "0.5331606", "0.532843", "0.53277725", "0.53229576", "0.5314559", "0.5313533", "0.5296539", "0.52822775", "0.5282128", "0.52812624", "0.5277755", "0.526699", "0.52619916", "0.5252874", "0.5251859", "0.52487963", "0.5239524", "0.5231448", "0.52288324", "0.5227153", "0.52160877", "0.5216036", "0.5209765", "0.5208529", "0.5204609", "0.5200718", "0.5196908", "0.5195017", "0.51921135", "0.51864755", "0.5182087", "0.5178405", "0.51773417", "0.517607", "0.5171773", "0.5168107", "0.51642513", "0.5156737", "0.51329136", "0.51300544", "0.5129711", "0.5118981", "0.5110283", "0.5109487", "0.50778365", "0.50775194", "0.5067503", "0.5067131", "0.5065812", "0.506372" ]
0.59101814
5
method to show te popup window
private void showPopupWindow(final ImageView mIvImage, final int position, final RelativeLayout mRlPost) { LayoutInflater layoutInflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE); View popupView = layoutInflater.inflate(R.layout.popup_row_appointment_option, null); final PopupWindow popupWindow = new PopupWindow( popupView, ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT); popupWindow.setFocusable(true); popupWindow.setOutsideTouchable(true); popupWindow.setOnDismissListener(() -> mIvImage.setVisibility(View.VISIBLE)); TextView tvEdit = popupView.findViewById(R.id.tv_edit); TextView tvDelete = popupView.findViewById(R.id.tv_sold_out); tvDelete.setText(mContext.getString(R.string.delete)); // tvDelete.setVisibility(View.GONE); tvEdit.setOnClickListener(v -> { productHuntListingFragment.onPopupItemClick(1, position); popupWindow.dismiss(); }); tvDelete.setOnClickListener(v -> { productHuntListingFragment.onPopupItemClick(2, position); popupWindow.dismiss(); }); int location[] = new int[2]; // Get the View's(the one that was clicked in the Fragment) location mIvImage.getLocationOnScreen(location); float margingX = mContext.getResources().getDimension(R.dimen._30sdp); float margingY = mContext.getResources().getDimension(R.dimen._1sdp); int locationX = (int) (location[0] - margingX); int locationY = (int) (location[1] + margingY); // Using location, the PopupWindow will be displayed right under anchorView popupWindow.showAtLocation(mIvImage, Gravity.NO_GRAVITY, locationX, locationY); popupWindow.showAsDropDown(mIvImage); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createPopupWindow() {\r\n \t//\r\n }", "public void showGenPopup() {\n\t\ttv_popupTitle.setText(R.string.title3);\n\t\ttv_popupInfo.setText(R.string.description3);\n\t\t\n\t\t// The code below assumes that the root container has an id called 'main'\n\t\t popup.showAtLocation(findViewById(R.id.anchor), Gravity.CENTER, 0, 0);\n\t}", "public void triggerPopup();", "public void open() {\n popupWindow = new Window(getTypeCaption());\n popupWindow.addStyleName(\"e-export-form-window\");\n popupWindow.addStyleName(\"opaque\");\n VerticalLayout layout = (VerticalLayout) popupWindow.getContent();\n layout.setMargin(true);\n layout.setSpacing(true);\n layout.setSizeUndefined();\n popupWindow.setSizeUndefined();\n popupWindow.setModal(false);\n popupWindow.setClosable(true);\n\n popupWindow.addComponent(this);\n getMainApplication().getMainWindow().addWindow(popupWindow);\n\n onDisplay();\n }", "private void showPopUpWindow() {\n Log.d(TwoPlayersActivity.LOG_TAG, \"show popup\");\n LayoutInflater layoutInflater = (LayoutInflater) this\n .getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\n View popupView = layoutInflater.inflate(R.layout.pop_up,\n (ViewGroup) findViewById(R.id.pop_up));\n\n popupWindow = new PopupWindow(popupView,\n LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT, true);\n\n popupWindow.showAtLocation(popupView, Gravity.CENTER, 0, 0);\n\n Button btnDismiss = (Button)popupView.findViewById(R.id.dismiss);\n\n btnDismiss.setOnClickListener(new Button.OnClickListener() {\n @Override\n public void onClick(View v) {\n popupWindow.dismiss();\n }\n });\n }", "public void showOxPopup() {\n\t\ttv_popupTitle.setText(R.string.title1);\n\t\ttv_popupInfo.setText(R.string.description1);\n\t\t\n\t\t// The code below assumes that the root container has an id called 'main'\n\t\t popup.showAtLocation(findViewById(R.id.anchor), Gravity.CENTER, 0, 0);\n\t}", "private void showPopWindow() {\n\t\tfinal PointerPopupWindow p = new PointerPopupWindow(this,\n\t\t\t\tgetResources().getDimensionPixelSize(R.dimen.popup_width));\n\t\tView convertView = setClickListener(p);\n\n\t\tp.setContentView(convertView);\n\t\tp.setBackgroundDrawable(new ColorDrawable(getResources().getColor(R.color.pop_window_back)));\n\t\tp.setPointerImageRes(R.drawable.ic_popup_pointer);\n\t\tp.setAlignMode(PointerPopupWindow.AlignMode.CENTER_FIX);\n\t\tp.showAsPointer(photo);\n\t}", "public void actionPerformed(ActionEvent e) {\r\n\t\t\t\tpopup.show(mainpanel , 660, 40);\r\n\t\t\t}", "public void openWindow()\r\n {\r\n myWindow = new TraderWindow(this);\r\n while(!mailbox.isEmpty())\r\n {\r\n myWindow.showMessage( mailbox.remove() );\r\n }\r\n }", "private void displayPopUp(Parent root) {\n Scene scene = new Scene(root, 300, 200);\n Stage stage = new Stage();\n stage.initModality(Modality.APPLICATION_MODAL);\n stage.setScene(scene);\n stage.showAndWait();\n }", "public native void show(GInfoWindow self)/*-{\r\n\t\tself.show();\r\n\t}-*/;", "public void show()\n {\n setListSelection(comboBox.getSelectedIndex());\n Point location = getPopupLocation();\n show(comboBox\n //以下x、y坐标修正代码由Jack Jiang增加\n ,\n location.x + popupOffsetX //*~ popupOffsetX是自定属性,用于修改弹出窗的X坐标\n ,\n location.y + popupOffsetY //*~ popupOffsetY是自定属性,用于修改弹出窗的Y坐标\n );\n }", "public void showWindow() {\n\t\tupdate();\n\t\tsetVisible(true);\n\t}", "public void show() {\n if (mPopupWindow.isShowing()) return;\n\n mRectProvider.startObserving(this);\n\n updatePopupLayout();\n showPopupWindow();\n }", "public void onButtonShowPopupWindowClick(View view) {\n LayoutInflater inflater = (LayoutInflater)\n getSystemService(LAYOUT_INFLATER_SERVICE);\n View popupView = inflater.inflate(R.layout.activity_pop_up_time, null);\n\n // create the popup window\n int width = LinearLayout.LayoutParams.WRAP_CONTENT;\n int height = LinearLayout.LayoutParams.WRAP_CONTENT;\n boolean focusable = true; // lets taps outside the popup also dismiss it\n final PopupWindow popupWindow = new PopupWindow(popupView, width, height, focusable);\n\n // show the popup window\n // which view you pass in doesn't matter, it is only used for the window tolken\n popupWindow.showAtLocation(view, Gravity.CENTER, 0, 0);\n\n Button close = (Button) popupView.findViewById(R.id.confirmBtn);\n close.setOnClickListener(new View.OnClickListener() {\n\n public void onClick(View popupView) {\n popupWindow.dismiss();\n }\n });\n }", "boolean isPopUpOpened();", "protected void showPopup() {\r\n if (_component != null) {\r\n JPopupMenu popupMenu = new JPopupMenu();\r\n popupMenu.add(_component);\r\n popupMenu.pack(); \r\n popupMenu.show(this, 0, getHeight());\r\n }\r\n }", "public void show();", "@Override\n\tpublic boolean doPopup(int x, int y) {\n\t\tif (popup == null) {\n\t\t\tpopup = createPopup();\n\t\t}\n\t\tpopup.show(this, x, y);\n\t\treturn true;\n\t}", "private void showPopup(String title, String message)\n\t{\n\t\tJOptionPane.showMessageDialog(frmMPSWebServices, message, title, JOptionPane.PLAIN_MESSAGE);\n\t}", "private void showPopup(final Activity context, Point p) {\n int popupWidth = 700;\n int popupHeight = 400;\n\n // Inflate the popup_layout.xml\n LinearLayout viewGroup = (LinearLayout) context.findViewById(R.id.popup);\n LayoutInflater layoutInflater = (LayoutInflater) context\n .getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n View layout = layoutInflater.inflate(R.layout.popup_layout, viewGroup);\n\n // Creating the PopupWindow\n final PopupWindow popup = new PopupWindow(context);\n popup.setContentView(layout);\n popup.setWidth(popupWidth);\n popup.setHeight(popupHeight);\n popup.setFocusable(true);\n\n // Some offset to align the popup a bit to the right, and a bit down, relative to button's position.\n int OFFSET_X = 30;\n int OFFSET_Y = 30;\n\n // Clear the default translucent background\n popup.setBackgroundDrawable(new BitmapDrawable());\n\n // Displaying the popup at the specified location, + offsets.\n popup.showAtLocation(layout, Gravity.NO_GRAVITY, p.x + OFFSET_X, p.y + OFFSET_Y);\n\n // Getting a reference to Close button, and close the popup when clicked.\n Button close = (Button) layout.findViewById(R.id.close);\n close.setOnClickListener(new View.OnClickListener() {\n\n @Override\n public void onClick(View v) {\n popup.dismiss();\n }\n });\n }", "@Override\n protected void onPostExecute(Void curVoid) {\n super.onPostExecute(curVoid);\n popupWindow.showAtLocation(parent, Gravity.CENTER, 50, -30);\n }", "private void showPopup(MouseEvent e) {\n if (e.isPopupTrigger()) {\n jPopupMenu1.show(e.getComponent(), e.getX(), e.getY());\n }\n }", "@Override\r\n\tpublic void show() {\n\t\t\r\n\t\t\r\n\t}", "void showPopup(MouseEvent e) {\n\t\tif (e.isPopupTrigger()) {\n\t\t\tpopup.show((Component) e.getSource(), e.getX(), e.getY());\n\t\t}\n\t}", "@Override\r\n\tpublic void show() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void show() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void show() {\n\t\t\r\n\t}", "public void showResultsWindow() {\r\n \t\tshowResults.setSelected(true);\r\n \t\tshowResultsWindow(true);\r\n \t}", "private void popupModify() {\n\t\tboolean doNotShow = false;\n\t\tif (this instanceof Umlenkrolle && ((Umlenkrolle) this).isFree()) {\n\t\t\tdoNotShow = true;\n\t\t} else if (this instanceof DoppelUmlenkrolle) {\n\t\t\tdoNotShow = true;\n\t\t}\n\t\taufzugschacht.mainFrameShowOptionsFrame(this, doNotShow);\n\t}", "@Override\n public void windowOpened(WindowEvent e) {\n this.mostrar();\n }", "public static void showDialog() {\n\t\tdialog.setLocationRelativeTo(Cytoscape.getDesktop());\n\t\tdialog.setVisible(true);\n\t}", "public void showPopupModal() {\n log.info(\"OrdersBean : showPopupModal\");\n showPopup = true;\n if (getParam(\"idOrder\") != null) {\n int idOrder = parseInt(getParam(\"idOrder\"));\n ordersEntity = ordersServices.findById(idOrder);\n contractsBean.findAllContractsWhenFindOrders(ordersEntity.getId());\n }\n }", "public void displayInformation(View view) {\n layoutInflater = (LayoutInflater) getApplicationContext().getSystemService(LAYOUT_INFLATER_SERVICE);\r\n ViewGroup container = (ViewGroup) layoutInflater.inflate(R.layout.question_mark_popup,null);\r\n\r\n// popupWindow = new PopupWindow(container,ViewGroup.LayoutParams.WRAP_CONTENT,ViewGroup.LayoutParams.WRAP_CONTENT,true);\r\n// popupWindow.showAtLocation(view, Gravity.NO_GRAVITY,100,1300);\r\n\r\n int width = LinearLayout.LayoutParams.WRAP_CONTENT;\r\n int height = LinearLayout.LayoutParams.WRAP_CONTENT;\r\n popupWindow = new PopupWindow(container, width, height, true);\r\n\r\n popupWindow.showAtLocation(view, Gravity.CENTER, 0, 0);\r\n\r\n container.setOnTouchListener(new View.OnTouchListener(){\r\n @Override\r\n public boolean onTouch(View view, MotionEvent motionEvent){\r\n popupWindow.dismiss();\r\n return true;\r\n }\r\n });\r\n\r\n }", "public void getPopup() {\n\t\t\tglobal.btnClick(popup);\n\t\t}", "@Override\n\tpublic void show() {\n\t\tsuper.show();\n\t\t\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif (mypopupwindow.isShowing()) {\n\t\t\t\t\tmypopupwindow.dismiss();\n\t\t\t\t} else {\n\t\t\t\t\tmypopupwindow.showAtLocation(\n\t\t\t\t\t\t\tfindViewById(R.id.linearlayout0), Gravity.CENTER,\n\t\t\t\t\t\t\t10, 10);\n\t\t\t\t}\n\t\t\t}", "public void showPopup(WMSEvent evt) {\n JPanel target = mainPanel;\n JPanel panel = null;\n try {\n panel = JPanel.class.cast(evt.getSource());\n } catch (ClassCastException e) {\n// log.write(\"Exception: \" + e.getMessage());\n }\n if (panel != null) {\n target = panel;\n }\n if (evt.getMessage() == WMSMessage.POPERR) {\n JOptionPane.showMessageDialog(target, evt.getUserMessage(), afMgr.getProductName() + \" Error\",\n JOptionPane.ERROR_MESSAGE);\n } else if (evt.getMessage() == WMSMessage.POPWARN) {\n JOptionPane.showMessageDialog(target, evt.getUserMessage(), afMgr.getProductName() + \" Warning\",\n JOptionPane.WARNING_MESSAGE);\n } else if (evt.getMessage() == WMSMessage.POPMESS) {\n JOptionPane.showMessageDialog(target, evt.getUserMessage(), afMgr.getProductName() + \" Info\",\n JOptionPane.INFORMATION_MESSAGE);\n } else if (evt.getMessage() == WMSMessage.POPDEBUG) {\n if (getLevel().testMoreVerbose(level)) {\n JOptionPane.showMessageDialog(target, evt.getUserMessage(), afMgr.getProductName() + \" Debug\",\n JOptionPane.PLAIN_MESSAGE);\n }\n }\n }", "public void popup(String a){\n pop.setLayout(null);\n ControlAction c = new ControlAction();\n pop.setBounds(420, 320, 460, 160);\n pop.setBorder(new LineBorder(Color.BLACK, 2));\n //condition for showing popup message\n if(a.startsWith(\"1\")){\n mas.setText(\"Selamat Anda Telah Melakukan Peminjaman\");\n nolocker.setText(\"No. Locker Anda Yaitu 17\");\n yes.setVisible(false);\n no.setVisible(false);\n nolocker.setVisible(true);\n }else if(a.equals(WARN1)){\n mas.setText(\"Maaf Anda Telah Melakukan Peminjaman\");\n yes.setVisible(false);\n no.setVisible(false);\n nolocker.setVisible(false);\n }else if(a.equals(WARN2)){\n mas.setText(\"Maaf Anda Belum Melakukan Peminjaman\");\n yes.setVisible(false);\n no.setVisible(false);\n nolocker.setVisible(false);\n }else if(a.contains(\"BUKA\")){\n mas.setText(\"Anda Ingin Mengakhiri Peminjaman ?\");\n yes.setVisible(true);\n String key = a.substring(4);\n yes.setActionCommand(\"YES\"+key);\n no.setVisible(true);\n nolocker.setVisible(false);\n }else if(a.equals(NO)){\n mas.setText(\"Loker Anda Telah Terbuka\");\n yes.setVisible(false);\n no.setVisible(false);\n nolocker.setVisible(false);\n } \n mas.setFont(new Font(\"arial\", Font.BOLD, 20));\n mas.setOpaque(false);\n mas.setForeground(Color.BLACK);\n Dimension si1 = mas.getPreferredSize();\n mas.setBounds(10, 40, si1.width, si1.height);\n nolocker.setFont(new Font(\"arial\", Font.BOLD, 20));\n nolocker.setOpaque(false);\n nolocker.setForeground(Color.BLACK);\n Dimension si3 = nolocker.getPreferredSize();\n nolocker.setBounds(10, 70, si3.width, si3.height);\n //close button handling\n close.addActionListener(c);\n close.setActionCommand(EXIT);\n Dimension si2 = close.getPreferredSize();\n close.setBounds(420, 10, si2.width, si2.height);\n close.setBorder(BorderFactory.createEmptyBorder());\n close.setContentAreaFilled(false);\n //yes button handling\n yes.addActionListener(c);\n Dimension si4 = yes.getPreferredSize();\n yes.setBounds(100, 100, si4.width, si4.height);\n yes.setBorder(BorderFactory.createEmptyBorder());\n yes.setContentAreaFilled(false);\n //no button handling\n no.addActionListener(c);\n no.setActionCommand(NO);\n Dimension si5 = no.getPreferredSize();\n no.setBounds(250, 100, si5.width, si5.height);\n no.setBorder(BorderFactory.createEmptyBorder());\n no.setContentAreaFilled(false);\n //add to card3 top most layer\n card3.add(pop,6,0);\n }", "public void showWinMessage() {\n\n\t}", "@Override\n\tpublic void show() {\n\n\t}", "@Override\n\tpublic void show() {\n\n\t}", "@Override\n\tpublic void show() {\n\n\t}", "@Override\n\tpublic void show() {\n\n\t}", "@Override\n\tpublic void show() {\n\n\t}", "@Override\n\tpublic void show() {\n\n\t}", "@Override\n\tpublic void show() {\n\n\t}", "@Override\n\tpublic void show() {\n\n\t}", "@Override\r\n public void show()\r\n {\r\n\r\n }", "@Override\r\n public void show()\r\n {\r\n\r\n }", "@Override\r\n\tpublic void show() {\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "public void showOptions() {\n this.popupWindow.showAtLocation(this.layout, 17, 0, 0);\n this.customview.findViewById(R.id.dialog).setOnClickListener(new View.OnClickListener() {\n public void onClick(View view) {\n DiscussionActivity.this.popupWindow.dismiss();\n }\n });\n this.pdf.setOnClickListener(new View.OnClickListener() {\n public void onClick(View view) {\n DiscussionActivity discussionActivity = DiscussionActivity.this;\n discussionActivity.type = \"pdf\";\n discussionActivity.showPdfChooser();\n DiscussionActivity.this.popupWindow.dismiss();\n }\n });\n this.img.setOnClickListener(new View.OnClickListener() {\n public void onClick(View view) {\n DiscussionActivity discussionActivity = DiscussionActivity.this;\n discussionActivity.type = ContentTypes.EXTENSION_JPG_1;\n discussionActivity.showImageChooser();\n DiscussionActivity.this.popupWindow.dismiss();\n }\n });\n this.cancel.setOnClickListener(new View.OnClickListener() {\n public void onClick(View view) {\n DiscussionActivity.this.popupWindow.dismiss();\n }\n });\n }", "private ShowFitaMT() {\r\n setLocationRelativeTo(null);\r\n initComponents();\r\n setSize(600,120);\r\n setModal(true);\r\n }", "private void popupWindowOfOptions(View v) {\n \t \n \t\tOrderManager.clearOption();\n \t\t\n \t\tint nOrderBoardTextId = v.getId();\n \tOrder _Order = (Order) ResourceManager.get(nOrderBoardTextId);\n \tint nMenuDbId = _Order.MENU_ID;\n \tint nMenuResourceId = MenuManager.getResourceIdByDbId(nMenuDbId);\n \tMenu mMenu = MenuManager.getMenuByResourceId(nMenuResourceId);\n \t\n \tint nTempIdForCurrentOrder = IdManager.getRandomId();\n \tIdManager.setTemporaryId(nTempIdForCurrentOrder);\n \tResourceManager.put(nTempIdForCurrentOrder, _Order);\n \t\n try {\n \t\n \tint nPopupHeight = 760;\n \t\tint nPopupWith = 520;\n \t\n \tint nSubTitleHeight = 40;\n \tint nOptionListLayoutHeight = 210;\n \t\n \tString strMenuNameEng = mMenu.NAME_ENG;\n \tString strMenuNameOth = mMenu.NAME_OTH;\n \t\n \t// Popup layout\n LinearLayout popLayout = new LinearLayout(this);\n popLayout.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT));\n popLayout.setGravity(Gravity.CENTER);\n popLayout.setBackgroundColor(0x22000000);\n \n \t // Inner layout\n \t LinearLayout innerLayout = new LinearLayout(this);\n \t innerLayout.setLayoutParams(new LayoutParams(nPopupWith-20,nPopupHeight-20));\n \t innerLayout.setPadding(10,10,10,10);\n \t innerLayout.setOrientation(LinearLayout.VERTICAL);\n \t innerLayout.setGravity(Gravity.CENTER);\n \t innerLayout.setBackgroundColor(0xddffffff);\n \t\t \n \t\t // title eng\n \t\t TextView tvTitleEng = new TextView(this);\n \t\t tvTitleEng.setGravity(Gravity.CENTER);\n \t\t tvTitleEng.setText(strMenuNameEng);\n \t\t tvTitleEng.setTextColor(0xff000000);\n \t\t tvTitleEng.setTextSize(23);\n \t\t tvTitleEng.setHeight(50);\n \t\t tvTitleEng.setWidth(470);\n \t\t \n \t\t // title oth\n \t\t TextView tvTitleOth = new TextView(this);\n \t\t tvTitleOth.setGravity(Gravity.TOP|Gravity.CENTER);\n \t\t tvTitleOth.setText(strMenuNameOth);\n \t\t tvTitleOth.setTextColor(0xff000000);\n \t\t tvTitleOth.setTextSize(13);\n \t\t tvTitleOth.setHeight(55);\n \t\t tvTitleOth.setWidth(470);\n \t\t \n \t\t // common option title\n \t\t TextView tvCO = new TextView(this);\n \t\t tvCO.setText(\"* Common Option\");\n \t\t tvCO.setPadding(10,0,0,0);\n \t\t tvCO.setTextSize(15);\n \t\t tvCO.setTextColor(0xff5f2d09);\n \t\t tvCO.setHeight(nSubTitleHeight);\n \t\t tvCO.setWidth(470);\n \t\t \n \t\t // common option layout\n \t\t ScrollView svCO = new ScrollView(this);\n \t\t svCO.setLayoutParams(new LayoutParams(470,nOptionListLayoutHeight));\n \t\t \n \t\t LinearLayout llCO = new LinearLayout(this);\n \t\t llCO.setLayoutParams(new LayoutParams(470,LayoutParams.WRAP_CONTENT));\n \t\t llCO.setPadding(15,10,10,10);\n \t\t llCO.setOrientation(LinearLayout.VERTICAL);\n \t\t llCO.setGravity(Gravity.TOP);\n \t\t \n \t\t showCommonOptions (mMenu, llCO);\n \t\t \t\n \t\t \tsvCO.addView(llCO);\n \t\t \t\n \t\t\t // specific option title\n \t\t\t \n \t\t TextView tvSO = new TextView(this);\n \t\t tvSO.setPadding(10,0,0,0);\n \t\t tvSO.setText(\"* Specific Option\");\n \t\t tvSO.setTextSize(15);\n \t\t tvSO.setTextColor(0xff5f2d09);\n \t\t tvSO.setHeight(nSubTitleHeight);\n \t\t tvSO.setWidth(470);\n \t \n \t\t ScrollView svSO = new ScrollView(this);\n \t\t svSO.setLayoutParams(new LayoutParams(470,nOptionListLayoutHeight));\n \t\t \n \t\t LinearLayout llSO = new LinearLayout(this);\n \t\t llSO.setLayoutParams(new LayoutParams(470,nOptionListLayoutHeight));\n \t\t llSO.setPadding(15,10,10,10);\n \t\t llSO.setOrientation(LinearLayout.VERTICAL);\n \t\t llSO.setGravity(Gravity.TOP);\n \t\n \t\t showSpecificOptions (mMenu, llSO);\n \t\t \n \t\t svSO.addView(llSO);\n \t\t \n \t\t // button group\n \t\t \n \t\t int nButtonHeight = 50;\n \t\t int nButtonWidth = 100;\n \t\t \n \t\t LinearLayout llButtonGroup = new LinearLayout(this);\n \t\t llButtonGroup.setLayoutParams(new LayoutParams(470,80));\n \t\t llButtonGroup.setPadding(10, 0, 10, 4);\n \t\t llButtonGroup.setOrientation(LinearLayout.HORIZONTAL);\n \t\t llButtonGroup.setGravity(Gravity.CENTER|Gravity.BOTTOM);\n \t\t \n \t\t // confirm button\n \t \n \t \tint nConfirmId = IdManager.getRandomId();\n \t\t Button btnConfirm = new Button(this);\n \t\t btnConfirm.setId(nConfirmId);\n \t\t btnConfirm.setBackgroundResource(R.drawable.color_button_basic);\n \t\t btnConfirm.setLayoutParams(new LayoutParams(nButtonWidth,nButtonHeight));\n \t\t btnConfirm.setText(CaptionManager.getCaption().CONFIRM);\n \t\t btnConfirm.setTextSize(13);\n \t\t \n \t\t // add options to an order\n \t\t btnConfirm.setOnClickListener(new OnClickListener() {\n \t\t\t public void onClick(View v) {\n \t\t\t \t\n \t\t\t \tOrder currentOrder = (Order)ResourceManager.get(IdManager.getTemporaryId());\n \t\t\t \t\n \t\t\t \tArrayList<Order> orderList = addOptionsToOrder(currentOrder);\n \t\t\t \tOrderManager.requestUpdateOptions(currentOrder,orderList);\n \t \t\t\t\tloadOrderBoard();\n \t \t\t\t\tOrderManager.clearOption();\n \t \t\t\t\t_PopupWindowOfOptions.dismiss();\n \t\t\t }\n \t\t });\n \t\t \n \t\t // cancel button\n \t\t Button btnCancel = new Button(this);\n \t\t btnCancel.setBackgroundResource(R.drawable.color_button_basic);\n \t\t btnCancel.setLayoutParams(new LayoutParams(nButtonWidth,nButtonHeight));\n \t\t btnCancel.setText(CaptionManager.getCaption().CANCEL);\n \t\t btnCancel.setTextSize(13);\n \t\t btnCancel.setOnClickListener(new OnClickListener() {\n \t\t\t public void onClick(View v) {\n \t\t\t \tOrderManager.clearOption();\n \t\t\t \t_PopupWindowOfOptions.dismiss();\n \t\t\t }\n \t\t });\n \t\t \n \t\t // detail button\n \t\t final int nTempId = 808080;\n \t\t Mapper.put(Integer.valueOf(nTempId), mMenu);\n \t\t \n \t\t Button btnDetail = new Button(this);\n \t\t btnDetail.setBackgroundResource(R.drawable.color_button_basic);\n \t\t btnDetail.setLayoutParams(new LayoutParams(nButtonWidth,nButtonHeight));\n \t\t btnDetail.setText(CaptionManager.getCaption().DETAIL);\n \t\t btnDetail.setTextSize(13);\n \t\t btnDetail.setOnClickListener(new OnClickListener() {\n \t\t\t public void onClick(View v) {\n \t\t\t \n \t\t\t \tMenu menu = (Menu)Mapper.get(Integer.valueOf(808080));\n \t\t\t \tint nMenuRscId = menu.RESOURCE_ID;\n \t\t\t \tpopupWindowDetail(nMenuRscId);\n \t\t\t }\n \t\t });\n \t\t\t \n \t llButtonGroup.addView(btnConfirm);\n \t llButtonGroup.addView(btnCancel);\n \t llButtonGroup.addView(btnDetail);\n \t \n \t\t innerLayout.addView(tvTitleEng);\n \t innerLayout.addView(tvTitleOth);\n \t innerLayout.addView(tvCO);\n \t innerLayout.addView(svCO);\n \t innerLayout.addView(tvSO);\n \t innerLayout.addView(svSO);\n \t innerLayout.addView(llButtonGroup);\n \t \n popLayout.addView(innerLayout);\n\n // show popup\n _PopupWindowOfOptions = new PopupWindow(popLayout, nPopupWith, nPopupHeight, true);\n _PopupWindowOfOptions.showAtLocation(popLayout, Gravity.CENTER, 0, 0);\n \t\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void show() {\n int width = mEditor.getWidth();\n RectF leftHandleRect = mEditor.getLeftHandleRect();\n RectF rightHandleRect = mEditor.getRightHandleRect();\n\n // when right handle goes below visible area, it rect becomes empty. so this feature (or bug) used to calculate popup location\n // if we can not use this,\n // alternative method can be implemented using mMaximumTop\n // @TODO implement a proper way to calculate popup position\n if (rightHandleRect.isEmpty()) {\n rightHandleRect.top = mMaximumTop;\n rightHandleRect.left = width;\n rightHandleRect.bottom = mMaximumTop;\n rightHandleRect.right = width;\n }\n\n float handleHeight = leftHandleRect.height();\n selectionRect.top = Math.min(leftHandleRect.top, rightHandleRect.top);\n selectionRect.bottom = Math.max(leftHandleRect.bottom, rightHandleRect.bottom);\n selectionRect.left = Math.min(leftHandleRect.left, rightHandleRect.left);\n selectionRect.right = Math.max(leftHandleRect.right, rightHandleRect.right);\n\n // prevent drawing popup over the keyboard\n /*if (selectionRect.bottom > mMaximumTop - popHeightPx) {\n selectionRect.bottom -= popHeightPx;\n }*/\n\n if (mLeft > width - getWidth()) {\n mLeft = width - getWidth();\n }\n int height = mEditor.getHeight();\n if (mTop > height - getHeight()) {\n mTop = height - getHeight();\n }\n if (mTop < 0) {\n mTop = 0;\n }\n if (mLeft < 0) {\n mLeft = 0;\n }\n mEditor.getLocationInWindow(mLocation);\n boolean topCovered = mLocation[1] > selectionRect.top - textSizePx - popHeightPx - handleHeight;\n\n if (topCovered) {\n mTop = (int) (selectionRect.bottom + (handleHeight));\n } else {\n mTop = (int) (selectionRect.top - textSizePx - popHeightPx - handleHeight);\n }\n if (isShowing()) {\n update(mLocation[0] + mLeft, mLocation[1] + mTop, getWidth(), getHeight());\n return;\n }\n super.showAtLocation(mEditor,\n Gravity.START | Gravity.TOP,\n mLocation[0] + mLeft, mLocation[1] + mTop);\n }", "private void displayPopup(NativeEvent event, Element parent) {\n if (displayed) {\n return;\n }\n displayed = true;\n\n HorizontalPanel holder = new HorizontalPanel();\n SimplePanel arrow = new SimplePanel();\n arrow.addStyleName(\"arrow-left\");\n\n HTMLPanel panel = new HTMLPanel(tooltip);\n panel.addStyleName(\"panel\");\n\n holder.add(arrow);\n holder.add(panel);\n\n popup.clear();\n popup.add(holder);\n popup.addStyleName(StyleResource.INSTANCE.modal().tooltip());\n popup.show();\n popup.setPopupPosition(parent.getAbsoluteLeft() + 33, parent.getAbsoluteTop() + 2);\n }", "public void initiatePopupWindow(View v) {\n try {\n //We need to get the instance of the LayoutInflater, use the context of this activity\n LayoutInflater inflater = (LayoutInflater) Activity_Lesson_Unit_Point_Display_FlashCardActivity.this\n .getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n //Inflate the view from a predefined XML layout\n\n View view = inflater.inflate(R.layout.popup_screen,\n (ViewGroup) findViewById(R.id.popup_element));\n RelativeLayout layout = view.findViewById(R.id.popup_element);\n int width = 650;\n int height = 600;\n width = layout.getWidth();\n height = layout.getHeight();\n //Instantiate grid view\n gridView = view.findViewById(R.id.scroll_grid);\n //Instantiate grid adapter\n// scrollAdapter = new ScrollGridCardAdapter(FlashCardActivity.this,gja_questions,knownList,donknowList,skipList,getScreenSize());\n scrollAdapter = new ScrollGridCardAdapter(Activity_Lesson_Unit_Point_Display_FlashCardActivity.this,questionList,getScreenSize());\n //Setting Adapter to gridview\n gridView.setAdapter(scrollAdapter);\n // create a 300px width and 570px height PopupWindow\n pw = new PopupWindow(view, ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);\n // display the popup in the center\n pw.showAtLocation(v, Gravity.CENTER, 0, 0);\n if (android.os.Build.VERSION.SDK_INT > 20) {\n pw.setElevation(10);\n }\n// TextView mResultText = (TextView) layout.findViewById(R.id.server_status_text);\n Button cancelButton = (Button) view.findViewById(R.id.pop_close_button);\n cancelButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n pw.dismiss();\n// disableEnableViews(myrlayout);\n mHideRunnable.run();\n }\n });\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic void show() {\n\t}", "@Override\n\tpublic void show() {\n\t}", "@Override\r\n\tpublic void show() {\n\r\n\t}", "@Override\r\n\tpublic void show() {\n\r\n\t}", "public void showModalWindow() {\n Stage dialog = new Stage();\n dialog.initOwner(stage);\n dialog.initModality(Modality.WINDOW_MODAL); \n dialog.showAndWait();\n }", "public void open() {\n\t\tthis.createContents();\n\n\t\tWindowBuilder delegate = this.getDelegate();\n\t\tdelegate.setTitle(this.title);\n\t\tdelegate.setContents(this);\n\t\tdelegate.setIcon(this.iconImage);\n\t\tdelegate.setMinHeight(this.minHeight);\n\t\tdelegate.setMinWidth(this.minWidth);\n\t\tdelegate.open();\n\t}", "public void ConfirmPopupWindowClick(View view) {\n LayoutInflater inflater = (LayoutInflater)\n getSystemService(LAYOUT_INFLATER_SERVICE);\n View popupView = inflater.inflate(R.layout.activity_confirm_pub_crawl, null);\n\n // create the popup window\n int width = LinearLayout.LayoutParams.WRAP_CONTENT;\n int height = LinearLayout.LayoutParams.WRAP_CONTENT;\n boolean focusable = true; // lets taps outside the popup also dismiss it\n final PopupWindow popupWindow = new PopupWindow(popupView, width, height, focusable);\n\n // show the popup window\n // which view you pass in doesn't matter, it is only used for the window tolken\n popupWindow.showAtLocation(view, Gravity.CENTER, 0, 0);\n\n Button noBtn = (Button) popupView.findViewById(R.id.NoBtn);\n noBtn.setOnClickListener(new View.OnClickListener() {\n\n public void onClick(View popupView) {\n popupWindow.dismiss();\n }\n });\n\n Button yesBtn = (Button) popupView.findViewById(R.id.YesBtn);\n yesBtn.setOnClickListener(new View.OnClickListener() {\n\n public void onClick(View popupView) {\n popupWindow.dismiss();\n Intent goToRandomPubCrawlActivity = new Intent(AddToPubCrawl.this, random_pub_crawl.class);\n startActivity(goToRandomPubCrawlActivity);\n }\n });\n }", "public void show() {\n super.show();\n }", "private void popUp() {\n\tpop = new RoomPopUp(this);\n\tnoPopUp = false;\n }", "public void show() {\n\t\t// TODO Auto-generated method stub\n\n\t}", "protected Popup() {}", "public void show() {\n }", "public void show() {\n Container parent = this.parent;\n if (parent != null && parent.peer == null) {\n parent.addNotify();\n }\n if (peer == null) {\n addNotify();\n }\n validate();\n if (visible) {\n toFront();\n } else {\n // 6182409: Window.pack does not work correctly.\n beforeFirstShow = false;\n super.show();\n }\n // If first time shown, generate WindowOpened event\n if ((state & OPENED) == 0) {\n //postWindowEvent(WindowEvent.WINDOW_OPENED);\n WindowEvent e = new WindowEvent(this, WindowEvent.WINDOW_OPENED);\n Toolkit.getEventQueue().postEvent(e);\n state |= OPENED;\n }\n }", "public void display() {\n dialog.setVisible(true);\n }", "private void showPopup(View view) {\n PopupMenu popupMenu = new PopupMenu(context, view);\n final DataResult dataResult = (DataResult) view.getTag();\n MenuInflater menuInflater = popupMenu.getMenuInflater();\n menuInflater.inflate(R.menu.popup_data_result, popupMenu.getMenu());\n if (dataResult.isIs_clouded()) {\n popupMenu.getMenu().getItem(1).setEnabled(false);\n }\n popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {\n @Override\n public boolean onMenuItemClick(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.open_csv_data_result:\n openCSVDataResult(dataResult);\n break;\n case R.id.cloud_saved_data_result:\n cloudSavedDataResult(dataResult);\n break;\n case R.id.delete_data_result:\n deleteDataResult(dataResult);\n break;\n }\n return true;\n }\n });\n popupMenu.show();\n }", "public void showProjectWindow() {\n\t\tprojectWindow.show();\n\t}", "@Override\n public void show() {\n displayWindow.addWindowFocusListener(this);\n displayWindow.setVisible(true);\n }", "@Override\n\tpublic void show() {\n\t\tGameView.VIEW.addDialog(this);\n\t\tsuper.show();\n\t}", "@Override\n public void show() {\n }", "public void show_dialog_box (){\n //show the message of turning on the location\n Dialog dialog = new Dialog(this);\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n dialog.setContentView(R.layout.location_message_r);\n dialog.show();\n }", "public void showIt(){\n this.setVisible(true);\n }", "private void showDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"User created successfully\");\n builder.setIcon(R.drawable.ic_shield);\n builder.setCancelable(true);\n builder.setPositiveButton(\n \"Continue\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n finish();\n }\n });\n AlertDialog alert11 = builder.create();\n alert11.show();\n Window window = alert11.getWindow();\n assert window != null;\n WindowManager.LayoutParams wlp = window.getAttributes();\n wlp.gravity = Gravity.CENTER;\n wlp.y = 270;\n wlp.flags &= ~WindowManager.LayoutParams.FLAG_DIM_BEHIND;\n window.setAttributes(wlp);\n }", "public void showWindow() {\n Stage stage = new Stage();\n stage.setScene(new Scene(this.root));\n stage.setAlwaysOnTop(true);\n//\t\tstage.initStyle(StageStyle.UTILITY);\n stage.setOnCloseRequest((e) -> onCancelButtonClick());\n LOGGER.info(\"Show HydraulicSimulationResultWindow.\");\n\n stage.show();\n stage.setTitle(\"Result of execution\");\n Platform.runLater(() -> {\n this.window.setMinWidth(this.root.getWidth());\n this.window.setMinHeight(this.root.getHeight());\n });\n this.window = stage;\n }", "@Override\n public void show() {\n\n }", "@Override\n public void show() {\n\n }", "public void showWarningPopup() {\n\t\ttv_popupTitle.setText(\"Power Warning\");\n\t\ttv_popupInfo.setText(R.string.warning);\n\t\t\n\t\t// The code below assumes that the root container has an id called 'main'\n\t\t popup.showAtLocation(findViewById(R.id.anchor), Gravity.CENTER, 0, 0);\n\t}", "public void display() {\r\n subAwardDlgWindow.setVisible(true);\r\n }", "public void show()\r\n {\r\n\tshow(\"\");\r\n }", "public void showLifeCycleDialog() {\n\t\t\tlifeCycleDialogBox = new DialogBox(true);\n\t\t\tlifeCycleDialogBox.setGlassEnabled(true);\n\t\t\tlifeCycleDialogBox.setText(\"Seguimiento del Documento\");\n\n\t\t\t// Vertical Panel\n\t\t\tVerticalPanel vp = new VerticalPanel();\n\t\t\tvp.setSize(\"100%\", \"100%\");\n\t\t\tvp.add(lifeCycleCellTree);\n\t\t\tvp.add(new HTML(\"&nbsp;\"));\n\t\t\tvp.add(lifeCycleCloseButton);\n\n\t\t\t// Scroll Panel\n\t\t\tScrollPanel scrollPanel = new ScrollPanel();\n\t\t\tif (getUiParams().isMobile())\n\t\t\t\tscrollPanel.setSize(Window.getClientWidth() + \"px\", Window.getClientHeight() + \"px\");\n\t\t\telse\n\t\t\t\tscrollPanel.setSize(Window.getClientWidth() * .4 + \"px\", Window.getClientHeight() * .3 + \"px\");\n\t\t\tscrollPanel.setWidget(vp);\n\t\t\tlifeCycleDialogBox.setWidget(scrollPanel);\n\n\t\t\tDouble d = Window.getClientWidth() * .3;\n\t\t\tif (!getUiParams().isMobile()) \n\t\t\t\tlifeCycleDialogBox.setPopupPosition(d.intValue(), UiTemplate.NORTHSIZE * 3);\n\n\t\t\tlifeCycleDialogBox.show();\n\t\t}" ]
[ "0.79142815", "0.77397984", "0.7715941", "0.7698112", "0.7686202", "0.76553905", "0.75282127", "0.73568106", "0.727832", "0.708029", "0.7068242", "0.7065513", "0.70415056", "0.7040221", "0.6941044", "0.6939784", "0.69379944", "0.69365996", "0.6912901", "0.6909079", "0.68883854", "0.6851208", "0.6809839", "0.6804427", "0.6799954", "0.677992", "0.677992", "0.677992", "0.67722523", "0.67454785", "0.67392164", "0.67244256", "0.6720686", "0.67182505", "0.6714286", "0.6706481", "0.6704675", "0.6700407", "0.6695626", "0.6691552", "0.66855234", "0.66855234", "0.66855234", "0.66855234", "0.66855234", "0.66855234", "0.66855234", "0.66855234", "0.66813415", "0.66813415", "0.6673611", "0.6669927", "0.6669927", "0.6669927", "0.6669927", "0.6669927", "0.6669927", "0.6669927", "0.6669927", "0.6669927", "0.6669927", "0.6669927", "0.6669927", "0.6669927", "0.6669927", "0.6669927", "0.662997", "0.6624699", "0.66163045", "0.66157764", "0.66154796", "0.661501", "0.6597515", "0.6597515", "0.6590344", "0.6590344", "0.65836465", "0.65804195", "0.65671015", "0.65602386", "0.65421313", "0.6539853", "0.6532526", "0.6531868", "0.6527387", "0.65245575", "0.6519846", "0.6519199", "0.6514423", "0.6509156", "0.6497125", "0.64782965", "0.64732546", "0.6468396", "0.6465539", "0.6443637", "0.6443637", "0.6432383", "0.64247084", "0.64240307", "0.6423263" ]
0.0
-1
TODO Autogenerated method stub
@Override public void windowClosing(WindowEvent arg0) { jdbcoperate.closeJDBCOperate(); student.dispose(); jf.setVisible(true); }
{ "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
For verification only can start like this..
public MultiKey() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void initVerify() {\n\t\t\n\t}", "public static void verify() {\n\n\t\t\t\n\t\t\t\n\t\t\n\t}", "@Override\r\n\tprotected void doVerify() {\n\t\t\r\n\t}", "private void start() {\n\n\t}", "@Override\n public void beforeStart() {\n \n }", "protected void start() {\n }", "public void start( )\n {\n // Implemented by student.\n }", "@Override\r\n\tpublic void start() {\n\t\t\r\n\t}", "private Verify(){\n\t\t// Private constructor to prevent instantiation\n\t}", "private void openVerificationActivity() {\n }", "protected abstract boolean start();", "@Override\n\tpublic void start() {\n\n\t}", "@Override\n public void start() {\n }", "@Override\n public void start() {}", "@Override\n\tpublic void start() {\n\t\t\n\t}", "@Override\n\tpublic void start() {\n\t\t\n\t}", "@Override\n\tpublic void start() {\n\t\t\n\t}", "@Override\n\tpublic void start() {\n\t\t\n\t}", "public void start() {\n\n\t}", "@Override\r\n public void start() {\r\n }", "@Override\n public void start() { }", "void startChallenge();", "@Override\n public void start() {\n\n }", "@Override\n public void start() {\n\n }", "@Override\n public void start() {\n\n }", "public void run() {\n mSyncStart = null;\n\n // start sync\n SyncAdapter.requestSync(NumberValidation.this, true);\n\n // if we have been called internally, start ConversationList\n if (mFromInternal)\n startActivity(new Intent(getApplicationContext(), ConversationList.class));\n\n Toast.makeText(getApplicationContext(), R.string.msg_authenticated, Toast.LENGTH_LONG).show();\n\n // end this\n abortProgress();\n finish();\n }", "public void start() {\n\t\t\n\t}", "public void start() {\n\t\t\n\t}", "public void start(){\n return;\n }", "public void startup(){}", "@Override\n\tpublic void start() {\n\t}", "@Override\n\tpublic void start() {\n\t}", "@Override\n public void start() {\n }", "@Override\n public void start() {\n }", "@Override\n public void start() {\n }", "@Override\n public void start() {\n }", "@Override\n public void start() {\n }", "@Override\n public void start() {\n }", "@Override\n public void start() {\n }", "@Override\r\n\tpublic void onStart(ITestContext Result) {\n\t\t\r\n\t}", "public void start(){\n }", "@Override\n public void start() {\n checkValue();\n super.start();\n }", "@Override\n public void preVerify() throws Exception{\n Logger.getLogger(IdentityReconciliationProcessor.class.getName()).log(Level.INFO, \"Validating Input File Parameters.\");\n validateInputParams();\n // Validate OIM managed server is up and running. \n try{\n OIMClient client = getOIMClient();\n // This step is done as client.login migth not throw LoginException based on authenticator configured control param.\n client.getService(SchedulerService.class).getStatus();\n }catch(Exception e){\n throw new Exception(\"Either OIM server is not running or OIM input parameters are incorrect. Please verify values for \" +\n \"[OIM_WLS_MANAGED_SERVER_HOST, OIM_WLS_MANAGED_SERVER_PORT, OIM_ADMIN_USERNAME, OIM_ADMIN_USER_PASSWORD]\");\n }\n // TODO Validate IT resource configuration\n validateITResource();\n Logger.getLogger(IdentityReconciliationProcessor.class.getName()).log(Level.INFO, \"PreVerify Validation Successful.\");\n }", "@Override\n\tpublic void onStart(ITestContext result) {\n\t\t\n\t}", "public void start()\n {\n }", "public void start() {}", "public void start() {}", "@Override public void start() {\n }", "private DemoProcessStartEmailForWebservice() {\n\n }", "public void start() {\n\n }", "protected void beforeStartManager(Manager manager) {\n }", "public void start()\n/* 354: */ {\n/* 355:434 */ onStartup();\n/* 356: */ }", "@Override\r\n\tpublic void launch() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void launch() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void launch() {\n\t\t\r\n\t}", "void onSuccessfulStarted();", "public void start() {\n }", "@BeforeSuite\r\n\tvoid start() throws ClassNotFoundException, SQLException\r\n\t{\r\n\t\t//Database obj = new Database();\r\n\t\t//Database.database();\r\n\t\t\r\n\t\tstartServer();\r\n\t\tobj_phoneno = new PageObject_phonenumber(androidDriver) ;\r\n\t\tLog4j.info(\"SERVER START--log\");\r\n\t\t//Log4j.info();\r\n\t\t/*obj_otp=new PageObject_OTP(androidDriver);\r\n\t\tobj_setupprofile=new PageObject_setupprofile(androidDriver);*/\r\n\t}", "@Override\n protected void onStart() {\n checkUserStatus();\n super.onStart();\n }", "@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}", "protected void onFirstUse() {}", "public void start() {\n\r\n }", "@Override\r\n\t\t\t\tpublic void autInitProcess() {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void autInitProcess() {\n\t\t\t\t\t\r\n\t\t\t\t}", "public boolean start() {\n\t\treturn true;\n\t}", "@Override\n\tpublic void start() throws Exception {\n\t\t\n\t}", "@Override\n protected void onStart() {\n checkUserStatus();\n\n super.onStart();\n }", "@Override\n\t\t\t\t\tpublic void onReqStart() {\n\t\t\t\t\t}", "@Override\r\n\tpublic void start() {\n\t\tsuper.start();\r\n\t\t\r\n\t}", "private void startOTPVerificationProcess() {\n enableViews(mBinding.textOtpHeading, mBinding.editOtp, mBinding.buttonResendOtp, mBinding.buttonChangeNumber, mBinding.buttonVerifyOtp);\n disableViews(mBinding.progressBar);\n }", "@Override\r\n\tpublic void tellStarting() {\r\n\t\t// TODO Auto-generated method stub\r\n\r\n\t\t// Not used here\r\n\t}", "@Override\n public void startup() {\n }", "@Test\n public void testStart() {\n simpleMoneyAppStarterUnderTest.start();\n\n // Verify the results\n verify(mockProcessingStarter).startProcessing();\n verify(mockWebStarter).startEndpoints();\n }", "public Rsa_Bob(){\n\t\tstart();\n\t}", "@Override\n protected void appStart() {\n }", "@Test\n public void supervisorCanOpenACashRegister() {\n this.supervisor.canOpen();\n }", "protected void onBegin() {}", "@Override\n protected void startUp() {\n }", "public void run()\n {\n\n Intent in = new Intent(activity, loginfailed.class);\n in.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n activity.startActivity(in);\n\n\n }", "protected void aktualisieren() {\r\n\r\n\t}", "public abstract void started();", "public void onTestStart(ITestResult result) {\n\t\t\r\n\t}", "public void onTestStart(ITestResult result) {\n\t\t\r\n\t}", "public void onStart() {\n super.onStart();\n getStockVerification();\n }", "@Override\r\n\tpublic void onTestStart(ITestResult Result) {\n\t\t\r\n\t}", "private void initSome() {\n from_status=getIntent().getStringExtra(\"from\");\n Log.e(TAG, \"initSome: \"+from_status );\n\n progressBar.setVisibility(View.GONE);\n viewModel = ViewModelProviders.of(this).get(AuthViewModel.class);\n //initialize fb callbackmanger\n callbackManager = CallbackManager.Factory.create();\n //initialize firebase auth\n auth = FirebaseAuth.getInstance();\n\n prefs = Prefs.with(this);\n\n\n }", "public abstract void startup();", "@Override\n\tpublic void onStart(ITestContext context) {\n\t\t\n\t}", "@Override\n\tpublic void onStart(ITestContext context) {\n\t\t\n\t}", "@Override\n\tpublic void onStart(ITestContext context) {\n\t\t\n\t}", "@Override\n\tpublic void onStart(ITestContext context) {\n\t\t\n\t}", "@Override\n\tpublic void onStart(ITestContext context) {\n\t\t\n\t}", "private void preRequest() {\n\t\tSystem.out.println(\"pre request, i am playing job\");\n\t}", "@Override\n\tpublic void onTestStart(ITestResult result) {\n\t\t\n\t}", "@Override\n\tpublic void onTestStart(ITestResult result) {\n\t\t\n\t}", "@Override\n public synchronized void start() {\n super.start(); //To change body of generated methods, choose Tools | Templates.\n }", "@Override\n\tpublic void onTestStart(ITestResult result) {\n\n\t}" ]
[ "0.6629168", "0.64365727", "0.64180714", "0.63230675", "0.62025756", "0.61821187", "0.61495495", "0.6115944", "0.6115873", "0.6097154", "0.6083059", "0.60713816", "0.60447156", "0.60409755", "0.6025168", "0.6025168", "0.6025168", "0.6025168", "0.60204494", "0.6016634", "0.60108334", "0.5994896", "0.5988124", "0.5988124", "0.5988124", "0.5981413", "0.59805894", "0.59805894", "0.5965806", "0.59424543", "0.59355515", "0.59355515", "0.59328765", "0.59328765", "0.59328765", "0.59328765", "0.59328765", "0.59328765", "0.59328765", "0.5931566", "0.59227484", "0.59211254", "0.59178567", "0.5916091", "0.5911686", "0.5911369", "0.5911369", "0.58684343", "0.58664227", "0.58498883", "0.5846154", "0.58392274", "0.58321935", "0.58321935", "0.58321935", "0.5825468", "0.58093506", "0.58064467", "0.57931346", "0.5786295", "0.5786295", "0.5786295", "0.5786295", "0.5786295", "0.5778126", "0.5772266", "0.5765374", "0.5765374", "0.5764302", "0.5757125", "0.57468444", "0.5743643", "0.5735416", "0.5734685", "0.5726648", "0.5725193", "0.5725065", "0.5722081", "0.5719585", "0.5718639", "0.5714347", "0.5699048", "0.5695388", "0.5685464", "0.5674786", "0.56714445", "0.56714445", "0.56711125", "0.5664033", "0.56582314", "0.5658185", "0.56574607", "0.56574607", "0.56574607", "0.56574607", "0.56574607", "0.5638421", "0.56319106", "0.56319106", "0.5627257", "0.5626188" ]
0.0
-1
Create a MultiKey for verification with this public key
public MultiKey(MiniData zPublicKey) { setPublicKey(zPublicKey); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public MultiKey() {}", "@Test\n\tpublic void createNewMyKeys() {\n\t\tRsaKeyStore ks = new RsaKeyStore();\n\t\tboolean r1 = ks.createNewMyKeyPair(\"newkp\");\n\t\tboolean r2 = ks.createNewMyKeyPair(\"newtwo\");\n\t\tassertTrue(\"Should have added the key\", r1);\n\t\tassertTrue(\"Should have added the second key\", r2);\n\t}", "public CryptographyKeysCreator() {\n Random random = new Random();\n BigInteger prime1 = BigInteger.probablePrime(256, random);\n BigInteger prime2 = BigInteger.probablePrime(256, random);\n primesMultiplied = prime1.multiply(prime2);\n BigInteger phi = prime1.subtract(BigInteger.ONE).multiply(prime2.subtract(BigInteger.ONE));\n encryptingBigInt = BigInteger.probablePrime(256, random);\n\n while (phi.gcd(encryptingBigInt).compareTo(BigInteger.ONE) > 0 && encryptingBigInt.compareTo(phi) < 0) {\n encryptingBigInt = encryptingBigInt.add(BigInteger.ONE);\n }\n\n decryptingBigInt = encryptingBigInt.modInverse(phi);\n }", "public MultiKey(final K key1, final K key2) {\n this(newArray(key1, key2), false);\n }", "public KeyPair createKeyPair() {\n try {\n KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(\"RSA\");\n keyPairGenerator.initialize(4096);\n return keyPairGenerator.generateKeyPair();\n } catch (RuntimeException | NoSuchAlgorithmException e) {\n throw new RuntimeException(\"Failed to create public/private key pair\", e);\n }\n }", "ExportedKeyData makeKeyPairs(PGPKeyPair masterKey, PGPKeyPair subKey, String username, String email, String password) throws PGPException, IOException;", "public MultiKey(final K key1, final K key2, final K key3) {\n this(newArray(key1, key2, key3), false);\n }", "@PostMapping(\"/createKeyPair\")\n public String createKeyPair() {\n \n AWSKMS kmsClient = AWSKMSClientBuilder.standard().build();\n \n return \"Private uid: \"+ priuid +\"\\nPublic uid: \" + pubuid +\"\\n\";\n }", "public String createSmartKey(String userPart, long ... ids);", "KeyIdPair createKeyIdPair();", "public String createSmartKey(long ... ids);", "@Test\n public void testKeyUniqueness() throws Exception {\n UserMultiID umk = createUMK();\n UserMultiID eppnKey = new UserMultiID(umk.getEppn());\n UserMultiID eptidKey = new UserMultiID(umk.getEptid());\n UserMultiID openIdKey = new UserMultiID(umk.getOpenID());\n UserMultiID openIdConnectKey = new UserMultiID(umk.getOpenIDConnect());\n UserMultiID ruKey = new UserMultiID(umk.getRemoteUserName());\n\n String otherIDP = \"idp:other:\" + getRandomString();\n checkIDPUniqueness(eppnKey, otherIDP);\n checkIDPUniqueness(openIdConnectKey, otherIDP);\n checkIDPUniqueness(openIdKey, otherIDP);\n checkIDPUniqueness(ruKey, otherIDP);\n\n User eptidUser = newUser();\n eptidUser.setUserMultiKey(eptidKey);\n getUserStore().save(eptidUser);\n try {\n getDBSClient().getUser(eptidKey, otherIDP);\n assert false : \"Error: eptid must match idp exactly.\";\n } catch (Throwable t) {\n assert true;\n }\n\n }", "public void generateKey() {\n\twhile(true){\n\t rsaKeyA = (int)(Math.random()*20000 + 26);\n\t if(isPrime(rsaKeyA)){\n\t\tbreak;\n\t }\n\t}\n\twhile(true){\n\t rsaKeyB = (int)(Math.random()* 20000 + 26);\n\t if(isPrime(rsaKeyB)&& rsaKeyB != rsaKeyA){\n\t\tbreak;\n\t }\n\t}\n \n }", "private void generateIntegrityKeyPair(boolean clientMode) throws UnsupportedEncodingException, IOException, NoSuchAlgorithmException {\n byte[] cimagic = CLIENT_INT_MAGIC.getBytes(encoding);\n byte[] simagic = SVR_INT_MAGIC.getBytes(encoding);\n MessageDigest md5 = MessageDigest.getInstance(\"MD5\");\n byte[] keyBuffer = new byte[H_A1.length + cimagic.length];\n System.arraycopy(H_A1, 0, keyBuffer, 0, H_A1.length);\n System.arraycopy(cimagic, 0, keyBuffer, H_A1.length, cimagic.length);\n md5.update(keyBuffer);\n byte[] Kic = md5.digest();\n System.arraycopy(simagic, 0, keyBuffer, H_A1.length, simagic.length);\n md5.update(keyBuffer);\n byte[] Kis = md5.digest();\n if (logger.isLoggable(Level.FINER)) {\n traceOutput(DI_CLASS_NAME, \"generateIntegrityKeyPair\", \"DIGEST12:Kic: \", Kic);\n traceOutput(DI_CLASS_NAME, \"generateIntegrityKeyPair\", \"DIGEST13:Kis: \", Kis);\n }\n if (clientMode) {\n myKi = Kic;\n peerKi = Kis;\n } else {\n myKi = Kis;\n peerKi = Kic;\n }\n }", "public RSAKeyPairGenerator() {\n }", "private static void keyPairGenerator() throws NoSuchAlgorithmException, IOException {\n KeyPairGenerator kpg = KeyPairGenerator.getInstance(\"RSA\");\n kpg.initialize(2048);\n KeyPair keyPair = kpg.generateKeyPair();\n\n //Get public and private keys\n Key publicKey = keyPair.getPublic();\n Key privateKey = keyPair.getPrivate();\n\n String outFile = files_path + \"/Client_public\";\n PrintStream out = null;\n out = new PrintStream(new FileOutputStream(outFile + \".key\"));\n out.write(publicKey.getEncoded());\n out.close();\n\n outFile = files_path + \"/Client_private\";\n out = new PrintStream(new FileOutputStream(outFile + \".key\"));\n out.write(privateKey.getEncoded());\n out.close();\n\n System.err.println(\"Private key format: \" + privateKey.getFormat());\n // prints \"Private key format: PKCS#8\" on my machine\n\n System.err.println(\"Public key format: \" + publicKey.getFormat());\n // prints \"Public key format: X.509\" on my machine\n\n }", "OpenSSLKey mo134201a();", "public void generateKeys() {\r\n try {\r\n SecureRandom random = SecureRandom.getInstance(Constants.SECURE_RANDOM_ALGORITHM);\r\n KeyPairGenerator generator = KeyPairGenerator.getInstance(Constants.ALGORITHM);\r\n generator.initialize(Constants.KEY_BIT_SIZE, random);\r\n \r\n KeyPair keys = generator.genKeyPair();\r\n \r\n persistPrivateKey(keys.getPrivate().getEncoded());\r\n persistPublicKey(keys.getPublic().getEncoded());\r\n logger.log(Level.INFO, \"Done with generating persisting Public and Private Key.\");\r\n \r\n } catch (NoSuchAlgorithmException ex) {\r\n logger.log(Level.SEVERE, \"En error occured while generating the Public and Private Key\");\r\n }\r\n }", "public MultiKey(final K key1, final K key2, final K key3, final K key4) {\n this(newArray(key1, key2, key3, key4), false);\n }", "public MultiKey(int zBitLength) {\n\t\tthis(MiniData.getRandomData(zBitLength/8), DEFAULT_KEYS_PER_LEVEL, DEFAULT_LEVELS);\n\t}", "private KeyPair generateKeyPair() {\n try {\n KeyPairGenerator keyGen = KeyPairGenerator.getInstance(\"RSA\");\n SecureRandom random = SecureRandom.getInstance(\"SHA1PRNG\", \"SUN\");\n keyGen.initialize(2048, random);\n return keyGen.generateKeyPair();\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n } catch (NoSuchProviderException e) {\n e.printStackTrace();\n }\n return null;\n }", "private final void configureKeys() {\n\t\t// SecretServer's public key\n\t\tString line = ComMethods.getValueFor(\"SecretServer\", pubkeysfn);\n\t\tint x = line.indexOf(',');\n\t\tmy_n = new BigInteger(line.substring(0,x));\n\t\tmy_e = new Integer(line.substring(x+1,line.length()));\n\n\t\t// SecretServer's private key\n\t\tline = ComMethods.getValueFor(\"SecretServer\", privkeysfn);\n\t\tx = line.indexOf(',');\n\t\tmy_d = new BigInteger(line.substring(x+1,line.length()));\n\n\t\t// Public keys for all registered Users\n\t\tusersPubKeys1 = new BigInteger[validUsers.length];\n\t\tusersPubKeys2 = new int[validUsers.length];\n\t\tfor (int i=0; i<validUsers.length; i++) {\n\t\t\tline = ComMethods.getValueFor(validUsers[i], pubkeysfn);\n\t\t\tx = line.indexOf(',');\n\t\t\tusersPubKeys1[i] = new BigInteger(line.substring(0,x));\n\t\t\tusersPubKeys2[i] = new Integer(line.substring(x+1,line.length()));\n\t\t}\n\t}", "public MultiKey(final K key1, final K key2, final K key3, final K key4, final K key5) {\n this(newArray(key1, key2, key3, key4, key5), false);\n }", "public KeyGenerator() {\n this.publicList = new SinglyLinkedList();\n this.privateList = new PrivateKey();\n }", "public interface IKeyCreator {\n byte[] generateKey(int n);\n\n byte[] getKeyFromFile(String p);\n\n byte[] inputKey(String s);\n}", "public void generateKeyPair() {\n\t\ttry {\n\t\t\tKeyPairGenerator keyGen = KeyPairGenerator.getInstance(\"DSA\", \"SUN\");\n\t\t\tSecureRandom random = SecureRandom.getInstance(\"SHA1PRNG\", \"SUN\");\n\t\t\tkeyGen.initialize(1024, random);\n\t\t\tKeyPair pair = keyGen.generateKeyPair();\n\t\t\tprivateKey = pair.getPrivate();\n\t\t\tpublicKey = pair.getPublic();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private byte[][] ECDSAgeneratePublicAndPrivateKey(){\r\n int length = 0;\r\n byte[][] keys;\r\n \r\n do{\r\n \r\n\tECKeyPairGenerator gen = new ECKeyPairGenerator();\r\n\tSecureRandom secureRandom = new SecureRandom();\r\n X9ECParameters secnamecurves = SECNamedCurves.getByName(\"secp256k1\");\r\n\tECDomainParameters ecParams = new ECDomainParameters(secnamecurves.getCurve(), secnamecurves.getG(), secnamecurves.getN(), secnamecurves.getH());\r\n\tECKeyGenerationParameters keyGenParam = new ECKeyGenerationParameters(ecParams, secureRandom);\r\n\tgen.init(keyGenParam);\r\n\tAsymmetricCipherKeyPair kp = gen.generateKeyPair();\r\n\tECPrivateKeyParameters privatekey = (ECPrivateKeyParameters)kp.getPrivate();\r\n\tECPoint dd = secnamecurves.getG().multiply(privatekey.getD());\r\n\tbyte[] publickey=new byte[65];\r\n\tSystem.arraycopy(dd.getY().toBigInteger().toByteArray(), 0, publickey, 64-dd.getY().toBigInteger().toByteArray().length+1, dd.getY().toBigInteger().toByteArray().length);\r\n\tSystem.arraycopy(dd.getX().toBigInteger().toByteArray(), 0, publickey, 32-dd.getX().toBigInteger().toByteArray().length+1, dd.getX().toBigInteger().toByteArray().length);\r\n\tpublickey[0]=4;\r\n length = privatekey.getD().toByteArray().length;\r\n keys = new byte[][]{privatekey.getD().toByteArray(),publickey};\r\n \r\n }while(length != 32);\r\n\treturn keys;\r\n}", "KeyManager createKeyManager();", "private static void genKey(){\n\t\tSystem.out.println(\"Name to use for key?\");\n\t\tScanner in = new Scanner(System.in);\n\t\tkeyname = in.next();\n\t\tin.close();\n\t\t\n\t\tCreateKeyPairRequest createKPReq = new CreateKeyPairRequest();\n\t\tcreateKPReq.withKeyName(keyname);\n\t\tCreateKeyPairResult resultPair = null;\n\t\ttry{\n\t\t\tresultPair = ec2.createKeyPair(createKPReq);\n\t\t}catch(AmazonServiceException e){\n\t\t\tSystem.out.println(\"Key already exists!\");\n\t\t\tSystem.exit(0);\n\t\t}\n\n\t\tKeyPair keyPair = new KeyPair();\n\t\tkeyPair = resultPair.getKeyPair();\n\t\tString privateKey = keyPair.getKeyMaterial();\n\t\tFileOutputStream out = null;\n\t\t\n\t\t\n\t\ttry{\n\t\t\tFile f = new File(keyname + \".pem\");\n\t\t\tout = new FileOutputStream(f);\n\t\t\tbyte[] privateKeyByte = privateKey.getBytes();\n\t\t\tout.write(privateKeyByte);\n\t\t\tout.flush();\n\t\t\tout.close();\n\t\t\t\n\t\t\t\n\t\t}catch (IOException e){\n\t\t\tSystem.out.println(\"IO failed!\");\n\t\t\n\t\t}finally{\n\t\t\tif(out != null){\n\t\t\t\ttry {\n\t\t\t\t\tout.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tSystem.out.println(\"IO failed!\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\tSystem.out.println(\"Key generated: \" + keyname + \".pem\");\n\t}", "public void generateKeys()\n\t{\n\t\tmyP = BigInteger.probablePrime(myView.getBitLength(), rand());\n\t\tmyQ = BigInteger.probablePrime(myView.getBitLength(), rand());\n\t\tif(confirmPrimes(myP, myQ))\n\t\t{\n\t\t\tpublicKey = myP.multiply(myQ);\n\t\t\tmyView.displayPublicKey(publicKey.toString());\n\t\t\tmyPhi = (myP.subtract(BigInteger.ONE).multiply(myQ.subtract(BigInteger.ONE)));\n\t\t\tprivateKey = E.modInverse(myPhi);\n\t\t\tmyView.displayPrivateKey(privateKey.toString());\n\t\t}\n\t\telse\n\t\t{\n\t\t\tgenerateKeys();\n\t\t}\n\t}", "static KeyPair generateKeyPair() throws NoSuchAlgorithmException {\n\n KeyPairGenerator keyGen = KeyPairGenerator.getInstance(ALGORITHM);\n\n keyGen.initialize(2048);\n\n //Log.e(TAG, \"generateKeyPair: this is public key encoding \" + Arrays.toString(generateKeyPair.getPrivate().getEncoded()));\n\n return keyGen.generateKeyPair();\n }", "private void initializeKeyPairs() \r\n \t //@ requires nonRepKeyPair |-> _ &*& authKeyPair |-> _ &*& basicKeyPair |-> _;\r\n \t /*@ ensures nonRepKeyPair |-> ?theNonRepKeyPair &*& theNonRepKeyPair != null &*&\r\n\t \t authKeyPair |-> ?theAuthKeyPair &*& theAuthKeyPair != null &*&\r\n\t \t basicKeyPair |-> ?theBasicKeyPair &*& theBasicKeyPair != null;\r\n\t @*/\r\n\t{\r\n\t\t/*\r\n\t\t * basicKeyPair is static (so same for all applets) so only allocate\r\n\t\t * memory once\r\n\t\t */\r\n\t\tif (EidCard.basicKeyPair != null && authKeyPair != null && nonRepKeyPair != null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tbasicKeyPair = new KeyPair(KeyPair.ALG_RSA_CRT, (short) 1024);\r\n\t\tbasicKeyPair.genKeyPair();\r\n\t\t\r\n\t\tauthKeyPair = new KeyPair(KeyPair.ALG_RSA_CRT, (short) (1024));\r\n\t\tauthKeyPair.genKeyPair();\r\n\t\t\r\n\t\t\r\n\t\r\n\t\t//authPrivateKey = (RSAPrivateCrtKey) KeyBuilder.buildKey(KeyBuilder.TYPE_RSA_CRT_PRIVATE, KeyBuilder.LENGTH_RSA_1024, false);\r\n\t\t\r\n\r\n\t\tnonRepKeyPair = new KeyPair(KeyPair.ALG_RSA_CRT, (short) (1024));\r\n\t\tnonRepKeyPair.genKeyPair();\r\n\t\r\n\t\t//nonRepPrivateKey = (RSAPrivateCrtKey) KeyBuilder.buildKey(KeyBuilder.TYPE_RSA_CRT_PRIVATE, KeyBuilder.LENGTH_RSA_1024, false);\r\n\t}", "public static void main(String[] args) {\n KeyPairGenerator keygen = null;\n try {\n keygen = KeyPairGenerator.getInstance(\"RSA\");\n SecureRandom secrand = new SecureRandom();\n // secrand.setSeed(\"17\".getBytes());//初始化随机产生器\n keygen.initialize(2048, secrand);\n KeyPair keys = keygen.genKeyPair();\n PublicKey publicKey = keys.getPublic();\n PrivateKey privateKey = keys.getPrivate();\n String pubKey = Base64.encode(publicKey.getEncoded());\n String priKey = Base64.encode(privateKey.getEncoded());\n System.out.println(\"pubKey = \" + new String(pubKey));\n System.out.println(\"priKey = \" + new String(priKey));\n\n/*\n X509EncodedKeySpec keySpec = new X509EncodedKeySpec(pubkey.getEncoded());\n KeyFactory keyFactory = KeyFactory.getInstance(\"RSA\");\n PublicKey publicKey = keyFactory.generatePublic(keySpec);\n pubKey = Base64.encode(publicKey.getEncoded());\n System.out.println(\"pubKey = \" + new String(pubKey));\n*/\n\n/*\n PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(prikey.getEncoded());\n KeyFactory keyFactory = KeyFactory.getInstance(\"RSA\");\n PrivateKey privateKey = keyFactory.generatePrivate(keySpec);\n priKey = Base64.encode(privateKey.getEncoded());\n System.out.println(\"priKey = \" + new String(priKey));\n*/\n //(N,e)是公钥\n RSAPublicKey rsaPublicKey = (RSAPublicKey) publicKey;\n System.out.println(\"RSAPublicKey:\");\n System.out.println(\"Modulus.length=\" +\n rsaPublicKey.getModulus().bitLength());\n System.out.println(\"Modulus=\" + rsaPublicKey.getModulus().toString());//n\n System.out.println(\"PublicExponent.length=\" +\n rsaPublicKey.getPublicExponent().bitLength());\n System.out.println(\"PublicExponent=\" + rsaPublicKey.getPublicExponent().toString());//e\n\n\n //(N,d)是私钥\n RSAPrivateKey rsaPrivateKey = (RSAPrivateKey) privateKey;\n System.out.println(\"RSAPrivateKey:\");\n System.out.println(\"Modulus.length=\" +\n rsaPrivateKey.getModulus().bitLength());\n System.out.println(\"Modulus=\" + rsaPrivateKey.getModulus().toString());//n\n System.out.println(\"PrivateExponent.length=\" +\n rsaPrivateKey.getPrivateExponent().bitLength());\n System.out.println(\"PrivateExponent=\" + rsaPrivateKey.getPrivateExponent().toString());//d\n\n String encodeData = encode(\" public static String encode(String toEncode,String D, String N) {\\n\" +\n \" // BigInteger var2 = new BigInteger(\\\"17369712262290647732768133445861332449863405383733306695896586821166245382729380222118948668590047591903813382253186640467063376463309880263824085810383552963627855603429835060435976633955217307266714318344160886538360012623239010786668755679438900124601074924850696725233212494777766999123952653273738958617798460338184668049410136792403729341479373919634041235053823478242208651592611582439749292909499663165109004083820192135244694907138372731716013807836312280426304459316963033144149631900633817073029029413556757588486052978078614048837784810650766996280232645714319416096306667876390555673421669667406990886847\\\");\\n\" +\n \" // BigInteger var3 = new BigInteger(\\\"65537\\\");\\n\" +\n \" int MAX_ENCRYPT_BLOCK = 128;\\n\" +\n \" int offSet = 0;\\n\" +\n \" byte[] cache;\\n\" +\n \" int i = 0;\\n\" +\n \" ByteArrayOutputStream out = new ByteArrayOutputStream();\\n\" +\n \" try {\\n\" +\n \" RSAPrivateKeySpec rsaPrivateKeySpec = new java.security.spec.RSAPrivateKeySpec(new BigInteger(N),new BigInteger(D));\\n\" +\n \" KeyFactory keyFactory = java.security.KeyFactory.getInstance(\\\"RSA\\\");\\n\" +\n \" PrivateKey privateKey = keyFactory.generatePrivate(rsaPrivateKeySpec);\\n\" +\n \" Cipher cipher = javax.crypto.Cipher.getInstance(\\\"RSA\\\");\\n\" +\n \" cipher.init(Cipher.ENCRYPT_MODE,privateKey);\\n\" +\n \"\\n\" +\n \" byte[] data = toEncode.getBytes(StandardCharsets.UTF_8);\\n\" +\n \" int inputLen = data.length;\\n\" +\n \" // 对数据分段加密\\n\" +\n \" while (inputLen - offSet > 0) {\\n\" +\n \" if (inputLen - offSet > MAX_ENCRYPT_BLOCK) {\\n\" +\n \" cache = cipher.doFinal(data, offSet, MAX_ENCRYPT_BLOCK);\\n\" +\n \" } else {\\n\" +\n \" cache = cipher.doFinal(data, offSet, inputLen - offSet);\\n\" +\n \" }\\n\" +\n \" out.write(cache, 0, cache.length);\\n\" +\n \" i++;\\n\" +\n \" offSet = i * MAX_ENCRYPT_BLOCK;\\n\" +\n \" }\\n\" +\n \" byte[] datas = out.toByteArray();\\n\" +\n \" out.close();\\n\" +\n \"\\n\" +\n \" //byte[] datas = datas = cipher.doFinal(toEncode.getBytes());\\n\" +\n \" datas = org.apache.commons.codec.binary.Base64.encodeBase64(datas);\\n\" +\n \" return new String(datas,StandardCharsets.UTF_8);\\n\" +\n \" } catch (NoSuchAlgorithmException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" } catch (InvalidKeySpecException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" } catch (NoSuchPaddingException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" } catch (InvalidKeyException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" } catch (BadPaddingException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" } catch (IllegalBlockSizeException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" } catch (IOException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" }\\n\" +\n \" return null;\\n\" +\n \" }\",rsaPrivateKey.getPrivateExponent().toString(),rsaPrivateKey.getModulus().toString());\n String decodeData = decode(encodeData,rsaPublicKey.getPublicExponent().toString(),rsaPublicKey.getModulus().toString());\n\n System.out.println(encodeData);\n System.out.println(decodeData);\n\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n }/* catch (InvalidKeySpecException e) {\n e.printStackTrace();\n }*/\n }", "ArrayList<ExportedKeyData> generatePublicKeyList();", "private static void createKeyFiles(String pass, String publicKeyFilename, String privateKeyFilename) throws Exception {\n\t\tString password = null;\n\t\tif (pass.isEmpty()) {\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tSystem.out.print(\"Password to encrypt the private key: \");\n\t\t\tpassword = in.readLine();\n\t\t\tSystem.out.println(\"Generating an RSA keypair...\");\n\t\t} else {\n\t\t\tpassword = pass;\n\t\t}\n\t\t\n\t\t// Create an RSA key\n\t\tKeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(\"RSA\");\n\t\tkeyPairGenerator.initialize(1024);\n\t\tKeyPair keyPair = keyPairGenerator.genKeyPair();\n\n\t\tSystem.out.println(\"Done generating the keypair.\\n\");\n\n\t\t// Now we need to write the public key out to a file\n\t\tSystem.out.print(\"Public key filename: \");\n\n\t\t// Get the encoded form of the public key so we can\n\t\t// use it again in the future. This is X.509 by default.\n\t\tbyte[] publicKeyBytes = keyPair.getPublic().getEncoded();\n\n\t\t// Write the encoded public key out to the filesystem\n\t\tFileOutputStream fos = new FileOutputStream(publicKeyFilename);\n\t\tfos.write(publicKeyBytes);\n\t\tfos.close();\n\n\t\t// Now we need to do the same thing with the private key,\n\t\t// but we need to password encrypt it as well.\n\t\tSystem.out.print(\"Private key filename: \");\n \n\t\t// Get the encoded form. This is PKCS#8 by default.\n\t\tbyte[] privateKeyBytes = keyPair.getPrivate().getEncoded();\n\n\t\t// Here we actually encrypt the private key\n\t\tbyte[] encryptedPrivateKeyBytes = passwordEncrypt(password.toCharArray(), privateKeyBytes);\n\n\t\tfos = new FileOutputStream(privateKeyFilename);\n\t\tfos.write(encryptedPrivateKeyBytes);\n\t\tfos.close();\n\t}", "public KeyPair generadorAleatori() {\n KeyPair keys = null;\n try {\n KeyPairGenerator keyGen = KeyPairGenerator.getInstance(\"RSA\");\n keyGen.initialize(2048);\n keys = keyGen.genKeyPair();\n } catch (Exception e) {\n System.err.println(\"Generador no disponible.\");\n }\n return keys;\n }", "@Override\n public byte[] generateKey() throws ProtocolException, IOException {\n BigInteger p, q, n, e, d;\n Polynomial pol;\n do {\n // we want e such that GCD(e, phi(p*q))=1. as e is actually fixed\n // below, then we need to search for suitable p and q\n p = generateCofactor();\n q = generateCofactor();\n n = computeModulus(p, q);\n e = generatePublicExponent(p, q);\n } while (!verifyCofactors(p, q, e));\n d = computePrivateExponent(p, q, e);\n pol = generatePolynomial(p, q, d);\n BigInteger[] shares = ProtocolUtil.generateShares(pol, tparams.getParties());\n RSAPrivateCrtKey[] packedShares = packShares(e, shares, n);\n try {\n storeShares(packedShares);\n } catch (SmartCardException ex) {\n throw new ProtocolException(\n \"Error while communicating with smart card: \" + ex.toString());\n }\n\n RSAPublicKey pk = SignatureUtil.RSA.paramsToRSAPublicKey(e, n);\n return pk.getEncoded();\n }", "private static void setupKeysAndCertificates() throws Exception {\n // set up our certificates\n //\n KeyPairGenerator kpg = KeyPairGenerator.getInstance(\"RSA\", \"BC\");\n\n kpg.initialize(1024, new SecureRandom());\n\n String issueDN = \"O=Punkhorn Software, C=US\";\n issueKP = kpg.generateKeyPair();\n issueCert = Utils.makeCertificate(\n issueKP, issueDN, issueKP, issueDN);\n\n //\n // certificate we sign against\n //\n String signingDN = \"CN=William J. Collins, [email protected], O=Punkhorn Software, C=US\";\n signingKP = kpg.generateKeyPair();\n signingCert = Utils.makeCertificate(\n signingKP, signingDN, issueKP, issueDN);\n\n certList = new ArrayList<>();\n\n certList.add(signingCert);\n certList.add(issueCert);\n\n decryptingKP = signingKP;\n\n }", "public static void main(String[] args) {\n generateKeys(\"DSA\", 1024);\n\n // Generate a 576-bit DH key pair\n generateKeys(\"DH\", 576);\n\n // Generate a 1024-bit RSA key pair\n generateKeys(\"RSA\", 1024);\n }", "public void testParseAndCreate() throws Exception {\r\n byte[] keydata = FileHelper.loadFile(new File(\"./src/test/resources/PUBLIC_KEY_RSA1024.cvc\"));\r\n CVCPublicKey publicKey1 = (CVCPublicKey)CertificateParser.parseCVCObject(keydata);\r\n\r\n // Create certificate\r\n KeyPairGenerator keyGen = KeyPairGenerator.getInstance(\"RSA\", \"BC\");\r\n keyGen.initialize(1024, new SecureRandom());\r\n KeyPair keyPair = keyGen.generateKeyPair();\r\n CAReferenceField caRef = new CAReferenceField(CA_COUNTRY_CODE, CA_HOLDER_MNEMONIC, CA_SEQUENCE_NO);\r\n HolderReferenceField holderRef = new HolderReferenceField(HR_COUNTRY_CODE, HR_HOLDER_MNEMONIC, HR_SEQUENCE_NO);\r\n\r\n // Call CertificateGenerator\r\n CVCertificate cvc = \r\n CertificateGenerator.createTestCertificate(publicKey1, keyPair.getPrivate(), caRef, holderRef, \"SHA1WithRSA\", AuthorizationRoleEnum.IS );\r\n \r\n // Compare as text - these should be identical\r\n CVCPublicKey publicKey2 = cvc.getCertificateBody().getPublicKey();\r\n assertEquals(\"Public keys as text differ\", publicKey1.getAsText(\"\"), publicKey2.getAsText(\"\"));\r\n\r\n }", "private BigInteger setPrivateKey(BigInteger modulus){\n BigInteger privateKey = null;\n \n do {\n \tprivateKey = BigInteger.probablePrime(N / 2, random);\n }\n /* n'a aucun autre diviseur que 1 */\n while (privateKey.gcd(phi0).intValue() != 1 ||\n /* qu'il est plus grand que p1 et p2 */\n privateKey.compareTo(modulus) != -1 ||\n /* qu'il est plus petit que p1 * p2 */\n privateKey.compareTo(p1.max(p2)) == -1);\n \n return privateKey;\n }", "RSAKeygen(){\n Random rnd = new Random();\n p = BigInteger.probablePrime(bitlength, rnd);\n BigInteger eTmp = BigInteger.probablePrime(bitlength, rnd);\n\n while(p.equals(eTmp)){\n eTmp = BigInteger.probablePrime(bitlength,rnd);\n }\n\n q = eTmp;\n n = p.multiply(q);\n }", "public GenRSAKey() {\n initComponents();\n }", "public String[] keyGen(){\n \n p1 = BigInteger.probablePrime(N / 2, random);\n p2 = BigInteger.probablePrime(N / 2, random);\n phi0 = (p1.subtract(one)).multiply(p2.subtract(one));\n \n BigInteger modulus = p1.multiply(p2);\n BigInteger privateKey = setPrivateKey(modulus);\n BigInteger publicKey = privateKey.modInverse(phi0);\n \n /* Retourne un tableau de 3 chaine de caractere contenant dans cette ordre */\n /* cle publique, modulus, cle prive */\n String tab[] = {publicKey + \"\", modulus + \"\", privateKey + \"\"};\n return tab;\n \n }", "public CompositeKey(double startPrice,double endPrice){\n\t this.key1=startPrice;\n\t this.key2=endPrice;\n }", "public static void publicAndPrivateKeys() throws Exception {\n Metered metered = new Metered();\n // Set public and private keys\n metered.setMeteredKey(\"your-public-key\", \"your-private-key\");\n // ExEnd:PublicAndPrivateKeys\n }", "@PostMapping(\"/create\")\n public String createSymmetricKey() {\n\n AWSKMS kmsClient = new KmsClientBuilder().buildKmsClient();\n \n String creatingMasterKey = \"Creating Master Key\";\n CreateKeyRequest request = new CreateKeyRequest().withDescription(creatingMasterKey);\n CreateKeyResult result = kmsClient.createKey(request);\n\n return \"Object Type: Symmetric Key\\nuid: \"+ uid + \"\\n\";\n }", "public static X509V3CertificateGenerator GenerateSelfSignedCerteficate(X500Principal dnName1,X500Principal dnName2, BigInteger serialNumber ,PublicKey mypublicKey, PrivateKey myprivateKey, KeyUsage Keyus ) throws CertificateEncodingException, InvalidKeyException, IllegalStateException, NoSuchProviderException, NoSuchAlgorithmException, SignatureException\n\t {\n\t\t\t X509V3CertificateGenerator certGen = new X509V3CertificateGenerator();\n\t\t \n\n\t\t\t //certGen.addExtension(X509Extensions.ExtendedKeyUsage, true, new DERSequence(new DERObjectIdentifier(\"2.23.43.6.1.2\")));\n\n\t\t\t certGen.setSerialNumber(serialNumber);\n\t\t\t certGen.setSerialNumber(BigInteger.valueOf(System.currentTimeMillis()));\n\t\t certGen.setIssuerDN(dnName1); // use the same\n\t\t\t certGen.setSubjectDN(dnName2);\n\t\t\t // yesterday\n\t\t\t certGen.setNotBefore(new Date(System.currentTimeMillis() - 24 * 60 * 60 * 1000));\n\t\t\t // in 2 years\n\t\t\t certGen.setNotAfter(new Date(System.currentTimeMillis() + 2 * 365 * 24 * 60 * 60 * 1000));\n\t\t\t certGen.setPublicKey(mypublicKey);\n\t\t\t certGen.setSignatureAlgorithm(\"SHA256WithRSAEncryption\");\n\t\t\t certGen.addExtension(X509Extensions.KeyUsage, true, Keyus);\n\t\t\t certGen.addExtension(X509Extensions.ExtendedKeyUsage, true, new ExtendedKeyUsage(KeyPurposeId.id_kp_serverAuth));\n\n\t\t\t \n\t \treturn certGen;\n\t \t\n\t }", "static void generate() throws Exception {\n\t\t\n\t\tKeyPairGenerator keyGenerator = KeyPairGenerator.getInstance(\"RSA\");\n\t\tkeyGenerator.initialize(2048);\n\t\tKeyPair kp = keyGenerator.genKeyPair();\n\t\tRSAPublicKey publicKey = (RSAPublicKey)kp.getPublic();\n\t\tRSAPrivateKey privateKey = (RSAPrivateKey)kp.getPrivate();\n\t\t\n\t\tSystem.out.println(\"RSA_public_key=\"+Base64.getEncoder().encodeToString(publicKey.getEncoded()));\n\t\tSystem.out.println(\"RSA_private_key=\"+Base64.getEncoder().encodeToString(privateKey.getEncoded()));\n\t\tSystem.out.println(\"RSA_public_key_exponent=\"+ Base64.getEncoder().encodeToString(BigIntegerUtils.toBytesUnsigned(publicKey.getPublicExponent())));\n\t\tSystem.out.println(\"RSA_private_key_exponent=\"+Base64.getEncoder().encodeToString(BigIntegerUtils.toBytesUnsigned(privateKey.getPrivateExponent())));\n\t}", "@Test\n\tpublic void getMyKeyPairs() {\n\t\tRsaKeyStore ks = new RsaKeyStore();\n\t\tks.createNewMyKeyPair(\"ichi\");\n\t\tks.createNewMyKeyPair(\"ni\");\n\t\tKeyPair kp = ks.getMyKeyPair(\"ichi\");\n\t\tassertNotNull(\"should have returned keypair\", kp);\n\t\tKeyPair kpp = ks.getMyKeyPair(\"ni\");\n\t\tassertNotNull(\"should have returned keypair\", kpp);\n\t}", "private void generatePrivacyKeyPair(boolean clientMode) throws IOException, UnsupportedEncodingException, NoSuchAlgorithmException, SaslException {\n byte[] ccmagic = CLIENT_CONF_MAGIC.getBytes(encoding);\n byte[] scmagic = SVR_CONF_MAGIC.getBytes(encoding);\n MessageDigest md5 = MessageDigest.getInstance(\"MD5\");\n int n;\n if (negotiatedCipher.equals(CIPHER_TOKENS[RC4_40])) {\n n = 5;\n } else if (negotiatedCipher.equals(CIPHER_TOKENS[RC4_56])) {\n n = 7;\n } else {\n n = 16;\n }\n byte[] keyBuffer = new byte[n + ccmagic.length];\n System.arraycopy(H_A1, 0, keyBuffer, 0, n);\n System.arraycopy(ccmagic, 0, keyBuffer, n, ccmagic.length);\n md5.update(keyBuffer);\n byte[] Kcc = md5.digest();\n System.arraycopy(scmagic, 0, keyBuffer, n, scmagic.length);\n md5.update(keyBuffer);\n byte[] Kcs = md5.digest();\n if (logger.isLoggable(Level.FINER)) {\n traceOutput(DP_CLASS_NAME, \"generatePrivacyKeyPair\", \"DIGEST24:Kcc: \", Kcc);\n traceOutput(DP_CLASS_NAME, \"generatePrivacyKeyPair\", \"DIGEST25:Kcs: \", Kcs);\n }\n byte[] myKc;\n byte[] peerKc;\n if (clientMode) {\n myKc = Kcc;\n peerKc = Kcs;\n } else {\n myKc = Kcs;\n peerKc = Kcc;\n }\n try {\n SecretKey encKey;\n SecretKey decKey;\n if (negotiatedCipher.indexOf(CIPHER_TOKENS[RC4]) > -1) {\n encCipher = Cipher.getInstance(\"RC4\");\n decCipher = Cipher.getInstance(\"RC4\");\n encKey = new SecretKeySpec(myKc, \"RC4\");\n decKey = new SecretKeySpec(peerKc, \"RC4\");\n encCipher.init(Cipher.ENCRYPT_MODE, encKey);\n decCipher.init(Cipher.DECRYPT_MODE, decKey);\n } else if ((negotiatedCipher.equals(CIPHER_TOKENS[DES])) || (negotiatedCipher.equals(CIPHER_TOKENS[DES3]))) {\n String cipherFullname, cipherShortname;\n if (negotiatedCipher.equals(CIPHER_TOKENS[DES])) {\n cipherFullname = \"DES/CBC/NoPadding\";\n cipherShortname = \"des\";\n } else {\n cipherFullname = \"DESede/CBC/NoPadding\";\n cipherShortname = \"desede\";\n }\n encCipher = Cipher.getInstance(cipherFullname);\n decCipher = Cipher.getInstance(cipherFullname);\n encKey = makeDesKeys(myKc, cipherShortname);\n decKey = makeDesKeys(peerKc, cipherShortname);\n IvParameterSpec encIv = new IvParameterSpec(myKc, 8, 8);\n IvParameterSpec decIv = new IvParameterSpec(peerKc, 8, 8);\n encCipher.init(Cipher.ENCRYPT_MODE, encKey, encIv);\n decCipher.init(Cipher.DECRYPT_MODE, decKey, decIv);\n if (logger.isLoggable(Level.FINER)) {\n traceOutput(DP_CLASS_NAME, \"generatePrivacyKeyPair\", \"DIGEST26:\" + negotiatedCipher + \" IVcc: \", encIv.getIV());\n traceOutput(DP_CLASS_NAME, \"generatePrivacyKeyPair\", \"DIGEST27:\" + negotiatedCipher + \" IVcs: \", decIv.getIV());\n traceOutput(DP_CLASS_NAME, \"generatePrivacyKeyPair\", \"DIGEST28:\" + negotiatedCipher + \" encryption key: \", encKey.getEncoded());\n traceOutput(DP_CLASS_NAME, \"generatePrivacyKeyPair\", \"DIGEST29:\" + negotiatedCipher + \" decryption key: \", decKey.getEncoded());\n }\n }\n } catch (InvalidKeySpecException e) {\n throw new SaslException(\"DIGEST-MD5: Unsupported key \" + \"specification used.\", e);\n } catch (InvalidAlgorithmParameterException e) {\n throw new SaslException(\"DIGEST-MD5: Invalid cipher \" + \"algorithem parameter used to create cipher instance\", e);\n } catch (NoSuchPaddingException e) {\n throw new SaslException(\"DIGEST-MD5: Unsupported \" + \"padding used for chosen cipher\", e);\n } catch (InvalidKeyException e) {\n throw new SaslException(\"DIGEST-MD5: Invalid data \" + \"used to initialize keys\", e);\n }\n }", "@Test\n public void testEncodeDecodePublicWithParameters() {\n int keySizeInBits = 2048;\n PublicKey pub;\n String sha = \"SHA-256\";\n String mgf = \"MGF1\";\n int saltLength = 32;\n try {\n RSAKeyGenParameterSpec params =\n getPssAlgorithmParameters(keySizeInBits, sha, mgf, sha, saltLength);\n KeyPairGenerator keyGen = KeyPairGenerator.getInstance(\"RSASSA-PSS\");\n keyGen.initialize(params);\n KeyPair keypair = keyGen.genKeyPair();\n pub = keypair.getPublic();\n } catch (NoSuchAlgorithmException | InvalidAlgorithmParameterException ex) {\n TestUtil.skipTest(\"Key generation for RSASSA-PSS is not supported.\");\n return;\n }\n byte[] encoded = pub.getEncoded();\n X509EncodedKeySpec spec = new X509EncodedKeySpec(encoded);\n KeyFactory kf;\n try {\n kf = KeyFactory.getInstance(\"RSASSA-PSS\");\n } catch (NoSuchAlgorithmException ex) {\n fail(\"Provider supports KeyPairGenerator but not KeyFactory\");\n return;\n }\n try {\n kf.generatePublic(spec);\n } catch (InvalidKeySpecException ex) {\n throw new AssertionError(\n \"Provider failed to decode its own public key: \" + TestUtil.bytesToHex(encoded), ex);\n }\n }", "private void initKey() {\n String del = \":\";\n byte[] key;\n if (MainGame.applicationType == Application.ApplicationType.Android) {\n key = StringUtils.rightPad(Build.SERIAL + del + Build.ID + del, 32, \"~\").getBytes();\n } else if (MainGame.applicationType == Application.ApplicationType.Desktop) {\n key = new byte[]{0x12, 0x2d, 0x2f, 0x6c, 0x1f, 0x7a, 0x4f, 0x10, 0x48, 0x56, 0x17, 0x4b, 0x4f, 0x48, 0x3c, 0x17, 0x04, 0x06, 0x4b, 0x6d, 0x1d, 0x68, 0x4b, 0x52, 0x50, 0x50, 0x1f, 0x06, 0x29, 0x68, 0x5c, 0x65};\n } else {\n key = new byte[]{0x77, 0x61, 0x6c, 0x0b, 0x04, 0x5a, 0x4f, 0x4b, 0x65, 0x48, 0x52, 0x68, 0x1f, 0x1d, 0x3c, 0x4a, 0x5c, 0x06, 0x1f, 0x2f, 0x12, 0x32, 0x50, 0x19, 0x3c, 0x52, 0x04, 0x17, 0x48, 0x4f, 0x6d, 0x4b};\n }\n for (int i = 0; i < key.length; ++i) {\n key[i] = (byte) ((key[i] << 2) ^ magic);\n }\n privateKey = key;\n }", "public void generateKey(SinglyLinkedList wList) {\n BigInteger wListSum = new BigInteger(\"0\"), qInteger, rInteger;\n int wSumBitLen, qLen;\n Random random;\n SinglyLinkedList bList;//b is the public key list\n\n SinglyNode wListCurrent = wList.getHead();\n while (wListCurrent.getNext() != null) {\n wListCurrent = wListCurrent.getNext();\n wListSum = wListSum.add(new BigInteger((String) wListCurrent.getValue()));\n //wListSum is used to calculate a random q that is bigger than wListSum\n }\n\n wSumBitLen = wListSum.bitLength();\n random = new Random();\n do {\n qInteger = new BigInteger(wSumBitLen, random);\n } while (qInteger.compareTo(wListSum) <= 0);\n\n qLen = qInteger.bitLength();\n do {\n rInteger = new BigInteger(qLen, random);\n } while (Integer.parseInt(rInteger.gcd(qInteger).toString()) != 1);\n\n bList = new SinglyLinkedList();\n wListCurrent = wList.getHead();\n while (wListCurrent.getNext() != null) {\n wListCurrent = wListCurrent.getNext();\n wListSum = wListSum.add(new BigInteger((String) wListCurrent.getValue()));\n\n bList.addObjAtEnd(rInteger.multiply(new BigInteger((String) wListCurrent.getValue())).mod(qInteger) + \"\");\n }\n\n this.publicList = bList;\n this.privateList = new PrivateKey(wList, qInteger, rInteger);\n }", "@Test\n\tpublic void addOtherKeys() {\n\t\tRsaKeyStore ks = new RsaKeyStore();\n\t\tKeyPair kp = RsaHelper.generateKeyPair();\n\t\tassertTrue(\"should have added key\", ks.addOtherKey(\"firstOther\", kp.getPublic()));\n\t\tKeyPair kpp = RsaHelper.generateKeyPair();\n\t\tassertTrue(\"should have added key\", ks.addOtherKey(\"secondOther\", kpp.getPublic()));\n\t}", "public void testPubliKeyField() throws Exception {\r\n // Create new key pair\r\n KeyPairGenerator keyGen = KeyPairGenerator.getInstance(\"RSA\", \"BC\");\r\n keyGen.initialize(1024, new SecureRandom());\r\n KeyPair keyPair = keyGen.generateKeyPair();\r\n\r\n PublicKeyRSA rsa1 = (PublicKeyRSA)KeyFactory.createInstance(keyPair.getPublic(), \"SHA1WITHRSA\", null);\r\n byte[] der = rsa1.getEncoded();\r\n\r\n CVCObject cvcObj = CertificateParser.parseCVCObject(der);\r\n assertTrue(\"Parsed array was not a PublicKeyRSA\", (cvcObj instanceof PublicKeyRSA));\r\n\r\n RSAPublicKey rsaKey = (RSAPublicKey)keyPair.getPublic();\r\n\r\n RSAPublicKey rsa2 = (RSAPublicKey)cvcObj; // This casting should be successful\r\n assertEquals(\"Key modulus\", rsaKey.getModulus(), rsa2.getModulus());\r\n assertEquals(\"Key exponent\", rsaKey.getPublicExponent(), rsa2.getPublicExponent());\r\n assertEquals(\"Key algorithm\", \"RSA\", rsa2.getAlgorithm());\r\n \r\n PublicKeyRSA rsa3 = (PublicKeyRSA)rsa2;\r\n assertEquals(\"OIDs\", rsa1.getObjectIdentifier(), rsa3.getObjectIdentifier());\r\n }", "short generateKeyAndWrap(byte[] applicationParameter, short applicationParameterOffset, byte[] publicKey, short publicKeyOffset, byte[] keyHandle, short keyHandleOffset, byte info);", "public void genKeyPair(BigInteger p, BigInteger q)\n {\n n = p.multiply(q);\n BigInteger PhiN = RSA.bPhi(p, q);\n do {\n e = new BigInteger(2 * SIZE, new Random());\n } while ((e.compareTo(PhiN) != 1)\n || (Utils.bigGCD(e,PhiN).compareTo(BigInteger.ONE) != 0));\n d = RSA.bPrivateKey(e, p, q);\n }", "public static void main(String[] args) {\r\n\r\n String message = \"Hello, I'm Alice!\";\r\n // Alice's private and public key\r\n RSA rsaAlice = new RSA();\r\n rsaAlice.generateKeyPair();\r\n // Bob's private and public key\r\n RSA rsaBob = new RSA();\r\n rsaBob.generateKeyPair();\r\n // encrypted message from Alice to Bob\r\n BigInteger cipher = rsaAlice.encrypt(message, rsaBob.pubKey);\r\n // create digital signature by Alice\r\n BigInteger signature = rsaAlice.createSignature(message);\r\n\r\n // Bob decrypt message and verify signature\r\n String plain = rsaBob.decrypt(cipher, rsaBob.pubKey);\r\n boolean isVerify = rsaBob.verifySignature(plain, signature, rsaAlice.pubKey);\r\n\r\n if( isVerify )\r\n {\r\n System.out.println(\"Plain text : \" + plain);\r\n }\r\n\r\n /**\r\n * Part II. Two-part RSA protocol to receive\r\n * session key, with signature\r\n */\r\n\r\n // A's private and public key\r\n RSA rsaA = new RSA();\r\n rsaA.generateKeyPair();\r\n // B's private and public key\r\n RSA rsaB = new RSA();\r\n rsaB.generateKeyPair();\r\n\r\n BigInteger newSessionKey = new BigInteger(\"123456789123465\", 10);\r\n // create message by A\r\n BigInteger S = newSessionKey.modPow(rsaA.getPrivKeyD(), rsaA.pubKey[1]);\r\n BigInteger k1 = newSessionKey.modPow(rsaB.pubKey[0], rsaB.pubKey[1]);\r\n BigInteger S1 = S.modPow(rsaB.pubKey[0], rsaB.pubKey[1]);\r\n\r\n // --------- sending message to B --------- >>>\r\n\r\n // receive message by B and take new session key\r\n BigInteger k = k1.modPow(rsaB.getPrivKeyD(), rsaB.pubKey[1]);\r\n BigInteger Sign = S1.modPow(rsaB.getPrivKeyD(), rsaB.pubKey[1]);\r\n BigInteger verifyK = Sign.modPow(rsaA.pubKey[0], rsaA.pubKey[1]);\r\n\r\n if(verifyK.equals(k))\r\n {\r\n System.out.println(\"B receive new session key from A: \" + k.toString());\r\n }\r\n else\r\n {\r\n System.out.println(\"B receive FAKE session key from A: \" + k.toString());\r\n }\r\n\r\n }", "@Test\n public void testKeyGeneration() {\n final int NUM_KEYS = 10;\n Set<byte[]> generatedKeys = new HashSet<>(NUM_KEYS);\n\n for (int i = 0; i < NUM_KEYS; ++i) {\n byte[] newKey = KeyGenerator.instance().generateKey();\n\n assertFalse(\"Duplicate key generated #\" + i, generatedKeys.contains(newKey));\n generatedKeys.add(newKey);\n }\n }", "Multi createMulti();", "@Test\n\tpublic void createNewMyKeyEmptyName() {\n\t\tRsaKeyStore ks = new RsaKeyStore();\n\t\tboolean re = ks.createNewMyKeyPair(\"\");\n\t\tassertFalse(\"Should not have created new my keypair: empty name\", re);\n\t}", "public void generate(){\n\t\t//Key Generation\n\t\tint p = 41, q = 67; //two hard-coded prime numbers\n\t\tint n = p * q;\n\t\tint w = (p-1) * (q-1);\n\t\tint d = 83; //hard-coded number relatively prime number to w\n\t\t\n\t\tthis.privatekey = new PrivateKey(d,n); //public key generation completed\n\t\t\n\t\t//Extended Euclid's algorithm\n\t\tint \ta = w, \n\t\t\t\tb = d,\n\t\t\t\tv = a/b;\n\t\tArrayList<Integer> \tx = new ArrayList<Integer>(), \n\t\t\t\t\ty = new ArrayList<Integer>(),\n\t\t\t\t\tr = new ArrayList<Integer>();\n\t\t\n\t\t\n\t\t//Iteration 0\n\t\tint i = 0;\n\t\tx.add(1);\n\t\ty.add(0);\n\t\tr.add(a);\n\t\ti++;\n\t\t//Iteration 1\n\t\tx.add(0);\n\t\ty.add(1);\n\t\tr.add(b);\n\t\ti++;\n\t\t//Iteration 2\n\t\t //iteration counter\n\t\tint e = y.get(i-1);\n\t\tv = r.get(i-2) / r.get(i-1);\n\t\tx.add(x.get(i-2)-v*x.get(i-1));\n\t\ty.add(y.get(i-2) - v*y.get(i-1));\n\t\tr.add(a*(x.get(i-2)-v*x.get(i-1))\n\t\t\t\t+b*(y.get(i-2)-v*y.get(i-1))); \n\t\ti++;\n\t\t\n\t\t//Iterate until r == 0, then get the previous iteration's value of d\n\t\twhile(r.get(i-1) > 0){\n\t\t\te = y.get(i-1);\n\t\t\tv = r.get(i-2) / r.get(i-1);\n\t\t\tx.add(x.get(i-2)-v*x.get(i-1));\n\t\t\ty.add(y.get(i-2) - v*y.get(i-1));\n\t\t\tr.add(a*(x.get(i-2)-v*x.get(i-1))\n\t\t\t\t\t+b*(y.get(i-2) -(v*y.get(i-1))));\n\t\t\ti++;\n\t\t}\n\t\t\n\t\t//if number is negative, add w to keep positive\n\t\tif (e < 0){\n\t\t\te = w+e;\n\t\t}\n\t\tthis.publickey = new PublicKey(e,n); //private key generation completed\n\t\t\n\t\t//print values to console\n\t\tSystem.out.println(\"Value of public key: \" + e + \", private key: \" + d + \", modulus: \" + n);\n\t\tSystem.out.println();\n\t}", "public void generateEphemeralKey(){\n esk = BIG.randomnum(order, rng); //ephemeral secret key, x\n epk = gen.mul(esk); //ephemeral public key, X = x*P\n }", "public PrivateKey makePrivateKey() {\n return new PrivateKey(decryptingBigInt, primesMultiplied);\n }", "public RSAKeyContents generateKeys() {\r\n\t\tlock.lock();\r\n\t\ttry {\r\n\t\t\tButtermilkRSAKeyPairGenerator kpGen = new ButtermilkRSAKeyPairGenerator();\r\n\t\t\tkpGen.init(new RSAKeyGenerationParameters(DEFAULT_PUBLIC_EXPONENT, rand, KEY_STRENGTH, CERTAINTY));\r\n\t\t\treturn kpGen.generateKeys();\r\n\t\t} finally {\r\n\t\t\tlock.unlock();\r\n\t\t}\r\n\t}", "public void RSAyoyo() throws NoSuchAlgorithmException, GeneralSecurityException, IOException {\r\n\r\n KeyPairGenerator kPairGen = KeyPairGenerator.getInstance(\"RSA\");\r\n kPairGen.initialize(2048);\r\n KeyPair kPair = kPairGen.genKeyPair();\r\n publicKey = kPair.getPublic();\r\n System.out.println(publicKey);\r\n privateKey = kPair.getPrivate();\r\n\r\n KeyFactory fact = KeyFactory.getInstance(\"RSA\");\r\n RSAPublicKeySpec pub = fact.getKeySpec(kPair.getPublic(), RSAPublicKeySpec.class);\r\n RSAPrivateKeySpec priv = fact.getKeySpec(kPair.getPrivate(), RSAPrivateKeySpec.class);\r\n serializeToFile(\"public.key\", pub.getModulus(), pub.getPublicExponent()); \t\t\t\t// this will give public key file\r\n serializeToFile(\"private.key\", priv.getModulus(), priv.getPrivateExponent());\t\t\t// this will give private key file\r\n\r\n \r\n }", "public static void main(String[] args) throws Exception {\n KeyPairGenerator kpGen = KeyPairGenerator.getInstance(\"RSA\"); //create RSA KeyPairGenerator \n kpGen.initialize(2048, new SecureRandom()); //Choose key strength\n KeyPair keyPair = kpGen.generateKeyPair(); //Generate private and public keys\n PublicKey RSAPubKey = keyPair.getPublic();\n PrivateKey RSAPrivateKey = keyPair.getPrivate();\n\n //Information for Certificate\n SecureRandom random = SecureRandom.getInstance(\"SHA1PRNG\"); \n X500Name issuer = new X500Name(\"CN=\" + \"ExampleIssuer\"); // Issuer/Common Name\n X500Name subject = new X500Name(\"CN=\" + \"Client\"); //Subject\n Date notBefore = new Date(); //The date which the certificate becomes effective. \n long expiryDate = 1672437600000L; // expires 31 December 2022\n Date notAfter = new Date(expiryDate); //The date the certificate expires. \n BigInteger serialNumber = BigInteger.valueOf(Math.abs(random.nextInt())); //Cert Serial Number\n\n //Define the generator\n X509v3CertificateBuilder certGenerator \n = new JcaX509v3CertificateBuilder(\n issuer, \n serialNumber, \n notBefore,\n notAfter,\n subject,\n RSAPubKey\n );\n\n //Define how the certificate will be signed.\n //Usually with a hash algorithm and the Certificate Authority's private key. \n //Change argument x in .build(x) to not self-sign the cert.\n final ContentSigner contentSigner = new JcaContentSignerBuilder(\"SHA1WithRSAEncryption\").build(keyPair.getPrivate());\n\n //Generate a X.509 cert.\n X509CertificateHolder certificate = certGenerator.build(contentSigner);\n\n //Encode the certificate and write to a file. On Mac, you can open it with KeyChain Access\n //to confirm that it worked. \n byte[] encodedCert = certificate.getEncoded();\n FileOutputStream fos = new FileOutputStream(\"Example.cert\"); //Filename\n fos.write(encodedCert);\n fos.close();\n\n }", "@Test\n public void testEncodeDecodePublic() {\n int keySizeInBits = 2048;\n PublicKey pub;\n KeyFactory kf;\n try {\n kf = KeyFactory.getInstance(\"RSASSA-PSS\");\n KeyPairGenerator keyGen = KeyPairGenerator.getInstance(\"RSASSA-PSS\");\n keyGen.initialize(keySizeInBits);\n KeyPair keypair = keyGen.genKeyPair();\n pub = keypair.getPublic();\n } catch (NoSuchAlgorithmException ex) {\n TestUtil.skipTest(\"Key generation for RSASSA-PSS is not supported.\");\n return;\n }\n byte[] encoded = pub.getEncoded();\n assertEquals(\n \"The test assumes that the public key is in X.509 format\", \"X.509\", pub.getFormat());\n X509EncodedKeySpec spec = new X509EncodedKeySpec(encoded);\n try {\n kf.generatePublic(spec);\n } catch (InvalidKeySpecException ex) {\n throw new AssertionError(\"Provider can't decode its own key\", ex);\n }\n }", "@Test\n\tpublic void testSecuirtyConfigsOperations() throws NoSuchAlgorithmException {\n\t\t// Generate and store keys for the first time\n\t\tServerKeyPairs serverKeyPairs1 = new ServerKeyPairs();\n\t\tKeyPair encryptionKeyPair1 = serverKeyPairs1.getEncryptionKeyPair();\n\t\tKeyPair signatureKeyPair1 = serverKeyPairs1.getSignatureKeyPair();\n\n\t\t// Initialize a new serverKeyPairs to test that it will only read\n\t\t// previously generated keys\n\t\tServerKeyPairs serverKeyPairs2 = new ServerKeyPairs();\n\t\tKeyPair encryptionKeyPair2 = serverKeyPairs2.getEncryptionKeyPair();\n\t\tKeyPair signatureKeyPair2 = serverKeyPairs2.getSignatureKeyPair();\n\n\t\tassertEquals(\"Wrong loaded encryption public key modulas parameter\",\n\t\t\t\t((RSAPublicKey) encryptionKeyPair1.getPublic()).getModulus(),\n\t\t\t\t((RSAPublicKey) encryptionKeyPair2.getPublic()).getModulus());\n\n\t\tassertEquals(\"Wrong loaded encryption public key exponent parameter\",\n\t\t\t\t((RSAPublicKey) encryptionKeyPair1.getPublic()).getPublicExponent(),\n\t\t\t\t((RSAPublicKey) encryptionKeyPair2.getPublic()).getPublicExponent());\n\n\t\tassertEquals(\"Wrong loaded encryption private key modulas parameter\",\n\t\t\t\t((RSAPrivateKey) encryptionKeyPair1.getPrivate()).getModulus(),\n\t\t\t\t((RSAPrivateKey) encryptionKeyPair2.getPrivate()).getModulus());\n\n\t\tassertEquals(\"Wrong loaded encryption private key exponent parameter\",\n\t\t\t\t((RSAPrivateKey) encryptionKeyPair1.getPrivate()).getPrivateExponent(),\n\t\t\t\t((RSAPrivateKey) encryptionKeyPair2.getPrivate()).getPrivateExponent());\n\n\t\tassertEquals(\"Wrong loaded signature public key modulas parameter\",\n\t\t\t\t((RSAPublicKey) signatureKeyPair1.getPublic()).getModulus(),\n\t\t\t\t((RSAPublicKey) signatureKeyPair2.getPublic()).getModulus());\n\n\t\tassertEquals(\"Wrong loaded signature public key exponent parameter\",\n\t\t\t\t((RSAPublicKey) signatureKeyPair1.getPublic()).getPublicExponent(),\n\t\t\t\t((RSAPublicKey) signatureKeyPair2.getPublic()).getPublicExponent());\n\n\t\tassertEquals(\"Wrong loaded signature private key modulas parameter\",\n\t\t\t\t((RSAPrivateKey) signatureKeyPair1.getPrivate()).getModulus(),\n\t\t\t\t((RSAPrivateKey) signatureKeyPair2.getPrivate()).getModulus());\n\n\t\tassertEquals(\"Wrong loaded signature private key exponent parameter\",\n\t\t\t\t((RSAPrivateKey) signatureKeyPair1.getPrivate()).getPrivateExponent(),\n\t\t\t\t((RSAPrivateKey) signatureKeyPair2.getPrivate()).getPrivateExponent());\n\t}", "public void createKeyStore(String master_key) throws AEADBadTagException {\n SharedPreferences.Editor editor = getEncryptedSharedPreferences(master_key).edit();\n editor.putString(MASTER_KEY, master_key);\n editor.apply();\n\n Log.d(TAG, \"Encrypted SharedPreferences created...\");\n }", "public CreateKeyPairResponse createKeyPair(CreateKeyPair createKeyPair) {\n \t\treturn null;\r\n \t}", "public final KeyPair generateKeyPair() {\n\t\tif (SECURE_RANDOM == null) {\n\t\t\tSECURE_RANDOM = new SecureRandom();\n\t\t}\n\t\t// for p and q we divide the bits length by 2 , as they create n, \n\t\t// which is the modulus and actual key size is depend on it\n\t\tBigInteger p = new BigInteger(STRENGTH / 2, 64, SECURE_RANDOM);\n\t\tBigInteger q;\n\t\tdo {\n\t\t\tq = new BigInteger(STRENGTH / 2, 64, SECURE_RANDOM);\n\t\t} while (q.compareTo(p) == 0);\n\n\t\t// lambda = lcm(p-1, q-1) = (p-1)*(q-1)/gcd(p-1, q-1)\n\t\tBigInteger lambda = p.subtract(BigInteger.ONE).multiply(q\n\t\t\t\t.subtract(BigInteger.ONE)).divide(p.subtract(BigInteger.ONE)\n\t\t\t\t.gcd(q.subtract(BigInteger.ONE)));\n\n\t\tBigInteger n = p.multiply(q); // n = p*q\n\t\tBigInteger nsquare = n.multiply(n); // nsquare = n*n\n\t\tBigInteger g;\n\t\tdo {\n\t\t\t// generate g, a random integer in Z*_{n^2}\n\t\t\tdo {\n\t\t\t\tg = new BigInteger(STRENGTH, 64, SECURE_RANDOM);\n\t\t\t} while (g.compareTo(nsquare) >= 0\n\t\t\t\t\t|| g.gcd(nsquare).intValue() != 1);\n\n\t\t\t// verify g, the following must hold: gcd(L(g^lambda mod n^2), n) =\n\t\t\t// 1,\n\t\t\t// where L(u) = (u-1)/n\n\t\t} while (g.modPow(lambda, nsquare).subtract(BigInteger.ONE).divide(n)\n\t\t\t\t.gcd(n).intValue() != 1);\n\n\t\t// mu = (L(g^lambda mod n^2))^{-1} mod n, where L(u) = (u-1)/n\n\t\tBigInteger mu = g.modPow(lambda, nsquare).subtract(BigInteger.ONE)\n\t\t\t\t.divide(n).modInverse(n);\n\n\t\tPaillierPublicKey publicKey = new PaillierPublicKey(n, g, nsquare);\n\t\tPaillierPrivateKey privateKey = new PaillierPrivateKey(lambda, mu,\n\t\t\t\tnsquare, n);\n\n\t\treturn new KeyPair(publicKey, privateKey);\n\t}", "public static KeyPair createKeyPair(){\n KeyPair pair = KeyPair.random();\n System.out.println(pair.getSecretSeed());\n System.out.println(pair.getAccountId());\n return pair;\n\n }", "private void initPrivateKey(byte[] privateKeyFragment1, byte[] privateKeyFragment2) throws NoSuchAlgorithmException, InvalidKeySpecException, Base64DecodingException {\n this.rsaPrivateKey = KeyFactory.getInstance(\"RSA\").generatePrivate(new PKCS8EncodedKeySpec(concatByteArrays(privateKeyFragment1, privateKeyFragment2)));\n }", "private static Key generateKey() {\n return new SecretKeySpec(keyValue, ALGO);\n }", "public PrivateKey getKey();", "String newKey();", "public static KeyPair GenrateandEncrypt(String keyname) throws NoSuchAlgorithmException, InvalidKeySpecException, IOException\n\t {\n\t \tKeyPairGenerator kpg;\n\t kpg = KeyPairGenerator.getInstance(\"RSA\");\n kpg.initialize(4096);\n \n KeyPair kp = kpg.genKeyPair();\n PublicKey publicKey = kp.getPublic();\n PrivateKey privateKey = kp.getPrivate();\n\n //save keys \n \n \n String sPublic = Base64.getEncoder().encodeToString( publicKey.getEncoded());\n String sPrivate = Base64.getEncoder().encodeToString( privateKey.getEncoded());\n\n File file1 = new File(keyname+\"public.txt\");\n\t\t\tFileWriter fileWriter1 = new FileWriter(file1);\n\t\t\tfileWriter1.write(sPublic);\n\t\t\t\n\t\t\t\n\t\t\tFile file2 = new File(keyname+\"private.txt\");\n\t\t\tFileWriter fileWriter2 = new FileWriter(file2);\n\t\t\tfileWriter2.write(sPrivate);\n\t\t\t \n fileWriter1.flush();\n fileWriter1.close();\n \n fileWriter2.flush();\n fileWriter2.close();\n ////////////\n \n return kp;\n\t }", "@Override\n public ConcurrentContentSigner newSigner(\n String type, SignerConf conf, X509Cert[] certificateChain)\n throws ObjectCreationException {\n type = type.toLowerCase(Locale.ROOT);\n if (!types.contains(type)) {\n throw new ObjectCreationException(\"unknown signer type \" + type);\n }\n\n String str = conf.getConfValue(\"parallelism\");\n int parallelism = 20;\n if (str != null) {\n try {\n parallelism = Integer.parseInt(str);\n } catch (NumberFormatException ex) {\n throw new ObjectCreationException(\"invalid parallelism \" + str);\n }\n\n if (parallelism < 1) {\n throw new ObjectCreationException(\"invalid parallelism \" + str);\n }\n }\n\n str = conf.getConfValue(\"alias\");\n if (str == null) {\n throw new ObjectCreationException(\"alias is not specified\");\n }\n int keyId = Integer.parseInt(str);\n\n String algoName = conf.getConfValue(\"algo\");\n if (algoName == null) {\n throw new ObjectCreationException(\"algo is not specified\");\n }\n\n try {\n InitStatus initStatus = init(type);\n if (initStatus.status.get() != 1) {\n throw new ObjectCreationException(initStatus.details);\n }\n\n SignAlgo algo = SignAlgo.getInstance(algoName);\n String keyAlgoName;\n String bcKeyAlgoName;\n if (algo.isSM2SigAlgo()) {\n keyAlgoName = \"SM2\";\n bcKeyAlgoName = \"EC\";\n } else if (algo.isRSAPkcs1SigAlgo() || algo.isRSAPSSSigAlgo()) {\n keyAlgoName = \"RSA\";\n bcKeyAlgoName = \"RSA\";\n } else if (algo.isECDSASigAlgo() || algo.isPlainECDSASigAlgo()) {\n keyAlgoName = \"EC\";\n bcKeyAlgoName = \"EC\";\n } else {\n throw new ObjectCreationException(\"unsupported algo \" + algoName);\n }\n\n Provider provider = providerMap.get(type);\n\n // Method to read create PrivateKey and PublicKey object.\n // SANSEC use KeyPairGenerator.generateKeyPair to read the keypair-\n // No new keypair will be generated here.\n KeyPairGenerator kpGen = KeyPairGenerator.getInstance(keyAlgoName, provider);\n kpGen.initialize(keyId << 16);\n KeyPair kp = kpGen.generateKeyPair();\n\n PublicKey publicKey = KeyFactory.getInstance(bcKeyAlgoName, \"BC\")\n .generatePublic(new X509EncodedKeySpec(kp.getPublic().getEncoded()));\n\n return new JceSignerBuilder(kp.getPrivate(), publicKey, certificateChain, provider)\n .createSigner(algo, parallelism);\n } catch (GeneralSecurityException | XiSecurityException ex) {\n throw new ObjectCreationException(ex.getMessage(), ex);\n }\n }", "public interface PublicKey {\n\n /**\n * Returns id of the public key.\n *\n * @return id of key\n */\n String getId();\n\n /**\n * Returns ids from gpg sub keys.\n *\n * @return sub key ids\n * @since 2.19.0\n */\n default Set<String> getSubkeys() {\n return Collections.emptySet();\n }\n\n /**\n * Returns the username of the owner or an empty optional.\n *\n * @return owner or empty optional\n */\n Optional<String> getOwner();\n\n /**\n * Returns raw of the public key.\n *\n * @return raw of key\n */\n String getRaw();\n\n /**\n * Returns the contacts of the publickey.\n *\n * @return owner or empty optional\n */\n Set<Person> getContacts();\n\n /**\n * Verifies that the signature is valid for the given data.\n *\n * @param stream stream of data to verify\n * @param signature signature\n * @return {@code true} if the signature is valid for the given data\n */\n boolean verify(InputStream stream, byte[] signature);\n\n /**\n * Verifies that the signature is valid for the given data.\n *\n * @param data data to verify\n * @param signature signature\n * @return {@code true} if the signature is valid for the given data\n */\n default boolean verify(byte[] data, byte[] signature) {\n return verify(new ByteArrayInputStream(data), signature);\n }\n}", "public interface KeyManager {\n CreateKeyResponse createKey(CreateKeyRequest createKeyRequest);\n RegisterKeyResponse registerKey(RegisterKeyRequest registerKeyRequest);\n RegisterKeyResponse registerAsymmetricKey(RegisterAsymmetricKeyRequest registerKeyRequest);\n DeleteKeyResponse deleteKey(DeleteKeyRequest deleteKeyRequest);\n TransferKeyResponse transferKey(TransferKeyRequest keyRequest);\n GetKeyAttributesResponse getKeyAttributes(GetKeyAttributesRequest keyAttributesRequest);\n SearchKeyAttributesResponse searchKeyAttributes(SearchKeyAttributesRequest searchKeyAttributesRequest);\n}", "private void generateKeyPair(APDU apdu) \r\n \t //@ requires current_applet(this) &*& [1/2]valid() &*& APDU(apdu, ?theBuffer) &*& array_slice(theBuffer, 0, theBuffer.length, _);\r\n \t //@ ensures current_applet(this) &*& [1/2]valid() &*& APDU(apdu, theBuffer) &*& array_slice(theBuffer, 0, theBuffer.length, _);\r\n\t{\r\n\t\tapdu.setIncomingAndReceive();// If this was removed, function will not\r\n\t\t// work: no data except for command will be read\r\n\t\tbyte[] buffer = apdu.getBuffer();\r\n\t\t// check if access to this method is allowed\r\n\t\tif (GPSystem.getCardContentState() != GPSystem.APPLICATION_SELECTABLE)\r\n\t\t\tISOException.throwIt(ISO7816.SW_SECURITY_STATUS_NOT_SATISFIED);\r\n\t\t// check P1 and P2\r\n\t\tif (buffer[ISO7816.OFFSET_P1] != (byte) 0x00)\r\n\t\t\tISOException.throwIt(ISO7816.SW_WRONG_P1P2);\r\n\t\t// check Lc\r\n\t\tshort lc = (short) (buffer[ISO7816.OFFSET_LC] & 0x00FF);\r\n\t\tif (lc != (short) 11)\r\n\t\t\tISOException.throwIt(ISO7816.SW_WRONG_LENGTH);\r\n\t\tbyte offset = (ISO7816.OFFSET_CDATA + 0x01);\r\n\t\t//byte offset = (byte)(ISO7816.OFFSET_CDATA + 0x01);\r\n\t\t// create keypair using parameters given:\r\n\t\t// short keyLength = Util.makeShort(buffer[ISO7816.OFFSET_CDATA],\r\n\t\t// buffer[offset]);\r\n\t\tif (buffer[offset] != (byte) 0x80)\r\n\t\t\tISOException.throwIt(ISO7816.SW_WRONG_LENGTH);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t// This is commented out as changing exponent makes getting modulus\r\n\t\t// impossible on some java cards\r\n\t\t// ((RSAPublicKey)tempkp.getPublic()).setExponent(buffer, (short)(13),\r\n\t\t// (short)3);\r\n\t\tJCSystem.beginTransaction();\r\n\t\t////@ open valid(); // auto\r\n\t\tsetPreviousApduType(GENERATE_KEY_PAIR);\r\n\t\tswitch (buffer[ISO7816.OFFSET_P2]) {\r\n\t\tcase BASIC:\r\n\t\t\tbasicKeyPair = new KeyPair(KeyPair.ALG_RSA_CRT, (short) (1024));\r\n\t\t\tbasicKeyPair.genKeyPair();\r\n\t\t\t\r\n\t\t\tbreak;\r\n\t\tcase AUTHENTICATION: // use authentication private key\r\n\t\t\tauthKeyPair = new KeyPair(KeyPair.ALG_RSA_CRT, (short) (1024));\r\n\t\t\tauthKeyPair.genKeyPair();\r\n\t\t\t\r\n\t\t\tbreak;\r\n\t\tcase NON_REPUDIATION: // use non repudiation private key\r\n\t\t\tnonRepKeyPair = new KeyPair(KeyPair.ALG_RSA_CRT, (short) (1024));\r\n\t\t\tnonRepKeyPair.genKeyPair();\r\n\t\t\t\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\t\r\n\t\t\tISOException.throwIt(SW_REFERENCE_DATA_NOT_FOUND);\r\n\t\t\tbreak; //~allow_dead_code\r\n\t\t}\r\n\t\t////@ close valid(); // auto\r\n\t\tJCSystem.commitTransaction();\r\n\t}", "public interface SecondaryMultiKeyCreator {\r\n\r\n\t/**\r\n\t * Javadoc for this public method is generated via the doc templates in the\r\n\t * doc_src directory.\r\n\t */\r\n\tpublic void createSecondaryKeys(SecondaryDatabase secondary,\r\n\t\t\tDatabaseEntry key, DatabaseEntry data, Set results)\r\n\t\t\tthrows DatabaseException;\r\n}", "private static byte[] generate(final byte[] buffer, final PrivateKey key) {\r\n\r\n\t\tbyte[] data = null;\r\n\r\n\t\ttry {\r\n\t\t\tfinal X509EncodedKeySpec spec = new X509EncodedKeySpec(buffer);\r\n\t\t\tfinal KeyFactory kf = getKeyFactory();\r\n\t\t\tfinal PublicKey pk = kf.generatePublic(spec);\r\n\t\t\tdata = SharedSecret.doKeyExchange(key, pk);\r\n\t\t} catch (Exception e) {\r\n\t\t\tfinal String msg = Utils.toMessage(e);\r\n\t\t\tLOG.error(msg);\r\n\t\t\tLOG.debug(msg, e);\r\n\t\t\tdata = new byte[0];\r\n\t\t}\r\n\r\n\t\treturn data;\r\n\t}", "private static void computeKeyPairs() throws NoSuchAlgorithmException, InvalidAlgorithmParameterException {\r\n\r\n\t\tfinal KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(\"EC\");\r\n\t\tkeyPairGenerator.initialize(new ECGenParameterSpec(\"secp256r1\"), SecureRandom.getInstanceStrong());\r\n\t\tkeyPairAlice = keyPairGenerator.generateKeyPair();\r\n\t\tkeyPairBob = keyPairGenerator.generateKeyPair();\r\n\t}", "public MultiKeyMap() {\n this.map = new java.util.HashMap<String,V>();\n return;\n }", "@Test\n\tpublic void getOtherKeys() {\n\t\tRsaKeyStore ks = new RsaKeyStore();\n\t\tKeyPair kp = RsaHelper.generateKeyPair();\n\t\tks.addOtherKey(\"first other one\", kp.getPublic());\n\t\tKeyPair kpp = RsaHelper.generateKeyPair();\n\t\tks.addOtherKey(\"second other one\", kpp.getPublic());\n\t\tPublicKey pk = ks.getOtherKey(\"first other one\");\n\t\tassertTrue(\"should be same key\", kp.getPublic().equals(pk));\n\t\tPublicKey ppk = ks.getOtherKey(\"second other one\");\n\t\tassertTrue(\"should be same key\", kpp.getPublic().equals(ppk));\n\t}", "private SymmetricKey createTestSymmetricKey(String primaryKey, String secondaryKey)\n {\n SymmetricKey key = new SymmetricKey();\n Deencapsulation.setField(key, \"primaryKey\", primaryKey);\n Deencapsulation.setField(key, \"secondaryKey\", secondaryKey);\n return key;\n }", "public static void createAuthKey() {\n\n String url = \"jdbc:sqlite:c:/Carapaca/server/db/database.db\";\n\n String sql = \"CREATE TABLE IF NOT EXISTS authenticatedkeys (\\n\" + \" id integer PRIMARY KEY AUTOINCREMENT,\\n\"\n + \" id_user integer NOT NULL,\\n\"\n + \" ipaddr text NOT NULL,\\n\"\n + \" publickey text NOT NULL,\\n\"\n + \" FOREIGN KEY(id_user) REFERENCES users(id)\" + \");\";\n\n try (Connection conn = DriverManager.getConnection(url); Statement stmt = conn.createStatement()) {\n stmt.execute(sql);\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "public static void main(final String[] args) throws Exception {\n Security.addProvider(new BouncyCastleProvider());\n\n // --- setup key pair (generated in advance)\n final String passphrase = \"owlstead\";\n final KeyPair kp = generateRSAKeyPair(1024);\n final RSAPublicKey rsaPublicKey = (RSAPublicKey) kp.getPublic();\n final RSAPrivateKey rsaPrivateKey = (RSAPrivateKey) kp.getPrivate();\n\n // --- encode and wrap\n byte[] x509EncodedRSAPublicKey = encodeRSAPublicKey(rsaPublicKey);\n final byte[] saltedAndEncryptedPrivate = wrapRSAPrivateKey(\n passphrase, rsaPrivateKey);\n\n // --- decode and unwrap\n final RSAPublicKey retrievedRSAPublicKey = decodeRSAPublicKey(x509EncodedRSAPublicKey);\n final RSAPrivateKey retrievedRSAPrivateKey = unwrapRSAPrivateKey(passphrase,\n saltedAndEncryptedPrivate);\n\n // --- check result\n System.out.println(retrievedRSAPublicKey);\n System.out.println(retrievedRSAPrivateKey);\n }", "@Test\n public void createSubjectGroupTest() throws Exception\n {\n SubjectKey userKey = getUserKey(\"jdoe\");\n IPSubject ip = new IPSubject();\n \n SubjectGroup subjectGroup = new SubjectGroup();\n subjectGroup.setSubjectGroupName(\"network\");\n subjectGroup.setSubjectType(\"IP\");\n subjectGroup.setApplyToAll(Boolean.valueOf(true));\n subjectGroup.setApplyToEach(Boolean.valueOf(true));\n \n SubjectGroupEditObject sgEditObj = new SubjectGroupEditObject();\n List<Long> addList = sgEditObj.getAddSubjectList();\n addList.add(ip.getSubjectByName(\"workstation\").keySet().toArray(new Long[1])[0]);\n addList.add(ip.getSubjectByName(\"gateway\").keySet().toArray(new Long[1])[0]);\n \n SubjectGroupKey groupKey = ip.createSubjectGroup(subjectGroup, sgEditObj, userKey);\n \n EntityManagerContext.open(factory);\n try {\n org.ebayopensource.turmeric.policyservice.model.SubjectGroup savedSubjectGroup =\n EntityManagerContext.get().find(\n org.ebayopensource.turmeric.policyservice.model.SubjectGroup.class, \n groupKey.getSubjectGroupId());\n assertNotNull(savedSubjectGroup);\n } finally {\n EntityManagerContext.close();\n }\n }", "public ECKey() {\n this(secureRandom);\n }", "public T participationPublicKey(byte[] pk) {\n this.votePK = new ParticipationPublicKey(pk);\n return (T) this;\n }", "@SuppressWarnings(\"deprecation\")\n\tpublic static X509Certificate GenerateASelfSignedCerteficate(X500Principal dnName1,\n\t \t\tX500Principal dnName2, BigInteger serialNumber ,PublicKey mypublicKey,\n\t \t\tPrivateKey myprivateKey, KeyUsage Keyus ) \n\t throws CertificateEncodingException, InvalidKeyException, IllegalStateException, NoSuchProviderException, \n\t NoSuchAlgorithmException, SignatureException\n\t {\n\t\t\t X509V3CertificateGenerator certGen = new X509V3CertificateGenerator();\n\t\t\n //Add the serial number\n\t\t\t certGen.setSerialNumber(serialNumber);\n\t\t\t certGen.setSerialNumber(BigInteger.valueOf(System.currentTimeMillis()));\n\t\t\t \n\t\t\t //Issuer Id extension \n\t\t certGen.setIssuerDN(dnName1); \n\t\t \n\t\t //Subject DN extension\n\t\t\t certGen.setSubjectDN(dnName2);\n\t\t\t \n\t\t\t //Not before \n\t\t\t certGen.setNotBefore(new Date(System.currentTimeMillis() - 24 * 60 * 60 * 1000));\n\t\t\t \n\t\t\t // Not After\n\t\t\t certGen.setNotAfter(new Date(System.currentTimeMillis() + 2 * 365 * 24 * 60 * 60 * 1000));\n\t\t\t \n\t\t\t //Set the public Key\n\t\t\t certGen.setPublicKey(mypublicKey);\n\t\t\t \n\t\t\t //Sign the certificate\n\t\t\t certGen.setSignatureAlgorithm(\"SHA256WithRSAEncryption\");\n\t\t\t certGen.addExtension(X509Extensions.KeyUsage, true, Keyus);\n\t\t\t certGen.addExtension(X509Extensions.ExtendedKeyUsage, true, new ExtendedKeyUsage(KeyPurposeId.id_kp_serverAuth));\n\t \t\n\t\t\t\n\t\t\t \n\t\t\t // finally, sign the certificate with the private key of the same KeyPair\n\t\t\t Security.addProvider(new BouncyCastleProvider());\n\t\t\t \n\t\t\t X509Certificate certroot = certGen.generate(myprivateKey,\"BC\");\n\t\t\t \n\t\t\t \n\t \treturn certroot;\n\t }", "public PrivatePublicTuple generateKeyPair() {\n try {\n KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(\"RSA\");\n SecureRandom secureRandom = generateNewSecureRandom();\n keyPairGenerator.initialize(PRIVATE_KEY_LENGTH, secureRandom);\n KeyPair pair = keyPairGenerator.generateKeyPair();\n PrivateKey privateKey = pair.getPrivate();\n PublicKey publicKey = pair.getPublic();\n return new PrivatePublicTuple(getDEREncodingFromPrivateKey(privateKey), getDEREncodingFromPublicKey(publicKey));\n } catch (Exception e) {\n LOG.error(\"There was an error generating key pair: \", e);\n }\n return null;\n }", "public PublicKey makePublicKey() {\n return new PublicKey(encryptingBigInt, primesMultiplied);\n }", "public void generateKeys() {\n\t\t// p and q Length pairs: (1024,160), (2048,224), (2048,256), and (3072,256).\n\t\t// q must be a prime; choosing 160 Bit for q\n\t\tSystem.out.print(\"Calculating q: \");\n\t\tq = lib.generatePrime(160);\n\t\tSystem.out.println(q + \" - Bitlength: \" + q.bitLength());\n\t\t\n\t\t// p must be a prime\n\t\tSystem.out.print(\"Calculating p \");\n\t\tp = calculateP(q);\n\t System.out.println(\"\\np: \" + p + \" - Bitlength: \" + p.bitLength());\n\t System.out.println(\"Test-Division: ((p-1)/q) - Rest: \" + p.subtract(one).mod(q));\n\t \n\t // choose an h with (1 < h < p−1) and try again if g comes out as 1.\n \t// Most choices of h will lead to a usable g; commonly h=2 is used.\n\t System.out.print(\"Calculating g: \");\n\t BigInteger h = BigInteger.valueOf(2);\n\t BigInteger pMinusOne = p.subtract(one);\n\t do {\n\t \tg = h.modPow(pMinusOne.divide(q), p);\n\t \tSystem.out.print(\".\");\n\t }\n\t while (g == one);\n\t System.out.println(\" \"+g);\n\t \n\t // Choose x by some random method, where 0 < x < q\n\t // this is going to be the private key\n\t do {\n\t \tx = new BigInteger(q.bitCount(), lib.getRandom());\n }\n\t while (x.compareTo(zero) == -1);\n\t \n\t // Calculate y = g^x mod p\n\t y = g.modPow(x, p);\n\t \n System.out.println(\"y: \" + y);\n System.out.println(\"-------------------\");\n System.out.println(\"Private key (x): \" + x);\n\t}", "public Key generateKey2(int l) throws IOException{\n int b = l/32;\r\n int [] unos = new int[b];\r\n for(int i=0;i<b;i++){\r\n unos[i] = 1;\r\n }\r\n byte [] aB = int2byte(unos);\r\n\r\n return new SecretKeySpec(aB, \"AES\");\r\n }", "public VerificationScript(List<ECPublicKey> publicKeys, int signingThreshold) {\n if (signingThreshold < 1 || signingThreshold > publicKeys.size()) {\n throw new IllegalArgumentException(\n \"Signing threshold must be at least 1 and not higher than the number of public keys.\");\n }\n if (publicKeys.size() > MAX_PUBLIC_KEYS_PER_MULTISIG_ACCOUNT) {\n throw new IllegalArgumentException(format(\"At max %s public keys can take part in a multi-sig account\",\n MAX_PUBLIC_KEYS_PER_MULTISIG_ACCOUNT));\n }\n this.script = buildVerificationScript(publicKeys, signingThreshold);\n }" ]
[ "0.7181599", "0.6628892", "0.635269", "0.63372093", "0.6207036", "0.61894476", "0.6164643", "0.6093044", "0.6081299", "0.6073658", "0.606424", "0.6021452", "0.5948077", "0.59031695", "0.5901081", "0.5896803", "0.5862732", "0.58489525", "0.5844132", "0.582461", "0.5821744", "0.57896924", "0.57440674", "0.573267", "0.5732584", "0.57185763", "0.56970286", "0.5687045", "0.56654066", "0.56549275", "0.5653354", "0.5643895", "0.56292856", "0.5628678", "0.5614857", "0.5586005", "0.557992", "0.5577784", "0.5545564", "0.55421925", "0.5530135", "0.5517506", "0.5517277", "0.5462678", "0.5459531", "0.5443451", "0.5442817", "0.54307777", "0.5402557", "0.54001844", "0.53818357", "0.53667074", "0.5366098", "0.53643215", "0.53538", "0.5341651", "0.5319854", "0.530607", "0.530474", "0.5298256", "0.52884555", "0.5271475", "0.5270902", "0.5261937", "0.52595276", "0.52571654", "0.5251261", "0.5249009", "0.52444583", "0.52388036", "0.52321327", "0.5225407", "0.5223794", "0.52190244", "0.5210864", "0.5197105", "0.5185012", "0.51635104", "0.51538885", "0.51510316", "0.5147751", "0.51452726", "0.51429677", "0.5141726", "0.51387286", "0.513258", "0.5132232", "0.5129641", "0.51239103", "0.5114517", "0.51125383", "0.5105539", "0.5098282", "0.5090764", "0.5088118", "0.5087407", "0.5086027", "0.5085876", "0.5081692", "0.507309" ]
0.6684397
1
Use Default settings to create a MultiKey
public MultiKey(int zBitLength) { this(MiniData.getRandomData(zBitLength/8), DEFAULT_KEYS_PER_LEVEL, DEFAULT_LEVELS); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public MultiKey() {}", "void setPropertyKeySettings(List<PropertyKeySetting> settingList);", "public MultiKey(final K key1, final K key2, final K key3) {\n this(newArray(key1, key2, key3), false);\n }", "public MultiKeyMap() {\n this.map = new java.util.HashMap<String,V>();\n return;\n }", "public MultiKey(final K key1, final K key2, final K key3, final K key4, final K key5) {\n this(newArray(key1, key2, key3, key4, key5), false);\n }", "public MultiKey(final K key1, final K key2, final K key3, final K key4) {\n this(newArray(key1, key2, key3, key4), false);\n }", "Set getLocalKeySet();", "public String createSmartKey(long ... ids);", "public MultiKey(final K key1, final K key2) {\n this(newArray(key1, key2), false);\n }", "public String createSmartKey(String userPart, long ... ids);", "public Key()\n {\n name = \"\";\n fields = new Vector<String>();\n options = new Vector<String>();\n isPrimary = false;\n isUnique = false;\n }", "@Test\n\tpublic void createNewMyKeys() {\n\t\tRsaKeyStore ks = new RsaKeyStore();\n\t\tboolean r1 = ks.createNewMyKeyPair(\"newkp\");\n\t\tboolean r2 = ks.createNewMyKeyPair(\"newtwo\");\n\t\tassertTrue(\"Should have added the key\", r1);\n\t\tassertTrue(\"Should have added the second key\", r2);\n\t}", "public StandardKeySet() {\n super(ForwardingMap.this);\n }", "@Override\n public final <T> WeakKey<T> newKeyDefault(T defaultValue) {\n return createKey(null, defaultValue, null);\n }", "String getSettingByKey(HawkularUser user, String key, String defaultValue);", "public void setupKeys()\n {\n KeyAreaInfo keyArea = null;\n keyArea = new KeyAreaInfo(this, Constants.UNIQUE, \"PrimaryKey\");\n keyArea.addKeyField(\"ID\", Constants.ASCENDING);\n keyArea = new KeyAreaInfo(this, Constants.SECONDARY_KEY, \"CurrencyCode\");\n keyArea.addKeyField(\"CurrencyCode\", Constants.ASCENDING);\n keyArea = new KeyAreaInfo(this, Constants.NOT_UNIQUE, \"Description\");\n keyArea.addKeyField(\"Description\", Constants.ASCENDING);\n }", "WithCreate withEncryptionSettingsCollection(EncryptionSettingsCollection encryptionSettingsCollection);", "public MultiKey(MiniData zPublicKey) {\n\t\tsetPublicKey(zPublicKey);\n\t}", "public interface MargeDefaults {\n\n\tpublic static final String DEFAULT_UUID = \"D0FFBEE2D0FFBEE2D0FFBEE2D0FFBEE2\";\n \n public static final UUID[] DEFAULT_UUID_ARRAY = new UUID[] { new UUID(DEFAULT_UUID, false) };\n\n\tpublic static final String DEFAULT_SERVER_NAME = \"We_Love_Duff_Beer\";\n \n}", "List<PropertyKeySetting> getPropertyKeySettings();", "@Override\n\t\tpublic Text createKey() {\n\t\t\treturn null;\n\t\t}", "protected SafeHashMap.KeySet instantiateKeySet()\n {\n return new KeySet();\n }", "protected void initDefaultStrategies() {\n\t\tRedisSerializer<String> keySerializer = new StringRedisSerializer();\n\t\tRedisSerializer<Object> valueSerializer = new JacksonSerializer();\n\t\tsetSerializer(valueSerializer);\n\t\tsetStringSerializer(keySerializer);\n\t}", "public interface SKey {\n\n String FAIL_STORE = \"job.fail.store\";\n\n String LOADBALANCE = \"loadbalance\";\n\n String EVENT_CENTER = \"event.center\";\n\n String REMOTING = \"lts.remoting\";\n\n String REMOTING_SERIALIZABLE_DFT = \"lts.remoting.serializable.default\";\n\n String ZK_CLIENT_KEY = \"zk.client\";\n\n String JOB_ID_GENERATOR = \"id.generator\";\n\n String JOB_LOGGER = \"job.logger\";\n\n String JOB_QUEUE = \"job.queue\";\n}", "private ConfigurationKeys() {\n // empty constructor.\n }", "String newKey();", "protected static void initPropertyKey() {\n String path = URL_PREFIX + SCHEMA_PKS;\n\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"name\\\",\\n\"\n + \"\\\"data_type\\\": \\\"TEXT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"age\\\",\\n\"\n + \"\\\"data_type\\\": \\\"INT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"city\\\",\\n\"\n + \"\\\"data_type\\\": \\\"TEXT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"lang\\\",\\n\"\n + \"\\\"data_type\\\": \\\"TEXT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"date\\\",\\n\"\n + \"\\\"data_type\\\": \\\"TEXT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"price\\\",\\n\"\n + \"\\\"data_type\\\": \\\"INT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"weight\\\",\\n\"\n + \"\\\"data_type\\\": \\\"DOUBLE\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n }", "public Builder keyIDs(final String ... ids) {\n\n\t\t\tkeyIDs(new HashSet<>(Arrays.asList(ids)));\n\t\t\treturn this;\n\t\t}", "@Test\n\tpublic void testGroupNumerousKeys() {\n\t\tint max = 1000;\n\t\tint oldsize = 0;\n\t\tint newsize = 0;\n\t\ttry {\n\t\t\toldsize = VintageConfigWebUtils.lookup(groupString).size();\n\t\t\tVintageConfigWebUtils.batchregister(groupString, keyString, valueString, 1, max);\n\t\t\t\n\t\t\tnewsize = VintageConfigWebUtils.lookup(groupString).size();\n\t\t\tassertEquals(oldsize + max, newsize);\n\n\t\t\tfor (int i = 0; i < max; i++) {\n\t\t\t\tList<String> nodesList = VintageConfigWebUtils.lookup(groupString, keyString+i);\n\t\t\t\tString nodevalue = getValueFromConfigNode(nodesList.get(0));\n\t\t\t\tassertEquals(nodevalue, valueString+i);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\tSystem.out.print(e.getMessage());\n\t\t\tfail(\"error in testGroupNumerousKeys\");\n\t\t} finally {\n\t\t\tVintageConfigWebUtils.batchunregister(groupString, keyString, 0, max);\n\t\t\tassertEquals(oldsize, VintageConfigWebUtils.lookup(groupString).size());\n\t\t}\n\t}", "KeyManager createKeyManager();", "short getDefaultKeyIx();", "public HashMultiSet() {\r\n\t\tbaseMap = new HashMap<>();\r\n\t}", "private final void configureKeys() {\n\t\t// SecretServer's public key\n\t\tString line = ComMethods.getValueFor(\"SecretServer\", pubkeysfn);\n\t\tint x = line.indexOf(',');\n\t\tmy_n = new BigInteger(line.substring(0,x));\n\t\tmy_e = new Integer(line.substring(x+1,line.length()));\n\n\t\t// SecretServer's private key\n\t\tline = ComMethods.getValueFor(\"SecretServer\", privkeysfn);\n\t\tx = line.indexOf(',');\n\t\tmy_d = new BigInteger(line.substring(x+1,line.length()));\n\n\t\t// Public keys for all registered Users\n\t\tusersPubKeys1 = new BigInteger[validUsers.length];\n\t\tusersPubKeys2 = new int[validUsers.length];\n\t\tfor (int i=0; i<validUsers.length; i++) {\n\t\t\tline = ComMethods.getValueFor(validUsers[i], pubkeysfn);\n\t\t\tx = line.indexOf(',');\n\t\t\tusersPubKeys1[i] = new BigInteger(line.substring(0,x));\n\t\t\tusersPubKeys2[i] = new Integer(line.substring(x+1,line.length()));\n\t\t}\n\t}", "@Override\n protected <T> WeakKey<T> createKey(String name, T defaultValue, Validator<T> validator) {\n final WeakKeyImpl<T> p = new WeakKeyImpl<>(name, defaultValue, getTmpStore().size());\n addKey(p);\n return p;\n }", "Multi createMulti();", "@Override\n public String toString() {\n return \"MultiKey\" + Arrays.toString(keys);\n }", "interface WithEncryptionSettingsCollection {\n /**\n * Specifies the encryptionSettingsCollection property: Encryption settings collection used be Azure Disk\n * Encryption, can contain multiple encryption settings per disk or snapshot..\n *\n * @param encryptionSettingsCollection Encryption settings collection used be Azure Disk Encryption, can\n * contain multiple encryption settings per disk or snapshot.\n * @return the next definition stage.\n */\n WithCreate withEncryptionSettingsCollection(EncryptionSettingsCollection encryptionSettingsCollection);\n }", "private Map<K, IndexedDiskElementDescriptor> createInitialKeyMap()\r\n {\r\n Map<K, IndexedDiskElementDescriptor> keyMap = null;\r\n if (maxKeySize >= 0)\r\n {\r\n if (this.diskLimitType == DiskLimitType.COUNT)\r\n {\r\n keyMap = new LRUMapCountLimited(maxKeySize);\r\n }\r\n else\r\n {\r\n keyMap = new LRUMapSizeLimited(maxKeySize);\r\n }\r\n\r\n log.info(\"{0}: Set maxKeySize to: \\\"{1}\\\"\", logCacheName, maxKeySize);\r\n }\r\n else\r\n {\r\n // If no max size, use a plain map for memory and processing efficiency.\r\n keyMap = new HashMap<>();\r\n // keyHash = Collections.synchronizedMap( new HashMap() );\r\n log.info(\"{0}: Set maxKeySize to unlimited\", logCacheName);\r\n }\r\n\r\n return keyMap;\r\n }", "public void setDefault(String key){\n _default = key;\n }", "String getSettingByKey(String key, String defaultValue);", "@Override\r\n public void configure(Map<String, ?> configs, boolean isKey) {\n \r\n }", "@Test\n\tpublic void addOtherKeys() {\n\t\tRsaKeyStore ks = new RsaKeyStore();\n\t\tKeyPair kp = RsaHelper.generateKeyPair();\n\t\tassertTrue(\"should have added key\", ks.addOtherKey(\"firstOther\", kp.getPublic()));\n\t\tKeyPair kpp = RsaHelper.generateKeyPair();\n\t\tassertTrue(\"should have added key\", ks.addOtherKey(\"secondOther\", kpp.getPublic()));\n\t}", "public MyKeyAdapter() {\r\n super();\r\n }", "public IntegrationRuntimeRegenerateKeyParameters() {\n }", "public PlayerTwoKeys() {\r\n\t\tsuper(createAlternates());\r\n\t}", "void createPropertyKeyToken( String key, int id );", "UserSettings store(String key, String value);", "String[] supportedKeys();", "protected IotdmSimpleConfigBuilder(PluginSimpleConfig config) {\n this.builder = new PluginSimpleConfigBuilder();\n List<KeyValList> copy = new LinkedList<>();\n for (KeyValList kv : config.getKeyValList()) {\n KeyValListBuilder builder = new KeyValListBuilder();\n builder.setCfgKey(kv.getCfgKey());\n builder.setCfgVal(kv.getCfgVal());\n copy.add(builder.build());\n }\n\n this.builder.setKeyValList(copy);\n }", "MQTTConfiguration(String keyInFile, String defaultValue, Class<?> dataType) {\n // We need to pass the enum name as the identifier : therefore this.name()\n this.metaProperties = new ImmutableMetaProperties(this.name(), keyInFile, defaultValue, dataType);\n }", "public DsAkSettings()\n {\n values_ = Arrays.copyOf(settingsDefaults_, settingsDefaults_.length);\n }", "@Test\n public void testSameKeyAccessDiffCacheMulti()\n {\n doStressTest(\"IdxTestSKADCM\", getCacheName0(), getCacheName1(),\n IdentityExtractor.INSTANCE,\n new CompositeKeyCreator()\n {\n public CompositeKey getCompositeKey(Object oKeyNatural, NamedCache cache)\n {\n return new CompositeKey(oKeyNatural, oKeyNatural);\n }\n },\n /*nServers*/3, /*cRollingRestart*/0);\n }", "public MEKeyTool() {\n keystore = new PublicKeyStoreBuilderBase();\n }", "private void initUserSetting() {\n\n List<String> instantly = new ArrayList<String>();\n instantly.add(PostActivityPlugin.ID);\n instantly.add(ActivityCommentPlugin.ID);\n instantly.add(ActivityMentionPlugin.ID);\n instantly.add(LikePlugin.ID);\n instantly.add(RequestJoinSpacePlugin.ID);\n instantly.add(SpaceInvitationPlugin.ID);\n instantly.add(RelationshipReceivedRequestPlugin.ID);\n instantly.add(PostActivitySpaceStreamPlugin.ID);\n \n List<String> daily = new ArrayList<String>();\n daily.add(PostActivityPlugin.ID);\n daily.add(ActivityCommentPlugin.ID);\n daily.add(ActivityMentionPlugin.ID);\n daily.add(LikePlugin.ID);\n daily.add(RequestJoinSpacePlugin.ID);\n daily.add(SpaceInvitationPlugin.ID);\n daily.add(RelationshipReceivedRequestPlugin.ID);\n daily.add(PostActivitySpaceStreamPlugin.ID);\n daily.add(NewUserPlugin.ID);\n \n List<String> weekly = new ArrayList<String>();\n weekly.add(PostActivityPlugin.ID);\n weekly.add(ActivityCommentPlugin.ID);\n weekly.add(ActivityMentionPlugin.ID);\n weekly.add(LikePlugin.ID);\n weekly.add(RequestJoinSpacePlugin.ID);\n weekly.add(SpaceInvitationPlugin.ID);\n weekly.add(RelationshipReceivedRequestPlugin.ID);\n weekly.add(PostActivitySpaceStreamPlugin.ID);\n \n List<String> webNotifs = new ArrayList<String>();\n webNotifs.add(NewUserPlugin.ID);\n webNotifs.add(PostActivityPlugin.ID);\n webNotifs.add(ActivityCommentPlugin.ID);\n webNotifs.add(ActivityMentionPlugin.ID);\n webNotifs.add(LikePlugin.ID);\n webNotifs.add(RequestJoinSpacePlugin.ID);\n webNotifs.add(SpaceInvitationPlugin.ID);\n webNotifs.add(RelationshipReceivedRequestPlugin.ID);\n webNotifs.add(PostActivitySpaceStreamPlugin.ID);\n \n // root\n saveSetting(instantly, daily, weekly, webNotifs, rootIdentity.getRemoteId());\n\n // mary\n saveSetting(instantly, daily, weekly, webNotifs, maryIdentity.getRemoteId());\n\n // john\n saveSetting(instantly, daily, weekly, webNotifs, johnIdentity.getRemoteId());\n\n // demo\n saveSetting(instantly, daily, weekly, webNotifs, demoIdentity.getRemoteId());\n }", "@Test\n public void reuseKeys() throws Exception {\n VolatileLookUpTable.Builder<IntOption> builder = new VolatileLookUpTable.Builder<>();\n LookUpKey key = key();\n\n key.add(new IntOption(100));\n builder.add(key, new IntOption(100));\n key.reset();\n\n key.add(new IntOption(101));\n builder.add(key, new IntOption(101));\n key.reset();\n\n key.add(new IntOption(102));\n builder.add(key, new IntOption(102));\n key.reset();\n\n LookUpTable<IntOption> table = builder.build();\n assertThat(sort(table.get(key(100))), is(values(100)));\n assertThat(sort(table.get(key(101))), is(values(101)));\n assertThat(sort(table.get(key(102))), is(values(102)));\n }", "@Override\n default String getKey(){\n return key();\n }", "String getSettingByKey(HawkularUser user, String key);", "private void useDefaultMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_useDefaultMenuItemActionPerformed\n\n keyInfoUserTextField.setText(DEFAULT_API_KEY);\n keySearchPhotoTextField.setText(DEFAULT_API_KEY);\n keySearchUserTextField.setText(DEFAULT_API_KEY);\n keygetGroupsTextFIeld.setText(DEFAULT_API_KEY);\n unuseDefaultKeyMenuItem.setEnabled(true);\n useDefaultMenuItem.setEnabled(false);\n }", "public HashMultiSet() {\n\t\tmultiSet = new HashMap<>();\n\t}", "@Override\n public void configure(Map<String, ?> configs, boolean isKey) {\n }", "KeyIdPair createKeyIdPair();", "private void addDefaultConfig(String clientNameParameter, Map<String, String> properties) {\n if (clientNameParameter != null && clientNameParameter.contains(SAML2Client.class.getSimpleName())) {\n properties.put(PropertiesConstants.SAML_KEYSTORE_PATH,\n keystoreService.getKeystorePath());\n\n try {\n properties.put(SAML2ClientConfigurationDecorator.KEYSTORE_TYPE,\n keystoreService.getKeystoreForGateway().getType());\n } catch (final KeystoreServiceException e) {\n log.errorFetchingKeystoreType(e);\n }\n\n // check for provisioned alias for keystore password\n char[] giksp = null;\n try {\n giksp = aliasService.getGatewayIdentityKeystorePassword();\n } catch (AliasServiceException e) {\n log.noKeystorePasswordProvisioned(e);\n }\n if (giksp == null) {\n // no alias provisioned then use the master\n giksp = masterService.getMasterSecret();\n }\n properties.put(PropertiesConstants.SAML_KEYSTORE_PASSWORD, new String(giksp));\n\n // check for provisioned alias for private key\n char[] gip = null;\n try {\n gip = aliasService.getGatewayIdentityPassphrase();\n }\n catch(AliasServiceException ase) {\n log.noPrivateKeyPasshraseProvisioned(ase);\n }\n if (gip == null) {\n // no alias provisioned then use the master\n gip = masterService.getMasterSecret();\n }\n properties.put(PropertiesConstants.SAML_PRIVATE_KEY_PASSWORD, new String(gip));\n }\n }", "public ContentKey() {}", "private List<String> splitCommaSeparatedString(String defaults) {\r\n\t\tString[] split = defaults.split(\",\");\r\n\t\tList<String> keyList = new LinkedList<String>();\r\n\t\tfor (int i = 0; i < split.length; i++) {\r\n\t\t\tkeyList.add(split[i].trim());\r\n\t\t}\r\n\t\treturn keyList;\r\n\t}", "private DataKeys(String pKey) {\n key = pKey;\n }", "String setKey(String newKey);", "private void initKey() {\n String del = \":\";\n byte[] key;\n if (MainGame.applicationType == Application.ApplicationType.Android) {\n key = StringUtils.rightPad(Build.SERIAL + del + Build.ID + del, 32, \"~\").getBytes();\n } else if (MainGame.applicationType == Application.ApplicationType.Desktop) {\n key = new byte[]{0x12, 0x2d, 0x2f, 0x6c, 0x1f, 0x7a, 0x4f, 0x10, 0x48, 0x56, 0x17, 0x4b, 0x4f, 0x48, 0x3c, 0x17, 0x04, 0x06, 0x4b, 0x6d, 0x1d, 0x68, 0x4b, 0x52, 0x50, 0x50, 0x1f, 0x06, 0x29, 0x68, 0x5c, 0x65};\n } else {\n key = new byte[]{0x77, 0x61, 0x6c, 0x0b, 0x04, 0x5a, 0x4f, 0x4b, 0x65, 0x48, 0x52, 0x68, 0x1f, 0x1d, 0x3c, 0x4a, 0x5c, 0x06, 0x1f, 0x2f, 0x12, 0x32, 0x50, 0x19, 0x3c, 0x52, 0x04, 0x17, 0x48, 0x4f, 0x6d, 0x4b};\n }\n for (int i = 0; i < key.length; ++i) {\n key[i] = (byte) ((key[i] << 2) ^ magic);\n }\n privateKey = key;\n }", "public interface Keys {\n\n String PUBLIC_REPOS = \"repos\";\n String USER = \"user\";\n String ID = \"id\";\n}", "UserSettings store(HawkularUser user, String key, String value);", "@Override\n\tpublic void configure(Map<String, ?> configs, boolean isKey) {\n\t}", "public Builder defaultSparseFieldsProvider(ResourcePathsProvider defaultSparseFieldsProvider) {\n\t\t\tthis.defaultSparseFieldsProvider = defaultSparseFieldsProvider;\n\t\t\treturn this.me();\n\t\t}", "private void appendKeyGeneratorSettings() {\n Label keyGeneratorSettings = new Label(Localization.lang(\"Key generator settings\"));\n keyGeneratorSettings.getStyleClass().add(\"sectionHeader\");\n builder.add(keyGeneratorSettings, 1, 10);\n builder.add(autoGenerateOnImport, 1, 11);\n builder.add(letterStartA, 2, 11);\n builder.add(warnBeforeOverwriting, 1, 12);\n builder.add(letterStartB, 2, 12);\n builder.add(dontOverwrite, 1, 13);\n builder.add(alwaysAddLetter, 2, 13);\n builder.add(generateOnSave, 1, 14);\n\n builder.add((new Label(Localization.lang(\"Replace (regular expression)\") + ':')), 1, 15);\n builder.add(new Label(Localization.lang(\"by\") + ':'), 2, 15);\n\n builder.add(keyPatternRegex, 1, 16);\n builder.add(keyPatternReplacement, 2, 16);\n\n dontOverwrite.setOnAction(e ->\n // Warning before overwriting is only relevant if overwriting can happen:\n warnBeforeOverwriting.setDisable(dontOverwrite.isSelected()));\n }", "public abstract String[] getDefaultValues();", "@Test public void keyDefinition() {\n fail( \"Not yet implemented\" );\n }", "StringArraySetting(Properties defaultProps, Properties props, String key, \n String[] defaultValue) {\n\t\tsuper(defaultProps, props, key, decode(defaultValue), null);\n\t}", "public interface LocalCachConfigKey {\n String localCacheMaxSize = \"localCacheMaxSize\";\n String localCacheExpireTime = \"localCacheExpireTime\";\n String localCacheEnableStat = \"localCacheEnableStat\";\n String localCacheStatInterval = \"localCacheStatInterval\";\n}", "@Test\n public void DefaultConfig() {\n ConfigHolder configHolder = ConfigHolder.getInstance();\n JWTGenerator jwtGenerator = JWTGenerator.newBuilder()\n .setEnable(true)\n .addKeypairs(Keypair.newBuilder()\n .setPublicCertificatePath(certPath)\n .setUseForSigning(true)\n .buildPartial())\n .build();\n ConfigHolder.load(Config.newBuilder().setJwtGenerator(jwtGenerator).buildPartial());\n Assert.assertTrue(\"JWT Configuration wasn't enabled\",\n configHolder.getConfig().getJwtConfigurationDto().isEnabled());\n Assert.assertEquals(\"Failed to generate single JWKS\", 1, configHolder.getConfig()\n .getBackendJWKSDto().getJwks().getKeys().size());\n }", "public KeyNamePair() {\r\n this.key = \"\";\r\n this.name = \"\";\r\n }", "private void makeMainKeys() {\n mainKeys = getKeys(mainRaw);\n \n for(NameValue<String,String> nv : mainKeys) {\n if(nv.getName().equals(GENERATED_HELP)) {\n isGeneratedHelp = Boolean.parseBoolean(nv.getValue());\n mainKeys.remove(nv);\n break;\n }\n }\n }", "@Override\n public void configure(Map<String, ?> configs, boolean isKey) {\n }", "public static CacheKey newInstance(Class type, Object... pks) {\n return new ManyCacheKey(type, pks);\n }", "@Test\n\tpublic void configMaximalS3AndDelegateTypes() throws Exception {\n\t\tfinal Map<String, String> cfg = MapBuilder.<String, String>newHashMap()\n\t\t\t\t.with(\"mongodb-host\", \" somehost \")\n\t\t\t\t.with(\"mongodb-database\", \" somedb \")\n\t\t\t\t.with(\"mongodb-type-database\", \"this should be overridden\")\n\t\t\t\t.with(\"type-delegation-target\", \" http://localhost:12345 \")\n\t\t\t\t.with(\"mongodb-retrywrites\", \" true \")\n\t\t\t\t.with(\"temp-dir\", \" temp \")\n\t\t\t\t.with(\"dont-trust-x-ip-headers\", \" true \")\n\t\t\t\t.with(\"auth2-service-url\", \" \" + CI_SERV + \"auth \")\n\t\t\t\t.with(\"mongodb-user\", \" muser \")\n\t\t\t\t.with(\"mongodb-pwd\", \" mpwd \")\n\t\t\t\t.with(\"ws-admin\", \" wsadminuser \")\n\t\t\t\t.with(\"auth2-ws-admin-read-only-roles\", \" role1, , role2 , \")\n\t\t\t\t.with(\"auth2-ws-admin-full-roles\", \" role3, , role4 , \")\n\t\t\t\t.with(\"backend-type\", \" S3 \")\n\t\t\t\t.with(\"backend-url\", \" http://localhost:34567 \")\n\t\t\t\t.with(\"backend-user\", \" someuser \")\n\t\t\t\t.with(\"backend-token\", \" token token token \")\n\t\t\t\t.with(\"backend-container\", \" mahbukkit \")\n\t\t\t\t.with(\"backend-region\", \" a-lovely-region \")\n\t\t\t\t.with(\"backend-trust-all-ssl-certificates\", \" true \")\n\t\t\t\t.with(\"handle-service-token\", \" hstoken \")\n\t\t\t\t.with(\"handle-manager-token\", \" hmtoken \") // test service takes precedence\n\t\t\t\t.with(\"handle-manager-url\", \" \" + CI_SERV + \"handle_mngr \")\n\t\t\t\t.with(\"handle-service-url\", \" \" + CI_SERV + \"handle_service \")\n\t\t\t\t.with(\"bytestream-url\", \" \" + CI_SERV + \"shock-api2 \")\n\t\t\t\t.with(\"bytestream-user\", \" otheruser \")\n\t\t\t\t.with(\"bytestream-token\", \" token token \")\n\t\t\t\t.with(\"sample-service-url\", \" \" + CI_SERV + \"sample_service2 \")\n\t\t\t\t.with(\"sample-service-administrator-token\", \" sstoken2 \")\n\t\t\t\t.with(\"listeners\", \"listener1, , listener2 , \")\n\t\t\t\t.with(\"listener-listener1-class\", \" us.kbase.MyListener \")\n\t\t\t\t.with(\"listener-listener1-config-key1\", \"value1\")\n\t\t\t\t.with(\"listener-listener1-config-key2\", \"value2\")\n\t\t\t\t.with(\"listener-listener2-class\", \" us.kbase.MyListener2 \")\n\t\t\t\t.with(\"listener-listener2-config-key1\", \"value3\")\n\t\t\t\t.build();\n\t\t\n\t\tfinal String paramReport =\n\t\t\t\t\"mongodb-host=somehost\\n\" +\n\t\t\t\t\"mongodb-database=somedb\\n\" +\n\t\t\t\t\"type-delegation-target=http://localhost:12345\\n\" +\n\t\t\t\t\"mongodb-retrywrites=true\\n\" +\n\t\t\t\t\"mongodb-user=muser\\n\" +\n\t\t\t\t\"auth2-service-url=\" + CI_SERV + \"auth\\n\" +\n\t\t\t\t\"dont-trust-x-ip-headers=true\\n\" +\n\t\t\t\t\"auth2-ws-admin-read-only-roles=role1, , role2 ,\\n\" +\n\t\t\t\t\"auth2-ws-admin-full-roles=role3, , role4 ,\\n\" +\n\t\t\t\t\"backend-type=S3\\n\" +\n\t\t\t\t\"backend-url=http://localhost:34567\\n\" +\n\t\t\t\t\"backend-user=someuser\\n\" + \n\t\t\t\t\"backend-region=a-lovely-region\\n\" +\n\t\t\t\t\"backend-container=mahbukkit\\n\" +\n\t\t\t\t\"backend-trust-all-ssl-certificates=true\\n\" +\n\t\t\t\t\"handle-service-url=\" + CI_SERV + \"handle_service\\n\" +\n\t\t\t\t\"bytestream-url=\" + CI_SERV + \"shock-api2\\n\" +\n\t\t\t\t\"bytestream-user=otheruser\\n\" +\n\t\t\t\t\"sample-service-url=\" + CI_SERV +\"sample_service2\\n\" +\n\t\t\t\t\"mongodb-pwd=[redacted for your safety and comfort]\\n\" +\n\t\t\t\t\"listeners=us.kbase.MyListener,us.kbase.MyListener2\\n\";\n\t\t\n\t\tassertConfigCorrect(\n\t\t\t\tcfg,\n\t\t\t\tnew ExpectedConfig()\n\t\t\t\t\t\t.withAuth2URL(new URL(CI_SERV + \"auth\"))\n\t\t\t\t\t\t.withDontTrustXIPHeaders(true)\n\t\t\t\t\t\t.withAdminReadOnlyRoles(set(\"role1\", \"role2\"))\n\t\t\t\t\t\t.withAdminRoles(set(\"role3\", \"role4\"))\n\t\t\t\t\t\t.withWorkspaceAdmin(\"wsadminuser\")\n\t\t\t\t\t\t.withMongohost(\"somehost\")\n\t\t\t\t\t\t.withMongoDBname(\"somedb\")\n\t\t\t\t\t\t.withTypeDelegationTarget(new URL(\"http://localhost:12345\"))\n\t\t\t\t\t\t.withMongoRetryWrites(true)\n\t\t\t\t\t\t.withMongoUser(\"muser\")\n\t\t\t\t\t\t.withMongoPwd(\"mpwd\")\n\t\t\t\t\t\t.withListenerConfigs(Arrays.asList(\n\t\t\t\t\t\t\t\tnew ListenerConfig(\"us.kbase.MyListener\",\n\t\t\t\t\t\t\t\t\t\tImmutableMap.of(\"key1\", \"value1\", \"key2\", \"value2\")),\n\t\t\t\t\t\t\t\tnew ListenerConfig(\"us.kbase.MyListener2\",\n\t\t\t\t\t\t\t\t\t\tImmutableMap.of(\"key1\", \"value3\"))))\n\t\t\t\t\t\t.withBackendType(BackendType.S3)\n\t\t\t\t\t\t.withBackendURL(new URL(\"http://localhost:34567\"))\n\t\t\t\t\t\t.withBackendUser(\"someuser\")\n\t\t\t\t\t\t.withBackendToken(\"token token token\")\n\t\t\t\t\t\t.withBackendContainer(\"mahbukkit\")\n\t\t\t\t\t\t.withBackendRegion(Region.of(\"a-lovely-region\"))\n\t\t\t\t\t\t.withBackendTrustAllCerts(true)\n\t\t\t\t\t\t.withHandleServiceURL(new URL(CI_SERV + \"handle_service\"))\n\t\t\t\t\t\t.withHandleServiceToken(\"hstoken\")\n\t\t\t\t\t\t.withBytestreamURL(new URL(CI_SERV + \"shock-api2\"))\n\t\t\t\t\t\t.withBytestreamUser(\"otheruser\")\n\t\t\t\t\t\t.withBytestreamToken(\"token token\")\n\t\t\t\t\t\t.withSampleServiceURL(new URL(CI_SERV + \"sample_service2\"))\n\t\t\t\t\t\t.withSampleServiceToken(\"sstoken2\")\n\t\t\t\t\t\t.withTempDir(\"temp\")\n\t\t\t\t\t\t.withParamReport(paramReport)\n\t\t\t\t);\n\t}", "public interface SecondaryMultiKeyCreator {\r\n\r\n\t/**\r\n\t * Javadoc for this public method is generated via the doc templates in the\r\n\t * doc_src directory.\r\n\t */\r\n\tpublic void createSecondaryKeys(SecondaryDatabase secondary,\r\n\t\t\tDatabaseEntry key, DatabaseEntry data, Set results)\r\n\t\t\tthrows DatabaseException;\r\n}", "public LazyKeyManager(Configuration config, KeyManager prevMgr) {\n super(config);\n keyList = prevMgr.keyList;\n }", "@Test\n public void testClusterKeyWithMultiplePorts() throws Exception {\n testKey(\"server1:2182\", 2181, \"/hbase\", true);\n // multiple servers have their own port\n testKey(\"server1:2182,server2:2183,server3:2184\", 2181, \"/hbase\", true);\n // one server has no specified port, should use default port\n testKey(\"server1:2182,server2,server3:2184\", 2181, \"/hbase\", true);\n // the last server has no specified port, should use default port\n testKey(\"server1:2182,server2:2183,server3\", 2181, \"/hbase\", true);\n // multiple servers have no specified port, should use default port for those servers\n testKey(\"server1:2182,server2,server3:2184,server4\", 2181, \"/hbase\", true);\n // same server, different ports\n testKey(\"server1:2182,server1:2183,server1\", 2181, \"/hbase\", true);\n // mix of same server/different port and different server\n testKey(\"server1:2182,server2:2183,server1\", 2181, \"/hbase\", true);\n }", "private void configureKeys(String accountName) {\n\t\t// accountName's public key\n\t\tString line = ComMethods.getValueFor(accountName, pubkeysfn);\n\t\tint x = line.indexOf(',');\n\t\tmy_n = new BigInteger(line.substring(0,x));\n\t\tmy_e = new Integer(line.substring(x+1,line.length()));\n\n\t\t// accountName's private key\n\t\tline = ComMethods.getValueFor(accountName, privkeysfn);\n\t\tx = line.indexOf(',');\n\t\tmy_d = new BigInteger(line.substring(x+1,line.length()));\n\t\t\t\n\t\t// SecretServer's public key\n\t\tline = ComMethods.getValueFor(\"SecretServer\", pubkeysfn);\n\t\tx = line.indexOf(',');\n\t\tserv_n = new BigInteger(line.substring(0,x));\n\t\tserv_e = new Integer(line.substring(x+1,line.length()));\n\t}", "void setKey(String key);", "private SankeyElementOptionsFactory(String elementKeyAsString) {\n\t\t\tsuper(elementKeyAsString);\n\t\t}", "public static void initMatchKey() {\n matchKey = mTeamNum + \"-\" + \"Q\" + mMatchNum + \"-\" + mScoutid;\n }", "@Test\n\tpublic void testGroupNumerousKeysValues() {\n\t\tint max = 1000;\n\t\tint oldsize = 0;\n\t\tint newsize = 0;\n\t\tString valueTemp = \"\";\n\t\tStringBuilder sBuilder = new StringBuilder();\n\n\t\tfor (int i = 0; i < 2000; i++) {\n\t\t\tsBuilder = sBuilder.append('a');\n\t\t}\n\n\t\tvalueTemp = sBuilder.toString();\n\n\t\ttry {\n\t\t\toldsize = VintageConfigWebUtils.lookup(groupString).size();\n\t\t\tVintageConfigWebUtils.batchregister(groupString, keyString, valueTemp, 1, max);\n\n\t\t\tnewsize = VintageConfigWebUtils.lookup(groupString).size();\n\t\t\tSystem.out.print(oldsize + max);\n\t\t\tSystem.out.print(\"newsize:\" + newsize);\n\t\t\tassertEquals(oldsize + max, newsize);\n\n\t\t\tfor (int i = 0; i < max; i++) {\n\t\t\t\tList<String> nodesList = VintageConfigWebUtils.lookup(groupString, keyString+i);\n\t\t\t\tString nodevalue = getValueFromConfigNode(nodesList.get(0));\n\t\t\t\tassertEquals(nodevalue, valueTemp+i);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\tSystem.out.print(e.getMessage());\n\t\t\tfail(\"error in testGroupNumerousKeys\");\n\t\t} finally {\n\t\t\tVintageConfigWebUtils.batchunregister(groupString, keyString, 0, max);\n\t\t\tassertEquals(oldsize, VintageConfigWebUtils.lookup(groupString).size());\n\t\t}\n\t}", "public FuncTestKey() {\n super();\n }", "@Override\n\tprotected CacheKey createCacheKey(String key) {\n\t\treturn new ConfigCacheKey(key);\n\t}", "public KeyGenerator(SinglyLinkedList wList) {\n generateKey(wList);\n }", "private void initializeKeyPairs() \r\n \t //@ requires nonRepKeyPair |-> _ &*& authKeyPair |-> _ &*& basicKeyPair |-> _;\r\n \t /*@ ensures nonRepKeyPair |-> ?theNonRepKeyPair &*& theNonRepKeyPair != null &*&\r\n\t \t authKeyPair |-> ?theAuthKeyPair &*& theAuthKeyPair != null &*&\r\n\t \t basicKeyPair |-> ?theBasicKeyPair &*& theBasicKeyPair != null;\r\n\t @*/\r\n\t{\r\n\t\t/*\r\n\t\t * basicKeyPair is static (so same for all applets) so only allocate\r\n\t\t * memory once\r\n\t\t */\r\n\t\tif (EidCard.basicKeyPair != null && authKeyPair != null && nonRepKeyPair != null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tbasicKeyPair = new KeyPair(KeyPair.ALG_RSA_CRT, (short) 1024);\r\n\t\tbasicKeyPair.genKeyPair();\r\n\t\t\r\n\t\tauthKeyPair = new KeyPair(KeyPair.ALG_RSA_CRT, (short) (1024));\r\n\t\tauthKeyPair.genKeyPair();\r\n\t\t\r\n\t\t\r\n\t\r\n\t\t//authPrivateKey = (RSAPrivateCrtKey) KeyBuilder.buildKey(KeyBuilder.TYPE_RSA_CRT_PRIVATE, KeyBuilder.LENGTH_RSA_1024, false);\r\n\t\t\r\n\r\n\t\tnonRepKeyPair = new KeyPair(KeyPair.ALG_RSA_CRT, (short) (1024));\r\n\t\tnonRepKeyPair.genKeyPair();\r\n\t\r\n\t\t//nonRepPrivateKey = (RSAPrivateCrtKey) KeyBuilder.buildKey(KeyBuilder.TYPE_RSA_CRT_PRIVATE, KeyBuilder.LENGTH_RSA_1024, false);\r\n\t}", "private com.hps.july.persistence.SuperRegionKey keyFromFields ( int f0 ) {\n com.hps.july.persistence.SuperRegionKey keyClass = new com.hps.july.persistence.SuperRegionKey();\n keyClass.supregid = f0;\n return keyClass;\n }", "@Override\n public void overrideSettings(final String... keyvalues) {\n super.overrideSettings(keyvalues);\n if (mListMenuContainer == null || mListMenu == null) { // frankie, \n initializePopup();\n } else {\n overridePreferenceAccessibility();\n }\n mListMenu.overrideSettings(keyvalues);\n\n\t\t// frankie, 2017.08.15, add start \n\t\tif(AGlobalConfig.config_module_VIDEO_MODULE_use_new_settings_en) {\n\t if(mChusSettingsFragment == null) {\n\t createSettingFragment(); // fm.commitAllowingStateLoss -> __lifeCycleCallback.onCreate -> overridePreferenceAccessibility_i\n\t }\n\t\t\telse {\n\t\t\t\toverridePreferenceAccessibility_i();\n\t\t\t}\n\t\t\tif(mChusSettingsFragment != null) {\n\t\t\t\tmChusSettingsFragment.overrideSettings(keyvalues);\n\t\t\t}\n\t\t}\n\t\t// frankie, 2017.08.15, add end\n\t\t\n }", "private static byte[] makeKeyMaterial(TlsContext tlsContext, String index) {\n SSL2CipherSuite cipherSuite = tlsContext.getChooser().getSSL2CipherSuite();\n\n byte[] clearKey = tlsContext.getClearKey();\n\n // The Premaster Secret is equivalent to SECRET-KEY-DATA\n byte[] secretKey = tlsContext.getPreMasterSecret();\n if (clearKey.length != cipherSuite.getClearKeyByteNumber()) {\n // Special DROWN with \"extra clear\" oracle\n int remainingLength =\n secretKey.length - (clearKey.length - cipherSuite.getClearKeyByteNumber());\n secretKey = Arrays.copyOfRange(secretKey, 0, remainingLength);\n }\n\n byte[] masterKey = ArrayConverter.concatenate(clearKey, secretKey);\n return makeKeyMaterial(\n masterKey, tlsContext.getClientRandom(), tlsContext.getServerRandom(), index);\n }", "private com.hps.july.persistence.StoragePlaceKey keyFromFields ( int f0 ) {\n com.hps.july.persistence.StoragePlaceKey keyClass = new com.hps.july.persistence.StoragePlaceKey();\n keyClass.storageplace = f0;\n return keyClass;\n }", "public KeyManager() {\r\n keys = new boolean[256];\r\n }", "private BestLabelKey generateKey(ITopic topic, ITopic theme, boolean strict) {\r\n\t\tif (bestLabelCacheKeys == null) {\r\n\t\t\tbestLabelCacheKeys = HashUtil.getHashMap();\r\n\t\t}\r\n\t\tSet<BestLabelKey> set = bestLabelCacheKeys.get(topic);\r\n\t\tif (set == null) {\r\n\t\t\tset = HashUtil.getHashSet();\r\n\t\t\tbestLabelCacheKeys.put(topic, set);\r\n\t\t}\r\n\t\tBestLabelKey key = new BestLabelKey(topic, theme, strict);\r\n\t\tset.add(key);\r\n\t\treturn key;\r\n\t}" ]
[ "0.7414939", "0.5922558", "0.57706696", "0.5751895", "0.5690292", "0.5596884", "0.559654", "0.55789834", "0.55067426", "0.5478068", "0.547282", "0.5447264", "0.54314864", "0.540093", "0.5386668", "0.5384864", "0.53536355", "0.5350522", "0.5342562", "0.53350973", "0.53033996", "0.52846545", "0.5280227", "0.5255359", "0.5252476", "0.5234751", "0.5216458", "0.520963", "0.5173911", "0.51663905", "0.51627874", "0.51451224", "0.5144667", "0.51301706", "0.5110241", "0.50973326", "0.50788563", "0.5077366", "0.50697243", "0.50577426", "0.5031156", "0.50224376", "0.50142604", "0.50018775", "0.49967444", "0.499289", "0.49865842", "0.49472508", "0.49464425", "0.49448246", "0.49420077", "0.4941213", "0.49213743", "0.49167383", "0.49122313", "0.4910029", "0.48957035", "0.48920622", "0.4891837", "0.48788586", "0.48739874", "0.48724732", "0.48641178", "0.48561436", "0.485346", "0.48521015", "0.4849876", "0.4847636", "0.4842977", "0.4827417", "0.48239648", "0.48146248", "0.48140392", "0.48056233", "0.47997934", "0.47978374", "0.47977722", "0.47967687", "0.47915745", "0.47908267", "0.47859177", "0.47793522", "0.47756514", "0.47730857", "0.4769309", "0.47593096", "0.47585502", "0.47583184", "0.4757557", "0.47554192", "0.47550797", "0.47533715", "0.47484043", "0.47483814", "0.47452798", "0.47377625", "0.4736814", "0.47345576", "0.47287348", "0.4726639" ]
0.5591802
7
Create a deterministic seed from a private seed and a number
protected MiniData getHashNumberConcat(int zNumber, MiniData zData, int zBitStrength) { MiniData numberdata = new MiniData(BaseConverter.numberToHex(zNumber)); MiniData newdata = numberdata.concat(zData); byte[] hashdata = Crypto.getInstance().hashData(newdata.getData(), zBitStrength); return new MiniData(hashdata); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void new_seed( Seed seed );", "public void seed(long seed) {\n }", "void setSeed(long seed);", "void setSeed(final long seed);", "private String getRandomSeed() {\n long newSeed = 0;\n Random randBoolean = new Random(randomSeed);\n for (int i = 0; i < 48; i++) {\n if (randBoolean.nextBoolean()) {\n newSeed += 1 << i;\n }\n }\n if (newSeed < 0) {\n newSeed = Math.abs(newSeed);\n }\n\n String s = \"\";\n if (newSeed == 0) {\n s += \"0\";\n } else {\n while (newSeed != 0) {\n long num = (newSeed & (0xF));\n if (num < 10) {\n s = num + s;\n } else {\n s = ((char) (num + 55)) + s;\n }\n newSeed = newSeed >> 4;\n }\n }\n return s;\n }", "public void setRNG(long seed);", "String getSeed();", "public void setSeed(int seed){\n this.seed = seed; \n }", "public Random(long seed) {\n real = new UniversalGenerator(seed);\n twister = new MersenneTwister(seed);\n }", "public WB_RandomPoint setSeed(final long seed);", "public XorShiftRandom(final long seed) {\n\t\tthis.seed = seed;\n\t}", "public FlipCoin(int seed){\n this.rander = new Random(seed);\n }", "public Builder<V, E> seed(long seed) {\n this.seed = seed;\n return this;\n }", "public static long getSeed() {\r\n return seed;\r\n }", "public Rng(long seed) {\n\t\tr = new Random(seed);\n\t}", "public int getSeed(){\n return this.seed; \n }", "private PRNG() {\n java.util.Random r = new java.util.Random();\n seed = r.nextInt();\n mersenne = new MersenneTwister(seed);\n }", "private static byte[] genKeyWithSeed(String seed) throws Exception {\n\t\tKeyGenerator kg = KeyGenerator.getInstance(ALGORITHM);\n\t\tkg.init(256, new SecureRandom(seed.getBytes()));\n\n\t\tSecretKey secretKey = kg.generateKey();\n\t\treturn secretKey.getEncoded();\n\t}", "public int getSeed() {\r\n return seed;\r\n }", "public long getSeed()\n {\n return randomSeed;\n }", "public void setSeed(int seed){\n\t\tmyRandom = new Random(seed);\n\t}", "public InternalExternalTour(long seed){\n\t\t\n\t\trandom = new MersenneTwister(seed);\n\t}", "public long getSeed() {\n return seed;\n }", "private void seedCommand(String seed) {\n try {\n _randomSource.setSeed(Long.parseLong(seed));\n } catch (NumberFormatException excp) {\n error(\"Invalid number: %s\", seed);\n System.out.println();\n }\n }", "public static void setSeed(long s) {\r\n seed = s;\r\n random = new Random(seed);\r\n }", "@Override\n public void setSeed(final long seed) {\n if ((seed >= 0) && (seed < LONG_LIMIT)) {\n setSeed((int) seed);\n } else {\n int[] tmp = new int[2];\n tmp[0] = (int) (seed & 0xffffffff);\n tmp[1] = (int) (seed >>> INT_SIZE);\n setSeed(tmp);\n }\n }", "public void setSeed(int seed) {\r\n this.seed = seed;\r\n }", "private static SecureRandomAndPad createSecureRandom() {\n byte[] seed;\n File devRandom = new File(\"/dev/urandom\");\n if (devRandom.exists()) {\n RandomSeed rs = new RandomSeed(\"/dev/urandom\", \"/dev/urandom\");\n seed = rs.getBytesBlocking(20);\n } else {\n seed = RandomSeed.getSystemStateHash();\n }\n return new SecureRandomAndPad(new SecureRandom(seed));\n }", "public DayTradeStrategy(int seed) {\r\n /* If you need some initialization of e.g., instance variables\r\n write here.\r\n */\r\n\r\n fRandom = new Random(seed); // Initialization of random sequence.\r\n }", "@Test\n public void randomSeedNumTest()\n {\n int x = _city.getRandomNum(5);\n int y = _city.getRandomNum(5);\n assertEquals(x, y);\n }", "public long getSeed()\r\n {\r\n return this.randomSeed;\r\n }", "public int getSeed() {\n return seed;\n }", "public int getSeed() {\n return seed;\n }", "public static int genTurnSeed(int numPlayers) {\n\t\tRandom turnRand = new Random();\n\t\treturn turnRand.nextInt(numPlayers)+1;\n\t}", "public void setSeed(long seed) {\n\tif (seed < POW3_33 + 100) {\n\t seed += POW3_33 + 100;\n\t}\n\tseed &= (POW2_53 - 1L);\n\tsetSeedRaw(seed);\n }", "public void setSeedRaw(final long seed) {\n\t// TBD: add check, throw exception\n\tddmuldd(expm2((double) seed - POW3_33, POW3_33), POW3_33_DIV_2, dd1);\n\tdddivd(dd1, POW3_33, dd2);\n\tddmuldd(Math.floor(dd2[0]), POW3_33, dd2);\n\tddsub(dd1, dd2, dd3);\n\td1 = dd3[0];\n }", "public long getSeed(){\n\t\treturn this.seed;\n\t}", "private static byte[] generateSeed() {\n try {\n ByteArrayOutputStream seedBuffer = new ByteArrayOutputStream();\n DataOutputStream seedBufferOut = new DataOutputStream(seedBuffer);\n seedBufferOut.writeLong(System.currentTimeMillis());\n seedBufferOut.writeLong(System.nanoTime());\n seedBufferOut.writeInt(android.os.Process.myPid());\n seedBufferOut.writeInt(Process.myUid());\n seedBufferOut.write(BUILD_FINGERPRINT_AND_DEVICE_SERIAL);\n seedBufferOut.close();\n return seedBuffer.toByteArray();\n } catch (IOException e) {\n throw new SecurityException(\"Failed to generate seed\", e);\n }\n }", "public static void setSeed( long seed ) {\n random = new Random( seed );\n }", "public void seedCommand(String seed) {\r\n try {\r\n _randomSource.setSeed(Long.parseLong(seed));\r\n } catch (NumberFormatException excp) {\r\n error(\"Invalid number: %s\", seed);\r\n }\r\n }", "public GridSimRandom(long seed) {\n random_.setSeed(seed);\n }", "public CellularAutomatonRNG()\n {\n this(DefaultSeedGenerator.getInstance().generateSeed(SEED_SIZE_BYTES));\n }", "public StressChange(long seed) {\n super(seed);\n }", "public long getSeed() {\n\t\treturn seed;\n\t}", "public void setSeed(long seed) {\n real.setSeed(seed);\n twister.setSeed(seed);\n }", "public interface RandomSeed {\n\n\t/**\n\t * @return Uma semente randomica entre 0 e 1 inclusive.\n\t */\n\tpublic double getSeed();\n}", "public void setSeed(final long seed) {\n random.setSeed(seed);\n }", "public void initWorldGenSeed(long p_75905_1_) {\n/* 99 */ this.worldGenSeed = p_75905_1_;\n/* */ \n/* 101 */ if (this.parent != null)\n/* */ {\n/* 103 */ this.parent.initWorldGenSeed(p_75905_1_);\n/* */ }\n/* */ \n/* 106 */ this.worldGenSeed *= (this.worldGenSeed * 6364136223846793005L + 1442695040888963407L);\n/* 107 */ this.worldGenSeed += this.baseSeed;\n/* 108 */ this.worldGenSeed *= (this.worldGenSeed * 6364136223846793005L + 1442695040888963407L);\n/* 109 */ this.worldGenSeed += this.baseSeed;\n/* 110 */ this.worldGenSeed *= (this.worldGenSeed * 6364136223846793005L + 1442695040888963407L);\n/* 111 */ this.worldGenSeed += this.baseSeed;\n/* */ }", "public byte[] newSeed() {\r\n return engineSpi.newSeed();\r\n }", "public static void setSEED(String input) {\n seed = 0;\n int counts = 0;\n boolean unique = false;\n if (input.length() == 0) {\n input = \"23486723462\";\n }\n for (int te = 0; te < input.length(); te++) {\n if (!(input.charAt(te) >= 48 && input.charAt(te) <= 57)) {\n counts++;\n }\n if (counts == input.length()) {\n input = \"23486723462\";\n }\n }\n widthLoc = 20;\n heightLoc = 20;\n String newUp = \"\";\n for (int x = 1; x < input.length() - 1; x++) {\n newUp = newUp + input.charAt(x);\n }\n newUp = input.replaceAll(\"[^\\\\d.]\", \"\");\n if (newUp.length() > 19) {\n newUp = Long.toString((long) (Math.pow(2, 100) - 1));\n }\n seed = Long.parseLong(newUp);\n random = new Random(seed);\n }", "@Test\r\n public void testCreateMyDidSeed() throws SodiumException {\r\n CryptoService instance = new CryptoService();\r\n MyDidInfo did_info_with_seed = new MyDidInfo(\"NcYxiDXkpYi6ov5FcYDi1e\", \"00000000000000000000000000000My1\");\r\n MyDidInfo did_info_without_seed = new MyDidInfo(\"NcYxiDXkpYi6ov5FcYDi1e\", null);\r\n\r\n Pair<Did, Keys> did_with_seed = instance.createMyDid(did_info_with_seed);\r\n Pair<Did, Keys> did_without_seed = instance.createMyDid(did_info_without_seed);\r\n\r\n assertNotEquals(did_with_seed.second.verkey, did_without_seed.second.verkey);\r\n }", "public XxHash(long seed) {\n this.seed = seed;\n }", "public void generateNewSecret() {\r\n \r\n //Get Random Number With Correct Digits\r\n int intRand = randomNumberGenerator.nextInt((int)(Math.pow(10, numDigits) - Math.pow(10, numDigits - 1))) + (int)Math.pow(10, numDigits - 1);\r\n \r\n //Set To String\r\n String strRand = String.valueOf(intRand);\r\n \r\n //Set Value\r\n secretNumber = convertNumToDigitArray(strRand);\r\n \r\n }", "public HashPermute(int seed) {\n\t\tthis.seed = HashFunction.getRandomSeed(seed);\n\t}", "public void setSeed(String seed) \n\t{\n\t}", "protected final long seedRoll() {\r\n Long time = System.currentTimeMillis();\r\n String hexSeed = String.format(\"%x\", new BigInteger(1, mGame.getSeed().getBytes()));\r\n Long seed = Long.parseLong(hexSeed, 16);\r\n\r\n return time + seed;\r\n }", "public void setRandomSeed(long seed) {\n randomGenerator.setSeed(seed);\n }", "public String getSeed() {\n return m_randomSeed;\n }", "public CellularAutomatonRNG(byte[] seed)\n {\n if (seed == null || seed.length != SEED_SIZE_BYTES)\n {\n throw new IllegalArgumentException(\"Cellular Automaton RNG requires a 32-bit (4-byte) seed.\");\n }\n this.seed = seed.clone();\n\n // Set initial cell states using seed.\n cells[AUTOMATON_LENGTH - 1] = seed[0] + 128;\n cells[AUTOMATON_LENGTH - 2] = seed[1] + 128;\n cells[AUTOMATON_LENGTH - 3] = seed[2] + 128;\n cells[AUTOMATON_LENGTH - 4] = seed[3] + 128;\n\n int seedAsInt = BinaryUtils.convertBytesToInt(seed, 0);\n if (seedAsInt != 0xFFFFFFFF)\n {\n seedAsInt++;\n }\n for (int i = 0; i < AUTOMATON_LENGTH - 4; i++)\n {\n cells[i] = 0x000000FF & (seedAsInt >> (i % 32));\n }\n\n // Evolve automaton before returning integers.\n for (int i = 0; i < AUTOMATON_LENGTH * AUTOMATON_LENGTH / 4; i++)\n {\n next(32);\n }\n }", "public static UUID\n murmerhash3 (\n UUID key,\n long seed\n ) {\n long msb = key.getMostSignificantBits();\n long lsb = key.getLeastSignificantBits();\n byte[] data = new byte[8];\n data[7] = (byte)(lsb & 0xFF);\n data[6] = (byte)((lsb >> 8) & 0xFF);\n data[5] = (byte)((lsb >> 16) & 0xFF);\n data[4] = (byte)((lsb >> 24) & 0xFF);\n data[3] = (byte)(msb & 0xFF);\n data[2] = (byte)((msb >> 8) & 0xFF);\n data[1] = (byte)((msb >> 16) & 0xFF);\n data[0] = (byte)((msb >> 24) & 0xFF);\n\n int nblocks = 2;\n long h1 = seed;\n long h2 = seed;\n long c1 = 0x87c37b91114253d5l;\n long c2 = 0x4cf5ad432745937fl;\n long[] blocks = new long[nblocks];\n blocks[0] = msb;\n blocks[1] = lsb;\n for(int i = 0; i < nblocks; i++)\n {\n long k1 = blocks[i*2+0];\n long k2 = blocks[i*2+1];\n k1 *= c1; k1 = rotl64(k1, 31); k1 *= c2; h1 ^= k1;\n h1 = rotl64(h1, 27); h1 += h2; h1 = h1*5+0x52dce729;\n k2 *= c2; k2 = rotl64(k2, 33); k2 *= c1; h2 ^= k2;\n h2 = rotl64(h2,31); h2 += h1; h2 = h2*5+0x38495ab5;\n }\n h1 ^= 2; h2 ^= 2;\n h1 += h2;\n h2 += h1;\n h1 = fmix64(h1);\n h2 = fmix64(h2);\n h1 += h2;\n h2 += h1;\n return new UUID(h2, h1);\n }", "private static int initialiseSeed(String seedString) {\n \tint randomSeed = 0;\n\t\ttry {\n \trandomSeed = Integer.parseInt(seedString);\n \t}\n \tcatch(Exception e){\n \t\tSystem.out.println(\"Please pass the value for random seed as an integer number.\");\n\t\t\texitArgumentError();\n \t}\n\t\treturn randomSeed;\n\t}", "private int generateSecret() {\n int secret = secretGenerator.nextInt();\n while (secretToNumber.containsKey(secret)) {\n secret = secretGenerator.nextInt();\n }\n return secret;\n }", "public void setSeed(int seed) {\n this.seed = seed;\n mersenne = new MersenneTwister(seed);\n }", "@Override\n public Builder seed(long randomSeed) {\n super.seed(randomSeed);\n return this;\n }", "public static void nextNumber(int iter, int seed)\r\n {\r\n if(iter == 0) {return;}\r\n System.out.println(String.format(\"%d\\t%d\",seed,seed%2));\r\n nextNumber(iter - 1, (int)Math.pow(seed,2) % (p * q));\r\n }", "public byte[] getSeed() {\n return seed;\n }", "public void setSeed(byte[] value) {\n this.seed = ((byte[]) value);\n }", "public int getSeed()\n {\n return map.getSeed();\n }", "@ProgrammaticProperty\n public void setSeed(String seed) {\n m_randomSeed = seed;\n }", "public CellularAutomatonRNG(SeedGenerator seedGenerator) throws SeedException\n {\n this(seedGenerator.generateSeed(SEED_SIZE_BYTES));\n }", "abstract Truerandomness newInstance();", "String createSessionId(long seedTerm);", "public final void seed(int s0, int s1, int s2)\r\n {\r\n d0 = s0;\r\n d1 = s1;\r\n d2 = s2;\r\n i = 0;\r\n }", "public Mazealgo(long seed) {\n this.seed = seed;\n this.random = new Random(seed);\n }", "public static SecretKeySpec key_from_seed(byte[] seed) {\n\t// compute SHA-1 hash of the seed\n\tbyte[] hashval = null;\n\ttry {\n\t MessageDigest sha1 = MessageDigest.getInstance(\"SHA1\");\n\t hashval = sha1.digest(seed);\n\t}\n\tcatch (Exception e) {\n\t e.printStackTrace();\n\t}\n\n\t// extract 1st AES_KEY_LEN bytes for the key material\n\tbyte[] key = new byte[AES_KEY_LEN];\n\tSystem.arraycopy(hashval, 0, key, 0, AES_KEY_LEN);\n\n\t// initialize the key\n\tSecretKeySpec keySpec = new SecretKeySpec(key, \"AES\");\n\treturn keySpec;\n }", "public ScenarioGenerator(long seed) {\n rd.setSeed(seed);\n }", "public int getRandomPositiveInt(){\r\n long gen = (a*seed+c)%m;\r\n seed = gen;\r\n return (int)gen;\r\n }", "public TooLargeTooSmall(Integer seed)\n {\n // initialise instance variables\n chosenNum = seed;\n }", "public final void randomSeed(long what){\n\t\tsetSeed(what);\n\t\trandom();\n\t}", "protected ImsInteger createRandomTestNumber(ImsInteger modulus){\r\n\t\t\r\n\t\t// get a random number\r\n\t\tImsInteger testNumber = new ImsInteger(modulus.bitLength(), new Random());\r\n\t\t\r\n\t\t// assure that it is positive and smaller modulus\r\n\t\ttestNumber = testNumber.mod(modulus);\r\n\t\t\r\n\t\t// assure that it is non zero\r\n\t\tif(testNumber.compareTo(ImsInteger.ZERO)==0){\r\n\t\t\ttestNumber = modulus.subtract(ImsInteger.ONE);\r\n\t\t}\r\n\t\treturn testNumber;\r\n\t}", "public static void main(String[] args) {\n\t\tRandom r=new Random();\n\t\tr.setSeed(10000000);\n\t\tSystem.out.println(r.nextInt());\n\t}", "public static UUID\n simpleUUIDHash(UUID key, long seed) {\n return new UUID(key.getMostSignificantBits(), key.getLeastSignificantBits()+seed);\n }", "private int generateRandomNumber() {\n\t\treturn new SplittableRandom().nextInt(0, 3);\n\t}", "public RandomIdNoLuhnProvider() {\n this(DEFAULT_ID_LENGTH);\n }", "public void studIdGenr()\n {\n \tthis.studentID = (int)(Math.random() * (2047300 - 2047100 + 1) + 2047100);\n }", "public KeyPair generatekeypair(String seed) {\n\n byte[] sha3Hash = DriverUtils.getSha3HashRaw(seed.getBytes());\n\n String EDDSA_CURVE_TABLE = \"Ed25519\";\n EdDSAParameterSpec EDDSA_PARAMETER_SPEC = EdDSANamedCurveTable.getByName(EDDSA_CURVE_TABLE);\n\n EdDSAPrivateKeySpec keySpec = new EdDSAPrivateKeySpec(sha3Hash, EDDSA_PARAMETER_SPEC);\n EdDSAPrivateKey privateKey = new EdDSAPrivateKey(keySpec);\n EdDSAPublicKey publicKey = new EdDSAPublicKey(new EdDSAPublicKeySpec(privateKey.getAbyte(), EDDSA_PARAMETER_SPEC));\n\n return new KeyPair(publicKey, privateKey);\n }", "protected static byte[] ComputeSeed(RandomOracle ROSeed, Node nodeForSeed,\r\n \t\t\tbyte[] ro) {\r\n \t\treturn ROSeed.getRandomOracleOutput(ArrayGenerators.concatArrays(ro,\r\n \t\t\t\tnodeForSeed.toByteArray()));\r\n \t}", "public DuelistRNG() {\n this((long) ((Math.random() - 0.5) * 0x10000000000000L)\n ^ (long) (((Math.random() - 0.5) * 2.0) * 0x8000000000000000L),\n (long) ((Math.random() - 0.5) * 0x10000000000000L)\n ^ (long) (((Math.random() - 0.5) * 2.0) * 0x8000000000000000L));\n }", "public void generateEphemeralKey(){\n esk = BIG.randomnum(order, rng); //ephemeral secret key, x\n epk = gen.mul(esk); //ephemeral public key, X = x*P\n }", "public GameNode(Random rng) {\n this.number = rng.nextInt(8) + 1;\n this.next = null;\n }", "@Override\n public void setSeed(final int seed) {\n int counterMask = 3;\n int[] status = new int[4];\n status[0] = seed;\n status[1] = parameter.getMat1();\n status[2] = parameter.getMat2();\n status[3] = parameter.getTmat();\n for (int i = 1; i < MIN_LOOP; i++) {\n status[i & counterMask] ^= i + MAGIC_NUMBER3\n * (status[(i - 1) & counterMask]\n ^ (status[(i - 1) & counterMask]\n >>> INITIALIZE_SHIFT2));\n }\n st0 = status[0];\n st1 = status[1];\n st2 = status[2];\n st3 = status[3];\n periodCertification();\n for (int i = 0; i < MIN_LOOP; i++) {\n nextState();\n }\n clear();\n }", "public static String generateResetKey() {\n return RandomStringUtils.randomNumeric(DEF_COUNT);\n }", "public void setSeed(Square.State seed) {\n this.mySeed = seed;\n oppSeed = (mySeed == Square.State.CROSS) ? Square.State.NOUGHT : Square.State.CROSS;\n }", "public TrollGame (int seed){\n rand = new Random(seed);\n initBoard(ROWS, COLS, rand);\n }", "public static IntValueSelector random_value_selector(long SEED) {\n return new IntDomainRandom(SEED);\n }", "public static TinyMT32 getDefault(final long seed) {\n TinyMT32Parameter defaultParameter = TinyMT32Parameter\n .getDefaultParameter();\n TinyMT32 tiny = new TinyMT32(defaultParameter);\n tiny.setSeed(seed);\n return tiny;\n }", "public static UUID createForGivenTimeAndRand(long targetTimeTenthOfMicros,\n Random rand) {\n long nodeAndClock = createRandNodeAndClock(rand);\n return new UUID(createTime(targetTimeTenthOfMicros), nodeAndClock);\n }", "public Vigenere(long seed, int length)\n\t{\n\t\tStringBuilder key = new StringBuilder();\n\t\tRandom rand = new Random(seed);\n\n\t\tfor (int i = 0; i < length; i++)\n\t\t{\n\t\t\tint nextValue = rand.nextInt(26);\n\t\t\tkey.append((char)(nextValue + 'A'));\n\t\t}\n\n\t\tthis.key = key.toString();\n\t}", "public MiddleSquarePseudoRandom(long seed,int size){\r\n\t\tthis.curVal = seed;\r\n\t\tthis.size = size;\r\n\t\tthis.sizeMax = (long) Math.pow(10, size);\r\n\t\tthis.seed = seed;\t\t\r\n\t}", "public XorShiftRandom(final Random random) {\n\t\t\n\t\ttry {\n\t\t\tif(getSeed != null)\n\t\t\t\tsetSeed(((AtomicLong)XorShiftRandom.getSeed.get(random)).get());\n\t\t} catch(Throwable t) {\n\t\t\t;\n\t\t} finally {\n\t\t\tif(getSeed() == 0)\n\t\t\t\tsetSeed(System.nanoTime());\n\t\t}\n\t}", "public static TinyMT32 getDefault(final String seed) {\n TinyMT32Parameter defaultParameter = TinyMT32Parameter\n .getDefaultParameter();\n TinyMT32 tiny = new TinyMT32(defaultParameter);\n tiny.setSeed(seed);\n return tiny;\n }" ]
[ "0.7201006", "0.68019104", "0.67038155", "0.66871816", "0.6579472", "0.65191674", "0.6389931", "0.6292001", "0.6218037", "0.6175072", "0.612899", "0.6095674", "0.6088393", "0.60857576", "0.59916556", "0.5984302", "0.59609413", "0.59551996", "0.5907273", "0.5888819", "0.5887259", "0.58823305", "0.5877522", "0.58538854", "0.5838032", "0.5829326", "0.5829056", "0.58034796", "0.58005327", "0.5787175", "0.577793", "0.5773072", "0.5773072", "0.5766379", "0.5756761", "0.5743227", "0.5736066", "0.568802", "0.5659503", "0.5643815", "0.56359506", "0.5635042", "0.5626333", "0.56028694", "0.55956465", "0.55730945", "0.5568925", "0.553657", "0.55220455", "0.55177784", "0.550921", "0.550843", "0.5498306", "0.5479033", "0.5460603", "0.5444748", "0.544061", "0.5427839", "0.5410743", "0.5385823", "0.5381027", "0.5377427", "0.5352143", "0.53411037", "0.533898", "0.5338204", "0.5318714", "0.5311979", "0.5304107", "0.5286866", "0.5265267", "0.5260032", "0.5222416", "0.52183807", "0.5209956", "0.5184917", "0.5183059", "0.5171284", "0.5167101", "0.5146011", "0.513671", "0.5111746", "0.5085713", "0.5072014", "0.5062281", "0.5061669", "0.5061191", "0.5060388", "0.5048479", "0.50178987", "0.50080556", "0.49933168", "0.49892917", "0.49808392", "0.49716708", "0.49632016", "0.49586153", "0.4952516", "0.49481127", "0.49257368", "0.49254635" ]
0.0
-1
The below 3 methods are from "HouseDesign" Interface
public void chooseColor() { // TODO Auto-generated method stub }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "public void smell() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "public void designBasement() {\n\t\t\r\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "public abstract Object mo1771a();", "public interface CalPropertyAttrib extends IdentifyKingdomProp{\n /**\n * Give list of dominoes according to coordinates in one property for serving high level methods\n * @param coordsInProp coordinates in the property\n * @param dominoDistribution the mapping from coordinates to dominoes\n * @return list of relevant dominoes\n * @throws Exception null detection\n * @author AntonioShen\n */\n List<Domino> giveDominoesInProp(List<Integer[]> coordsInProp, HashMap<Integer[], Domino> dominoDistribution) throws Exception; //Test passed\n\n /**\n * Give terrain type of one property according to coordinates in one property for serving high level methods\n * @param coordsInProp coordinates in the property\n * @param terrainDistribution the mapping from coordinates to terrain types\n * @return the terrain type for the property\n * @throws Exception null detection\n * @author AntonioShen\n */\n TerrainType givePropType(List<Integer[]> coordsInProp, HashMap<Integer[], TerrainType> terrainDistribution) throws Exception; //Test passed\n\n /**\n * Give the property size for serving high level methods\n * @param coordsInProp list of coordinates in the property\n * @return size of the property\n * @throws Exception null detection\n * @author AntonioShen\n */\n int givePropSize(List<Integer[]> coordsInProp) throws Exception; //Test passed\n\n /**\n * Give the total number of crowns in one property for serving high level methods\n * @param coordsInProp list of coordinates in the property\n * @param crownsDistribution the mapping from coordinates to crown numbers\n * @return total number of crowns in the property\n * @throws Exception null detection\n * @author AntonioShen\n */\n int givePropCrownNum(List<Integer[]> coordsInProp, HashMap<Integer[], Integer> crownsDistribution) throws Exception; //Test passed\n\n /**\n * Give the score for one property for serving high level methods\n * @param propSize the size of the property\n * @param crownNum the total crown number of the property\n * @return the score for the property\n * @throws Exception null detection\n * @author AntonioShen\n */\n int givePropScore(int propSize, int crownNum) throws Exception; //Test passed\n\n /**\n * Give the number of properties in one kingdom according to list of lists of coordinates in one kingdom for serving high level methods\n * @param allPropCoords list of lists of coordinates in the kingdom\n * @return the number of properties in the kingdom\n * @throws Exception null detection\n * @author AntonioShen\n */\n int givePropNum(List<List<Integer[]>> allPropCoords) throws Exception;\n}", "public interface IKataSolution\n extends IKataCommonSolution {\n\n public enum ACTION {\n TURN_LEFT, TURN_RIGHT, FORWARD, STAY\n }\n\n public enum ORIENTATION {\n UP (270), DOWN(90), LEFT(0), RIGHT(180);\n public int angle;\n ORIENTATION (int _angle) {\n angle = _angle;\n }\n public ORIENTATION moveLeft () {\n switch (this) {\n case UP: return LEFT;\n case DOWN: return RIGHT;\n case LEFT: return DOWN;\n case RIGHT: return UP;\n }\n return this;\n }\n public ORIENTATION moveRight () {\n switch (this) {\n case UP: return RIGHT;\n case DOWN: return LEFT;\n case LEFT: return UP;\n case RIGHT: return DOWN;\n }\n return this;\n }\n }\n\n public enum ITEM {\n EMPTY, PLANT, ANIMAL, END\n }\n\n public abstract class Animal {\n /**\n * Number of plants the animal ate\n */\n public int points;\n /**\n * Method to react to changing environmental conditions\n *\n * @param orientation animal's current orientation\n * @param view item currently in front of animal\n * @return action to do\n */\n public abstract ACTION react (ORIENTATION orientation, ITEM view);\n }\n\n /**\n * Factory method for an animal\n *\n * @param count count of animals to create\n * @param lastGeneration array of 'Animal' from last generation\n * @return array of 'Animal' instances\n */\n public abstract Animal[] createGeneration (int count, Animal[] lastGeneration);\n\n /**\n * If true, last generation will be visualized\n */\n public boolean visualizeLastGeneration ();\n\n /**\n * Defines how many generations of evolution should be tested\n * (minimum is 100, maximum is 10000)\n *\n * @return count of generations to test\n */\n public int countOfGenerations ();\n}", "public abstract void mo56925d();", "public abstract Object mo26777y();", "public abstract void mo70713b();", "abstract void uminus();", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}", "abstract int pregnancy();", "public interface AbstractC7617o0oOO {\n void OooO00o(View view);\n\n void OooO0O0(View view);\n\n void OooO0OO(View view);\n}", "@Override\n\tpublic void sacrifier() {\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}", "public interface BuildGridMapBlockInfo {\n\n\n int getColspan();\n\n int getRowspan();\n\n SaleHouse getHouse();\n\n}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "public abstract Koordinate schuss();", "@Override\n public void memoria() {\n \n }", "public abstract void mo30696a();", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public abstract void mo27386d();", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "public abstract void mo42331g();", "public abstract Object mo1185b();", "public interface CreateProperty {\n /**\n * Give the list of properties in one kingdom for CalculatePropertyAttributes.feature and IdentifyProperties.feature without assigning it to any kingdom\n * @param kingdom the kingdom\n * @return the property list\n * @throws Exception null detection\n * @author AntonioShen\n */\n List<Property> givePropList(Kingdom kingdom) throws Exception;\n\n /**\n * Assign properties to one kingdom according to the property list for CalculatePropertyAttributes.feature and IdentifyProperties.feature\n * @param list the property list for the kingdom\n * @param kingdom the kingdom\n * @return true if succeed, false if failed\n * @throws Exception null detection\n * @author AntonioShen\n */\n boolean assignPropToKingdom(List<Property> list, Kingdom kingdom) throws Exception;\n}", "public interface MemberStrategy {\r\n /**\r\n * 计算图书的价格\r\n * @param booksPrice 图书的原价\r\n * @return 计算出打折后的价格\r\n */\r\n public double calcPrice(double booksPrice);\r\n}", "@Override\n\tprotected void getExras() {\n\n\t}", "public abstract void mo35054b();", "public abstract void mo2150a();", "public void mo4359a() {\n }", "public abstract void mo42329d();", "public interface Kinetics {\n // Argument Temperaturetemperature :\n /**\n * The temperature that the rate is calculated.\n */\n // ## operation calculateRate(Temperature,double)\n double calculateRate(Temperature temperature, double Hrxn);\n\n double calculateRate(Temperature temperature);\n\n // ## operation getA()\n UncertainDouble getA();\n\n // ## operation getAValue()\n double getAValue();\n\n // ## operation getComment()\n String getComment();\n\n // ## operation getE()\n UncertainDouble getE();\n\n // ## operation getEValue()\n double getEValue();\n\n // ## operation getN()\n UncertainDouble getN();\n\n // ## operation getNValue()\n double getNValue();\n\n // ## operation getRank()\n int getRank();\n\n // ## operation getTRange()\n String getTRange();\n\n // ## operation getSource()\n String getSource();\n\n void setSource(String p_string);\n\n void setComments(String p_string);\n\n void setFromPrimaryKineticLibrary(boolean p_boolean);\n\n boolean isFromPrimaryKineticLibrary();\n\n // ## operation multiply(double)\n Kinetics multiply(double p_multiple);\n\n // ## operation repOk()\n boolean repOk();\n\n // ## operation toChemkinString()\n String toChemkinString(double Hrxn, Temperature p_temperature,\n boolean includeComments);\n\n // ## operation toString()\n String toString();\n\n boolean equals(Kinetics p_k);\n\n ArrheniusKinetics fixBarrier(double p_Hrxn);\n}", "private FlyWithWings(){\n\t\t\n\t}", "public abstract void mo42330e();", "public interface ViewHienThiSanPhamYeuThich {\n void hienThiSanPhamYeuThich(List<SanPham> dsSanPham);\n}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "public abstract void mo20899UO();", "public interface AbstractC14990nD {\n void ACi(View view);\n\n void ACk(View view);\n\n void ACo(View view);\n}", "interface AdministratorMakhlukHidup {\n /**\n * put in a MakhlukHidup in the monitored list\n * \n * @param n MakhlukHidup\n */\n public void fillDaftar(MakhlukHidup n);\n /**\n * put out a MakhlukHidup in the monitored list with certain value\n * \n * @param n MakhlukHidup\n */\n public void pluck(MakhlukHidup n);\n /**\n * put out a MakhlukHidup in the monitored list with certain index\n * \n * @param i integer index of the MakhlukHidup\n */\n public void pluck(int i);\n /**\n * create a thread to monitor each pair of MakhlukHidup\n */\n public void sinyal();\n /**\n * Get size of the daftar attribute\n * @return integer size, member of AdministratorMakhlukHidup\n */\n public int get_size();\n /**\n * Get the sum of MakhlukHidup in daftar attribute\n * @return integer count, number of MakhlukHidup inside daftar\n */\n public int get_count();\n /**\n * Get the daftar attribute that is represented by Vector\n * @return Vector of MakhlukHidup\n */\n public Vector<MakhlukHidup> get_daftar();\n /**\n * Get the contains of daftar attribute within certain index\n * @param i integer of index MakhlukHidup is placed\n * @return MakhlukHidup that wanted to be extracted from daftar attribute\n */\n public MakhlukHidup get_daftar(int i);\n /**\n * Set the size attribute\n * @param s integer size\n */\n public void set_size(int s);\n /**\n * Set the count attribute\n * @param c integer count\n */\n public void set_count(int c);\n}", "public abstract void mo4359a();", "public abstract void mo27464a();", "public interface IPresenterHienThiSanPhamTheoDanhMuc {\n void LayDanhSachSP_theoMaLoai(int masp,boolean kiemtra);\n}", "public interface AdvertisingInfoStrategy {\n AdvertisingInfo m21a();\n}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void buscar() {\n\t\t\n\t}", "public abstract String mo9239aw();", "public interface AbstractC7729o0ooOoo {\n void OooO00o();\n}", "public abstract void mo27385c();", "public interface Representation // C# has public abstract class\n{\n /// <summary>\n /// Creates a new type object of this representation, and\n /// associates it with the given HOW. Also sets up a new\n /// representation instance if needed.\n /// </summary>\n /// <param name=\"HOW\"></param>\n /// <returns></returns>\n RakudoObject type_object_for(ThreadContext tc, RakudoObject how);\n\n /// <summary>\n /// Creates a new instance based on the type object.\n /// </summary>\n /// <param name=\"WHAT\"></param>\n /// <returns></returns>\n RakudoObject instance_of(ThreadContext tc, RakudoObject what);\n\n /// <summary>\n /// Checks if a given object is defined.\n /// </summary>\n /// <param name=\"Obj\"></param>\n /// <returns></returns>\n boolean defined(ThreadContext tc, RakudoObject obj);\n\n /// <summary>\n /// Gets the current value for an attribute.\n /// </summary>\n /// <param name=\"ClassHandle\"></param>\n /// <param name=\"Name\"></param>\n /// <returns></returns>\n RakudoObject get_attribute(ThreadContext tc, RakudoObject object, RakudoObject classHandle, String name);\n\n /// <summary>\n /// Gets the current value for an attribute, obtained using the\n /// given hint.\n /// </summary>\n /// <param name=\"ClassHandle\"></param>\n /// <param name=\"Name\"></param>\n /// <param name=\"Hint\"></param>\n /// <returns></returns>\n RakudoObject get_attribute_with_hint(ThreadContext tc, RakudoObject object, RakudoObject classHandle, String name, int hint);\n\n /// <summary>\n /// Binds the given value to the specified attribute.\n /// </summary>\n /// <param name=\"ClassHandle\"></param>\n /// <param name=\"Name\"></param>\n /// <param name=\"Value\"></param>\n void bind_attribute(ThreadContext tc, RakudoObject object, RakudoObject classHandle, String name, RakudoObject value);\n\n /// <summary>\n /// Binds the given value to the specified attribute, using the\n /// given hint.\n /// </summary>\n /// <param name=\"ClassHandle\"></param>\n /// <param name=\"Name\"></param>\n /// <param name=\"Hint\"></param>\n /// <param name=\"Value\"></param>\n void bind_attribute_with_hint(ThreadContext tc, RakudoObject object, RakudoObject classHandle, String name, int hint, RakudoObject Value);\n\n /// <summary>\n /// Gets the hint for the given attribute ID.\n /// </summary>\n /// <param name=\"ClassHandle\"></param>\n /// <param name=\"Name\"></param>\n /// <returns></returns>\n int hint_for(ThreadContext tc, RakudoObject classHandle, String name);\n\n /// <summary>\n /// Used with boxing. Sets an integer value, for representations that\n /// can hold one.\n /// </summary>\n /// <param name=\"Object\"></param>\n /// <param name=\"Value\"></param>\n void set_int(ThreadContext tc, RakudoObject classHandle, int Value);\n\n /// <summary>\n /// Used with boxing. Gets an integer value, for representations that\n /// can hold one.\n /// </summary>\n /// <param name=\"Object\"></param>\n /// <param name=\"Value\"></param>\n int get_int(ThreadContext tc, RakudoObject classHandle);\n\n /// <summary>\n /// Used with boxing. Sets a floating point value, for representations that\n /// can hold one.\n /// </summary>\n /// <param name=\"Object\"></param>\n /// <param name=\"Value\"></param>\n void set_num(ThreadContext tc, RakudoObject classHandle, double Value);\n\n /// <summary>\n /// Used with boxing. Gets a floating point value, for representations that\n /// can hold one.\n /// </summary>\n /// <param name=\"Object\"></param>\n /// <param name=\"Value\"></param>\n double get_num(ThreadContext tc, RakudoObject classHandle);\n\n /// <summary>\n /// Used with boxing. Sets a string value, for representations that\n /// can hold one.\n /// </summary>\n /// <param name=\"Object\"></param>\n /// <param name=\"Value\"></param>\n void set_str(ThreadContext tc, RakudoObject classHandle, String Value);\n\n /// <summary>\n /// Used with boxing. Gets a string value, for representations that\n /// can hold one.\n /// </summary>\n /// <param name=\"Object\"></param>\n /// <param name=\"Value\"></param>\n String get_str(ThreadContext tc, RakudoObject classHandle);\n}", "public abstract String mo13682d();", "private void functionalInterface2() {\n\t\tPokedex.printData(Arrays.asList(charmander));\n\n\t\tguilherme.powerUp(charmander, new BigDecimal(\"-10\"), psRestoreHp // 100\n\t\t\t\t.and(psMinimalDamage) // -10\n\t\t\t\t.and(psIncreaseHp) // +25\n\t\t\t\t.and(psMinimalDamage) // -10\n\t\t\t\t.and(psHugeDamage) // -20\n\t\t);\n\n\t\tPokedex.printData(Arrays.asList(charmander));\n\t}", "public abstract void mo20900UP();", "public interface Crossword extends SearchBoard<CrosswordEntry> {\r\n\r\n\t/**\r\n\t * Initializes all structures associated with crossword dictionary \r\n\t * Assumes valid and non-NULL dictionary object\r\n\t * \r\n\t * @param dictionary - the dictionary object\r\n\t * \t\t\t\t\t (generated according to a text file)\r\n\t */\r\n\tpublic void attachDictionary(CrosswordDictionary dictionary);\r\n\r\n\t/**\r\n\t * Initializes all data structures associated with crossword structure. \r\n\t * Assumes valid and non-NULL shape object\r\n\t * \r\n\t * @param shape - the structure object (generated according to a text file)\r\n\t */\r\n\tpublic void attachStructure(CrosswordStructure structure);\r\n\r\n\t/**\r\n\t * Retrieves list of filled crossword entries associated with this \r\n\t * Crossword.The set of filled entries should satisfy both of \r\n\t * exercise requirements. \r\n\t * \r\n\t * There is no requirement on the order of the returned collection\r\n\t * of entries.\r\n\t * \r\n\t * @return Collection of filled entries.\r\n\t */\r\n\tCollection<CrosswordEntry> getCrosswordEntries();\r\n\r\n}", "public interface EnergyDistribution {\n\n void calculateEnergy(Growth growth, Grid grid, int energyInside, int energyOnEdges);\n void showEnergy(Growth growth, Grid grid, int energyInside, int energyOnEdges);\n void showMicrostructure(Growth growth, Grid grid, int energyInside, int energyOnEdges);\n}", "public IStoreLane classic();", "public interface Animalable {\n public enum AnimalClass {\n VERTEBRATE,\n INVERTEBRATE\n }\n\n public enum AnimalSubClass{\n REPTILE,\n FISH,\n AMPHIBIAN,\n BIRD,\n MAMMAL\n }\n\n public interface AnimalOrders {\n enum MammalOrders implements AnimalOrders {\n RODENTIA,\n CHIROPTERA,\n INSECTIVORA,\n MARSUPIALIA,\n CARNIVORA,\n PRIMATES,\n ARTIODACTYLA,\n CETACEA,\n LAGOMORPHA,\n PINNIPEDIA,\n EDENTATA,\n PERRISSODACTYLA,\n PROBOSCIDEA\n }\n enum BirdOrders implements AnimalOrders {\n STRUTHIONIFORMES,\n CRACIFORMES,\n GALLIFORMES,\n ANSERIFORMES,\n TURNICIFORMES,\n PICIFORMES,\n GALBULIFORMES,\n BUCEROTIFORMES,\n UPUPIFORMES,\n TROGONIFORMES,\n CORACIIFORMES,\n COLIIFORMES,\n CUCULIFORMES,\n PSITTACIFORMES,\n APODIFORMES,\n TROCHILIFORMES,\n MUSOPHAGIFORMES,\n STRIGIFORMES,\n COLUMBIFORMES,\n GRUIFORMES,\n CICONIIFORMES\n }\n\n enum ReptilOrders implements AnimalOrders{\n RHYNCOCEPHALIA,\n SQUAMATA,\n CHELONIA,\n CROCODILIA\n }\n\n enum FishOrders implements AnimalOrders {\n PREHISTORIC,\n BONY,\n CARTILAGINOUS,\n JAWLESS\n }\n\n enum AmphibianOrders implements AnimalOrders {\n ANURA,\n URODELA,\n APODA\n }\n }\n\n public enum Motion{\n SWIM,\n CRAWL,\n CLIMB,\n RUN,\n WALK,\n JUMP,\n FLY,\n DIG\n }\n\n public enum FeedingBehaviour {\n AUTOTROPH,\n CARNIVORE,\n ERGIVORE,\n HERBIVORE,\n OMNIVORE,\n SCAVENGER,\n INSECTIVORE\n }\n\n public enum Media {\n AIR,\n EARTH,\n WATER\n }\n\n public enum Sex {\n MALE,\n FEMALE,\n HERMAPHRODITE\n }\n\n public AnimalClass getMyClass();\n public void setMyClass(AnimalClass animalClass);\n\n public AnimalSubClass getMySubClass();\n public void setMySubClass(AnimalSubClass animalSubClass);\n\n public AnimalOrders getMyOrder();\n public void setMyOrder(AnimalOrders myOrder);\n\n public FeedingBehaviour getMyFeedingBehaviour();\n public void setMyFeedingBehaviour(FeedingBehaviour myConsumption);\n\n public ArrayList<Media> getMyMedia();\n public void addMedia(Media aMedia);\n\n public ArrayList<Motion> getMyMotion();\n public void addMotion(Motion aMotion);\n\n public String getName();\n public void setName(String name);\n\n public String getCommonName();\n public void setCommonName(String commonName);\n\n public String getScientificName();\n public void setScientificName(String scientificName);\n\n public Boolean amIHazardous();\n public void setHazardous(boolean hazardous);\n\n public Sex getMySex();\n public void setMySex(Sex aSex);\n\n public Timestamp getLastTimeFed();\n public void feedMe(Timestamp aTime, Edible food);\n\n public int getFeedingPeriod();\n public void setFeedingPeriod(int every);\n\n public boolean timeToFeed();\n\n public int howFullIsMyBelly();\n\n public boolean isAdult();\n\n public void setAsAdult();\n\n public void setAsBaby();\n\n\n\n\n}", "public interface BoardLayout {\n /**\n * In this method the application programmer defines the Layout of the board and the accessories.\n *\n * @return the custom layout\n */\n Board createLayout();\n\n}", "public interface Figury {\n double obwod();\n double pole();\n\n}", "protected OpinionFinding() {/* intentionally empty block */}", "public abstract void mo6549b();", "public interface C31891d {\n /* renamed from: hp */\n boolean mo51986hp();\n }", "public interface Occupant extends Person {\n\n /* ***************************************************\n * Property http://ontology.cybershare.utep.edu/smart-cities/Mobility#contains\n */\n \n /**\n * Gets all property values for the contains property.<p>\n * \n * @returns a collection of values for the contains property.\n */\n Collection<? extends WrappedIndividual> getContains();\n\n /**\n * Checks if the class has a contains property value.<p>\n * \n * @return true if there is a contains property value.\n */\n boolean hasContains();\n\n /**\n * Adds a contains property value.<p>\n * \n * @param newContains the contains property value to be added\n */\n void addContains(WrappedIndividual newContains);\n\n /**\n * Removes a contains property value.<p>\n * \n * @param oldContains the contains property value to be removed.\n */\n void removeContains(WrappedIndividual oldContains);\n\n\n /* ***************************************************\n * Property http://ontology.cybershare.utep.edu/smart-cities/Mobility#has\n */\n \n /**\n * Gets all property values for the has property.<p>\n * \n * @returns a collection of values for the has property.\n */\n Collection<? extends WrappedIndividual> getHas();\n\n /**\n * Checks if the class has a has property value.<p>\n * \n * @return true if there is a has property value.\n */\n boolean hasHas();\n\n /**\n * Adds a has property value.<p>\n * \n * @param newHas the has property value to be added\n */\n void addHas(WrappedIndividual newHas);\n\n /**\n * Removes a has property value.<p>\n * \n * @param oldHas the has property value to be removed.\n */\n void removeHas(WrappedIndividual oldHas);\n\n\n /* ***************************************************\n * Property http://ontology.cybershare.utep.edu/smart-cities/Mobility#hasAge\n */\n \n /**\n * Gets all property values for the hasAge property.<p>\n * \n * @returns a collection of values for the hasAge property.\n */\n Collection<? extends Integer> getHasAge();\n\n /**\n * Checks if the class has a hasAge property value.<p>\n * \n * @return true if there is a hasAge property value.\n */\n boolean hasHasAge();\n\n /**\n * Adds a hasAge property value.<p>\n * \n * @param newHasAge the hasAge property value to be added\n */\n void addHasAge(Integer newHasAge);\n\n /**\n * Removes a hasAge property value.<p>\n * \n * @param oldHasAge the hasAge property value to be removed.\n */\n void removeHasAge(Integer oldHasAge);\n\n\n\n /* ***************************************************\n * Property http://ontology.cybershare.utep.edu/smart-cities/Mobility#hasAlcohol\n */\n \n /**\n * Gets all property values for the hasAlcohol property.<p>\n * \n * @returns a collection of values for the hasAlcohol property.\n */\n Collection<? extends Object> getHasAlcohol();\n\n /**\n * Checks if the class has a hasAlcohol property value.<p>\n * \n * @return true if there is a hasAlcohol property value.\n */\n boolean hasHasAlcohol();\n\n /**\n * Adds a hasAlcohol property value.<p>\n * \n * @param newHasAlcohol the hasAlcohol property value to be added\n */\n void addHasAlcohol(Object newHasAlcohol);\n\n /**\n * Removes a hasAlcohol property value.<p>\n * \n * @param oldHasAlcohol the hasAlcohol property value to be removed.\n */\n void removeHasAlcohol(Object oldHasAlcohol);\n\n\n\n /* ***************************************************\n * Property http://ontology.cybershare.utep.edu/smart-cities/Mobility#hasAlcoholBloodContent\n */\n \n /**\n * Gets all property values for the hasAlcoholBloodContent property.<p>\n * \n * @returns a collection of values for the hasAlcoholBloodContent property.\n */\n Collection<? extends Object> getHasAlcoholBloodContent();\n\n /**\n * Checks if the class has a hasAlcoholBloodContent property value.<p>\n * \n * @return true if there is a hasAlcoholBloodContent property value.\n */\n boolean hasHasAlcoholBloodContent();\n\n /**\n * Adds a hasAlcoholBloodContent property value.<p>\n * \n * @param newHasAlcoholBloodContent the hasAlcoholBloodContent property value to be added\n */\n void addHasAlcoholBloodContent(Object newHasAlcoholBloodContent);\n\n /**\n * Removes a hasAlcoholBloodContent property value.<p>\n * \n * @param oldHasAlcoholBloodContent the hasAlcoholBloodContent property value to be removed.\n */\n void removeHasAlcoholBloodContent(Object oldHasAlcoholBloodContent);\n\n\n\n /* ***************************************************\n * Property http://ontology.cybershare.utep.edu/smart-cities/Mobility#hasAlcoholResult\n */\n \n /**\n * Gets all property values for the hasAlcoholResult property.<p>\n * \n * @returns a collection of values for the hasAlcoholResult property.\n */\n Collection<? extends Object> getHasAlcoholResult();\n\n /**\n * Checks if the class has a hasAlcoholResult property value.<p>\n * \n * @return true if there is a hasAlcoholResult property value.\n */\n boolean hasHasAlcoholResult();\n\n /**\n * Adds a hasAlcoholResult property value.<p>\n * \n * @param newHasAlcoholResult the hasAlcoholResult property value to be added\n */\n void addHasAlcoholResult(Object newHasAlcoholResult);\n\n /**\n * Removes a hasAlcoholResult property value.<p>\n * \n * @param oldHasAlcoholResult the hasAlcoholResult property value to be removed.\n */\n void removeHasAlcoholResult(Object oldHasAlcoholResult);\n\n\n\n /* ***************************************************\n * Property http://ontology.cybershare.utep.edu/smart-cities/Mobility#hasAlcoholSpecimanType\n */\n \n /**\n * Gets all property values for the hasAlcoholSpecimanType property.<p>\n * \n * @returns a collection of values for the hasAlcoholSpecimanType property.\n */\n Collection<? extends Integer> getHasAlcoholSpecimanType();\n\n /**\n * Checks if the class has a hasAlcoholSpecimanType property value.<p>\n * \n * @return true if there is a hasAlcoholSpecimanType property value.\n */\n boolean hasHasAlcoholSpecimanType();\n\n /**\n * Adds a hasAlcoholSpecimanType property value.<p>\n * \n * @param newHasAlcoholSpecimanType the hasAlcoholSpecimanType property value to be added\n */\n void addHasAlcoholSpecimanType(Integer newHasAlcoholSpecimanType);\n\n /**\n * Removes a hasAlcoholSpecimanType property value.<p>\n * \n * @param oldHasAlcoholSpecimanType the hasAlcoholSpecimanType property value to be removed.\n */\n void removeHasAlcoholSpecimanType(Integer oldHasAlcoholSpecimanType);\n\n\n\n /* ***************************************************\n * Property http://ontology.cybershare.utep.edu/smart-cities/Mobility#hasDeployedAirbag\n */\n \n /**\n * Gets all property values for the hasDeployedAirbag property.<p>\n * \n * @returns a collection of values for the hasDeployedAirbag property.\n */\n Collection<? extends Integer> getHasDeployedAirbag();\n\n /**\n * Checks if the class has a hasDeployedAirbag property value.<p>\n * \n * @return true if there is a hasDeployedAirbag property value.\n */\n boolean hasHasDeployedAirbag();\n\n /**\n * Adds a hasDeployedAirbag property value.<p>\n * \n * @param newHasDeployedAirbag the hasDeployedAirbag property value to be added\n */\n void addHasDeployedAirbag(Integer newHasDeployedAirbag);\n\n /**\n * Removes a hasDeployedAirbag property value.<p>\n * \n * @param oldHasDeployedAirbag the hasDeployedAirbag property value to be removed.\n */\n void removeHasDeployedAirbag(Integer oldHasDeployedAirbag);\n\n\n\n /* ***************************************************\n * Property http://ontology.cybershare.utep.edu/smart-cities/Mobility#hasGender\n */\n \n /**\n * Gets all property values for the hasGender property.<p>\n * \n * @returns a collection of values for the hasGender property.\n */\n Collection<? extends Integer> getHasGender();\n\n /**\n * Checks if the class has a hasGender property value.<p>\n * \n * @return true if there is a hasGender property value.\n */\n boolean hasHasGender();\n\n /**\n * Adds a hasGender property value.<p>\n * \n * @param newHasGender the hasGender property value to be added\n */\n void addHasGender(Integer newHasGender);\n\n /**\n * Removes a hasGender property value.<p>\n * \n * @param oldHasGender the hasGender property value to be removed.\n */\n void removeHasGender(Integer oldHasGender);\n\n\n\n /* ***************************************************\n * Property http://ontology.cybershare.utep.edu/smart-cities/Mobility#hasHelmet\n */\n \n /**\n * Gets all property values for the hasHelmet property.<p>\n * \n * @returns a collection of values for the hasHelmet property.\n */\n Collection<? extends Integer> getHasHelmet();\n\n /**\n * Checks if the class has a hasHelmet property value.<p>\n * \n * @return true if there is a hasHelmet property value.\n */\n boolean hasHasHelmet();\n\n /**\n * Adds a hasHelmet property value.<p>\n * \n * @param newHasHelmet the hasHelmet property value to be added\n */\n void addHasHelmet(Integer newHasHelmet);\n\n /**\n * Removes a hasHelmet property value.<p>\n * \n * @param oldHasHelmet the hasHelmet property value to be removed.\n */\n void removeHasHelmet(Integer oldHasHelmet);\n\n\n\n /* ***************************************************\n * Property http://ontology.cybershare.utep.edu/smart-cities/Mobility#hasInjury\n */\n \n /**\n * Gets all property values for the hasInjury property.<p>\n * \n * @returns a collection of values for the hasInjury property.\n */\n Collection<? extends Integer> getHasInjury();\n\n /**\n * Checks if the class has a hasInjury property value.<p>\n * \n * @return true if there is a hasInjury property value.\n */\n boolean hasHasInjury();\n\n /**\n * Adds a hasInjury property value.<p>\n * \n * @param newHasInjury the hasInjury property value to be added\n */\n void addHasInjury(Integer newHasInjury);\n\n /**\n * Removes a hasInjury property value.<p>\n * \n * @param oldHasInjury the hasInjury property value to be removed.\n */\n void removeHasInjury(Integer oldHasInjury);\n\n\n\n /* ***************************************************\n * Property http://ontology.cybershare.utep.edu/smart-cities/Mobility#hasInjurySeverity\n */\n \n /**\n * Gets all property values for the hasInjurySeverity property.<p>\n * \n * @returns a collection of values for the hasInjurySeverity property.\n */\n Collection<? extends Integer> getHasInjurySeverity();\n\n /**\n * Checks if the class has a hasInjurySeverity property value.<p>\n * \n * @return true if there is a hasInjurySeverity property value.\n */\n boolean hasHasInjurySeverity();\n\n /**\n * Adds a hasInjurySeverity property value.<p>\n * \n * @param newHasInjurySeverity the hasInjurySeverity property value to be added\n */\n void addHasInjurySeverity(Integer newHasInjurySeverity);\n\n /**\n * Removes a hasInjurySeverity property value.<p>\n * \n * @param oldHasInjurySeverity the hasInjurySeverity property value to be removed.\n */\n void removeHasInjurySeverity(Integer oldHasInjurySeverity);\n\n\n\n /* ***************************************************\n * Property http://ontology.cybershare.utep.edu/smart-cities/Mobility#hasRestraintType\n */\n \n /**\n * Gets all property values for the hasRestraintType property.<p>\n * \n * @returns a collection of values for the hasRestraintType property.\n */\n Collection<? extends Integer> getHasRestraintType();\n\n /**\n * Checks if the class has a hasRestraintType property value.<p>\n * \n * @return true if there is a hasRestraintType property value.\n */\n boolean hasHasRestraintType();\n\n /**\n * Adds a hasRestraintType property value.<p>\n * \n * @param newHasRestraintType the hasRestraintType property value to be added\n */\n void addHasRestraintType(Integer newHasRestraintType);\n\n /**\n * Removes a hasRestraintType property value.<p>\n * \n * @param oldHasRestraintType the hasRestraintType property value to be removed.\n */\n void removeHasRestraintType(Integer oldHasRestraintType);\n\n\n\n /* ***************************************************\n * Property http://ontology.cybershare.utep.edu/smart-cities/Mobility#isPersonType\n */\n \n /**\n * Gets all property values for the isPersonType property.<p>\n * \n * @returns a collection of values for the isPersonType property.\n */\n Collection<? extends Integer> getIsPersonType();\n\n /**\n * Checks if the class has a isPersonType property value.<p>\n * \n * @return true if there is a isPersonType property value.\n */\n boolean hasIsPersonType();\n\n /**\n * Adds a isPersonType property value.<p>\n * \n * @param newIsPersonType the isPersonType property value to be added\n */\n void addIsPersonType(Integer newIsPersonType);\n\n /**\n * Removes a isPersonType property value.<p>\n * \n * @param oldIsPersonType the isPersonType property value to be removed.\n */\n void removeIsPersonType(Integer oldIsPersonType);\n\n\n\n /* ***************************************************\n * Common interfaces\n */\n\n OWLNamedIndividual getOwlIndividual();\n\n OWLOntology getOwlOntology();\n\n void delete();\n\n}", "public interface SystolicDetailContract {\n interface TextView{\n void initHighSystolicPatientCardsTextView(ArrayList<Integer> bloodPressure, ArrayList<String> effectedTime, String patientName);\n void clearTextViews();\n }\n\n interface LineView{\n void initHighSystolicPatientCardsLineView(ArrayList<Integer> bloodPressure,String patientName);\n void clearLineViews();\n }\n\n interface Presenter{\n void initHighSystolicPatients();\n\n }\n}", "@Override\n protected void getExras() {\n }", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public abstract String mo41079d();", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n\tpublic void laysEgg() {\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 }", "protected abstract Set method_1559();", "public interface Farms extends Building {\n public int[] produce();\n public void levelUp();\n public int getPeople();\n public void addPeople(int p);\n public void removePeople(int p);\n public void resetPeople();\n}", "public abstract String mo9751p();", "@Override\r\n\tpublic void laught() {\n\r\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "private stendhal() {\n\t}", "protected abstract IStoreLane make_classic();", "public abstract void MussBeDefined();", "public abstract String mo9752q();", "public interface FaithRoadController {\n /**\n * Shows passed cards in UI\n *\n * @param first faith card of first turn\n * @param second faith card of second turn\n * @param third faith card of third turn\n */\n void showFaithCards(int first, int second, int third);\n\n /**\n * Shows a faith cube on 1st 2nd or 3rd card\n *\n * @param familyColor color of cube\n * @param cardOrdinal may be 1,2,3\n */\n void showFaithCube(FamilyColor familyColor, int cardOrdinal);\n}", "public interface HawkToBrainComp {\n /**\n * Every kind of personality will have a designated response in the form of IDK(I don't know)\n * This method allows the Hawker can use this method and an equals method to the response to determine\n * if the AI didn't have a response available for the User.\n * @return returns the IDK response of the Personality\n */\n public String getIDKReply();\n\n /**\n * Send a conventional grammar into this method and receive a response from the AI Personality\n * @param conventional_Grammar to be determined\n */\n public String requestResponce(String conventional_Grammar);\n}", "public void mo55254a() {\n }", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "public abstract String mo118046b();", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "public interface AreaOccupier {\n}", "public abstract void mo2624j();" ]
[ "0.63467354", "0.61700565", "0.61611766", "0.61583245", "0.6105268", "0.60288924", "0.6006124", "0.5937464", "0.59063214", "0.5906227", "0.58850896", "0.57786447", "0.5770723", "0.5763933", "0.57549995", "0.5738857", "0.57337606", "0.5731182", "0.5731182", "0.5729211", "0.5726907", "0.5721708", "0.571921", "0.5696137", "0.5694504", "0.56916267", "0.56680495", "0.56660956", "0.5666068", "0.56617475", "0.5657812", "0.5654818", "0.5652949", "0.56457525", "0.5639976", "0.56350243", "0.5627691", "0.56275076", "0.5626835", "0.56200594", "0.56174785", "0.5613589", "0.5609982", "0.5606576", "0.56057036", "0.56039965", "0.56027585", "0.56018966", "0.56003934", "0.5598866", "0.5593859", "0.55922127", "0.55920637", "0.55903095", "0.558994", "0.55896837", "0.5588188", "0.55870503", "0.5586204", "0.5584959", "0.5583845", "0.55771327", "0.5576694", "0.5575203", "0.5572557", "0.5570757", "0.55696744", "0.556733", "0.55644894", "0.55524796", "0.5549473", "0.55485874", "0.55481786", "0.5546493", "0.5544017", "0.5542257", "0.5540126", "0.5540126", "0.5540126", "0.5540126", "0.5540126", "0.5540126", "0.5540126", "0.5538512", "0.55328715", "0.5526676", "0.55196214", "0.55155796", "0.5513353", "0.5511272", "0.5507596", "0.5507561", "0.5506839", "0.5506798", "0.55036587", "0.5496684", "0.54954505", "0.5495242", "0.54924333", "0.5491695", "0.54904467" ]
0.0
-1
TODO Autogenerated method stub
public void designBasement() { }
{ "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}", "@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.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.5886006
35
TODO Autogenerated method stub
public int getNumberOfFloors() { return 2; }
{ "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
Extra / Can have your own methods in addition what interface told you
public void carParking() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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}", "public interface Customizable {\n //Add method to be implemented\n boolean add(Object obj);\n\n //Remove method to be implemented\n boolean remove(Object obj);\n}", "public interface Extendable {\n void extend();\n}", "public interface IPresenterHienThiSanPhamTheoDanhMuc {\n void LayDanhSachSP_theoMaLoai(int masp,boolean kiemtra);\n}", "public interface IPresenterTinTuc {\n void layDanhSachTinTuc(String duongDan);\n TrangTinTuc layDanhSachTinTucLoadMore(String duongDan);\n}", "public interface Interface {\n void doSomething();\n void somethingElse(String arg);\n}", "public interface Tweetable {\n /*\n Typically in an interface you put lists of methods with no code in them. They don't\n usually have constructors. How they work: like saying \"I promise to have these methods\". If\n I want to implement this interface I must have these methods. Like a checklist that\n classes need to check off. How to use: like a super class. Instead of 'extends' we use\n 'implements'\n */\n public String getText();\n public Date getDate();\n\n}", "public interface Pasticcere {\r\n //No attributes\r\n public void accendiForno();\r\n}", "public interface Implementor {\n // 实现抽象部分需要的某些具体功能\n void operationImpl();\n}", "public interface se {\n void a(List<POI> list);\n\n boolean a();\n\n void b();\n\n boolean c();\n\n List<POI> d();\n\n POI e();\n\n POI f();\n}", "public interface IInteractorOperations {\n\n String concatenarNombre(String nombres, String apellidos);\n int calcularEdad(String fechaNacimiento);\n}", "public interface i {\n void D(String str);\n\n void H();\n\n void L(String str);\n\n void b0(Response response);\n\n void c(List<DomainExpired> list);\n\n void h(Map<String, List<ExtendedMail>> map);\n\n void p(ApiError apiError);\n}", "public interface WipableIngredient extends Ingredient {\n\n void wip();\n}", "public interface MethodInteraction {\n\n void onMethodEdit(Method method, String newBody);\n\n void onMethodDrag(RecyclerView.ViewHolder holder);\n}", "public interface Mypersent {\n void getData();\n}", "public interface AbstractC3386kV0 {\n boolean b();\n\n void d();\n\n void dismiss();\n\n ListView f();\n}", "public interface ViewBinhLuan {\n void DangBinhLuanThanhCong();\n void DangBinhLuanThatBai();\n}", "public interface RemotInterfaceOperations \n{\n String createDRecord (String managerId, String firstName, String lastName, String address, String phone, String specialization, String location);\n String createNRecord (String managerId, String firstName, String lastName, String designation, String status, String statusDate);\n String getRecordCount (String managerId, int recordType);\n String editRecord (String managerId, String recordID, String fieldName, String newValue);\n String transferRecord (String managerID, String recordID, String remoteClinicServerName);\n}", "public interface ITier {\n\n\tpublic String getName();\n\tpublic void setName(String name);\n\tpublic Zoo getZoo();\n\tpublic void setZoo(Zoo zoo);\n\t\n\tpublic void fuettere(Personal personal); //implemented. Gibt aus, dass tier von personal gefüttert wird.\n\tpublic void lebtIn(/*String gehege, Gehege neuesGehege, */Gehege gehege); //implemented\n\t\t\n}", "public interface GiveGift {\n\n void give1();\n void give2();\n void give3();\n}", "public interface ICamera {\r\n void takePhoto(); // abstract method\r\n void changeAperture();\r\n\r\n default void takeHdrPhoto() {\r\n System.out.println(\"take 3 photos with different exposures and combine them together\");\r\n }\r\n\r\n default void shootVideo() {\r\n System.out.println(\"shooting a video\");\r\n }\r\n}", "public interface Operation {\n String description();\n void command();\n}", "public interface Command {\n void doSomothing();//具体做什么\n}", "public interface IMoiveListView extends IWanBaseView{\n\n void onLoading();\n\n void onLoadSucess(MoiveListResponse moiveListResponse);\n\n void onLoadFail(String msg);\n}", "public interface TipoJogador {\n\n /**\n * Informa para o jogador que uma tecla foi pressionada.\n * \n * @param t Tecla que foi pressionada.\n */\n public void informarTeclaPressionada( Tecla t );\n \n /**\n * Informa para o jogador que uma tecla foi solta.\n * \n * @param t Tecla que foi solta.\n */\n public void informarTeclaSolta( Tecla t );\n \n}", "public interface Phone {\n\t\n\tpublic abstract void interfaceInfo();\n\t\t//System.out.println(\"interface is a class - can't be implemented/declared only\");\n\t\n\tpublic abstract void call();\n\tpublic abstract void message();\n\tpublic abstract void camera();\n\t//we can implement these abstract methods by writing in a concrete class- or Iphone1 (see the codes in Iphone1 class)\n\t\n\tpublic default void battery() {\n\t\tSystem.out.println(\"battery is a default method from Java 1.8\");\n\t}\n\tpublic static void wireless() {\n\t\tSystem.out.println(\"wireless is a static method from Java 1.8\");\n\t}\n\t\n\t\n\t\n\t//We can only apply extends keyword but NOT implements for inheritance in interface. \n\t//Interface can inherit multiple interfaces using extends keyword.\n\t\n\t\n\t\n\n}", "public interface zzo\n extends IInterface\n{\n\n public abstract void zze(AdRequestParcel adrequestparcel);\n}", "public interface FlyBehevour {\n void fly();\n}", "public interface C22486a {\n void bGQ();\n\n void cMy();\n }", "public interface IFruit {\n\n void say();\n}", "public interface MyInterface {\n void getDate(String name);\n}", "public interface IBasePresent {\n\n void getInfoList(String ctl,int pageSize,String open);\n\n void getLoadMoreInfoList(String ctl,int pageSize,String open);\n\n}", "public interface IMusicSystem extends ISystem, ITickable {\n\n public String getCurrent();\n public void setCurrent(String current);\n\n}", "public interface IScreenKView {\n void Showbasket();\n void Showfavorite();\n void Showviewall();\n\n\n}", "public interface ch\n{\n\n public abstract void a(bv bv, p p, h h, long l, int i, int j, \n IMediaItem imediaitem);\n}", "public interface ExtenderInterface {\r\n\r\n\t/**\r\n\t * Extends the diagram for new generated elements.\r\n\t */\r\n\tvoid extend();\r\n\t\r\n}", "public interface AdditionalOperations extends Statements {\n}", "public interface i {\n int a();\n\n boolean b();\n\n void c();\n}", "public interface HowToGo {\n void reachRome();\n}", "public interface Food {\n\n void get();\n}", "public interface IPresenter {\n void setView(IView iView);\n void onCreate();\n void onClickAddLot();\n void onClickQuery();\n void userliked(Lot lot, String lotKey, Boolean isLiked);\n void showToast(String check);\n void setAdapterTolist(RecyclerView.Adapter rvAdapter);\n\n String getCategory();\n}", "interface a {\n int aadd();\n int sub();\n}", "interface IView{\n public void showText(String s);\n public void toastText(String s);\n}", "interface Hi {\n // MUST BE IMPLEMENTED IN IMPLEMENTING CLASS!!\n void Okay(String q);\n}", "public interface IWheelVisualization {\n void ModifyVehicleSpeed(float speed);\n void ModifyVehicleOrientation(float degree);\n}", "public interface MetaInformationService extends BasicEcomService{\n\n public String listMetaInformationTypesForPage(String page);\n public Integer getTotalPagesForMetaInformationTypes();\n public Integer getTotalPagesForSearchedMetaInformationTypes(String metaType);\n public String listSearchedMetaInformationTypesForPage(String metaType,String page);\n\n\n}", "public interface Strategy {\n\n void info();\n\n}", "public interface Hello {\n\n String hello();\n}", "public interface IFlyAminal {\n void fly();\n}", "public interface SampleA {\n void operation1();\n void operation2();\n}", "public interface IBibliotheque {\n\t// Start of user code (user defined attributes for IBibliotheque)\n\n\t// End of user code\n\n\t/**\n\t * Description of the method listeDesEmpruntsEnCours.\n\t */\n\tpublic void listeDesEmpruntsEnCours();\n\n\t// Start of user code (user defined methods for IBibliotheque)\n\n\t// End of user code\n\n}", "public interface Article {\n void produce();\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public interface Clothes {\n\n String desc();\n}", "public void myExtraMethod_login() {\n\tSystem.out.println(\"this is my method that i added to this class and not from interface. This is login\");\n}", "public interface Hello {\n String sayHello();\n}", "public interface IProtocol {\r\n int ADD_ELEMENT = 2100; // parent, 0, Elements.Extra\r\n\r\n int CLEAR_CHILDREN = 2005; // parent\r\n\r\n int CONTROL_ABOUT = 3001;\r\n\r\n int CONTROL_DELETE_SAVE = 3003;\r\n\r\n // int CONTROL_RESTART = 3004;\r\n int CONTROL_FORCE_CLICK = 3005;\r\n\r\n int CONTROL_HELP = 3002;\r\n\r\n // int UPDATE_SCROLL = 5;\r\n int DISPLAY_TOAST = 2001; // OBJ = text\r\n\r\n int ON_CLICK = 1101; // OBJ = view\r\n\r\n int ON_CREATE = 1001; // OBJ = bundle\r\n\r\n int ON_DESTROY = 1006;\r\n\r\n int ON_PAUSE = 1004;\r\n\r\n int ON_RESUME = 1003;\r\n\r\n int ON_START = 1002;\r\n\r\n int ON_STOP = 1005;\r\n\r\n int ON_TOUCH_EVENT = 1103;\r\n\r\n int SET_THEME = 5001;\r\n\r\n int SHOW_HELP_PAGE = 4001;\r\n\r\n int SHOW_LICENSE = 4002;\r\n\r\n int UPDATE_COLOR = 2;\r\n\r\n int UPDATE_ENABLED = 3;\r\n\r\n int UPDATE_INFLATE = 4;\r\n\r\n int UPDATE_TEXT = 1;\r\n\r\n int UPDATE_VIEW = 0;\r\n}", "public interface IResponder\n{\n String getName();\n\n String getDescription();\n}", "interface HiPlus extends Hi {\n void Wow(String m);\n}", "public interface Developer {\n void doStuff();\n}", "public interface ICmd2ModelAdapter_deprecated {\r\n\t\r\n\t/**\r\n\t * Appends the given string onto a text display somewhere on the host ChatApp's GUI.\r\n\t * @param s A string to display\r\n\t */\r\n\tpublic abstract void append(String s);\r\n\t\r\n\t/**\r\n\t * Allows the command to give a java.awt.Component to the host ChatApp to be displayed on \r\n\t * its GUI somewhere. \r\n\t * @param name A title for the component, useful for tabs, frame titles, etc.\r\n\t * @param newComp The component to display.\r\n\t */\r\n\tpublic void addComponent(String name, Component newComp);\r\n}", "public interface ArticleListViewInterface {\n void showSearchResult(LoaderSearchResult loaderSearchResult);\n}", "public interface Animal {\n\npublic String voice();\n\n}", "public interface Animal {\n\n public void eat();\n public void travel();\n}", "public interface AbstractC14990nD {\n void ACi(View view);\n\n void ACk(View view);\n\n void ACo(View view);\n}", "public interface Drink {\n void drink();\n}", "interface Interviewer {\n public void askQuestions();\n}", "interface Chicken {\n public void gobble();\n public void fly();\n}", "public interface MyClassInterface {\n public void doSomething() ;\n public void adButton(LinearLayout linear, Activity activity) ;\n}", "public interface AnotherName {\n\n\tString eatThings( Object food );\n\n}", "public interface AbstractC2726a {\n /* renamed from: a */\n void mo36480a(int i, int i2, ImageView imageView, Uri uri);\n\n /* renamed from: a */\n void mo36481a(int i, ImageView imageView, Uri uri);\n\n /* renamed from: a */\n void mo36482a(ImageView imageView, Uri uri);\n\n /* renamed from: b */\n void mo36483b(int i, ImageView imageView, Uri uri);\n}", "public interface AbstractC7617o0oOO {\n void OooO00o(View view);\n\n void OooO0O0(View view);\n\n void OooO0OO(View view);\n}", "public interface PowerUps {\n\n public void activar(Figura figura);\n}", "public interface GetTaskInterface extends publiceviewinterface {\n void gettaskdetails(MyTaskBean myTaskBean);\n void accepttask();\n void gettaskfall();\n}", "public interface Sell {\n void sell();\n void ad();\n\n}", "public interface ObjetoDependienteDeTurno {\n\n public void siguienteTurno();\n\n}", "public interface ITire {\n\n /**\n * 轮胎\n */\n void tire();\n}", "public interface IMineView extends IBaseView{\n\n /**\n * @param user\n */\n void fillUserData(User user);\n /**\n * @param tools\n */\n void fillToolsData(List<Tool> tools);\n}", "public interface Flyable{\r\n\tString fly();\r\n}", "public interface IGetMusicByTagView extends IBaseView {\n\n}", "interface I {}", "public interface Flyable {\n\t\n\t/**\n\t * A method to be used to launch \n\t */\n\tvoid launch();\n\t\n\tvoid land();\n}", "public interface IMediaBrowserServiceCompat\n extends IInterface\n{\n\n public abstract void addSubscription(String s, IMediaBrowserServiceCompatCallbacks imediabrowserservicecompatcallbacks);\n\n public abstract void connect(String s, Bundle bundle, IMediaBrowserServiceCompatCallbacks imediabrowserservicecompatcallbacks);\n\n public abstract void disconnect(IMediaBrowserServiceCompatCallbacks imediabrowserservicecompatcallbacks);\n\n public abstract void getMediaItem(String s, ResultReceiver resultreceiver);\n\n public abstract void removeSubscription(String s, IMediaBrowserServiceCompatCallbacks imediabrowserservicecompatcallbacks);\n}", "public interface BaseView {\n\n /**\n * 返回请求信息\n * @param value\n */\n void showReqResult(String value);\n\n}", "public interface IOverride extends IMeasurement_descriptor{\n\n\tpublic IRI iri();\n\n}", "public interface IGetDataView extends IBaseView {\n void getDataSuccess(Cursor cursor);\n void getDataFail();\n}", "public interface aqi {\n void a(int i, int i2, PhoneFavoriteSquareTileView phoneFavoriteSquareTileView);\n\n void b(int i, int i2, PhoneFavoriteSquareTileView phoneFavoriteSquareTileView);\n\n void q();\n\n void r();\n}", "public interface IDisplayObject\n{\n /**\n * METHOD: set the IDisplayObject position along x,y,z axes\n * @param x double giving the new position along x axis.\n * @param y double giving the new position along y axis.\n * @param z double giving the new position along z axis.\n */\n void position(double x, double y, double z);\n \n /**\n * METHOD: rotate the IDisplayObject about x,y,z axes\n * @param xOrientation double giving the new orientation about x axis.\n * @param yOrientation double giving the new orientation about y axis.\n * @param zOrientation double giving the new orientation about z axis.\n */\n void orientation(double xOrientation, double yOrientation, double zOrientation);\n \n \n}", "public interface IICCpuCardPresenter {\n void cardPower();\n void cardHalt();\n void exist();\n void exchangeApdu();\n}", "public interface IDisplay {\n\t\n\t\tpublic abstract void aggiorna(String damostrare);\n}", "public interface Offer {\r\n\t/**\r\n\t * information about provider \r\n\t * @return\r\n\t */\r\n\tOperationUser getOfferProvider();\r\n\r\n\t/**\r\n\t * short description of offer\r\n\t * @return\r\n\t */\r\n\tString getOfferSummary();\r\n}", "interface Greeting {\n public void greet(Greeter greeter);\n}", "public interface InterfaceA {\n\n\tpublic void methodFromInterfaceA();\n\n\t// Before Java 8, the interface only contains method signatures. \n\t// With Java 8 new feature Default Methods or Defender Methods, \n\t// you can include method body within the interface.\n\tdefault void defaultMethod() {\n System.out.println(\"from InterfaceA, default method...\");\n }\n\t\n\tstatic void someStaticMethod() {\n System.out.println(\"from InterfaceA static method...\");\n }\n\t\n\t/*\n\t * Why do we need to implement a method within the interface?\n\t * \n * Let's say you have an interface which has multiple methods, \n * and multiple classes are implementing this interface. One \n * of the method implementations can be common across the classes, \n * we can make that method as a default method, so that the \n * implementation is common for all classes.\n *\n * How to work with existing interfaces?\n * \n\t * Second scenario where you have already existing application, \n\t * for a new requirement we have to add a method to the existing \n\t * interface. If we add new method then we need to implement it \n\t * through out the implementation classes. By using the Java 8 \n\t * default method we can add a default implementation of that \n\t * method which resolves the problem.\n\t */\n}", "public interface HappyMethods {\n\n boolean isHappy(Ticket ticket);\n\n}", "public interface a {\n void a();\n }", "public interface a {\n void a();\n }", "interface Interface1 {\n\n\tdefault void add() {\n\t\tSystem.out.println(\"Interface1 add method\");\n\t}\n\n\tdefault void display() {\n\t\tSystem.out.println(\"Interface1 display\");\n\t}\n\n\t//static methods can be invoked only using InterfaceName.methodName\n\tstatic void print() {\n\t\tSystem.out.println(\"Interface1 print\");\n\t}\n\n\tstatic void printV2() {\n\t\tSystem.out.println(\"Interface1 printV2\");\n\t}\n}", "public interface IBuyCar {\n //买车\n void buyCar();\n}", "interface C0868a {\n /* renamed from: a */\n void mo3207a(Object obj);\n\n /* renamed from: a */\n void mo3208a(String str, Bundle bundle);\n\n /* renamed from: a */\n void mo3209a(String str, Bundle bundle, ResultReceiver resultReceiver);\n\n /* renamed from: a */\n boolean mo3210a(Intent intent);\n }", "public interface Person {\n\n public void service();\n\n public void setAnimal(Animal animal);\n\n public void allService();\n}", "public interface Plugin {\n void doUsefil();\n}" ]
[ "0.6946747", "0.6764511", "0.6697254", "0.66073644", "0.6591008", "0.6588294", "0.6482324", "0.6449581", "0.64323545", "0.64289343", "0.6419028", "0.6409592", "0.6396012", "0.63683414", "0.636347", "0.6358441", "0.63505095", "0.6335774", "0.6327439", "0.63236386", "0.63212365", "0.63184005", "0.6304583", "0.63008755", "0.629547", "0.628719", "0.6284562", "0.6283433", "0.6281061", "0.6277631", "0.6273977", "0.6273322", "0.6272882", "0.6271983", "0.62706506", "0.62686366", "0.6266788", "0.626647", "0.6265782", "0.6253223", "0.6252405", "0.6250644", "0.6248985", "0.62440395", "0.6242893", "0.62407327", "0.62377983", "0.6231256", "0.62287104", "0.62258387", "0.62255347", "0.62237257", "0.6223705", "0.62226295", "0.6220803", "0.6220403", "0.6218113", "0.62152237", "0.62136424", "0.62125945", "0.6211773", "0.62096137", "0.6208259", "0.62080556", "0.6203131", "0.619857", "0.6195713", "0.6192974", "0.61926", "0.6191426", "0.6187547", "0.61852086", "0.6181446", "0.6180184", "0.6179912", "0.61753213", "0.6169428", "0.6166192", "0.6163418", "0.6157047", "0.6156124", "0.6155588", "0.61551255", "0.6154383", "0.61541754", "0.6153528", "0.61499584", "0.61475164", "0.6147337", "0.6143711", "0.614296", "0.61414623", "0.6140364", "0.6139682", "0.61378294", "0.61378294", "0.61343455", "0.61305946", "0.61304206", "0.6129059", "0.61268365" ]
0.0
-1
add class and main method respectively
public static void main (String [ ] args) { int value = (int)(Math.random ()*101); //generates integer 0-100 int e=0; //even counter int o=0; //odd counter System.out.println( " Random number generated: " +value ); //print out value generated if(value!=0){ //if not zero, run program if(value%2==0) { //all even values System.out.print( " The output pattern: "); do{ System.out.print( "*"); e++; }//close do loop while (e<value); } //close if statement for even integers else{ //all odd values do{ System.out.print( "&"); o++; }//close do loop while (o<value); } }//close first if statement else { //if random value is 0, then print nothing... System.out.print( " "); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\t\tSystem.out.println(\"add new class\");\n\n\t}", "String mainClass();", "public static void main(String[] args) {\n System.out.println(\"Class 1\");\n }", "public static void main(String[] args) {// we can create psvm method but cannot create objects in abstract class\n\t\tSchool.bonus();// as bonus method is static we can print it without create class name so we can use\n\t\t\t\t\t\t// with classname.mthdname hence it is accepted in abstract class\n\t\tSystem.out.println(\"i am from main method\");// we can write anything in main mthd it prints automatically without\n\t\t\t\t\t\t\t\t\t\t\t\t\t// creating obj\n\t}", "public void main(){\n }", "public static void main(String[] args) {\n\n\t\tDemoClass1 obj=new DemoClass1();\n\t//\tobj.add();\n\t\t\t\t\n\t}", "public void Main(){\n }", "public static void main() {\n \n }", "public static void main(String[] args) {\n //MyClass myClass = new MyClass();\n //myClass.testMethod();\n }", "public static void main(String args[]) {\n Subclass subc = new Subclass();\r\n }", "public static void main(String[] args) {\n\t\tPublicClass p = new PublicClass();\n\t\tp.add();\n\t\tSystem.out.println(\"Hello Java 2\");\n\n\t}", "public static void main(String[] args) {\n\n\t\t\n\t\tSystem.out.println(\"This is my class \");\n\t}", "public static void main(){\n\t}", "public static void main(String args[]){\n\tClasschild T=new Classchild();\n\tClass1 c=new Class1();\n\tc.addition();\n\tc.subtraction();\n\tT.multiplication();\n\t\n}", "public static void main()\n\t{\n\t}", "public static void main() {\n }", "private Main() {\n }", "public static void main(String[] args) throws ClassNotFoundException, IOException, ParseException {\n\t\tEntryPoint entry= new EntryPoint();\n\t\t\t\n\t entry.mainMenu();\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tmain newmain = new main();\r\n\t\tnewmain.concrete();\r\n\t\toverride over = new override();\r\n\t\tover.concrete();\r\n\t\toverloading loading = new overloading();\r\n\t\tloading.run();\r\n\t}", "public static void main(String[] args) {\n demoClass();\n }", "public static void main(String[] args) {\n demoClass();\n }", "public static void main(String[] args) {\n aClass.aMethod();\n }", "private Main() {}", "public Main() {}", "public static void main(String[] args) {\n // call directly since we are in same class\n //sayHelloWorld7Times();\n // alternatively call using class name\n MethodPractice.sayHelloWorld7Times();\n\n // you can call static method of other class\n // using className.methodName(...)\n MethodIntro.sayHello();\n calculateMathProblem();\n\n }", "public static void main(String[] args) {\n\t\tTest test = new Test();\n\t\ttest.addition();\n\t\ttest.subtraction();\n\t\t\n\t}", "public void visit(MainClass n) \n\t{\n\t\tsymbolTable.addClass(n.i1.toString());\n\t\tcurrentScope = symbolTable.enterScope(n.i1.toString());\n\t\tClassSymbolTable cst = (ClassSymbolTable) currentScope;\n\t\t\n\t\t//Add System.out.println\n\t\tString[] paramNames = {\"output\"};\n\t\tString[] paramTypes = {\"int\"};\n\t\t\n\t\tcst.addMethod(\"System.out.println\", paramNames, paramTypes, \"void\");\n\t\t\n\t\tparamTypes[0] = \"String[]\";\n\t\tparamNames[0] = n.i2.toString();\n\t\t\n\t\tcst.addMethod(\"main\", paramNames, paramTypes, \"void\");\n\t\t\n\t\tcurrentScope = currentScope.enterScope(\"main\");\n\t\t\n\t\tn.i1.accept(this);\n\t\tn.i2.accept(this);\n\t\tn.s.accept(this);\n\t\t\n\t\tcurrentScope = currentScope.exitScope();\n\t\tcurrentScope = currentScope.exitScope();\n\t}", "private Main ()\n {\n super ();\n }", "public Main() {\n }", "public Main() {\n }", "public static void main( String[] args )\n {\n\n\n\n System.out.println( \"Hello World!\" );\n\n MYClass myClass = new MYClass();\n myClass.doTest();\n\n }", "public static void main(String[] args) {\n\n\t\tSystem.out.println(\"Class3\");\n\t\tSystem.out.println(\"Class4\");\n\t\t\n\t}", "public Main() {\n }", "public Main() {\r\n }", "public Main() {\r\n }", "public Main() {\r\n\t}", "public Main() {\n \n \n }", "public static void main(String[] args) {\n\t\tnewClass obj=new newClass();\n\t\tobj.positiveNegative();\n\t\tobj.EqualUnequal();\n\t}", "public static void main(String[] args) {\n new Main();\n }", "private Main() {\n\n super();\n }", "public static void main(String[] args) {\r\n\t\t//method body\r\n\t}", "public static void main(String[] args) {\n\t\tSuperClass c = new Practice(1);\n\t\tc.test1();\n\t\ttest1();\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(\"create second class file\");\r\n\t\tSystem.out.println(\"Push added print line\");\n\t\tSystem.out.println(\"start fetch\");\n\t\tSystem.out.println(\"start fetch2\");\n\r\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tClassC c = new ClassC();\n\t\tc.display();\n\t\tc.view();\n\n\t}", "String getMainClass();", "public static void main(String[] args){\n\n MyApp myApp = new MyApp(); //1\n myApp.runMyApp(); //2\n System.out.println(\"End of Program\"); //3\n }", "public Main() {\n\t\tsuper();\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(\"in second class\");\r\n\t\tSystem.out.println(\"happy\");\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println();\r\n\t}", "public static void main(String[] args) {\n\t\tnew StartClass();\n\t}", "public static void main(String[] args) {\n\t\taddnumbers addnew = new addnumbers();\n\t\tint result = addnew.add(21, 19);\n\t\tSystem.out.println(\"The addition is \" + result);\n\t\t\n\t\taddnumbers addnew2 = new addnumbers();\n\t\tint result2 = addnew2.add(32, 13);\n\t\tSystem.out.println(\"The addition is \" + result2);\n\t}", "public void firstClass(){\n }", "public static void main(String[] args) {\n\t\tnew Actions();\r\n\t\t//call constructor\r\n\t}", "public static void main(String[] args) {\n\t\tStatic_Demo s=new Static_Demo();\r\n\t\ts.add();\r\n\t\t\r\n\t\tStatic_Demo.sub();\r\n\r\n\t}", "public static void main(String[] args) throws IOException {\n\t\t// creating local class objects \n\t\t\n\t}", "public static void main(String[] args) {\n\t\tMachine mach1 = new Machine();\n\t\t\n\t\tmach1.start();\n\t\tmach1.stop();\n\t\t\n\t\tCar car1 = new Car();\n\t\t\n\t\t//Using 'extends' in the Car class we made it inherit all the methods of Machine class\n\t\tcar1.start();\n\t\tcar1.stop();\n\t\t//We can also add methods that aren't included in the 'parent' class\n\t\tcar1.wipe();\n\t\t//\n\t\tcar1.showInfo();\n\t}", "public MainEntryPoint() {\r\n\r\n }", "public static void main(String[] args){\n Car myCar = new Car();\n myCar.car_human();\n myCar.car_color(); \n }", "public static void main(String[] args) {\n\t\tnew AddCustomer();\n\t}", "public static void main(String[] args) {\n //Added some awesome things to movie class\n // done with tc100\n }", "public static void main(String[] args) {\n\t\tOuterClass outer = new OuterClass();\n\t\touter.outerMethod();\n\t\t\n\t\t\n\n\t}", "public static void main(String[] args) {\r\n\t\tBankProject testAdd = new BankProject();\r\n\t\t\r\n\t\tint c = testAdd.addFunction(15, 25);\r\n\t\tSystem.out.println(\"add value\" +c);\r\n\t\r\n\t\t\r\n\r\n\t}", "public static void main(String[] args) {\n method(new Cat1());\r\n method(new Dog1());\r\n\r\n //Animal a = new Cat();\t\t\t开发的是很少在创建对象的时候用父类引用指向子类对象,直接创建子类对象更方便,可以使用子类中的特有属性和行为\r\n }", "public static void main(String[] args) {\n\t\tnew MethodInnerclass().outerclassmethod();\r\n\t}", "public static void main(String[] args) {\n\t\tSecondLevelClass secondLevelClassObject = new SecondLevelClass(100, 200);\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tSystem.out.println(\"main method\");\n\t\ttest();\n\t\t//RunprogramwithoutObject.test();// no need to create any object of class\n\t\tcover();\n\n\t}", "private void installBasicClasses() {\n \tAbstractSymbol filename \n \t = AbstractTable.stringtable.addString(\"<basic class>\");\n \t\n \t// The following demonstrates how to create dummy parse trees to\n \t// refer to basic Cool classes. There's no need for method\n \t// bodies -- these are already built into the runtime system.\n \n \t// IMPORTANT: The results of the following expressions are\n \t// stored in local variables. You will want to do something\n \t// with those variables at the end of this method to make this\n \t// code meaningful.\n \n \t// The Object class has no parent class. Its methods are\n \t// cool_abort() : Object aborts the program\n \t// type_name() : Str returns a string representation \n \t// of class name\n \t// copy() : SELF_TYPE returns a copy of the object\n \n \tclass_c Object_class = \n \t new class_c(0, \n \t\t TreeConstants.Object_, \n \t\t TreeConstants.No_class,\n \t\t new Features(0)\n \t\t\t .appendElement(new method(0, \n \t\t\t\t\t TreeConstants.cool_abort, \n \t\t\t\t\t new Formals(0), \n \t\t\t\t\t TreeConstants.Object_, \n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.type_name,\n \t\t\t\t\t new Formals(0),\n \t\t\t\t\t TreeConstants.Str,\n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.copy,\n \t\t\t\t\t new Formals(0),\n \t\t\t\t\t TreeConstants.SELF_TYPE,\n \t\t\t\t\t new no_expr(0))),\n \t\t filename);\n \t\n \t// The IO class inherits from Object. Its methods are\n \t// out_string(Str) : SELF_TYPE writes a string to the output\n \t// out_int(Int) : SELF_TYPE \" an int \" \" \"\n \t// in_string() : Str reads a string from the input\n \t// in_int() : Int \" an int \" \" \"\n \n \tclass_c IO_class = \n \t new class_c(0,\n \t\t TreeConstants.IO,\n \t\t TreeConstants.Object_,\n \t\t new Features(0)\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.out_string,\n \t\t\t\t\t new Formals(0)\n \t\t\t\t\t\t .appendElement(new formalc(0,\n \t\t\t\t\t\t\t\t TreeConstants.arg,\n \t\t\t\t\t\t\t\t TreeConstants.Str)),\n \t\t\t\t\t TreeConstants.SELF_TYPE,\n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.out_int,\n \t\t\t\t\t new Formals(0)\n \t\t\t\t\t\t .appendElement(new formalc(0,\n \t\t\t\t\t\t\t\t TreeConstants.arg,\n \t\t\t\t\t\t\t\t TreeConstants.Int)),\n \t\t\t\t\t TreeConstants.SELF_TYPE,\n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.in_string,\n \t\t\t\t\t new Formals(0),\n \t\t\t\t\t TreeConstants.Str,\n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.in_int,\n \t\t\t\t\t new Formals(0),\n \t\t\t\t\t TreeConstants.Int,\n \t\t\t\t\t new no_expr(0))),\n \t\t filename);\n \n \t// The Int class has no methods and only a single attribute, the\n \t// \"val\" for the integer.\n \n \tclass_c Int_class = \n \t new class_c(0,\n \t\t TreeConstants.Int,\n \t\t TreeConstants.Object_,\n \t\t new Features(0)\n \t\t\t .appendElement(new attr(0,\n \t\t\t\t\t TreeConstants.val,\n \t\t\t\t\t TreeConstants.prim_slot,\n \t\t\t\t\t new no_expr(0))),\n \t\t filename);\n \n \t// Bool also has only the \"val\" slot.\n \tclass_c Bool_class = \n \t new class_c(0,\n \t\t TreeConstants.Bool,\n \t\t TreeConstants.Object_,\n \t\t new Features(0)\n \t\t\t .appendElement(new attr(0,\n \t\t\t\t\t TreeConstants.val,\n \t\t\t\t\t TreeConstants.prim_slot,\n \t\t\t\t\t new no_expr(0))),\n \t\t filename);\n \n \t// The class Str has a number of slots and operations:\n \t// val the length of the string\n \t// str_field the string itself\n \t// length() : Int returns length of the string\n \t// concat(arg: Str) : Str performs string concatenation\n \t// substr(arg: Int, arg2: Int): Str substring selection\n \n \tclass_c Str_class =\n \t new class_c(0,\n \t\t TreeConstants.Str,\n \t\t TreeConstants.Object_,\n \t\t new Features(0)\n \t\t\t .appendElement(new attr(0,\n \t\t\t\t\t TreeConstants.val,\n \t\t\t\t\t TreeConstants.Int,\n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new attr(0,\n \t\t\t\t\t TreeConstants.str_field,\n \t\t\t\t\t TreeConstants.prim_slot,\n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.length,\n \t\t\t\t\t new Formals(0),\n \t\t\t\t\t TreeConstants.Int,\n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.concat,\n \t\t\t\t\t new Formals(0)\n \t\t\t\t\t\t .appendElement(new formalc(0,\n \t\t\t\t\t\t\t\t TreeConstants.arg, \n \t\t\t\t\t\t\t\t TreeConstants.Str)),\n \t\t\t\t\t TreeConstants.Str,\n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.substr,\n \t\t\t\t\t new Formals(0)\n \t\t\t\t\t\t .appendElement(new formalc(0,\n \t\t\t\t\t\t\t\t TreeConstants.arg,\n \t\t\t\t\t\t\t\t TreeConstants.Int))\n \t\t\t\t\t\t .appendElement(new formalc(0,\n \t\t\t\t\t\t\t\t TreeConstants.arg2,\n \t\t\t\t\t\t\t\t TreeConstants.Int)),\n \t\t\t\t\t TreeConstants.Str,\n \t\t\t\t\t new no_expr(0))),\n \t\t filename);\n \n \t/* Do somethind with Object_class, IO_class, Int_class,\n Bool_class, and Str_class here */\n nameToClass.put(TreeConstants.Object_.getString(), Object_class);\n nameToClass.put(TreeConstants.IO.getString(), IO_class);\n nameToClass.put(TreeConstants.Int.getString(), Int_class);\n nameToClass.put(TreeConstants.Bool.getString(), Bool_class);\n nameToClass.put(TreeConstants.Str.getString(), Str_class);\n adjacencyList.put(TreeConstants.Object_.getString(), new ArrayList<String>() );\n adjacencyList.put(TreeConstants.IO.getString(), new ArrayList<String>() );\n adjacencyList.put(TreeConstants.Int.getString(), new ArrayList<String>() );\n adjacencyList.put(TreeConstants.Bool.getString(), new ArrayList<String>() );\n adjacencyList.put(TreeConstants.Str.getString(), new ArrayList<String>() );\n // Do the same for other basic classes\n basicClassList = new Classes(0);\n basicClassList.appendElement(Object_class);\n basicClassList.appendElement(IO_class);\n basicClassList.appendElement(Int_class);\n basicClassList.appendElement(Bool_class);\n basicClassList.appendElement(Str_class);\n \n }", "public static void main(String[] args) {\n\n\t\tGreat g = new Great();\n\n\t\tg.great(3, 4);\n\t}", "public static void main(String[] args) throws IOException, ClassNotFoundException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException {\n }", "public static void main(String[] args) {\n\t\t\n\t MethodExample object=new MethodExample();\n\t object.greet(\"Sarmed\");\n\t object.greet(\"Farid\");\n\t object.greet(\"John\");\n\t object.greet(\"Gulen\");\n\t}", "public static void main(String[] args) {\n MyClass m;\n m= new MyClass();\nm.display();\n\t}", "public static void main(String[] args) {\n\t\tFive obj=new Five();\n\t\tobj.batchalloedment();\n\t\tobj.display();\n\t\tobj.idcardgeneration();\n\t\tobj.registartion();\n\t}", "private void addMainMethodCall(ClassTree clazz, List<JS> stmts, GenerationContext<JS> context) {\r\n\t\tif (!hasMainMethod(clazz)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tTypeElement type = TreeUtils.elementFromDeclaration(clazz);\r\n\t\tJS target = context.getCurrentWrapper().isGlobal() ? null : context.js().name(\r\n\t\t\t\tcontext.getNames().getTypeName(context, type, DependencyType.STATIC));\r\n\r\n\t\tJavaScriptBuilder<JS> js = context.js();\r\n\t\tJS condition = js.unary(UnaryOperator.LOGICAL_COMPLEMENT, js.property(js.name(GeneratorConstants.STJS), \"mainCallDisabled\"));\r\n\t\tJS thenPart = js.expressionStatement(js.functionCall(js.property(target, \"main\"), Collections.<JS> emptyList()));\r\n\t\tstmts.add(js.ifStatement(condition, thenPart, null));\r\n\t}", "public static void main(String[] args) {\n ArithmeticFunctions functions = new ArithmeticFunctions();\n // IMPLEMENTING THE METHODS FROM THE CHILD CLASS\n System.out.println(\"10 + 5 = \"+functions.addition(10,5));\n System.out.println(\"10 - 5 = \"+functions.subtraction(10,5));\n System.out.println(\"10 * 5 = \"+functions.multiplication(10,5));\n System.out.println(\"10 / 5 = \"+functions.division(10,5)+\"\\n\");\n }", "public static void main(String[] args) {\n\t\tMain _Main = new Main();\n\t\t_Main.xxx();\n\t\t\n\t}", "public static void main(String[] args){\n SecondClassExample secondClassExample = new SecondClassExample(67);\nsecondClassExample.testMethod(); //metodo iskvietimas\n\n}", "public static void main(String[] args) {\n\r\n Starter starter = new Starter();\r\n starter.start();\r\n\r\n\r\n }", "public Main() {\n // Required empty public constructor\n }", "public static void main(String[] args){\n new Testing().runTests();\r\n \r\n }", "public static void main(String[] args) {\n\t\tClassAndObject CAB = new ClassAndObject();\n\t\tCAB.display(10);\n\t}", "@Override\n public void enterMainClass(MiniJavaParser.MainClassContext ctx) {\n Klass mainKlass = klasses.get(ctx.Identifier(0).getText());\n String mainKlassName = mainKlass.getScopeName();\n\n cw = new ClassWriter(ClassWriter.COMPUTE_FRAMES);\n cw.visit(V1_1, ACC_PUBLIC, mainKlassName, null, \"java/lang/Object\", null);\n\n mg = new GeneratorAdapter(ACC_PUBLIC, INIT(), null, null, cw);\n mg.loadThis();\n mg.invokeConstructor(Type.getType(Object.class), INIT());\n mg.returnValue();\n mg.endMethod();\n mg = new GeneratorAdapter(ACC_PUBLIC + ACC_STATIC, org.objectweb.asm.commons.Method.getMethod(\"void main (String[])\"), null, null, cw);\n }", "public static void main(String[] args)\r\n {\n Type objectName = new Type();\r\n // call a method ON an object\r\n objectName.methodName();\r\n // call a static method OF a class\r\n ClassName.methodName();\r\n }", "public static void main(String[] args) {\n\t\tProgram.withoutFactoryMethod();\n\t\tSystem.out.println();\n\t\tProgram.withFactoryMethod();\n\t}", "public static void main(String[] args) {\n\t\tMyFunc2 myClassCons = MyClass::new;\n\n\t\t// Create an instance of MyClass through reference to the constructor\n\t\tMyClass mc = myClassCons.func(\"Testing\");\n\n\t\t// Use just created exemplar MyClass\n\t\tSystem.out.println(\"String str in mc: \" + mc.getStr());\n\t}", "public static void main(String[] args) {\n\t\tnew main();\n\t}", "public Main() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tAbstractexample c =new Abstractexample();\r\n\t\tc.run();\r\n\t\t\r\n\t}", "void setMainClass(Class<?> mainClass);", "public static void main(String[] args){\n // isveda teksta i konsole\n // sout - greitai atspausdina\n System.out.println(\"Hello world\");\n // metodo kvietimas maine\n\n int a = 10;\n\n // sukurtas objektas\n // tipas pavadinimas = new tipas\n MyFirstClass myFirstClass = new MyFirstClass();\n\n // per objekta kvieciamas metodas\n // ne statinis kvieciamas statiniame per klases objekta\n myFirstClass.myNotStaticMethod(a);\n\n // tiesiogiai per varda toje pacioje klaseje\n myStaticMethod();\n\n // float visada su f\n float b = 4.6f;\n\n // galima pridet d, bet nebutina\n double c = 2.4;\n\n // saugo true arba false(1 bito)\n boolean d = true;\n\n // viena raide, simbolis\n char e = 'A';\n\n // Javoj string neturi atskiro tipo, todel naudoja klase ir rasomas is didziosios(nes klase)\n String f = \"This is string!!!\";\n }", "public static void main(String[] args) {\n new Main();\r\n }", "public static void main(String[] args) {\n \n \n \n \n }", "public static void main(String[] args) {\n MainIntrence mainintrence = new MainIntrence();\r\n\r\n\r\n\r\n }", "public static void main (String []args){\n }", "@Test\r\n\tpublic void mainTest(){\r\n\t\tMain m = new Main();\r\n\t\tm.main(null);\r\n\t}", "public void testMain() throws ClassNotFoundException, IOException \r\n {\r\n String[] args = new String[1];\r\n args[0] = \"SyntaxTest\";\r\n \r\n System.out.println(\"Filename: SyntaxTest:\\n\");\r\n Rectangle1.main(args);\r\n \r\n\r\n\r\n String[] args2 = new String[1];\r\n args2[0] = \"SimpleInsertionTest\";\r\n \r\n System.out.println(\"\\n\\nFilename: SimpleInsertionTest:\\n\");\r\n Rectangle1.main(args2);\r\n \r\n String[] args3 = new String[1];\r\n args3[0] = \"RegionSearchTest\";\r\n \r\n System.out.println(\"\\n\\nFilename: RegionSearchTest:\\n\");\r\n Rectangle1.main(args3);\r\n \r\n String[] args4 = new String[1];\r\n args4[0] = \"WebCatTests\";\r\n \r\n System.out.println(\"\\n\\nFilename: WebCatTests:\\n\");\r\n Rectangle1.main(args4);\r\n \r\n String[] args5 = new String[1];\r\n args5[0] = \"RemoveTest\";\r\n \r\n System.out.println(\"\\n\\nFilename: RemoveTest:\\n\");\r\n Rectangle1.main(args5);\r\n \r\n String[] args6 = new String[1];\r\n args6[0] = \"MoreCommands\";\r\n \r\n System.out.println(\"\\n\\nFilename: MoreCommands:\\n\");\r\n Rectangle1.main(args6);\r\n \r\n assertEquals(\"RegionSearchTest\", args3[0]);\r\n }", "static public void greeting() {\n\tSystem.out.println(\"class Test1\");\n\t}", "public static void main(String[] args) {\n ClassTest1 t1=new ClassTest1(); \r\n\t t1.start(); \r\n\t t1.start(); \r\n\r\n }", "public static void main(String[] args) {\n\n\n //1.5 Call the above instance method into the Main method and Run the programme.\n\n Program1 obj = new Program1();\n obj.m1();\n\n\n }", "public static void main(String[] args) {\n\t\tcalc obj= new calc();\n\t\tobj.add(9, 8);\n\t\tobj.add(10, 20, 30);\n\t\t\n\n\t}", "public static void main(String[] args) {\n\t\tMainClass mainWindow = new MainClass();\n\t\t\n\t}", "public static void main(String[] args) throws ClassNotFoundException {\n\t\t\n\t\tFunctionOverloading func = new OverridingFunction();\n\t\tfunc.function();\n//\t\tfunc.functionOverloading(\"Sravan\");\n//\t\t\n//\t\tfunc.functionOverloading();\n//\t\t\n//\t\tfunc.funtionOver(32);\n//\t\tSystem.out.println(\"Data Member: \"+func.number);\n\t}", "public static void main(String[] args) {\n \n RunProject r = new RunProject(); // creates new instance of RunProject class\n r.mainMenu(); //runs main menu method for new instance.(r)\n \n }" ]
[ "0.78797555", "0.71710426", "0.69938624", "0.69414735", "0.6936172", "0.69331044", "0.6921705", "0.6906374", "0.68723565", "0.68462235", "0.6842143", "0.68183225", "0.6800712", "0.6753279", "0.67440903", "0.6689201", "0.667335", "0.6671772", "0.66669285", "0.6653641", "0.6653641", "0.6615379", "0.66034436", "0.6596382", "0.65730786", "0.65729636", "0.6572316", "0.65708536", "0.65688103", "0.65688103", "0.6568245", "0.6547932", "0.65420246", "0.65322244", "0.65322244", "0.6530488", "0.6527141", "0.6500983", "0.6500782", "0.6497995", "0.64817065", "0.64767385", "0.6469888", "0.6453761", "0.6439437", "0.6436929", "0.643456", "0.6434008", "0.6431252", "0.6418608", "0.64145774", "0.6403783", "0.6403299", "0.6389002", "0.63727736", "0.6356801", "0.63433266", "0.6342992", "0.63423306", "0.63416314", "0.6339491", "0.6331314", "0.63301593", "0.63296026", "0.6324216", "0.6318619", "0.6311889", "0.6302557", "0.6300676", "0.62962204", "0.6280956", "0.6278665", "0.62694824", "0.62642", "0.62562215", "0.6256096", "0.62407357", "0.62371016", "0.6236956", "0.62310016", "0.6226376", "0.62250614", "0.62237203", "0.6218779", "0.6218302", "0.6218029", "0.62177914", "0.6214594", "0.62142307", "0.62115824", "0.62057495", "0.6194612", "0.61938375", "0.6192325", "0.61894864", "0.6188875", "0.6187773", "0.61813664", "0.617645", "0.6174427", "0.6173977" ]
0.0
-1
Called every time the player takes a turn to see if that player needs to draw a card or has a possible move in its hand.
@Override public boolean shouldDrawCard(Card topPileCard, Card.Suit changedSuit) { topCard = topPileCard; boolean drawCard = true; for (Card card : cardsInHand) { if (card.getSuit().equals(changedSuit) || card.getRank().equals(topPileCard.getRank())) { drawCard = false; break; } } return drawCard; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void checkIfWinOrDraw() {\r\n\t\tif (theModel.getIsDraw() == true) {\r\n\t\t\tDrawNum++;\r\n\t\t\tactivePlayer = winningPlayer;\r\n\t\t\t// cards go to communalPile\r\n\r\n\t\t} else {\r\n\t\t\ttheModel.winningCard(winningPlayer);\r\n\t\t\ttheModel.transferWinnerCards(winningPlayer);\r\n\t\t}\r\n\r\n\t}", "private int playerTurn() {\n List<Card> drawnCards = new LinkedList<>();\n boolean exit = false;\n\n // Ask the player to draw more cards\n do {\n // Draw cards\n Card drawn = drawCard();\n drawnCards.add(drawn);\n Ui.cls();\n Ui.println(\"You drew a \" + drawn.getName());\n Ui.pause();\n\n // Shows current cards and drawn cards\n Ui.cls();\n Ui.println(getHeader());\n Ui.println();\n Ui.print(\"Cards:\");\n // Draw every card\n for (int i = 0; i < drawnCards.size(); i++) {\n Ui.print(\" \" + drawnCards.get(i));\n if (i + 1 < drawnCards.size()) {\n Ui.print(\",\");\n }\n }\n // Value of cards\n Ui.println(\"Value: \" + highestPossibleValue(drawnCards));\n Ui.println();\n\n // Check for too much points\n if (highestPossibleValue(drawnCards) > 21) {\n Ui.println(\"Unfortunately you got more than 21 points, resulting in a total of 0 points!\");\n Ui.pause();\n break;\n } else {\n Ui.println(\"Would you like to draw another card?\");\n Ui.println(\"1) Take another card\");\n Ui.println(\"2) Stop taking cards\");\n }\n\n // Input\n boolean quitInput = false;\n while (!quitInput) {\n int menuChoice = Ui.getValidInt();\n\n switch (menuChoice) {\n case 1:\n quitInput = true;\n break;\n case 2:\n exit = true;\n quitInput = true;\n break;\n default:\n break;\n }\n }\n\n } while (!exit);\n\n if (highestPossibleValue(drawnCards) > 21) {\n return 0;\n } else {\n return highestPossibleValue(drawnCards);\n }\n }", "public void checkSetPlayerTurn() // Check and if needed set the players turns so it is their turn.\n\t{\n\t\tswitch (totalPlayers) // Determine how many players there are...\n\t\t{\n\t\tcase 2: // For two players...\n\t\t\tswitch (gameState)\n\t\t\t{\n\t\t\tcase twoPlayersNowPlayerOnesTurn: // Make sure it's player one's turn.\n\t\t\t\tplayers.get(0).setIsPlayerTurn(true);\n\t\t\t\tbreak;\t\t\t\t\n\t\t\tcase twoPlayersNowPlayerTwosTurn: // Make sure it's player two's turn.\n\t\t\t\tplayers.get(1).setIsPlayerTurn(true);\n\t\t\t\tbreak;\t\t\t\t\t\t\t\n\t\t\t}\n\t\t}\n\n\t}", "public void tryMove() {\n if(!currentPlayer.getHasPlayed()){\n if (!currentPlayer.isEmployed()) {\n String destStr = chooseNeighbor();\n\n currentPlayer.moveTo(destStr, getBoardSet(destStr));\n if(currentPlayer.getLocation().getFlipStage() == 0){\n currentPlayer.getLocation().flipSet();\n }\n refreshPlayerPanel();\n }\n else {\n view.showPopUp(currentPlayer.isComputer(), \"Since you are employed in a role, you cannot move but you can act or rehearse if you have not already\");\n }\n }\n else{ \n view.showPopUp(currentPlayer.isComputer(), \"You've already moved, rehearsed or acted this turn. Try a different command or click `end turn` to end turn your turn.\");\n }\n view.updateSidePanel(playerArray);\n }", "public void playerTurn(Game game){\n int cardHandNum;\n boolean nextPlayer = false;\n String recentCardDesc;\n if(game.recentCardPlayed() && !(game.playerGetAnotherTurn(this))){\n if(game.getRecentCard() instanceof Mineral){\n recentCardDesc = \"\\nRecent card = Name: \" + game.getRecentCard().getCardName() + \" \" +\n \"Hardness: \" + ((Mineral) game.getRecentCard()).getCardHardness() + \" \" +\n \"Specific Gravity: \" + ((Mineral) game.getRecentCard()).getCardSpecGravity() + \" \" +\n \"Cleavage: \" + ((Mineral) game.getRecentCard()).getCardCleavage() + \" \" +\n \"Crystal Abundance: \" + ((Mineral) game.getRecentCard()).getCardCrystalAbundance() + \" \" +\n \"Economic Value: \" + ((Mineral) game.getRecentCard()).getCardEconomicValue() + \"\\n\"; // The recent card description of the Mineral card\n }\n else{\n recentCardDesc = \"\\nThe recent player play the \" + ((SuperTrumps) game.getRecentCard()).getCardName() + \" card\" + \"\\n\"; // The recent card description of the Supertrumps card\n }\n }\n else if(game.recentCardPlayed() && game.playerGetAnotherTurn(this)){\n System.out.println(\"You are granted to select the trump mode again\");\n recentCardDesc = \"\\nYou may pick the card again as you made all of other players pass\" + \"\\n\";\n gameStart(game); // Allowing the player that is not passed to pick up another trump category\n }\n else {\n recentCardDesc = \"\\nThere are no recent cards that have been played\" + \"\\n\";\n gameStart(game); // Description when there is no cards that is been played (when it is the start of the game)\n }\n while (!nextPlayer){\n // Used for looping until the person did the action (play the card or pass), which allows the next player to move\n String playerChoice;\n System.out.println(\"Game mode: \" + game.getGameModeMessage() + recentCardDesc + showCardInHand() + getPlayerName() + \", enter the card number you want to play or simply enter PASS to pass\");\n System.out.print(\">>>\");\n Scanner options = new Scanner(System.in);\n playerChoice = options.nextLine();\n if (playerChoice.toUpperCase().equals(\"PASS\")){\n drawPlayerCard(game.getCardDeck().drawnCard());\n nextPlayer = true;\n }\n else{\n try {\n cardHandNum = Integer.parseInt(playerChoice); // Changing the input into int from String\n Card cardPlayed = getPlayerCard(cardHandNum); // Used for trying to get the card played\n boolean continueGame = game.gameCard(cardPlayed, this); // Trying to play the card\n if(game.getGameMode().equals(\"CHOICE\")){ // Decision when a player play a special supertrump card to allow player to freely choose the trump mode\n game.putCardToGame(cardPlayed);\n playerHand.remove((cardHandNum));\n gameStart(game);\n game.setRecentPlayer(this.getPlayerName());\n nextPlayer = true;\n }\n else if (game.getGameMode().equals(\"GRAV/MAG\")) {\n if(lookAtWinCard()) { // Check whether or not the player has the winning card, which is Magnetite\n for (Card cardInHand : playerHand) {\n game.putCardToGame(cardInHand);\n playerHand.remove(cardInHand);\n game.setRecentPlayer(this.getPlayerName());\n }\n game.setGameMode(\"SPECGRAV\"); // Change the game mode to Specific Gravity\n nextPlayer = true;\n }\n else {\n game.setGameMode(\"SPECGRAV\"); // Change the game mode to Specific Gravity\n }\n if(continueGame){\n game.putCardToGame(cardPlayed);\n playerHand.remove((cardHandNum));\n game.setRecentPlayer(this.getPlayerName());\n nextPlayer = true;\n }\n }\n else {\n if(continueGame){\n // Used for the normal card play\n game.putCardToGame(cardPlayed);\n playerHand.remove((cardHandNum));\n game.setRecentPlayer(this.getPlayerName());\n nextPlayer = true;\n }\n }\n }\n catch (Throwable e){\n System.out.println(\"Invalid input!\"); // When the user try to enter the input that does not match the card in the hand\n }\n }\n }\n if (playerHand.size() == 0){\n // Occurs when the player has no more card in the hand\n game.setRecentPlayer(game.getPlayers().get((game.getPlayers().indexOf(this)+1)%game.getPlayers().size()).getPlayerName());\n playerLeft(game);\n }\n }", "public void playMove(int turn)\t{\n\t\tString command;\n\t\tint index = -1;\n\t\tCard dealt;\n\t\tCard drawn;\n\t\tboolean illegal = false;\n\t\tSystem.out.println(\"\\n\" + hand[turn].toString() + \"\\n\");\n\t\tSystem.out.println(\"Choose a number, or 'd' for draw, or 'p' for pass.\");\n\t\tcommand = input.nextLine();\n\t\trecord[turn] = command;\n\t\tif(command.equalsIgnoreCase(\"d\"))\t{\n\t\t\tdrawn = deck1.deal();\n\t\t\tif(drawn!=null)\t{\n\t\t\t\thand[turn].addCard(drawn);\n\t\t\t}\n\t\t\telse\t{\n\t\t\t\tSystem.out.print(\"\\n+++++No cards in deck!\");\n\t\t\t}\n\t\t\tplayMove(turn);\n\t\t}\n\t\telse if(command.equalsIgnoreCase(\"p\"))\t{\n\t\t\tif(deck1.isEmpty() || !hand[turn].playable(top))\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse\t{\n\t\t\t\tSystem.out.print(\"\\n+++++Cannot pass!+++++\\n\");\n\t\t\t\tplayMove(turn);\n\t\t\t}\n\t\t}\n\t\telse\t{\n\t\t\tif(isNumber(command))\t{\n\t\t\t\tindex = Integer.parseInt(command);\n\t\t\t}\n\t\t\telse\t{\n\t\t\t\tSystem.out.println(\"Invalid Command!\");\n\t\t\t\tplayMove(turn);\n\t\t\t}\n\t\t\tif(index>=0 && index<hand[turn].countCards())\t{\n\t\t\t\tdealt = hand[turn].seekCard(index);\n\t\t\t\tif(top.getValue()!=8)\t{\n\t\t\t\t\tif(top.getSuit().equals(dealt.getSuit()) || \n\t\t\t\t\t\t\ttop.getValue()==dealt.getValue() || \n\t\t\t\t\t\t\tdealt.getValue()==8)\t{\n\t\t\t\t\t\tif(dealt.getValue()==8)\t{\n\t\t\t\t\t\t\tdealt.setSuit(chooseSuit());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\t{\n\t\t\t\t\t\tillegal = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\t{\n\t\t\t\t\tif(dealt.getValue()==8 || \n\t\t\t\t\t\t\ttop.getChosenSuit().equalsIgnoreCase(dealt.getSuit()))\t{\n\t\t\t\t\t\tillegal = false;\n\t\t\t\t\t}\n\t\t\t\t\telse\t{\n\t\t\t\t\t\tillegal = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(illegal)\t{\n\t\t\t\t\tSystem.out.println(\"Illegal Move!\");\n\t\t\t\t\tplayMove(turn);\n\t\t\t\t}\n\t\t\t\telse\t{\n\t\t\t\t\ttop = dealt;\n\t\t\t\t\thand[turn].removeCard(index);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\t{\n\t\t\t\tSystem.out.println(\"Card does not exist!\");\n\t\t\t\tplayMove(turn);\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}", "public void checkMove(int playerID, int[] cardIdx) {\n\t\tHand attempt = cardIdx != null ? composeHand(this.getPlayerList().get(playerID),this.getPlayerList().get(playerID).play(cardIdx)) : null;\n\t\tif (cardIdx == null && (playerID == lastHandIdx || firstturn)) {\n\t\t\ttable.printMsg(\"{pass}\");\n\t\t\ttable.printMsg(\" <== Not a legal move!!!\\n\");\n\t\t} else if (cardIdx == null){\n\t\t\ttable.printMsg(\"{pass}\\n\");\n\t\t\tcurrentIdx = (playerID + 1) % getNumOfPlayers();\n\t\t\ttable.setActivePlayer(this.getCurrentIdx());\n\t\t\tfirstturn = false;\n\t\t\ttable.printMsg(this.getPlayerList().get(this.getCurrentIdx()).getName()+\"'s turn:\\n\");\n\t\t} else if (attempt == null) {\n\t\t\ttable.print(this.getPlayerList().get(playerID).play(cardIdx));\n\t\t\ttable.printMsg(\" <== Not a legal move!!!\\n\");\n\t\t} else if (firstturn && !attempt.contains(new BigTwoCard(0,2))) {\n\t\t\ttable.print(attempt);\n\t\t\ttable.printMsg(\" <== Not a legal move!!!\\n\");\n\t\t} else if ((!this.getHandsOnTable().isEmpty() && attempt!=null && playerID != lastHandIdx) ? (!(attempt.beats(this.getHandsOnTable().get(this.getHandsOnTable().size() - 1))) || attempt.size() != this.getHandsOnTable().get(this.getHandsOnTable().size() - 1).size()) : false) {\n\t\t\ttable.print(attempt);\n\t\t\ttable.printMsg(\" <== Not a legal move!!!\\n\");\n\t\t} else {\n\t\t\tthis.getPlayerList().get(playerID).removeCards(this.getPlayerList().get(playerID).play(cardIdx));\n\t\t\tattempt.sort();\n\t\t\tthis.getHandsOnTable().add(attempt);\n\t\t\tlastHandIdx = playerID;\n\t\t\ttable.printMsg(\"{\"+attempt.getType()+\"} \");\n\t\t\ttable.print(attempt);\n\t\t\ttable.printMsg(\"\\n\");\n\t\t\tcurrentIdx = (playerID + 1) % getNumOfPlayers();\n\t\t\ttable.setActivePlayer(this.getCurrentIdx());\n\t\t\tfirstturn = false;\n\t\t\ttable.printMsg(this.getPlayerList().get(this.getCurrentIdx()).getName()+\"'s turn:\\n\");\n\t\t}\n\t\ttable.resetSelected();\n\t\ttable.repaint();\n\t\t\n\t\tif (endOfGame()) {\n\t\t\ttable.printMsg(\"Game ends\\n\");\n\t\t\tfor (int i = 0; i < this.getNumOfPlayers(); i++) {\n\t\t\t\tif (this.getPlayerList().get(i).getNumOfCards() == 0) {\n\t\t\t\t\ttable.printMsg(this.getPlayerList().get(i).getName() + \" wins the game.\\n\");\n\t\t\t\t} else {\n\t\t\t\t\ttable.printMsg(this.getPlayerList().get(i).getName() + \" has \" + this.getPlayerList().get(i).getNumOfCards() + \" cards in hand.\\n\");\n\t\t\t\t}\n\t\t\t}\n\t\t\ttable.disable();\n\t\t}\n\t}", "public static void hitCorrect()\n\t{\n\t\tplayersCards.add(deck.deal());\n\t\tcurrentValue();\n\t\tuserCardImg[playersCards.size()-1].setIcon(new ImageIcon(Gameplay.class.getResource(getCard(playersCards.get(playersCards.size()-1)))));\n\t\tresume();\n\t\tif(calculateHand(playersCards)>21 || playersCards.size()==4 || calculateHand(playersCards)==0)\n\t\t{\n\t\t\troundEnd();\n\t\t}\n\t\t\n\t}", "private void checkSnap() {\n\t\tif (turned && view.getInstructions().getHidden())\n\t\t\tfor (PlayerView p: view.getPlayerViewList())\n\t\t\t\tif (playerHasPressed(p)) {\n\t\t\t\t\t// If last card is null, the turned card is the first card in the pile and can't be snap.\n\t\t\t\t\tif(game.getLastCard() != null)\n\t\t\t\t\t\tview.showLastCard(game.getLastCard().getValue());\n\t\t\t\t\tview.showSnapResult(p.getId(), game.snap(game.getPlayer(p.getId()-1)));\n\t\t\t\t\tdisplayPlayers();\n\t\t\t\t\tturned = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t}", "public boolean isWin_CommanderVimes(){\r\n // player got LordSelachii card\r\n Player playerHoldCard = null;\r\n for (Player player : discWorld.getPlayer_HASH().values()) {\r\n if (player.getPersonalityCardID() == 7) {\r\n playerHoldCard = player;\r\n break;\r\n }\r\n }\r\n \r\n if(playerHoldCard != null){\r\n if(discWorld.getShuffled_PlayerCard().size() == 0){\r\n return true;\r\n }\r\n } \r\n \r\n return false;\r\n }", "@Override\r\n\tboolean isFinished() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tif(checkForWin() != -1)\r\n\t\t\treturn true;\r\n\t\telse if(!(hasValidMove(0) || hasValidMove(1)))\r\n\t\t\treturn true; //game draw both are stuck\r\n\t\telse return false;\r\n\t}", "private boolean draw(Board board)\n {\n return full(board) && !computerWin(board) && playerWin(board);\n }", "private void decide(Player player, Card choiceCard) {\n player.removeCard(choiceCard);\n //Wild Draw\n if (choiceCard instanceof WildDrawCard) {\n //set wildDraw color\n while (true) {\n char color = controls.get(state.getTurn()).chooseColor();\n if (color == 'R' || color == 'G' || color == 'Y' || color == 'B') {\n ((WildDrawCard) choiceCard).setConfig(color);\n break;\n }\n System.out.println(\"Invalid color input.\");\n }\n //set wildDraw penalty\n char ch = 0;\n if(canChooseWildDrawCardPenalty(players.get(state.getNextTurn()))) {\n while (true) {\n ch = controls.get(state.getNextTurn()).yesOrNo();\n if (ch == 'Y' || ch == 'N'){\n break;\n }\n System.out.println(\"Invalid input.\");\n }\n }\n if (ch == 'N') {\n state.increaseWildDrawPenalty();\n }\n else {\n ((WildDrawCard) choiceCard).changeState(state);\n for (int i = 0; i < ((WildDrawCard) choiceCard).getForcedCards()*state.getWildDrawPenalty(); i++) {\n players.get(state.getTurn()).addCard(cards.get(0));\n cards.remove(0);\n }\n state.doWildDrawPenalty();\n }\n }\n\n //Wild\n else if (choiceCard instanceof WildCard) {\n while (true) {\n char color = controls.get(state.getTurn()).chooseColor();\n if (color == 'R' || color == 'G' || color == 'Y' || color == 'B') {\n ((WildCard) choiceCard).setConfig(color);\n break;\n }\n System.out.println(\"Invalid color input.\");\n }\n }\n\n //Reverse\n if (choiceCard instanceof ReverseCard) {\n ((ReverseCard) choiceCard).changeState(state);\n }\n\n //Skip\n if (choiceCard instanceof SkipCard) {\n ((SkipCard) choiceCard).changeState(state);\n }\n\n //Draw2\n if (choiceCard instanceof Draw2Card) {\n char ch = 0;\n if(canChooseDrawCardPenalty(players.get(state.getNextTurn()))) {\n while (true) {\n ch = controls.get(state.getNextTurn()).yesOrNo();\n if (ch == 'Y' || ch == 'N'){\n break;\n }\n System.out.println(\"Invalid input.\");\n }\n }\n if (ch == 'N') {\n state.increaseDrawPenalty();\n }\n else {\n ((Draw2Card) choiceCard).changeState(state);\n for (int i = 0; i < ((Draw2Card) choiceCard).getForcedCards()*state.getDrawPenalty(); i++) {\n players.get(state.getTurn()).addCard(cards.get(0));\n cards.remove(0);\n }\n state.doDrawPenalty();\n }\n }\n changeCurrentCard(choiceCard);\n }", "@Override\n public boolean isWaitingForTurnPhase() {return true;}", "public boolean isGameWon(){\r\n for(Card c: this.cards){\r\n if (c.getFace() == false){\r\n return false;\r\n }\r\n }\r\n return true;\r\n }", "boolean isPlayerTurn();", "public void checkMoveOrPass(){\n if (this.xTokens.size() > 0) {\n this.diceRoller = false;} \n else { //if no tokens to move, pass and let player roll dice\n this.turn++;\n //System.out.println(\"next turn player \" + this.players[currentPlayer].getColor());\n }\n this.currentPlayer = this.xPlayers.get(this.turn % this.xPlayers.size());\n }", "public boolean validMove(int playerID, Card selectedCard){\n // turn == playerID\n if(gameStage == 3){\n if(numPlays == 0){\n if(playerID == 0){\n player1Play = selectedCard;\n // card goes to middle\n //checks suit of the jack if played first and sets first played suit to the correct suit\n //according to which suit is trump\n if(selectedCard.getValue() == Card.NUMBER.JACK){\n if(currentTrumpSuit == Card.SUIT.DIAMONDS && selectedCard.getSuit() == Card.SUIT.HEARTS){\n firstPlayedSuit = Card.SUIT.DIAMONDS;\n }\n if(currentTrumpSuit == Card.SUIT.HEARTS && selectedCard.getSuit() == Card.SUIT.DIAMONDS){\n firstPlayedSuit = Card.SUIT.HEARTS;\n }\n if(currentTrumpSuit == Card.SUIT.CLUBS && selectedCard.getSuit() == Card.SUIT.SPADES){\n firstPlayedSuit = Card.SUIT.CLUBS;\n }\n if(currentTrumpSuit == Card.SUIT.SPADES && selectedCard.getSuit() == Card.SUIT.CLUBS){\n firstPlayedSuit = Card.SUIT.SPADES;\n }\n }\n else{\n firstPlayedSuit = player1Play.getSuit();\n }\n numPlays++;\n turn++;\n return true;\n }\n else if(playerID == 1){\n player2Play = selectedCard;\n // card goes to middle\n //checks suit of the jack if played first and sets first played suit to the correct suit\n //according to which suit is trump\n if(selectedCard.getValue() == Card.NUMBER.JACK){\n if(currentTrumpSuit == Card.SUIT.DIAMONDS && selectedCard.getSuit() == Card.SUIT.HEARTS){\n firstPlayedSuit = Card.SUIT.DIAMONDS;\n }\n if(currentTrumpSuit == Card.SUIT.HEARTS && selectedCard.getSuit() == Card.SUIT.DIAMONDS){\n firstPlayedSuit = Card.SUIT.HEARTS;\n }\n if(currentTrumpSuit == Card.SUIT.CLUBS && selectedCard.getSuit() == Card.SUIT.SPADES){\n firstPlayedSuit = Card.SUIT.CLUBS;\n }\n if(currentTrumpSuit == Card.SUIT.SPADES && selectedCard.getSuit() == Card.SUIT.CLUBS){\n firstPlayedSuit = Card.SUIT.SPADES;\n }\n }\n else{\n firstPlayedSuit = player2Play.getSuit();\n }\n numPlays++;\n turn++;\n return true;\n }\n else if(playerID == 2){\n player3Play = selectedCard;\n // card goes to middle\n //checks suit of the jack if played first and sets first played suit to the correct suit\n //according to which suit is trump\n if(selectedCard.getValue() == Card.NUMBER.JACK){\n if(currentTrumpSuit == Card.SUIT.DIAMONDS && selectedCard.getSuit() == Card.SUIT.HEARTS){\n firstPlayedSuit = Card.SUIT.DIAMONDS;\n }\n if(currentTrumpSuit == Card.SUIT.HEARTS && selectedCard.getSuit() == Card.SUIT.DIAMONDS){\n firstPlayedSuit = Card.SUIT.HEARTS;\n }\n if(currentTrumpSuit == Card.SUIT.CLUBS && selectedCard.getSuit() == Card.SUIT.SPADES){\n firstPlayedSuit = Card.SUIT.CLUBS;\n }\n if(currentTrumpSuit == Card.SUIT.SPADES && selectedCard.getSuit() == Card.SUIT.CLUBS){\n firstPlayedSuit = Card.SUIT.SPADES;\n }\n }\n else{\n firstPlayedSuit = player3Play.getSuit();\n }\n numPlays++;\n turn++;\n return true;\n }\n else if(playerID == 3){\n player4Play = selectedCard;\n // card goes to middle\n //checks suit of the jack if played first and sets first played suit to the correct suit\n //according to which suit is trump\n if(selectedCard.getValue() == Card.NUMBER.JACK){\n if(currentTrumpSuit == Card.SUIT.DIAMONDS && selectedCard.getSuit() == Card.SUIT.HEARTS){\n firstPlayedSuit = Card.SUIT.DIAMONDS;\n }\n if(currentTrumpSuit == Card.SUIT.HEARTS && selectedCard.getSuit() == Card.SUIT.DIAMONDS){\n firstPlayedSuit = Card.SUIT.HEARTS;\n }\n if(currentTrumpSuit == Card.SUIT.CLUBS && selectedCard.getSuit() == Card.SUIT.SPADES){\n firstPlayedSuit = Card.SUIT.CLUBS;\n }\n if(currentTrumpSuit == Card.SUIT.SPADES && selectedCard.getSuit() == Card.SUIT.CLUBS){\n firstPlayedSuit = Card.SUIT.SPADES;\n }\n }\n else{\n firstPlayedSuit = player4Play.getSuit();\n }\n numPlays++;\n turn = 0;\n return true;\n }\n }\n else if(numPlays < 3){\n if(playerID == 0){\n player1Play = selectedCard;\n numPlays++;\n turn++;\n return true;\n }\n else if(playerID == 1){\n player2Play = selectedCard;\n numPlays++;\n turn++;\n return true;\n }\n else if(playerID == 2){\n player3Play = selectedCard;\n numPlays++;\n turn++;\n return true;\n }\n else if(playerID == 3){\n player4Play = selectedCard;\n numPlays++;\n turn = 0;\n return true;\n }\n }\n // if three cards have been played this is the last card\n else if(numPlays == 3){\n if(playerID == 0){\n player1Play = selectedCard;\n numPlays++;\n firstPlayedSuit = null;\n return true;\n }\n else if(playerID == 1){\n player2Play = selectedCard;\n numPlays++;\n firstPlayedSuit = null;\n return true;\n }\n else if(playerID == 2){\n player3Play = selectedCard;\n numPlays++;\n firstPlayedSuit = null;\n return true;\n }\n else if(playerID == 3){\n player4Play = selectedCard;\n numPlays++;\n firstPlayedSuit = null;\n return true;\n }\n }\n }\n return false;\n }", "private void playThisCard(UnoCard clickedCard) throws NotYourTurnException, InvalidMoveException {\n\t\t// Check player's turn\n\t\tif (!isHisTurn(clickedCard)) {\n\t\t\tthrow new NotYourTurnException();\n\t\t} else {\n\n\t\t\t// Card validation\n\t\t\tif (isValidMove(clickedCard)) {\n\n\t\t\t\tplayedCards().add(clickedCard);\n\n\t\t\t\tremovePlayedCard(clickedCard);\n\n\t\t\t\t// function cards ??\n if (clickedCard instanceof ActionCard) {\n performAction(clickedCard);\n\n }\n\n\t\t\t\tfor (GameListener listener : gameListeners) {\n\t\t\t\t\tlistener.cardPlayed(clickedCard);\n\t\t\t\t}\n\n\t\t\t\tcheckResults();\n\t\t\t} else {\n\t\t\t\tthrow new InvalidMoveException();\n\n\t\t\t}\n\t\t}\n\t}", "public Card takeTurn() {\n //display current hand and prompt the user to input a card to play\n Scanner scanner = new Scanner(System.in);\n while(true) {\n System.out.println(name+\"'s turn\");\n System.out.println(\"Your current hand is:\");\n System.out.print(\"[\"+hand.getCards().get(0));\n for(int i=1; i<hand.getCards().size(); i++) {\n System.out.print(\", \"+hand.getCards().get(i));\n }\n System.out.println(\"]\");\n System.out.println(\"Which card do you want to play?\");\n //read the user's input and make sure it's a valid card\n String input = scanner.next();\n //if the user entered nothing, they draw by default\n if(input.equals(\"none\")) {\n return null;\n }\n Suit inputSuit = null;\n switch(input.substring(input.length()-1).toLowerCase()) {\n case \"c\":\n inputSuit = Suit.CLUBS;\n break;\n case \"s\":\n inputSuit = Suit.SPADES;\n break;\n case \"h\":\n inputSuit = Suit.HEARTS;\n break;\n case \"d\":\n inputSuit = Suit.DIAMONDS;\n break;\n default:\n throw new InvalidCardException(\"Invalid suit\");\n }\n int inputRank = Integer.parseInt(input.substring(0,input.length()-1));\n if(inputRank < 1 || inputRank > 13) {\n throw new InvalidCardException(\"Invalid rank\");\n }\n //if the player has it in their hand, then play it\n ArrayList<Card> cards = hand.getCards();\n for(int i=0; i<cards.size(); i++) {\n if(cards.get(i).equals(new Card(inputSuit, inputRank))) {\n return hand.draw(input);\n }\n }\n System.out.println(\"Invalid card. Try again\");\n }\n }", "public void currentPlayerDrawCard() {\n Player currentPlayer = turnManager.currentPlayer();\n UnoCard newCard = getNextCard();\n currentPlayer.obtainCard(newCard);\n\n for (GameListener gameListener : gameListeners) {\n gameListener.cardDrawn();\n }\n\t}", "public abstract boolean doTurn(Deck theDeck);", "public abstract void doGuiTurn(Card draw, Card discard, Deck theDeck);", "@Override\r\n public boolean playTurn()\r\n {\n System.out.println(\"current bid = \" + currentBid);\r\n currentBid = players[currentPlayer].playHand(currentBid);\r\n\r\n System.out.println(\"Player bid = \" + currentBid);\r\n // Add hand played to discard pile\r\n discards.add(currentBid.getHand());\r\n // Offer all other players the chance to call cheat\r\n int callee = -1;\r\n {\r\n int[] calls = new int[MINPLAYERS];\r\n int i = 0;\r\n for (int j = 0; j < players.length; ++j)\r\n {\r\n // don't allow us to call cheat on ourselves\r\n if (currentPlayer == j)\r\n continue;\r\n Player p = players[j];\r\n if (p.callCheat(currentBid, currentPlayer))\r\n calls[i++] = j;\r\n }\r\n if (i > 0)\r\n callee = calls[rg.nextInt(i)];\r\n }\r\n\r\n if (callee != -1)\r\n {\r\n System.out.println(\"Player called cheat by Player \" + (callee+1));\r\n if (isCheat(currentBid)) //CHEAT CALLED CORRECTLY\r\n {\r\n for (Player p : players)\r\n p.broadcastCheat(currentPlayer, callee, true);\r\n //Give the discard pile of cards to currentPlayer who then has to play again\r\n players[currentPlayer].addHand(discards);\r\n System.out.println(\"Player cheats!\");\r\n System.out.println(\"Adding cards to player \"+\r\n (currentPlayer+1) + \" \" + players[currentPlayer]);\r\n }\r\n else //CHEAT CALLED INCORRECTLY\r\n {\r\n for (Player p : players)\r\n p.broadcastCheat(currentPlayer, callee, false);\r\n System.out.println(\"Player Honest\");\r\n currentPlayer = callee; // set the currentPlayer to callee\r\n // later on we'll increase this, so it's the person after\r\n // they who called's turn.\r\n players[currentPlayer].addHand(discards);\r\n System.out.println(\"Adding cards to player \"+\r\n (currentPlayer+1) + players[currentPlayer]);\r\n }\r\n //If cheat is called, current bid reset to an empty bid with rank two whatever\r\n //the outcome\r\n currentBid = new Bid();\r\n //Discards now reset to empty\r\n discards = new Hand();\r\n }\r\n else\r\n {\r\n System.out.println(\"No Cheat Called\");\r\n }\r\n /*\r\n Game bug fix:\r\n The design of the game, as given, was floored in conjuction with\r\n the required implementations of the strategies.\r\n A scenario can arise where one player has all the twos and the other\r\n has none, but it's their turn to play.\r\n The player with all the twos can consitently correctly call cheat on the\r\n player, as they have to claim to of laid a 2.\r\n\r\n This is easily fixed by moving the turn to the player after the one who\r\n just got called out\r\n */\r\n currentPlayer = (currentPlayer+1) % nosPlayers;\r\n return true;\r\n }", "private static boolean canMove() {\n return GameManager.getCurrentTurn();\r\n }", "public void checkCards(){\r\n if (Card1.getSource().equals(Card2.getSource())){\r\n Card1.setEnabled(false); \r\n Card2.setEnabled(false);\r\n Card1.setBackground(new Color(190, 190, 255));\r\n Card2.setBackground(new Color(190, 190, 255));\r\n Card1.setFace(true); \r\n Card2.setFace(true);\r\n if (this.isGameWon()){\r\n \t_s.stopThread();\r\n \tint[] x = _s.getTime();\r\n \tString s = \"\" + x[0] + \":\" + x[1] + \":\" + x[2] + \":\" + x[3];\r\n \tUIManager.put(\"OptionPane.background\",new ColorUIResource(0,255,0));\r\n UIManager.put(\"Panel.background\",new ColorUIResource(250,0,150));\r\n UIManager.put(\"OptionPane.messageFont\", new FontUIResource(new Font( \r\n \"Times New Roman\", Font.BOLD, 18)));\r\n JOptionPane.showMessageDialog(this, \"You win!\\n\"\r\n \t\t+ \"Your time is: \" + s +\"\\n\"\r\n \t\t\t\t+ \"You're (probably) getting better...\", \"\", -1, null);\r\n JOptionPane.showMessageDialog(this, \"Thanks for playing!\\n\"\r\n \t\t+ \"(Rhythm Heaven is a property of Nintendo and Tsunku.)\", \"\", -1, null);\r\n System.exit(0);\r\n }\r\n }\r\n\r\n else{\r\n Card1.setIcon(null); \r\n Card2.setIcon(null);\r\n }\r\n Card1 = null; \r\n Card2 = null;\r\n }", "private void checkIfMyTurn(boolean currPlayer) {\n gameService.setMyTurn(currPlayer);\n System.out.println();\n System.out.println(\"My turn now: \" + gameService.isMyTurn());\n\n if (! currPlayer) {\n gameService.setLabelTurnText(\"Wait for your turn.\");\n updateFields(gameService.receiveUpdates());\n } else {\n gameService.setLabelTurnText(\"Your turn!\");\n }\n }", "private boolean turnIfNeeded() {\n\t\tif (needToTurn()) {\n\t\t\tturnToDesiredDirection();\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "private void dealerTurns()\r\n\t{\r\n\t\t// loops until dealer stands or wins/loses\r\n\t\twhile ( !dealer.getStand() && !endGame )\r\n\t\t{\r\n\t\t\t// checks total score of dealer's hand\r\n\t\t\tif ( dealer.getTotal() < 17)\r\n\t\t\t{\r\n\t\t\t\t// adds card to dealer hand from cardDeck\r\n\t\t\t\tdealer.hit( cardDeck.draw() );\r\n\t\t\t\t\r\n\t\t\t\t// displays current dealer hand\r\n\t\t\t\tdisplayPlayerCards(DEALER_ID);\r\n\t\t\t\t\r\n\t\t\t\t// evaluates victory conditions\r\n\t\t\t\tevaluateWin(false);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t/* Dealer stands if they reach or already have 17 points in their hand.\r\n\t\t\t\tNo evaluation is called, because this will be handled by the final victory check. */\r\n\t\t\t\tdealer.stand();\r\n\t\t\t} // end if else\r\n\t\t} // end while\r\n\t}", "public void checkPlay(int[][] boardState)\n {\n if(ai)\n {\n takeTurn(boardState);\n }\n }", "public boolean switchPhase() {\n int cpuShipCounter = 0;\n int playerShipCounter = 0;\n do {\n cpuShipCounter = 0;\n playerShipCounter = 0;\n if (!cpuHasPlaced) {\n placeComputerShipsDumb((int) (Math.random() * 19) + 1);\n }\n for(int i = 0; i < 10; i++){\n for(int j = 0; j <10; j++){\n if(humanPlayerBoard[i][j] == board.ship.ordinal()){\n playerShipCounter++;\n }\n if (computerPlayerBoard[i][j] == board.ship.ordinal()) {\n cpuShipCounter++;\n }\n }\n }\n if (cpuShipCounter != 17) {\n cpuHasPlaced = false;\n cpuShipCounter = 0;\n playerShipCounter = 0;\n for (int i = 0; i < 10; i++) {\n for (int j = 0; j < 10; j++) {\n computerPlayerBoard[i][j] = 0;\n }\n }\n }\n\n } while (cpuShipCounter != 17);\n\n if(cpuShipCounter == 17 && playerShipCounter == 17){\n inGame = true;\n return true;\n }\n\n return false;\n }", "public abstract void selfCardDrawn(Card card);", "boolean prepareToMove();", "public void haveTurn(int turn)\n {\n boolean playing;\n do{\n System.out.println(\"It is \" + getName() + \"'s turn.\");\n Card book = checkForBooks();\n if(book != null)\n System.out.println(\"Your opponent got a book of \" + book + \"s...\");\n if (hand.size() == 0)\n {\n System.out.print(\"Your opponent's hand is empty.\");\n break;\n }\n Card request = aiRequestLogic();\n Player target = aiRequestTarget(GoFish.Players[turn]);\n System.out.println(\"Your opponent asks \" + target.getName() + \" for cards by the name of \" + request);\n playing = askFor(request, target);\n if (playing)\n System.out.println(\"Your opponent took \" + target.getName() + \"'s \" + request + \"s!\");\n } while(playing);\n\n System.out.println(\"Your opponent goes fishing.\");\n fish();\n }", "public void catchCard(){\r\n changePlace(deck);\r\n changePlace(hand);\r\n }", "public boolean isValidMove(Card card)\n {\n return false;\n }", "public void tryAct() {\n\n List<Player> onCardPlayers = new ArrayList<Player>();\n List<Player> offCardPlayers = new ArrayList<Player>();\n if (currentPlayer.isEmployed() == true) {\n if(!currentPlayer.getHasPlayed()){\n onCardPlayers = findPlayers(currentPlayer.getLocation().getOnCardRoles());\n offCardPlayers = findPlayers(currentPlayer.getLocation().getOffCardRoles());\n currentPlayer.act(onCardPlayers, offCardPlayers);\n refreshPlayerPanel();\n }\n else{\n view.showPopUp(currentPlayer.isComputer(), \"You've already moved, rehearsed or acted this turn. Try a different command or click `end turn` to end your turn.\");\n }\n }\n else {\n view.showPopUp(currentPlayer.isComputer(), \"You're not employed, so you need to take a role before you can act.\");\n }\n view.updateSidePanel(playerArray);\n }", "public void playTurn(){\r\n\t\t// all exceptions in this method are caught, because if this method throws an exception\r\n\t\t// the AIPlayer will not draw/discard a card and the program will freeze\r\n\t\ttry{\r\n\t\t\tupdateLastCardDiscarded();\r\n\t\t}catch(Exception e){\r\n\t\t\tSystem.out.println(\"AIPlayer, lastCard: \" + e.toString());\r\n\t\t}\r\n\t\ttry{\r\n\t\t\tif(!(drawOrPickUp()^bestChoice(BEST_CHOICE_AT_FIFTY))){ // choose whether to draw from the deck or pick up from the stack\r\n\t\t\t\tif(!game.getRound().drawFromDiscard()) // If picking up from the discard is not possible,\r\n\t\t\t\t\tgame.getRound().drawFromDeck(); // draw from the deck instead\r\n\t\t\t}else{\r\n\t\t\t\tgame.getRound().drawFromDeck();\r\n\t\t\t}\r\n\t\t}catch(Exception e){\r\n\t\t\tSystem.out.println(\"AIPlayer, draw: \" + e.toString());\r\n\t\t\tgame.getRound().drawFromDeck(); // if something goes wrong, draw\r\n\t\t}\r\n\r\n\t\ttry{\r\n\t\t\tgroup = new Groups(this, getHand());\r\n\t\t\tif(!hasLaidDownPhase() && group.getCompletePhaseGroups() != null && // if the AI player, hasn't laid down PhaseGroups\r\n\t\t\t\t\tgroup.getCompletePhaseGroups().length == Configuration.getNumberRequired(getPhase()) && // will lay down the right number of phasesGroups\r\n\t\t\t\t\tgetGame().getRound().getTurnNumber() >= 8 - (difficulty/10)) // is past a certain turn number based off difficulty\r\n\t\t\t\taddPhaseGroups(group.getCompletePhaseGroups()); \r\n\t\t}catch(Exception e){\r\n\t\t\tSystem.out.println(\"AIPlayer, laydown: \" + e.toString()); // laid down all my cards Hand92,AI90afterAI74\r\n\t\t}\r\n\r\n\t\ttry{\r\n\t\t\tif(hasLaidDownPhase())\r\n\t\t\t\tplayOffPhases();\r\n\t\t}catch(Exception e){\r\n\t\t\tSystem.out.println(\"AIPlayer, playoff: \" + e.toString());\r\n\t\t}\r\n\r\n\t\ttry{\r\n\t\t\tlastCardDiscarded = discardCard();\r\n\t\t\tgame.getRound().discard(lastCardDiscarded); // discard\r\n\t\t}catch(Phase10Exception e){\t\r\n\t\t}catch(Exception e){\r\n\t\t\tlastCardDiscarded = getHand().getCard(0);\r\n\t\t\tgame.getRound().discard(lastCardDiscarded);\r\n\t\t\tSystem.out.println(\"AIPlayer, discard: \" + e.toString());\r\n\t\t}\r\n\t}", "public void turnOver() {\n if(firstPlayer == whosTurn()) {\n turn = secondPlayer;\n } else {\n turn = firstPlayer;\n }\n hasPlacedPiece = false;\n hasRotatedBoard = false;\n }", "public boolean isHisTurn(UnoCard clickedCard) {\n\t\tfor (Player p : getPlayers()) {\n\t\t\tif (p.hasCard(clickedCard) && p.isMyTurn())\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "private void checkToDrawAnotherCard(final SwccgGame game, final OptionalGameTextTriggerAction action, final String playerId) {\n if (GameConditions.hasReserveDeck(game, playerId)\n && GameConditions.numCardsInHand(game, playerId) < 6) {\n action.appendEffect(\n new PlayoutDecisionEffect(action, playerId,\n new YesNoDecision(\"Do you want to draw another card from Reserve Deck?\") {\n @Override\n protected void yes() {\n action.appendEffect(\n new DrawCardIntoHandFromReserveDeckEffect(action, playerId) {\n @Override\n protected void cardDrawnIntoHand(PhysicalCard cardDrawn) {\n checkToDrawAnotherCard(game, action, playerId);\n }\n }\n );\n }\n }\n )\n );\n }\n }", "public void reinforce() {\r\n\r\n\t\tmch.clicked = false;\r\n\t\t\r\n\t\tif (phaseInit == 0) {\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tattackSlide.setVisible(false);\r\n\t\t\tattacker.setVisible(false);\r\n\t\t\treinforced = false;\r\n\t\t\t// If run out of cards, fill the cards array with the usedCards\r\n\t\t\tif (Cards.size() == 0) {\r\n\t\t\t\tCards = usedCards;\r\n\t\t\t\tusedCards = new ArrayList<Card>();\r\n\t\t\t\tCollections.shuffle(Cards);\r\n\t\t\t}\r\n\t\t\t// Dehighlight all countries that were previously highlighted\r\n\t\t\t\r\n\t\t\tfor (Player pa : players) {\r\n\t\t\t\tfor (Country ca : pa.getCountries()){\r\n\t\t\t\t\tif (ca.isHighlighted()) {\r\n\t\t\t\t\t\tnew threadz(ca, pa.getColor(), false);\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\r\n\t\t\t// If a player has attacked that turn and won at least one battle it will win a\r\n\t\t\t// card\r\n\t\t\tif (hasAttacked == true && hasWon == true) {\r\n\t\t\t\t// Give that player a card.\r\n\t\t\t\tplayers.get(turnCounter).addCard(Cards.get(0));\r\n\t\t\t\tCards.remove(0);\r\n\t\t\t\thasAttacked = false;\r\n\t\t\t\thasWon = false;\r\n\r\n\t\t\t\t// Refresh the cards\r\n\t\t\t\tfor (int x = 0; x < 5; x++) {\r\n\t\t\t\t\tcardPics[x].setIcon(null);\r\n\t\t\t\t\tif (cardPics[x].getMouseListeners() != null)\r\n\t\t\t\t\t\tcardPics[x].removeMouseListener(mch);\r\n\t\t\t\t\tcardSelectedPics[x].setVisible(false);\r\n\t\t\t\t\tcardSelectedPics[x].setBackground(players.get(turnCounter).getColor());\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Draw the player's cards\r\n\t\t\t\tg.setColor(Color.WHITE);\r\n\t\t\t\tg.setFont(new Font(\"Impact\", Font.BOLD, 20));\r\n\t\t\t\tg.drawString(\"Player \" + (turnCounter + 1) + \"'s Cards\", 105, 750);\r\n\t\t\t\tBufferedImage img = null;\r\n\t\t\t\tfor (int y = 0; y < players.get(turnCounter).getCards().size(); y++) {\r\n\t\t\t\t\tcardPics[y].addMouseListener(mch);\r\n\t\t\t\t\tcardPics[y].setEnabled(true);\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\timg = ImageIO.read(\r\n\t\t\t\t\t\t\t\t// Read in the image from a separate file\r\n\t\t\t\t\t\t\t\tnew File (\"Ressources/\" +\"Cards/\" + players.get(turnCounter).getCards().get(y).getCountry()\r\n\t\t\t\t\t\t\t\t\t\t+ \"Card.png\"));\r\n\t\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\t\t// Catch\r\n\t\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcardPics[y].setIcon(new ImageIcon(recolorCard(img, y)));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tString s = \"\";\r\n\t\tfor (Player p : Board.players) {\r\n\t\t\t// get the name of the country that has been clicked\r\n\t\t\tfor (Country c : p.getCountries()) {\r\n\t\t\t\tif (hoveredColor.equals(c.getDetectionColor())) {\r\n\t\t\t\t\ts = c.getName();\r\n\t\t\t\t}\r\n\t\t\t\t// Ensure this country is one the current player owns and the country has more\r\n\t\t\t\t// than one troop\r\n\t\t\t\tif (hoveredColor.equals(c.getDetectionColor()) && players.get(turnCounter).checkOwn(s)&& c.getTroops() > 1 && c.isHighlighted() == false && reinforced == false) {\r\n\t\t\t\t\t// Dehighlight any countries that were previously selected\r\n\t\t\t\t\tfor (Player player : players) {\r\n\t\t\t\t\t\tfor (Country ca : player.getCountries()) {\r\n\t\t\t\t\t\t\tif (ca.isHighlighted()) {\r\n\t\t\t\t\t\t\t\tnew threadz(ca, player.getColor(), false);\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\t// Highlight the new selected country, and its neighboring countries\r\n\t\t\t\t\tnew threadz(c, players.get(turnCounter).getColor().brighter().brighter().brighter(), true);\r\n\t\t\t\t\tc.highlightOwned();\r\n\t\t\t\t\tattackingCountry = c;\r\n\t\t\t\t\treinforced = true;\r\n\t\t\t\t} else if (hoveredColor.equals(c.getDetectionColor()) && c.isHighlighted()\r\n\t\t\t\t\t\t&& c.getName().equals(attackingCountry.getName()) \r\n\t\t\t\t\t\t== false && checkO(c) == true\r\n\t\t\t\t\t\t&& attackingCountry.getTroops() > 1) {\r\n\r\n\t\r\n\t\t\t\t\tdefendingCountry = c;\r\n\r\n\t\t\t\t\tattackingCountry.setTroops(attackingCountry.getTroops() - 1);\r\n\t\t\t\t\tdefendingCountry.setTroops(defendingCountry.getTroops() + 1);\r\n\r\n\t\t\t\t\t// new threadz(attackingCountry,\r\n\t\t\t\t\t// players.get(turnCounter).getColor().brighter().brighter().brighter(), false);\r\n\r\n\t\t\t\t\tif (attackingCountry.getTroops() == 1) {\r\n\t\t\t\t\t\tattackingCountry.unHighlightNeighbours();\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tphaseInit++;\r\n\t}", "public void nextTurn()\n\t{\n\t\tthis.actionListToExecute.clear();\n\t\tthis.board.discardLastPlayedCard();\n\t\tthis.getCurrentPlayer().getDataInput().printMessage(this.getCurrentPlayerGameStatus());\n\t\tthis.getCurrentPlayer().execEndOfTurn();\n\t\t\n\t\tint nbPlayerCardPickup = this.getAmountOfPlayerCardToFillYourHand() - this.getCurrentPlayer().getPlayerCardDeck().size();\n\t\tfor(int i = 0; i < nbPlayerCardPickup; i++)\n\t\t{\n\t\t\tthis.getCurrentPlayer().getPlayerCardDeck().addCard(this.getNextPlayerCard());\n\t\t}\n\t\t\n\t\tcurrentPlayerID = (currentPlayerID + 1) % this.getPlayerList().size();\n\t\tif(currentPlayerID == 0)\n\t\t{\n\t\t\tcurrentPlayerID = this.getPlayerList().size();\n\t\t}\n\t\tthis.getCurrentPlayer().execBeginOfTurn();\n\t\tinitBeginOfTurn();\n\t}", "@Override\n public boolean isUsable(Player player, boolean firstTurn) {\n\n return player.canPlaceOnThisTurn(firstTurn) && player.canUseCardOnThisTurn(firstTurn) && player.getGrid().getPlacedDice() >0;\n }", "public boolean canUseCard(Card card) {\r\n\t\tif (card.cardColor.contains(CardColor.GREEN)\r\n\t\t\t\t|| card.cardColor.contains(CardColor.GREY)) {\r\n\t\t\treturn false;\r\n\t\t} else if (this.blackTurns > 0) {\r\n\t\t\treturn true;\r\n\t\t} else if (card.cardColor.contains(CardColor.PURPLE)\r\n\t\t\t\t&& this.purpleTurns > 0) {\r\n\t\t\treturn true;\r\n\t\t} else if (card.cardColor.contains(CardColor.RED) && this.redTurns > 0) {\r\n\t\t\treturn true;\r\n\t\t} else if (card.cardColor.contains(CardColor.BLUE)\r\n\t\t\t\t&& this.blueTurns > 0) {\r\n\t\t\treturn true;\r\n\t\t} else if (card.cardColor.contains(CardColor.BROWN)\r\n\t\t\t\t&& this.brownTurns > 0) {\r\n\t\t\treturn true;\r\n\t\t} else\r\n\t\t\treturn false;\r\n\t}", "private void checkForPlayerChance()\n\t\t\t{\n\t\t\t\tf = false;\n\t\t\t\tfor (j = 0; j < 8; ++j)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (win[j] == 2 && lose[j] == 0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tf = true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\tif (f == false)\n\t\t\t\t\tj = 10;\n\n\t\t\t}", "public void tryStand() {\n if(player.getHand().size() > 0){\n firstStand = true;\n dealerTurn(1);\n } else{\n errorFlag = true;\n userMessage = \"You must get your initial hand dealt before you can stand\";\n }\n\n\n }", "@Override\n public void play(){\n \n // while neither player is dead\n while (continueGame()) {\n \n // both player and cpu draw a card and display the card\n player.play();\n System.out.printf(\"%s has drawn %s \\n\", player.getPlayerID(), \n player.getCard());\n cpu.play();\n System.out.printf(\"%s has drawn %s \\n\", cpu.getPlayerID(), \n cpu.getCard());\n \n // checks if the player wins the round\n if (winRound(player, cpu)) {\n // adds the cards to the gamedeck then the game deck to the\n // player deck\n winner(player, cpu, gameDeck);\n player.getWinningsPile().addCards(gameDeck.showCards().subList(0\n , gameDeck.getSize()));\n // empties the game deck\n gameDeck.showCards().clear();\n System.out.printf(\"%s wins round\\n\", player.getPlayerID());\n } else if (winRound(cpu, player)) { // if the cpu wins\n // adds the cards to the gamedeck then the game deck to the\n // cpu deck\n winner(cpu, player, gameDeck);\n cpu.getWinningsPile().addCards(gameDeck.showCards().subList(0, \n gameDeck.getSize()));\n // empties the game deck\n gameDeck.showCards().clear();\n System.out.println(\"CPU wins round\");\n } else {\n // if its a draw, check to see if either the cpu or player is\n // dying, if so, dont add the card to the gameDeck\n if (!(player.isDying())) {\n gameDeck.addCard(player.getCard());\n player.clearCard();\n }\n if (!(cpu.isDying())) {\n gameDeck.addCard(cpu.getCard());\n cpu.clearCard();\n }\n System.out.println(\"DRAW\");\n }\n // shows the current status of the game\n System.out.printf(\"%s's deck: %d winnings: %d \\n\", \n player.getPlayerID(), player.getDeck().getSize(), \n player.getWinningsPile().getSize());\n System.out.printf(\"CPU deck: %d winnings: %d \\n\", \n cpu.getDeck().getSize(), \n cpu.getWinningsPile().getSize());\n System.out.println(\"Press Enter to go to the next round\");\n in.nextLine();\n }\n //display the winner\n declareWinner();\n }", "private boolean isPlayerTurn(Move move) {\n return this.turn == move.getPlayer().getId();\n }", "private void playTurn(Player player) {\n\n System.out.println(player.toString() + \"'s turn\");\n\n if (!player.getOccupiedSet().isEmpty())\n while(true) {\n Movement move = player.getMove();\n if (validMove(player, move)) {\n move(player, move);\n break;\n }\n }\n }", "private void playTurn()\n {\n try\n {\n XMLHandler.saveGame(game, GAME_CLONE_PATH);\n }\n catch(IOException | JAXBException | SAXException ex)\n {\n // TODO... ConsoleUtils.message(\"An internal save error has occured, terminating current game\");\n gameEnded = true;\n return;\n }\n \n moveCycle();\n \n if (!game.validateGame()) \n {\n IllegalBoardPenalty();\n }\n \n String gameOverMessage = game.isGameOver();\n if (gameOverMessage != null) \n {\n //TODO: ConsoleUtils.message(gameOverMessage);\n gameEnded = true;\n }\n \n game.switchPlayer();\n }", "public void play() {\n\t\t// setting up\n\t\tdeck = new Deck();\n\t\tdeck.shuffle();\n\t\tint turn = 0;\n\t\tRandom rand = new Random();\n\t\tCardRank previousCardRank = null;\n\t\tboolean snapTime = false;\n\t\t\n\t\t// the turning card loop, which ends when two cards with the same value/rank are revealed\n\t\t// or when no cards are left in the deck\n\t\twhile (!snapTime) {\n\t\t\tString currentPlayer = (turn % 2 == 0) ? player1 : player2;\n\t\t\t\n\t\t\tint timeout = 1000 + rand.nextInt(1000);\n\t\t\t\n\t\t\ttry {\n\t\t\t\tTimeUnit.MILLISECONDS.sleep((long) timeout);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tCard nextCard = deck.turnCard();\n\t\t\t\n\t\t\t// possible draw if no cards are left in the deck\n\t\t\tif (nextCard == null) {\n\t\t\t\tSystem.out.println(\"No cards left in the deck! It's a draw!\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tSystem.out.println(currentPlayer + \" turns card \\'\" + nextCard + \"\\'\");\n\t\t\t\n\t\t\tturn++;\n\t\t\t\n\t\t\t// trigger the end of the turning card loop\n\t\t\tif (nextCard.getCardRank() == previousCardRank) {\n\t\t\t\tsnapTime = true;\n\t\t\t}\n\t\t\tpreviousCardRank = nextCard.getCardRank();\n\t\t}\n\t\t\n\t\t// simulate the time needed for both players to say \"SNAP!\"\n\t\tint snapTimeoutP1 = 500 + rand.nextInt(1000);\n\t\tint snapTimeoutP2 = 500 + rand.nextInt(1000);\n\t\t\n\t\t// rare draw situation, if the two players say \"SNAP!\" at the same time\n\t\tif (snapTimeoutP1 == snapTimeoutP2) {\n\t\t\ttry {\n\t\t\t\tTimeUnit.MILLISECONDS.sleep((long) snapTimeoutP1);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tSystem.out.println(\"SNAP! It's a draw!\");\n\t\t}\n\t\t// in most cases, a player will say \"SNAP!\" first, and they will be the winner\n\t\telse {\n\t\t\tString result = String.format(\"SNAP! %s is the winner!\", (snapTimeoutP1 < snapTimeoutP2) ? player1 : player2);\n\t\t\t\n\t\t\ttry {\n\t\t\t\tTimeUnit.MILLISECONDS.sleep((long) Math.min(snapTimeoutP1, snapTimeoutP2));\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tSystem.out.println(result);\n\t\t}\n\t}", "private void myTurn()\n\t{\n\t\t\n\t\tif (canPlay())\n\t\t{\n\t\t\tif (isTop())\n\t\t\t{\n\t\t\t\traise();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tequal();\n\t\t\t}\n\t\t}\n\t\ttable.nextPlayer();\n\t\t\n\t}", "public boolean isGameDraw() {\n if (this.winner == 0 && isBoardFull() && this.gameStarted) {\n return true; \n }\n return false; \n }", "private void humanTurn() \n {\n \n playTurn();\n }", "public void act()\n {\n displayBoard();\n Greenfoot.delay(10);\n \n if( checkPlayerOneWin() == true )\n {\n JOptionPane.showMessageDialog( null, \"Congratulations Player One!\", \"playerOne Win\", JOptionPane.PLAIN_MESSAGE );\n \n Greenfoot.stop();\n }\n \n if( checkPlayerTwoWin() == true )\n {\n JOptionPane.showMessageDialog( null, \"Congratulations Player Two!\", \"plauerTwo Win\",JOptionPane.PLAIN_MESSAGE );\n \n Greenfoot.stop();\n }\n \n if( checkBoardFilled() == true )\n {\n JOptionPane.showMessageDialog( null, \"It is a draw!\", \"Wrong step\", JOptionPane.PLAIN_MESSAGE );\n \n Greenfoot.stop();\n }\n \n if( messageShown == false )\n {\n showTurn();\n \n messageShown = true;\n }\n \n checkMouseClick();\n }", "public void playRound(){\n this.gameState = GameController.createGameState(this.game);\n \n // Verifica se o \n if(this.gameState.isEnded()){\n var winner = this.gameState.getPlayerQttCards() == 0 ? this.game.getComputer() : this.game.getPlayer();\n\n this.gameState.setWinner(winner);\n }\n else{\n \n // Mostrando o vira, as manilhas, a quantidade de cartas dos jogadores e as cartas do jogador\n this.view.displayGame(this.gameState);\n\n var playerCardChose = this.getPlayerCardChose();\n var computerCardChose = Utils.generateRandomNumber(getGameState().getComputerQttCards());\n\n try{\n var playerCard = this.game.getPlayer().playCard(playerCardChose);\n var computerCard = this.game.getComputer().playCard(computerCardChose);\n\n var winnerCard = this.verifyBiggerCard(playerCard, computerCard);\n\n // Verificando qual `Player` ganhou e se um ganhou\n\n var hasPlayerWon = winnerCard.equals(playerCard);\n var hasComputerWon = winnerCard.equals(computerCard);\n\n var turnedCard = this.getGameState().getTurnedCard();\n\n // Aqui caso o player tenha ganhado ele recebe a carta do computador e senão ele perde a carta para o computador\n if(hasPlayerWon){\n this.game.getPlayer().earnCard(computerCard);\n this.game.getComputer().loseCard(computerCard);\n }\n else if(hasComputerWon){\n this.game.getComputer().earnCard(playerCard);\n this.game.getPlayer().loseCard(playerCard);\n }\n \n // Na hora de mostrar o vencedor eu verifico se um player venceu, se sim eu mostro vitória ou derrota para o Player\n // Se não eu mostro empate\n \n if(hasComputerWon || hasPlayerWon){\n this.view.displayRoundWinner(turnedCard, playerCard, computerCard, hasPlayerWon);\n }\n else {\n this.view.displayRoundWinner(turnedCard, playerCard, computerCard);\n }\n\n }\n catch(Exception excp){\n this.view.displayMessageError(excp.getMessage());\n\n this.playRound();\n }\n }\n \n }", "private void suarez() {\n\t\ttry {\n\t\t\tThread.sleep(5000); // espera, para dar tempo de ver as mensagens iniciais\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tint xInit = -10;\n\t\tint yInit = 8;\n\t\tplayerDeafaultPosition = new Vector2D(xInit*selfPerception.getSide().value(), yInit*selfPerception.getSide().value());\n\t\twhile (commander.isActive()) {\n\t\t\t\n\t\t\tupdatePerceptions(); // deixar aqui, no começo do loop, para ler o resultado do 'move'\n\t\t\tswitch (matchPerception.getState()) {\n\t\t\tcase BEFORE_KICK_OFF:\n\t\t\t\tcommander.doMoveBlocking(xInit, yInit);\t\t\t\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase PLAY_ON:\n\t\t\t\t//state = State.FOLLOW;\n\t\t\t\texecuteStateMachine();\n\t\t\t\tbreak;\n\t\t\tcase KICK_OFF_LEFT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase KICK_OFF_RIGHT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase CORNER_KICK_LEFT: // escanteio time esquerdo\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase CORNER_KICK_RIGHT: // escanteio time direito\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase KICK_IN_LEFT: // lateral time esquerdo\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\tcase KICK_IN_RIGHT: // lateal time direito\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase FREE_KICK_LEFT: // Tiro livre time esquerdo\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase FREE_KICK_RIGHT: // Tiro Livre time direito\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase FREE_KICK_FAULT_LEFT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase FREE_KICK_FAULT_RIGHT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase GOAL_KICK_LEFT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase GOAL_KICK_RIGHT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase AFTER_GOAL_LEFT:\n\t\t\t\tcommander.doMoveBlocking(xInit, yInit);\n\t\t\t\tbreak;\n\t\t\tcase AFTER_GOAL_RIGHT:\n\t\t\t\tcommander.doMoveBlocking(xInit, yInit);\n\t\t\t\tbreak;\n\t\t\tcase INDIRECT_FREE_KICK_LEFT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase INDIRECT_FREE_KICK_RIGHT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\t}", "public void nextStepInGame(View view){\n // called by click on either card, so need to track state\n Log.d(getClass().toString(),\"playstate before = \" + playstate.toString());\n\n playstate = playstate.getNext();\n Log.d(getClass().toString(),\"playstate after update = \" + playstate.toString());\n ImageButton computerCard = (ImageButton) findViewById(R.id.computerCard);\n ImageButton youCard = (ImageButton) findViewById(R.id.youCard);\n TextView infoPanel = (TextView) findViewById(R.id.info_panel);\n switch (playstate){\n case NOCARDS: {\n // show empty buttons as no cards on table\n computerCard.setImageResource(R.color.holo_green_dark);\n computerCard.setVisibility(View.VISIBLE);\n youCard.setImageResource(R.color.holo_blue_dark);\n youCard.setVisibility(View.VISIBLE);\n infoPanel.setText(\"Click to deal cards to both players\");\n\n break;\n }\n case DEALCARDS: {\n // show backs of cards ready to play them\n computerCard.setImageResource(R.drawable.card_back);\n computerCard.setVisibility(View.VISIBLE);\n youCard.setImageResource(R.drawable.card_back);\n youCard.setVisibility(View.VISIBLE);\n infoPanel.setText(\"Click to reveal cards\");\n break;\n }\n case SHOWCARDS: {\n // playARound, but only show card faces\n game.playARound();\n String cardToShow = this.game.getTurnlog().lastEntryFor(game.getPlayers()[1]).getHand().topShownCard().toDrawableName();\n computerCard.setImageResource(getResources().getIdentifier(cardToShow, \"drawable\", \"com.codeclan.cardgame\"));\n cardToShow = this.game.getTurnlog().lastEntryFor(game.getPlayers()[0]).getHand().topShownCard().toDrawableName();\n youCard.setImageResource(getResources().getIdentifier(cardToShow, \"drawable\", \"com.codeclan.cardgame\"));\n\n infoPanel.setText(getString(R.string.computer_label) + \" has \" +\n game.getPlayers()[1].getScore().toString() + \" points,\\n\" +\n getString(R.string.player_label) + \" has \" +\n game.getPlayers()[0].getScore().toString() + \" points.\\n Click for clear table\") ;\n\n break;\n }\n\n }\n if( game.isOver() ){\n//\n// break out of onClick loop by going to new activity to display results\n//\n Intent resultsIntent = new Intent(this, G2P1CHWResultsActivity.class);\n resultsIntent.putExtra(\"player1score\", game.getPlayers()[0].getScore());\n resultsIntent.putExtra(\"dealerscore\", game.getPlayers()[1].getScore());\n resultsIntent.putExtra(\"winner\", game.winner().getName());\n\n startActivity(resultsIntent);\n }\n\n }", "public void step() {\r\n\t\tcard1 = player1.getCard();\r\n\t\tcard2 = player2.getCard();\r\n\t\twarPile.add(card1);\r\n\t\twarPile.add(card2);\r\n\t\tgameState = \"Player 1: \" + card1 + \"\\n\" + \"Player 2: \" + card2 + \"\\n\";\r\n\t\tif(card1.getRank() == card2.getRank()) {\r\n\t\t\tgameState = \"Cards added to the War Pile\" + \"\\n\";\r\n\t\t}else if(card1.getRank() > card2.getRank()){\r\n\t\t\ttransferCards(player1);\r\n\t\t\tgameState = \"Cards go to Player 1 \\n\";\r\n\t\t}else {\r\n\t\t\ttransferCards(player2);\r\n\t\t\tgameState = \"Cards go to Player 2 \\n\";\r\n\t\t}\r\n\t\tmoves ++;\r\n\t}", "public void isTrickComplete() {\n if(numPlays!=4){return;}\n if(player1Play == null | player2Play == null | player3Play == null | player4Play == null){return;}//should only call when all have played\n // reset numPlayed\n numPlays = 0;\n // find if the round is over\n currentMiddle.clear();\n trickNum++;\n try {\n sleep(200);//display all four cards before determining winner\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n int trickWinner;\n trickWinner = trickWinner();\n turn = trickWinner;\n if(trickWinner == 0 | trickWinner == 2){\n redTrickScore++;\n }\n else if(trickWinner == 1 | trickWinner == 3){\n blueTrickScore++;\n }\n player1Hand.remove(player1Play);//clear middle\n player2Hand.remove(player2Play);\n player3Hand.remove(player3Play);\n player4Hand.remove(player4Play);\n\n player1Play = null;\n player2Play = null;\n player3Play = null;\n player4Play = null;\n\n if(trickNum == 5){\n // reset everything for new round\n currentTrumpSuit = null;\n numPass = 0;\n isRoundOver();\n if(dealer == 3){\n dealer = 0;\n turn = 1;\n }\n else{\n dealer++;\n turn = dealer + 1;\n }\n gameStage = 0;\n deal();\n trickNum = 0;\n }\n\n\n\n }", "public void turn(){ \r\n\t\tif (currentTurn == 0){ \r\n\t\t\tSystem.out.println(\"Computer's Turn\");\r\n\t\t\tnextRowWin();\r\n\t\t\tnextColWin(); \r\n\t\t\tnextDiagWin();\r\n\t\t\t//check if next move is row win\r\n\t\t\tif (!Arrays.equals(rowWin, checkWin)){\r\n\t\t\t\tcounter(rowWin); \r\n\t\t\t}\r\n\t\t\t//check if next move is column win \r\n\t\t\telse if (!Arrays.equals (colWin, checkWin)) {\r\n\t\t\t\tcounter(colWin); \r\n\t\t\t}\r\n\t\t\t//check if next move is diagonal win\r\n\t\t\telse if (!Arrays.equals(diagWin, checkWin)){\r\n\t\t\t\tcounter(diagWin);\r\n\t\t\t}\r\n\t\t\t//computer moves based on priority positions\r\n\t\t\telse\r\n\t\t\t\tcompMove(); \r\n\t\t\tchangeTurn(); \r\n\t\t}\r\n\t\telse { \r\n\t\t\tSystem.out.println(\"Player's Turn\");\r\n\t\t\tint nextCol, nextRow; \r\n\t\t\tScanner in = new Scanner (System.in); \r\n\t\t\tSystem.out.print (\"Please enter row and column to place your piece [Enter as col row]: \");\r\n\t\t\tif (in.hasNext()) { \r\n\t\t\t\tnextCol = in.nextInt(); \r\n\t\t\t\tnextRow = in.nextInt(); \r\n\t\t\t\tif (nextCol == 3 || nextRow == 3)\r\n\t\t\t\t\tSystem.out.println(\"Input of of range. col and row must be between 0-2.\");\r\n\t\t\t\telse if (board[nextCol][nextRow] == '-') {\r\n\t\t\t\t\tboard[nextCol][nextRow] = 'X'; \r\n\t\t\t\t\tchangeTurn(); \r\n\t\t\t\t}\r\n\t\t\t\telse { \r\n\t\t\t\t\tSystem.out.println(\"Invalid Input. There is already a piece in that location.\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse { \r\n\t\t\t\tSystem.out.println(\"Invalid Input. Please input integers for col row.\");\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void checkGame() {\n\n\t}", "@Override\r\n\tpublic void makeRandonMove() {\r\n\t\tif (randPlayer.getPlayerNumber() == game.getState().getTurn() && !game.getState().isFinished()) game.execute(randPlayer.requestAction(game.getState()));\r\n\t}", "private void checkGame() {\n if (game.checkWin()) {\n rollButton.setDisable(true);\n undoButton.setDisable(true);\n this.dialogFlag = true;\n if (game.isDraw()) {\n showDrawDialog();\n return;\n }\n if (game.getWinner().getName().equals(\"Computer\")) {\n showLoserDialog();\n return;\n }\n showWinnerDialog(player1);\n }\n }", "public void performCheckAfterPlayerMove() {\n\t\tagentsMoved += 1;\n\t\t\n\t\tif(agentsMoved == agents) {\n\t\t\troundsPlayed += 1;\n\t\t\tmoveRobots();\n\t\t\tagentsMoved = 0;\n\t\t\t\n\t\t\t//restart game at new level after the robots has moved\n\t\t\tif(roundsPlayed > server.getRoundsPerLevel()) {\n\t\t\t\tHandleCommunication.broadcastToClient(null, server.getConnectedClientList(), SendSetting.NextLevel, server, null);\n\t\t\t\troundsPlayed = 0;\n\t\t\t}\n\t\t}\n\t}", "boolean CanFinishTurn();", "public void checkGameStatus() {\n everyTenthGoalCongrats();\n randomPopUpBecauseICan();\n }", "public final boolean checkForDraw() {\r\n boolean result = false;\r\n String player = \"\";\r\n \r\n for (Rail rail : rails) {\r\n if (rail.isWinner()) {\r\n return false;\r\n }\r\n }\r\n \r\n if (tilesPlayed == 9) {\r\n draws++;\r\n // window.getStatusMsg().setText(DRAW_MSG); \r\n result = true;\r\n }\r\n \r\n return result;\r\n }", "@Test\n @DisplayName(\"After one player makes one move, verify conditions for next player toggle\")\n void doesPlayerContinue() {\n Player player = playerService.getP1();\n Pit pit = boardService.getPitByID(0);\n Move move = new Move(player, pit);\n boardService.updateBoardForMove(move);\n Assert.assertTrue(boardService.doesPlayerContinue());\n\n // For the next move, if player 1 moves from pit 1, player will not continue\n pit = boardService.getPitByID(1);\n move = new Move(player, pit);\n boardService.updateBoardForMove(move);\n Assert.assertFalse(boardService.doesPlayerContinue());\n }", "private void gameMove() \n { Card First,Second;\n First=FirstPlayer.removeTheCard();\n Second=SecondPlayer.removeTheCard();\n while (drawCards() == JOptionPane.YES_OPTION && determineWinLose() == 0) \n { \n if (First.getCardValue() > Second.getCardValue() ) \n { FirstPlayer.addCardToBegining(First);\n FirstPlayer.addCardToBegining(Second);\n }\n else if (First.getCardValue() < Second.getCardValue())\n { SecondPlayer.addCardToBegining(First);\n SecondPlayer.addCardToBegining(Second);\n }\n else \n War();\n }\n if (drawCards() == JOptionPane.NO_OPTION){\n JOptionPane.showMessageDialog(null, \"Thank you for playing!\\nBye Bye!\",\"Game Over\", JOptionPane.PLAIN_MESSAGE);\n System.exit(0);\n }\n }", "public abstract void cardDrawn(int playerIndex);", "public void action(ActionCard card) {\n if (!myTurn()) {\n return;\n }\n if (handPile.contains(card)) {\n specialAction = card.performAction(this);\n while (specialAction.getDraw() > 0) {\n this.draw(1);\n specialAction.reduceDraw();\n }\n // CardAction cardAct = new CardAction(card, \"Play: \" + card.getName());\n // history.add(cardAct);\n }\n }", "public void playGame() {\n show();\n while (gameStatus) {\n if (canPut(players.get((state.getTurn())))) {\n int choice = -1;\n while (gameStatus) {\n choice = controls.get(state.getTurn()).putCard(currentCard);\n if (validInput(players.get((state.getTurn())), choice)) {\n System.out.println(players.get(state.getTurn()).getCards().get(choice).toString());\n try{Thread.sleep(1000);}catch(InterruptedException ignored){}\n break;\n }\n }\n decide(players.get(state.getTurn()), players.get(state.getTurn()).getCards().get(choice));\n }\n try{Thread.sleep(500);}catch(InterruptedException ignored){}\n checkFinish();\n if (gameStatus) {\n state.nextTurn();\n show();\n }\n }\n }", "public void checkFinished() {\n int check = 0;\n for (int i = 0; i < cards.size(); i++) {\n if (cards.get(i).getTurned() == true) {\n check++;\n }\n }\n if (check == cards.size()) {\n clip.stop();\n resultGUI = new ResultGUI(p1Points, p2Points);\n resultGUI.setSize(700, 500);\n resultGUI.setVisible(true);\n setVisible(false);\n }\n }", "@Override\n public void drawValidMove() {\n if(this.getPlayer().getPlayerID() % 2 != 0) {\n //Pawn can move one space forwards if no piece is in front\n if (board.getSquare(x-1, y).getPiece()== null) {\n board.getSquare(x-1, y).drawOutline();\n }\n \n //if first move, pawn can move 2 spaces forward\n if (!hasMoved && board.getSquare(x-2, y).getPiece() == null && board.getSquare(x-1, y).getPiece() == null) {\n board.getSquare(x-2, y).drawOutline();\n }\n \n //If there is an enemy piece in the diagonal forward square of the pawn, the pawn can move (capture the piece)\n if (y-1 > 0) { //ensures no arrayoutofbounds error\n if (board.getSquare(x-1, y-1) != null && board.getSquare(x-1, y-1).getPiece() != null &&\n board.getSquare(x-1, y-1).getPiece().getPlayer() != this.getPlayer()) {\n board.getSquare(x-1, y-1).drawOutline();\n }\n }\n \n if(y+1<SIZE) { //ensures no arrayoutofbounds error\n if (board.getSquare(x-1, y+1) != null && board.getSquare(x-1, y+1).getPiece() != null &&\n board.getSquare(x-1, y+1).getPiece().getPlayer() != this.getPlayer() ) {\n board.getSquare(x-1, y+1).drawOutline();\n }\n }\n \n System.out.println(\"\");\n //En passant\n if (y - 1 > 0) {\n \n System.out.println();\n if (board.getSquare(x, y-1).getPiece() != null) { \n System.out.println(\"the piece's enPassant is: \" + board.getSquare(x, y-1).getPiece().getEnPassant());\n System.out.println(\"The game's turn counter is: \" + board.getTurnCounter());\n }\n else {\n System.out.println(\"Null piece when checking for en passent.\");\n }\n \n if (board.getSquare(x, y-1).getPiece() != null && board.getSquare(x, y-1).getPiece().getPlayer() != this.player &&\n board.getSquare(x, y-1).getPiece().getEnPassant() == board.getTurnCounter() - 1) {\n board.getSquare(x-1, y-1).drawOutline();\n board.getSquare(x-1, y-1).setEnPassent(true);\n }\n }\n \n if (y + 1 < SIZE) {\n if (board.getSquare(x, y+1).getPiece() != null && board.getSquare(x, y+1).getPiece().getPlayer() != this.player &&\n board.getSquare(x, y+1).getPiece().getEnPassant() == board.getTurnCounter() - 1) {\n board.getSquare(x-1, y+1).drawOutline();\n board.getSquare(x-1, y+1).setEnPassent(true);\n }\n }\n }\n \n //If this pawn belongs to player 2:\n else {\n \n if (board.getSquare(x+1, y).getPiece() == null) {\n board.getSquare(x+1, y).drawOutline();\n }\n \n //if first move, pawn can move 2 spaces forward\n if (!hasMoved && board.getSquare(x+2, y).getPiece() == null && board.getSquare(x+1, y).getPiece() == null) {\n board.getSquare(x+2, y).drawOutline();\n \n }\n \n if(y-1 > 0) {\n if (board.getSquare(x+1, y-1) != null && board.getSquare(x+1, y-1).getPiece() != null &&\n board.getSquare(x+1, y-1).getPiece().getPlayer() != this.getPlayer() ) {\n board.getSquare(x+1, y-1).drawOutline();\n }\n }\n \n if(y+1 < SIZE) {\n if (board.getSquare(x+1, y+1) != null && board.getSquare(x+1, y+1).getPiece() != null &&\n board.getSquare(x+1, y+1).getPiece().getPlayer() != this.getPlayer()) {\n board.getSquare(x+1, y+1).drawOutline();\n }\n }\n \n //En passant\n if (y - 1 > 0) {\n if (board.getSquare(x, y-1).getPiece() != null &&board.getSquare(x, y-1).getPiece().getPlayer() != this.player &&\n board.getSquare(x, y-1).getPiece().getEnPassant() == board.getTurnCounter() - 1) {\n board.getSquare(x+1, y-1).drawOutline();\n board.getSquare(x+1, y-1).setEnPassent(true);\n }\n }\n \n if (y + 1 < SIZE) {\n if (board.getSquare(x, y+1).getPiece() != null && board.getSquare(x, y+1).getPiece().getPlayer() != this.player &&\n board.getSquare(x, y+1).getPiece().getEnPassant() == board.getTurnCounter() - 1) {\n board.getSquare(x+1, y+1).drawOutline();\n board.getSquare(x+1, y+1).setEnPassent(true);\n }\n }\n }\n }", "public void playTheGame() {\n\t\tint column;\n\t\ttry {\n\t\t\tboolean gameIsOver = false;\n\t\t\tfor (int count = 0; count < thePlayers.length; count++)\n\t\t\t\tthePlayers[count].getView().showOutput(\n\t\t\t\t\t\taConnect4Field.toString());\n\n\t\t\tdo {\n\t\t\t\tfor (int index = 0; index < thePlayers.length; index++) {\n\t\t\t\t\t// thePlayers[index].getView().showOutput(aConnect4Field.toString());\n\t\t\t\t\tif (aConnect4Field.isItaDraw()) {\n\t\t\t\t\t\tfor (int count = 0; count < thePlayers.length; count++)\n\t\t\t\t\t\t\tthePlayers[count].getView().showOutput(\"Draw\");\n\t\t\t\t\t\tgameIsOver = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthePlayers[index].getView().showOutput(\n\t\t\t\t\t\t\t\tthePlayers[index].getName()\n\t\t\t\t\t\t\t\t\t\t+ \" it's Your Turn! play your move\");\n\t\t\t\t\t\tcolumn = thePlayers[index].nextMove();\n\t\t\t\t\t\twhile (!aConnect4Field\n\t\t\t\t\t\t\t\t.checkIfPiecedCanBeDroppedIn(column)) {\n\t\t\t\t\t\t\tthePlayers[index].getView().showOutput(\n\t\t\t\t\t\t\t\t\t\"Invalid Turn Try again\");\n\t\t\t\t\t\t\tcolumn = thePlayers[index].nextMove();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\taConnect4Field.dropPieces(column,\n\t\t\t\t\t\t\t\tthePlayers[index].getGamePiece());\n\t\t\t\t\t\tfor (int count = 0; count < thePlayers.length; count++)\n\t\t\t\t\t\t\tthePlayers[count].getView().showOutput(\n\t\t\t\t\t\t\t\t\taConnect4Field.toString());\n\t\t\t\t\t\tif (aConnect4Field.error != \"\") {\n\n\t\t\t\t\t\t\tthePlayers[index].getView().showOutput(\n\t\t\t\t\t\t\t\t\taConnect4Field.error);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (aConnect4Field.didLastMoveWin()) {\n\t\t\t\t\t\t\t\tgameIsOver = true;\n\t\t\t\t\t\t\t\t// all player get to know\n\t\t\t\t\t\t\t\tfor (int count = 0; count < thePlayers.length; count++)\n\t\t\t\t\t\t\t\t\tthePlayers[count].getView().showOutput(\n\t\t\t\t\t\t\t\t\t\t\t\"The winner is: \"\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ thePlayers[index]\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getName());\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} while (!gameIsOver);\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "public boolean hasTurn() {\n\t\treturn world.getCurrentPlayer() == this;\n\t}", "public void play() {\n\n int turn = 1;\n\n while (!isCheckMate()) {\n System.out.println(\"Turn \" + turn++);\n board.print();\n playTurn(whitePlayer);\n board.print();\n playTurn(blackPlayer);\n }\n }", "private void yourturn() {\n if (whosturn != 3) {\n whosturn = 3;\n displayTable();\n }\n\n // TODO mega duplication\n int top = 0;\n // testing is player has a card they can play\n if (pile.notEmpty()) {\n boolean canplay = false;\n if (hand.getCard(0) == null) { // if player only has card on the table\n if (hand.isFaceUp()) // if player has faceup card on the table\n {\n for (int n = 0; n < 3; n++) {\n if (hand.getFaceUp(n) != null) {\n if (nine && pile.topValue() == 9) {\n top = 0;\n for (int i = 0; i < 52; i++) {\n if (pile.get(i) == null) {\n canplay = true;\n break;\n }\n if (pile.get(i).getValue() == 9) top++;\n else break;\n }\n }\n if (canplay) break;\n if (seven\n && pile.get(top).getValue() == 7\n && hand.getFaceUp(n).getValue() < 7) {\n canplay = true;\n break;\n } else if (hand.getFaceUp(n).getValue() == 2\n || hand.getFaceUp(n).getValue() == 10) {\n canplay = true;\n break;\n } else if (nine && hand.getFaceUp(n).getValue() == 9) {\n canplay = true;\n break;\n } else if (!seven || pile.get(top).getValue() != 7) {\n if (pile.get(top).getValue() <= hand.getFaceUp(n).getValue()) {\n canplay = true;\n break;\n }\n }\n }\n }\n } else // if player only has facedown cards\n canplay = true;\n } else {\n for (int n = 0; n < hand.length() - 1; n++) {\n if (hand.getCard(n) == null) break;\n if (nine && pile.topValue() == 9) {\n top = 0;\n for (int i = 0; i < 52; i++) {\n if (pile.get(i) == null) {\n canplay = true;\n break;\n }\n if (pile.get(i).getValue() == 9) top++;\n else break;\n }\n }\n if (canplay) break;\n if (hand.getCard(n).getValue() == 2 || hand.getCard(n).getValue() == 10) {\n canplay = true;\n break;\n }\n if (nine && hand.getCard(n).getValue() == 9) {\n canplay = true;\n break;\n }\n if (seven && pile.get(top).getValue() == 7 && hand.getCard(n).getValue() < 7) {\n canplay = true;\n break;\n } else if (seven != true || pile.get(top).getValue() != 7) {\n if (pile.get(top).getValue() <= hand.getCard(n).getValue()) {\n canplay = true;\n break;\n }\n }\n }\n }\n if (canplay) {\n // sh.addMsg(\"Its Your Turn\");\n sh.setmyTurn(true);\n } else { // cant play then must pick up the pile\n sh.addMsg(\n \"The card played was a \"\n + pile.top().getStringValue()\n + \" you had to pick up the pile. BLAOW\");\n pile.moveToHand(hand);\n sendCommand(\"turn:pickup:\");\n nextTurn();\n displayTable();\n }\n } else {\n // sh.addMsg(\"Its Your Turn\");\n sh.setmyTurn(true);\n }\n }", "public Card takeTurn(Suit suit, int rank) throws InvalidCardException {\n //display current hand and prompt the user to input a card to play\n Scanner scanner = new Scanner(System.in);\n while(true) {\n System.out.println(name+\"'s turn\");\n System.out.println(\"Your current hand is:\");\n System.out.print(\"[\"+hand.getCards().get(0));\n for(int i=1; i<hand.getCards().size(); i++) {\n System.out.print(\", \"+hand.getCards().get(i));\n }\n System.out.println(\"]\");\n System.out.println(\"Which card do you want to play?\");\n //read the user's input and make sure it's a valid card\n String input = scanner.next();\n //if the user entered nothing, they draw by default\n if(input.equals(\"none\")) {\n return null;\n }\n Suit inputSuit = null;\n switch(input.substring(input.length()-1).toLowerCase()) {\n case \"c\":\n inputSuit = Suit.CLUBS;\n break;\n case \"s\":\n inputSuit = Suit.SPADES;\n break;\n case \"h\":\n inputSuit = Suit.HEARTS;\n break;\n case \"d\":\n inputSuit = Suit.DIAMONDS;\n break;\n default:\n throw new InvalidCardException(\"Invalid suit\");\n }\n int inputRank = Integer.parseInt(input.substring(0,input.length()-1));\n if(inputRank < 1 || inputRank > 13) {\n throw new InvalidCardException(\"Invalid rank\");\n }\n //if the card is playable and the player has it in their hand, then play it\n if(inputSuit.equals(suit) || inputRank == rank) {\n ArrayList<Card> cards = hand.getCards();\n Card card = new Card(inputSuit, inputRank);\n for(int i=0; i<cards.size(); i++) {\n if(cards.get(i).equals(card)) {\n return hand.draw(input);\n }\n }\n System.out.println(\"You do not have that card\");\n } else if(hand.getCards().contains(new Card(inputSuit, inputRank)) && inputRank == 8) { //this makes 8s always playable\n return hand.draw(input);\n } else {\n System.out.println(\"Invalid card. Try again\");\n }\n }\n }", "private void HandleOnMoveStart(Board board, Piece turn){}", "private boolean isValidMove(int pressedHole) {\n return getPlayerHole(pressedHole).getKorgools() != 0;\n }", "public boolean playerWonGame(Player player) {\n if (playerWonGameWithDiagonalLine(player) || playerWonGameWithHorizontalLine(player)\n || playerWonGameWithVerticalLine(player)) {\n return true; \n }\n return false; \n \n }", "private void action() {\r\n moveSnake();\r\n if (hasEatenPowerUp() == false) checkForCollisionWithSelf();\r\n if (hasHitBoundry() == false) redraw();\r\n }", "public void useTurn(Card card) {\r\n\t\tif (card.cardColor.contains(CardColor.PURPLE) && this.purpleTurns != 0) {\r\n\t\t\tthis.purpleTurns--;\r\n\t\t} else if (card.cardColor.contains(CardColor.RED) && this.redTurns != 0) {\r\n\t\t\tthis.redTurns--;\r\n\t\t} else if (card.cardColor.contains(CardColor.BLUE)\r\n\t\t\t\t&& this.blueTurns != 0) {\r\n\t\t\tthis.blueTurns--;\r\n\t\t} else if (card.cardColor.contains(CardColor.BROWN)\r\n\t\t\t\t&& this.brownTurns != 0) {\r\n\t\t\tthis.brownTurns--;\r\n\t\t} else\r\n\t\t\tthis.blackTurns--;\r\n\t}", "boolean isGameSpedUp();", "void notifyPlayerHasAnotherTurn();", "public void startTurn(){\n if (hasWinner()){\n announceWinner();\n return;\n }\n\n gameDraft();\n gameAttack();\n if (hasWinner()) return; //Skipping fortify if the game is won\n gameFortify();\n displayMessage(\"End of \" + currentPlayer.getName() + \"'s turn!\");\n }", "boolean isGameComplete();", "public void action(){\n turn.sendMsg(turn.getController().getTurnOwner().getName()+\"'s turn!\");\n if(turn.getPlayer().isDown()){\n turn.setPhase(new RecoveryPhase());\n }else {\n turn.setPhase(new StarsPhase());\n }\n }", "public boolean checkCapture(Move move, Piece board[][]) {\n\n if (board[move.getEnd_column()][move.getEnd_row()] != null) {\n if (board[move.getEnd_column()][move.getEnd_row()].getColor() == getColor()) {\n return false;\n }\n //adds the taken piece to move-object\n move.setTakenPiece(board[move.getEnd_column()][move.getEnd_row()]);\n }\n\n return true;\n }", "public void hitCard() {\n if (this.state == GameState.ROUNDACTIVE) {\n Seat s = this.getSeat(seatPlaying);\n if (s.hasPlayer()) {\n Hand h = s.getPlayer().getHands().get(0);\n h.addCard(this.deck.dealCard());\n if (h.getIsBusted()) {\n this.activeHandStand();\n }\n }\n repaintAll();\n }\n }", "@Override\n protected boolean isFinished() {\n return (Math.abs(hpIntake.getWristPosition()) - HatchPanelIntake.positions[position.ordinal()] < Math.PI/12);\n }", "public boolean playerCardCheck(Card card)\n {\n int diff = Card.valueOfCard(playerCard) - Card.valueOfCard(card);\n // If player wins\n if( diff == 1 || diff == -1)\n {\n return true;\n }\n return false;\n }", "@Override\n protected void receiveInfo(GameInfo info) {\n if (!(info instanceof PalaceGameState)) {\n return;\n }\n PalaceGameState state = new PalaceGameState((PalaceGameState) info);\n PalaceSelectCardAction selectCardAction;\n if (state.getTurn() != this.playerNum) {\n return;\n } else {\n sleep(1000); // make the computer \"think\"\n boolean isBigger = false;// variable to check if they have a valid card\n\n //determines if the cards are valid\n if (!(state.getP2Hand().isEmpty()) && !state.getPlayPilePalaceCards().isEmpty()) {\n for (int i = 0; i < state.getP2Hand().size(); i++) {\n if (state.getP2Hand().get(i).getRank() > state.getPlayPilePalaceCards().\n get(state.getPlayPilePalaceCards().size() - 1).getRank()) {\n isBigger = true;\n }\n }\n }\n\n //takes pile if they have no hand cards to play\n if (isBigger == false && !(state.getP2Hand().isEmpty())) {\n PalaceTakePileAction take = new PalaceTakePileAction(this);\n Log.d(\"compPlayer\", \"took the pile\");\n this.game.sendAction(take);\n }\n\n //begins searching for a card to select\n PalaceCard cardToSelect = null;\n\n // check in the case when the play pile and their hand are both not empty\n if (!(state.getPlayPilePalaceCards().isEmpty()) && (!(state.getP2Hand().isEmpty()))) {\n\n // while they haven't selected a card or the card they selected is less than the top card\n // another card is selected at random from their hand\n while (cardToSelect == null ||\n (cardToSelect.getRank() <\n (state.getPlayPilePalaceCards().\n get(state.getPlayPilePalaceCards().size() - 1).getRank()) &&\n state.getPlayPilePalaceCards().\n get(state.getPlayPilePalaceCards().size() - 1).getRank() >=0)) {\n cardToSelect =\n state.getP2Hand().get((int) (Math.random() * state.getP2Hand().size()));\n }\n\n // selects a card when they are playing from their top cards\n } else if (state.getP2Hand().isEmpty() && (!(state.getP2TopPalaceCards().isEmpty()))) {\n\n //pick any random card if the play pile is empty\n if (state.getPlayPilePalaceCards().isEmpty()) {\n cardToSelect =\n state.getP2TopPalaceCards().\n get((int) (Math.random() * state.getP2TopPalaceCards().size()));\n }\n\n //play pile is not empty so find a valid card\n else {\n\n //checks to see if there is a valid card\n for (int i = 0; i < state.getP2TopPalaceCards().size(); i++) {\n if (state.getP2TopPalaceCards().get(i).getRank() >\n state.getPlayPilePalaceCards().\n get(state.getPlayPilePalaceCards().size() - 1).getRank() &&\n state.getPlayPilePalaceCards().\n get(state.getPlayPilePalaceCards().size() - 1).getRank() >= 0) {\n isBigger = true;\n }\n }\n\n //finds a random valid card because there is one that is valid\n if (isBigger) {\n while (cardToSelect == null ||\n (cardToSelect.getRank() <\n state.getPlayPilePalaceCards().\n get(state.getPlayPilePalaceCards().size() - 1).\n getRank() &&\n state.getPlayPilePalaceCards().\n get(state.getPlayPilePalaceCards().size() - 1).\n getRank() >= 0)) {\n cardToSelect =\n state.getP2TopPalaceCards().\n get((int) (Math.random() * state.\n getP2TopPalaceCards().size()));\n }\n }\n\n //no card to be played so take the pile\n else {\n PalaceTakePileAction take = new PalaceTakePileAction(this);\n Log.d(\"compPlayer\", \"took the pile\");\n this.game.sendAction(take);\n }\n }\n }\n\n //they only have bottom cards left, all are valid to be played so pick a random one\n else if (state.getP2TopPalaceCards().isEmpty()&&state.getP2Hand().isEmpty()) {\n cardToSelect =\n state.getP2BottomPalaceCards().\n get((int) (Math.random() * state.getP2BottomPalaceCards().size()));\n }\n\n //the play pile is empty and they only have hand cards, pick one at random\n else {\n cardToSelect =\n state.getP2Hand().get((int) (Math.random() * state.getP2Hand().size()));\n }\n\n //create and send the select card action with the selected card\n selectCardAction = new PalaceSelectCardAction(this, cardToSelect,\n state.getSelectedPalaceCards());\n this.game.sendAction(selectCardAction);\n\n //rerun selectCardAction if there are multiple of the same card\n if (!state.getP2Hand().isEmpty()) {\n for (int i = 0; i < state.getP2Hand().size(); i++) {\n if (state.getP2Hand().get(i).getRank() == cardToSelect.getRank() &&\n !cardToSelect.equals(state.getP2Hand().get(i))) {\n selectCardAction = new PalaceSelectCardAction(this, state.getP2Hand().get(i),\n state.getSelectedPalaceCards());\n this.game.sendAction(selectCardAction);\n }\n }\n }\n else if (state.getP2Hand().isEmpty() && !state.getP2TopPalaceCards().isEmpty()) {\n for (int i = 0; i < state.getP2Hand().size(); i++) {\n if (state.getP2Hand().get(i).getRank() == cardToSelect.getRank() &&\n !cardToSelect.equals(state.getP2TopPalaceCards().get(i))) {\n selectCardAction = new PalaceSelectCardAction(this, state.getP2TopPalaceCards().get(i),\n state.getSelectedPalaceCards());\n this.game.sendAction(selectCardAction);\n }\n }\n }\n\n //creates and sends the playCardAction\n PalacePlayCardAction playCardAction = new PalacePlayCardAction(this);\n this.game.sendAction(playCardAction);\n }\n\n\n }", "private void doGameTurn()\n\t{\n\t\tif (!lost && !won)\n\t\t{\n\t\t\trefreshMapAndFrame();\n\t\t\t\n\t\t\tcheckPlayerCondition();\n\t\t\tElementAccess.openExit();\n\t\t\tSystem.out.println(turn);\n\t\t}\n\t\telse if (lost)\n\t\t{\n\t\t\tSound.lost();\n\t\t\trefreshMapAndFrame();\n\n\t\t\tif (playerHasLost())\n\t\t\t{\n\t\t\t\tstop = true;\n\t\t\t}\n\n\t\t\tMapInstance.getInstance().levelRestart();\n\t\t\tlost = false;\n\t\t}\n\t\telse if (won)\n\t\t{\n\t\t\tSound.won();\n\t\t\trefreshMapAndFrame();\n\n\t\t\twon = false;\n\t\t\tif (playerNotInLevel())\n\t\t\t{\n\t\t\t\tstop = true;\n\t\t\t}\n\n\t\t\tnextLevel();\n\t\t\tMapInstance.getInstance().levelRestart();\n\t\t}\n\t}", "public void draw() {\n if (!myTurn()) {\n return;\n }\n draw(4 - handPile.size());\n }", "public void checkMovedRedraw(){\n if((board.isTreasureCollected() || board.isKeyCollected()) && muteMusic == false){\n music.playAudio(\"PickupSound\");\n }\n renderer.redraw(board, boardCanvas.getWidth(), boardCanvas.getHeight());\n if(board.isChipAlive() == false){\n gamePaused = true;\n timeRuunableThread.setPause(gamePaused);\n if(muteMusic == false){\n music.stopPlayingAudio(\"All\");\n music.playAudio(\"LevelCompleteSound\");\n }\n musicName = \"LevelCompleteSound\";\n JOptionPane.showMessageDialog(null, \"Oops! Better luck next time!\", \"Failed\", 1);\n canLoadGame = false;\n } else if(board.isLevelFinished()){\n gamePaused = true;\n timeRuunableThread.setPause(gamePaused);\n if(muteMusic == false){\n music.stopPlayingAudio(\"All\");\n music.playAudio(\"LevelCompleteSound\");\n }\n musicName = \"LevelCompleteSound\";\n if(level == 1){\n int saveOrNot = JOptionPane.showConfirmDialog(null, \"congratulations! Level 1 passed! Go to next level?\", \"Confirm\", JOptionPane.YES_NO_OPTION);\n if (saveOrNot == 0) { // yes\n level = level + 1;\n newGameStart(level);\n } else {\n gamePaused = true;\n }\n }else if(level == 2){\n JOptionPane.showMessageDialog(null, \"congratulations! Level 2 passed!\", \"Win Level 2\", JOptionPane.INFORMATION_MESSAGE);\n }\n }else if(board.onInfoTile()){\n JOptionPane.showMessageDialog(null, readAllLines(), \"Information\", JOptionPane.INFORMATION_MESSAGE);\n }else{\n try {\n infoCanvas.drawChipsLeftNumber(board.getTreasureRemainingAmount());\n infoCanvas.drawKeysChipsPics();\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n }\n }", "public boolean meWin(){\n return whitePieces.size() > blackPieces.size() && isWhitePlayer;\n }", "private void checkGameInput(float dt) {\n\t\tif (!(talkmode || showSignDialog)) {\n\t\t\tif (player.moving) {\n\t\t\t\tboolean shouldStop = true;\n\t\t\t\tfor (int i = UP; i <= LEFT; i++) {\n\t\t\t\t\tif (!gameActions[i].isReleased()) {\n\t\t\t\t\t\tshouldStop = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (shouldStop) {\n\t\t\t\t\tplayer.stop();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tint dir = -1;\n\t\t\tint count = gameActions[LEFT].isPressed() ? 1 : 0;\n\t\t\tboolean found = false;\n\t\t\tfor (int i = UP; i <= LEFT; i++) {\n\t\t\t\tif (gameActions[i].isPressed()) {\n\t\t\t\t\tcount++;\n\t\t\t\t} else {\n\t\t\t\t\tif (count == 2) {\n\t\t\t\t\t\tfound = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcount = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!found) {\n\t\t\t\tfound = count == 2;\n\t\t\t}\n\t\t\tfor (int i = UP; i <= LEFT; i++) {\n\t\t\t\tif (gameActions[i].isPressed()) {\n\t\t\t\t\tmove(dt, dir = (i - UP), found);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (dir != -1) {\n\t\t\t\tplayer.setPartyMembersPositions();\n\t\t\t\t// showSignDialog = false;\n\t\t\t\t// doorSign = null;\n\t\t\t} else {\n\t\t\t\tbackground.stop();\n\t\t\t}\n\n\t\t\tif (isMenuButtonPressed(gameActions)) {\n\t\t\t\tsuper.queueEnterMenu();\n\t\t\t}\n\t\t} else if (question) {\n\t\t\tcheckDirectionalButtonsForQuestion();\n\t\t}\n\t\tif (gameActions[CROSS].isPressed()) {\n\t\t\tif (showSignDialog) {\n\t\t\t\tshowSignDialog = false;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tcrossPressed();\n\t\t}\n\t}" ]
[ "0.74001884", "0.6963427", "0.6847056", "0.6818772", "0.6812043", "0.6801356", "0.6797039", "0.6774508", "0.6755738", "0.6752565", "0.67190087", "0.671889", "0.67171663", "0.67001927", "0.6688416", "0.6662661", "0.6655688", "0.6647598", "0.6641441", "0.66163653", "0.6607897", "0.65880907", "0.65751696", "0.6559801", "0.6551095", "0.6542055", "0.6534569", "0.6530827", "0.65288025", "0.6520689", "0.6503238", "0.6501703", "0.6492859", "0.64902526", "0.64822936", "0.6475173", "0.64703345", "0.6467606", "0.64629364", "0.6453945", "0.6451687", "0.6442099", "0.6424557", "0.6413763", "0.64135045", "0.64120543", "0.6408881", "0.6405436", "0.6401498", "0.63618493", "0.63558584", "0.6351609", "0.6346431", "0.63401586", "0.6320574", "0.63183486", "0.63123196", "0.6309742", "0.63041717", "0.6296645", "0.6292927", "0.62908393", "0.62847143", "0.62845075", "0.6281781", "0.6280914", "0.6280228", "0.62761486", "0.6273974", "0.6272047", "0.6264224", "0.62638664", "0.6241596", "0.6233565", "0.62312996", "0.6229143", "0.6225723", "0.62253934", "0.62228155", "0.6220793", "0.6213189", "0.6212644", "0.6207444", "0.62022287", "0.6200635", "0.61981255", "0.6195219", "0.6193018", "0.61903125", "0.61821467", "0.61714447", "0.61690706", "0.61681604", "0.6167368", "0.6165614", "0.61618376", "0.6160268", "0.61560047", "0.6152997", "0.61508435", "0.61489165" ]
0.0
-1
Called when the player is able to play card. In this PlayerStrategy, playCard looks for the suit and rank that is most common in their own hand and tries to eliminate cards with that suit or rank. This ensures that the player's hand has as much variety as possible, lessening the chances that the player gets stuck having to draw.
@Override public Card playCard() { List<Card> rank1 = new ArrayList<>(); List<Card> rank2 = new ArrayList<>(); List<Card> rank3 = new ArrayList<>(); List<Card> rank4 = new ArrayList<>(); for (Card card : cardsInHand) { if (card.getRank().equals(Card.Rank.EIGHT)) { rank1.add(card); break; } else if (card.getSuit().equals(idealSuit) && card.getRank().equals(idealRank) && (topCard.getSuit().equals(card.getSuit()) || topCard.getRank().equals(card.getRank()))) { rank2.add(card); } else if ((card.getSuit().equals(idealSuit) || card.getRank().equals(idealRank)) && (topCard.getSuit().equals(card.getSuit()) || topCard.getRank().equals(card.getRank()))) { rank3.add(card); } else if (topCard.getSuit().equals(card.getSuit()) || topCard.getRank().equals(card.getRank())) { rank4.add(card); } } List<List<Card>> playPossibilities = new ArrayList<>(Arrays.asList(rank1, rank2, rank3, rank4)); for (List<Card> list : playPossibilities) { if (list.size() > 0) { cardsInHand.remove(list.get(0)); return list.get(0); } } // This method will never return null if shouldDrawCard() is called beforehand. return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Card PlayCard() {\n\t Card ret = null;\n\t Card card;\n\t if (mCardCount > 0) {\n\t\t // To work out what card to play, see what cards can be played\n\t\t \tCard[] playableCards;\n\t\t \tplayableCards = mRules.GetPlayableCards();\n\t\t \tCard[] selectedCards;\n\t\t \tselectedCards = new Card[8];\n\t\t \tint iNumSelectableCards = 0;\n\t\t \tfor (int i = 0; i < 8; i++)\n\t\t \t\tselectedCards[i] = null;\n\t \tfor (int i = 0; i < mCardCount; i++){\n\t \t\tcard = mCard[i];\n\t \t\tswitch (card.GetSuit()){\n\t \t\tcase Card.HEARTS:\n\t \t\t\t\n\t \t\t\t// Card is a heart, can it be played?\n\t \t\t\t// Is it a seven, it can be played...\n\t \t\t\tif (card.GetValue() == 7){\n\t \t\t\t\tselectedCards[Rules.HEARTS8] = card;\n\t \t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t// and must be played first\n\t \t\t\t\tplayableCards[Rules.HEARTS8] = new Card(8,Card.HEARTS);\n\t \t\t\t\tplayableCards[Rules.HEARTS6] = new Card(6,Card.HEARTS);\n\t \t\t\t\tplayableCards[Rules.CLUBS8] = new Card(7,Card.CLUBS);\n\t \t\t\t\tplayableCards[Rules.DIAMONDS8] = new Card(7,Card.DIAMONDS);\n\t \t\t\t\tplayableCards[Rules.SPADES8] = new Card(7,Card.SPADES);\n\t \n\t \t\t\t\treturn card;\n\t \t\t\t}\n\t \t\t\tif (card.GetValue() < 7){\n\t \t\t\t\tif (card.Equals(playableCards[Rules.HEARTS6])){\n\t \t\t\t\t\tselectedCards[Rules.HEARTS6] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t\t//Log.i(\"\",\" Playing card \" + (card.GetValue()) + \" , \" +card.GetSuit());\n\t \t\t\t\t\t//Log.i(\"\",\" Updating playable card \" + (card.GetValue()-1) + \" , \" +Card.HEARTS);\t \t\t\t\t\t\n\t \t\t\t\t\t//playableCards[Rules.HEARTS6] = new Card(card.GetValue()-1,Card.HEARTS);\n\t \t\t\t\t\t//return card;\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t\tif (card.GetValue() > 7){\n\t \t\t\t\tif (card.Equals( playableCards[Rules.HEARTS8])){\n\t \t\t\t\t\tselectedCards[Rules.HEARTS8] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t\t//Log.i(\"\",\" Playing card \" + (card.GetValue()) + \" , \" +card.GetSuit());\n\t \t\t\t\t\t//Log.i(\"\",\" Updating playable card \" + (card.GetValue()+1) + \" , \" +Card.HEARTS);\t \t\t\t\t\t\n\t \t\t\t\t\t//playableCards[Rules.HEARTS8] = new Card(card.GetValue()+1,Card.HEARTS);\n\t \t\t\t\t\t//return card;\n\t \t\t\t\t}\n\t \t\t\t}\t \t\t\t\n\t \t\t\t\n\t \t\t\tbreak;\n\t \t\tcase Card.DIAMONDS:\n\t \t\t\t// Is it a seven, it can be played...\n\t \t\t\tif (card.GetValue() == 7){\n\t \t\t\t\tif (card.Equals(playableCards[Rules.DIAMONDS8])){\n\t \t\t\t\t\tselectedCards[Rules.DIAMONDS8] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t\t\n\t \t\t\tif (card.GetValue() < 7){\n\t \t\t\t\tif (card.Equals( playableCards[Rules.DIAMONDS6])){\n\t \t\t\t\t\tselectedCards[Rules.DIAMONDS6] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t\tif (card.GetValue() > 7){\n\t \t\t\t\tif (card.Equals( playableCards[Rules.DIAMONDS8])){\n\t \t\t\t\t\tselectedCards[Rules.DIAMONDS8] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\n\t \t\t\t}\t\t \t\t\t\n\t \t\t\t\n\t \t\t\tbreak;\n\t \t\t\t\n\t \t\tcase Card.CLUBS:\n\t \t\t\t// Is it a seven, it can be played...\n\t \t\t\tif (card.GetValue() == 7){\n\t \t\t\t\tif (card.Equals(playableCards[Rules.CLUBS8])){\n\t \t\t\t\t\tselectedCards[Rules.CLUBS8] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\t \t\t\t\t\n\t \t\t\t}\n\t \t\t\t\n\t \t\t\tif (card.GetValue() < 7){\n\t \t\t\t\tif (card.Equals(playableCards[Rules.CLUBS6])){\n\t \t\t\t\t\tselectedCards[Rules.CLUBS6] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t\tif (card.GetValue() > 7){\n\t \t\t\t\tif (card.Equals(playableCards[Rules.CLUBS8])){\n\t \t\t\t\t\tselectedCards[Rules.CLUBS8] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\n\t \t\t\t}\t\t \t\t\t\n\t \t\t\tbreak;\n\t \t\t\t\n\t \t\tcase Card.SPADES:\n\t \t\t\t// Is it a seven, it can be played...\n\t \t\t\tif (card.GetValue() == 7){\n\t \t\t\t\tif (card.Equals(playableCards[Rules.SPADES8])){\n\t \t\t\t\t\tselectedCards[Rules.SPADES8] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\t \t\t\t\t\n\t \t\t\t}\n\t \t\t\t\n\t \t\t\tif (card.GetValue() < 7){\n\t \t\t\t\tif (card.Equals( playableCards[Rules.SPADES6])){\n\t \t\t\t\t\tselectedCards[Rules.SPADES6] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t\tif (card.GetValue() > 7){\n\t \t\t\t\tif (card.Equals( playableCards[Rules.SPADES8])){\n\t \t\t\t\t\tselectedCards[Rules.SPADES8] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\n\t \t\t\t}\t \t\t\t\n\t \t\t\tbreak;\n\n\t \t\t\t\t \t\t\t\n\t \t\t}\n\t\n\t \t}\t\n\t \t\n\t \t// Now go through the selectable cards and see which is best to be played\n\t \tif (iNumSelectableCards == 0)\n\t \t\treturn ret;\n\t \t\n\t \tint iPos;\n\t \tcard = null;\n\t \tif (iNumSelectableCards == 1){\n\t\t\t \tfor (int i = 0; i < 8; i++)\n\t\t\t \t\tif (selectedCards[i] != null){\n\t\t\t \t\t\tcard = selectedCards[i];\n\t\t\t \t\t\tbreak;\n\t\t\t \t\t}\n\t\t\t \t\t\t \t\n\t \t}\n\t \telse {\n\t\t\t String sDifficulty = mRules.mView.GetSettings().getString(\"Difficulty\", \"0\");// 0 = hard, 1 = easy\n\t\t\t int iDifficulty = Integer.parseInt(sDifficulty);\n\t\t\t if (iDifficulty == EASY){\n\t\t\t \t// Get a random card from the playable ones\n\t\t\t\t\t Random generator = new Random();\n\t\t\t\t\t int randomIndex = generator.nextInt( iNumSelectableCards );\n\t\t\t\t\t int iCount = 0;\n\t\t\t\t\t \tfor (int i = 0; i < 8; i++){\n\t\t\t\t\t \t\tif (selectedCards[i] != null){\n\t\t\t\t\t \t\t\tif (iCount == randomIndex){\n\t\t\t\t\t \t\t\t\tcard = selectedCards[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\telse iCount++;\n\t\t\t\t\t \t\t}\t\n\t\t\t\t\t \t}\n\t\t\t }\n\t\t\t else {\n\t\t\t \tiPos = GetBestCard(selectedCards);\n\t\t\t \tcard = selectedCards[iPos];\n\t\t\t }\n\t \t}\n\t \t\n\t \tswitch (card.GetSuit()){\n \t\tcase Card.HEARTS:\t \t\n \t\t\tif (card.GetValue() == 7){\n \t\t\t\t// and must be played first\n \t\t\t\tplayableCards[Rules.HEARTS8] = new Card(8,Card.HEARTS);\n \t\t\t\tplayableCards[Rules.HEARTS6] = new Card(6,Card.HEARTS);\n \t\t\t\tplayableCards[Rules.CLUBS8] = new Card(7,Card.CLUBS);\n \t\t\t\tplayableCards[Rules.DIAMONDS8] = new Card(7,Card.DIAMONDS);\n \t\t\t\tplayableCards[Rules.SPADES8] = new Card(7,Card.SPADES);\n \n \t\t\t\treturn card;\n \t\t\t}\n \t\t\tif (card.GetValue() < 7){\n \t\t\t\tif (card.Equals(playableCards[Rules.HEARTS6])){\n \t\t\t\t\tplayableCards[Rules.HEARTS6] = new Card(card.GetValue()-1,Card.HEARTS);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\n \t\t\tif (card.GetValue() > 7){\n \t\t\t\tif (card.Equals( playableCards[Rules.HEARTS8])){ \t\t\t\t\t\n \t\t\t\t\tplayableCards[Rules.HEARTS8] = new Card(card.GetValue()+1,Card.HEARTS);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\t \t\t\t\n \t\t\t\n \t\t\tbreak; \n \t\tcase Card.DIAMONDS:\n \t\t\t// Is it a seven, it can be played...\n \t\t\tif (card.GetValue() == 7){\n \t\t\t\tif (playableCards[Rules.HEARTS8] != null && playableCards[Rules.HEARTS8].GetValue() > 7){\n\t \t\t\t\tplayableCards[Rules.DIAMONDS8] = new Card(8,Card.DIAMONDS);\n\t \t\t\t\tplayableCards[Rules.DIAMONDS6] = new Card(6,Card.DIAMONDS);\t \t\t\t\t\t\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\tif (card.GetValue() < 7){\n \t\t\t\tif (card.Equals( playableCards[Rules.DIAMONDS6])){\t \t\t\t\t\t\n \t\t\t\t\tplayableCards[Rules.DIAMONDS6] = new Card(card.GetValue()-1,Card.DIAMONDS);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\n \t\t\tif (card.GetValue() > 7){\n \t\t\t\tif (card.Equals( playableCards[Rules.DIAMONDS8])){\t \t\t\t\t\t\n \t\t\t\t\tplayableCards[Rules.DIAMONDS8] = new Card(card.GetValue()+1,Card.DIAMONDS);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\t\t \t\t\t\n \t\t\t\n \t\t\tbreak; \n \t\t\t\n \t\tcase Card.CLUBS:\n \t\t\t// Is it a seven, it can be played...\n \t\t\tif (card.GetValue() == 7){\n\n \t\t\t\tif (playableCards[Rules.HEARTS8] != null && playableCards[Rules.HEARTS8].GetValue() > 7){\n\t \t\t\t\tplayableCards[Rules.CLUBS8] = new Card(8,Card.CLUBS);\n\t \t\t\t\tplayableCards[Rules.CLUBS6] = new Card(6,Card.CLUBS);\t \t\t\t\t\t\n \t\t\t\t\treturn card;\n \t\t\t\t}\t \t\t\t\t\n \t\t\t}\n \t\t\t\n \t\t\tif (card.GetValue() < 7){\n \t\t\t\tif (card.Equals(playableCards[Rules.CLUBS6])){\n \t\t\t\t\tplayableCards[Rules.CLUBS6] = new Card(card.GetValue()-1,Card.CLUBS);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\n \t\t\tif (card.GetValue() > 7){\n \t\t\t\tif (card.Equals(playableCards[Rules.CLUBS8])){\n \t\t\t\t\tLog.i(\"\",\" Updating playable card \" + (card.GetValue()+1) + \" , \" +Card.CLUBS);\n \t\t\t\t\tplayableCards[Rules.CLUBS8] = new Card(card.GetValue()+1,Card.CLUBS);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\t\t \t\t\t\n \t\t\tbreak; \n \t\tcase Card.SPADES:\n \t\t\t// Is it a seven, it can be played...\n \t\t\tif (card.GetValue() == 7){\n \t\t\t\tif (playableCards[Rules.HEARTS8] != null && playableCards[Rules.HEARTS8].GetValue() > 7){\n\t \t\t\t\tplayableCards[Rules.SPADES8] = new Card(8,Card.SPADES);\n\t \t\t\t\tplayableCards[Rules.SPADES6] = new Card(6,Card.SPADES);\t \t\t\t\t\t\n \t\t\t\t\treturn card;\n \t\t\t\t}\t \t\t\t\t\n \t\t\t}\n \t\t\t\n \t\t\tif (card.GetValue() < 7){\n \t\t\t\tif (card.Equals( playableCards[Rules.SPADES6])){ \t\t\t\t\t\n \t\t\t\t\tplayableCards[Rules.SPADES6] = new Card(card.GetValue()-1,Card.SPADES);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\n \t\t\tif (card.GetValue() > 7){\n \t\t\t\tif (card.Equals( playableCards[Rules.SPADES8])){\t \t\t\t\t\t\n \t\t\t\t\tplayableCards[Rules.SPADES8] = new Card(card.GetValue()+1,Card.SPADES);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\t \t\t\t\n \t\t\tbreak;\n \t\t\t\n\t \t}\n\t \n\t }\n\t return ret;\n }", "public void applyCard(Card card, String user){\n if (user.equals(\"player\")){\n if (card == null){\n //System.out.println(\"No card in this slot\");\n //System.out.println(\"Size of tempDeck: \" + playerTempDeck.size());\n } else{\n if(playerMana >= card.getManaCost()){\n updateMana(\"player\", -card.getManaCost());\n //Check if has enough gold, too. Make free cards have a worth of gold = 0.\n //playerGoldAmount -= card.getGoldCost(); //------------------------------------------------Implement this once it can be tested.\n\n if(card.getEffect().contains(\"A\")){ //attack\n //looks long, but it finds the index of the Attack symbol (\"A\") and adds one to it, so it'll find the value 5 if the input is \"A5\", anywhere on the string.\n //Allows for things such as \"A4D1\" in theory.\n updateHealth(\"enemy\", -Character.getNumericValue(card.getEffect().charAt(card.getEffect().indexOf(\"A\") + 1)), true);\n }\n if(card.getEffect().contains(\"D\")) { //Defend\n updateDefence(\"player\", Character.getNumericValue(card.getEffect().charAt(card.getEffect().indexOf(\"D\") + 1)));\n }\n\n //Discard the card just used, put into discarded pile.\n Integer index = playerHand.indexOf(card);\n discardedCards.add(card);\n //System.out.println(\"Current index is: \" + index);\n //System.out.println(\"At that index was: \" + playerHand.get(index));\n playerHand.set(index, null);\n\n\n //System.out.println(\"The deck is currently: \" + playerHand.toString());\n //playerHand.remove(card); //Doesn't work, shortens the size all together.\n drawCard(index);\n }\n }\n }\n\n else if (user.equals(\"enemy\")){\n if(enemyMana >= card.getManaCost()){\n updateMana(\"enemy\", -card.getManaCost());\n if(card.getEffect().contains(\"A\")){\n updateHealth(\"player\", -Character.getNumericValue(card.getEffect().charAt(card.getEffect().indexOf(\"A\") + 1)), true);\n }\n if(card.getEffect().contains(\"D\")) {\n updateDefence(\"enemy\", Character.getNumericValue(card.getEffect().charAt(card.getEffect().indexOf(\"D\") + 1)));\n }\n }\n }\n }", "public Card takeTurn(Suit suit, int rank) throws InvalidCardException {\n //display current hand and prompt the user to input a card to play\n Scanner scanner = new Scanner(System.in);\n while(true) {\n System.out.println(name+\"'s turn\");\n System.out.println(\"Your current hand is:\");\n System.out.print(\"[\"+hand.getCards().get(0));\n for(int i=1; i<hand.getCards().size(); i++) {\n System.out.print(\", \"+hand.getCards().get(i));\n }\n System.out.println(\"]\");\n System.out.println(\"Which card do you want to play?\");\n //read the user's input and make sure it's a valid card\n String input = scanner.next();\n //if the user entered nothing, they draw by default\n if(input.equals(\"none\")) {\n return null;\n }\n Suit inputSuit = null;\n switch(input.substring(input.length()-1).toLowerCase()) {\n case \"c\":\n inputSuit = Suit.CLUBS;\n break;\n case \"s\":\n inputSuit = Suit.SPADES;\n break;\n case \"h\":\n inputSuit = Suit.HEARTS;\n break;\n case \"d\":\n inputSuit = Suit.DIAMONDS;\n break;\n default:\n throw new InvalidCardException(\"Invalid suit\");\n }\n int inputRank = Integer.parseInt(input.substring(0,input.length()-1));\n if(inputRank < 1 || inputRank > 13) {\n throw new InvalidCardException(\"Invalid rank\");\n }\n //if the card is playable and the player has it in their hand, then play it\n if(inputSuit.equals(suit) || inputRank == rank) {\n ArrayList<Card> cards = hand.getCards();\n Card card = new Card(inputSuit, inputRank);\n for(int i=0; i<cards.size(); i++) {\n if(cards.get(i).equals(card)) {\n return hand.draw(input);\n }\n }\n System.out.println(\"You do not have that card\");\n } else if(hand.getCards().contains(new Card(inputSuit, inputRank)) && inputRank == 8) { //this makes 8s always playable\n return hand.draw(input);\n } else {\n System.out.println(\"Invalid card. Try again\");\n }\n }\n }", "private static void playBlackjack(Player player) {\n\t\t//Delete hands of previous games.\n\t\tplayer.getReady();\n\t\t\n\t\t//Create the dealer.\n\t\tDealer dealer = new Dealer();\n\t\t\n\t\t//Deal two cards to each player.\n\t\tplayer.addCard(deck.dealCard());\n\t\tplayer.addCard(deck.dealCard());\n\t\t\n\t\tdealer.addCard(deck.dealCard());\n\t\tdealer.addCard(deck.dealCard());\n\t\t\n\t\t//Check if anyone has Blackjack.\n\t\tif (dealer.hasBlackjack()) {\n\t\t\tconsole.println(\"Your hand:\" + player.getHand());\n\t\t\tconsole.println(\"Dealer hand:\" + dealer.getHand());\n\t\t\tconsole.println(\"\\n*******************\\n\" +\n\t\t\t\t\t\"Blackjack! You lose!!\" +\n\t\t\t\t\t\"\\n*******************\\n\");\n\t\t\tconsole.println(\"Press <Enter> to continue.\");\n\t\t\tplayer.pay();\n\t\t\treturn;\n\t\t}\n\t\tif (player.hasBlackjack()) {\n\t\t\tconsole.println(\"Dealer hand:\" + dealer.getHand());\n\t\t\tconsole.println(\"Your hand:\" + player.getHand());\n\t\t\tconsole.println(\"\\n*******************\\n\" +\n\t\t\t\t\t\"Blackjack! You lose!!\" +\n\t\t\t\t\t\"\\n*******************\\n\");\n\t\t\tconsole.println(\"Press <Enter> to continue.\");\n\t\t\tplayer.collect();\n\t\t\treturn;\n\t\t\t\n\t\t}\n\t\t\n\t\t//Now the real game begins. Player play first.\n\t\t//Must play all the hands until dealer's turn.\n\t\tboolean dealerTurn = false;\n\t\t\n\t\tconsole.println(String.format(\"\\n\\nDealer first card: %s\", dealer.getFirstCard()));\n\t\t\n\t\twhile (!dealerTurn) { //Player keep playing as long as she can/wants\n\t\t\t\n\t\t\t//Player can have multiple hands (after split). Should play all of them independently.\n\t\t\tOptional<Hand> optionalPlayingHand = player.getNextPlayableHand();\n\t\t\t\n\t\t\tif (optionalPlayingHand.isPresent()) {\n\t\t\t\t\n\t\t\t\tplayer.setCurrentHand(optionalPlayingHand.get());\n\t\t\t\t\n\t\t\t\tconsole.println(\"Your playing hand:\" + player.getHand());\n\t\t\t\tconsole.print(\"Please, select an option: \");\n\t\t\t\tconsole.println(\"(1) Hit (2) Stand (3) Double Down (4) Split (5) Surrender\");\n\t\t\t\tint option = scanner.nextInt();\n\t\t\t\t\n\t\t\t\tswitch (UserAction.valueOf(option)) {\n\t\t\t\t\tcase HIT:\n\t\t\t\t\t\tconsole.println(\"You've chosen: HIT\");\n\t\t\t\t\t\tplayer.hit(deck.dealCard());\n\t\t\t\t\t\tconsole.println(\"Your resulting hand:\" + player.getHand());\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase STAND:\n\t\t\t\t\t\tconsole.println(\"You've chosen: STAND\");\n\t\t\t\t\t\tplayer.stand();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase SPLIT:\n\t\t\t\t\t\tconsole.println(\"You've chosen: SPLIT\");\n\t\t\t\t\t\tif (player.split(deck.dealCard(), deck.dealCard())) {\n\t\t\t\t\t\t\tconsole.println(\"Your hand has been split\");\n\t\t\t\t\t\t\tconsole.println(\"Your resulting hand:\" + player.getHand());\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tconsole.println(\"Your hand can not be split. Try another option\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase DOUBLE_DOWN:\n\t\t\t\t\t\tconsole.println(\"You've chosen: DOUBLE DOWN\");\n\t\t\t\t\t\tplayer.doubleDown(deck.dealCard());\n\t\t\t\t\t\tconsole.println(\"Your resulting hand:\" + player.getHand());\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase SURRENDER:\n\t\t\t\t\t\tconsole.println(\"You've chosen: SURRENDER\");\n\t\t\t\t\t\tif (player.surrender()) {\n\t\t\t\t\t\t\tconsole.println(\"Lose half of your bet.\");\n\t\t\t\t\t\t\tconsole.println(\"Dealer hand:\" + dealer.getHand());\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tconsole.println(\"You cannot surrender. Try another option\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tdealerTurn = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//All player's hands are standing or busted\n\t\tfor (Hand hand : player.getHands()) {\n\t\t\tconsole.println(\"Your hand: \" + hand + \" Status: \" + hand.getStatus());\n\t\t}\n\t\t\n\t\tconsole.println(\"\\nDealer hand:\" + dealer.getHand());\n\t\t\n\t\tif (player.isBusted()) {\n\t\t\tconsole.println(\"\\n************\\n\" +\n\t\t\t\t\t\"You lose!!\" +\n\t\t\t\t\t\"\\n************\\n\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tconsole.println(\"\\nDealer turn.\\n\");\n\t\t//Dealer's turn.\n\t\twhile (dealerTurn) {\n\t\t\tUserAction dealerAction = dealer.getNextAction();\n\t\t\tswitch (dealerAction) {\n\t\t\t\tcase HIT:\n\t\t\t\t\tconsole.println(\"Dealer HIT\");\n\t\t\t\t\tdealer.hit(deck.dealCard());\n\t\t\t\t\tconsole.println(\"Dealer resulting hand:\" + dealer.getHand());\n\t\t\t\t\tbreak;\n\t\t\t\tcase STAND:\n\t\t\t\t\tconsole.println(\"Dealer STAND\");\n\t\t\t\t\tdealer.stand();\n\t\t\t\t\tdealerTurn = false;\n\t\t\t\t\tbreak;\n\t\t\t\tcase DONE:\n\t\t\t\t\tdealerTurn = false;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tconsole.println(\"Dealer hand:\" + dealer.getHand());\n\t\tif (dealer.isBusted()) {\n\t\t\t//Dealer is busted. Player wins!\n\t\t\tconsole.println(\"\\n************\\n\" +\n\t\t\t\t\t\"You win!!\" +\n\t\t\t\t\t\"\\n************\\n\");\n\t\t\tplayer.collect();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//Check if dealer won\n\t\tif (dealer.hasBlackjack()) {\n\t\t\tconsole.println(\"\\n******************************************************\\n\" +\n\t\t\t\t\t\"There is a tie!. Dealer wins. Its a casino after all\" +\n\t\t\t\t\t\"\\n******************************************************\\n\");\n\t\t\tplayer.pay();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tconsole.println(\"\\n*****************************************************************\\n\");\n\t\tfor (Hand hand : player.getNonBustedHands()) {\n\t\t\tif (hand.getValue() > dealer.getValue()) {\n\t\t\t\t//Player has a better hand. Hand wins.\n\t\t\t\tconsole.println(\"You have a winner hand :\" + hand);\n\t\t\t\tplayer.collect(hand);\n\t\t\t} else {\n\t\t\t\t//Player's hand lose\n\t\t\t\tconsole.println(\"You have a losing hand :\" + hand);\n\t\t\t\tif (hand.getValue() == dealer.getValue()) {\n\t\t\t\t\tconsole.println(\"Remember: in a tie, you lose!\");\n\t\t\t\t}\n\t\t\t\tplayer.pay(hand);\n\t\t\t}\n\t\t}\n\t\tconsole.println(\"\\n*****************************************************************\\n\");\n\t}", "public void playCard(ActionCard card, Integer selectedPlayer)\n {\n System.out.println(\"gui: playCard: \" + card + \", selected: \" + selectedPlayer);\n // Guard against this\n if (!isTurn || this.played)\n {\n return;\n }\n \n if(card instanceof PrivateTip || card instanceof Snoop) \n {\n if(selectedPlayer == null) \n {\n JOptionPane.showMessageDialog(null, \"Please select \"\n + \"a player in the \"\n + \"Player Listing (Upper right) that is not yourself!\", \n \"Warning\", \n JOptionPane.ERROR_MESSAGE); \n return;\n }\n }\n\n if (card instanceof Suggestion)\n {\n this.played = true;\n // prompt for solution\n suggestionScreen = new AccusationScreen(this, true, (Suggestion)card);\n suggestionScreen.setVisible(true);\n }\n else\n {\n this.played = clientController.playActionCard(card, selectedPlayer);\n if(!this.played)\n {\n mainGameScreen.notifyUser(\"Play failed: To Play this card,\"\n + \" please select a CluePlayer from the 'Players' list,\"\n + \" then click on this card.\");\n }\n }\n\n }", "public boolean play(DiscardPile discardPile, \n\t Stack<Card> drawPile, \n\t\t\t\t\t\t\t\t\t\t\tArrayList<Player> players)\n\t{\t\n\t\n\t\n\tSystem.out.println(\"Before playing: \" + this.hand.toString());\n\t\tboolean temp = false;\n\t\tString suitEight = \"xyz\";\n\t\n\t\tif ((discardPile.top()).getRank() == 4 && super.checker_4 == true){\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\"\\t _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \");\n\t\t\tSystem.out.println(\"\\t | skipping the turn.. :( |\");\n\t\t\tSystem.out.println(\"\\t -----------------------------\");\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println();\n\t\t\tsuper.checker_4 = false;\n\t\t\treturn false;\n\t\t\t\n\t\t\t}\n\t\n\t\n\t\n\t\n\t\n\t\n\t\t/* adding two cards */\n\t\t if ((discardPile.top()).getRank() == 2 && super.checker_2 == true){\n\t\t\t \n\t\t\t System.out.println();\n\t\t\t System.out.println(\"\\t _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \");\n\t\t\t System.out.println(\"\\t | twice the value added! |\");\n\t\t\t System.out.println(\"\\t -----------------------------\");\n\t\t\t System.out.println();\n\t\t\t System.out.println();\n\t\t\t \n\t\t\t \n\t\t\tthis.hand.add(drawPile.pop());\n\t\t\t this.hand.add(drawPile.pop());\n\t\t\ttemp = false;\n\t\t\tsuper.checker_2 = false;\n\t\t }\n\t\t\n\t\t\n\t\t \n\t\t\n\t\telse{\n\t\t\tint i = location_1(discardPile);\n\t\t\t\n\t\t\t\n\t\t\tif(i == -1){\n\t\t\t\tthis.hand.add(drawPile.pop());\n\t\t\t\tif( i == location_2(discardPile)){ \n\t\t\t\t\t//System.out.println(\"value is added!\");\n\t\t\t\t\t//System.out.println();\n\t\t\t\t\t//System.out.println();\n\t\t\t\t\n\t\t\t\t} else{\n\t\t\t\t\ti = location_2(discardPile);\n\t\t\t\t\t//System.out.println(\"HAHA! got it!\");\n\t\t\t\t\tdiscardPile.add(this.hand.remove(i));\n\t\t\t\t\ttemp = false;\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif ((discardPile.top()).getRank() == 2 && super.checker_2 == false){\n\t\t\t\t\t\tsuper.checker_2 = true;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(discardPile.top().getRank() == 4 && super.checker_4 == false){\n\t\t\t\t\t\tsuper.checker_4 = true;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif ((discardPile.top()).getRank() == 8 && temp == false){\n\t\t\t\t\t\tsuitEight = this.wildEight(discardPile, drawPile, players);\n\t\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t\tSystem.out.println(\"\\t \\t ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\");\n\t\t\t\t\t\tSystem.out.println(\"\\t \\t \\t Changing the suit to: \" + suitEight);\n\t\t\t\t\t\tSystem.out.print(\"\\t \\t \\t Processing....\");\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\tSystem.out.println();\n\t\t\t\t\t\t(discardPile.top()).setSuit(suitEight);\n\t\t\t\t\t\tSystem.out.println(\"\\t \\t \\t draw pile : \" + drawPile.peek() );\n\t\t\t\t\t\tSystem.out.println(\"\\t \\t \\t discard pile : \" + discardPile.top() );\n\t\t\t\t\t\tSystem.out.println(\"\\t \\t ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\");\n\t\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif( this.hand.size() == 0 ){\n\t\t\t\t\ttemp = true;\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\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t} else{\n\t\t\t\tdiscardPile.add(this.hand.remove(i));\n\t\t\t\ttemp = false;\n\t\t\t\t\n\t\t\t\tif ((discardPile.top()).getRank() == 2 && super.checker_2 == false){\n\t\t\t\t\t\tsuper.checker_2 = true;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(discardPile.top().getRank() == 4 && super.checker_4 == false){\n\t\t\t\t\tsuper.checker_4 = true;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ((discardPile.top()).getRank() == 8 && temp == false){\n\t\t\t\t\t\tsuitEight = this.wildEight(discardPile, drawPile, players);\n\t\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t\tSystem.out.println(\"\\t \\t ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\");\n\t\t\t\t\t\tSystem.out.println(\"\\t \\t \\t Changing the suit to: \" + suitEight);\n\t\t\t\t\t\tSystem.out.print(\"\\t \\t \\t Processing....\");\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\tSystem.out.println();\n\t\t\t\t\t\t(discardPile.top()).setSuit(suitEight);\n\t\t\t\t\t\tSystem.out.println(\"\\t \\t \\t draw pile : \" + drawPile.peek() );\n\t\t\t\t\t\tSystem.out.println(\"\\t \\t \\t discard pile : \" + discardPile.top() );\n\t\t\t\t\t\tSystem.out.println(\"\\t \\t ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\");\n\t\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif( this.hand.size() == 0 ){\n\t\t\t\t\ttemp = true;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\n\n\t\t\n\t\t\n\t\n\t\tSystem.out.println(\"After Playing: \" + this.hand.toString());\n\t\tSystem.out.println();\n\t\treturn temp;\n\t\t\n\t\n\t}", "Card playCard(int playerIndex, int cardIndex)\n {\n if (playerIndex < 0 || playerIndex > numPlayers - 1 ||\n cardIndex < 0 || cardIndex > numCardsPerHand - 1)\n {\n //Creates a card that does not work\n return new Card('M', Card.Suit.spades); \n }\n\n // return the card played\n return hand[playerIndex].playCard(cardIndex);\n\n }", "@Override\n\tpublic void cardInPlay() {\n\t\tIPlayer playedOn = this.game.getOtherPlayer();\n\t\tif(!playedOn.getFaction().equals(Faction.Cultist)){\n\t\t\tplayedOn.setFaction(Faction.UNAFFILIATED);\n\t\t}\n\t\tthis.setDiscard();\n\t}", "public Card takeTurn() {\n //display current hand and prompt the user to input a card to play\n Scanner scanner = new Scanner(System.in);\n while(true) {\n System.out.println(name+\"'s turn\");\n System.out.println(\"Your current hand is:\");\n System.out.print(\"[\"+hand.getCards().get(0));\n for(int i=1; i<hand.getCards().size(); i++) {\n System.out.print(\", \"+hand.getCards().get(i));\n }\n System.out.println(\"]\");\n System.out.println(\"Which card do you want to play?\");\n //read the user's input and make sure it's a valid card\n String input = scanner.next();\n //if the user entered nothing, they draw by default\n if(input.equals(\"none\")) {\n return null;\n }\n Suit inputSuit = null;\n switch(input.substring(input.length()-1).toLowerCase()) {\n case \"c\":\n inputSuit = Suit.CLUBS;\n break;\n case \"s\":\n inputSuit = Suit.SPADES;\n break;\n case \"h\":\n inputSuit = Suit.HEARTS;\n break;\n case \"d\":\n inputSuit = Suit.DIAMONDS;\n break;\n default:\n throw new InvalidCardException(\"Invalid suit\");\n }\n int inputRank = Integer.parseInt(input.substring(0,input.length()-1));\n if(inputRank < 1 || inputRank > 13) {\n throw new InvalidCardException(\"Invalid rank\");\n }\n //if the player has it in their hand, then play it\n ArrayList<Card> cards = hand.getCards();\n for(int i=0; i<cards.size(); i++) {\n if(cards.get(i).equals(new Card(inputSuit, inputRank))) {\n return hand.draw(input);\n }\n }\n System.out.println(\"Invalid card. Try again\");\n }\n }", "@Override\r\n public boolean playTurn()\r\n {\n System.out.println(\"current bid = \" + currentBid);\r\n currentBid = players[currentPlayer].playHand(currentBid);\r\n\r\n System.out.println(\"Player bid = \" + currentBid);\r\n // Add hand played to discard pile\r\n discards.add(currentBid.getHand());\r\n // Offer all other players the chance to call cheat\r\n int callee = -1;\r\n {\r\n int[] calls = new int[MINPLAYERS];\r\n int i = 0;\r\n for (int j = 0; j < players.length; ++j)\r\n {\r\n // don't allow us to call cheat on ourselves\r\n if (currentPlayer == j)\r\n continue;\r\n Player p = players[j];\r\n if (p.callCheat(currentBid, currentPlayer))\r\n calls[i++] = j;\r\n }\r\n if (i > 0)\r\n callee = calls[rg.nextInt(i)];\r\n }\r\n\r\n if (callee != -1)\r\n {\r\n System.out.println(\"Player called cheat by Player \" + (callee+1));\r\n if (isCheat(currentBid)) //CHEAT CALLED CORRECTLY\r\n {\r\n for (Player p : players)\r\n p.broadcastCheat(currentPlayer, callee, true);\r\n //Give the discard pile of cards to currentPlayer who then has to play again\r\n players[currentPlayer].addHand(discards);\r\n System.out.println(\"Player cheats!\");\r\n System.out.println(\"Adding cards to player \"+\r\n (currentPlayer+1) + \" \" + players[currentPlayer]);\r\n }\r\n else //CHEAT CALLED INCORRECTLY\r\n {\r\n for (Player p : players)\r\n p.broadcastCheat(currentPlayer, callee, false);\r\n System.out.println(\"Player Honest\");\r\n currentPlayer = callee; // set the currentPlayer to callee\r\n // later on we'll increase this, so it's the person after\r\n // they who called's turn.\r\n players[currentPlayer].addHand(discards);\r\n System.out.println(\"Adding cards to player \"+\r\n (currentPlayer+1) + players[currentPlayer]);\r\n }\r\n //If cheat is called, current bid reset to an empty bid with rank two whatever\r\n //the outcome\r\n currentBid = new Bid();\r\n //Discards now reset to empty\r\n discards = new Hand();\r\n }\r\n else\r\n {\r\n System.out.println(\"No Cheat Called\");\r\n }\r\n /*\r\n Game bug fix:\r\n The design of the game, as given, was floored in conjuction with\r\n the required implementations of the strategies.\r\n A scenario can arise where one player has all the twos and the other\r\n has none, but it's their turn to play.\r\n The player with all the twos can consitently correctly call cheat on the\r\n player, as they have to claim to of laid a 2.\r\n\r\n This is easily fixed by moving the turn to the player after the one who\r\n just got called out\r\n */\r\n currentPlayer = (currentPlayer+1) % nosPlayers;\r\n return true;\r\n }", "public void dealPlayer() {\n //Deal two cards to the player\n playerStack.add(cards[talonStack]);\n playerScore += evaluateCardScore(playerScore, cards[talonStack].rank);\n talonStack++;\n\n playerStack.add(cards[talonStack]);\n playerScore += evaluateCardScore(playerScore, cards[talonStack].rank);\n talonStack++;\n }", "public void deal(){\n // deal cards when game is started and game stage is 0\n // need to clear everything\n if(turn == 4){\n turn = 0;\n }\n player1Hand.clear();\n player2Hand.clear();\n player3Hand.clear();\n player4Hand.clear();\n kitty.clear();\n currentMiddle.clear();\n\n /**\n * External Citation\n * Date: 19 September 2019\n * Problem: Did not have a good way to shuffle array\n * Resource: Dr. Tribelhorn, https://www.geeksforgeeks.org/collections-shuffle-java-examples/\n * Solution: Tribelhorn informed us of the shuffle function, and\n * we used the code in this post as a resource\n */\n // shuffle deck\n Collections.shuffle(deck.cardDeck);\n\n // deal cards to each player\n // player 1's hand\n for (int i = 0; i < 5; i++) {\n player1Hand.add(i, deck.cardDeck.get(i));\n player2Hand.add(i, deck.cardDeck.get(5 + i));\n player3Hand.add(i, deck.cardDeck.get(10 + i));\n player4Hand.add(i, deck.cardDeck.get(15 + i));\n }\n\n for (int i = 0; i < 4; i++) {\n kitty.add(i, deck.cardDeck.get(20 + i));\n }\n kittyTop = kitty.get(0);\n middleCard = deck.cardDeck.get(20);\n middleCardSuit = middleCard.getSuit();\n\n // make middle card visible\n middleVisible = true;\n\n // change game state to 1\n gameStage++;\n }", "@Override\n void pickCard() {\n\n boolean suitFound = false; // true if player has the suit\n Card cardToBeat; // strongest card on pile\n Card pickedCard = null; // card to throw\n ArrayList<Card> cardsToChooseFrom = new ArrayList<Card>();\n char trump = pitchTable.getTrump();\n\n // find the strongest card on pile\n cardToBeat = pitchTable.getCardToBeat();\n\n // if pile is empty\n if (cardToBeat == null){\n // pick the strongest non trump card\n for (Card card : hand)\n if (card.suit != trump)\n if ((pickedCard == null) || (pickedCard.rank < card.rank))\n pickedCard = card;\n\n // if non trump card not found (means all cards are trump)\n // then pick the strongest card\n if (pickedCard == null)\n for (Card card : hand)\n if ((pickedCard == null) || (pickedCard.rank < card.rank))\n pickedCard = card;\n }\n else { // means leading suit is set already\n // check if player has suit\n for (Card card : hand) {\n if (card.suit == pitchTable.getLeadingSuit())\n suitFound = true;\n }\n\n // if player does not have suit he can play any card\n if (!suitFound)\n cardsToChooseFrom = hand;\n else // if player has suit then cardsToChooseFrom = allowed cards\n for (Card card : hand)\n if ((card.suit == pitchTable.getLeadingSuit()) ||\n card.suit == pitchTable.getTrump())\n cardsToChooseFrom.add(card);\n }\n\n // try to take the trick with the lowest winning card\n // if no winning card then throw the lowest you have\n\n // (trying to take the trick)\n // if card not picked yet\n // then find the lowest card that has the suit and is higher than cardToBeat\n if (pickedCard == null)\n for (Card card : cardsToChooseFrom)\n if ((cardToBeat.suit == card.suit) && (cardToBeat.rank < card.rank))\n if ((pickedCard == null) || (pickedCard.rank > card.rank))\n pickedCard = card;\n\n // (trying to take the trick)\n // if card not picked yet and cardToBeat is not trump\n // then find the lowest trump\n if ((pickedCard == null) && (cardToBeat.suit != trump))\n for (Card card : cardsToChooseFrom)\n if (card.suit == trump)\n if ((pickedCard == null) || (pickedCard.rank > card.rank))\n pickedCard = card;\n\n // (trying to throw the lowest)\n // if still no card picked (means player cannot take the trick)\n // then throw the lowest non trump\n if (pickedCard == null)\n for (Card card : cardsToChooseFrom)\n if (card.suit != trump)\n if ((pickedCard == null) || (pickedCard.rank > card.rank))\n pickedCard = card;\n\n // (trying to throw the lowest)\n // if still no card picked (means all allowed cards are trump)\n // then throw the lowest trump\n if (pickedCard == null)\n for (Card card : cardsToChooseFrom)\n if ((pickedCard == null) || (pickedCard.rank > card.rank))\n pickedCard = card;\n\n if (pickedCard == null)\n System.out.println(\"Error: picked card still null\");\n\n pitchTable.putOnPile(pickedCard);\n hand.remove(pickedCard);\n\n }", "public boolean playCard(Cards card, Players player) {\n boolean higher = false;\n int compare = 0;\n if (playedCards.size() == 0 || this.playAgain(player)) { //to check if it is a new game or this is a new round\n if (card instanceof TrumpCards) { //to check if the first played card is a supertrump card\n setCategory(((TrumpCards) card).cardEffect());\n }\n higher = true;\n } else {\n if (card instanceof NormCards) { //to check if the played card is a normal card\n if (getLastCard() instanceof NormCards) { //to check whether the last played card is a normal card or a supertrump card\n if (category.equals(\"H\")) {\n Float now = new Float(((NormCards) card).getHardness());\n Float last = new Float(((NormCards) getLastCard()).getHardness());\n compare = now.compareTo(last);\n } else if (category.equals(\"S\")) {\n Float now = new Float(((NormCards) card).getSpecGravity());\n Float last = new Float(((NormCards) getLastCard()).getSpecGravity());\n compare = now.compareTo(last);\n } else if (category.equals(\"C\")) {\n Float now = new Float(((NormCards) card).getCleavageValue());\n Float last = new Float(((NormCards) getLastCard()).getCleavageValue());\n compare = now.compareTo(last);\n } else if (category.equals(\"CA\")) {\n Float now = new Float(((NormCards) card).getCrustalAbunVal());\n Float last = new Float(((NormCards) getLastCard()).getCrustalAbunVal());\n compare = now.compareTo(last);\n } else if (category.equals(\"EV\")) {\n Float now = new Float(((NormCards) card).getEcoValueValue());\n Float last = new Float(((NormCards) getLastCard()).getEcoValueValue());\n compare = now.compareTo(last);\n\n }\n if (compare > 0) {\n higher = true;\n } else {\n System.out.println(\"The selected card does not has higher value!\");\n }\n } else { //or else, the last played card is a supertrump card\n higher = true;\n }\n } else { //or else, the played is a supertrump card\n setCategory(((TrumpCards) card).cardEffect());\n higher = true;\n }\n }\n return higher;\n }", "@Override\n public void play(){\n \n // while neither player is dead\n while (continueGame()) {\n \n // both player and cpu draw a card and display the card\n player.play();\n System.out.printf(\"%s has drawn %s \\n\", player.getPlayerID(), \n player.getCard());\n cpu.play();\n System.out.printf(\"%s has drawn %s \\n\", cpu.getPlayerID(), \n cpu.getCard());\n \n // checks if the player wins the round\n if (winRound(player, cpu)) {\n // adds the cards to the gamedeck then the game deck to the\n // player deck\n winner(player, cpu, gameDeck);\n player.getWinningsPile().addCards(gameDeck.showCards().subList(0\n , gameDeck.getSize()));\n // empties the game deck\n gameDeck.showCards().clear();\n System.out.printf(\"%s wins round\\n\", player.getPlayerID());\n } else if (winRound(cpu, player)) { // if the cpu wins\n // adds the cards to the gamedeck then the game deck to the\n // cpu deck\n winner(cpu, player, gameDeck);\n cpu.getWinningsPile().addCards(gameDeck.showCards().subList(0, \n gameDeck.getSize()));\n // empties the game deck\n gameDeck.showCards().clear();\n System.out.println(\"CPU wins round\");\n } else {\n // if its a draw, check to see if either the cpu or player is\n // dying, if so, dont add the card to the gameDeck\n if (!(player.isDying())) {\n gameDeck.addCard(player.getCard());\n player.clearCard();\n }\n if (!(cpu.isDying())) {\n gameDeck.addCard(cpu.getCard());\n cpu.clearCard();\n }\n System.out.println(\"DRAW\");\n }\n // shows the current status of the game\n System.out.printf(\"%s's deck: %d winnings: %d \\n\", \n player.getPlayerID(), player.getDeck().getSize(), \n player.getWinningsPile().getSize());\n System.out.printf(\"CPU deck: %d winnings: %d \\n\", \n cpu.getDeck().getSize(), \n cpu.getWinningsPile().getSize());\n System.out.println(\"Press Enter to go to the next round\");\n in.nextLine();\n }\n //display the winner\n declareWinner();\n }", "private void dealCards(){\n\t\tfor(int k = 0; k <2;k++){\n\t\t\tfor(int i = 0; i < Players.size();i++){\n\t\t\t\tPlayers.get(i).addCardToHand(gameDeck.dealCard());\n\t\t\t}\n\t\t}\n\t\t\n\t setChanged();\n\t notifyObservers(\"CardsDealed\");\n\t}", "public int playHand(Hand hand){\r\n\r\n if( this.getRank() > hand.getRank()){\r\n System.out.println();\r\n System.out.println(\"Black: \" + this.getHand() + \" White: \" + hand.getHand());\r\n System.out.println(\"Black wins!\");\r\n return 1;\r\n }\r\n\r\n else if(this.getRank() < hand.getRank()){\r\n System.out.println();\r\n System.out.println(\"Black: \" + this.getHand() + \" White: \" + hand.getHand());\r\n System.out.println(\"White wins!\");\r\n return -1;\r\n }\r\n else{\r\n System.out.println();\r\n System.out.println(\"Black: \" + this.getHand() + \" White: \" + hand.getHand());\r\n\r\n if(this.getHighCard() > hand.getHighCard()){\r\n System.out.println(\"Black Wins!\");\r\n return 1;\r\n }\r\n else if(hand.getHighCard() > this.getHighCard()){\r\n System.out.println(\"white Wins!\");\r\n }\r\n System.out.print(\"Tie!\");\r\n return 0;\r\n }\r\n\r\n }", "public void playCard(PlayingCard card){\n\t\tplayed = hand.remove(hand.indexOf(card));\t\t\n\t}", "@Override\r\n\tpublic void playCard() {\n\t\t\r\n\t}", "@Override\n\tpublic void playCard() {\n\t\t\n\t}", "public boolean deal() {\n int k, j;\n boolean enoughCards;\n\n // clear all hands\n for (j = 0; j < numPlayers; j++)\n hand[j].resetHand();\n\n enoughCards = true;\n for (k = 0; k < numCardsPerHand && enoughCards; k++) {\n for (j = 0; j < numPlayers; j++)\n if (deck.getNumCards() > 0)\n hand[j].takeCard(deck.dealCard());\n else {\n enoughCards = false;\n break;\n }\n }\n\n return enoughCards;\n }", "@Test\r\n public void testPlayer_getCautiousStrategyCardCard_higherFirst_wd4() {\n player2 = new Player(\"Player Two\", true);\r\n player2.setHand(strategyHand.getAllCards());\r\n\r\n // get rid of the wild so the wd4 is the most attractive option\r\n player2.getHand().discard(wild);\r\n assertTrue(player2.getCautiousStrategyCard(yellowThree, yellowThree.getColor()).equals(wildDrawFour));\r\n }", "public void playBlackjack() {\n\t\tString choice;\n\t\t\n\t\tSystem.out.println(\"Welcome to Blackjack! \\n\");\n\t\tSystem.out.println(\"Dealing hands \\n\");\n\t\tdeck.shuffle();\n\t\tplayer.setHand(deck.drawHand());\n\t\tdealer.setHand(deck.drawHand());\n\t\t\n\t\t\n\t\tif(checkForBlackjack(player) && checkForBlackjack(dealer)) {\n\t\t\tSystem.out.println(showHands());\n\t\t\tSystem.out.println(\"Both player's have blackjack! \\n\");\n\t\t}\n\t\telse if(checkForBlackjack(player)) {\n\t\t\tSystem.out.println(showHands());\n\t\t\tSystem.out.println(\"Player has blackjack! You win! \\n\");\n\t\t}\n\t\telse if(checkForBlackjack(dealer)) {\n\t\t\tSystem.out.println(showHands());\n\t\t\tSystem.out.println(\"Dealer has blackjack! Dealer wins! \\n\");\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(showInitinalHand());\n\t\t\twhile(player.getHandVal() < 21) {\n\t\t\t\tSystem.out.println(\"Player's turn. Pick to hit or stand \\n\");\n\t\t\t\tchoice = scanner.nextLine().toUpperCase();\n\t\t\t\tif(choice.equals(\"STAND\") || choice.equals(\"S\")) {\n\t\t\t\t\tSystem.out.println(\"Player stands \\n\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse if(choice.equals(\"HIT\")|| choice.equals(\"H\")) {\n\t\t\t\t\tSystem.out.println(\"Player hits \\n\");\n\t\t\t\t\tplayer.addCard(deck.drawCard());\n\t\t\t\t\tSystem.out.println(showInitinalHand());\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(\"Invalid input \\n\");\n\t\t\t\t}\n\t\t\t}\n\t\t\twhile(dealer.getHandVal() < 17) {\n\t\t\t\tSystem.out.println(\"Dealer hits \\n\");\n\t\t\t\tdealer.addCard(deck.drawCard());\n\t\t\t\tSystem.out.println(showHands());\n\t\t\t}\n\t\t\tSystem.out.println(showHands());\n\t\t}\n\t\tcheckWinner();\n\t\tif(result.equals(\"TIE\")) {\n\t\t\tSystem.out.println(\"The result is a tie! \\n\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"The winner is the \" + result + \"!\\n\");\n\t\t}\n\t}", "static int getComputerCard(Card playerCard) {\n //The computer will iterate through different possible cards it might choose to play.\n //This represents a chosen card at any given time.\n Card possibleCard = null;\n //The position in the computer's hand where the possibleCard is stored.\n int cardPosition = 0;\n //True if the computer has a card of higher value than the player's.\n boolean hasHigherCard = false;\n //Iterate through the computer's hand, trying to find a card higher than the player's\n for (int i = 0; i < highCardGame.getHand(0).getNumCards(); i++) {\n if (playerCard.compareTo(highCardGame.getHand(0).inspectCard(i)) < 0) {\n //The computer has a higher card.\n if (possibleCard != null) {\n //If this card is lower than the possible card, but can still beat the player, then replace possible card.\n if (possibleCard.compareTo(highCardGame.getHand(0).inspectCard(i)) > 0) {\n possibleCard = new Card(highCardGame.getHand(0).inspectCard(i));\n cardPosition = i;\n }\n } else {\n //If the computer has not yet chosen a possible card, choose this one.\n possibleCard = new Card(highCardGame.getHand(0).inspectCard(i));\n hasHigherCard = true;\n cardPosition = i;\n }\n }\n }\n if (!hasHigherCard) {\n //If the computer does not have a card that can beat the player, then feed the lowest card\n //that the computer has to the player.\n for (int i = 0; i < highCardGame.getHand(0).getNumCards(); i++)\n if (playerCard.compareTo(highCardGame.getHand(0).inspectCard(i)) >= 0) {\n if (possibleCard != null) {\n if (possibleCard.compareTo(highCardGame.getHand(0).inspectCard(i)) > 0) {\n possibleCard = new Card(highCardGame.getHand(0).inspectCard(i));\n cardPosition = i;\n }\n } else {\n possibleCard = highCardGame.getHand(0).inspectCard(i);\n cardPosition = i;\n }\n }\n }\n return cardPosition;\n }", "public void playGame(){\n for(int i = 0; i<2; i++) {\n userCards.add(dealCards());\n computerCards.add(dealCards());\n }\n while(!isGameOver) {\n userScore = calculateScore(userCards);\n computerScore = calculateScore(computerCards);\n\n System.out.println(\"your cards: \" + userCards + \", current score: \" + userScore);\n System.out.println(\"Computer's first card: \" + computerCards.get(0));\n\n if (userScore == 0 || computerScore == 0 || userScore > 21) {\n isGameOver = true;\n }else{\n System.out.print(\"Type 'y' to get another card, type 'n' to pass: \");\n userInput = scanUserInput.nextLine();\n if(userInput.equalsIgnoreCase(\"y\")){\n userCards.add(dealCards());\n } else{\n isGameOver = true;\n }\n }\n }\n\n //computer turn if user opts to not draw another card\n while(computerScore !=0 && computerScore <17){\n computerCards.add(dealCards());\n computerScore = calculateScore(computerCards);\n }\n\n System.out.println(\"Your final hand: \"+ userCards+\", final score: \"+ userScore);\n System.out.println(\"Computer's final hand: \"+computerCards+\", final score: \"+computerScore);\n System.out.println(compareScore(userScore, computerScore));\n\n Scanner scanUserInput = new Scanner(System.in);\n System.out.print(\"Do you want to play a game of Blackjack? Type 'y' or 'n': \");\n String userInput = scanUserInput.nextLine();\n if(userInput.equalsIgnoreCase(\"y\")){\n new BlackJack().playGame();\n }\n }", "private void playThisCard(UnoCard clickedCard) throws NotYourTurnException, InvalidMoveException {\n\t\t// Check player's turn\n\t\tif (!isHisTurn(clickedCard)) {\n\t\t\tthrow new NotYourTurnException();\n\t\t} else {\n\n\t\t\t// Card validation\n\t\t\tif (isValidMove(clickedCard)) {\n\n\t\t\t\tplayedCards().add(clickedCard);\n\n\t\t\t\tremovePlayedCard(clickedCard);\n\n\t\t\t\t// function cards ??\n if (clickedCard instanceof ActionCard) {\n performAction(clickedCard);\n\n }\n\n\t\t\t\tfor (GameListener listener : gameListeners) {\n\t\t\t\t\tlistener.cardPlayed(clickedCard);\n\t\t\t\t}\n\n\t\t\t\tcheckResults();\n\t\t\t} else {\n\t\t\t\tthrow new InvalidMoveException();\n\n\t\t\t}\n\t\t}\n\t}", "public boolean validMove(int playerID, Card selectedCard){\n // turn == playerID\n if(gameStage == 3){\n if(numPlays == 0){\n if(playerID == 0){\n player1Play = selectedCard;\n // card goes to middle\n //checks suit of the jack if played first and sets first played suit to the correct suit\n //according to which suit is trump\n if(selectedCard.getValue() == Card.NUMBER.JACK){\n if(currentTrumpSuit == Card.SUIT.DIAMONDS && selectedCard.getSuit() == Card.SUIT.HEARTS){\n firstPlayedSuit = Card.SUIT.DIAMONDS;\n }\n if(currentTrumpSuit == Card.SUIT.HEARTS && selectedCard.getSuit() == Card.SUIT.DIAMONDS){\n firstPlayedSuit = Card.SUIT.HEARTS;\n }\n if(currentTrumpSuit == Card.SUIT.CLUBS && selectedCard.getSuit() == Card.SUIT.SPADES){\n firstPlayedSuit = Card.SUIT.CLUBS;\n }\n if(currentTrumpSuit == Card.SUIT.SPADES && selectedCard.getSuit() == Card.SUIT.CLUBS){\n firstPlayedSuit = Card.SUIT.SPADES;\n }\n }\n else{\n firstPlayedSuit = player1Play.getSuit();\n }\n numPlays++;\n turn++;\n return true;\n }\n else if(playerID == 1){\n player2Play = selectedCard;\n // card goes to middle\n //checks suit of the jack if played first and sets first played suit to the correct suit\n //according to which suit is trump\n if(selectedCard.getValue() == Card.NUMBER.JACK){\n if(currentTrumpSuit == Card.SUIT.DIAMONDS && selectedCard.getSuit() == Card.SUIT.HEARTS){\n firstPlayedSuit = Card.SUIT.DIAMONDS;\n }\n if(currentTrumpSuit == Card.SUIT.HEARTS && selectedCard.getSuit() == Card.SUIT.DIAMONDS){\n firstPlayedSuit = Card.SUIT.HEARTS;\n }\n if(currentTrumpSuit == Card.SUIT.CLUBS && selectedCard.getSuit() == Card.SUIT.SPADES){\n firstPlayedSuit = Card.SUIT.CLUBS;\n }\n if(currentTrumpSuit == Card.SUIT.SPADES && selectedCard.getSuit() == Card.SUIT.CLUBS){\n firstPlayedSuit = Card.SUIT.SPADES;\n }\n }\n else{\n firstPlayedSuit = player2Play.getSuit();\n }\n numPlays++;\n turn++;\n return true;\n }\n else if(playerID == 2){\n player3Play = selectedCard;\n // card goes to middle\n //checks suit of the jack if played first and sets first played suit to the correct suit\n //according to which suit is trump\n if(selectedCard.getValue() == Card.NUMBER.JACK){\n if(currentTrumpSuit == Card.SUIT.DIAMONDS && selectedCard.getSuit() == Card.SUIT.HEARTS){\n firstPlayedSuit = Card.SUIT.DIAMONDS;\n }\n if(currentTrumpSuit == Card.SUIT.HEARTS && selectedCard.getSuit() == Card.SUIT.DIAMONDS){\n firstPlayedSuit = Card.SUIT.HEARTS;\n }\n if(currentTrumpSuit == Card.SUIT.CLUBS && selectedCard.getSuit() == Card.SUIT.SPADES){\n firstPlayedSuit = Card.SUIT.CLUBS;\n }\n if(currentTrumpSuit == Card.SUIT.SPADES && selectedCard.getSuit() == Card.SUIT.CLUBS){\n firstPlayedSuit = Card.SUIT.SPADES;\n }\n }\n else{\n firstPlayedSuit = player3Play.getSuit();\n }\n numPlays++;\n turn++;\n return true;\n }\n else if(playerID == 3){\n player4Play = selectedCard;\n // card goes to middle\n //checks suit of the jack if played first and sets first played suit to the correct suit\n //according to which suit is trump\n if(selectedCard.getValue() == Card.NUMBER.JACK){\n if(currentTrumpSuit == Card.SUIT.DIAMONDS && selectedCard.getSuit() == Card.SUIT.HEARTS){\n firstPlayedSuit = Card.SUIT.DIAMONDS;\n }\n if(currentTrumpSuit == Card.SUIT.HEARTS && selectedCard.getSuit() == Card.SUIT.DIAMONDS){\n firstPlayedSuit = Card.SUIT.HEARTS;\n }\n if(currentTrumpSuit == Card.SUIT.CLUBS && selectedCard.getSuit() == Card.SUIT.SPADES){\n firstPlayedSuit = Card.SUIT.CLUBS;\n }\n if(currentTrumpSuit == Card.SUIT.SPADES && selectedCard.getSuit() == Card.SUIT.CLUBS){\n firstPlayedSuit = Card.SUIT.SPADES;\n }\n }\n else{\n firstPlayedSuit = player4Play.getSuit();\n }\n numPlays++;\n turn = 0;\n return true;\n }\n }\n else if(numPlays < 3){\n if(playerID == 0){\n player1Play = selectedCard;\n numPlays++;\n turn++;\n return true;\n }\n else if(playerID == 1){\n player2Play = selectedCard;\n numPlays++;\n turn++;\n return true;\n }\n else if(playerID == 2){\n player3Play = selectedCard;\n numPlays++;\n turn++;\n return true;\n }\n else if(playerID == 3){\n player4Play = selectedCard;\n numPlays++;\n turn = 0;\n return true;\n }\n }\n // if three cards have been played this is the last card\n else if(numPlays == 3){\n if(playerID == 0){\n player1Play = selectedCard;\n numPlays++;\n firstPlayedSuit = null;\n return true;\n }\n else if(playerID == 1){\n player2Play = selectedCard;\n numPlays++;\n firstPlayedSuit = null;\n return true;\n }\n else if(playerID == 2){\n player3Play = selectedCard;\n numPlays++;\n firstPlayedSuit = null;\n return true;\n }\n else if(playerID == 3){\n player4Play = selectedCard;\n numPlays++;\n firstPlayedSuit = null;\n return true;\n }\n }\n }\n return false;\n }", "public boolean deal()\n {\n int k, j;\n boolean enoughCards;\n\n // clear all hands\n for (j = 0; j < numPlayers; j++)\n hand[j].resetHand();\n\n enoughCards = true;\n for (k = 0; k < numCardsPerHand && enoughCards ; k++)\n {\n for (j = 0; j < numPlayers; j++)\n if (deck.getNumCards() > 0)\n hand[j].takeCard( deck.dealCard() );\n else\n {\n enoughCards = false;\n break;\n }\n }\n\n return enoughCards;\n }", "public void playTurn(){\r\n\t\t// all exceptions in this method are caught, because if this method throws an exception\r\n\t\t// the AIPlayer will not draw/discard a card and the program will freeze\r\n\t\ttry{\r\n\t\t\tupdateLastCardDiscarded();\r\n\t\t}catch(Exception e){\r\n\t\t\tSystem.out.println(\"AIPlayer, lastCard: \" + e.toString());\r\n\t\t}\r\n\t\ttry{\r\n\t\t\tif(!(drawOrPickUp()^bestChoice(BEST_CHOICE_AT_FIFTY))){ // choose whether to draw from the deck or pick up from the stack\r\n\t\t\t\tif(!game.getRound().drawFromDiscard()) // If picking up from the discard is not possible,\r\n\t\t\t\t\tgame.getRound().drawFromDeck(); // draw from the deck instead\r\n\t\t\t}else{\r\n\t\t\t\tgame.getRound().drawFromDeck();\r\n\t\t\t}\r\n\t\t}catch(Exception e){\r\n\t\t\tSystem.out.println(\"AIPlayer, draw: \" + e.toString());\r\n\t\t\tgame.getRound().drawFromDeck(); // if something goes wrong, draw\r\n\t\t}\r\n\r\n\t\ttry{\r\n\t\t\tgroup = new Groups(this, getHand());\r\n\t\t\tif(!hasLaidDownPhase() && group.getCompletePhaseGroups() != null && // if the AI player, hasn't laid down PhaseGroups\r\n\t\t\t\t\tgroup.getCompletePhaseGroups().length == Configuration.getNumberRequired(getPhase()) && // will lay down the right number of phasesGroups\r\n\t\t\t\t\tgetGame().getRound().getTurnNumber() >= 8 - (difficulty/10)) // is past a certain turn number based off difficulty\r\n\t\t\t\taddPhaseGroups(group.getCompletePhaseGroups()); \r\n\t\t}catch(Exception e){\r\n\t\t\tSystem.out.println(\"AIPlayer, laydown: \" + e.toString()); // laid down all my cards Hand92,AI90afterAI74\r\n\t\t}\r\n\r\n\t\ttry{\r\n\t\t\tif(hasLaidDownPhase())\r\n\t\t\t\tplayOffPhases();\r\n\t\t}catch(Exception e){\r\n\t\t\tSystem.out.println(\"AIPlayer, playoff: \" + e.toString());\r\n\t\t}\r\n\r\n\t\ttry{\r\n\t\t\tlastCardDiscarded = discardCard();\r\n\t\t\tgame.getRound().discard(lastCardDiscarded); // discard\r\n\t\t}catch(Phase10Exception e){\t\r\n\t\t}catch(Exception e){\r\n\t\t\tlastCardDiscarded = getHand().getCard(0);\r\n\t\t\tgame.getRound().discard(lastCardDiscarded);\r\n\t\t\tSystem.out.println(\"AIPlayer, discard: \" + e.toString());\r\n\t\t}\r\n\t}", "@Test\r\n public void testHasAtLeastTwoPlayableCards() {\n Player player2 = new Player(\"Three Playable Cards Test\", true);\r\n Hand threePlayableCardsHand = strategyHand;\r\n player2.setHand(threePlayableCardsHand.getAllCards());\r\n\r\n // Make it harder to find playable cards:\r\n player2.getHand().discard(new Card(Card.COLORLESS, Card.WILD, cvm));\r\n player2.getHand().discard(new Card(Card.COLORLESS, Card.WILD_DRAW_FOUR, cvm));\r\n\r\n Card currentPlayedCard_1 = new Card(Card.YELLOW, Card.ONE, cvm);\r\n assertTrue(player2.hasAtLeastTwoPlayableCards(currentPlayedCard_1, Card.BLUE));\r\n\r\n Card currentPlayedCard_2 = new Card(Card.BLUE, Card.SEVEN, cvm);\r\n assertFalse(player2.hasAtLeastTwoPlayableCards(currentPlayedCard_2, Card.BLUE));\r\n }", "boolean takeCard(int playerIndex)\n {\n if (playerIndex < 0 || playerIndex > numPlayers - 1)\n return false;\n\n // Are there enough Cards?\n if (deck.getNumCards() <= 0)\n return false;\n\n return hand[playerIndex].takeCard(deck.dealCard());\n }", "@Override\n public Card cardToPlay(TurnState state, CardSet hand) {\n //Causes the player to spend a certain amount of time for each card\n double currentTime = System.currentTimeMillis();\n Card card = underlyingPlayer.cardToPlay(state, hand);\n try {\n long totalTime;\n if ((totalTime = (minTime - ((long) System.currentTimeMillis() - (long) currentTime))) > 0) {\n Thread.sleep(totalTime);\n }\n } catch (InterruptedException e) {\n }\n return card;\n }", "public void playCard(int player, int card) {\n }", "public Card enemyPlayCard(){ //Is it really worth the effort to give the enemy a full deck/temp hand? Having 2-4 basic abilities that vary should be enough.\n if(!(enemyHand.isEmpty())){\n return enemyHand.get(0);\n } else {\n return null;\n }\n }", "void play() {\n\n ArrayList<Card> cardsInMiddle = new ArrayList<>();\n\n Card[] lastCardsPlayed = new Card[numOfPlayers];\n\n //simulation of each player flipping their next card\n for (int i = 0; i < players.length; i++) {\n lastCardsPlayed[i] = players[i].getNextCard();\n cardsInMiddle.add(lastCardsPlayed[i]);\n\n }\n\n //if there's a tie\n while (tieForCards(lastCardsPlayed)) {\n //check to see if players have enough cards to continue\n //if not, then clear that players hand and game will end\n WarPlayer lessThan3Cards = tryGetPlayerWithLessThanThreeCards();\n if (lessThan3Cards != null) {\n lessThan3Cards.getHand().clear();\n return;\n }\n\n //simulation of flipping 2 extra cards\n for (int i = 0; i < players.length; i++) {\n cardsInMiddle.add(players[i].getNextCard());\n cardsInMiddle.add(players[i].getNextCard());\n\n Card lastCard = players[i].getNextCard();\n cardsInMiddle.add(lastCard);\n lastCardsPlayed[i] = lastCard;\n }\n }\n setLastCardsPlayed(lastCardsPlayed);\n\n //determining who gets all the cards played for the round\n int highestCardIndex = largestCard(lastCardsPlayed);\n players[highestCardIndex].addCards(cardsInMiddle);\n players[highestCardIndex].addPoints(cardsInMiddle.size() / numOfPlayers);\n }", "private void decide(Player player, Card choiceCard) {\n player.removeCard(choiceCard);\n //Wild Draw\n if (choiceCard instanceof WildDrawCard) {\n //set wildDraw color\n while (true) {\n char color = controls.get(state.getTurn()).chooseColor();\n if (color == 'R' || color == 'G' || color == 'Y' || color == 'B') {\n ((WildDrawCard) choiceCard).setConfig(color);\n break;\n }\n System.out.println(\"Invalid color input.\");\n }\n //set wildDraw penalty\n char ch = 0;\n if(canChooseWildDrawCardPenalty(players.get(state.getNextTurn()))) {\n while (true) {\n ch = controls.get(state.getNextTurn()).yesOrNo();\n if (ch == 'Y' || ch == 'N'){\n break;\n }\n System.out.println(\"Invalid input.\");\n }\n }\n if (ch == 'N') {\n state.increaseWildDrawPenalty();\n }\n else {\n ((WildDrawCard) choiceCard).changeState(state);\n for (int i = 0; i < ((WildDrawCard) choiceCard).getForcedCards()*state.getWildDrawPenalty(); i++) {\n players.get(state.getTurn()).addCard(cards.get(0));\n cards.remove(0);\n }\n state.doWildDrawPenalty();\n }\n }\n\n //Wild\n else if (choiceCard instanceof WildCard) {\n while (true) {\n char color = controls.get(state.getTurn()).chooseColor();\n if (color == 'R' || color == 'G' || color == 'Y' || color == 'B') {\n ((WildCard) choiceCard).setConfig(color);\n break;\n }\n System.out.println(\"Invalid color input.\");\n }\n }\n\n //Reverse\n if (choiceCard instanceof ReverseCard) {\n ((ReverseCard) choiceCard).changeState(state);\n }\n\n //Skip\n if (choiceCard instanceof SkipCard) {\n ((SkipCard) choiceCard).changeState(state);\n }\n\n //Draw2\n if (choiceCard instanceof Draw2Card) {\n char ch = 0;\n if(canChooseDrawCardPenalty(players.get(state.getNextTurn()))) {\n while (true) {\n ch = controls.get(state.getNextTurn()).yesOrNo();\n if (ch == 'Y' || ch == 'N'){\n break;\n }\n System.out.println(\"Invalid input.\");\n }\n }\n if (ch == 'N') {\n state.increaseDrawPenalty();\n }\n else {\n ((Draw2Card) choiceCard).changeState(state);\n for (int i = 0; i < ((Draw2Card) choiceCard).getForcedCards()*state.getDrawPenalty(); i++) {\n players.get(state.getTurn()).addCard(cards.get(0));\n cards.remove(0);\n }\n state.doDrawPenalty();\n }\n }\n changeCurrentCard(choiceCard);\n }", "private static void playGame() {\n CardDeck deck = new CardDeck();\n int dealer, player, hitOrStand = 1, score = 0;\n System.out.println(\"Goal: Beat the dealer without going over 21\");\n Scanner input = new Scanner(System.in);\n\n // Generate the dealer's card\n dealer = generateRandomNumber(16, 21); \n System.out.println(\"The Dealer scored: \" + dealer);\n System.out.println(\"\");\n \n\n // Keep playing while the player hasn't won or lost yet\n while (hitOrStand == 1 && score < 21 && score < dealer) {\n // Generate player's card\n player = generateRandomNumber(1, 10); \n System.out.println(\"Your card is worth \" + player);\n\n // Displays the picture of player's card\n String card = deck.drawCard(player);\n System.out.println(card);\n\n // Add player's card value to their score\n score = score + player;\n\n // Displays score and asks wether user wants to hit or stand\n if (score <= 21 && score < dealer) {\n System.out.println(\"Your score is \" + score);\n System.out.print(\"Another card? Hit=1 stand=0: \");\n hitOrStand = input.nextInt();\n System.out.println(\"\");\n }\n }\n \n // Display player won\n if (score > dealer && score <= 21 ) {\n System.out.println(\"You win!\");\n System.out.println(\"Your score is \" + score);\n System.out.println(\"The dealer score was \" + dealer);\n System.out.println(\"You were closer to 21 by \" + (score - dealer));\n\n // Display when player ties with dealer\n } else if (score == dealer) {\n System.out.println(\"Your score is \" + score);\n System.out.println(\"\");\n System.out.println(\"You tied!\");\n\n // Display if player lost\n } else if (score > 21) {\n System.out.println(\"Your score is \" + score);\n System.out.println(\"\");\n System.out.println(\"You lose!\");\n int over = score - 21;\n System.out.println(\"You were over 21 by \" + over);\n\n // Display if player lost\n } else {\n int difference;\n difference = dealer - score;\n System.out.println(\"Your score is \" + score);\n System.out.println(\"You lose!\");\n System.out.println(\"The dealer was closer to 21 than you by \" + difference);\n } \n }", "public void play() {\r\n this.cardDeck = new JavaDeck();\r\n cardDeck.shuffle();\r\n dealerHand = new JavaHand(2);\r\n dealerHand.DiscardHand();\r\n addDealerCard();\r\n }", "public boolean playCard(Card card, Enemy enemy){\n if( isGameOver() )return false;\n if( card.isHasTarget() && !enemyController.hasEnemy(enemy) )return false;\n\n System.out.println(\"IN PLAYCARD METHOD\");\n boolean b = effectHandler.playCard( card , enemy);\n System.out.println( \"HAND CARDS : \");\n for( int i = 0 ; i < piles.getHandPile().getCards().size() ; i++ ){\n System.out.println( piles.getHandPile().getCards().get(i).getName() );\n }\n\n return b;\n }", "private void shuffleAndGiveCards() {\n\n List<Card> tmpDeck= new ArrayList<Card>(deck); \n Collections.shuffle(tmpDeck, shuffleRng);\n \n for (int i=0; i<players.size(); ++i) {\n int startIndex= Jass.HAND_SIZE*i; //So for player 0 the startIndex will be 0, for player2 9, etc...\n int endIndex = Jass.HAND_SIZE*(i+1); //So for player 1 the endIndex will be 9, for player2 18, etc...\n\n CardSet hand= CardSet.of(tmpDeck.subList(startIndex, endIndex));\n PlayerId player = PlayerId.ALL.get(i);\n\n players.get(player).updateHand(hand);\n handsOfCards.put(player, hand); \n }\n }", "public void drawCard(Integer cardLocation){\n Random random = new Random();\n boolean isPlayerHandEmpty = false;\n Integer sizeOfPlayerHand = 4;\n //The reason for this is as follows: we are wanting to keep an array size of 4 consistent for playerHand, however\n //using the .remove() function actually shortens the size. Yet .set(index,null) is still counted as an element, hence\n //isEmpty does not work, and the size() is still 4.\n //Is this the most agile way to do this? I don't know, but this worked.\n\n for (Card s:playerHand){\n if(s == null){\n sizeOfPlayerHand--;\n }\n }\n if (sizeOfPlayerHand == 0){\n isPlayerHandEmpty = true;\n }\n\n\n\n if (playerTempDeck.size() > 0 && (sizeOfPlayerHand < 4 || playerHand.size() < 4)){\n //System.out.println(\"Adding cards from deck.\");\n\n Integer n = random.nextInt(playerTempDeck.size()); //0 to the number in the bracket. Pick a random card from the deck and use it here.\n playerHand.set(cardLocation, playerTempDeck.get(n));\n //System.out.println(\"Now the playerHand is: \" + playerHand.toString());\n //System.out.println(\"Size of deck: \" + playerTempDeck.size());\n //System.out.println(\"Trying to remove: \" + playerTempDeck.get(n).getEffect());\n playerTempDeck.remove(playerTempDeck.get(n));\n }\n\n if (playerTempDeck.size() == 0 && (isPlayerHandEmpty || playerHand.size() == 0)){ //deck is empty and no cards left to play, reshuffle.\n //System.out.println(\"Hand and deck are both empty!\");\n playerTempDeck.addAll(discardedCards);\n discardedCards.clear();\n drawCard(0);\n drawCard(1);\n drawCard(2);\n drawCard(3);\n }\n }", "private void playBlackjack() throws IOException, ClassNotFoundException {\n\n\t\t\tList<Integer> dealerHand; // The dealer's hand.\n\t\t\tList<Integer> userHand; // The user's hand.\n\n\t\t\t// Create an unshuffled deck of cards.\n\t\t\tdeck = new int[52];\n\t\t\tint cardCt = 0; // How many cards have been created so far.\n\t\t\tfor (int suit = 0; suit <= 3; suit++) {\n\t\t\t\tfor (int value = 1; value <= 13; value++) {\n\t\t\t\t\tdeck[cardCt] = value;\n\t\t\t\t\tcardCt++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcurrentPosition = 0;\n\n\t\t\tdealerHand = new ArrayList<Integer>();\n\t\t\tuserHand = new ArrayList<Integer>();\n\n\t\t\t/* Shuffle the deck, then deal two cards to each player. */\n\n\t\t\tshuffle();\n\n\t\t\tdealerHand.add(dealCard());\n\t\t\tdealerHand.add(dealCard());\n\t\t\tuserHand.add(dealCard());\n\t\t\tuserHand.add(dealCard());\n\n\t\t\t/**\n\t\t\t * Check if one of the players has Blackjack (two cards totaling to\n\t\t\t * 21). The player with Blackjack wins the game. Dealer wins ties.\n\t\t\t */\n\n\t\t\tif (value(dealerHand) == 21) {\n\n\t\t\t\tmessage = \"Dealer has the \" + showCard(getCard(dealerHand, 0))\n\t\t\t\t\t\t+ \" and the \" + showCard(getCard(dealerHand, 1)) + \".\";\n\t\t\t\tsendData(message);\n\n\t\t\t\tmessage = (\"User has the \" + showCard(getCard(userHand, 0))\n\t\t\t\t\t\t+ \" and the \" + showCard(getCard(userHand, 1)) + \".\");\n\t\t\t\tsendData(message);\n\n\t\t\t\tmessage = (\"Dealer has Blackjack\");\n\t\t\t\tsendData(message);\n\t\t\t}\n\n\t\t\tif (value(userHand) == 21) {\n\t\t\t\tmessage = (\"Dealer has the \" + showCard(getCard(dealerHand, 0))\n\t\t\t\t\t\t+ \" and the \" + showCard(getCard(dealerHand, 1)) + \".\");\n\t\t\t\tsendData(message);\n\n\t\t\t\tmessage = (\"User has the \" + showCard(getCard(userHand, 0))\n\t\t\t\t\t\t+ \" and the \" + showCard(getCard(userHand, 1)) + \".\");\n\t\t\t\tsendData(message);\n\n\t\t\t\tmessage = (\"You have Blackjack\");\n\t\t\t\tsendData(message);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * If neither player has Blackjack, play the game. The user gets a\n\t\t\t * chance to draw cards (i.e., to \"Hit\"). The while loop ends when\n\t\t\t * the user chooses to \"Stand\" or when the user goes over 21.\n\t\t\t */\n\t\t\tboolean entryCheck = false;\n\t\t\tString startCheckval = \"\";\n\t\t\tstartCheckval = (String) input.readObject();\n\t\t\tif (startCheckval.equalsIgnoreCase(\"StartGame\")) {\n\t\t\t\tentryCheck = true;\n\t\t\t}\n\n\t\t\tsendData(\"Your cards are:\");\n\t\t\tfor (int i = 0; i < userHand.size(); i++) {\n\t\t\t\tsendData(\" \" + showCard(getCard(userHand, i)));\n\t\t\t}\n\t\t\tsendData(\"Your total is \" + value(userHand));\n\t\t\tsendData(\"Dealer is showing the \"\n\t\t\t\t\t+ showCard(getCard(dealerHand, 0)));\n\t\t\tsendData(\"Hit (H) or Stand (S) or Double (D)? \");\n\n\t\t\twhile (entryCheck) {\n\t\t\t\tif (!startCheckval.equals(\"StartGame\")) {\n\t\t\t\t\tmessage = (String) input.readObject();\n\t\t\t\t\tstartCheckval = \"\";\n\n\t\t\t\t\t/**\n\t\t\t\t\t * If the user Hits, the user gets a card. If the user\n\t\t\t\t\t * Stands, the dealer gets a chance to draw and the game\n\t\t\t\t\t * ends.\n\t\t\t\t\t */\n\n\t\t\t\t\tif (\"S\".equalsIgnoreCase(message)) {\n\t\t\t\t\t\tentryCheck = false;\n\t\t\t\t\t\tsendData(\"User stands.\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (\"H\".equalsIgnoreCase(message)) {\n\t\t\t\t\t\tint newCard = dealCard();\n\t\t\t\t\t\tuserHand.add(newCard);\n\t\t\t\t\t\tsendData(\"User hits. \\n Your card are \");\n\t\t\t\t\t\tfor (int i = 0; i < userHand.size(); i++) {\n\t\t\t\t\t\t\tsendData(\" \" + showCard(getCard(userHand, i)));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsendData(\" \\n Your total is now \" + value(userHand));\n\t\t\t\t\t\tentryCheck = true;\n\t\t\t\t\t\tif (value(userHand) > 21) {\n\t\t\t\t\t\t\tsendData(\"You busted by going over 21. You lose.\");\n\t\t\t\t\t\t\tentryCheck = false;\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (\"D\".equalsIgnoreCase(message)) {\n\t\t\t\t\t\tint newCard = dealCard();\n\t\t\t\t\t\tuserHand.add(newCard);\n\t\t\t\t\t\tsendData(\"User want Double \\n Your card are\");\n\t\t\t\t\t\tfor (int i = 0; i < userHand.size(); i++) {\n\t\t\t\t\t\t\tsendData(\" \" + showCard(getCard(userHand, i)));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsendData(\" \\n Your total is now \" + value(userHand));\n\t\t\t\t\t\tentryCheck = false;\n\t\t\t\t\t\tif (value(userHand) > 21) {\n\t\t\t\t\t\t\tsendData(\"You busted by going over 21. You lose.\");\n\t\t\t\t\t\t\tentryCheck = false;\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tsendData(\"Your cards are:\");\n\t\t\t\t\tfor (int i = 0; i < userHand.size(); i++) {\n\t\t\t\t\t\tsendData(\" \" + showCard(getCard(userHand, i)));\n\t\t\t\t\t}\n\t\t\t\t\tsendData(\"Your total is \" + value(userHand));\n\t\t\t\t\tsendData(\"Dealer is showing the \"\n\t\t\t\t\t\t\t+ showCard(getCard(dealerHand, 0)));\n\t\t\t\t\tsendData(\"Hit (H) or Stand (S) or Double (D)? \");\n\n\t\t\t\t\t// }\n\t\t\t\t}\n\t\t\t\tstartCheckval = \"\";\n\n\t\t\t} // end while loop\n\n\t\t\t/**\n\t\t\t * If we get to this point, the user has Stood with 21 or less. Now,\n\t\t\t * it's the dealer's chance to draw. Dealer draws cards until the\n\t\t\t * dealer's total is > 16.\n\t\t\t */\n\n\t\t\tsendData(\"Dealer's cards are\");\n\t\t\tsendData(\" \" + showCard(getCard(dealerHand, 0)));\n\t\t\tsendData(\" \" + showCard(getCard(dealerHand, 1)));\n\t\t\twhile (value(dealerHand) <= 16) {\n\t\t\t\tint newCard = dealCard();\n\t\t\t\tsendData(\"Dealer hits and gets the \" + showCard(newCard));\n\t\t\t\tdealerHand.add(newCard);\n\t\t\t}\n\t\t\tsendData(\"Dealer's total is \" + value(dealerHand));\n\n\t\t\t/** Now, the winner can be declared. */\n\n\t\t\tif (value(dealerHand) > 21) {\n\t\t\t\tsendData(\"Dealer busted by going over 21. You win.\");\n\t\t\t} else {\n\t\t\t\tif (value(dealerHand) == value(userHand)) {\n\t\t\t\t\tsendData(\"Dealer wins on a tie. You lose.\");\n\t\t\t\t} else {\n\t\t\t\t\tif (value(dealerHand) > value(userHand)) {\n\t\t\t\t\t\tsendData(\"Dealer wins, \" + value(dealerHand)\n\t\t\t\t\t\t\t\t+ \" points to \" + value(userHand) + \".\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsendData(\"You win, \" + value(userHand) + \" points to \"\n\t\t\t\t\t\t\t\t+ value(dealerHand) + \".\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}", "public void playGame()\t{\n\t\tString topName = \"none\";\n\t\tboolean isOver = false;\n\t\tint winner = -1;\n\t\tString finalMessage = \"\";\n\t\tint turn;\n\t\twhile(isOver==false)\t{\n\t\t\tfor(turn=0;turn<numPlayers;turn++)\t{\n\t\t\t\tif(isOver==false)\t{\n\t\t\t\t\tif(deck1.isEmpty())\t{\n\t\t\t\t\t\tSystem.out.println(\"\\n+++++Deck is empty!\" + \n\t\t\t\t\t\"Pass or Play Card.+++++\\n\");\n\t\t\t\t\t}\n\t\t\t\t\tif(top!=null)\t{\n\t\t\t\t\t\ttopName = top.toString();\n\t\t\t\t\t\tif(top.getValue()==8)\t{\n\t\t\t\t\t\t\ttopName += \"(Nominated as:\" + top.getChosenSuit() + \")\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\tSystem.out.println(hand[turn].getHandOwner() + \"'s Hand\");\n\t\t\t\t\t\tSystem.out.println(\"Top Card is \" + topName);\n\t\t\t\t\t\tplayMove(turn);\n\t\t\t\t\t\tif(Tie())\t{\n\t\t\t\t\t\t\tisOver = true;\n\t\t\t\t\t\t\twinner = -1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\t{\n\t\t\t\t\t\t\tswitch(hand[turn].countCards())\t{\n\t\t\t\t\t\t\t\tcase 0: isOver = true;\n\t\t\t\t\t\t\t\t\twinner = turn;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 1: System.out.println(\"1 card left!\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tSystem.out.println(\"\\n--------------\\n\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(isOver)\t{\n\t\t\tif(winner>-1)\t{\n\t\t\t\tfinalMessage = hand[winner].getHandOwner() + \" wins!\";\n\t\t\t}\n\t\t\telse\t{\n\t\t\t\tfinalMessage = \"It's a tie!\";\n\t\t\t}\n\t\t\tSystem.out.println(finalMessage);\n\t\t}\n\t}", "void playerUsedCard(Card c, boolean discard) {\n\t\t// The creator data is in the 2 first bytes, the other player in the 2\n\t\t// last bytes.\n\t\tplayedCard[0] = (discard ? DISCARDED_CARD : PLAYED_CARD);\n\t\tplayedCard[1] = (byte) c.id;\n\t}", "public abstract boolean play(DiscardPile discardPile, Stack<Card> drawPile, ArrayList<Player> players);", "public void resolveEffect(Card playedCard, int row, int col)\r\n {\r\n char type = playedCard.getEffectType();\r\n char target = playedCard.getEffectTarget();\r\n \r\n //Temp variables for this method\r\n int validTarget;\r\n int[] choice = new int[2];\r\n \r\n switch(type)\r\n {\r\n case 'H': //DISCARD HAND\r\n boolean discard = true; //PLACEHOLDER, ASK USER IF THEY WISH TO DISCARD\r\n if(discard)\r\n {\r\n final int NEW_HAND = 7;\r\n \r\n if(playerTurn == 0)\r\n {\r\n red.discard();\r\n for(int i = 0; i < NEW_HAND; i++)\r\n red.draw();\r\n }\r\n else\r\n {\r\n blue.discard();\r\n for(int i = 0; i < NEW_HAND; i++)\r\n blue.draw();\r\n }\r\n }\r\n break;\r\n case 'D': //DRAW\r\n final int DRAW_THRESHOLD = 4;\r\n if(playerTurn == 0)\r\n {\r\n if(red.getHand().size() >= 4)\r\n {\r\n while(red.getHand().size() < 7)\r\n red.draw();\r\n }\r\n }\r\n else\r\n {\r\n if(blue.getHand().size() >= 4)\r\n {\r\n while(blue.getHand().size() < 7)\r\n blue.draw();\r\n }\r\n }\r\n break;\r\n case '0': //ZERO\r\n if(playerTurn == 0)\r\n validTarget = 1;\r\n else\r\n validTarget = 0;\r\n \r\n choice[0] = 0; //PLACEHOLDER, ASK USER FOR TARGET\r\n choice[1] = 0;\r\n while(gameBoard.tilePlayer(choice[0], choice[1]) != validTarget )\r\n //REPROMPT FOR CHOICE\r\n \r\n gameBoard.getTile(choice[0], choice[1]).addEffect(playedCard.getEffect());\r\n break;\r\n case '-': //SUBTRACT\r\n if(target == 'X') //ANY\r\n {\r\n choice[0] = 0; //PLACEHOLDER, ASK USER FOR TARGET\r\n choice[1] = 0;\r\n \r\n while(gameBoard.tilePlayer(choice[0], choice[1]) != -1)\r\n //REPROMPT FOR CHOICE\r\n \r\n gameBoard.getTile(choice[0], choice[1]).addEffect(playedCard.getEffect()); \r\n }\r\n if(target == 'O') //OPPONENT\r\n {\r\n if(playerTurn == 0)\r\n validTarget = 1;\r\n else\r\n validTarget = 0;\r\n\r\n choice[0] = 0; //PLACEHOLDER, ASK USER FOR TARGET\r\n choice[1] = 0;\r\n\r\n while(gameBoard.tilePlayer(choice[0], choice[1]) != validTarget )\r\n //REPROMPT FOR CHOICE\r\n\r\n gameBoard.getTile(choice[0], choice[1]).addEffect(playedCard.getEffect()); \r\n }\r\n case '+':\r\n if(target == 'X') //ANY\r\n {\r\n choice[0] = 0; //PLACEHOLDER, ASK USER FOR TARGET\r\n choice[1] = 0;\r\n \r\n while(gameBoard.tilePlayer(choice[0], choice[1]) != -1)\r\n //REPROMPT FOR CHOICE\r\n \r\n gameBoard.getTile(choice[0], choice[1]).addEffect(playedCard.getEffect()); \r\n }\r\n if(target == 'O') //OPPONENT\r\n {\r\n if(playerTurn == 0)\r\n validTarget = 1;\r\n else\r\n validTarget = 0;\r\n\r\n choice[0] = 0; //PLACEHOLDER, ASK USER FOR TARGET\r\n choice[1] = 0;\r\n\r\n while(gameBoard.tilePlayer(choice[0], choice[1]) != validTarget )\r\n //REPROMPT FOR CHOICE\r\n\r\n gameBoard.getTile(choice[0], choice[1]).addEffect(playedCard.getEffect()); \r\n }\r\n if(target == 'A') //ADJACENT\r\n {\r\n ArrayList<Tile> adj = gameBoard.getAdjacent(row, col);\r\n \r\n for(int i = 0; i < adj.size(); i++)\r\n adj.get(i).addEffect(playedCard.getEffect());\r\n }\r\n if(target == 'N')\r\n {\r\n ArrayList<Tile> nonadj = gameBoard.getNonAdjacent(row, col);\r\n\r\n for(int i = 0; i < nonadj.size(); i++)\r\n nonadj.get(i).addEffect(playedCard.getEffect());\r\n }\r\n break;\r\n case '*':\r\n if(target == 'X') //ANY\r\n {\r\n choice[0] = 0; //PLACEHOLDER, ASK USER FOR TARGET\r\n choice[1] = 0;\r\n \r\n while(gameBoard.tilePlayer(choice[0], choice[1]) != -1)\r\n //REPROMPT FOR CHOICE\r\n \r\n gameBoard.getTile(choice[0], choice[1]).addEffect(playedCard.getEffect()); \r\n }\r\n if(target == 'O') //OPPONENT\r\n {\r\n if(playerTurn == 0)\r\n validTarget = 1;\r\n else\r\n validTarget = 0;\r\n\r\n choice[0] = 0; //PLACEHOLDER, ASK USER FOR TARGET\r\n choice[1] = 0;\r\n\r\n while(gameBoard.tilePlayer(choice[0], choice[1]) != validTarget )\r\n //REPROMPT FOR CHOICE\r\n\r\n gameBoard.getTile(choice[0], choice[1]).addEffect(playedCard.getEffect()); \r\n }\r\n if(target == 'A') //ADJACENT\r\n {\r\n ArrayList<Tile> adj = gameBoard.getAdjacent(row, col);\r\n \r\n for(int i = 0; i < adj.size(); i++)\r\n adj.get(i).addEffect(playedCard.getEffect());\r\n }\r\n if(target == 'N')\r\n {\r\n ArrayList<Tile> nonadj = gameBoard.getNonAdjacent(row, col);\r\n\r\n for(int i = 0; i < nonadj.size(); i++)\r\n nonadj.get(i).addEffect(playedCard.getEffect());\r\n }\r\n break;\r\n }\r\n }", "public void hitCard() {\n if (this.state == GameState.ROUNDACTIVE) {\n Seat s = this.getSeat(seatPlaying);\n if (s.hasPlayer()) {\n Hand h = s.getPlayer().getHands().get(0);\n h.addCard(this.deck.dealCard());\n if (h.getIsBusted()) {\n this.activeHandStand();\n }\n }\n repaintAll();\n }\n }", "@Override\n public Card chooseCardtoPlay() {\n assert(card1 != null && card2 != null);\n if (card1.value == Card.PRINCESS) return playCard2();\n if (card2.value == Card.PRINCESS) return playCard1();\n return rand.nextBoolean() ? playCard1() : playCard2();\n }", "@Override\n\tpublic void addCard(PlayingCard card) {\n\t\t\n\t\t\n\t\tif(card == null)return;\n\t\tif(!(card instanceof SkatCard))return;\n\t\tif(!(card.getSuit().equals(SkatCard.suitHerz)\n\t\t\t\t|| card.getSuit().equals(SkatCard.suitKaro) \n\t\t\t\t|| card.getSuit().equals(SkatCard.suitPik)\n\t\t\t\t|| card.getSuit().equals(SkatCard.suitKreuz)))return;\n\t\tif(!(card.getRank() == SkatCard.rank7\n\t\t\t\t|| card.getRank() == SkatCard.rank8\n\t\t\t\t|| card.getRank() == SkatCard.rank9\n\t\t\t\t|| card.getRank() == SkatCard.rank10\n\t\t\t\t|| card.getRank() == SkatCard.rankBube\n\t\t\t\t|| card.getRank() == SkatCard.rankDame\n\t\t\t\t|| card.getRank() == SkatCard.rankKoenig\n\t\t\t\t|| card.getRank() == SkatCard.rankAss))return;\n\t\tif(getCount() >= kartenAnzahl)return;\n\t\tfor(int i = 0; i < getCount(); i++) {\n\t\t\tif(card.compareTo(aktuellesDeck[i]) == 0)return;\n\t\t}\n\t\t\n\t\t/*\n\t\t * eigentliches addCard\n\t\t */\n\t\taktuellesDeck[getCount()] = card;\n\t\tcount++;\n\t}", "public void cardWasUsed(Card card) {\r\n\t\tthis.hand.remove(card);\r\n\t\tthis.discard.add(card);\r\n\t}", "public Card playerPlayCard(Integer choice){\n if(!(playerHand.isEmpty())){\n return playerHand.get(choice);\n } else {\n return null;\n }\n }", "public void dealCards() {\n for(int i=0; i < 5; i++) { \n for(PokerPlayer player : players) {\n player.takeCard(deck.draw());\n }\n }\n }", "public void dealerAskCard() {\n int dealerScore = this.getDealerHand().getActualValue();\n while (dealerScore < 17) {\n Card card = this.deck.deal(this.getDealerHand());\n dealerScore = this.getDealerHand().getActualValue();\n }\n }", "public void playRound(){\n this.gameState = GameController.createGameState(this.game);\n \n // Verifica se o \n if(this.gameState.isEnded()){\n var winner = this.gameState.getPlayerQttCards() == 0 ? this.game.getComputer() : this.game.getPlayer();\n\n this.gameState.setWinner(winner);\n }\n else{\n \n // Mostrando o vira, as manilhas, a quantidade de cartas dos jogadores e as cartas do jogador\n this.view.displayGame(this.gameState);\n\n var playerCardChose = this.getPlayerCardChose();\n var computerCardChose = Utils.generateRandomNumber(getGameState().getComputerQttCards());\n\n try{\n var playerCard = this.game.getPlayer().playCard(playerCardChose);\n var computerCard = this.game.getComputer().playCard(computerCardChose);\n\n var winnerCard = this.verifyBiggerCard(playerCard, computerCard);\n\n // Verificando qual `Player` ganhou e se um ganhou\n\n var hasPlayerWon = winnerCard.equals(playerCard);\n var hasComputerWon = winnerCard.equals(computerCard);\n\n var turnedCard = this.getGameState().getTurnedCard();\n\n // Aqui caso o player tenha ganhado ele recebe a carta do computador e senão ele perde a carta para o computador\n if(hasPlayerWon){\n this.game.getPlayer().earnCard(computerCard);\n this.game.getComputer().loseCard(computerCard);\n }\n else if(hasComputerWon){\n this.game.getComputer().earnCard(playerCard);\n this.game.getPlayer().loseCard(playerCard);\n }\n \n // Na hora de mostrar o vencedor eu verifico se um player venceu, se sim eu mostro vitória ou derrota para o Player\n // Se não eu mostro empate\n \n if(hasComputerWon || hasPlayerWon){\n this.view.displayRoundWinner(turnedCard, playerCard, computerCard, hasPlayerWon);\n }\n else {\n this.view.displayRoundWinner(turnedCard, playerCard, computerCard);\n }\n\n }\n catch(Exception excp){\n this.view.displayMessageError(excp.getMessage());\n\n this.playRound();\n }\n }\n \n }", "public Card dealCard(Player player) {\n\t\tCard card = null;\n\t\tif (dealtCards.get() < DECK_SIZE) { // Check if deck still has cards available. \n\t\t\tcard = cards.get(dealtCards.getAndIncrement());\n\t\t\tif (card != null) { // If card has been found.\n\t\t\t\tplayer.addCard(card);\n\t\t\t\tAtomicInteger cardsBySuit = dealtCardsBySuit.get(card.getSuit());\n\t\t\t\tcardsBySuit.getAndIncrement(); // Update cards by suit counters.\n\t\t\t}\n\t\t}\n\t\treturn card;\n\t}", "public void SpecialCardAction(UNOCard aCard) {\n\t\t\n\t\tif (aCard.getName() == \"Reverse\") { // Reverse card is played, so game direction is switched\n\t\t\tif (gameDirection == \"right\") {\n\t\t\t\tgameDirection = \"left\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\tgameDirection = \"right\";\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (aCard.getName() == \"Skip\") {\n\t\t\tif (gameDirection == \"right\") { // If Game is moving in one direction\n\t\t\t\tcurrentPlayerToPlayIndex = currentPlayerToPlayIndex + 2; // player next to play is skipped\n\t\t\t\tif (currentPlayerToPlayIndex >= players.size()) {\n\t\t\t\t\tcurrentPlayerToPlayIndex = currentPlayerToPlayIndex - players.size();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (gameDirection == \"left\") { // If Game is moving in other direction\n\t\t\t\tcurrentPlayerToPlayIndex = currentPlayerToPlayIndex - 2; // player next to play is skipped\n\t\t\t\tif (currentPlayerToPlayIndex <= 0) {\n\t\t\t\t\tcurrentPlayerToPlayIndex = currentPlayerToPlayIndex + players.size();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tcurrentPlayerToPlay = players.get(currentPlayerToPlayIndex); // Next Player to play a card\n\t\t\n\t\tif (aCard.getName() == \"Draw Two\") { // If a Draw Two Card is played, the enxt player to play is dealt two cards\n\t\t\tif (gameDirection == \"right\") {\n\t\t\t\tif (currentPlayerToPlayIndex < players.size()) {\n\t\t\t\t\tplayers.get(currentPlayerToPlayIndex + 1).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t\tplayers.get(currentPlayerToPlayIndex + 1).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tplayers.get(0).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t\tplayers.get(0).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (gameDirection == \"left\") {\n\t\t\t\tif (currentPlayerToPlayIndex != 0) {\n\t\t\t\t\tplayers.get(currentPlayerToPlayIndex - 1).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t\tplayers.get(currentPlayerToPlayIndex - 1).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tplayers.get(players.size() - 1).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t\tplayers.get(players.size() - 1).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (aCard.getName() == \"Wild\") { // Wild is played, function called to ask user for new color\n\t\t\tWildIsPlayedAskUserForColor();\n\t\t}\n\t\t\n\t\tif (aCard.getName() == \"Wild Draw Four\") {\n\t\t\tif (gameDirection == \"right\") { // if game direction is this way\n\t\t\t\tif (currentPlayerToPlayIndex < players.size()) {\n\t\t\t\t\tplayers.get(currentPlayerToPlayIndex + 1).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t\tplayers.get(currentPlayerToPlayIndex + 1).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t\tplayers.get(currentPlayerToPlayIndex + 1).getPlayersHand().add(GameUNODeck.DealACard()); // draw four cards\n\t\t\t\t\tplayers.get(currentPlayerToPlayIndex + 1).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tplayers.get(0).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t\tplayers.get(0).getPlayersHand().add(GameUNODeck.DealACard()); // draw four cards\n\t\t\t\t\tplayers.get(0).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t\tplayers.get(0).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (gameDirection == \"left\") { // if game direction is this way\n\t\t\t\tif (currentPlayerToPlayIndex != 0) {\n\t\t\t\t\tplayers.get(currentPlayerToPlayIndex - 1).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t\tplayers.get(currentPlayerToPlayIndex - 1).getPlayersHand().add(GameUNODeck.DealACard()); // draw four cards\n\t\t\t\t\tplayers.get(currentPlayerToPlayIndex - 1).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t\tplayers.get(currentPlayerToPlayIndex - 1).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tplayers.get(players.size() - 1).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t\tplayers.get(players.size() - 1).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t\tplayers.get(players.size() - 1).getPlayersHand().add(GameUNODeck.DealACard()); // draw four cards\n\t\t\t\t\tplayers.get(players.size() - 1).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t}\n\t\t\t}\n\t\t\tWildIsPlayedAskUserForColor();\n\t\t}\n\t\t\n\t}", "public abstract boolean play(DiscardPile discardPile, \n\t Stack<Card> drawPile, \n\t\t\t\t\t\t\t\t\t\t \tArrayList<Player> players);", "public void playGame()\r\n\t{\r\n\t\tSystem.out.println(\"Welcome to BlackJack! \\n\");\r\n\t\t\r\n\t\t// Boolean value to tell evaluateWin() method when the final win evaluation must be made\r\n\t\tboolean finalCheck = false;\r\n\t\t\r\n\t\tcardDeck.getDeck();\r\n\t\t\r\n\t\tSystem.out.println(\"Dealing cards...\");\r\n\t\t\r\n\t\t// Each player gets 2 cards to start\r\n\t\tplayer1.hit( cardDeck.draw() );\r\n\t\tplayer1.hit( cardDeck.draw() );\r\n\t\tdealer.hit( cardDeck.draw() );\r\n\t\tdealer.hit( cardDeck.draw() );\r\n\t\t\r\n\t\t// displays current cards\r\n\t\tdisplayPlayerCards(PLAYER1_ID);\r\n\t\tdisplayPlayerCards(DEALER_ID);\r\n\t\t\r\n\t\t// checks for win\r\n\t\tevaluateWin(finalCheck);\r\n\t\t\r\n\t\t// begins player1 turns\r\n\t\tplayerTurns();\r\n\t\t\r\n\t\t// begins dealer turns\r\n\t\tdealerTurns();\r\n\t\t\r\n\t\t// instructs evaluateWin to make final victory check\r\n\t\tfinalCheck = true;\r\n\t\tevaluateWin(finalCheck);\r\n\t\t\r\n\t\t// Cleans up objects\r\n\t\tcardDeck.newDeck();\r\n\t\tplayer1.resetHand();\r\n\t\tdealer.resetHand();\r\n\t}", "public void playerTurn(Game game){\n int cardHandNum;\n boolean nextPlayer = false;\n String recentCardDesc;\n if(game.recentCardPlayed() && !(game.playerGetAnotherTurn(this))){\n if(game.getRecentCard() instanceof Mineral){\n recentCardDesc = \"\\nRecent card = Name: \" + game.getRecentCard().getCardName() + \" \" +\n \"Hardness: \" + ((Mineral) game.getRecentCard()).getCardHardness() + \" \" +\n \"Specific Gravity: \" + ((Mineral) game.getRecentCard()).getCardSpecGravity() + \" \" +\n \"Cleavage: \" + ((Mineral) game.getRecentCard()).getCardCleavage() + \" \" +\n \"Crystal Abundance: \" + ((Mineral) game.getRecentCard()).getCardCrystalAbundance() + \" \" +\n \"Economic Value: \" + ((Mineral) game.getRecentCard()).getCardEconomicValue() + \"\\n\"; // The recent card description of the Mineral card\n }\n else{\n recentCardDesc = \"\\nThe recent player play the \" + ((SuperTrumps) game.getRecentCard()).getCardName() + \" card\" + \"\\n\"; // The recent card description of the Supertrumps card\n }\n }\n else if(game.recentCardPlayed() && game.playerGetAnotherTurn(this)){\n System.out.println(\"You are granted to select the trump mode again\");\n recentCardDesc = \"\\nYou may pick the card again as you made all of other players pass\" + \"\\n\";\n gameStart(game); // Allowing the player that is not passed to pick up another trump category\n }\n else {\n recentCardDesc = \"\\nThere are no recent cards that have been played\" + \"\\n\";\n gameStart(game); // Description when there is no cards that is been played (when it is the start of the game)\n }\n while (!nextPlayer){\n // Used for looping until the person did the action (play the card or pass), which allows the next player to move\n String playerChoice;\n System.out.println(\"Game mode: \" + game.getGameModeMessage() + recentCardDesc + showCardInHand() + getPlayerName() + \", enter the card number you want to play or simply enter PASS to pass\");\n System.out.print(\">>>\");\n Scanner options = new Scanner(System.in);\n playerChoice = options.nextLine();\n if (playerChoice.toUpperCase().equals(\"PASS\")){\n drawPlayerCard(game.getCardDeck().drawnCard());\n nextPlayer = true;\n }\n else{\n try {\n cardHandNum = Integer.parseInt(playerChoice); // Changing the input into int from String\n Card cardPlayed = getPlayerCard(cardHandNum); // Used for trying to get the card played\n boolean continueGame = game.gameCard(cardPlayed, this); // Trying to play the card\n if(game.getGameMode().equals(\"CHOICE\")){ // Decision when a player play a special supertrump card to allow player to freely choose the trump mode\n game.putCardToGame(cardPlayed);\n playerHand.remove((cardHandNum));\n gameStart(game);\n game.setRecentPlayer(this.getPlayerName());\n nextPlayer = true;\n }\n else if (game.getGameMode().equals(\"GRAV/MAG\")) {\n if(lookAtWinCard()) { // Check whether or not the player has the winning card, which is Magnetite\n for (Card cardInHand : playerHand) {\n game.putCardToGame(cardInHand);\n playerHand.remove(cardInHand);\n game.setRecentPlayer(this.getPlayerName());\n }\n game.setGameMode(\"SPECGRAV\"); // Change the game mode to Specific Gravity\n nextPlayer = true;\n }\n else {\n game.setGameMode(\"SPECGRAV\"); // Change the game mode to Specific Gravity\n }\n if(continueGame){\n game.putCardToGame(cardPlayed);\n playerHand.remove((cardHandNum));\n game.setRecentPlayer(this.getPlayerName());\n nextPlayer = true;\n }\n }\n else {\n if(continueGame){\n // Used for the normal card play\n game.putCardToGame(cardPlayed);\n playerHand.remove((cardHandNum));\n game.setRecentPlayer(this.getPlayerName());\n nextPlayer = true;\n }\n }\n }\n catch (Throwable e){\n System.out.println(\"Invalid input!\"); // When the user try to enter the input that does not match the card in the hand\n }\n }\n }\n if (playerHand.size() == 0){\n // Occurs when the player has no more card in the hand\n game.setRecentPlayer(game.getPlayers().get((game.getPlayers().indexOf(this)+1)%game.getPlayers().size()).getPlayerName());\n playerLeft(game);\n }\n }", "public Card chooseFromHand(String sign , String colorName){\n Scanner scanner = new Scanner(System.in);\n Card chosenCard = null;\n int cardIndex;\n do{\n System.out.println(\"which cart ? (-1 to pick up card from cardDeck) ?\");\n cardIndex =scanner.nextInt();\n// scanner.nextLine();\n if(cardIndex == -1){\n ArrayList<Card> playableCards = playableNormalCards(sign , colorName);\n if(playableCards.size() == 0){\n return null;\n }\n else {\n System.out.println(\"you still can play : \");\n for(Card card : playableCards){\n System.out.print(card + \" \");\n }\n System.out.println();\n }\n }\n else if(cardIndex<=0 ||cardIndex > hand.size()){\n System.out.println(\"not valid input\");\n System.out.println(\"please try again : \");\n }\n else if(hand.get(cardIndex-1).getSign().equals(\"B\")){\n chosenCard = hand.get(cardIndex -1);\n }\n else if((!(hand.get(cardIndex-1).getSign().equals(sign))) &&\n (!(hand.get(cardIndex-1).getColorName().equals(colorName)))){\n System.out.println(\"not playable card\");\n System.out.println(\"please try again : \");\n }\n else{\n chosenCard = hand.get(cardIndex - 1);\n }\n\n }while(cardIndex <= 0 || cardIndex > hand.size() || chosenCard == null);\n\n\n hand.remove(chosenCard);\n return chosenCard;\n }", "public static void hitCorrect()\n\t{\n\t\tplayersCards.add(deck.deal());\n\t\tcurrentValue();\n\t\tuserCardImg[playersCards.size()-1].setIcon(new ImageIcon(Gameplay.class.getResource(getCard(playersCards.get(playersCards.size()-1)))));\n\t\tresume();\n\t\tif(calculateHand(playersCards)>21 || playersCards.size()==4 || calculateHand(playersCards)==0)\n\t\t{\n\t\t\troundEnd();\n\t\t}\n\t\t\n\t}", "@Override\n public boolean shouldDrawCard(Card topPileCard, Card.Suit changedSuit) {\n topCard = topPileCard;\n boolean drawCard = true;\n for (Card card : cardsInHand) {\n if (card.getSuit().equals(changedSuit) || card.getRank().equals(topPileCard.getRank())) {\n drawCard = false;\n break;\n }\n }\n return drawCard;\n }", "public Player switchPlayer(){\n Player player = getGame().getCurrentPlayer();\n\n List<Card> cards = new ArrayList<>();\n\n for(Card card: getGame().getCards()){\n if(card.rule.isValid(getGame().getDices())){\n cards.add(card);\n }\n }\n\n //get the best card\n if(!cards.isEmpty()){\n Card card = takeTheBestCard(cards);\n\n //add it to the player\n player.getCardsWon().add(card);\n getGame().getCards().remove(card);\n\n System.out.println(player.getName() + \" won \" + card.getExplaination());\n getGame().addAction(new Action(player.getName() + \" won \" + card.getExplaination()));\n }\n\n if(getGame().getCards().isEmpty()){\n game.setStatus(Game.GameStatus.COMPLETED);\n getGame().addAction(new Action(bestPlayer().getName() + \" WON THE GAME!!!\"));\n }\n //turn\n getGame().setCountOfTrialForPlayer(0);\n\n game.setIndexOfCurrentPlayer(game.getIndexOfCurrentPlayer()+1);\n\n if(game.getIndexOfCurrentPlayer() == getGame().getPlayers().size()){\n game.setIndexOfCurrentPlayer(0);\n }\n\n game.setCountOfTrialForPlayer(0);\n game.setDices(new ArrayList<>());\n\n return getGame().getCurrentPlayer();\n }", "@Override\r\n\tpublic void playSoldierCard() {\n\t\t\r\n\t}", "@Test\r\n public void testPlayer_getCautiousStrategyCardCard_higherFirst_drawTwo() {\n player2 = new Player(\"Player Two\", true);\r\n player2.setHand(strategyHand.getAllCards());\r\n\r\n // let the cpc be a red nine\r\n // get rid of the wild and wd4 cards so the red draw two is the most attractive option\r\n player2.getHand().discard(wild);\r\n player2.getHand().discard(wildDrawFour);\r\n Card redNine = new Card(Card.RED, Card.NINE, cvm);\r\n assertTrue(player2.getCautiousStrategyCard(redNine, redNine.getColor()).equals(redDrawTwo));\r\n }", "public void playRound(CuarentaGame game){\n Player human = game.getHumanPlayer();\n Player computer = game.getComputerPlayer();\n Player activePlayer;\n \n for(int i=0; i<10; i++){\n // For now, human player starts always. This isn't quite intended, but not important right now\n if(i%2==0)\n activePlayer = human;\n else\n activePlayer = computer;\n // choose a card to play\n \n // choose next actions\n \n // add points accordingly\n\n // check win condition\n\n }\n\n human.addPoints(calculatePointsFromDiscardPile(game.getHumanPlayer()));\n computer.addPoints(calculatePointsFromDiscardPile(game.getComputerPlayer()));\n }", "public static SuggestHand shuffleAndAssignCards(\r\n ArrayList< Player > players )\r\n {\r\n int counter = 0; // Iterator pointer to keep track of the\r\n // cards\r\n SuggestHand solutionCards = null;\r\n\r\n /*\r\n * Grab all the names and types of each card Had to do some list\r\n * manipulation to get the enums into a modifiable list.\r\n */\r\n List< WeaponType > weaponEnums = new ArrayList< WeaponType >(\r\n Arrays.asList( WeaponCard.WeaponType.values() ) );\r\n List< CharacterName > characterEnums = new ArrayList< CharacterName >(\r\n Arrays.asList( CharacterCard.CharacterName.values() ) );\r\n List< RoomName > roomEnums = new ArrayList< RoomName >(\r\n Arrays.asList( RoomCard.RoomName.values() ) );\r\n\r\n //System.out.println( characterEnums.size() );\r\n\r\n // Card equivalents of the enums\r\n ArrayList< CharacterCard > characters = new ArrayList< CharacterCard >();\r\n ArrayList< RoomCard > rooms = new ArrayList< RoomCard >() ;\r\n ArrayList< WeaponCard > weapons = new ArrayList< WeaponCard >();\r\n\r\n for( CharacterName c : characterEnums )\r\n {\r\n characters.add( new CharacterCard( c ) );\r\n }\r\n\r\n for( RoomName r : roomEnums )\r\n {\r\n rooms.add( new RoomCard( r ) );\r\n }\r\n\r\n for( WeaponType w : weaponEnums )\r\n {\r\n weapons.add( new WeaponCard( w ) );\r\n }\r\n\r\n // Shuffle the ArrayLists\r\n Collections.shuffle( weapons );\r\n Collections.shuffle( characters );\r\n Collections.shuffle( rooms );\r\n\r\n //System.out.println( characters.get( 0 ).getCharacterName() );\r\n\r\n // Remove the top card from each card type and store as solution cards\r\n try\r\n {\r\n solutionCards = new SuggestHand( characters.remove( 0 ), rooms.remove( 0 ), weapons.remove( 0 ) );\r\n\r\n } catch( Exception e )\r\n {\r\n System.out.println( \"Error generating solution cards.\" );\r\n e.printStackTrace();\r\n System.exit( 0 );\r\n }\r\n\r\n // Combine all cards into one larger deck\r\n List< Card > deck = new ArrayList< Card >();\r\n deck.addAll( characters );\r\n\r\n deck.addAll( rooms );\r\n\r\n deck.addAll( weapons );\r\n\r\n\r\n // Shuffle the deck and assign to each player sequentially\r\n Collections.shuffle( deck );\r\n\r\n\r\n /*\r\n * Loops through the cards and players, assigning the cards to players\r\n * one by one.\r\n */\r\n for( Card card : deck )\r\n {\r\n players.get( counter % players.size() ).setCard( card );\r\n counter++;\r\n }\r\n\r\n // DEBUG Print statements to show the cards for each player\r\n// for( Player p : players )\r\n// {\r\n// System.out.println( p.PlayerNumber+ \" \" + p.getHand().toString() );\r\n// }\r\n\r\n // Return the three cards to be used as the solution cards.\r\n return solutionCards;\r\n\r\n }", "public Card dealCard() {\n if (deck.size() == 52) {\n shuffle();\n }\n Card temp;\n temp = deck.get(0);\n remove(0);\n return temp;\n }", "public boolean CheckForUnwinnableCondition(){\n int humanSize = GetSizeOfHumanHand();\n int computerSize = GetSizeOfComputerHand();\n\n for(int i = 0; i < humanSize; i++) {\n //Human can play a card\n String card = handHuman.get(i);\n\n String firstLetter = Character.toString(card.charAt(0));\n String topFirstLetter = Character.toString(topCard.charAt(0));\n\n if (topCard.contains(\"8\")) {\n //Can play any card ontop to determine suite\n return true;\n }\n\n if (card.contains(\"8\")) {\n //valid because 8s are wild cards, human can place it\n return true;\n }\n\n //the cards match in suite, doesn't matter what it is\n else if (firstLetter.equals(topFirstLetter)) {\n return true;\n }\n\n else {\n if (topFirstLetter.equals(\"c\")) {\n String temp = topCard.substring(5, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n\n } else if (topFirstLetter.equals(\"h\")) {\n String temp = topCard.substring(6, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n\n } else if (topFirstLetter.equals(\"d\")) {\n String temp = topCard.substring(8, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n\n } else if (topFirstLetter.equals(\"s\")) {\n String temp = topCard.substring(6, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n }\n }\n }\n\n for(int i = 0; i < computerSize; i++){\n //Human can play a card\n String card = handComputer.get(i);\n\n String firstLetter = Character.toString(card.charAt(0));\n String topFirstLetter = Character.toString(topCard.charAt(0));\n\n if (topCard.contains(\"8\")) {\n //Can play any card ontop to determine suite\n return true;\n }\n\n if (card.contains(\"8\")) {\n //valid because 8s are wild cards, human can place it\n return true;\n }\n\n //the cards match in suite, doesn't matter what it is\n else if (firstLetter.equals(topFirstLetter)) {\n return true;\n }\n\n else {\n if (topFirstLetter.equals(\"c\")) {\n String temp = topCard.substring(5, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n\n } else if (topFirstLetter.equals(\"h\")) {\n String temp = topCard.substring(6, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n\n } else if (topFirstLetter.equals(\"d\")) {\n String temp = topCard.substring(8, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n\n } else if (topFirstLetter.equals(\"s\")) {\n String temp = topCard.substring(6, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n }\n }\n }\n\n //Human and computer can't play a card\n return false;\n }", "public Card playCard(Card card, Deck faceDown, Deck faceUp, Card.Face face, Card.Suit suit) {\n if (card == faceDown.peekTopCard()) {\n drawCard(faceDown);\n return card;\n }\n else if (accordingToRules(card, face, suit)) {\n this.putDownCard(faceUp, card);\n return card;\n }\n else {\n return null;\n }\n }", "@Override\n protected void receiveInfo(GameInfo info) {\n if (!(info instanceof PalaceGameState)) {\n return;\n }\n PalaceGameState state = new PalaceGameState((PalaceGameState) info);\n PalaceSelectCardAction selectCardAction;\n if (state.getTurn() != this.playerNum) {\n return;\n } else {\n sleep(1000); // make the computer \"think\"\n boolean isBigger = false;// variable to check if they have a valid card\n\n //determines if the cards are valid\n if (!(state.getP2Hand().isEmpty()) && !state.getPlayPilePalaceCards().isEmpty()) {\n for (int i = 0; i < state.getP2Hand().size(); i++) {\n if (state.getP2Hand().get(i).getRank() > state.getPlayPilePalaceCards().\n get(state.getPlayPilePalaceCards().size() - 1).getRank()) {\n isBigger = true;\n }\n }\n }\n\n //takes pile if they have no hand cards to play\n if (isBigger == false && !(state.getP2Hand().isEmpty())) {\n PalaceTakePileAction take = new PalaceTakePileAction(this);\n Log.d(\"compPlayer\", \"took the pile\");\n this.game.sendAction(take);\n }\n\n //begins searching for a card to select\n PalaceCard cardToSelect = null;\n\n // check in the case when the play pile and their hand are both not empty\n if (!(state.getPlayPilePalaceCards().isEmpty()) && (!(state.getP2Hand().isEmpty()))) {\n\n // while they haven't selected a card or the card they selected is less than the top card\n // another card is selected at random from their hand\n while (cardToSelect == null ||\n (cardToSelect.getRank() <\n (state.getPlayPilePalaceCards().\n get(state.getPlayPilePalaceCards().size() - 1).getRank()) &&\n state.getPlayPilePalaceCards().\n get(state.getPlayPilePalaceCards().size() - 1).getRank() >=0)) {\n cardToSelect =\n state.getP2Hand().get((int) (Math.random() * state.getP2Hand().size()));\n }\n\n // selects a card when they are playing from their top cards\n } else if (state.getP2Hand().isEmpty() && (!(state.getP2TopPalaceCards().isEmpty()))) {\n\n //pick any random card if the play pile is empty\n if (state.getPlayPilePalaceCards().isEmpty()) {\n cardToSelect =\n state.getP2TopPalaceCards().\n get((int) (Math.random() * state.getP2TopPalaceCards().size()));\n }\n\n //play pile is not empty so find a valid card\n else {\n\n //checks to see if there is a valid card\n for (int i = 0; i < state.getP2TopPalaceCards().size(); i++) {\n if (state.getP2TopPalaceCards().get(i).getRank() >\n state.getPlayPilePalaceCards().\n get(state.getPlayPilePalaceCards().size() - 1).getRank() &&\n state.getPlayPilePalaceCards().\n get(state.getPlayPilePalaceCards().size() - 1).getRank() >= 0) {\n isBigger = true;\n }\n }\n\n //finds a random valid card because there is one that is valid\n if (isBigger) {\n while (cardToSelect == null ||\n (cardToSelect.getRank() <\n state.getPlayPilePalaceCards().\n get(state.getPlayPilePalaceCards().size() - 1).\n getRank() &&\n state.getPlayPilePalaceCards().\n get(state.getPlayPilePalaceCards().size() - 1).\n getRank() >= 0)) {\n cardToSelect =\n state.getP2TopPalaceCards().\n get((int) (Math.random() * state.\n getP2TopPalaceCards().size()));\n }\n }\n\n //no card to be played so take the pile\n else {\n PalaceTakePileAction take = new PalaceTakePileAction(this);\n Log.d(\"compPlayer\", \"took the pile\");\n this.game.sendAction(take);\n }\n }\n }\n\n //they only have bottom cards left, all are valid to be played so pick a random one\n else if (state.getP2TopPalaceCards().isEmpty()&&state.getP2Hand().isEmpty()) {\n cardToSelect =\n state.getP2BottomPalaceCards().\n get((int) (Math.random() * state.getP2BottomPalaceCards().size()));\n }\n\n //the play pile is empty and they only have hand cards, pick one at random\n else {\n cardToSelect =\n state.getP2Hand().get((int) (Math.random() * state.getP2Hand().size()));\n }\n\n //create and send the select card action with the selected card\n selectCardAction = new PalaceSelectCardAction(this, cardToSelect,\n state.getSelectedPalaceCards());\n this.game.sendAction(selectCardAction);\n\n //rerun selectCardAction if there are multiple of the same card\n if (!state.getP2Hand().isEmpty()) {\n for (int i = 0; i < state.getP2Hand().size(); i++) {\n if (state.getP2Hand().get(i).getRank() == cardToSelect.getRank() &&\n !cardToSelect.equals(state.getP2Hand().get(i))) {\n selectCardAction = new PalaceSelectCardAction(this, state.getP2Hand().get(i),\n state.getSelectedPalaceCards());\n this.game.sendAction(selectCardAction);\n }\n }\n }\n else if (state.getP2Hand().isEmpty() && !state.getP2TopPalaceCards().isEmpty()) {\n for (int i = 0; i < state.getP2Hand().size(); i++) {\n if (state.getP2Hand().get(i).getRank() == cardToSelect.getRank() &&\n !cardToSelect.equals(state.getP2TopPalaceCards().get(i))) {\n selectCardAction = new PalaceSelectCardAction(this, state.getP2TopPalaceCards().get(i),\n state.getSelectedPalaceCards());\n this.game.sendAction(selectCardAction);\n }\n }\n }\n\n //creates and sends the playCardAction\n PalacePlayCardAction playCardAction = new PalacePlayCardAction(this);\n this.game.sendAction(playCardAction);\n }\n\n\n }", "public void drawFromDeck(MapBoard board){\n\t\tdiscardUsedCards();\n\t\tint temp1=5-playerCards.size();\n\t\tfor (int i = 0; i < temp1; i++) {\n\t\t\tif(Helper.playerCardSet.size()>0)\n\t\t\t{\n\t\t\t\tPlayerCardActions temp=Helper.getRandomPlayerCard();\n\t\t\t\ttemp.p=this; \n\t\t\t\ttemp.board=board;\n\t\t\t\tplayerCards.add(temp);\n\t\t\t\tif (temp.playerCardName.equals(\"Gaspode\")||temp.playerCardName.equals(\"FreshStartClub\")||temp.playerCardName.equals(\"Wallace Sonky\")) {\n\t\t\t\t\tinterruptCollection.add(temp);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "protected void removeChosenCard(Board gameBoard, Card chosenCard) {\n Iterator<Card> it = myCards.iterator();\n Card tempgroundCard= gameBoard.getGroundCard();\n while (it.hasNext()) {\n Card tempCard = it.next();\n if (tempCard.equals(chosenCard)) {\n it.remove();\n // Card tempgroundCard=gameBoard.getGroundCard;\n if (tempgroundCard instanceof WildDrawCard\n || tempgroundCard instanceof ColorChangeCard) {// if the last ground card was Wild set\n // it black again\n gameBoard.getGroundCard().setColor(0);\n }\n gameBoard.setGroundCard(tempCard);\n gameBoard.addToStorage(tempCard);\n if (!(tempCard instanceof DrawCard) && !(tempCard instanceof WildDrawCard)) { // if the Card was't Draw\n gameBoard.resetDraw();\n }\n cardNumber = myCards.size();\n break;\n }\n }\n }", "private void updateLastCardDiscarded(){\r\n\t\tint x = 0;\r\n\t\twhile(this != game.getPlayer(x++)){} // find the nextPlayer\r\n\t\tx = x % game.getNumberOfPlayers();\r\n\t\tnextPlayer = game.getPlayer(x);\r\n\t\t\r\n\t\tif(latestRound != game.getRoundNumber()){ // if it's a new Round, reset\r\n\t\t\tpickedUpCards = new ArrayList<Card>();\r\n\t\t\tlastCardDiscarded = null;\r\n\t\t\tlatestRound = game.getRoundNumber();\r\n\t\t\t\r\n\t\t\tfor(int y = 0; y < game.getNumberOfPlayers(); y++){ // ?????\r\n\t\t\t\tif(game.getPlayer(y) != this && \r\n\t\t\t\t\t\t(getScore() >= game.getPlayer(y).getScore() || getPhase() > game.getPlayer(y).getPhase())){//????\r\n\t\t\t\t\tsetName(oldName);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tsetName(oldName + \"is#WINNING\"); // ?????\r\n\t\t}else if(lastCardDiscarded != null && Configuration.getTypeRequired(nextPlayer.getPhase(), 0) == Configuration.SET_PHASE){\r\n\t\t\tif(nextPlayer.drewFromDiscard())\r\n\t\t\t\tpickedUpCards.add(lastCardDiscarded); // add the card to picked up card if it was picked up \r\n\t\t}\r\n\t}", "public void playCard(int cardNumber, boolean isLast) {\r\n\t\tCard c = currentPlayer.getPlayArea().getCard(cardNumber);\r\n\t\tint prevGold = currentPlayer.getGold();\r\n\t\tint prevHealth = currentPlayer.getHealth();\r\n\t\tdoCardEffects(c);\r\n\t\tcurrentPlayer.getPlayArea().getCard(cardNumber).setPlayed(true);\r\n\t\tcurrentPlayer.getDiscardPile().add(c);\r\n\t\tSystem.out.println(\"[DEBUG LOG/Game.java] \"+currentName+\" played \"+c.getName());\r\n\t\tif (isLast) {\r\n\t\t\tif (prevHealth != currentPlayer.getHealth()) {\r\n\t\t\t\tupdateBoardNoImageChange();\r\n\t\t\t}\r\n\t\t\tupdateInfo(currentPlayer, false);\r\n\t\t\tupdatePlayArea(currentPlayer, false);\r\n\t\t\tif (prevGold != currentPlayer.getGold()) {\r\n\t\t\t\tupdateMarketAndTreasures(false);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void yourturn() {\n if (whosturn != 3) {\n whosturn = 3;\n displayTable();\n }\n\n // TODO mega duplication\n int top = 0;\n // testing is player has a card they can play\n if (pile.notEmpty()) {\n boolean canplay = false;\n if (hand.getCard(0) == null) { // if player only has card on the table\n if (hand.isFaceUp()) // if player has faceup card on the table\n {\n for (int n = 0; n < 3; n++) {\n if (hand.getFaceUp(n) != null) {\n if (nine && pile.topValue() == 9) {\n top = 0;\n for (int i = 0; i < 52; i++) {\n if (pile.get(i) == null) {\n canplay = true;\n break;\n }\n if (pile.get(i).getValue() == 9) top++;\n else break;\n }\n }\n if (canplay) break;\n if (seven\n && pile.get(top).getValue() == 7\n && hand.getFaceUp(n).getValue() < 7) {\n canplay = true;\n break;\n } else if (hand.getFaceUp(n).getValue() == 2\n || hand.getFaceUp(n).getValue() == 10) {\n canplay = true;\n break;\n } else if (nine && hand.getFaceUp(n).getValue() == 9) {\n canplay = true;\n break;\n } else if (!seven || pile.get(top).getValue() != 7) {\n if (pile.get(top).getValue() <= hand.getFaceUp(n).getValue()) {\n canplay = true;\n break;\n }\n }\n }\n }\n } else // if player only has facedown cards\n canplay = true;\n } else {\n for (int n = 0; n < hand.length() - 1; n++) {\n if (hand.getCard(n) == null) break;\n if (nine && pile.topValue() == 9) {\n top = 0;\n for (int i = 0; i < 52; i++) {\n if (pile.get(i) == null) {\n canplay = true;\n break;\n }\n if (pile.get(i).getValue() == 9) top++;\n else break;\n }\n }\n if (canplay) break;\n if (hand.getCard(n).getValue() == 2 || hand.getCard(n).getValue() == 10) {\n canplay = true;\n break;\n }\n if (nine && hand.getCard(n).getValue() == 9) {\n canplay = true;\n break;\n }\n if (seven && pile.get(top).getValue() == 7 && hand.getCard(n).getValue() < 7) {\n canplay = true;\n break;\n } else if (seven != true || pile.get(top).getValue() != 7) {\n if (pile.get(top).getValue() <= hand.getCard(n).getValue()) {\n canplay = true;\n break;\n }\n }\n }\n }\n if (canplay) {\n // sh.addMsg(\"Its Your Turn\");\n sh.setmyTurn(true);\n } else { // cant play then must pick up the pile\n sh.addMsg(\n \"The card played was a \"\n + pile.top().getStringValue()\n + \" you had to pick up the pile. BLAOW\");\n pile.moveToHand(hand);\n sendCommand(\"turn:pickup:\");\n nextTurn();\n displayTable();\n }\n } else {\n // sh.addMsg(\"Its Your Turn\");\n sh.setmyTurn(true);\n }\n }", "public Card playCard()\n {\n\n Card errorReturn = new Card('E', Card.Suit.spades); // in rare cases\n\n if (numCards == 0)\n return errorReturn;\n else\n return myCards[--numCards];\n }", "public void dealCardsToPile()\n {\n // Set the first initial computer card to display\n computerCard = highCardGame.getCardFromDeck();\n\n // Sets the first initial player card\n playerCard = highCardGame.getCardFromDeck();\n }", "public void dealInitialPlayerHands() {\n\t\tint temp = 0;\n\t\tSystem.out.println(\"This is the deck size before dealing: \" + this.tileDeck.deckSize());\n\t\tSystem.out.println(\"_______________________________________________\");\n\t\tfor (Player p : this.playerList) {\n\t\t\ttemp++;\n\t\t\tfor (int i = 0; i < 14; i ++) {\n\t\t\t\tp.hand.add(this.tileDeck.dealTile());\n\t\t\t}\n\t\t\tp.sort();\n\t\t\tSystem.out.println(\"Player \" + temp + \"'s hand: \" + p.getHandTiles());\n\t\t\tSystem.out.println(\"_______________________________________________\");\n\t\t}\n\t\t//System.out.println(this.tileDeck.deckSize());\n\t}", "@Override\n public void visit(PlayCardMove move) {\n ICard cardToPlay = move.getCard();\n\n if (!isValidPlay(cardToPlay)) {\n return;\n }\n\n ArrayList<ICard> hand = hands.get(currentTurn);\n\n hand.remove(cardToPlay);\n discardPile.push(cardToPlay);\n\n // detect game over\n if (hand.size() == 0) {\n isGameOver = true;\n winner = currentTurn;\n }\n\n if (!isGameOver) {\n cardToPlay.onPlay(this);\n }\n }", "@Override\n protected void executeStrategy()\n {\n //Get the latest clue given by the SpyMaster\n Clue clue = game.getCurrentClue();\n pickCard(clue);\n\n // We used up our guesses so we are done\n if (game.getGuessesLeft() == 0) { this.game.endCurrentTurn(); }\n }", "public static Deck tie(Card cp1, Card cp2){\n //end if not enough cards, player 2 wins\n forbiddenCase = 0;\n if (hand1.cardsLeft() < 4){\n System.out.println();\n System.out.println(\"Player 1 cards: \" + hand1.cardsLeft());\n System.out.println(\"Player 2 cards: \" + hand2.cardsLeft()+\"\\n\");\n System.out.println(\"Not enough cards, Player 1 loses\");\n forbiddenCase = 1;\n outcome = 2;\n outcomes();\n return hand2;\n }\n //player 1 wins due to lack of cards\n else if (hand2.cardsLeft() < 4){\n System.out.println();\n System.out.println(\"Player 1 cards: \" + hand1.cardsLeft());\n System.out.println(\"Player 2 cards: \" + hand2.cardsLeft()+\"\\n\");\n System.out.println(\"Not enough cards, Player 2 loses\");\n forbiddenCase = 1;\n outcome = 1;\n outcomes();\n return hand1;\n }//tie\n else if(hand1.cardsLeft() < 4 && hand2.cardsLeft() < 4){\n System.out.println();\n System.out.println(\"Player 1 cards: \" + hand1.cardsLeft());\n System.out.println(\"Player 2 cards: \" + hand2.cardsLeft()+\"\\n\");\n System.out.println(\"No winner\");\n forbiddenCase = 1;\n outcome = 3;\n outcomes();\n }\n //add 3 cards\n\n\n for(int i = 1; i < 4; i++){\n System.out.println(\"You play card: ??? of ???\");\n\t System.out.println(\"Player two plays card: ??? of ???\");\n\t addUp.add(hand1.deal());\n addUp.add(hand2.deal());\n }\n\n //deal the 4th cards face up\n cp1 = hand1.deal();\n cp2 = hand2.deal();\n System.out.println(\"Player 1 hand: \" + cp1);\n System.out.println(\"Player 2 hand: \" + cp2);\n //add cards to the pile = 2 cards\n addUp.add(cp1);\n addUp.add(cp2);\n\n //if tie, try again\n if(cp1.getRank() == cp2.getRank()){\n tie(cp1,cp2);\n //player 1 win\n }else if(cp1.getRank() > cp2.getRank()){\n System.out.println(\"Player 1 wins\");\n //takes all the cards\n hand1.toBottom(addUp);//technically you win back your own cards then +5\n System.out.println(\"Player 1 cards: \" + hand1.cardsLeft());\n System.out.println(\"Player 2 cards: \" + hand2.cardsLeft()+\"\\n\");\n return hand1;\n }else//player 2 win\n System.out.println(\"Player 2 wins\");\n hand2.toBottom(addUp);\n System.out.println(\"Player 1 cards: \" + hand1.cardsLeft());\n System.out.println(\"Player 2 cards: \" + hand2.cardsLeft()+\"\\n\");\n return hand2;\n }", "public abstract CardAction play(Player p);", "public Card playCard()\r\n {\r\n Card removedCard = new Card('E', Card.Suit.valueOf(\"SPADES\"));\r\n if (numCards <= 0)\r\n {\r\n return removedCard;\r\n }\r\n Card playedCard = new Card(myCards[numCards - 1].getValue(),\r\n myCards[numCards - 1].getSuit());\r\n myCards[numCards - 1] = removedCard;\r\n numCards--;\r\n return playedCard;\r\n }", "protected final void hit() throws InsufficientCardsException {\n hand.add(deck.deal());\n update();\n }", "private PlayingCard chooseCard(HeartsGraphics g){\t\t\n\t\tHearts.setCurrentPlayer(this);\n\t\t\n\t\tif(number != PLAYER_ONE){\n\t\t\t// A.I. code\n\t\t\tint index;\n\t\t\t\n\t\t\tRandom r = new Random();\n\t\t\tindex = r.nextInt(hand.size());\t\t\t\n\t\t\t\n\t\t\treturn hand.get(index);\t\t\t\n\t\t} else {\n\t\t\treturn getCard(g);\n\t\t}\t\t\n\t}", "public void dealCard(Player player){\n TrainCard removedCard = draw();\n player.addTrainCard(removedCard);\n }", "public synchronized void collectCard(Card card){\n try{\r\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 \r\n if(player == null){\r\n continue;\r\n }\r\n System.out.println(\"Collect\");\r\n \r\n if(player.removeCard(card)){\r\n player.getRemoved().clear();\r\n \r\n getCardsPlayed().add(card);\r\n getCardsInPlay().remove(card);\r\n }\r\n }\r\n }catch(Exception ex){\r\n System.out.println(\"Collect ex: \" + ex);\r\n }\r\n \r\n }", "@Override\n protected Move makeDecision() {\n myTurn = index();\n /* block the nearest + most effective player (as in, people who arent blocked) */\n ArrayList<Move> pathMoves = new ArrayList<>();\n ArrayList<Move> playMoves = new ArrayList<>();\n ArrayList<Move> discardMoves = new ArrayList<>();\n Map<Integer, Card> destroyCards = new HashMap<Integer, Card>();\n Map<Integer, Card> repairCards = new HashMap<Integer, Card>();\n Map<Integer, Card> blockCards = new HashMap<Integer, Card>();\n Map<Integer, Card> pathCards = new HashMap<Integer, Card>();\n Set<Position> reachable = game().board().getReachable();\n canSee=false;\n canMove=false;\n canBlock=false;\n canRockfall=false;\n canRepair=false;\n int len = hand().size();\n for (int i = 0; i < len; ++i) {\n Card c = hand().get(i);\n if (c instanceof PathCard && !isSabotaged()) {\n pathCards.put(i,c);\n// pathMoves.addAll(generatePossiblePaths(i, (PathCard) c));\n canMove = true;\n }\n if (c instanceof PlayerActionCard) {\n// playMoves.addAll(generatePossiblePlayerActions(i, (PlayerActionCard) c));\n if(c.type()== Card.Type.BLOCK) {\n blockCards.put(i, c);\n canBlock=true;\n }\n else if(c.type()== Card.Type.REPAIR) {\n repairCards.put(i, c);\n canRepair=true;\n }\n }\n if (c.type() == Card.Type.MAP) {\n// playMoves.addAll(generatePossibleMap(i));\n mapIndex = i;\n canSee = true;\n }\n if (c.type() == Card.Type.ROCKFALL) {\n destroyCards.put(i,c);\n// playMoves.addAll(generatePossibleRockfall(i));\n canRockfall = true;\n }\n discardMoves.add(Move.NewDiscardMove(index(), i));\n }\n\n if(canSee) {\n //sum of all heuristics\n double sumGoal[] = new double[3];\n for (Position h : reachable) {\n sumGoal[0]+=(9-(8-h.x)+ 5-(4-h.y));\n sumGoal[1]+=(9-(8-h.x)+ 5-(2-h.y));\n sumGoal[2]+=(9-(8-h.x)+ 5-(-h.y));\n }\n //update goldProb\n for(int i=0; i<3; i++) {\n int seenSum=0;\n for(int j=0; j<numPlayers; j++) {\n if(j!=myTurn) {\n if(haveSeen.get(j)[i]==1) seenSum++;\n }\n }\n goldProb[i] = (i==1?0.5:1)*(1-haveSeen.get(myTurn)[i])*(mapRate*(seenSum/numPlayers)+(sumGoal[i]/10));\n }\n }\n\n// System.out.println(hand());\n// System.out.println(pathMoves);\n\n\n if (role() == Role.GOLD_MINER) {\n //Path\n if(canSee && !goldFound) {\n int selection=0;\n double maxProb=goldProb[0];\n for(int i=0; i<3; i++) {\n if(goldProb[i]>maxProb) {\n maxProb = goldProb[i];\n selection=i;\n }\n }\n Move look = Move.NewMapMove(index(), mapIndex, Board.GoalPosition.TOP);\n switch(selection) {\n case 0:\n look = Move.NewMapMove(index(), mapIndex, Board.GoalPosition.TOP);\n break;\n case 1:\n look = Move.NewMapMove(index(), mapIndex, Board.GoalPosition.MIDDLE);\n break;\n case 2:\n look = Move.NewMapMove(index(), mapIndex, Board.GoalPosition.BOTTOM);\n break;\n }\n return look;\n }\n if(canMove) {\n int globalIndex = 0;\n double maxH = 0;\n double oldH;\n Position bp = new Position(0,0);\n boolean rotate = false;\n //Find best path to place;\n Board board = game().board().copy();\n oldH = getClosest(board);\n// System.out.print(getClosest(board)+\" : \");\n for( Map.Entry<Integer, Card> p : pathCards.entrySet()) {\n int index = p.getKey();\n Card path = p.getValue();\n ((PathCard)path).setRotated(false);\n Set<Position> placeable = game().board().getPlaceable((PathCard)path);\n for (Position h : placeable) {\n Board simulated = board.simulatePlaceCardAt((PathCard)path, h.x, h.y);\n// System.out.println(path.type());\n double cH = getClosest(simulated);\n if(maxH<cH) {\n bp=h;\n globalIndex = index;\n maxH = cH;\n rotate=false;\n }\n }\n ((PathCard) path).setRotated(true);\n placeable = game().board().getPlaceable((PathCard)path);\n for (Position h : placeable) {\n Board simulated = board.simulatePlaceCardAt((PathCard)path, h.x, h.y);\n// System.out.println(simulated);\n double cH = getClosest(simulated);\n if(maxH<cH) {\n bp=h;\n globalIndex = index;\n rotate=true;\n maxH = cH;\n }\n }\n }\n// System.out.println(oldH+\": \"+maxH+\" (\"+abs(maxH-oldH)+\")\");\n oldBoard = game().board().copy();\n if(maxH>0 && abs(maxH-oldH)>0.01)\n return Move.NewPathMove(index(), globalIndex, bp.x, bp.y, rotate);\n }\n //Unblock\n if(canRepair) {\n double blockMore = 0.0;\n int targetPlayer = -1;\n int cardIndex = 0;\n for(int i=0; i<numPlayers; i++) {\n //heal self\n if(i == myTurn) {\n for(Map.Entry<Integer, Card> r : repairCards.entrySet()) {\n int index = r.getKey();\n// System.out.println(Arrays.toString(game().playerAt(index()).sabotaged()));\n PlayerActionCard repair = (PlayerActionCard) r.getValue();\n if (game().playerAt(index()).isRepairable(repair.effects())) {\n return Move.NewPlayerActionMove(index(),index, index());\n }\n }\n }\n else if(i!=myTurn) {\n for(Map.Entry<Integer, Card> r : repairCards.entrySet()) {\n int index = r.getKey();\n PlayerActionCard repair = (PlayerActionCard) r.getValue();\n// System.out.println(Arrays.toString(game().playerAt(i).sabotaged()));\n if (game().playerAt(i).isRepairable(repair.effects())) {\n //calculate the should i repair? function\n double shouldIBlockMore = Probability[i]+(0.03*(numPlayers-i));\n if(blockMore<shouldIBlockMore) {\n blockMore = shouldIBlockMore;\n targetPlayer = i;\n cardIndex = index;\n }\n }\n }\n }\n }\n if(blockMore>0.75 && targetPlayer>=0)\n return Move.NewPlayerActionMove(index(), cardIndex, targetPlayer);\n }\n //Block Enemy\n if(canBlock) {\n double blockMore = 0.0;\n int targetPlayer = -1;\n int cardIndex = 0;\n for (int i = 0; i < numPlayers; i++) {\n if (i != myTurn) {\n for (Map.Entry<Integer, Card> b : blockCards.entrySet()) {\n int index = b.getKey();\n PlayerActionCard block = (PlayerActionCard) b.getValue();\n if (game().playerAt(i).isSabotageable(block.effects()[0])) {\n //calculate the should i repair? function\n double shouldIBlockMore = (1 - Probability[i]) * ((1 - Probability[i]) + 0.2 * (numPlayers - i));\n if (blockMore < shouldIBlockMore) {\n blockMore = shouldIBlockMore;\n targetPlayer = i;\n cardIndex = index;\n }\n }\n }\n }\n }\n if(blockMore>0.6 && targetPlayer>=0)\n return Move.NewPlayerActionMove(index(), cardIndex, targetPlayer);\n }\n //Fix (Rockfall)\n if(canRockfall) {\n int globalIndex = 0;\n double maxH = 0.0;\n Position bp = new Position(0,0);\n //Find best path to place;\n Board board = game().board().copy();\n for( Map.Entry<Integer, Card> d : destroyCards.entrySet()) {\n int index = d.getKey();\n Set<Position> destroyable = game().board().getDestroyable();\n for (Position h : destroyable) {\n Board simulated = board.simulateRemoveCardAt(h.x, h.y);\n// System.out.println(path.type());\n double cH = getClosest(simulated);\n if(maxH<cH) {\n bp=h;\n globalIndex = index;\n maxH = cH;\n }\n }\n }\n oldBoard = game().board().copy();\n if(maxH>0)\n return Move.NewRockfallMove(index(), globalIndex, bp.x, bp.y);\n }\n //See map\n\n //Conserve (Find the best card to discard)\n\n //calculate the heuristics and adjust accordingly,\n //choose between playing a card or discarding.\n } else if (role() == Role.SABOTEUR) {\n //See map\n if(canSee && !goldFound) {\n int selection=0;\n //specific for saboteurs\n double maxProb=goldProb[0];\n for(int i=0; i<3; i++) {\n if(goldProb[i]>maxProb) {\n maxProb = goldProb[i];\n selection=i;\n }\n }\n Move look = Move.NewMapMove(index(), mapIndex, Board.GoalPosition.TOP);\n switch(selection) {\n case 0:\n look = Move.NewMapMove(index(), mapIndex, Board.GoalPosition.TOP);\n break;\n case 1:\n look = Move.NewMapMove(index(), mapIndex, Board.GoalPosition.MIDDLE);\n break;\n case 2:\n look = Move.NewMapMove(index(), mapIndex, Board.GoalPosition.BOTTOM);\n break;\n }\n return look;\n }\n //Path\n if(canMove) {\n int globalIndex = 0;\n double maxH = 0.0;\n Position bp = new Position(0,0);\n boolean rotate = false;\n //Find best path to place;\n Board board = game().board().copy();\n double oldH = getClosestSabotage(board);\n for( Map.Entry<Integer, Card> p : pathCards.entrySet()) {\n int index = p.getKey();\n Card path = p.getValue();\n ((PathCard)path).setRotated(false);\n Set<Position> placeable = game().board().getPlaceable((PathCard)path);\n for (Position h : placeable) {\n Board simulated = board.simulatePlaceCardAt((PathCard)path, h.x, h.y);\n// System.out.println(path.type());\n double cH = getClosestSabotage(simulated);\n if(maxH<cH) {\n bp=h;\n globalIndex = index;\n maxH = cH;\n rotate=false;\n }\n }\n ((PathCard) path).setRotated(true);\n placeable = game().board().getPlaceable((PathCard)path);\n for (Position h : placeable) {\n Board simulated = board.simulatePlaceCardAt((PathCard)path, h.x, h.y);\n// System.out.println(simulated);\n double cH = getClosestSabotage(simulated);\n if(maxH<cH) {\n bp=h;\n globalIndex = index;\n rotate=true;\n maxH = cH;\n }\n }\n }\n oldBoard = game().board().copy();\n if(maxH>0 && abs(maxH-oldH)>0.01)\n return Move.NewPathMove(index(), globalIndex, bp.x, bp.y, rotate);\n }\n //Unblock Friend\n if(canRepair) {\n double blockMore = 0.0;\n int targetPlayer = -1;\n int cardIndex = 0;\n for(int i=0; i<numPlayers; i++) {\n if(i == myTurn) {\n for(Map.Entry<Integer, Card> r : repairCards.entrySet()) {\n int index = r.getKey();\n PlayerActionCard repair = (PlayerActionCard) r.getValue();\n if (game().playerAt(myTurn).isRepairable(repair.effects())) {\n return Move.NewPlayerActionMove(index(),index, index());\n }\n }\n }\n else if(i!=myTurn) {\n for(Map.Entry<Integer, Card> r : repairCards.entrySet()) {\n int index = r.getKey();\n PlayerActionCard repair = (PlayerActionCard) r.getValue();\n if (game().playerAt(i).isRepairable(repair.effects())) {\n //calculate the should i repair? function\n double shouldIBlockMore = (1-Probability[i])+(0.03*(numPlayers-i));\n if(blockMore<shouldIBlockMore) {\n blockMore = shouldIBlockMore;\n targetPlayer = i;\n cardIndex = index;\n }\n }\n }\n }\n }\n if(blockMore>0.75 && targetPlayer>=0)\n return Move.NewPlayerActionMove(index(), cardIndex, targetPlayer);\n }\n //Block Enemy\n if(canBlock) {\n double blockMore = 0.0;\n int targetPlayer = -1;\n int cardIndex = 0;\n for (int i = 0; i < numPlayers; i++) {\n if (i != myTurn) {\n for (Map.Entry<Integer, Card> b : blockCards.entrySet()) {\n int index = b.getKey();\n PlayerActionCard block = (PlayerActionCard) b.getValue();\n if (game().playerAt(i).isSabotageable(block.effects()[0])) {\n //calculate the should i repair? function\n double shouldIBlockMore = (Probability[i]) * ((Probability[i]) + 0.2 * (numPlayers - i));\n if (blockMore < shouldIBlockMore) {\n blockMore = shouldIBlockMore;\n targetPlayer = i;\n cardIndex = index;\n }\n }\n }\n }\n }\n if(blockMore>0.6 && targetPlayer>=0)\n return Move.NewPlayerActionMove(index(), cardIndex, targetPlayer);\n }\n //Sabotage (Rockfall)\n if(canRockfall) {\n int globalIndex = 0;\n double maxH = 0;\n Position bp = new Position(0,0);\n //Find best path to place;\n Board board = game().board().copy();\n for( Map.Entry<Integer, Card> d : destroyCards.entrySet()) {\n int index = d.getKey();\n Set<Position> destroyable = game().board().getDestroyable();\n for (Position h : destroyable) {\n Board simulated = board.simulateRemoveCardAt(h.x, h.y);\n// System.out.println(path.type());\n double cH = getClosestSabotage(simulated);\n if(maxH<cH) {\n bp=h;\n globalIndex = index;\n maxH = cH;\n }\n }\n }\n oldBoard = game().board().copy();\n if(maxH>0)\n return Move.NewRockfallMove(index(), globalIndex, bp.x, bp.y);\n }\n //Conserve (Find the best card to discard\n\n //calculate the heuristics and adjust accordingly,\n //choose between playing a card or discarding.\n }\n return discardMoves.get(0);\n }", "public abstract void cardDrawn(int playerIndex);", "public Player playGame() {\r\n\r\n\t\tfor(int season = 0; season < 4; season++) {\r\n\r\n\t\t\t//deal out cards\r\n\t\t\tfor(int i = 0; i < state.dealAmounts[season]; i++) {\r\n\t\t\t\tfor(Player p : players) {\r\n\t\t\t\t\tp.deal(state.drawCard());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//debug\r\n\t\t\t//show money amounts\r\n\t\t\tfor(Player p : players) {\r\n\t\t\t\tif(debugPrinting)\r\n\t\t\t\tSystem.out.println(p.name + \" : \" + p.getMoney());\r\n\t\t\t}\r\n\r\n\t\t\tstate.resetSeason();\r\n\r\n\t\t\tfor(int turn = 0; true; turn = (turn+1)%players.length) {\r\n\t\t\t\t//have a player play a card\r\n\t\t\t\tCard card = players[turn].chooseCard();\r\n\t\t\t\tCard second = null;\r\n\t\t\t\t\r\n\t\t\t\t//TODO this should be fixed to include if no players have cards\r\n\t\t\t\tif(card == null) {\r\n\t\t\t\t\tint hasHands = 0;\r\n\t\t\t\t\tfor(Player p : players) {\r\n\t\t\t\t\t\tif(p.getHand().size() != 0) {\r\n\t\t\t\t\t\t\thasHands++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//if no players have anything in their hand\r\n\t\t\t\t\tif(hasHands == 0) {\r\n\t\t\t\t\t\tendSeason();\r\n\t\t\t\t\t\tbreak;//break out of the season\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tint secondPlayer = -1;\r\n\r\n\t\t\t\tif(card.getAuctionType() == AuctionType.DOUBLE) {\r\n\t\t\t\t\tsecond = card;\r\n\t\t\t\t\tcard = players[turn].chooseSecondCard(second.getArtist());\r\n\r\n\t\t\t\t\tif(card == null) {\r\n\t\t\t\t\t\tfor(int i = 0; i < players.length-1 && card == null; i++) {\r\n\t\t\t\t\t\t\tcard = players[(turn+i)%players.length].chooseSecondCard(second.getArtist());\r\n\t\t\t\t\t\t\tsecondPlayer = (turn+i)%players.length;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif(card == null) {\r\n\t\t\t\t\t\t\tcard = second;\r\n\t\t\t\t\t\t\tsecond = null;\r\n\t\t\t\t\t\t\tsecondPlayer = -1;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//card(s) selected\r\n\r\n\t\t\t\t//let the GameState know\r\n\t\t\t\tstate.sell(card.getArtist(), second != null);\r\n\r\n\t\t\t\t//check to see if the season has ended\r\n\t\t\t\t//System.out.println(state.seasonEnded());\r\n\t\t\t\tif(state.seasonEnded()) {\r\n\t\t\t\t\tendSeason();\r\n\t\t\t\t\tbreak;//this break will break out of the season\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//announce card(s)\r\n\t\t\t\tfor(Player p : players) {\r\n\t\t\t\t\tp.announceCard(card, !(second == null));\r\n\t\t\t\t}\r\n\t\t\t\tif(debugPrinting)\r\n\t\t\t\tSystem.out.println(\"Player : \" + players[turn].name + \" :: \" + card + \" :: \" + second);\r\n\r\n\t\t\t\t//card(s) are ready for auction\r\n\t\t\t\tBid winningBid = null;\r\n\t\t\t\tif(card.getAuctionType() == AuctionType.FIXED_PRICE) {\r\n\t\t\t\t\twinningBid = fixedPrice(turn, players[turn].getFixedPrice());\r\n\t\t\t\t} else if(card.getAuctionType() == AuctionType.ONCE_AROUND) {\r\n\t\t\t\t\twinningBid = onceAround(turn);\r\n\t\t\t\t} else if(card.getAuctionType() == AuctionType.SEALED) {\r\n\t\t\t\t\twinningBid = sealed(turn);\r\n\t\t\t\t} else {\r\n\t\t\t\t\twinningBid = standardBidding(turn);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//let everybody know who won the auction\r\n\t\t\t\tfor(Player p : players) {\r\n\t\t\t\t\tp.announceAuctionWinner(winningBid.index, players[winningBid.index].name, winningBid.price);\r\n\t\t\t\t}\r\n\t\t\t\tif(debugPrinting)\r\n\t\t\t\tSystem.out.println(\"Auction winner: \" + players[winningBid.index].name + \":: Price : \" + winningBid.price);\r\n\r\n\t\t\t\t//The auction has been won, time to execute the order (66)\r\n\t\t\t\tif(winningBid.index == turn) {\r\n\t\t\t\t\tplayers[turn].pay(winningBid.price);\r\n\t\t\t\t\tplayers[turn].givePainting(card);\r\n\t\t\t\t\tif(second != null) {\r\n\t\t\t\t\t\tplayers[turn].givePainting(second);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(secondPlayer != -1) {\r\n\t\t\t\t\t\tplayers[secondPlayer].recive(winningBid.price/2);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tplayers[winningBid.index].pay(winningBid.price);\r\n\t\t\t\t\tif(secondPlayer != -1) {\r\n\t\t\t\t\t\tif(secondPlayer != winningBid.index) {\r\n\t\t\t\t\t\t\tplayers[secondPlayer].recive(winningBid.price/2);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tplayers[turn].recive(winningBid.price/2);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tplayers[turn].recive(winningBid.price);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tplayers[winningBid.index].givePainting(card);\r\n\t\t\t\t\tif(second != null) {\r\n\t\t\t\t\t\tplayers[winningBid.index].givePainting(second);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//debug\r\n\t\t//show money amounts\r\n\t\tfor(Player p : players) {\r\n\t\t\tif(debugPrinting)\r\n\t\t\tSystem.out.println(p.name + \" : \" + p.getMoney());\r\n\t\t}\r\n\t\t\r\n\t\tPlayer winner = null;\r\n\t\tfor(Player p : players) {\r\n\t\t\tif(winner == null || winner.getMoney() < p.getMoney()) {\r\n\t\t\t\twinner = p;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn winner;\r\n\t}", "private void discardRestrictedCards()\n\t{\n\t\tif (playerList.size() == 2)\n\t\t{\n\t\t\tfor(Card card : restrictedCard2PlayerList)\n\t\t\t{\n\t\t\t\tswitch (card.getType())\n\t\t\t\t{\n\t\t\t\t\tcase GreenPlayerCard:\n\t\t\t\t\tcase BrownPlayerCard:\n\t\t\t\t\t\tCard playerCardMatch = board.getPlayerCardDeck().pickCardByID(card.getId());\n\t\t\t\t\t\tif (playerCardMatch != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tboard.getDiscardDeck().addCard(playerCardMatch);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase CityAreaCard:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase PersonalityCard:\n\t\t\t\t\t\tCard personalityCardMatch = board.getPersonalityCardDeck().pickCardByID(card.getId());\n\t\t\t\t\t\tif (personalityCardMatch != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tboard.getDiscardDeck().addCard(personalityCardMatch);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase RandomEventCard:\n\t\t\t\t\t\tCard randomEventCardMatch = board.getRandomEventCardDeck().pickCardByID(card.getId());\n\t\t\t\t\t\tif (randomEventCardMatch != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tboard.getDiscardDeck().addCard(randomEventCardMatch);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void play() {\n\t\t// setting up\n\t\tdeck = new Deck();\n\t\tdeck.shuffle();\n\t\tint turn = 0;\n\t\tRandom rand = new Random();\n\t\tCardRank previousCardRank = null;\n\t\tboolean snapTime = false;\n\t\t\n\t\t// the turning card loop, which ends when two cards with the same value/rank are revealed\n\t\t// or when no cards are left in the deck\n\t\twhile (!snapTime) {\n\t\t\tString currentPlayer = (turn % 2 == 0) ? player1 : player2;\n\t\t\t\n\t\t\tint timeout = 1000 + rand.nextInt(1000);\n\t\t\t\n\t\t\ttry {\n\t\t\t\tTimeUnit.MILLISECONDS.sleep((long) timeout);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tCard nextCard = deck.turnCard();\n\t\t\t\n\t\t\t// possible draw if no cards are left in the deck\n\t\t\tif (nextCard == null) {\n\t\t\t\tSystem.out.println(\"No cards left in the deck! It's a draw!\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tSystem.out.println(currentPlayer + \" turns card \\'\" + nextCard + \"\\'\");\n\t\t\t\n\t\t\tturn++;\n\t\t\t\n\t\t\t// trigger the end of the turning card loop\n\t\t\tif (nextCard.getCardRank() == previousCardRank) {\n\t\t\t\tsnapTime = true;\n\t\t\t}\n\t\t\tpreviousCardRank = nextCard.getCardRank();\n\t\t}\n\t\t\n\t\t// simulate the time needed for both players to say \"SNAP!\"\n\t\tint snapTimeoutP1 = 500 + rand.nextInt(1000);\n\t\tint snapTimeoutP2 = 500 + rand.nextInt(1000);\n\t\t\n\t\t// rare draw situation, if the two players say \"SNAP!\" at the same time\n\t\tif (snapTimeoutP1 == snapTimeoutP2) {\n\t\t\ttry {\n\t\t\t\tTimeUnit.MILLISECONDS.sleep((long) snapTimeoutP1);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tSystem.out.println(\"SNAP! It's a draw!\");\n\t\t}\n\t\t// in most cases, a player will say \"SNAP!\" first, and they will be the winner\n\t\telse {\n\t\t\tString result = String.format(\"SNAP! %s is the winner!\", (snapTimeoutP1 < snapTimeoutP2) ? player1 : player2);\n\t\t\t\n\t\t\ttry {\n\t\t\t\tTimeUnit.MILLISECONDS.sleep((long) Math.min(snapTimeoutP1, snapTimeoutP2));\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tSystem.out.println(result);\n\t\t}\n\t}", "private void checkHighCard(Player player) {\n\t\tplayer.setHandRank(HandRank.HIGH_CARD);\n\n\t\tfor (int i = 0, j = 6; i < hand.length; i++, j--)\n\t\t\thand[i] = player.getSevenCardsTempHand().get(j);\n\n\t\tplayer.setFiveCardsHand(hand);\n\t}", "public void action(ActionCard card) {\n if (!myTurn()) {\n return;\n }\n if (handPile.contains(card)) {\n specialAction = card.performAction(this);\n while (specialAction.getDraw() > 0) {\n this.draw(1);\n specialAction.reduceDraw();\n }\n // CardAction cardAct = new CardAction(card, \"Play: \" + card.getName());\n // history.add(cardAct);\n }\n }", "public void playCard(int index) {\r\n\t\tCard c = deck.hand.get(index);\r\n\t\tif(c.isAction() && actions > 0 && access.gamePhase < 2) {\r\n\t\t\taccess.gamePhase = 1;\r\n\t\t\tif(!deck.play.contains(new Champion())) actions--;\r\n\t\t\tdeck.playCard(index);\r\n\t\t\tc.performAction();\r\n\t\t\tnotifyObservers();\r\n\t\t}\r\n\t\telse if(c.isTreasure() && access.gamePhase < 3) {\r\n\t\t\taccess.gamePhase = 1;\r\n\t\t\taddTreasure(c.getTreasure());\r\n\t\t\tdeck.playCard(index);\r\n\t\t\tc.performAction();\r\n\t\t\tnotifyObservers();\r\n\t\t}\r\n\t}", "@Override\r\n public void transferFromDiscard(int plDeckPosition, int player){\r\n PlayingCard card;\r\n while(!this.players.get(player).getDeck(plDeckPosition+1).isDeckEmpty()){\r\n card = (PlayingCard) this.getPlayerCard(player, plDeckPosition+1);\r\n this.giveCardToPlayer(card, player, plDeckPosition);\r\n } \r\n }", "public void catchCard(){\r\n changePlace(deck);\r\n changePlace(hand);\r\n }", "public static void playWar(Hand player1, Hand player2) {\n //intro for the game:\n System.out.println(\"Playing War!\");\n System.out.println(\"Cards dealt - here are the hands:\");\n System.out.println(\"Player 1:\");\n System.out.println(player1.toString());\n System.out.println(\"Player 2:\");\n System.out.println(player2.toString());\n //counting variables for the program\n int rounds = 0;\n int wars = 0;\n //gameCards is a hand object that collects each card as it is played\n Hand gameCards = new Hand();\n //these card objects represent each players card in the game\n Card player1Card;\n Card player2Card;\n //crate a boolean object for the game\n boolean gameOn = true;\n //let's go to war\n while(gameOn) {\n //player 1 plays a card\n player1Card = player1.getNext();\n gameCards.addCard(player1Card);\n //player 2 plays a card\n player2Card = player2.getNext();\n gameCards.addCard(player2Card);\n //check for war\n if(player1Card.equals(player2Card) && player1.size() > 0 && player2.size() > 0) {\n //let loose the dogs of war\n wars++;\n //each player puts another card on the table\n gameCards.addCard(player1.getNext());\n gameCards.addCard(player2.getNext());\n }\n //check if player1 ... won\n if(player1Card.compareValue(player2Card)) {\n rounds++;\n while(gameCards.size() > 0) { player1.addCard(gameCards.getNext()); }\n }\n \n //check if player 2 won\n else {\n rounds++;\n while(gameCards.size() > 0) { player2.addCard(gameCards.getNext()); }\n }\n //check for endgame scenarios\n if(player1.isEmpty() || player2.isEmpty()) {\n\t\t\t\tgameOn = false;\n\t\t\t}\n if(rounds == 5000) {\n\t\t\t\tgameOn = false;\n\t\t\t}\n }\n //endgame readout\n System.out.println(\"Hands at the end of the game:\");\n System.out.println(\"Player 1:\");\n System.out.println(player1.toString());\n System.out.println(\"Player 2:\");\n System.out.println(player2.toString());\n System.out.println(\"Results of the game:\");\n //readout if draw\n if(rounds == 5000) {\n System.out.println(\"No winner.\");\n System.out.println(\"Player 1 has \" + player1.size() + \" cards.\");\n System.out.println(\"Player 2 has \" + player2.size() + \" cards.\");\n }\n //readout if winner\n else {\n String winner = new String();\n if(player1.size() != 0) { winner = \"Player 1\"; }\n else { winner = \"Player 2\"; }\n System.out.println(\"Winner: \" + winner);\n System.out.println(\"Number of rounds: \" + rounds);\n }\n \n \n }", "@Test\n public void testPlay1()\n {\n List<Card> hand = new ArrayList<Card>();\n hand.add(new Card(UnoPlayer.Color.RED, UnoPlayer.Rank.NUMBER, 4));\n hand.add(new Card(UnoPlayer.Color.GREEN, UnoPlayer.Rank.NUMBER, 7));\n hand.add(new Card(UnoPlayer.Color.GREEN, UnoPlayer.Rank.REVERSE, -1));\n hand.add(new Card(UnoPlayer.Color.BLUE, UnoPlayer.Rank.NUMBER, 2));\n hand.add(new Card(UnoPlayer.Color.BLUE, UnoPlayer.Rank.SKIP, -1));\n hand.add(new Card(UnoPlayer.Color.NONE, UnoPlayer.Rank.WILD, -1));\n\n Card upCard = new Card(UnoPlayer.Color.RED, UnoPlayer.Rank.NUMBER, 7);\n int cardPlayed = thePlayer.play(hand, upCard, UnoPlayer.Color.RED, new\n GameState(upCard));\n\n // Let's see whether the card played was legit.\n assertTrue(\"Player didn't think a card could be played.\\nThis is an \"\n + \"error, since cards 0, 1, and 5 are legal plays.\",\n cardPlayed >= 0);\n assertTrue(\"Player tried to play \" + hand.get(cardPlayed)\n + \", which is an error.\", cardPlayed == 0 || cardPlayed == 1\n || cardPlayed == 5);\n System.out.println(\"Player played \" + hand.get(cardPlayed));\n }" ]
[ "0.70794415", "0.69334245", "0.6785233", "0.67556334", "0.6716169", "0.66657037", "0.6608398", "0.6562634", "0.649777", "0.64502877", "0.6380348", "0.6379574", "0.6372185", "0.63662803", "0.63645804", "0.63624495", "0.63572526", "0.6346785", "0.6340224", "0.6305561", "0.6303309", "0.6294469", "0.6287547", "0.6268846", "0.6260212", "0.62518644", "0.6240021", "0.62358266", "0.62286973", "0.62176394", "0.62084264", "0.61991906", "0.61944675", "0.6177364", "0.6128997", "0.61231124", "0.60980153", "0.6097837", "0.6093645", "0.60692817", "0.6064068", "0.60459", "0.6041101", "0.6035505", "0.60346824", "0.6032572", "0.60203826", "0.60184747", "0.6011269", "0.60067004", "0.59980327", "0.5994414", "0.5972052", "0.5970633", "0.5969666", "0.5956801", "0.5951186", "0.5945047", "0.5943855", "0.5934798", "0.5926337", "0.5925913", "0.59253293", "0.5925302", "0.5924245", "0.5923058", "0.59224117", "0.59070677", "0.58973396", "0.58944756", "0.58818954", "0.5868479", "0.58660626", "0.5864619", "0.5854831", "0.58531964", "0.58445674", "0.58426386", "0.58243024", "0.58206165", "0.5818104", "0.5817062", "0.58159935", "0.5807007", "0.5806466", "0.5798936", "0.5791684", "0.5790863", "0.5784478", "0.5783172", "0.5780476", "0.5773379", "0.57658994", "0.57644117", "0.575848", "0.57410485", "0.5735786", "0.5734341", "0.57319933", "0.5729002" ]
0.7947361
0
Finds the ideal suit and rank to play. The ideal suit and rank is the suit and rank most common in the player's own hand.
private void findIdealSuitAndRank() { Map<Card.Suit, Integer> suitsInHand = new HashMap<Card.Suit, Integer>(); Map<Card.Rank, Integer> ranksInHand = new HashMap<Card.Rank, Integer>(); // Use the enumerable methods in Card class to put all the keys in the HashMaps for (Card.Suit suit : Card.Suit.values()) { suitsInHand.put(suit, 0); } for (Card.Rank rank : Card.Rank.values()) { ranksInHand.put(rank, 0); } // Place all cards played in their respective locations in the HashMap for (Card card : cardsInHand) { suitsInHand.put(card.getSuit(), suitsInHand.get(card.getSuit()) + 1); ranksInHand.put(card.getRank(), ranksInHand.get(card.getRank()) + 1); } /** * The following for loop was derived from * https://stackoverflow.com/questions/5911174/finding-key-associated-with-max-value-in-a-java-map * for finding the key with the max value in a HashMap. */ Map.Entry<Card.Suit, Integer> maxEntrySuit = null; for (Map.Entry<Card.Suit, Integer> entry : suitsInHand.entrySet()) { if (maxEntrySuit == null || entry.getValue().compareTo(maxEntrySuit.getValue()) > 0) { maxEntrySuit = entry; } } idealSuit = maxEntrySuit.getKey(); Map.Entry<Card.Rank, Integer> maxEntryRank = null; for (Map.Entry<Card.Rank, Integer> entry : ranksInHand.entrySet()) { if (maxEntryRank == null || entry.getValue().compareTo(maxEntryRank.getValue()) > 0) { maxEntryRank = entry; } } idealRank = maxEntryRank.getKey(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int calcRank() {\n sortCardsInHand();\n\n // check Royal flush\n if (this.areCardsInStraight() && this.cards[0].getValue() == 10 && areCardsInSameSuite()) return 10;\n\n // Straight flush: All five cards in consecutive value order, with the same suit\n if (areCardsInSameSuite() && areCardsInStraight()) return 9;\n\n int pairCheck = CardOperations.numberOfPairs(this.getHashMapOfValues());\n\n // Four of a kind: Four cards of the same value\n if (pairCheck == 4) return 8;\n\n // Full house: Three of a kind and a Pair\n if (pairCheck == 5) return 7;\n\n // Flush: All five cards having the same suit\n if (areCardsInSameSuite()) return 6;\n\n // Straight: All five cards in consecutive value order\n if (areCardsInStraight()) return 5;\n\n // Three of a kind: Three cards of the same value\n if (pairCheck == 3) return 4;\n\n // Two pairs: Two different pairs\n if (pairCheck == 2) return 3;\n\n // A pair: Two cards of same value\n if (pairCheck == 1) return 2;\n\n // High card: Highest value card\n return 1;\n }", "public void determineRank(){\r\n //ranks highcard 0, pair 1, twopair 2, three of a kind 3, straight 4, flush 5,\r\n //full house 6, four of a kind 7 , straight flush 8, royal flush 9\r\n //I should start top down.\r\n\r\n //Royal Flush\r\n if(isRoyalFlush())\r\n setRank(9);\r\n //Straight flush\r\n else if(isFlush() && isStraight())\r\n setRank(8);\r\n //four of a kind\r\n else if(isFourOfAKind())\r\n setRank(7);\r\n //full house\r\n else if( isFullHouse())\r\n setRank(6);\r\n //flush\r\n else if(isFlush())\r\n setRank(5);\r\n //straight\r\n else if(isStraight())\r\n setRank(4);\r\n //three of a kind\r\n else if(isThreeOfAKind())\r\n setRank(3);\r\n //twoPair\r\n else if(isTwoPair())\r\n setRank(2);\r\n //pair\r\n else if(isPair())\r\n setRank(1);\r\n //highcard\r\n else\r\n setRank(0);\r\n\r\n }", "@Override\n public Card playCard() {\n List<Card> rank1 = new ArrayList<>();\n List<Card> rank2 = new ArrayList<>();\n List<Card> rank3 = new ArrayList<>();\n List<Card> rank4 = new ArrayList<>();\n for (Card card : cardsInHand) {\n if (card.getRank().equals(Card.Rank.EIGHT)) {\n rank1.add(card);\n break;\n } else if (card.getSuit().equals(idealSuit)\n && card.getRank().equals(idealRank)\n && (topCard.getSuit().equals(card.getSuit())\n || topCard.getRank().equals(card.getRank()))) {\n rank2.add(card);\n } else if ((card.getSuit().equals(idealSuit) || card.getRank().equals(idealRank))\n && (topCard.getSuit().equals(card.getSuit())\n || topCard.getRank().equals(card.getRank()))) {\n rank3.add(card);\n } else if (topCard.getSuit().equals(card.getSuit())\n || topCard.getRank().equals(card.getRank())) {\n rank4.add(card);\n }\n }\n List<List<Card>> playPossibilities = new ArrayList<>(Arrays.asList(rank1, rank2, rank3, rank4));\n for (List<Card> list : playPossibilities) {\n if (list.size() > 0) {\n cardsInHand.remove(list.get(0));\n return list.get(0);\n }\n }\n // This method will never return null if shouldDrawCard() is called beforehand.\n return null;\n }", "public Card getHighestCard() {\n Card rtrnCard = cardsPlayed[0];\n int i;\n int tempInt;\n int currentHighestRank = cardsPlayed[0].getIntValue();\n for(i = 0; i < cardsPlayed.length; i++){\n if(cardsPlayed[i].getSuit().equals(suit)){\n tempInt = cardsPlayed[i].getIntValue();\n if((currentHighestRank < tempInt)&&(!(cardsPlayed[i].equals(rtrnCard)))){\n rtrnCard = cardsPlayed[i];\n currentHighestRank = cardsPlayed[i].getIntValue();\n }\n }\n }\n return rtrnCard;\n }", "static int getComputerCard(Card playerCard) {\n //The computer will iterate through different possible cards it might choose to play.\n //This represents a chosen card at any given time.\n Card possibleCard = null;\n //The position in the computer's hand where the possibleCard is stored.\n int cardPosition = 0;\n //True if the computer has a card of higher value than the player's.\n boolean hasHigherCard = false;\n //Iterate through the computer's hand, trying to find a card higher than the player's\n for (int i = 0; i < highCardGame.getHand(0).getNumCards(); i++) {\n if (playerCard.compareTo(highCardGame.getHand(0).inspectCard(i)) < 0) {\n //The computer has a higher card.\n if (possibleCard != null) {\n //If this card is lower than the possible card, but can still beat the player, then replace possible card.\n if (possibleCard.compareTo(highCardGame.getHand(0).inspectCard(i)) > 0) {\n possibleCard = new Card(highCardGame.getHand(0).inspectCard(i));\n cardPosition = i;\n }\n } else {\n //If the computer has not yet chosen a possible card, choose this one.\n possibleCard = new Card(highCardGame.getHand(0).inspectCard(i));\n hasHigherCard = true;\n cardPosition = i;\n }\n }\n }\n if (!hasHigherCard) {\n //If the computer does not have a card that can beat the player, then feed the lowest card\n //that the computer has to the player.\n for (int i = 0; i < highCardGame.getHand(0).getNumCards(); i++)\n if (playerCard.compareTo(highCardGame.getHand(0).inspectCard(i)) >= 0) {\n if (possibleCard != null) {\n if (possibleCard.compareTo(highCardGame.getHand(0).inspectCard(i)) > 0) {\n possibleCard = new Card(highCardGame.getHand(0).inspectCard(i));\n cardPosition = i;\n }\n } else {\n possibleCard = highCardGame.getHand(0).inspectCard(i);\n cardPosition = i;\n }\n }\n }\n return cardPosition;\n }", "public void findBestTwoCardHandName() {\n if (handContainsTheseTwoCards_With_AtLeastOneFromPlayerOriginalHand(14, 'x', 14) == true) {//aces, any suit\n bestHandFromCardsNickNameString = \"Pocket Rockets\";\n } else if (handContainsTheseTwoCards_With_AtLeastOneFromPlayerOriginalHand(13, 'y', 14) == true) {//king, then ace, same suit\n bestHandFromCardsNickNameString = \"Big Slick in a Suit\";\n } else if (handContainsTheseTwoCards_With_AtLeastOneFromPlayerOriginalHand(13, 'x', 14) == true) {\n bestHandFromCardsNickNameString = \"Full Auto\";\n } else if (handContainsTheseTwoCards_With_AtLeastOneFromPlayerOriginalHand(8, 'x', 14) == true) {\n bestHandFromCardsNickNameString = \"Dead Man's Hand\";\n } else if (handContainsTheseTwoCards_With_AtLeastOneFromPlayerOriginalHand(13, 'x', 13) == true) {\n bestHandFromCardsNickNameString = \"Cowboys King Kong\";\n } else if (handContainsTheseTwoCards_With_AtLeastOneFromPlayerOriginalHand(9, 'x', 14) == true) {\n bestHandFromCardsNickNameString = \"The Dog\";\n } else if (handContainsTheseTwoCards_With_AtLeastOneFromPlayerOriginalHand(12, 'x', 12) == true) {\n bestHandFromCardsNickNameString = \"Ladies\";\n } else if (handContainsTheseTwoCards_With_AtLeastOneFromPlayerOriginalHand(3, 'x', 12) == true) {\n bestHandFromCardsNickNameString = \"The Waiter\";\n } else if (handContainsTheseTwoCards_With_AtLeastOneFromPlayerOriginalHand(9, 'x', 9) == true) {\n bestHandFromCardsNickNameString = \"A German Dime\";\n } else if (allCards[0].value == allCards[1].value) {\n bestHandFromCardsNickNameString = \"Pocket Pair\";\n } else if (allCards[0].suit == allCards[1].suit) {\n bestHandFromCardsNickNameString = \"Flush Rush\";\n } else if (allCards[0].value == allCards[1].value + 1 || allCards[0].value + 1 == allCards[1].value || (allCards[0].value == 14 && allCards[1].value == 2) || (allCards[0].value == 2 && allCards[1].value == 14) ) {\n bestHandFromCardsNickNameString = \"Straight Bait\";\n } else if (allCards[0].value == 14 || allCards[1].value == 14) {\n bestHandFromCardsNickNameString = \"A Spike\";\n } else if (allCards[0].value == 13 || allCards[1].value == 13) {\n bestHandFromCardsNickNameString = \"A Dame\";\n } else if (allCards[0].value == 12 || allCards[1].value == 12) {\n bestHandFromCardsNickNameString = \"A Jackal\";\n } else if (allCards[0].value == 11 || allCards[1].value == 11) {\n bestHandFromCardsNickNameString = \"A Fishhook\";\n } else if (allCards[0].value == 10 || allCards[1].value == 10) {\n bestHandFromCardsNickNameString = \"A Sawbuck\";\n } else if (allCards[0].value == 9 || allCards[1].value == 9) {\n bestHandFromCardsNickNameString = \"Nina Ross\";\n } else {\n bestHandFromCardsNickNameString = \"Down on Your Luck\";\n }\n \n System.out.println(\"findBestTwoCardHandName---->>> \" + bestHandFromCardsNickNameString);\n\n }", "public int playHand(Hand hand){\r\n\r\n if( this.getRank() > hand.getRank()){\r\n System.out.println();\r\n System.out.println(\"Black: \" + this.getHand() + \" White: \" + hand.getHand());\r\n System.out.println(\"Black wins!\");\r\n return 1;\r\n }\r\n\r\n else if(this.getRank() < hand.getRank()){\r\n System.out.println();\r\n System.out.println(\"Black: \" + this.getHand() + \" White: \" + hand.getHand());\r\n System.out.println(\"White wins!\");\r\n return -1;\r\n }\r\n else{\r\n System.out.println();\r\n System.out.println(\"Black: \" + this.getHand() + \" White: \" + hand.getHand());\r\n\r\n if(this.getHighCard() > hand.getHighCard()){\r\n System.out.println(\"Black Wins!\");\r\n return 1;\r\n }\r\n else if(hand.getHighCard() > this.getHighCard()){\r\n System.out.println(\"white Wins!\");\r\n }\r\n System.out.print(\"Tie!\");\r\n return 0;\r\n }\r\n\r\n }", "private static int suitAsInt(Card card) {\n return card.getSuit().ordinal();\n }", "public Card bestEight()\n {\n String mostSuit = \"\";\n int most = 0;\n Hashtable<String, Integer> cardSuit = new Hashtable<String, Integer>();\n //Count the number of cards in players hand for each suit\n for(Card cardInHand: this.hand)\n {\n String suit = cardInHand.getSuit();\n if(cardSuit.containsKey(suit))\n {\n cardSuit.put(suit, cardSuit.get(suit) + 1);\n }\n else\n {\n cardSuit.put(suit, 1);\n }\n }\n //find the highest one.\n for(String key: cardSuit.keySet())\n {\n if(cardSuit.get(key) > most) {\n mostSuit = key;\n most = cardSuit.get(key);\n }\n }\n return new Card(mostSuit, \"8\");\n }", "private static int findWinner(ArrayList<ArrayList<Card>> hands,\n ArrayList<Card> tableCardsFinal) {\n FiveCardHand bestHand = null;\n int bestHandIndex = -1;\n for (int i = 0; i < hands.size(); i++) {\n ArrayList<Card> hand = hands.get(i);\n ArrayList<Card> handOfSeven = (ArrayList<Card>) hand.clone();\n handOfSeven.addAll(tableCardsFinal);\n FiveCardHand best = findBestHand(handOfSeven);\n\n if (bestHand == null) {\n bestHand = best;\n bestHandIndex = i;\n } else if (best.compareTo(bestHand) > 0) {\n bestHand = best;\n bestHandIndex = i;\n } else if (best.compareTo(bestHand) == 0) { // handle ties by returning hands.size()\n bestHandIndex = hands.size();\n }\n }\n\n return bestHandIndex;\n }", "public int compareHandForWinner(Hand hand) {\n int thisRank = this.calcRank();\n int handRank = hand.calcRank();\n if (thisRank > handRank) return 1;\n if (thisRank < handRank) return -1;\n\n if( thisRank == 4 || thisRank == 7){\n if( getTripleIndex() > hand.getTripleIndex()) return 1;\n if( getTripleIndex() < hand.getTripleIndex()) return -1;\n }\n if( thisRank == 8){\n if( getSameValueCardOf4Index() > hand.getSameValueCardOf4Index()) return 1;\n if( getSameValueCardOf4Index() < hand.getSameValueCardOf4Index()) return -1;\n }\n if( thisRank == 7 || thisRank == 3 || thisRank == 2){\n int[] indexOfPair = getPairsIndexArray();\n int[] indexOfPair2 = hand.getPairsIndexArray();\n int pairOfIndexValue = indexOfPair[0] * 100 + indexOfPair[1];\n int pairOfIndexValue2 = indexOfPair2[0] * 100 + indexOfPair2[1];\n if( pairOfIndexValue > pairOfIndexValue2) return 1;\n if( pairOfIndexValue < pairOfIndexValue2) return -1;\n }\n return CardOperations.compareTwoArrays(getCardValuesInHand(), hand.getCardValuesInHand());\n }", "public int bestRank() {\n\t\treturn this.decade(this.indexOfBestDecade());\n\t}", "public int getBestScore() {\n\t\tInteger score = this.hand.countValue().lower(22);\n\t\tif(score!=null) {\n\t\t\treturn score;\n\t\t}\n\t\telse {\n\t\t\treturn this.hand.countValue().higher(21);\n\t\t}\n\t}", "public String getSuit()\n {\n\t// Local constants\n\n\t// Local variables\n\n\t/************** Start getSuit Method *****************/\n\n\t// Return suit of card\n return suit;\n\n }", "public int getRank(){\r\n\t\tif(this.rank.equals(RANKS[0])){ return -1; } // \"no card\"\r\n\t\treturn rankValue.get(this.rank);\r\n\t}", "public int getSuit() {\r\n return suit;\r\n }", "public int getSuit() {\n\t\treturn suit;\n\t}", "public int getSuit() {\n return suit;\n }", "public int getSuit() {\n return suit;\n }", "public int getSuit()\n {\n return suit;\n }", "private int GetBestCard(Card[] card) {\n\t int iPos = 0;\n\t int iWeightTemp = 0;\n\t int iWeight[] = new int[8];\n\t for (int i = 0; i < 8; i++){\n\t\t iWeight[i] = -1;\n\t }\n\t // For each selectable card, work out a weight, the highest weight is the one selected.\n\t // The weight is worked out by the distance another of the players cards is from playable ones, with no playable cards in between\n\t Card myCard, nextCard;\n\t for (int i = 0; i < 8; i++){\n\t\t if (card[i] != null){\n\t\t\t // if card value > 7\n\t\t\t if (card[i].GetValue() > 7){\n\t\t\t\t // do you have cards that are higher than this card\n\t\t\t\t myCard = card[i];\n\t\t\t\t iWeightTemp = 0;\n\t\t\t \tfor (int j = 0; j < mCardCount; j++){\n\t\t\t \t\tnextCard = mCard[j];\n\t\t\t \t\tif (nextCard != null && nextCard.GetSuit() == myCard.GetSuit() && nextCard.GetValue() > myCard.GetValue()){\n\t\t\t \t\t\tif (nextCard.GetValue() - myCard.GetValue() > iWeightTemp)\n\t\t\t \t\t\t\tiWeightTemp = nextCard.GetValue() - myCard.GetValue();\n\t\t\t \t\t\tmyCard = nextCard;\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t \tiWeight[i] = iWeightTemp;\n\t\t\t \t\t\n\t\t\t }\n\t\t\t if (card[i].GetValue() < 7){\n\t\t\t\t // do you have cards that are lower than this card\n\t\t\t\t myCard = card[i];\n\t\t\t\t iWeightTemp = 0;\n\t\t\t \tfor (int j = mCardCount-1; j >=0; j--){\n\t\t\t \t\tnextCard = mCard[j];\n\t\t\t \t\tif (nextCard != null && nextCard.GetSuit() == myCard.GetSuit() && nextCard.GetValue() < myCard.GetValue()){\n\t\t\t \t\t\tif (myCard.GetValue() - nextCard.GetValue() > iWeightTemp)\n\t\t\t \t\t\t\tiWeightTemp = myCard.GetValue() - nextCard.GetValue();\n\t\t\t \t\t\tmyCard = nextCard;\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t \tiWeight[i] = iWeightTemp;\n\t\t\t \t\t\n\t\t\t }\t\n\t\t\t if (card[i].GetValue() == 7){\n\t\t\t\t // do you have cards that are in this suit\n\t\t\t\t myCard = card[i];\n\t\t\t\t int iWeightTemp1;\n\t\t\t\t iWeightTemp = 0;\n\t\t\t\t iWeightTemp1 = 0;\n\t\t\t\t // do you have cards that are higher than this card\n\t\t\t \tfor (int j = 0; j < mCardCount; j++){\n\t\t\t \t\tnextCard = mCard[j];\n\t\t\t \t\tif (nextCard != null && nextCard.GetSuit() == myCard.GetSuit() && nextCard.GetValue() > myCard.GetValue()){\n\t\t\t \t\t\tif (nextCard.GetValue() - myCard.GetValue() > iWeightTemp)\n\t\t\t \t\t\t\tiWeightTemp = nextCard.GetValue() - myCard.GetValue();\n\t\t\t \t\t\tmyCard = nextCard;\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t \tmyCard = card[i];\n\t\t\t \t// do you have cards that are lower than this card\n\t\t\t \tfor (int j = mCardCount-1; j >=0; j--){\n\t\t\t \t\tnextCard = mCard[j];\n\t\t\t \t\tif (nextCard != null && nextCard.GetSuit() == myCard.GetSuit() && nextCard.GetValue() < myCard.GetValue()){\n\t\t\t \t\t\tif (myCard.GetValue() - nextCard.GetValue() > iWeightTemp1)\n\t\t\t \t\t\t\tiWeightTemp1 = myCard.GetValue() - nextCard.GetValue();\n\t\t\t \t\t\tmyCard = nextCard;\n\t\t\t \t\t}\n\t\t\t \t} \t\n\t\t\t \tiWeight[i] = iWeightTemp + iWeightTemp1;\n\t\t\t \t\t\n\t\t\t }\t\t\t \n\t\t }\n\t\t \t \n\t }\n\t boolean bLoopAceKing = true;\n\t int iMaxTemp = 0;\n\t int iMaxCount = 0;\t\n\t int[] iMaxs;\n\t iMaxs = new int[8];\n\t while (bLoopAceKing){\n\t\t for (int i = 0; i < 8; i++){\n\t\t\t if (iWeight[i] >= iMaxTemp){\n\t\t\t\t if (iWeight[i] == iMaxTemp){\n\t\t\t\t\t iMaxs[iMaxCount] = i;\n\t\t\t\t\t iMaxCount++;\n\t\t\t\t }\n\t\t\t\t else {\n\t\t\t\t\t iMaxTemp = iWeight[i];\n\t\t\t\t\t iMaxs = new int[8];\n\t\t\t\t\t iMaxCount = 0;\n\t\t\t\t\t iMaxs[iMaxCount] = i;\n\t\t\t\t\t iMaxCount++;\n\t\t\t\t }\t\t\t \n\t\t\t }\t \n\t\t }\n\t\t boolean bAceKing = false;\n\t\t // If the top weight is zero, meaning your options don't help you, then play the one that is closest to ace/king\n\t\t if (iMaxTemp == 0 && iMaxCount > 1){\n\t\t\t for (int k = 0; k < iMaxCount; k++){\n\t\t\t\t\t iWeight[iMaxs[k]] = Math.abs(card[iMaxs[k]].GetValue()-7);\n\t\t\t\t\t bAceKing = true;\t\t\t\t \n\t\t\t } \t\t \n\t\t }\n\t\t if (bAceKing){\n\t\t\t bLoopAceKing = true;\n\t\t\t iMaxs = new int[8];\n\t\t\t iMaxTemp = 0;\n\t\t\t iMaxCount = 0;\t\t\t \n\t\t }\n\t\t else \n\t\t\t bLoopAceKing = false;\n\t }\n\t if (iMaxCount == 1)\n\t\t iPos = iMaxs[iMaxCount-1];\n\t else {\n\t\t Random generator = new Random();\n\t\t int randomIndex = generator.nextInt( iMaxCount );\n\t\t iPos = iMaxs[randomIndex];\n\t }\n\t\t \n\t return iPos;\n\t \n }", "static int getHighCardWithinHand(String[] hand) {\n\tint highCard = 1;\n\tfor (int i = 0; i < hand.length; i++) {\n\t if (getNumberOfCard(hand[i]) > highCard) {\n\t\thighCard = getNumberOfCard(hand[i]);\n\t }\n\t}\n\treturn highCard;\n }", "public int getSuit(){\n\t\treturn suit; \n\t}", "public void determineHandType(){\n \r\n if(isStraightFlush()){\r\n handType = HandType.STRAIGHT_FLUSH;\r\n }\r\n else if(isFourOfAKind()){\r\n handType = HandType.FOUR_OF_A_KIND;\r\n }\r\n else if(isFullHouse()){\r\n handType = HandType.FULL_HOUSE;\r\n }\r\n else if(isFlush()){\r\n handType = HandType.FLUSH;\r\n }\r\n else if(isStraight()){\r\n handType = HandType.STRAIGHT;\r\n }\r\n else if(isThreeOfAKind()){\r\n handType = HandType.THREE_OF_A_KIND;\r\n }\r\n else if(isTwoPairs()){\r\n handType = HandType.TWO_PAIRS;\r\n }\r\n else if(isPair()){\r\n handType = HandType.PAIR;\r\n }\r\n else{\r\n //High Card: Hands which do not fit any higher category are ranked by\r\n //the value of their highest card. If the highest cards have the same\r\n //value, the hands are ranked by the next highest, and so on.\r\n handType = HandType.HIGH_CARD;\r\n handValue = cards.get(cards.size()-1).getValue();\r\n }\r\n }", "public static int suit(int card){\n //check if card is out of bounds\n if(card < 1 || card > 52){\n return 0;\n }\n //subtract 1 from card to include multiples of 13\n //add 1 so that it matches up with the desired output\n return (card - 1) / 13 + 1;\n }", "private int highCard() {\n\t\tint highCard = 0;\n\t\tfor (int counter = 0; counter < Constants.HAND_SIZE; counter++) {\n\t\t\tif (hand[counter].getValueIndex() > highCard) {\n\t\t\t\thighCard = hand[counter].getValueIndex();\n\t\t\t}\n\t\t}\n\t\tresult.setPrimaryValuePos(highCard);\n\t\treturn highCard;\n\t}", "public int getSuit()\n {\n return suit;\n }", "private static Hand getResults() {\n System.out.println(hands.size());\n Optional<Hand> winner;\n winner = hands.stream()\n .reduce((hand1, hand2)\n -> hand1.compareTo(hand2) == 1 ? hand1 : hand2);\n Hand winningHand = null;\n if (winner.isPresent()) {\n winningHand = winner.get();\n }\n return winningHand;\n\n }", "public String suit() {\r\n return suit;\r\n }", "public int winner() {\n if(humanPlayerHits == 17) {\n return 1;\n }\n if(computerPlayerHits == 17){\n return 2;\n }\n return 0;\n }", "public int trickWinner(){\n Card.NUMBER one = player1Play.getValue();\n Card.NUMBER two = player2Play.getValue();\n Card.NUMBER three = player3Play.getValue();\n Card.NUMBER four = player4Play.getValue();\n Card.SUIT oneSuit = player1Play.getSuit();\n Card.SUIT twoSuit = player2Play.getSuit();\n Card.SUIT threeSuit = player3Play.getSuit();\n Card.SUIT fourSuit = player4Play.getSuit();\n int[] value = new int[4];\n value[0] = Card.getValsVal(one, oneSuit, currentTrumpSuit);\n value[1] = Card.getValsVal(two, twoSuit, currentTrumpSuit);\n value[2] = Card.getValsVal(three, threeSuit, currentTrumpSuit);\n value[3] = Card.getValsVal(four, fourSuit, currentTrumpSuit);\n if(player1Play.getSuit() == firstPlayedSuit && firstPlayedSuit != currentTrumpSuit && value[0] != 7){\n value[0] += 10;\n }\n if(player2Play.getSuit() == firstPlayedSuit && firstPlayedSuit != currentTrumpSuit && value[0] != 7){\n value[1] += 10;\n }\n if(player3Play.getSuit() == firstPlayedSuit && firstPlayedSuit != currentTrumpSuit && value[0] != 7){\n value[2] += 10;\n }\n if(player4Play.getSuit() == firstPlayedSuit && firstPlayedSuit != currentTrumpSuit && value[0] != 7){\n value[3] += 10;\n }\n if(player1Play.getSuit() == currentTrumpSuit || value[0] == 7){\n value[0] += 20;\n }\n if(player2Play.getSuit() == currentTrumpSuit || value[1] == 7){\n value[1] += 20;\n }\n if(player3Play.getSuit() == currentTrumpSuit || value[2] == 7){\n value[2] += 20;\n }\n if(player4Play.getSuit() == currentTrumpSuit || value[3] == 7){\n value[3] += 20;\n }\n int winner = 0;\n int winVal = 0;\n for(int i = 0; i < 4; i++){\n if(value[i] > winVal){\n winVal = value[i];\n winner = i;\n }\n }\n return winner;\n }", "public Player roundWinner() {\n\t\tfor(Player player : gamePlayers){\n\t\t\tEvaluator eval = new Evaluator(player, communityCards);\n\t\t\t\n\t\t\tplayer.setHandRank(eval.evaluate());\n\t\t\tplayersByHandRank.add(player);\n\t\t}\n\t\t\n\t\t//lambdas are magic. Sorts players from lowest to highest rank starting with the lowest at the first\n\t\t//index, and the highest at the last.\n\t\tCollections.sort(playersByHandRank, (p1, p2) -> p1.getHandRank().compareTo(p2.getHandRank()));\n\t\t\n\t\t//TODO: Needs to evaluate high card in case of two or more players have the same high hand rank.\n\t\t//the evaluate method in Evaluator sets high card == to the highest card in a pairSet, flush, or straight,\n\t\t//but needs to be able to add it in the event HIGH_CARD is the highest hand a player has.\n\n\t\treturn playersByHandRank.get(playersByHandRank.size() -1);\n\t}", "public int whoWin(){\r\n int winner = -1;\r\n \r\n int highest = 0;\r\n \r\n for(Player player : discWorld.getPlayer_HASH().values()){\r\n if(getPlayerPoints(player) > highest){\r\n highest = getPlayerPoints(player);\r\n winner = player.getID();\r\n }\r\n \r\n }\r\n \r\n return winner;\r\n }", "public int compareBySuit(Card otherCard){\n\t\tint num = 0;\n\t\tif (this.suit == otherCard.suit)\n\t\t\tnum = 0;\n\t\telse if (this.suit > otherCard.suit)\n\t\t\tnum = 1;\n\t\telse if (this.suit < otherCard.suit)\n\t\t\tnum = -1;\n\t\treturn num;\n\t}", "private int getRank(DiceModel playerToRank) {\n\t\tint rank = 1;\n\t\tint ph; // placeholder\n\t\tint d1 = playerToRank.getDie1();\n\t\tint d2 = playerToRank.getDie2();\n\t\tint d3 = playerToRank.getDie3();\n\t\t\n\t\t// sorting them in ascending order\n\t\t// switch the 2nd number into first position if it is bigger\n\t\tif (d2 > d1) {\n\t\t\tph = d1;\n\t\t\td1 = d2;\n\t\t\td2 = ph;\n\t\t} // switch the 3rd number into second position if it is bigger\n\t\tif (d3 > d2) {\n\t\t\tph = d2;\n\t\t\td2 = d3;\n\t\t\td3 = ph;\n\t\t} // switch the 2nd number into first position if it is bigger\n\t\tif (d2 > d1) {\n\t\t\tph = d1;\n\t\t\td1 = d2;\n\t\t\td2 = ph;\n\t\t}\n\t\t\n\t\t// now to get their ranking\n\t\t// check for 4,2,1\n\t\tif (d1 == 4 && d2 == 2 && d3 == 1) {\n\t\t\trank = 4;\n\t\t} else if (d1 == d2 && d1 == d3) { // checks for triples\n\t\t\trank = 3;\n\t\t} else if ((d1 == d2 && d1 != d3) || d2 == d3) { // pairs\n\t\t\trank = 2;\n\t\t} else {\n\t\t\trank = 1;\n\t\t}\n\t\t\n\t\treturn rank;\n\t}", "public int indexOfBestDecade() {\n\t\tint min = rank.get(0);\n\t\tfor(int index = 1; index < NUM_DECADES; index++) {\n\t\t\tmin = Math.min(min, rank.get(index));\n\t\t}\n\t\treturn min;\n\t}", "public static void main(String[] args) {\n\n // Variable type rank\n Rank highCard;\n Rank faceCard;\n Rank card1;\n Rank card2;\n\n // Value of card 1\n int card1Val;\n\n // Value of card 2\n int card2Val;\n\n // Assign the value to the variable\n highCard = Rank.ace;\n faceCard = Rank.jack;\n card1 = Rank.king;\n card2 = Rank.queen;\n\n // Get the ordinal value of card 1 and card 2\n card1Val = card1.ordinal();\n card2Val = card2.ordinal();\n\n // Print out the result\n System.out.println(\"A blackjack hand: \" + highCard.name() \n + \" and \" + faceCard.name());\n System.out.println();\n System.out.println(\"A two card hand: \" + card1Val + \" and \" + card2Val);\n System.out.println();\n System.out.println(\"Hand value: \" + (card1Val + card2Val));\n }", "public int handValue() {\n int handValue = 0;\n for (Card card : cards) {\n switch (((BlackjackCard)card).getRank()) {\n case TWO:\n handValue += 2;\n break;\n case THREE:\n handValue += 3;\n break;\n case FOUR:\n handValue += 4;\n break;\n case FIVE:\n handValue += 5;\n break;\n case SIX:\n handValue += 6;\n break;\n case SEVEN:\n handValue += 7;\n break;\n case EIGHT:\n handValue += 8;\n break;\n case NINE:\n handValue += 9;\n break;\n case TEN:\n handValue += 10;\n break;\n case JACK:\n handValue += 10;\n break;\n case QUEEN:\n handValue += 10;\n break;\n case KING:\n handValue += 10;\n break;\n }\n }\n\n for (int i = 0; i < aceCount; i++) {\n if (handValue < 11) {\n handValue += 11;\n } else {\n handValue += 1;\n }\n }\n\n return handValue;\n }", "public String resolvePNG(int suit, int rank) {\n String cardName = null;\n String sut = null;\n int rnk = 1;\n\n //Search through each suit and rank\n for (int s = 0; s < 4; s++) {\n for (int r = 0; r < 13; r++) {\n //When the rank and suit are found, set the corresponding variables\n if ((suit == s) && (rank == r)) {\n switch (s) {\n case 0:\n sut = \"c\";\n break;\n case 1:\n sut = \"d\";\n break;\n case 2:\n sut = \"h\";\n break;\n case 3:\n sut = \"s\";\n break;\n }\n\n rnk = r + 1;\n }\n }\n }\n\n //Assuming the suit is not empty, set it to the int, char pair\n if (sut != null)\n cardName = rnk + sut;\n\n //Return the final char/int string pair\n return cardName;\n }", "public String getSuit()\r\n\t{\r\n\t\treturn suit;\r\n\t}", "@Override\r\n public PlayingCard comparePlayingCards(PlayingCard cardOne, PlayingCard cardTwo){\r\n if(cardOne.getRank().ordinal() > cardTwo.getRank().ordinal()){\r\n return cardOne;\r\n }\r\n else if(cardTwo.getRank().ordinal() > cardOne.getRank().ordinal()){\r\n return cardTwo;\r\n }\r\n else {\r\n return null;\r\n }\r\n }", "public String toString ()\n {\n return rank + \" of \" + suit;\n }", "public int evaluate (Player p) {\r\n\t\t/* Adding players hand and the cards from the game board */\r\n\t\t\r\n\t\tfor (Card c: p.hand) {\r\n\t\t\tcards.add(c);\r\n\t\t}\r\n\t\tfor (Card c: board) {\r\n\t\t\tcards.add(c);\r\n\t\t}\r\n\t\t/*Return the value based on the card evaluated. Will check in\r\n\t\t * order to the strength of the hand starting from the \r\n\t\t * strongest hand in order to avoid overlapping between certain \r\n\t\t * hands. (Ex. Three pair includes two pair but three pair will be \r\n\t\t * checked first)*/\r\n\t\tif (hasRoyalFlush(cards)) \r\n\t\t\treturn ROYALFLUSH;\r\n\t\t else if (hasStraightFlush(cards)) \r\n\t\t\treturn STRAIGHTFLUSH;\r\n\t\t else if (hasQuads(cards)) \r\n\t\t\treturn QUADS;\r\n\t\t else if (hasFlush(cards)) \r\n\t\t\treturn FLUSH;\r\n\t\t else if (hasStraight(cards)) \r\n\t\t\treturn STRAIGHT;\r\n\t\t else if (hasSet(cards)) \r\n\t\t\treturn SET;\r\n\t\t else if (hasTwoP(cards)) \r\n\t\t\treturn TWOPAIR;\r\n\t\t else if (hasPair(cards)) \r\n\t\t\treturn PAIR;\r\n\t\t else \r\n\t\t\treturn HIGHCARD;\r\n\t\t\r\n\t}", "public static int getRankValue(String rank)\r\n\t{\n\t\tint rankValue = 0;\r\n\t\t\t\t\r\n\t\tif (rank.equals(\"J\") || rank.equals(\"Q\") || rank.equals(\"K\"))\r\n\t\t{\r\n\t\t\t// face cards have rank of 10\r\n\t\t\trankValue = 10;\r\n\t\t}\r\n\t\telse if (rank.equals(\"A\"))\r\n\t\t{\r\n\t\t\t// ace has rank of 1\r\n\t\t\trankValue = 1;\r\n\t\t}\r\n\t\telse if (rank.equals(\"2\") || rank.equals(\"3\") || rank.equals(\"4\") || \r\n\t\t\t\t rank.equals(\"5\") || rank.equals(\"6\") || rank.equals(\"7\") || \r\n\t\t\t\t rank.equals(\"8\") || rank.equals(\"9\") || rank.equals(\"10\"))\r\n\t\t{\r\n\t\t\t// all others have rank of face value\r\n\t\t\trankValue = Integer.valueOf(rank);\r\n\t\t}\r\n\r\n\t\treturn rankValue;\r\n\t}", "public int getScore(Card[] deal) {\r\n\t\t\r\n\t\t// Create a new ArrayList for the final hand\r\n\t\tArrayList<Card> finalHand = new ArrayList<Card>();\r\n\t\tfinalHand.addAll(this.cards);\r\n\t\tfinalHand.addAll(Arrays.asList(deal));\r\n\t\t// Sort the final hand\r\n\t\tCard.sortByFace(finalHand.toArray());\r\n\t\t\r\n\t\tint lastIndex = finalHand.size()-1;\r\n\t\tif (isStraight(finalHand)) {\r\n\t\t\tif (isFlush(finalHand)) {\r\n\t\t\t\tif (finalHand.get(0).getFace() == 10) {\r\n\t\t\t\t\treturn ROYAL_FLUSH + finalHand.get(0).getSuit();\r\n\t\t\t\t}\r\n\t\t\t\t// Adds score to STRAIGHT_FLUSH based on suit (14 is the highest face value))\r\n\t\t\t\treturn STRAIGHT_FLUSH + (finalHand.get(lastIndex).getSuit() *14);\r\n\t\t\t}\r\n\t\t\t// Adds score to STRAIGHT base on face value of highest card\r\n\t\t\treturn STRAIGHT + finalHand.get(lastIndex).getFace();// *finalHand.get(lastIndex).getSuit());\r\n\t\t}\r\n\r\n\t\tint count = 0;\r\n\t\t// fourOfaKind logic...\r\n\t\tMap<Integer, Integer> values = new HashMap<Integer, Integer>();\r\n\t\tint prev = 0;\r\n\t\tfor (Card card: finalHand) {\r\n\t\t\tif (values.get(card.getFace()) == null ||\r\n\t\t\t\t\tvalues.get(card.getFace()) != prev) {\r\n\t\t\t\tvalues.put(card.getFace(), 1);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tint add = values.get(card.getFace());\r\n\t\t\t\tvalues.replace(card.getFace(), add+1);\r\n\t\t\t}\r\n\t\t\tprev = values.get(card.getFace());\r\n\t\t}\r\n\t\tSystem.out.println(values);\r\n//\t\tint highest = 0;\r\n//\t\tfor (Integer card : values.values()) {\r\n//\t\t\tif (card)\r\n//\t\t}\r\n\t\treturn count;\r\n\t}", "public String getSuit()\r\n { return suit; }", "public String getSuit() {\n\t\treturn suit;\n\t}", "public String getSuit() {\n\t\treturn suit;\n\t}", "public String getSuit()\n\t{\n\t\treturn suit;\n\t}", "@Override\n void pickCard() {\n\n boolean suitFound = false; // true if player has the suit\n Card cardToBeat; // strongest card on pile\n Card pickedCard = null; // card to throw\n ArrayList<Card> cardsToChooseFrom = new ArrayList<Card>();\n char trump = pitchTable.getTrump();\n\n // find the strongest card on pile\n cardToBeat = pitchTable.getCardToBeat();\n\n // if pile is empty\n if (cardToBeat == null){\n // pick the strongest non trump card\n for (Card card : hand)\n if (card.suit != trump)\n if ((pickedCard == null) || (pickedCard.rank < card.rank))\n pickedCard = card;\n\n // if non trump card not found (means all cards are trump)\n // then pick the strongest card\n if (pickedCard == null)\n for (Card card : hand)\n if ((pickedCard == null) || (pickedCard.rank < card.rank))\n pickedCard = card;\n }\n else { // means leading suit is set already\n // check if player has suit\n for (Card card : hand) {\n if (card.suit == pitchTable.getLeadingSuit())\n suitFound = true;\n }\n\n // if player does not have suit he can play any card\n if (!suitFound)\n cardsToChooseFrom = hand;\n else // if player has suit then cardsToChooseFrom = allowed cards\n for (Card card : hand)\n if ((card.suit == pitchTable.getLeadingSuit()) ||\n card.suit == pitchTable.getTrump())\n cardsToChooseFrom.add(card);\n }\n\n // try to take the trick with the lowest winning card\n // if no winning card then throw the lowest you have\n\n // (trying to take the trick)\n // if card not picked yet\n // then find the lowest card that has the suit and is higher than cardToBeat\n if (pickedCard == null)\n for (Card card : cardsToChooseFrom)\n if ((cardToBeat.suit == card.suit) && (cardToBeat.rank < card.rank))\n if ((pickedCard == null) || (pickedCard.rank > card.rank))\n pickedCard = card;\n\n // (trying to take the trick)\n // if card not picked yet and cardToBeat is not trump\n // then find the lowest trump\n if ((pickedCard == null) && (cardToBeat.suit != trump))\n for (Card card : cardsToChooseFrom)\n if (card.suit == trump)\n if ((pickedCard == null) || (pickedCard.rank > card.rank))\n pickedCard = card;\n\n // (trying to throw the lowest)\n // if still no card picked (means player cannot take the trick)\n // then throw the lowest non trump\n if (pickedCard == null)\n for (Card card : cardsToChooseFrom)\n if (card.suit != trump)\n if ((pickedCard == null) || (pickedCard.rank > card.rank))\n pickedCard = card;\n\n // (trying to throw the lowest)\n // if still no card picked (means all allowed cards are trump)\n // then throw the lowest trump\n if (pickedCard == null)\n for (Card card : cardsToChooseFrom)\n if ((pickedCard == null) || (pickedCard.rank > card.rank))\n pickedCard = card;\n\n if (pickedCard == null)\n System.out.println(\"Error: picked card still null\");\n\n pitchTable.putOnPile(pickedCard);\n hand.remove(pickedCard);\n\n }", "@Override\r\n\tpublic float getRank() {\r\n\t\tfloat rank = 0;\r\n\t\tif( players != null && !players.isEmpty() ) {\r\n\t\t\tfloat totalAbility = 0;\r\n\t\t\tfor (Player player : players) {\r\n\t\t\t\ttotalAbility += player.getAbility();\r\n\t\t\t}\r\n\t\t\trank = totalAbility / players.size();\r\n\t\t}\r\n\t\t\r\n\t\treturn rank;\r\n\t}", "public String getSuit() {\r\n return suit;\r\n }", "public void sortBySuit() {\r\n List<Card> newHand = new ArrayList<Card>();\r\n while (hand.size() > 0) {\r\n int minPos = 0;\r\n Card minCard = hand.get(0);\r\n for (int i = 1; i < hand.size(); i++) {\r\n Card curCard = hand.get(i);\r\n if (curCard.getSuit().ordinal() < minCard.getSuit().ordinal() ||\r\n (curCard.getSuit().ordinal() == minCard.getSuit().ordinal() && curCard.getRank().ordinal() < minCard.getRank().ordinal())) {\r\n minPos = i;\r\n minCard = curCard;\r\n }\r\n }\r\n hand.remove(minPos);\r\n newHand.add(minCard);\r\n }\r\n hand = newHand;\r\n }", "public int evaluateCardScore(int score, int rank) {\n //If the card is an ace\n if (rank == 0) {\n //If the score is 11 or greater, 11 value is bad\n if (score > 10)\n return 1;\n //if the score is 10 or less, 11 will raise score close to 21\n else\n return 11;\n }\n //Card is a court it is worth 10\n else if (rank > 9)\n return 10;\n //Any other card is worth its rank+1\n else\n return rank + 1;\n }", "public Integer suitedCards(Card[] hand, Integer minNum){\n\t\tInteger[] suits = {0,0,0,0};\n\t\tInteger retVal = 1;\n\t\tfor (int i = 0; i < hand.length; i++) {\n\t\t\tsuits[hand[i].getSuit()-1]++;\n\t\t}\n\t\tInteger max = suits[0];\n\t\tfor (int i = 1; i < 4; i++){\n\t\t\tmax = Math.max(max, suits[i]);\n\t\t\tif (max == suits[i]) {\n\t\t\t\tretVal = i + 1;\n\t\t\t}\n\t\t}\n\t\tif (max >= minNum) {\n\t\t\treturn retVal;\n\t\t}\n\t\treturn 0;\n\t}", "public String getSuit()\r\n {\r\n return suit;\r\n }", "public String getSuit() {\n return suit;\n }", "@Test\n public void testGetMyBestRank() {\n int result1 = this.scoreBoard.getMyBestRank(new Record(4, 5, \"@u1\", \"ST\"));\n assertEquals(1, result1);\n int result2 = this.scoreBoard.getMyBestRank(new Record(3, 15, \"@u3\", \"ST\"));\n assertEquals(3, result2);\n\n }", "public static int scoreHand( Hand scoredHand, Hand otherHand ){\n int score = 0;\n for (int i = 0; i < scoredHand.getHandSize(); i++) {\n if (scoredHand.getCardAt(i).getRank()== 1) {\n score += 15;\n } else if (scoredHand.getCardAt(i).getRank() >= 11\n && scoredHand.countInHand(scoredHand.getCardAt(i).getSuit()) > 2) {\n score += 10;\n } else if (scoredHand.getCardAt(i).getRank() >= 6\n && scoredHand.getCardAt(i).getRank() <= 10\n && (scoredHand.countInHand(scoredHand.getCardAt(i).getRank() + 1) >= 1\n || scoredHand.countInHand(scoredHand.getCardAt(i).getRank() - 1) >= 1)) {\n score += 8;\n } else if (scoredHand.getCardAt(i).getRank() >= 2\n && scoredHand.getCardAt(i).getRank() <= 5\n && otherHand.countOfFaceCards() >= 1) {\n score += 7;\n }\n } return score;\n }", "public Card takeTurn(Suit suit, int rank) throws InvalidCardException {\n //display current hand and prompt the user to input a card to play\n Scanner scanner = new Scanner(System.in);\n while(true) {\n System.out.println(name+\"'s turn\");\n System.out.println(\"Your current hand is:\");\n System.out.print(\"[\"+hand.getCards().get(0));\n for(int i=1; i<hand.getCards().size(); i++) {\n System.out.print(\", \"+hand.getCards().get(i));\n }\n System.out.println(\"]\");\n System.out.println(\"Which card do you want to play?\");\n //read the user's input and make sure it's a valid card\n String input = scanner.next();\n //if the user entered nothing, they draw by default\n if(input.equals(\"none\")) {\n return null;\n }\n Suit inputSuit = null;\n switch(input.substring(input.length()-1).toLowerCase()) {\n case \"c\":\n inputSuit = Suit.CLUBS;\n break;\n case \"s\":\n inputSuit = Suit.SPADES;\n break;\n case \"h\":\n inputSuit = Suit.HEARTS;\n break;\n case \"d\":\n inputSuit = Suit.DIAMONDS;\n break;\n default:\n throw new InvalidCardException(\"Invalid suit\");\n }\n int inputRank = Integer.parseInt(input.substring(0,input.length()-1));\n if(inputRank < 1 || inputRank > 13) {\n throw new InvalidCardException(\"Invalid rank\");\n }\n //if the card is playable and the player has it in their hand, then play it\n if(inputSuit.equals(suit) || inputRank == rank) {\n ArrayList<Card> cards = hand.getCards();\n Card card = new Card(inputSuit, inputRank);\n for(int i=0; i<cards.size(); i++) {\n if(cards.get(i).equals(card)) {\n return hand.draw(input);\n }\n }\n System.out.println(\"You do not have that card\");\n } else if(hand.getCards().contains(new Card(inputSuit, inputRank)) && inputRank == 8) { //this makes 8s always playable\n return hand.draw(input);\n } else {\n System.out.println(\"Invalid card. Try again\");\n }\n }\n }", "public int bestPlay() {\n for (int i = 0; i < hand.size(); i++) {\n if (canBuild(hand.get(i))) {\n return i;\n }\n }\n\n return -1;\n }", "public int evaluateWinner() {\n int winner = -1; //-1 house, 0 tie, 1 player\n boolean playerBlackjack = false;\n\n //Player got winnable score\n if (playerScore <= 21) {\n\n //Dealer got a winnable score\n if (dealerScore <= 21) {\n\n //Dealer got blackjack\n if (dealerScore == 21) {\n //Player also got blackjack, tie\n if (playerScore == 21) {\n winner = 0;\n }\n //Player did not have blackjack, loses\n else {\n winner = -1;\n }\n }\n //Player got blackjack, but dealer did not\n else if (playerScore == 21) {\n playerBlackjack = true;\n winner = 1;\n }\n //Tie\n else if (dealerScore == playerScore) {\n winner = 0;\n }\n //Player scored higher than dealer, but did not get blackjack\n else if (playerScore > dealerScore) {\n winner = 1;\n }\n }\n //Dealer went over 21\n else {\n //If player got blackjack\n if (playerScore == 21) {\n playerBlackjack = true;\n }\n\n winner = 1;\n }\n }\n\n //House won\n if (winner == -1) {\n if (playerCash <= 0)\n restartGame();\n else\n return winner;\n }\n //Tie\n else if (winner == 0) {\n playerCash += playerBet;\n return winner;\n }\n //Player won\n else {\n if (playerBlackjack) {\n //Player won, give back original bet AND blackjack earnings\n playerCash += (playerBet + (playerBet * 1.5));\n } else {\n //Player won, give back bet AND earnings\n playerCash += (playerBet + playerBet);\n }\n\n return winner;\n }\n\n return winner;\n }", "public void updateStats(Player currHand, int handType, int numWinners) {\n\t\tInteger topRank;\n\t\tInteger btmRank;\n\t\tDouble handBet = currHand.getBet();\n\t\tif (currHand.getCard1().getRank() == 1 || currHand.getCard2().getRank() == 1) {\n\t\t\ttopRank = 14;\n\t\t\tbtmRank = Math.max(currHand.getCard1().getRank(), currHand.getCard2().getRank());\n\t\t\tif (btmRank == 1) {\n\t\t\t\tbtmRank = 14;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif (currHand.getCard1().getRank() <= currHand.getCard2().getRank()) {\n\t\t\t\ttopRank = currHand.getCard2().getRank();\n\t\t\t\tbtmRank = currHand.getCard1().getRank();\n\t\t\t}\n\t\t\telse {\n\t\t\t\ttopRank = currHand.getCard1().getRank();\n\t\t\t\tbtmRank = currHand.getCard2().getRank();\n\t\t\t}\n\t\t}\n\t\tif (topRank == btmRank) { //pocket pair\n\t\t\tif (topRank == 14) {\n\t\t\t\tif (handType == 0) {\n\t\t\t\t\tif (currBet <= handBet) {\n\t\t\t\t\t\tpocketHands[168]++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse winningPocketHands[168] += 1./numWinners;\n\t\t\t\t//System.out.println(\"index: \" + 168);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (handType == 0) {\n\t\t\t\t\tif (currBet <= handBet) {\n\t\t\t\t\t\tpocketHands[154 + topRank]++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse winningPocketHands[154 + topRank] += 1./numWinners;\n\t\t\t\t//System.out.println(\"index: \" + (154 + topRank));\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tint index = -1;\n\t\t\tfor (int j = 1; j < topRank-2; j++) {\n\t\t\t\tindex += j;\n\t\t\t}\n\t\t\tindex += btmRank-1;\n\t\t\tindex *= 2;\n\t\t\tif (currHand.getCard1().getSuit() == currHand.getCard2().getSuit()) {\n\t\t\t\tindex++;\n\t\t\t}\n\t\t\tif (handType == 0) {\n\t\t\t\tif (currBet <= handBet) {\n\t\t\t\t\tpocketHands[index]++;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse winningPocketHands[index] += 1./numWinners;\n\t\t\t//System.out.println(\"index: \" + index);\n\t\t}\n\t\t//currHand.getCard1().printCard();\n\t\t//currHand.getCard2().printCard();\n\n\t}", "public static Player whoWonGame() {\r\n\t\tint highest = Main.winScoreNumb;\r\n\t\tPlayer winner = null;\r\n\t\t\r\n\t\t//Three handed play.\r\n\t\tif (Main.isThreeHanded){\r\n\t\t\tif (Utils.stringToInt(Main.player1Score) >= highest) {\r\n\t\t\t\thighest = Utils.stringToInt(Main.player1Score);\r\n\t\t\t\twinner = Main.playerOne;\r\n\t\t\t}\r\n\t\t\tif (Utils.stringToInt(Main.player2Score) >= highest) {\r\n\t\t\t\thighest = Utils.stringToInt(Main.player2Score);\r\n\t\t\t\twinner = Main.playerTwo;\r\n\t\t\t}\r\n\t\t\tif (Utils.stringToInt(Main.player3Score) >= highest) {\r\n\t\t\t\thighest = Utils.stringToInt(Main.player3Score);\r\n\t\t\t\twinner = Main.playerThree;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Four handed play with no teams.\r\n\t\tif (Main.isFourHandedSingle){\r\n\t\t\tif (Utils.stringToInt(Main.player1Score) >= highest) {\r\n\t\t\t\thighest = Utils.stringToInt(Main.player1Score);\r\n\t\t\t\twinner = Main.playerOne;\r\n\t\t\t}\r\n\t\t\tif (Utils.stringToInt(Main.player2Score) >= highest) {\r\n\t\t\t\thighest = Utils.stringToInt(Main.player2Score);\r\n\t\t\t\twinner = Main.playerTwo;\r\n\t\t\t}\r\n\t\t\tif (Utils.stringToInt(Main.player3Score) >= highest) {\r\n\t\t\t\thighest = Utils.stringToInt(Main.player3Score);\r\n\t\t\t\twinner = Main.playerThree;\r\n\t\t\t}\r\n\t\t\tif (Utils.stringToInt(Main.player4Score) >= highest) {\r\n\t\t\t\thighest = Utils.stringToInt(Main.player4Score);\r\n\t\t\t\twinner = Main.playerFour;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn winner;\r\n\t}", "@Test\n public void fiveRankHandChooserHighCardTest() {\n PokerHand hand = new PokerHand();\n hand.addCard(new Card(Card.Rank.ACE, Card.Suit.HEARTS));\n hand.addCard(new Card(Card.Rank.QUEEN, Card.Suit.HEARTS));\n hand.addCard(new Card(Card.Rank.EIGHT, Card.Suit.SPADES));\n hand.addCard(new Card(Card.Rank.SIX, Card.Suit.HEARTS));\n hand.addCard(new Card(Card.Rank.TEN, Card.Suit.DIAMONDS));\n\n PokerHand.HandType result = hand.fiveRankHandChooser();\n\n Assert.assertTrue(result == PokerHand.HandType.HIGHCARD);\n }", "public int compareSuits(Card anotherCard) {\n\t\treturn getSuit().compareTo(anotherCard.getSuit());\n\t}", "public int determineHighestVal() {\n if (playerCards[0].value > playerCards[1].value) {\n return playerCards[0].value;\n }\n return playerCards[1].value;\n\n }", "private Player compareTopCards() {\n // COMPARE CARDS\n int bestValue = activePlayer.getTopMostCard().getCardPropertyValue(activeCategory);\n // assume activePlayer will win the round and then test if this is true\n // if no other card beats or equals the ActivePlayer's card\n // the activePlayer will be returned as the winner\n Player currentWinner = activePlayer;\n for (Player player : players) {\n // if not the active player\n if (!(player == activePlayer)) {\n // check specific player value for the active category\n int value = player.getTopMostCard().getCardPropertyValue(activeCategory);\n if (bestValue < value) {\n bestValue = value;\n currentWinner = player;\n }\n // if value matches top value then there is a tie\n else if (bestValue == value) {\n currentWinner = null;\n }\n }\n }\n return currentWinner;\n }", "public int getSuitInt() {\n return this.suit;\n }", "public int getIdeaRanked(int rank) {\n\t\tif (rank < 1 || rank > NUM_RANKED)\n\t\t\tthrow new IllegalArgumentException(\"Invalid idea rank: \" + rank);\n\t\treturn topIdeas[rank - 1];\n\t}", "public static void main(String[] args) {\r\n \r\n //Check the input of cards should be multiple of 5 and more than 0\r\n if (args.length % 5 == 0 && args.length > 0) {\r\n \r\n int player = args.length / N; //count the player based on input\r\n int playerNo; //store the number of player for print\r\n int countCard = args.length; //count the number of card \r\n\r\n Suit[] CardSuit = new Suit[countCard]; //store the suit of cards\r\n Rank[] CardRank = new Rank[countCard]; //store the rank of cards\r\n Card[] card = new Card[countCard]; //store all cards\r\n Card[] cardinhand = new Card[N]; //store cards in one hand\r\n PokerHand[] hand = new PokerHand[player]; //store all players' hands\r\n \r\n //Deal with print of players draw\r\n int[] drawPlayer = new int[player]; //store draw players number \r\n /*set default value in the array as bigger than the number of player, \r\n so that will be sorted to the last if not updated*/\r\n Arrays.fill(drawPlayer, player + 1); \r\n int countDraw = 0; //count the number of draw players\r\n \r\n //Get the input: rank of the card\r\n for (int i = 0; i < countCard; i++) {\r\n switch (args[i].charAt(0)) {\r\n case ('2'):\r\n CardRank[i] = Rank.TWO;\r\n break;\r\n case ('3'):\r\n CardRank[i] = Rank.THREE;\r\n break;\r\n case ('4'):\r\n CardRank[i] = Rank.FOUR;\r\n break;\r\n case ('5'):\r\n CardRank[i] = Rank.FIVE;\r\n break;\r\n case ('6'):\r\n CardRank[i] = Rank.SIX;\r\n break;\r\n case ('7'):\r\n CardRank[i] = Rank.SEVEN;\r\n break;\r\n case ('8'):\r\n CardRank[i] = Rank.EIGHT;\r\n break;\r\n case ('9'):\r\n CardRank[i] = Rank.NINE;\r\n break;\r\n case ('T'):\r\n case ('t'):\r\n CardRank[i] = Rank.TEN;\r\n break;\r\n case ('J'):\r\n case ('j'):\r\n CardRank[i] = Rank.JACK;\r\n break;\r\n case ('Q'):\r\n case ('q'):\r\n CardRank[i] = Rank.QUEEN;\r\n break;\r\n case ('K'):\r\n case ('k'):\r\n CardRank[i] = Rank.KING;\r\n break;\r\n case ('A'):\r\n case ('a'):\r\n CardRank[i] = Rank.ACE;\r\n break;\r\n default:\r\n System.out.println\r\n (\"Error: invalid card name '\" + args[i] + \"'\");\r\n System.exit(i);\r\n break;\r\n }\r\n //Get the input: suit of the card\r\n switch (args[i].charAt(1)) {\r\n case ('C'):\r\n case ('c'):\r\n CardSuit[i] = Suit.Clubs;\r\n break;\r\n case ('D'):\r\n case ('d'):\r\n CardSuit[i] = Suit.Diamonds;\r\n break;\r\n case ('H'):\r\n case ('h'):\r\n CardSuit[i] = Suit.Hearts;\r\n break;\r\n case ('S'):\r\n case ('s'):\r\n CardSuit[i] = Suit.Spades;\r\n break;\r\n default:\r\n System.out.println\r\n (\"Error: invalid card name '\" + args[i] + \"'\");\r\n System.exit(i);\r\n break;\r\n }\r\n //Set all cards in the array\r\n card[i] = new Card(CardRank[i], CardSuit[i]);\r\n }\r\n\r\n //Use all cards to set cards for each player\r\n for (int i = 0; i < player; i++) {\r\n for (int j = 0; j < N; j++) {\r\n cardinhand[j] = card[i * 5 + j];\r\n }\r\n playerNo = i + 1;\r\n //Set cards and player number of each hand\r\n hand[i] = new PokerHand(cardinhand, playerNo);\r\n System.out.print(\"Player \" + playerNo + \": \");\r\n //Find the classification of each hand and print\r\n switch (hand[i].FindClass()) {\r\n case Straight_flush:\r\n System.out.println\r\n (hand[i].getR1().getRankName() + \"-high straight flush\");\r\n break;\r\n case Four_of_a_kind:\r\n System.out.println\r\n (\"Four \" + hand[i].getR1().getRankName() + \"s\");\r\n break;\r\n case Full_house:\r\n System.out.println\r\n (hand[i].getR1().getRankName() + \"s full of \" + \r\n hand[i].getR2().getRankName() + \"s\");\r\n break;\r\n case Flush:\r\n System.out.println\r\n (hand[i].getR1().getRankName() + \"-high flush\");\r\n break;\r\n case Straight:\r\n System.out.println\r\n (hand[i].getR1().getRankName() + \"-high straight\");\r\n break;\r\n case Three_of_a_kind:\r\n System.out.println\r\n (\"Three \" + hand[i].getR1().getRankName() + \"s\");\r\n break;\r\n case Two_pair:\r\n System.out.println\r\n (hand[i].getR1().getRankName() + \"s over \" + \r\n hand[i].getR2().getRankName() + \"s\");\r\n break;\r\n case One_pair:\r\n System.out.println\r\n (\"Pair of \" + hand[i].getR2().getRankName() + \"s\");\r\n break;\r\n case High_cards:\r\n System.out.println\r\n (hand[i].getR1().getRankName() + \"-high\");\r\n break;\r\n }\r\n }\r\n\r\n Arrays.sort(hand);//sort the comparable object hand\r\n\r\n // Find the player number that draw with the highest hand player\r\n for (int i = player - 2; i >= 0; i--) {\r\n if (hand[player - 1].compareTo(hand[i]) == 0) {\r\n drawPlayer[countDraw] = hand[i].getPlayerNo();\r\n countDraw++; // count the number of draw players\r\n }\r\n }\r\n\r\n Arrays.sort(drawPlayer); // ascending sort the player number \r\n //print result after compare and sort\r\n if (player > 1) {\r\n if (countDraw > 1)\r\n\r\n {\r\n System.out.print(\"Players \");\r\n for (int i = 0; i < countDraw - 1; i++) {\r\n System.out.print(drawPlayer[i] + \", \");\r\n }\r\n System.out.println(\r\n hand[player - 2].getPlayerNo() + \" and \" + \r\n hand[player - 1].getPlayerNo() + \" draw.\");\r\n } else if (countDraw == 1)\r\n System.out.println\r\n (\"Players \" + hand[player - 2].getPlayerNo() + \r\n \" and \"+ hand[player - 1].getPlayerNo() + \" draw.\");\r\n else\r\n System.out.println\r\n (\"Player \" + hand[player - 1].getPlayerNo() + \" wins.\");\r\n }\r\n } else\r\n System.out.println\r\n (\"Error: wrong number of arguments; must be a multiple of 5\");\r\n System.exit(args.length);\r\n }", "public int getSuit() {\n return this.suit;\n }", "public static int resultBlackjack()\n\t{\n\t\t//return 0 for no black jack, return 1 for player blackjack, return for dealer blackjack, return 3 for double blackjack\n\t\tboolean player =isBlackjack(playersCards),dealer=isBlackjack(dealersCards);\n\t\tif(!player && !dealer)\n\t\t\treturn 0;\n\t\telse if(player && !dealer)\n\t\t\treturn 1;\n\t\telse if(!player && dealer)\n\t\t\treturn 2;\n\t\telse\n\t\t\treturn 3;\n\t}", "public static int getStrategyChoice() {\r\n\t\tint strategy = -1;\r\n\t\tgetStrategyScanner = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Choose the strategy of your opponent:\" +\r\n\t\t\t\t\"\\n\\t(\" + RANDOM + \") - Random player\" +\r\n\t\t\t\t\"\\n\\t(\" + DEFENSIVE + \") - Defensive player\" +\r\n\t\t\t\t\"\\n\\t(\" + SIDES + \") - To-the-Sides player player\");\r\n\t\twhile (strategy != RANDOM & strategy != DEFENSIVE\r\n\t\t\t\t& strategy != SIDES) {\r\n\t\t\tstrategy=getStrategyScanner.nextInt();\r\n\t\t}\r\n\t\treturn strategy;\r\n\t}", "void showRanking(String winner, String rank);", "private int getHeuristic(Player player) {\n int whitePieces = 0;\n int blackPieces = 0;\n\n for (int r = 0; r < Board.MAX_ROW; r++) {\n for (int c = 0; c < Board.MAX_COLUMN; c++) {\n if (boardObject.getSlot(r, c).getColor() == Slot.WHITE) {\n whitePieces++;\n } else if (boardObject.getSlot(r, c).getColor() == Slot.BLACK) {\n blackPieces++;\n }\n }\n }\n\n if (player.equals(playerBlack)) {\n return blackPieces - whitePieces;\n } else {\n return whitePieces - blackPieces;\n }\n }", "boolean haveHigh(char suit){\n for (int i=0; i<6; i++)\n if ((hand.get(i).suit == suit) && (hand.get(i).rank > (6 + pitchTable.getNumPlayers())))\n return true;\n return false;\n }", "public Rank rank(){\n return PackedCard.rank(this.nbCard);\n }", "public int compareTo(Card card) {\n\t\tint thisRank = this.rank;\n\t\tint cardRank = card.rank;\n\n\t\tif(thisRank == 0 || thisRank == 1) \n\t\t\tthisRank +=13;\n\t\tif(cardRank == 0 || cardRank == 1) \n\t\t\tcardRank+=13;\n\t\tif(thisRank < cardRank)\n\t\t\treturn -1;\n\t\telse if(thisRank > cardRank)\n\t\t\treturn 1;\n\t\telse {\n\t\t\tif(this.getSuit() > card.getSuit())\n\t\t\t\treturn 1;\n\t\t\telse if(this.getSuit() < card.getSuit())\n\t\t\t\treturn -1;\n\t\t\telse \n\t\t\t\treturn 0;\n\t\t}\n\t}", "public String playTexasHoldEm() throws IOException {\n\n StringBuffer buffer = new StringBuffer();\n String input = FileReaderUtil.readInputFile();\n\n List<String> players = new ArrayList<>();\n List<Hand> hands = new ArrayList<>();\n Set<Integer> winners = new HashSet<>();\n String[] lines = input.split(\"\\n\");\n\n Hand highestHand = null;\n String[] highestCards = null;\n int highest = -1;\n int index = 0;\n\n for (String line : lines) {\n\n String[] cards = line.toUpperCase().split(\" \");\n players.add(line);\n\n if (cards.length == 7) {\n // Played until the end.\n Hand currHand = determineHand(cards);\n hands.add(currHand);\n\n if (highestHand == null) {\n highestHand = currHand;\n highest = index;\n highestCards = cards;\n\n winners.add(index);\n } else if (currHand.rank > highestHand.rank) {\n winners.clear();\n winners.add(index);\n\n highestHand = currHand;\n highest = index;\n highestCards = cards;\n } else if (currHand.rank == highestHand.rank) {\n\n int compare = breakTie(cards, highestCards);\n if (compare == 0) {\n // tied\n winners.add(highest);\n winners.add(index);\n } else if (compare < 0) {\n // current card wins\n winners.clear();\n winners.add(index);\n highest = index;\n highestCards = cards;\n }\n }\n } else {\n hands.add(null);\n }\n\n index++;\n }\n\n for (int i = 0; i < players.size(); i++) {\n String player = lines[i];\n Hand hand = hands.get(i);\n\n buffer.append(player);\n\n if (hand != null) {\n buffer.append(\" \").append(WordUtils.capitalizeFully(hand.formatted));\n }\n\n if (winners.contains(i)) {\n buffer.append(\" \").append(\"(winner)\");\n }\n\n buffer.append(\"\\n\");\n }\n\n return buffer.toString().trim();\n }", "@Override\r\n\tpublic int handRankIndex(int Rank[]) {\r\n\t\tint hRank[] = new int[] { Rank[0], Rank[1] };\r\n\t\tint bRank[] = new int[] { Rank[2], Rank[3], Rank[4], Rank[5] };\r\n\r\n\t\tint hridx = holeRankIndex(hRank);\r\n\t\tint bridx = boardRankIndex(bRank);\r\n\r\n\t\treturn bridx * 91 + hridx;\r\n\t}", "public int getSuit() {\n\t\tif (!this.isCard()) {\n\t\t\tSystem.out.println(\"Error! \" + id + \" isn't a card!\");\n\t\t\treturn 0;\n\t\t} else if (id < 14)\n\t\t\treturn 1;\n\t\telse if (id >= 14 && id < 27)\n\t\t\treturn 2;\n\t\telse if (id >= 27 && id < 40)\n\t\t\treturn 3;\n\t\telse\n\t\t\treturn 4;\n\t}", "@Override\n public int guessCardValue(Player p) {\n return Card.PRINCESS;\n }", "public Player winner() {\n Player result = null;\n boolean humanResult = board.fiveInARow(humanPlayer.getPiece());\n boolean player2Result = board.fiveInARow(aiPlayer.getPiece());\n if(humanResult && player2Result) {\n result = new Player(\"Tie\", 'T');\n } else if (humanResult && !player2Result) {\n result = humanPlayer;\n } else if (!humanResult && player2Result) {\n result = aiPlayer;\n }\n return result;\n }", "public int compareByRank(Card otherCard){\n\t\tint num = 0;\n\t\tif (this.rank == otherCard.rank)\n\t\t\tnum = 0;\n\t\telse if (this.rank > otherCard.rank)\n\t\t\tnum = 1;\n\t\telse if (this.rank < otherCard.rank)\n\t\t\tnum = -1;\n\t\treturn num;\n\t}", "public char findWinner() {\n char[] winners = {\n checkRowVictory(getTopRow()),\n checkRowVictory(getMidRow()),\n checkRowVictory(getLowRow()),\n checkRowVictory(getVerticalMidRow()),\n checkRowVictory(getVerticalLeftRow()),\n checkRowVictory(getVerticalRightRow()),\n checkDiagonalVictory()\n };\n\n for (char winner : winners) {\n if (winner != 0) {\n return winner;\n }\n }\n\n return 0;\n }", "private int getGlobalRanking() {\n\t\tint globalRanking = 0;\n\t\ttry{\n\t\t\t//Retrieve list of all players and order them by global score\n\t\t\tArrayList<Player> allPlayers = dc.getAllPlayerObjects();\n\t\t\tCollections.sort(allPlayers, new Comparator<Player>(){\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic int compare(Player p1, Player p2) {\n\t\t\t\t\treturn p2.getGlobalScore() - p1.getGlobalScore();\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\n\t\t\t//Search for the user in the ordered list\n\t\t\tglobalRanking = allPlayers.indexOf(dc.getCurrentPlayer()) +1;\n\n\t\t} catch(DatabaseException e) {\n\t\t\tactivity.showNegativeDialog(\"Error\", e.prettyPrint(), \"OK\");\n\t\t}\n\t\treturn globalRanking;\n\t}", "public Rank getRank() {\n return cardRank;\n }", "public int getHandValue() {\n\t\tint value = 0;\n\t\tint aces = 0;\n\t\tfor (Card card : cardHand) {\n\t\t\t// convert suits to 10\n\t\t\tif (card.getValue() > 10) {\n\t\t\t\tvalue += 10;\n\t\t\t} else if (card.getValue() == 1) {\n\t\t\t\taces++;\n\t\t\t} else {\n\t\t\t\tvalue += card.getValue();\n\t\t\t}\n\t\t}\n\t\tvalue += calculateAce(value, aces);\n\n\t\treturn value;\n\t}", "public Suits getSuit() {\n\t\treturn suit;\n\t}", "public int suitNum() {\r\n return this.i;\r\n }", "int getRanking();", "public int getRank(){\n\t\tswitch(getTkn()){\n\t\t\tcase Not:\n\t\t\treturn 7;\n\t\t\t\n\t\t\tcase Kali:\n\t\t\tcase Bagi:\n\t\t\tcase Mod:\n\t\t\tcase Div:\n\t\t\treturn 6;\n\t\t\t\n\t\t\tcase Tambah:\n\t\t\tcase Kurang:\n\t\t\treturn 5;\n\t\t\t\n\t\t\tcase KurangDari:\n\t\t\tcase LebihDari:\n\t\t\tcase KurangDariSamaDengan:\n\t\t\tcase LebihDariSamaDengan:\n\t\t\treturn 4;\n\t\t\t\t\t\t\n\t\t\tcase SamaDengan:\n\t\t\tcase TidakSamaDengan:\n\t\t\treturn 3;\n\t\t\t\n\t\t\tcase And:\n\t\t\treturn 2;\n\t\t\t\n\t\t\tcase Xor:\n\t\t\treturn 1;\n\t\t\t\n\t\t\tcase Or:\n\t\t\treturn 0;\n\n\t\t\tdefault:\n\t\t\treturn -999;\n\t\t}\n\t}", "public Card(String suit, String rank){\r\n\t\t\t// assume input is valid!\r\n\t\t\tthis.suit = suit; \r\n\t\t\tthis.rank = rank;\r\n\t\t\tthis.rankValue = new HashMap<String,Integer>(15);\r\n\t\t\tfor(int r = 2; r < RANKS.length; r+=1){\r\n\t\t\t\tthis.rankValue.put(RANKS[r], r);\r\n\t\t\t}\r\n\t }", "private static int getMaxScore(char[][] board){\n\n\t\tString result = gameStatus(board);\n\n\t\tif (result.equals(\"true\") && winner == 'X') return 1; //if x won\n\t\telse if (result.equals(\"true\") && winner == 'O') return -1;//if O won\n\t\telse if (result.equals(\"tie\")) return 0; //if tie\n\t\telse { \n\n\t\t\tint bestScore = -10;\n\t\t\tHashSet<Integer> possibleMoves = findPossibleMoves(board);\n\n\t\t\tfor (Integer move: possibleMoves){\n\n\t\t\t\tchar[][] modifiedBoard = new char[3][3];\n\n\t\t\t\tfor (int row = 0; row < 3; row++){\n\t\t\t\t\tfor (int col = 0; col < 3; col++){\n\t\t\t\t\t\tmodifiedBoard[row][col] = board[row][col];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tmodifiedBoard[move/3][move%3]='X';\n\n\t\t\t\tint currentScore = getMinScore(modifiedBoard);\n\n\t\t\t\tif (currentScore > bestScore){\n\t\t\t\t\tbestScore = currentScore;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\treturn bestScore;\n\t\t}\n\t}", "private Move guessBestMove(Piece player, Board board, double cutoff) {\n Board newBoard = new Board(board);\n Move bestSoFar;\n Iterator<Move> moveIterator = board.iterator();\n bestSoFar = moveIterator.next();\n newBoard.retract();\n while (moveIterator.hasNext()) {\n Move nextMove = moveIterator.next();\n int val = eval(newBoard);\n newBoard.makeMove(nextMove);\n if (eval(newBoard) > val) {\n bestSoFar = nextMove;\n val = eval(newBoard);\n if (val >= cutoff) {\n break;\n }\n }\n newBoard.retract();\n }\n return bestSoFar;\n }", "public Suit getSuit() {\n\t\treturn suit;\n\t}", "public void deal(){\n\t\tInteger topRank;\n\t\tInteger btmRank;\n\t\tDouble[] currPercent = {0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0};\n\t\tlastRaise = -1;\n\t\tcurrBet = 3.0;\n\t\tfor (int i = 0; i<tablePlayers.length*2+5; i++) {\n\t\t\tif (i<tablePlayers.length) {\n\t\t\t\ttablePlayers[i].setCard1(deck[i]); \n\t\t\t}\n\t\t\telse if (i<tablePlayers.length*2) {\n\t\t\t\ttablePlayers[i%tablePlayers.length].setCard2(deck[i]); \n\t\t\t}\n\t\t\telse {\n\t\t\t\ttableCards[i-tablePlayers.length*2].setRank(deck[i].getRank());\n\t\t\t\ttableCards[i-tablePlayers.length*2].setSuit(deck[i].getSuit());\n\t\t\t}\n\t\t}\n\t\t//determine each hand's winning percentage and go through first round of betting\n\t\tfor (int j = 0; j < tablePlayers.length; j++) {\n\t\t\tint i = (button + 3 + j) % 10;\n\t\t\t//if (j==0) System.out.println(\"button = \" + button + \"; first = \" + i);\n\t\t\tif (tablePlayers[i].getCard1().getRank() == 1 || tablePlayers[i].getCard2().getRank() == 1) {\n\t\t\t\ttopRank = 14;\n\t\t\t\tbtmRank = Math.max(tablePlayers[i].getCard1().getRank(), tablePlayers[i].getCard2().getRank());\n\t\t\t\tif (btmRank == 1) {\n\t\t\t\t\tbtmRank = 14;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (tablePlayers[i].getCard1().getRank() <= tablePlayers[i].getCard2().getRank()) {\n\t\t\t\t\ttopRank = tablePlayers[i].getCard2().getRank();\n\t\t\t\t\tbtmRank = tablePlayers[i].getCard1().getRank();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\ttopRank = tablePlayers[i].getCard1().getRank();\n\t\t\t\t\tbtmRank = tablePlayers[i].getCard2().getRank();\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (topRank == btmRank) { //pocket pair\n\t\t\t\tif (topRank == 14) {\n\t\t\t\t\tcurrPercent[i] = winPercent[168];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcurrPercent[i] = winPercent[154 + topRank];\n\t\t\t\t}\n\t\t\t} \n\t\t\telse {\n\t\t\t\tint index = -1;\n\t\t\t\tfor (int k = 1; k < topRank-2; k++) {\n\t\t\t\t\tindex += k;\n\t\t\t\t}\n\t\t\t\tindex += btmRank-1;\n\t\t\t\tindex *= 2;\n\t\t\t\tif (tablePlayers[i].getCard1().getSuit() == tablePlayers[i].getCard2().getSuit()) {\n\t\t\t\t\tindex++;\n\t\t\t\t}\n\t\t\t\tcurrPercent[i] = winPercent[index];\n\t\t\t}\n\t\t\t\n\t\t\t//place first round of pre-flop bets\n\t\t\tif (currPercent[i] > 0.20) { \n\t\t\t\tbetOrRaise(i,12.,3.);\n\t\t\t}\t\t\t\n\t\t\telse if ((currPercent[i] > 0.166 && currBet <= 3.0) ) { \n\t\t\t\tbetOrRaise(i,6.,3.);\n\t\t\t}\n\t\t\telse if (currPercent[i] > preFlopCallBBOdds[i] && currBet <= 3.0) {\n\t\t\t\tcallBetOrCheck(i,3.);\n\t\t\t}\n\t\t\telse if (currPercent[i] > preFlopCallARaiseOdds[i] && currBet <= 6.0) {\n\t\t\t\tcallBetOrCheck(i,6.);\n\t\t\t}\n\t\t\telse if (currPercent[i] > preFlopCallMultiRaiseOdds[i] && currBet > 6.0) {\n\t\t\t\tcallBetOrCheck(i,12.);\n\t\t\t}\n\t\t\telse if (i == ((button + 1) % 10)) {\n\t\t\t\ttablePlayers[i].placeBet(1.0);\n\t\t\t\tpot += 1.0;\n\t\t\t\ttablePlayers[i].foldHand();\n\t\t\t}\n\t\t\telse if (i == ((button + 2) % 10)) {\n\t\t\t\ttablePlayers[i].placeBet(3.0);\n\t\t\t\tpot += 3.0;\n\t\t\t\tif (currBet > 3.0) {\n\t\t\t\t\tif (currPercent[i] > preFlopCallBBOdds[i] && currBet <= 6.0) {\n\t\t\t\t\t\tcallBetOrCheck(i,6.);\n\t\t\t\t\t}\n\t\t\t\t\telse tablePlayers[i].foldHand();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (tablePlayers[i].getBet() < currBet) {\n\t\t\t\ttablePlayers[i].foldHand();\n\t\t\t}\n\t\t}\n\t\tif (lastRaise > -1) {\n\t\t\traiseCount++;\n\t\t}\n\t\t// call raises and allow for re-raises to cap\n\t\twhile (lastRaise > -1) {\n\t\t\tlastRaise = -1;\n\t\t\tfor (int j = 0; j < tablePlayers.length; j++) {\n\t\t\t\tint i = (button + 3 + j) % 10;\n\t\t\t\tif (!tablePlayers[i].hasFolded()) {\n\t\t\t\t\tif (currPercent[i] > 0.20) {\n\t\t\t\t\t\tbetOrRaise(i,12.,3.);\n\t\t\t\t\t}\n\t\t\t\t\tif (tablePlayers[i].getBet() >= currBet) {\n\t\t\t\t\t\tcontinue; //check\n\t\t\t\t\t}\n\t\t\t\t\telse if (tablePlayers[i].getBet() == currBet - 3.0 && currPercent[i] > preFlopCallBBOdds[i]) {\n\t\t\t\t\t\t//call one raise if player would have called BB\n\t\t\t\t\t\tcallBetOrCheck(i, currBet);\n\t\t\t\t\t}\n\t\t\t\t\telse if (tablePlayers[i].getBet() < currBet - 3.0 && currPercent[i] > preFlopCallMultiRaiseOdds[i]) {\n\t\t\t\t\t\t//call the multiRaise if would have called multiple raises on first action\n\t\t\t\t\t\tcallBetOrCheck(i,12.);\n\t\t\t\t\t}\n\t\t\t\t\telse tablePlayers[i].foldHand();\n\t\t\t\t}\n\t\t\t}\n//\t\t\tprintTableStatus();\n\t\t}\n//\t\tfor (int i = 0; i < tablePlayers.length; i++) {\n//\t\t\tif (!tablePlayers[9].hasFolded()) flopsPlayed++;\n//\t\t}\n\t\t//Bet the flop\n\t\tresetPlayerBets();\n\t\tfor (int i = 0; i < tablePlayers.length; i++) {\n\t\t\tif (!tablePlayers[i].hasFolded()) {\n\t\t\t\tplayersLeft++;\n\t\t\t\tflopPlayers++;\n\t\t\t}\n\t\t}\n\t\tif (playersLeft > 1) flopsSeen++;\n\t\tplayersLeft = 0;\n\t\tbetFlop();\n\t\t//Bet the turn\n\t\tresetPlayerBets();\n\t\tfor (int i = 0; i < tablePlayers.length; i++) {\n\t\t\tif (!tablePlayers[i].hasFolded()) {\n\t\t\t\tplayersLeft++;\n\t\t\t\tturnPlayers++;\n\t\t\t}\n\t\t}\n\t\tif (playersLeft > 1) turnsSeen++;\n\t\tplayersLeft = 0;\n\t\tbetTurn();\n\t\t\n\t\t//Bet the river\n\t\tresetPlayerBets();\n\t\tfor (int i = 0; i < tablePlayers.length; i++) {\n\t\t\tif (!tablePlayers[i].hasFolded()) {\n\t\t\t\triverPlayers++;\n\t\t\t\tplayersLeft++;\n\t\t\t}\n\t\t}\n\t\tif (playersLeft > 1) riversSeen++;\n\t\tplayersLeft = 0;\n\t\tbetRiver();\n\t\tfor (int i = 0; i < tablePlayers.length; i++) {\n\t\t\tif (!tablePlayers[i].hasFolded()) {\n\t\t\t\tplayersLeft++;\n\t\t\t}\n\t\t}\n\t\tif (playersLeft > 1) showdowns++;\n\t\tplayersLeft = 0;\n\t\t\n\t}", "public Direction playerToHelpGivenRank(Direction ourCorner, int rank) {\r\n PriorityQueue<DirectionScoreBind> scores = new PriorityQueue<DirectionScoreBind>();\r\n for (Direction player : Direction.values()) {\r\n if(player.equals(ourCorner)) // don't look at ourselves\r\n continue;\r\n\r\n scores.add(new DirectionScoreBind(player, getAverage(playerScores.get(player)), getSum(playerScores.get(player))));\r\n }\r\n\r\n for(int i = 1; i < rank; i++) {\r\n scores.poll();\r\n }\r\n\r\n return scores.peek().getDirection();\r\n }", "public int compareTo(Card cr1) {\n// if suits don't match, figure out who is highest suit\n if (suit != cr1.getSuit()) {\n int suitIndex = 0, cr1Index = 0;\n for (int i = 0; i < SUITCARDS.length; i++) {\n if (suit == SUITCARDS[i]) {\n suitIndex = i;\n }\n if (cr1.suit == SUITCARDS[i]) {\n cr1Index = i;\n }\n }\n// way I organized the array means lower index is worse\n if (suitIndex > cr1Index)\n return 1;\n else if (suitIndex < cr1Index)\n return -1;\n else\n return 0;\n }\n// if suits do match, figure out which card is higher\n else {\n int suitIndex = 0, cr1Index = 0;\n for (int j = 0; j < FACECARDS.length; j++) {\n if (value == FACECARDS[j]) {\n suitIndex = j;\n }\n if (cr1.value == FACECARDS[j]) {\n cr1Index = j;\n }\n }\n\n if (suitIndex > cr1Index)\n return 1;\n else if (suitIndex < cr1Index)\n return -1;\n else\n return 0;\n }\n }" ]
[ "0.70513123", "0.6802489", "0.67902756", "0.6597304", "0.65913314", "0.64944583", "0.642971", "0.6423915", "0.6417074", "0.63321877", "0.63125634", "0.6156293", "0.6146247", "0.6107948", "0.6102249", "0.6062541", "0.6054956", "0.60347545", "0.60347545", "0.6021023", "0.6006928", "0.5975168", "0.5967702", "0.59556675", "0.5949302", "0.5943948", "0.5927015", "0.59127057", "0.5912006", "0.59098035", "0.59029275", "0.5892318", "0.5886354", "0.5870298", "0.5869301", "0.58491224", "0.58322126", "0.58186096", "0.5810366", "0.5791991", "0.57860076", "0.578049", "0.5777853", "0.57744616", "0.5772414", "0.5762052", "0.57576793", "0.57576793", "0.57510686", "0.57489985", "0.5742713", "0.57353115", "0.57342494", "0.57213956", "0.5712621", "0.57062066", "0.5704293", "0.57009083", "0.5690032", "0.56885576", "0.5679367", "0.56578755", "0.5656417", "0.5651651", "0.56515753", "0.5647303", "0.5641695", "0.5639856", "0.5635427", "0.5634186", "0.5608666", "0.5597863", "0.5594917", "0.5592023", "0.55904907", "0.55891716", "0.5583686", "0.55810595", "0.5580174", "0.5565057", "0.55509585", "0.55473536", "0.55423594", "0.5540137", "0.55351174", "0.5532777", "0.55213386", "0.5520014", "0.55194587", "0.5516281", "0.55114454", "0.5493091", "0.5492655", "0.54901546", "0.54885703", "0.5484652", "0.5484599", "0.5475347", "0.5469962", "0.54693" ]
0.78408784
0
Creates the reference frame that is at the joint and rigidly attached to the joint's predecessor.
public static MovingReferenceFrame newFrameBeforeJoint(JointReadOnly joint, RigidBodyTransformReadOnly transformToParent) { String beforeJointName = "before" + MecanoTools.capitalize(joint.getName()); return newJointFrame(joint, transformToParent, beforeJointName); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static MovingReferenceFrame newFrameAfterJoint(JointReadOnly joint)\n {\n MovingReferenceFrame frameBeforeJoint = joint.getFrameBeforeJoint();\n\n if (frameBeforeJoint == null)\n throw new NullPointerException(\"The frameBeforeJoint has to be created before the frameAfterJoint.\");\n\n return new MovingReferenceFrame(\"after\" + MecanoTools.capitalize(joint.getName()), frameBeforeJoint)\n {\n @Override\n protected void updateTransformToParent(RigidBodyTransform transformToParent)\n {\n joint.getJointConfiguration(transformToParent);\n }\n\n @Override\n protected void updateTwistRelativeToParent(Twist twistRelativeToParentToPack)\n {\n twistRelativeToParentToPack.setIncludingFrame(joint.getJointTwist());\n }\n };\n }", "public static MovingReferenceFrame newJointFrame(JointReadOnly joint, RigidBodyTransformReadOnly transformToParent, String beforeJointName)\n {\n MovingReferenceFrame parentFrame;\n RigidBodyReadOnly parentBody = joint.getPredecessor();\n if (parentBody.isRootBody())\n {\n parentFrame = parentBody.getBodyFixedFrame();\n\n /*\n * TODO Special case to keep the beforeJointFrame of the SixDoFJoint to be the elevatorFrame. This\n * should probably removed, might cause reference frame exceptions though.\n */\n if (transformToParent == null)\n return parentFrame;\n }\n else\n parentFrame = parentBody.getParentJoint().getFrameAfterJoint();\n\n return MovingReferenceFrame.constructFrameFixedInParent(beforeJointName, parentFrame, transformToParent);\n }", "@Override\r\n protected void computeReferencePoint ()\r\n {\r\n setReferencePoint(getHeadLocation());\r\n }", "public static NewRotateLeft create(AnimatableModelInstance originObject, float ex, float ey, int duration) {\n\n\t\tVector3 posO = originObject.transState.position.cpy();\t\n\t\t//Vector3 posO = new Vector3();\n\t\t//originObject.transform.getTranslation(posO);\n\t\t\n\t\tQuaternion rotation = originObject.transState.rotation.cpy();\t\n\t\t//Quaternion rotation = new Quaternion();\n\t\t//originObject.transform.getRotation(rotation,true); //existing rotation\n\t\t\n\t\t Vector3 axisVec = new Vector3();\n\t float existingangle = (float) (rotation.getAxisAngle(axisVec) * axisVec.nor().z);\n\t existingangle = existingangle < 0 ? existingangle + 360 : existingangle; //convert <0 values\n\t\t\n\t\tGdx.app.log(logstag,\"_____________________________________existing angle=\"+existingangle); //relative to x axis pointing left anticlockwise\n\t\n\t\t//float scalex = originObject.transform.getScaleX(); //get how much the object has been scaled\n\t\t//float scaley = originObject.transform.getScaleY();\n\t\t\n\t\tVector2 fromPoint = new Vector2(posO.x,posO.y); //we need to scale them down due to how the positions might have been scaled up if the matrix is scaled (I hate how matrixs work :-/ Just cant get it in my head)\n\t\tVector2 tooPoint = new Vector2(ex,ey);\n\n\t\tfromPoint.sub(tooPoint); \n\n\t\t//Log.info(\"length=\"+corner2.len());\n\n\t\tfloat angle = 180+fromPoint.angle(); //absolute angle between the two objects\n\t\tGdx.app.log(logstag,\"________target angle=\"+angle); //should point towards ex/ey \n\t\t\n\t//\tfloat distance = fromPoint.len();\n\n\t\t\n\t\t//difference between this angle and existing one\n\t\tangle = angle - existingangle;\n\t\t\n\t\tNewRotateLeft rot = new NewRotateLeft(angle,500);\n\t\t//NewForward forward = new NewForward(distance,duration-500);\n\t\t\t\t\n\t\treturn rot;\n\t}", "public void buildFrame();", "public static FixedFrameWrenchBasics newPlanarFixedFrameWrenchBasics(ReferenceFrame bodyFrame, ReferenceFrame expressedInFrame)\n {\n return new FixedFrameWrenchBasics()\n {\n private final FixedFrameVector3DBasics angularPart = newYOnlyFixedFrameVector3DBasics(expressedInFrame);\n private final FixedFrameVector3DBasics linearPart = newXZOnlyFixedFrameVector3DBasics(expressedInFrame);\n\n @Override\n public ReferenceFrame getBodyFrame()\n {\n return bodyFrame;\n }\n\n @Override\n public ReferenceFrame getReferenceFrame()\n {\n return expressedInFrame;\n }\n\n @Override\n public FixedFrameVector3DBasics getAngularPart()\n {\n return angularPart;\n }\n\n @Override\n public FixedFrameVector3DBasics getLinearPart()\n {\n return linearPart;\n }\n\n @Override\n public String toString()\n {\n return MecanoIOTools.getWrenchString(this);\n }\n };\n }", "protected abstract FixedJoint newFixedJointImpl( Body body1, Body body2 );", "public void createJoint(World world) {\n if (joint != null) {\n return;\n }\n joint = (RevoluteJoint) world.createJoint(this);\n }", "ReferenceTreatment createReferenceTreatment();", "private void checkAndAddReferenceFrame(ReferenceFrame referenceFrame)\n {\n checkAndAddReferenceFrame(referenceFrame, referenceFrame.getNameBasedHashCode());\n }", "public void forward() {\n\t\t\n\t\tif(hasEaten()) {\n\t\t\taddBodyPart();\n\t\t} else {\n\t\t\tshuffleBody();\n\t\t}\n\t\t\n\t\tthis.setLocation(this.getX()+dX, this.getY()+dY); // move head\n\t\tthis.display(w); \n\t}", "public AddContactFrame(TableFrame tableFrame) {\n this(tableFrame, new Contact());\n }", "ReferenceEmbed createReferenceEmbed();", "public void getCurrentJointState(sensor_msgs.JointState currentJointState, LBR robot) {\n\n currentJointState.getHeader().setStamp(time.getCurrentTime());\n currentJointState.setName(Arrays.asList(joint_names));\n currentJointState.setPosition(robot.getCurrentJointPosition().getInternalArray());\n currentJointState.setEffort(robot.getMeasuredTorque().getTorqueValues());\n }", "@Test(expected = NullPointerException.class)\r\n\tpublic void createWithNullAnchor() {\r\n\t\tnew WeldJoint<Body>(b1, b2, null);\r\n\t}", "protected abstract HingeJoint newHingeJointImpl( Body body1, Body body2 );", "MolecularSequenceReferenceSeq getReferenceSeq();", "Frame createFrame();", "void updateJointTransform(RigidBodyTransform jointTransformToUpdate);", "public Record makeReferenceRecord(RecordOwner recordOwner)\n {\n try {\n return (Record)this.getRecord().clone();\n } catch (CloneNotSupportedException ex) {\n ex.printStackTrace();\n }\n return null;\n }", "public static FixedFrameTwistBasics newPlanarFixedFrameTwistBasics(ReferenceFrame bodyFrame, ReferenceFrame baseFrame, ReferenceFrame expressedInFrame)\n {\n return new FixedFrameTwistBasics()\n {\n private final FixedFrameVector3DBasics angularPart = newYOnlyFixedFrameVector3DBasics(expressedInFrame);\n private final FixedFrameVector3DBasics linearPart = newXZOnlyFixedFrameVector3DBasics(expressedInFrame);\n\n @Override\n public ReferenceFrame getBodyFrame()\n {\n return bodyFrame;\n }\n\n @Override\n public ReferenceFrame getBaseFrame()\n {\n return baseFrame;\n }\n\n @Override\n public ReferenceFrame getReferenceFrame()\n {\n return expressedInFrame;\n }\n\n @Override\n public FixedFrameVector3DBasics getAngularPart()\n {\n return angularPart;\n }\n\n @Override\n public FixedFrameVector3DBasics getLinearPart()\n {\n return linearPart;\n }\n\n @Override\n public String toString()\n {\n return MecanoIOTools.getTwistString(this);\n }\n };\n }", "private Frame initFrameExternalConstraintForCompatible() {\n return new NonOverlappingFrame();\n }", "public Joint (SkeletonJoint skeletonJoint) {\n\t\tthis.skeletonJoint = skeletonJoint;\n\t\tposition2d = new Vector2f();\n\t\tposition3d = new Vector3f();\n\t\tconfidence = 0;\n\t}", "private Frame initFrameExternalConstraintForIncluded() {\n\n return new NonOverlappingFrame();\n }", "public static Vector4 forward()\n {\n return new Vector4(0,0,1,0);\n }", "FRAME createFRAME();", "public static Entity translate(Frame frame)\r\n/* 54: */ {\r\n/* 55:65 */ return (Entity)frame.getThing().clone();\r\n/* 56: */ }", "@Test\r\n\tpublic void createSuccess() {\r\n\t\tnew WeldJoint<Body>(b1, b2, new Vector2());\r\n\t}", "protected abstract BallJoint newBallJointImpl( Body body1, Body body2 );", "public void run() {\n\tObjectFrame flange = lbr_iiwa_14_R820_1.getFlange();\t\t//flange frame\n\tObjectFrame lbrRoot = lbr_iiwa_14_R820_1.getRootFrame();\t//root frame\n\t\t\t\n\t// define frames for task trajectory:\n\tFrame F_contactEnd = new Frame(lbrRoot,500,0,385,Math.toRadians(180),Math.toRadians(0),Math.toRadians(180));\n\t\n\tFrame F_tmp = F_contactEnd.copy();\n\t\n\tF_flyMin \t\t= F_tmp.transform(lbrRoot,XyzAbcTransformation.ofTranslation( -40,0, 50)).copy();\n\tF_fly3 \t\t\t= F_tmp.transform(lbrRoot,XyzAbcTransformation.ofTranslation( 40,0, 60)).copy();\n\tF_fly4 \t\t\t= F_tmp.transform(lbrRoot,XyzAbcTransformation.ofTranslation( 200,0, 0)).copy();\n\tF_flyMax \t\t= F_tmp.transform(lbrRoot,XyzAbcTransformation.ofTranslation( 40,0, -60)).copy();\t\t\n\tF_contactStart \t= F_tmp.transform(lbrRoot,XyzAbcTransformation.ofTranslation( -40,0, -50)).copy();\n\t\n\tSystem.out.println(String.format(\"F_flyMin, x: %1$f y: %2$f z: %3$f\", F_flyMin.getX(), F_flyMin.getY(), F_flyMin.getZ()));\n\tSystem.out.println(String.format(\"F_fly3, x: %1$f y: %2$f z: %3$f\", F_fly3.getX(), F_fly3.getY(), F_fly3.getZ()));\n\tSystem.out.println(String.format(\"F_fly4, x: %1$f y: %2$f z: %3$f\", F_fly4.getX(), F_fly4.getY(), F_fly4.getZ()));\n\tSystem.out.println(String.format(\"F_flyMax, x: %1$f y: %2$f z: %3$f\", F_flyMax.getX(), F_flyMax.getY(), F_flyMax.getZ()));\n\tSystem.out.println(String.format(\"F_contactStart, x: %1$f y: %2$f z: %3$f\", F_contactStart.getX(), F_contactStart.getY(), F_contactStart.getZ()));\n\t\n\tSpline flyingPhase_spline = new Spline(\n\t\t\tlin(F_contactEnd),\n\t\t\tspl(F_flyMin).setOrientationType(SplineOrientationType.Ignore),\n\t\t\tlin(F_fly3).setOrientationType(SplineOrientationType.Ignore),\n\t\t\tspl(F_fly4).setOrientationType(SplineOrientationType.Ignore),\n\t\t\tlin(F_flyMax).setOrientationType(SplineOrientationType.Ignore),\n\t\t\tspl(F_contactStart)\n\t\t);\n\t\n\t\n\t// move to standBy position:\n\tSystem.out.println(\"going to standBy position\");\n\tlbr_iiwa_14_R820_1.move(ptp(J_standBy).setJointVelocityRel(vRel_taxing));\n\t\n\n\t\n\t/*\n\tSystem.out.println(\"going to end frame of contact phase\");\n\tlbr_iiwa_14_R820_1.move(lin(F_contactEnd).setCartVelocity(v_taxing));\n\t*/\n\t\n\t/*\n\tlbr_iiwa_14_R820_1.move(lin(F_flyMin).setCartVelocity(v_taxing));\n\tlbr_iiwa_14_R820_1.move(lin(F_fly3).setCartVelocity(v_taxing));\n\tlbr_iiwa_14_R820_1.move(lin(F_fly4).setCartVelocity(v_taxing));\n\t\n\tlbr_iiwa_14_R820_1.move(lin(F_flyMax).setCartVelocity(v_taxing));\n\tlbr_iiwa_14_R820_1.move(lin(F_contactStart).setCartVelocity(v_taxing));\n\tlbr_iiwa_14_R820_1.move(lin(F_contactEnd).setCartVelocity(v_taxing)); \n\t*/\n\t\n\t/*\n\tSystem.out.println(\"start flying phase - spline (3x)\");\n\tfor (int i=1; i<=3; i++)\n\t{\n\t\tlbr_iiwa_14_R820_1.move(flyingPhase_spline.setCartVelocity(v_fly).setCartAcceleration(250));\n\t}\n\t*/\n\t\n\t/*\n\tSystem.out.println(\"start flying phase - batch\");\n\tlbr_iiwa_14_R820_1.moveAsync(batch(\n\t\t\tlin(F_contactEnd),\n\t\t\tlin(F_flyMin).setOrientationType(SplineOrientationType.Ignore),\n\t\t\tlin(F_fly3).setOrientationType(SplineOrientationType.Ignore),\n\t\t\tlin(F_fly4).setOrientationType(SplineOrientationType.Ignore),\n\t\t\tlin(F_flyMax).setOrientationType(SplineOrientationType.Ignore),\n\t\t\tlin(F_contactStart)\n\t).setCartVelocity(v_fly));\n\t*/\n\t\n\t\n\tSystem.out.println(\"Setting impedance mode\");\n\tCartesianImpedanceControlMode cartImpMode = new CartesianImpedanceControlMode();\n\n\t/*\n\tcartImpMode.parametrize(CartDOF.TRANSL).setStiffness(1500);\n\tcartImpMode.parametrize(CartDOF.TRANSL).setDamping(0.7);\n\n\tcartImpMode.parametrize(CartDOF.Z).setStiffness(100);\n\n\tcartImpMode.parametrize(CartDOF.ROT).setStiffness(200);\n\tcartImpMode.parametrize(CartDOF.ROT).setDamping(0.7);\n\n\tcartImpMode.setNullSpaceDamping(0.3);\n\tcartImpMode.setNullSpaceStiffness(0);\n\n\tcartImpMode.setMaxControlForce(30, 30, 30, 10, 10, 10, false);\n\t*/\n\t\n\t// manage data recording\n\tDataRecorder rec = new DataRecorder(); //data recording \n\trec.setFileName(\"Recording.log\");\n\trec.setSampleRate(100);\n\trec.addCartesianForce(lbr_iiwa_14_R820_1.getFlange(),lbrRoot);\n\tStartRecordingAction startAction = new StartRecordingAction(rec);\n\t\n\tForceCondition condstart = ForceCondition.createNormalForceCondition(null, CoordinateAxis.Z, 1); //recording trigger\n\tForceCondition condend = ForceCondition.createNormalForceCondition(null, CoordinateAxis.Z, force_z); //stop movement trigger\n\t\n\t\n\tSystem.out.println(\"going to start frame of contact phase\");\n\tlbr_iiwa_14_R820_1.move(lin(F_contactStart).setCartVelocity(v_taxing).setCartAcceleration(200));\t\n\t\n\t//start cycling\n\tfor (int i_cycle=1; i_cycle <= 3; i_cycle ++)\n\t{\n\t\tSystem.out.println(String.format(\"cycle # %1$d\", i_cycle));\n\t\t\n\t\t//PHASE 1: transition, landing\n\t\t//System.out.println(\"start transition phase, landing, impedance mode \");\n\t\t//lbr_iiwa_14_R820_1.move(linRel(0,0,-dz,lbrRoot).triggerWhen(condstart, startAction).breakWhen(condend).setCartVelocity(v_transition).setMode(cartImpMode));\n\t\t\n\t\tif (i_cycle == 1)\n\t\t{\n\t\t\t// check data recording\n\t\t\tSystem.out.println(\"recording activated\");\n\t\t\tif(rec.isFileAvailable())\n\t\t\t\tSystem.out.println(\"data file available\");\n\t\t\t\n\t\t\tURL url = rec.getURL();\n\t\t\tdummy = url.toString();\n\t\t\tSystem.out.println(dummy);\n\t\t}\n\t\t\n\t\t// print current force value\n\t\tForceSensorData data = lbr_iiwa_14_R820_1.getExternalForceTorque(lbr_iiwa_14_R820_1.getFlange());\n\t\tSystem.out.println(String.format(\"Fz = %1$f \",data.getForce().getZ()));\n\t\t\n\t\t// PHASE 2: contact phase\n\t\t//System.out.println(\"start contact phase, impedance mode\");\n\t\t//lbr_iiwa_14_R820_1.move(lin(F_contactEnd).setCartVelocity(v_contact).setMode(cartImpMode));\n\t\t/*\n\t\t// PHASE 3: transition phase, take off\n\t\tSystem.out.println(\"start transition phase, impedance mode\");\n\t\tlbr_iiwa_14_R820_1.move(linRel(0,0,dz,lbrRoot).setCartVelocity(v_transition).setMode(cartImpMode));\n\t\t*/\n\t\t// PHASE 4: flying phase \n\t\tSystem.out.println(\"start flying phase, swift\");\n\t\tlbr_iiwa_14_R820_1.move(flyingPhase_spline.setCartVelocity(v_fly).setCartAcceleration(250).setMode(cartImpMode));\n\t}\n\t\n\t\n\t// stop recording\n\trec.stopRecording();\n\tSystem.out.println(\"data recording stopped\");\n\t\n\t\n\t// move to standBy position:\n\tlbr_iiwa_14_R820_1.move(ptp(J_standBy).setJointVelocityRel(vRel_taxing));\n\t\t\n\t}", "@Override\n\tpublic void onNewFrame(HeadTransform headTransform) {\n\t}", "private Frame buildFrame() {\n return new Frame(command, headers, body);\n }", "public PulleyJoint getJoint()\r\n\t{\r\n\t\treturn (PulleyJoint)joint;\r\n\t}", "public KinectSkeleton(Main main) {\r\n Material matW = new Material(main.getAssetManager(), \"Common/MatDefs/Misc/Unshaded.j3md\");\r\n matW.setColor(\"Color\", ColorRGBA.Black);\r\n if (main.kinect.joint != null) {\r\n //starting joints\r\n float[][] StartingJoint = {{(float) main.kinect.joint[10][1] / 1000f, (float) main.kinect.joint[10][2] / 1000f, (float) main.kinect.joint[10][3] / 1000f}, //right wrist\r\n {(float) main.kinect.joint[9][1] / 1000f, (float) main.kinect.joint[9][2] / 1000f, (float) main.kinect.joint[9][3] / 1000f}, //right elbow\r\n {(float) main.kinect.joint[8][1] / 1000f, (float) main.kinect.joint[8][2] / 1000f, (float) main.kinect.joint[8][3] / 1000f}, //right shoulder\r\n {(float) main.kinect.joint[2][1] / 1000f, (float) main.kinect.joint[2][2] / 1000f, (float) main.kinect.joint[2][3] / 1000f}, //shoulder center\r\n {(float) main.kinect.joint[4][1] / 1000f, (float) main.kinect.joint[4][2] / 1000f, (float) main.kinect.joint[4][3] / 1000f}, //left shoulder\r\n {(float) main.kinect.joint[5][1] / 1000f, (float) main.kinect.joint[5][2] / 1000f, (float) main.kinect.joint[5][3] / 1000f}, //left elbow\r\n {(float) main.kinect.joint[0][1] / 1000f, (float) main.kinect.joint[0][2] / 1000f, (float) main.kinect.joint[0][3] / 1000f}, //hip center\r\n {(float) main.kinect.joint[0][1] / 1000f, (float) main.kinect.joint[0][2] / 1000f, (float) main.kinect.joint[0][3] / 1000f}, //hip center\r\n {(float) main.kinect.joint[0][1] / 1000f, (float) main.kinect.joint[0][2] / 1000f, (float) main.kinect.joint[0][3] / 1000f}, //hip center\r\n {(float) main.kinect.joint[0][1] / 1000f, (float) main.kinect.joint[0][2] / 1000f, (float) main.kinect.joint[0][3] / 1000f}, //hip center\r\n {(float) main.kinect.joint[0][1] / 1000f, (float) main.kinect.joint[0][2] / 1000f, (float) main.kinect.joint[0][3] / 1000f}, //hip center\r\n {(float) main.kinect.joint[13][1] / 1000f, (float) main.kinect.joint[13][2] / 1000f, (float) main.kinect.joint[13][3] / 1000f}, //left knee\r\n {(float) main.kinect.joint[17][1] / 1000f, (float) main.kinect.joint[17][2] / 1000f, (float) main.kinect.joint[17][3] / 1000f}}; //right knee\r\n //joint the starting joints connect to\r\n float[][] ConnectingJoint = {{(float) main.kinect.joint[9][1] / 1000f, (float) main.kinect.joint[9][2] / 1000f, (float) main.kinect.joint[9][3] / 1000f}, //right elbow\r\n {(float) main.kinect.joint[8][1] / 1000f, (float) main.kinect.joint[8][2] / 1000f, (float) main.kinect.joint[8][3] / 1000f}, //right shoulder\r\n {(float) main.kinect.joint[2][1] / 1000f, (float) main.kinect.joint[2][2] / 1000f, (float) main.kinect.joint[2][3] / 1000f}, //shoulder center\r\n {(float) main.kinect.joint[4][1] / 1000f, (float) main.kinect.joint[4][2] / 1000f, (float) main.kinect.joint[4][3] / 1000f}, //left shoulder\r\n {(float) main.kinect.joint[5][1] / 1000f, (float) main.kinect.joint[5][2] / 1000f, (float) main.kinect.joint[5][3] / 1000f}, //left elbow\r\n {(float) main.kinect.joint[6][1] / 1000f, (float) main.kinect.joint[6][2] / 1000f, (float) main.kinect.joint[6][3] / 1000f}, //left wrist\r\n {(float) main.kinect.joint[2][1] / 1000f, (float) main.kinect.joint[2][2] / 1000f, (float) main.kinect.joint[2][3] / 1000f}, //shoulder center\r\n {(float) main.kinect.joint[8][1] / 1000f, (float) main.kinect.joint[8][2] / 1000f, (float) main.kinect.joint[8][3] / 1000f}, //right shoulder\r\n {(float) main.kinect.joint[4][1] / 1000f, (float) main.kinect.joint[4][2] / 1000f, (float) main.kinect.joint[4][3] / 1000f}, //left shoulder\r\n {(float) main.kinect.joint[13][1] / 1000f, (float) main.kinect.joint[13][2] / 1000f, (float) main.kinect.joint[13][3] / 1000f}, //left knee\r\n {(float) main.kinect.joint[17][1] / 1000f, (float) main.kinect.joint[17][2] / 1000f, (float) main.kinect.joint[17][3] / 1000f}, //right knee\r\n {(float) main.kinect.joint[14][1] / 1000f, (float) main.kinect.joint[14][2] / 1000f, (float) main.kinect.joint[14][3] / 1000f}, //left ankle\r\n {(float) main.kinect.joint[18][1] / 1000f, (float) main.kinect.joint[18][2] / 1000f, (float) main.kinect.joint[18][3] / 1000f}}; //right ankle\r\n //start loop to connect all joints\r\n for (int i = 0; i < bones.length; i++) {\r\n Cylinder c = new Cylinder(10, 10, 0.04f, 1f, true);\r\n //set geometry, connect and transform cylinder, set material\r\n bones[i] = new Geometry(\"Cylinder\", c);\r\n setConnectiveTransform(ConnectingJoint[i], StartingJoint[i], bones[i]);\r\n bones[i].setMaterial(matW);\r\n //attach physics to bones\r\n RigidBodyControl phy = new RigidBodyControl(1f); //0f = 0 mass\r\n bones[i].addControl(phy);\r\n phy.setKinematic(true);\r\n //attach physics to world\r\n main.bulletAppState.getPhysicsSpace().add(phy);\r\n //attach to node so we can play\r\n skeleton.attachChild(bones[i]);\r\n }\r\n //float y = (float) main.kinect.joint[0][3] / 1000f+(float) main.kinect.joint[0][3] / 1000f;\r\n skeleton.move(0, 0.75f, 0);\r\n ;\r\n } else {\r\n System.out.println(\"NULL!\");\r\n }\r\n }", "@Override\n\tprotected void createFrameOrbit( String frameColor )\n\t{\n\t\t\n AlgebraicField hf = this .mField;\n\n AlgebraicNumber one = hf .one();\n AlgebraicNumber s = hf .getAffineScalar().reciprocal(); // reciprocal of sigma\n AlgebraicNumber R = hf .createPower( 1 ) .times( s ); // rho / sigma\n\n // (-s,1) Y\n // +---+------ [2] ---------+-----------+--------+---+\n // / / / (s,R) / /\n // +---+--------+-----------+--------- [1] ------+---+\n // / / / / / /\n // / / / / / / /\n // / / / / / /\n // (-1,s) [3] -+--------+-----------+-----------+--------+---+\n // / / / / / /\n // / / / / / / /\n // / / / / / / /\n // / / / / / \n // +---+--------+--------- O ---------+--------+- [0] (1,0) X\n // / / / / / \n // / / / /<--- s --->/ / /\n // / / / /<-------- R ------->/ /\n // / / /<---------- 1 --------->/\n // +- [4| ------+-----------+-----------+--------+---+\n // / (-R,-s) / / / / /\n // / / / / / / /\n // / / / / / (R,-R) /\n // +---+--------+-----------+-----------+------ [6] -+\n // / / / / /\n // +---+--------+--------- [5] ---------+--------+---+\n // (0,-1)\n \n AlgebraicVector zAxis = hf .basisVector( 3, AlgebraicVector.Z );\n AlgebraicVector zAxisNeg = zAxis .negate();\n AlgebraicVector axis0 = hf .basisVector( 3, AlgebraicVector.X );\n AlgebraicVector axis1 = hf .origin( 3 )\n \t\t.setComponent( AlgebraicVector.X, s )\n\t\t\t\t.setComponent( AlgebraicVector.Y, R );\n AlgebraicVector axis2 = hf .origin( 3 )\n \t\t.setComponent( AlgebraicVector.X, s .negate() )\n\t\t\t\t.setComponent( AlgebraicVector.Y, one );\n AlgebraicVector axis3 = hf .origin( 3 )\n \t\t.setComponent( AlgebraicVector.X, one .negate() )\n\t\t\t\t.setComponent( AlgebraicVector.Y, s );\n AlgebraicVector axis4 = hf .origin( 3 )\n \t\t.setComponent( AlgebraicVector.X, R .negate() )\n\t\t\t\t.setComponent( AlgebraicVector.Y, s .negate() );\n AlgebraicVector axis5 = hf .origin( 3 )\n\t\t\t\t.setComponent( AlgebraicVector.Y, one .negate() );\n AlgebraicVector axis6 = hf .origin( 3 )\n \t\t.setComponent( AlgebraicVector.X, R )\n\t\t\t\t.setComponent( AlgebraicVector.Y, R .negate() );\n\n // all mMatrices are mappings of [X,Y,Z] = [ axis0, -axis5, zAxis ]\n mMatrices[ 0 ] = hf .identityMatrix( 3 );\n mMatrices[ 1 ] = new AlgebraicMatrix( axis1, axis6 .negate(), zAxis );\n mMatrices[ 2 ] = new AlgebraicMatrix( axis2, axis0 .negate(), zAxis );\n mMatrices[ 3 ] = new AlgebraicMatrix( axis3, axis1 .negate(), zAxis );\n mMatrices[ 4 ] = new AlgebraicMatrix( axis4, axis2 .negate(), zAxis );\n mMatrices[ 5 ] = new AlgebraicMatrix( axis5, axis3 .negate(), zAxis );\n mMatrices[ 6 ] = new AlgebraicMatrix( axis6, axis4 .negate(), zAxis );\n \n mMatrices[ 7 ] = new AlgebraicMatrix( axis0, axis2 .negate(), zAxisNeg );\n mMatrices[ 8 ] = mMatrices[ 1 ] .times( mMatrices[ 7 ] );\n mMatrices[ 9 ] = mMatrices[ 2 ] .times( mMatrices[ 7 ] );\n mMatrices[ 10 ] = mMatrices[ 3 ] .times( mMatrices[ 7 ] );\n mMatrices[ 11 ] = mMatrices[ 4 ] .times( mMatrices[ 7 ] );\n mMatrices[ 12 ] = mMatrices[ 5 ] .times( mMatrices[ 7 ] );\n mMatrices[ 13 ] = mMatrices[ 6 ] .times( mMatrices[ 7 ] );\n\t}", "public void addBoneRef(BoneRef ref){\n \t\tthis.boneRefs[bonePointer++] = ref;\n \t}", "public final void ruleJointTypeReference() 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:829:2: ( ( ( rule__JointTypeReference__RefAssignment ) ) )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:830:1: ( ( rule__JointTypeReference__RefAssignment ) )\n {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:830:1: ( ( rule__JointTypeReference__RefAssignment ) )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:831:1: ( rule__JointTypeReference__RefAssignment )\n {\n before(grammarAccess.getJointTypeReferenceAccess().getRefAssignment()); \n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:832:1: ( rule__JointTypeReference__RefAssignment )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:832:2: rule__JointTypeReference__RefAssignment\n {\n pushFollow(FOLLOW_rule__JointTypeReference__RefAssignment_in_ruleJointTypeReference1714);\n rule__JointTypeReference__RefAssignment();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getJointTypeReferenceAccess().getRefAssignment()); \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 }", "org.apache.calcite.avatica.proto.Common.Frame getFrame();", "public BruceWayne()\n {\n GeneralPath leftSide = new GeneralPath();\n\tleftSide.moveTo(195,200);\n\tleftSide.lineTo(195,230);//neck\n\tleftSide.lineTo(150,230);//shoulder\n\tleftSide.lineTo(140,250);//shoulder slant\n\tleftSide.lineTo(140,340);//armleft\n\tleftSide.lineTo(165,340);//armbottom\n\tleftSide.lineTo(160,260);//armright\n\tleftSide.lineTo(170,270);//armpit\n\tleftSide.lineTo(170,350);//chest\n\tleftSide.lineTo(160,510);//legleft\n\tleftSide.lineTo(185,510);//legbottom\n\tleftSide.lineTo(200,360);//legright\n\tleftSide.lineTo(220,360);//middle\n\n Shape rightSide = ShapeTransforms.horizontallyFlippedCopyOf(leftSide);\n rightSide = ShapeTransforms.translatedCopyOf(rightSide, 140.0, 0.0);\n\tCircle head = new Circle(210,170,35);\n \n\twholeFigure = new GeneralPath();\n\twholeFigure.append(head,false);\n wholeFigure.append(leftSide, false);\n wholeFigure.append(rightSide, false);\n }", "private static Frame makeNextFrame(Player player) {\r\n Frame nextFrame = new Frame();\r\n nextFrame.setPlayer(player);\r\n\r\n return nextFrame;\r\n }", "protected abstract void addJointImpl( Joint joint );", "private void createFrame() {\n System.out.println(\"Assembling \" + name + \" frame\");\n }", "public final FixedJoint newFixedJoint( Body body1, Body body2 )\n {\n FixedJoint joint = newFixedJointImpl( body1, body2 );\n \n //addJoint( joint );\n \n return ( joint );\n }", "private Point getHeadLocation (Note note)\r\n {\r\n return new Point(tailLocation.x, note.getReferencePoint().y);\r\n }", "public final void rule__Joint__Body1Assignment_6() 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:9670:1: ( ( ruleBodyReference ) )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:9671:1: ( ruleBodyReference )\n {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:9671:1: ( ruleBodyReference )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:9672:1: ruleBodyReference\n {\n before(grammarAccess.getJointAccess().getBody1BodyReferenceParserRuleCall_6_0()); \n pushFollow(FOLLOW_ruleBodyReference_in_rule__Joint__Body1Assignment_619417);\n ruleBodyReference();\n\n state._fsp--;\n\n after(grammarAccess.getJointAccess().getBody1BodyReferenceParserRuleCall_6_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public void getCurrentJointPosition(iiwa_msgs.JointPosition currentJointPosition, LBR robot) {\n double[] position = robot.getCurrentJointPosition().getInternalArray();\n currentJointPosition.getHeader().setStamp(time.getCurrentTime());\n Conversions.vectorToJointQuantity(position, currentJointPosition.getPosition());\n }", "public PageFrame getHeadFrame() {\n return ram[head][0];\n }", "public T caseJointRef(JointRef object) {\r\n\t\treturn null;\r\n\t}", "public static void buildFrame() {\r\n\t\t// Make sure we have nice window decorations\r\n\t\tJFrame.setDefaultLookAndFeelDecorated(true);\r\n\t\t\r\n\t\t// Create and set up the window.\r\n\t\t//ParentFrame frame = new ParentFrame();\r\n\t\tMediator frame = new Mediator();\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\t\r\n\t\t// Display the window\r\n\t\tframe.setVisible(true);\r\n\t}", "static public NewRotateLeft create(AnimatableModelInstance originObject, ModelInstance targetObject, int duration) {\n\t\t\n\t\t\n\t\t\n\t\tVector3 posT = new Vector3();\n\t\ttargetObject.transform.getTranslation(posT);\t\t\n\t\t\t\n\t\treturn create(originObject, posT.x, posT.y, duration);\n\t}", "public void frontUp(){\n frontSolenoid.set(DoubleSolenoid.Value.kForward);\n }", "public Frame readFrame() {\n _buffer.flip();\n if(_buffer.hasRemaining()) {\n int frameSize = _buffer.getInt();\n byte[] body = new byte[frameSize];\n _buffer.get(body);\n return new Frame(frameSize, body);\n } else {\n return null;\n }\n }", "@Test(expected = IllegalArgumentException.class)\r\n\tpublic void createWithSameBody() {\r\n\t\tnew WeldJoint<Body>(b1, b1, new Vector2());\r\n\t}", "private com.google.protobuf.SingleFieldBuilderV3<\n org.apache.calcite.avatica.proto.Common.Frame, org.apache.calcite.avatica.proto.Common.Frame.Builder, org.apache.calcite.avatica.proto.Common.FrameOrBuilder> \n getFrameFieldBuilder() {\n if (frameBuilder_ == null) {\n frameBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<\n org.apache.calcite.avatica.proto.Common.Frame, org.apache.calcite.avatica.proto.Common.Frame.Builder, org.apache.calcite.avatica.proto.Common.FrameOrBuilder>(\n getFrame(),\n getParentForChildren(),\n isClean());\n frame_ = null;\n }\n return frameBuilder_;\n }", "public void rebuildFrame(){\n \n // Re-initialize frame with default attributes\n controlFrame.dispose();\n controlFrame = buildDefaultFrame(\"CSCI 446 - A.I. - Montana State University\");\n \n // Initialize header with default attributes\n header = buildDefaultHeader();\n \n // Initialize control panel frame with default attributes\n controlPanel = buildDefaultPanel(BoxLayout.Y_AXIS);\n \n // Combine objects\n controlPanel.add(header, BorderLayout.NORTH);\n controlFrame.add(controlPanel);\n \n }", "private SequenceFlow createSequenceFlow(FlowNode source, FlowNode target, ICreateConnectionContext context) {\r\n SequenceFlow sequenceFlow = new SequenceFlow();\r\n\r\n sequenceFlow.setId(getNextId());\r\n sequenceFlow.setSourceRef(source.getId());\r\n sequenceFlow.setTargetRef(target.getId());\r\n\r\n if (PreferencesUtil.getBooleanPreference(Preferences.EDITOR_ADD_LABELS_TO_NEW_SEQUENCEFLOWS)) {\r\n sequenceFlow.setName(String.format(\"to %s\", target.getName()));\r\n } else {\r\n sequenceFlow.setName(\"\");\r\n }\r\n\r\n ContainerShape targetContainer = null;\r\n if (source instanceof BoundaryEvent) {\r\n BoundaryEvent boundaryEvent = (BoundaryEvent) source;\r\n if (boundaryEvent.getAttachedToRef() != null) {\r\n Activity attachedActivity = boundaryEvent.getAttachedToRef();\r\n targetContainer = (ContainerShape) getFeatureProvider().getPictogramElementForBusinessObject(attachedActivity);\r\n }\r\n } else {\r\n targetContainer = (ContainerShape) context.getSourcePictogramElement();\r\n }\r\n \r\n ContainerShape parentContainer = targetContainer.getContainer();\r\n if (parentContainer instanceof Diagram) {\r\n ModelHandler.getModel(EcoreUtil.getURI(getDiagram())).getBpmnModel().getMainProcess().addFlowElement(sequenceFlow);\r\n\r\n } else {\r\n Object parentObject = getBusinessObjectForPictogramElement(parentContainer);\r\n if (parentObject instanceof SubProcess) {\r\n ((SubProcess) parentObject).addFlowElement(sequenceFlow);\r\n\r\n } else if (parentObject instanceof Lane) {\r\n Lane lane = (Lane) parentObject;\r\n lane.getParentProcess().addFlowElement(sequenceFlow);\r\n }\r\n }\r\n \r\n source.getOutgoingFlows().add(sequenceFlow);\r\n target.getIncomingFlows().add(sequenceFlow);\r\n return sequenceFlow;\r\n }", "@Test(expected = NullPointerException.class)\r\n\tpublic void createWithNullBody1() {\r\n\t\tnew WeldJoint<Body>(null, b2, new Vector2());\r\n\t}", "protected void createFrames() {\n createStandingRight();\n createStandingLeft();\n createWalkingRight();\n createWalkingLeft();\n createJumpingRight();\n createJumpingLeft();\n createDying();\n }", "public int getJointIndex() {\r\n\t\treturn this.jointIndex;\r\n\t}", "public void initActor(){\n this.root = new Node(\"root\");\n this.body = new Node(\"body\");\n this.rLeg = new Node(\"rLeg\");\n this.lLeg = new Node(\"lLeg\");\n this.rArm = new Node(\"rArm\");\n this.lArm = new Node(\"lArm\");\n this.head = new Node(\"head\");\n this.handle = new Node(\"handle\");\n \n //r2 -- Add a weapons node and create empty target node\n this.weapon = new Node(\"weapon\");\n this.target_pivot = new Node(\"target\");\n \n //Create the relationships between the joint nodes\n this.root.attachChild(this.body);\n this.handle.attachChild(this.root);\n this.body.attachChild(this.lLeg);\n this.body.attachChild(this.rLeg);\n this.body.attachChild(this.lArm);\n this.body.attachChild(this.rArm);\n this.body.attachChild(this.head);\n this.rArm.attachChild(this.weapon);\n \n //Move joints to local positions\n this.body.move(0,3f,0);\n this.lLeg.move(0.5f,0,0);\n this.rLeg.move(-0.5f,0,0);\n this.lArm.move(1.5f,3f,0);\n this.rArm.move(-1.5f,3f,0);\n this.head.move(0,3f,0);\n this.weapon.move(0,-3f,0.75f);\n \n \n //Create the physical dimensions of the actor 'minecraft-style'\n this.legBox = new Box(0.5f, 1.5f, 0.5f);\n this.bodyBox = new Box(1, 1.5f, 0.5f);\n this.armBox = new Box(0.5f, 1.5f, 0.5f);\n this.headBox = new Box(1, 1, 1);\n this.weaponBox = new Box(0.25f,0.75f,0.25f);\n \n //Create the visual elements and add materials\n this.lLegGeom = new Geometry(\"lLeg\", this.legBox);\n this.rLegGeom = new Geometry(\"rLeg\", this.legBox);\n this.bodyGeom = new Geometry(\"Body\", this.bodyBox);\n this.lArmGeom = new Geometry(\"lArm\", this.armBox);\n this.rArmGeom = new Geometry(\"rArm\", this.armBox);\n this.headGeom = new Geometry(\"Head\", this.headBox);\n this.weaponGeom = new Geometry(\"Weapon\", this.weaponBox);\n \n //Set materials\n this.lLegGeom.setMaterial(this.legMat);\n this.rLegGeom.setMaterial(this.legMat);\n this.bodyGeom.setMaterial(this.bodyMat);\n this.lArmGeom.setMaterial(this.armMat);\n this.rArmGeom.setMaterial(this.armMat);\n this.headGeom.setMaterial(this.headMat);\n \n //TODO: Give weapons their own material\n this.weaponGeom.setMaterial(this.legMat);\n \n //Set the local transforms of geometry to align with joints properly\n this.lLegGeom.move(0,-1.5f,0);\n this.rLegGeom.move(0,-1.5f,0);\n this.bodyGeom.move(0,1.5f,0);\n this.lArmGeom.move(0,-1.5f,0);\n this.rArmGeom.move(0,-1.5f,0);\n this.headGeom.move(0,1f,0);\n this.weaponGeom.move(0,0,0);\n \n //Attach geometries to nodes\n this.body.attachChild(this.bodyGeom);\n this.lLeg.attachChild(this.lLegGeom);\n this.rLeg.attachChild(this.rLegGeom);\n this.lArm.attachChild(this.lArmGeom);\n this.rArm.attachChild(this.rArmGeom);\n this.head.attachChild(this.headGeom);\n this.weapon.attachChild(this.weaponGeom);\n \n Quaternion xRot = new Quaternion().fromAngleAxis(FastMath.DEG_TO_RAD * 0,Vector3f.UNIT_X.clone());\n Quaternion yRot = new Quaternion().fromAngleAxis(FastMath.DEG_TO_RAD * 0,Vector3f.UNIT_Z.clone());\n \n //Refactor ActorControl with Character Control\n CapsuleCollisionShape capsuleShape = new CapsuleCollisionShape(2.5f,3f,1);\n this.mobControl = new CharacterControl(capsuleShape, 3f);//Step size is set in last argument\n this.mobControl.setJumpSpeed(20);\n this.mobControl.setFallSpeed(45);\n this.mobControl.setGravity(50);\n \n \n this.root.setLocalRotation(xRot.mult(yRot));\n //this.handle.getLocalRotation().lookAt(Vector3f.UNIT_Z, Vector3f.UNIT_Y);\n \n this.root.scale(0.75f, 0.75f, 0.75f);\n \n //this.handle.setLocalTranslation(10f, 5f, 15f);\n \n rootNode.attachChild(this.handle);\n }", "public B2FlxPulleyJoint(B2FlxShape spriteA, B2FlxShape spriteB, PulleyJointDef jointDef)\r\n\t{\r\n\t\tsuper(spriteA, spriteB, jointDef);\r\n\t\tanchorA = bodyA.getWorldCenter();\r\n\t\tanchorB = bodyB.getWorldCenter();\r\n\t}", "protected static CTGraphicalObjectFrame prototype() {\n\t\tif (prototype == null) {\n\t\t\tCTGraphicalObjectFrame graphicFrame = CTGraphicalObjectFrame.Factory.newInstance();\n\n\t\t\tCTGraphicalObjectFrameNonVisual nvGraphic = graphicFrame.addNewNvGraphicFramePr();\n\t\t\tCTNonVisualDrawingProps props = nvGraphic.addNewCNvPr();\n\t\t\tprops.setId(0);\n\t\t\tprops.setName(\"Diagramm 1\");\n\t\t\tnvGraphic.addNewCNvGraphicFramePr();\n\n\t\t\tCTTransform2D transform = graphicFrame.addNewXfrm();\n\t\t\tCTPositiveSize2D extPoint = transform.addNewExt();\n\t\t\tCTPoint2D offPoint = transform.addNewOff();\n\n\t\t\textPoint.setCx(0);\n\t\t\textPoint.setCy(0);\n\t\t\toffPoint.setX(0);\n\t\t\toffPoint.setY(0);\n\n\t\t\tCTGraphicalObject graphic = graphicFrame.addNewGraphic();\n\n\t\t\tprototype = graphicFrame;\n\t\t}\n\t\treturn prototype;\n\t}", "public Front() {\n\t\twheels.getrWheel().getBoundingSphereTree().getBoundingSphere().translateCenter(0.8 * Specification.TIRE_RADIUS, 0.5 * Specification.TIRE_RADIUS, 0.5 * Specification.B_DEPTH - 1.1 * Specification.TIRE_DEPTH);\n\t\twheels.getlWheel().getBoundingSphereTree().getBoundingSphere().translateCenter(0.8 * Specification.TIRE_RADIUS, 0.5 * Specification.TIRE_RADIUS, -0.5 * Specification.B_DEPTH + 1.1 * Specification.TIRE_DEPTH);\n\t}", "@Test(expected = NullPointerException.class)\r\n\tpublic void createWithNullBody2() {\r\n\t\tnew WeldJoint<Body>(b1, null, new Vector2());\r\n\t}", "public Vec4 getReferencePoint()\n {\n return this.currentData.getReferencePoint();\n }", "@Override\n protected Object getModelObject()\n {\n return frame;\n }", "Activity getTransformForwardActivity();", "public void build() {\n x = vertices.get(0);\n y = vertices.get(1);\n vertices.reverse();\n BodyFactory.createPolyLine(x, y, vertices.toArray(), BodyDef.BodyType.StaticBody, LineType.SOLID);\n }", "public Frame prevFrame(final Frame frame) {\n\t\tif (isInitialFrame(frame))throw new IllegalStateException(\"Invalid Entry\");// input sanitization -- out of bounds when at first frame\n\t\telse return frames.get(frames.indexOf(frame) - 1);\n\t}", "public final void rule__Joint__RelTrans1Assignment_7() 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:9685:1: ( ( ruleRelativeTransformation ) )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:9686:1: ( ruleRelativeTransformation )\n {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:9686:1: ( ruleRelativeTransformation )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:9687:1: ruleRelativeTransformation\n {\n before(grammarAccess.getJointAccess().getRelTrans1RelativeTransformationParserRuleCall_7_0()); \n pushFollow(FOLLOW_ruleRelativeTransformation_in_rule__Joint__RelTrans1Assignment_719448);\n ruleRelativeTransformation();\n\n state._fsp--;\n\n after(grammarAccess.getJointAccess().getRelTrans1RelativeTransformationParserRuleCall_7_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public JexlEngine.Frame createFrame(Object... values) {\r\n return scope != null? scope.createFrame(values) : null;\r\n }", "public final HingeJoint newHingeJoint( Body body1, Body body2 )\n {\n HingeJoint joint = newHingeJointImpl( body1, body2 );\n \n //addJoint( joint );\n \n return ( joint );\n }", "private void createFrame(){\n System.out.println(\"Assembling \" + name + \" frame.\");\n }", "public void attachStructure(CrosswordStructure structure);", "protected abstract Hinge2Joint newHinge2JointImpl( Body body1, Body body2 );", "@View( VIEW_CREATE_REFERENCE )\r\n public String getCreateReference( HttpServletRequest request )\r\n {\r\n _reference = ( _reference != null ) ? _reference : new Reference( );\r\n Map<String, Object> model = getModel( );\r\n model.put( MARK_REFERENCE, _reference );\r\n return getPage( PROPERTY_PAGE_TITLE_CREATE_REFERENCE, TEMPLATE_CREATE_REFERENCE, model );\r\n }", "public Reference() {\n super();\n }", "public void xsetFrame(com.walgreens.rxit.ch.cda.StrucDocTable.Frame frame)\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.walgreens.rxit.ch.cda.StrucDocTable.Frame target = null;\n target = (com.walgreens.rxit.ch.cda.StrucDocTable.Frame)get_store().find_attribute_user(FRAME$24);\n if (target == null)\n {\n target = (com.walgreens.rxit.ch.cda.StrucDocTable.Frame)get_store().add_attribute_user(FRAME$24);\n }\n target.set(frame);\n }\n }", "public void\nshiftToOrigin()\n{\n\tthis.setLine(0.0, 0.0,\n\t\tthis.getP2().getX() - this.getP1().getX(),\n\t\tthis.getP2().getY() - this.getP1().getY());\n}", "@Override\n protected void initialize() {\n mDrive.resetGyroPosition();\n try {\n Trajectory left_trajectory = PathfinderFRC.getTrajectory(pathName + \".left\");\n Trajectory right_trajectory = PathfinderFRC.getTrajectory(pathName + \".right\");\n\n m_left_follower = new EncoderFollower(left_trajectory);\n m_right_follower = new EncoderFollower(right_trajectory);\n\n if(isBackwards) {\n initBackwards();\n } else {\n initForwards();\n }\n } catch (IOException e) {\n\t\t e.printStackTrace();\n\t }\n }", "static void translateToFace(MatrixStack matrices, PlayerEntityModel<AbstractClientPlayerEntity> model,\n\t\t\tAbstractClientPlayerEntity player, float headYaw, float headPitch) {\n\n\t\tif (player.isInSwimmingPose() || player.isFallFlying()) {\n\t\t\tmatrices.multiply(RotationAxis.POSITIVE_Z.rotationDegrees(model.head.roll));\n\t\t\tmatrices.multiply(RotationAxis.POSITIVE_Y.rotationDegrees(headYaw));\n\t\t\tmatrices.multiply(RotationAxis.POSITIVE_X.rotationDegrees(-45.0F));\n\t\t} else {\n\n\t\t\tif (player.isInSneakingPose() && !model.riding) {\n\t\t\t\tmatrices.translate(0.0F, 0.25F, 0.0F);\n\t\t\t}\n\t\t\tmatrices.multiply(RotationAxis.POSITIVE_Y.rotationDegrees(headYaw));\n\t\t\tmatrices.multiply(RotationAxis.POSITIVE_X.rotationDegrees(headPitch));\n\t\t}\n\t\tmatrices.translate(0.0F, -0.25F, -0.3F);\n\t}", "public TransformNR getHeadLocation(){\n\t\treturn headLocation;\n\t}", "public final BallJoint newBallJoint( Body body1, Body body2 )\n {\n BallJoint joint = newBallJointImpl( body1, body2 );\n \n //addJoint( joint );\n \n return ( joint );\n }", "public GeneralPath createArrowHeads() {\n return OMArrowHead.createArrowHeads(OMArrowHead.ARROWHEAD_DIRECTION_FORWARD,\n 100,\n this,\n OMArrowHead.DEFAULT_WINGTIP,\n OMArrowHead.DEFAULT_WINGLENGTH);\n }", "public Builder mergeFirstFrame(org.apache.calcite.avatica.proto.Common.Frame value) {\n if (firstFrameBuilder_ == null) {\n if (firstFrame_ != null) {\n firstFrame_ =\n org.apache.calcite.avatica.proto.Common.Frame.newBuilder(firstFrame_).mergeFrom(value).buildPartial();\n } else {\n firstFrame_ = value;\n }\n onChanged();\n } else {\n firstFrameBuilder_.mergeFrom(value);\n }\n\n return this;\n }", "private static String[] BackSub(Matrix REF){\r\n\t\t// Start at bottom right of Matrix -1 to offset starting from index 0\r\n\t\t// Track two index\r\n\t\t// [1, 2, 3| 1] \r\n\t\t// [1, 2, 3| 1] \r\n\t\t// [1, 2, 3| 1] < (rowPoint, augmentY)\r\n\t\t//\t\t ^\r\n\t\t//(rowPoint, colPoint)\r\n\t\t//\t REF.col\r\n\t\t// ------------\r\n\t\t// [ ] |\r\n\t\t// [ ] | REF.row\r\n\t\t// [ ] |\r\n\t\tint rowPoint = REF.row() - 1;\r\n\t\tint colPoint = REF.col() - 2;\r\n\t\tint augmentY = REF.col() - 1;\r\n\t\tDouble[][] REFval = REF.getAll();\r\n\t\t// if matrix inconsistent the last rows will look like [0,...,0| 1]\r\n\t\tif (REFval[rowPoint][colPoint] == 0 && REFval[rowPoint][augmentY] != 0) {\r\n\t\t\treturn null;\r\n\t\t}else {\r\n\t\t\tString[] Solution = new String[REF.col - 1];\r\n\t\t\t// find first pivot\r\n\t\t\t// we now have form ax + b + .. + c = d\r\n\t\t\t// x = (d - b - .. - c)/a\r\n\t\t\twhile (rowPoint >= 0) {\r\n\t\t\t\tDouble[] row = REFval[rowPoint];\r\n\t\t\t\tMatrix.processRow(Solution, row);\r\n\t\t\t\trowPoint--;\r\n\t\t\t}\r\n\t\t\treturn Solution;\r\n\t\t}\r\n\t}", "@Override\n public void onNewFrame(HeadTransform headTransform) {\n float[] mtx = new float[16];\n GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT | GLES20.GL_DEPTH_BUFFER_BIT);\n surface.updateTexImage();\n surface.getTransformMatrix(mtx);\n }", "public frame() {\r\n\t\tframeOwner = 0;\r\n\t\tassignedProcess = 0;\r\n\t\tpageNumber = 0;\r\n\t}", "ReferenceLink createReferenceLink();", "public void createFrame() {\r\n System.out.println(\"Framing: Adding the log walls.\");\r\n }", "private Frame initFrameExternalConstraintForNonOverlappingCircle() {\n\n return new NonOverlappingFrame();\n }", "public interface FrameBuilder {\r\n\r\n /**\r\n * Creates graphic frames.\r\n * @param num The frame index for which the graphic is to be \r\n * produced for.\r\n * @return The graphic for the respective frame index.\r\n */\r\n Graphic create(int num);\r\n }", "public static native PointerByReference OpenMM_AmoebaTorsionTorsionForce_create();", "public Point getReferencePoint(){\n return referencePoint;\n }", "public RMParentShape getParent() { return _parent; }", "private void onUpdateFrame(FrameTime frameTime) {\n Frame frame = arFragment.getArSceneView().getArFrame();\n\n //In case there's no frame\n if (frame == null) {\n return;\n }\n\n //Used to Create Model at a certain Point on the Floor automatically\n if (frame.getCamera().getTrackingState() == TrackingState.TRACKING && !placed) {\n Pose pos = frame.getCamera().getPose().compose(Pose.makeTranslation(1f, 0f, -2.5f));\n\n //Anchor Node to set the Model in place\n Anchor anchor = arFragment.getArSceneView().getSession().createAnchor(pos);\n AnchorNode anchorNode = new AnchorNode(anchor);\n anchorNode.setParent(arFragment.getArSceneView().getScene());\n\n createModel(anchorNode, activeNode, activeRenderable);\n }\n }", "public void getCurrentCartesianPose(iiwa_msgs.CartesianPose currentPose, LBR robot, ObjectFrame frame) {\n Frame cartesianFrame = robot.getCurrentCartesianPosition(frame);\n Transformation transform = cartesianFrame.transformationFromWorld();\n\n currentPose.getPoseStamped().getHeader().setFrameId(baseFrameID);\n currentPose.getPoseStamped().getHeader().setStamp(time.getCurrentTime());\n\n Conversions.kukaTransformationToRosPose(transform, currentPose.getPoseStamped().getPose());\n\n LBRE1Redundancy redundancy = (LBRE1Redundancy) cartesianFrame.getRedundancyInformationForDevice(robot);\n currentPose.getRedundancy().setE1(redundancy.getE1());\n currentPose.getRedundancy().setStatus(redundancy.getStatus());\n currentPose.getRedundancy().setTurn(redundancy.getTurn());\n }", "public WorldCoord getFrameLinkset()\r\n/* 45: */ {\r\n/* 46: 34 */ return null;\r\n/* 47: */ }", "private com.google.protobuf.SingleFieldBuilderV3<\n com.google.cloud.networkmanagement.v1beta1.ForwardInfo,\n com.google.cloud.networkmanagement.v1beta1.ForwardInfo.Builder,\n com.google.cloud.networkmanagement.v1beta1.ForwardInfoOrBuilder>\n getForwardFieldBuilder() {\n if (forwardBuilder_ == null) {\n if (!(stepInfoCase_ == 13)) {\n stepInfo_ = com.google.cloud.networkmanagement.v1beta1.ForwardInfo.getDefaultInstance();\n }\n forwardBuilder_ =\n new com.google.protobuf.SingleFieldBuilderV3<\n com.google.cloud.networkmanagement.v1beta1.ForwardInfo,\n com.google.cloud.networkmanagement.v1beta1.ForwardInfo.Builder,\n com.google.cloud.networkmanagement.v1beta1.ForwardInfoOrBuilder>(\n (com.google.cloud.networkmanagement.v1beta1.ForwardInfo) stepInfo_,\n getParentForChildren(),\n isClean());\n stepInfo_ = null;\n }\n stepInfoCase_ = 13;\n onChanged();\n return forwardBuilder_;\n }", "void currentFrame(List<IShape> shapes);" ]
[ "0.69804794", "0.6917459", "0.510971", "0.48451447", "0.48108706", "0.47712603", "0.47413945", "0.47106132", "0.4708251", "0.46912026", "0.46747488", "0.4669283", "0.46322867", "0.46218035", "0.46186918", "0.46137232", "0.460568", "0.45675194", "0.45555007", "0.4551381", "0.45463914", "0.45314932", "0.4530356", "0.45096487", "0.45011032", "0.4490231", "0.44666654", "0.44542632", "0.44469976", "0.44389004", "0.44336933", "0.44331205", "0.44274136", "0.43901688", "0.4387176", "0.4375183", "0.43561053", "0.43446258", "0.43435842", "0.43343443", "0.43072885", "0.43006292", "0.4297264", "0.4295831", "0.42947823", "0.4290195", "0.42788002", "0.42705068", "0.42701122", "0.42530727", "0.42476788", "0.42442048", "0.4238387", "0.42382598", "0.42169487", "0.42166632", "0.42132956", "0.42120215", "0.4209406", "0.42086008", "0.42000577", "0.41920003", "0.41917497", "0.41905645", "0.41868645", "0.41487762", "0.41479692", "0.41475546", "0.41447866", "0.41383177", "0.41290846", "0.41261062", "0.4125386", "0.41237235", "0.4111844", "0.41092163", "0.4102897", "0.41004297", "0.4096117", "0.40952232", "0.40929097", "0.4091845", "0.40898478", "0.40844434", "0.40841195", "0.40833536", "0.40826526", "0.40781555", "0.40772805", "0.40770143", "0.4070713", "0.40699142", "0.40683445", "0.40640274", "0.4062472", "0.40622422", "0.40616012", "0.40603572", "0.4058176", "0.4056725" ]
0.6960459
1
Creates the reference frame that is at the joint and rigidly attached to the joint's predecessor.
public static MovingReferenceFrame newJointFrame(JointReadOnly joint, RigidBodyTransformReadOnly transformToParent, String beforeJointName) { MovingReferenceFrame parentFrame; RigidBodyReadOnly parentBody = joint.getPredecessor(); if (parentBody.isRootBody()) { parentFrame = parentBody.getBodyFixedFrame(); /* * TODO Special case to keep the beforeJointFrame of the SixDoFJoint to be the elevatorFrame. This * should probably removed, might cause reference frame exceptions though. */ if (transformToParent == null) return parentFrame; } else parentFrame = parentBody.getParentJoint().getFrameAfterJoint(); return MovingReferenceFrame.constructFrameFixedInParent(beforeJointName, parentFrame, transformToParent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static MovingReferenceFrame newFrameAfterJoint(JointReadOnly joint)\n {\n MovingReferenceFrame frameBeforeJoint = joint.getFrameBeforeJoint();\n\n if (frameBeforeJoint == null)\n throw new NullPointerException(\"The frameBeforeJoint has to be created before the frameAfterJoint.\");\n\n return new MovingReferenceFrame(\"after\" + MecanoTools.capitalize(joint.getName()), frameBeforeJoint)\n {\n @Override\n protected void updateTransformToParent(RigidBodyTransform transformToParent)\n {\n joint.getJointConfiguration(transformToParent);\n }\n\n @Override\n protected void updateTwistRelativeToParent(Twist twistRelativeToParentToPack)\n {\n twistRelativeToParentToPack.setIncludingFrame(joint.getJointTwist());\n }\n };\n }", "public static MovingReferenceFrame newFrameBeforeJoint(JointReadOnly joint, RigidBodyTransformReadOnly transformToParent)\n {\n String beforeJointName = \"before\" + MecanoTools.capitalize(joint.getName());\n\n return newJointFrame(joint, transformToParent, beforeJointName);\n }", "@Override\r\n protected void computeReferencePoint ()\r\n {\r\n setReferencePoint(getHeadLocation());\r\n }", "public static NewRotateLeft create(AnimatableModelInstance originObject, float ex, float ey, int duration) {\n\n\t\tVector3 posO = originObject.transState.position.cpy();\t\n\t\t//Vector3 posO = new Vector3();\n\t\t//originObject.transform.getTranslation(posO);\n\t\t\n\t\tQuaternion rotation = originObject.transState.rotation.cpy();\t\n\t\t//Quaternion rotation = new Quaternion();\n\t\t//originObject.transform.getRotation(rotation,true); //existing rotation\n\t\t\n\t\t Vector3 axisVec = new Vector3();\n\t float existingangle = (float) (rotation.getAxisAngle(axisVec) * axisVec.nor().z);\n\t existingangle = existingangle < 0 ? existingangle + 360 : existingangle; //convert <0 values\n\t\t\n\t\tGdx.app.log(logstag,\"_____________________________________existing angle=\"+existingangle); //relative to x axis pointing left anticlockwise\n\t\n\t\t//float scalex = originObject.transform.getScaleX(); //get how much the object has been scaled\n\t\t//float scaley = originObject.transform.getScaleY();\n\t\t\n\t\tVector2 fromPoint = new Vector2(posO.x,posO.y); //we need to scale them down due to how the positions might have been scaled up if the matrix is scaled (I hate how matrixs work :-/ Just cant get it in my head)\n\t\tVector2 tooPoint = new Vector2(ex,ey);\n\n\t\tfromPoint.sub(tooPoint); \n\n\t\t//Log.info(\"length=\"+corner2.len());\n\n\t\tfloat angle = 180+fromPoint.angle(); //absolute angle between the two objects\n\t\tGdx.app.log(logstag,\"________target angle=\"+angle); //should point towards ex/ey \n\t\t\n\t//\tfloat distance = fromPoint.len();\n\n\t\t\n\t\t//difference between this angle and existing one\n\t\tangle = angle - existingangle;\n\t\t\n\t\tNewRotateLeft rot = new NewRotateLeft(angle,500);\n\t\t//NewForward forward = new NewForward(distance,duration-500);\n\t\t\t\t\n\t\treturn rot;\n\t}", "public void buildFrame();", "public static FixedFrameWrenchBasics newPlanarFixedFrameWrenchBasics(ReferenceFrame bodyFrame, ReferenceFrame expressedInFrame)\n {\n return new FixedFrameWrenchBasics()\n {\n private final FixedFrameVector3DBasics angularPart = newYOnlyFixedFrameVector3DBasics(expressedInFrame);\n private final FixedFrameVector3DBasics linearPart = newXZOnlyFixedFrameVector3DBasics(expressedInFrame);\n\n @Override\n public ReferenceFrame getBodyFrame()\n {\n return bodyFrame;\n }\n\n @Override\n public ReferenceFrame getReferenceFrame()\n {\n return expressedInFrame;\n }\n\n @Override\n public FixedFrameVector3DBasics getAngularPart()\n {\n return angularPart;\n }\n\n @Override\n public FixedFrameVector3DBasics getLinearPart()\n {\n return linearPart;\n }\n\n @Override\n public String toString()\n {\n return MecanoIOTools.getWrenchString(this);\n }\n };\n }", "protected abstract FixedJoint newFixedJointImpl( Body body1, Body body2 );", "ReferenceTreatment createReferenceTreatment();", "public void createJoint(World world) {\n if (joint != null) {\n return;\n }\n joint = (RevoluteJoint) world.createJoint(this);\n }", "private void checkAndAddReferenceFrame(ReferenceFrame referenceFrame)\n {\n checkAndAddReferenceFrame(referenceFrame, referenceFrame.getNameBasedHashCode());\n }", "public void forward() {\n\t\t\n\t\tif(hasEaten()) {\n\t\t\taddBodyPart();\n\t\t} else {\n\t\t\tshuffleBody();\n\t\t}\n\t\t\n\t\tthis.setLocation(this.getX()+dX, this.getY()+dY); // move head\n\t\tthis.display(w); \n\t}", "public AddContactFrame(TableFrame tableFrame) {\n this(tableFrame, new Contact());\n }", "ReferenceEmbed createReferenceEmbed();", "public void getCurrentJointState(sensor_msgs.JointState currentJointState, LBR robot) {\n\n currentJointState.getHeader().setStamp(time.getCurrentTime());\n currentJointState.setName(Arrays.asList(joint_names));\n currentJointState.setPosition(robot.getCurrentJointPosition().getInternalArray());\n currentJointState.setEffort(robot.getMeasuredTorque().getTorqueValues());\n }", "@Test(expected = NullPointerException.class)\r\n\tpublic void createWithNullAnchor() {\r\n\t\tnew WeldJoint<Body>(b1, b2, null);\r\n\t}", "protected abstract HingeJoint newHingeJointImpl( Body body1, Body body2 );", "MolecularSequenceReferenceSeq getReferenceSeq();", "Frame createFrame();", "void updateJointTransform(RigidBodyTransform jointTransformToUpdate);", "public Record makeReferenceRecord(RecordOwner recordOwner)\n {\n try {\n return (Record)this.getRecord().clone();\n } catch (CloneNotSupportedException ex) {\n ex.printStackTrace();\n }\n return null;\n }", "public static FixedFrameTwistBasics newPlanarFixedFrameTwistBasics(ReferenceFrame bodyFrame, ReferenceFrame baseFrame, ReferenceFrame expressedInFrame)\n {\n return new FixedFrameTwistBasics()\n {\n private final FixedFrameVector3DBasics angularPart = newYOnlyFixedFrameVector3DBasics(expressedInFrame);\n private final FixedFrameVector3DBasics linearPart = newXZOnlyFixedFrameVector3DBasics(expressedInFrame);\n\n @Override\n public ReferenceFrame getBodyFrame()\n {\n return bodyFrame;\n }\n\n @Override\n public ReferenceFrame getBaseFrame()\n {\n return baseFrame;\n }\n\n @Override\n public ReferenceFrame getReferenceFrame()\n {\n return expressedInFrame;\n }\n\n @Override\n public FixedFrameVector3DBasics getAngularPart()\n {\n return angularPart;\n }\n\n @Override\n public FixedFrameVector3DBasics getLinearPart()\n {\n return linearPart;\n }\n\n @Override\n public String toString()\n {\n return MecanoIOTools.getTwistString(this);\n }\n };\n }", "public Joint (SkeletonJoint skeletonJoint) {\n\t\tthis.skeletonJoint = skeletonJoint;\n\t\tposition2d = new Vector2f();\n\t\tposition3d = new Vector3f();\n\t\tconfidence = 0;\n\t}", "private Frame initFrameExternalConstraintForCompatible() {\n return new NonOverlappingFrame();\n }", "private Frame initFrameExternalConstraintForIncluded() {\n\n return new NonOverlappingFrame();\n }", "public static Vector4 forward()\n {\n return new Vector4(0,0,1,0);\n }", "FRAME createFRAME();", "public static Entity translate(Frame frame)\r\n/* 54: */ {\r\n/* 55:65 */ return (Entity)frame.getThing().clone();\r\n/* 56: */ }", "@Test\r\n\tpublic void createSuccess() {\r\n\t\tnew WeldJoint<Body>(b1, b2, new Vector2());\r\n\t}", "protected abstract BallJoint newBallJointImpl( Body body1, Body body2 );", "public void run() {\n\tObjectFrame flange = lbr_iiwa_14_R820_1.getFlange();\t\t//flange frame\n\tObjectFrame lbrRoot = lbr_iiwa_14_R820_1.getRootFrame();\t//root frame\n\t\t\t\n\t// define frames for task trajectory:\n\tFrame F_contactEnd = new Frame(lbrRoot,500,0,385,Math.toRadians(180),Math.toRadians(0),Math.toRadians(180));\n\t\n\tFrame F_tmp = F_contactEnd.copy();\n\t\n\tF_flyMin \t\t= F_tmp.transform(lbrRoot,XyzAbcTransformation.ofTranslation( -40,0, 50)).copy();\n\tF_fly3 \t\t\t= F_tmp.transform(lbrRoot,XyzAbcTransformation.ofTranslation( 40,0, 60)).copy();\n\tF_fly4 \t\t\t= F_tmp.transform(lbrRoot,XyzAbcTransformation.ofTranslation( 200,0, 0)).copy();\n\tF_flyMax \t\t= F_tmp.transform(lbrRoot,XyzAbcTransformation.ofTranslation( 40,0, -60)).copy();\t\t\n\tF_contactStart \t= F_tmp.transform(lbrRoot,XyzAbcTransformation.ofTranslation( -40,0, -50)).copy();\n\t\n\tSystem.out.println(String.format(\"F_flyMin, x: %1$f y: %2$f z: %3$f\", F_flyMin.getX(), F_flyMin.getY(), F_flyMin.getZ()));\n\tSystem.out.println(String.format(\"F_fly3, x: %1$f y: %2$f z: %3$f\", F_fly3.getX(), F_fly3.getY(), F_fly3.getZ()));\n\tSystem.out.println(String.format(\"F_fly4, x: %1$f y: %2$f z: %3$f\", F_fly4.getX(), F_fly4.getY(), F_fly4.getZ()));\n\tSystem.out.println(String.format(\"F_flyMax, x: %1$f y: %2$f z: %3$f\", F_flyMax.getX(), F_flyMax.getY(), F_flyMax.getZ()));\n\tSystem.out.println(String.format(\"F_contactStart, x: %1$f y: %2$f z: %3$f\", F_contactStart.getX(), F_contactStart.getY(), F_contactStart.getZ()));\n\t\n\tSpline flyingPhase_spline = new Spline(\n\t\t\tlin(F_contactEnd),\n\t\t\tspl(F_flyMin).setOrientationType(SplineOrientationType.Ignore),\n\t\t\tlin(F_fly3).setOrientationType(SplineOrientationType.Ignore),\n\t\t\tspl(F_fly4).setOrientationType(SplineOrientationType.Ignore),\n\t\t\tlin(F_flyMax).setOrientationType(SplineOrientationType.Ignore),\n\t\t\tspl(F_contactStart)\n\t\t);\n\t\n\t\n\t// move to standBy position:\n\tSystem.out.println(\"going to standBy position\");\n\tlbr_iiwa_14_R820_1.move(ptp(J_standBy).setJointVelocityRel(vRel_taxing));\n\t\n\n\t\n\t/*\n\tSystem.out.println(\"going to end frame of contact phase\");\n\tlbr_iiwa_14_R820_1.move(lin(F_contactEnd).setCartVelocity(v_taxing));\n\t*/\n\t\n\t/*\n\tlbr_iiwa_14_R820_1.move(lin(F_flyMin).setCartVelocity(v_taxing));\n\tlbr_iiwa_14_R820_1.move(lin(F_fly3).setCartVelocity(v_taxing));\n\tlbr_iiwa_14_R820_1.move(lin(F_fly4).setCartVelocity(v_taxing));\n\t\n\tlbr_iiwa_14_R820_1.move(lin(F_flyMax).setCartVelocity(v_taxing));\n\tlbr_iiwa_14_R820_1.move(lin(F_contactStart).setCartVelocity(v_taxing));\n\tlbr_iiwa_14_R820_1.move(lin(F_contactEnd).setCartVelocity(v_taxing)); \n\t*/\n\t\n\t/*\n\tSystem.out.println(\"start flying phase - spline (3x)\");\n\tfor (int i=1; i<=3; i++)\n\t{\n\t\tlbr_iiwa_14_R820_1.move(flyingPhase_spline.setCartVelocity(v_fly).setCartAcceleration(250));\n\t}\n\t*/\n\t\n\t/*\n\tSystem.out.println(\"start flying phase - batch\");\n\tlbr_iiwa_14_R820_1.moveAsync(batch(\n\t\t\tlin(F_contactEnd),\n\t\t\tlin(F_flyMin).setOrientationType(SplineOrientationType.Ignore),\n\t\t\tlin(F_fly3).setOrientationType(SplineOrientationType.Ignore),\n\t\t\tlin(F_fly4).setOrientationType(SplineOrientationType.Ignore),\n\t\t\tlin(F_flyMax).setOrientationType(SplineOrientationType.Ignore),\n\t\t\tlin(F_contactStart)\n\t).setCartVelocity(v_fly));\n\t*/\n\t\n\t\n\tSystem.out.println(\"Setting impedance mode\");\n\tCartesianImpedanceControlMode cartImpMode = new CartesianImpedanceControlMode();\n\n\t/*\n\tcartImpMode.parametrize(CartDOF.TRANSL).setStiffness(1500);\n\tcartImpMode.parametrize(CartDOF.TRANSL).setDamping(0.7);\n\n\tcartImpMode.parametrize(CartDOF.Z).setStiffness(100);\n\n\tcartImpMode.parametrize(CartDOF.ROT).setStiffness(200);\n\tcartImpMode.parametrize(CartDOF.ROT).setDamping(0.7);\n\n\tcartImpMode.setNullSpaceDamping(0.3);\n\tcartImpMode.setNullSpaceStiffness(0);\n\n\tcartImpMode.setMaxControlForce(30, 30, 30, 10, 10, 10, false);\n\t*/\n\t\n\t// manage data recording\n\tDataRecorder rec = new DataRecorder(); //data recording \n\trec.setFileName(\"Recording.log\");\n\trec.setSampleRate(100);\n\trec.addCartesianForce(lbr_iiwa_14_R820_1.getFlange(),lbrRoot);\n\tStartRecordingAction startAction = new StartRecordingAction(rec);\n\t\n\tForceCondition condstart = ForceCondition.createNormalForceCondition(null, CoordinateAxis.Z, 1); //recording trigger\n\tForceCondition condend = ForceCondition.createNormalForceCondition(null, CoordinateAxis.Z, force_z); //stop movement trigger\n\t\n\t\n\tSystem.out.println(\"going to start frame of contact phase\");\n\tlbr_iiwa_14_R820_1.move(lin(F_contactStart).setCartVelocity(v_taxing).setCartAcceleration(200));\t\n\t\n\t//start cycling\n\tfor (int i_cycle=1; i_cycle <= 3; i_cycle ++)\n\t{\n\t\tSystem.out.println(String.format(\"cycle # %1$d\", i_cycle));\n\t\t\n\t\t//PHASE 1: transition, landing\n\t\t//System.out.println(\"start transition phase, landing, impedance mode \");\n\t\t//lbr_iiwa_14_R820_1.move(linRel(0,0,-dz,lbrRoot).triggerWhen(condstart, startAction).breakWhen(condend).setCartVelocity(v_transition).setMode(cartImpMode));\n\t\t\n\t\tif (i_cycle == 1)\n\t\t{\n\t\t\t// check data recording\n\t\t\tSystem.out.println(\"recording activated\");\n\t\t\tif(rec.isFileAvailable())\n\t\t\t\tSystem.out.println(\"data file available\");\n\t\t\t\n\t\t\tURL url = rec.getURL();\n\t\t\tdummy = url.toString();\n\t\t\tSystem.out.println(dummy);\n\t\t}\n\t\t\n\t\t// print current force value\n\t\tForceSensorData data = lbr_iiwa_14_R820_1.getExternalForceTorque(lbr_iiwa_14_R820_1.getFlange());\n\t\tSystem.out.println(String.format(\"Fz = %1$f \",data.getForce().getZ()));\n\t\t\n\t\t// PHASE 2: contact phase\n\t\t//System.out.println(\"start contact phase, impedance mode\");\n\t\t//lbr_iiwa_14_R820_1.move(lin(F_contactEnd).setCartVelocity(v_contact).setMode(cartImpMode));\n\t\t/*\n\t\t// PHASE 3: transition phase, take off\n\t\tSystem.out.println(\"start transition phase, impedance mode\");\n\t\tlbr_iiwa_14_R820_1.move(linRel(0,0,dz,lbrRoot).setCartVelocity(v_transition).setMode(cartImpMode));\n\t\t*/\n\t\t// PHASE 4: flying phase \n\t\tSystem.out.println(\"start flying phase, swift\");\n\t\tlbr_iiwa_14_R820_1.move(flyingPhase_spline.setCartVelocity(v_fly).setCartAcceleration(250).setMode(cartImpMode));\n\t}\n\t\n\t\n\t// stop recording\n\trec.stopRecording();\n\tSystem.out.println(\"data recording stopped\");\n\t\n\t\n\t// move to standBy position:\n\tlbr_iiwa_14_R820_1.move(ptp(J_standBy).setJointVelocityRel(vRel_taxing));\n\t\t\n\t}", "@Override\n\tpublic void onNewFrame(HeadTransform headTransform) {\n\t}", "public PulleyJoint getJoint()\r\n\t{\r\n\t\treturn (PulleyJoint)joint;\r\n\t}", "private Frame buildFrame() {\n return new Frame(command, headers, body);\n }", "public KinectSkeleton(Main main) {\r\n Material matW = new Material(main.getAssetManager(), \"Common/MatDefs/Misc/Unshaded.j3md\");\r\n matW.setColor(\"Color\", ColorRGBA.Black);\r\n if (main.kinect.joint != null) {\r\n //starting joints\r\n float[][] StartingJoint = {{(float) main.kinect.joint[10][1] / 1000f, (float) main.kinect.joint[10][2] / 1000f, (float) main.kinect.joint[10][3] / 1000f}, //right wrist\r\n {(float) main.kinect.joint[9][1] / 1000f, (float) main.kinect.joint[9][2] / 1000f, (float) main.kinect.joint[9][3] / 1000f}, //right elbow\r\n {(float) main.kinect.joint[8][1] / 1000f, (float) main.kinect.joint[8][2] / 1000f, (float) main.kinect.joint[8][3] / 1000f}, //right shoulder\r\n {(float) main.kinect.joint[2][1] / 1000f, (float) main.kinect.joint[2][2] / 1000f, (float) main.kinect.joint[2][3] / 1000f}, //shoulder center\r\n {(float) main.kinect.joint[4][1] / 1000f, (float) main.kinect.joint[4][2] / 1000f, (float) main.kinect.joint[4][3] / 1000f}, //left shoulder\r\n {(float) main.kinect.joint[5][1] / 1000f, (float) main.kinect.joint[5][2] / 1000f, (float) main.kinect.joint[5][3] / 1000f}, //left elbow\r\n {(float) main.kinect.joint[0][1] / 1000f, (float) main.kinect.joint[0][2] / 1000f, (float) main.kinect.joint[0][3] / 1000f}, //hip center\r\n {(float) main.kinect.joint[0][1] / 1000f, (float) main.kinect.joint[0][2] / 1000f, (float) main.kinect.joint[0][3] / 1000f}, //hip center\r\n {(float) main.kinect.joint[0][1] / 1000f, (float) main.kinect.joint[0][2] / 1000f, (float) main.kinect.joint[0][3] / 1000f}, //hip center\r\n {(float) main.kinect.joint[0][1] / 1000f, (float) main.kinect.joint[0][2] / 1000f, (float) main.kinect.joint[0][3] / 1000f}, //hip center\r\n {(float) main.kinect.joint[0][1] / 1000f, (float) main.kinect.joint[0][2] / 1000f, (float) main.kinect.joint[0][3] / 1000f}, //hip center\r\n {(float) main.kinect.joint[13][1] / 1000f, (float) main.kinect.joint[13][2] / 1000f, (float) main.kinect.joint[13][3] / 1000f}, //left knee\r\n {(float) main.kinect.joint[17][1] / 1000f, (float) main.kinect.joint[17][2] / 1000f, (float) main.kinect.joint[17][3] / 1000f}}; //right knee\r\n //joint the starting joints connect to\r\n float[][] ConnectingJoint = {{(float) main.kinect.joint[9][1] / 1000f, (float) main.kinect.joint[9][2] / 1000f, (float) main.kinect.joint[9][3] / 1000f}, //right elbow\r\n {(float) main.kinect.joint[8][1] / 1000f, (float) main.kinect.joint[8][2] / 1000f, (float) main.kinect.joint[8][3] / 1000f}, //right shoulder\r\n {(float) main.kinect.joint[2][1] / 1000f, (float) main.kinect.joint[2][2] / 1000f, (float) main.kinect.joint[2][3] / 1000f}, //shoulder center\r\n {(float) main.kinect.joint[4][1] / 1000f, (float) main.kinect.joint[4][2] / 1000f, (float) main.kinect.joint[4][3] / 1000f}, //left shoulder\r\n {(float) main.kinect.joint[5][1] / 1000f, (float) main.kinect.joint[5][2] / 1000f, (float) main.kinect.joint[5][3] / 1000f}, //left elbow\r\n {(float) main.kinect.joint[6][1] / 1000f, (float) main.kinect.joint[6][2] / 1000f, (float) main.kinect.joint[6][3] / 1000f}, //left wrist\r\n {(float) main.kinect.joint[2][1] / 1000f, (float) main.kinect.joint[2][2] / 1000f, (float) main.kinect.joint[2][3] / 1000f}, //shoulder center\r\n {(float) main.kinect.joint[8][1] / 1000f, (float) main.kinect.joint[8][2] / 1000f, (float) main.kinect.joint[8][3] / 1000f}, //right shoulder\r\n {(float) main.kinect.joint[4][1] / 1000f, (float) main.kinect.joint[4][2] / 1000f, (float) main.kinect.joint[4][3] / 1000f}, //left shoulder\r\n {(float) main.kinect.joint[13][1] / 1000f, (float) main.kinect.joint[13][2] / 1000f, (float) main.kinect.joint[13][3] / 1000f}, //left knee\r\n {(float) main.kinect.joint[17][1] / 1000f, (float) main.kinect.joint[17][2] / 1000f, (float) main.kinect.joint[17][3] / 1000f}, //right knee\r\n {(float) main.kinect.joint[14][1] / 1000f, (float) main.kinect.joint[14][2] / 1000f, (float) main.kinect.joint[14][3] / 1000f}, //left ankle\r\n {(float) main.kinect.joint[18][1] / 1000f, (float) main.kinect.joint[18][2] / 1000f, (float) main.kinect.joint[18][3] / 1000f}}; //right ankle\r\n //start loop to connect all joints\r\n for (int i = 0; i < bones.length; i++) {\r\n Cylinder c = new Cylinder(10, 10, 0.04f, 1f, true);\r\n //set geometry, connect and transform cylinder, set material\r\n bones[i] = new Geometry(\"Cylinder\", c);\r\n setConnectiveTransform(ConnectingJoint[i], StartingJoint[i], bones[i]);\r\n bones[i].setMaterial(matW);\r\n //attach physics to bones\r\n RigidBodyControl phy = new RigidBodyControl(1f); //0f = 0 mass\r\n bones[i].addControl(phy);\r\n phy.setKinematic(true);\r\n //attach physics to world\r\n main.bulletAppState.getPhysicsSpace().add(phy);\r\n //attach to node so we can play\r\n skeleton.attachChild(bones[i]);\r\n }\r\n //float y = (float) main.kinect.joint[0][3] / 1000f+(float) main.kinect.joint[0][3] / 1000f;\r\n skeleton.move(0, 0.75f, 0);\r\n ;\r\n } else {\r\n System.out.println(\"NULL!\");\r\n }\r\n }", "@Override\n\tprotected void createFrameOrbit( String frameColor )\n\t{\n\t\t\n AlgebraicField hf = this .mField;\n\n AlgebraicNumber one = hf .one();\n AlgebraicNumber s = hf .getAffineScalar().reciprocal(); // reciprocal of sigma\n AlgebraicNumber R = hf .createPower( 1 ) .times( s ); // rho / sigma\n\n // (-s,1) Y\n // +---+------ [2] ---------+-----------+--------+---+\n // / / / (s,R) / /\n // +---+--------+-----------+--------- [1] ------+---+\n // / / / / / /\n // / / / / / / /\n // / / / / / /\n // (-1,s) [3] -+--------+-----------+-----------+--------+---+\n // / / / / / /\n // / / / / / / /\n // / / / / / / /\n // / / / / / \n // +---+--------+--------- O ---------+--------+- [0] (1,0) X\n // / / / / / \n // / / / /<--- s --->/ / /\n // / / / /<-------- R ------->/ /\n // / / /<---------- 1 --------->/\n // +- [4| ------+-----------+-----------+--------+---+\n // / (-R,-s) / / / / /\n // / / / / / / /\n // / / / / / (R,-R) /\n // +---+--------+-----------+-----------+------ [6] -+\n // / / / / /\n // +---+--------+--------- [5] ---------+--------+---+\n // (0,-1)\n \n AlgebraicVector zAxis = hf .basisVector( 3, AlgebraicVector.Z );\n AlgebraicVector zAxisNeg = zAxis .negate();\n AlgebraicVector axis0 = hf .basisVector( 3, AlgebraicVector.X );\n AlgebraicVector axis1 = hf .origin( 3 )\n \t\t.setComponent( AlgebraicVector.X, s )\n\t\t\t\t.setComponent( AlgebraicVector.Y, R );\n AlgebraicVector axis2 = hf .origin( 3 )\n \t\t.setComponent( AlgebraicVector.X, s .negate() )\n\t\t\t\t.setComponent( AlgebraicVector.Y, one );\n AlgebraicVector axis3 = hf .origin( 3 )\n \t\t.setComponent( AlgebraicVector.X, one .negate() )\n\t\t\t\t.setComponent( AlgebraicVector.Y, s );\n AlgebraicVector axis4 = hf .origin( 3 )\n \t\t.setComponent( AlgebraicVector.X, R .negate() )\n\t\t\t\t.setComponent( AlgebraicVector.Y, s .negate() );\n AlgebraicVector axis5 = hf .origin( 3 )\n\t\t\t\t.setComponent( AlgebraicVector.Y, one .negate() );\n AlgebraicVector axis6 = hf .origin( 3 )\n \t\t.setComponent( AlgebraicVector.X, R )\n\t\t\t\t.setComponent( AlgebraicVector.Y, R .negate() );\n\n // all mMatrices are mappings of [X,Y,Z] = [ axis0, -axis5, zAxis ]\n mMatrices[ 0 ] = hf .identityMatrix( 3 );\n mMatrices[ 1 ] = new AlgebraicMatrix( axis1, axis6 .negate(), zAxis );\n mMatrices[ 2 ] = new AlgebraicMatrix( axis2, axis0 .negate(), zAxis );\n mMatrices[ 3 ] = new AlgebraicMatrix( axis3, axis1 .negate(), zAxis );\n mMatrices[ 4 ] = new AlgebraicMatrix( axis4, axis2 .negate(), zAxis );\n mMatrices[ 5 ] = new AlgebraicMatrix( axis5, axis3 .negate(), zAxis );\n mMatrices[ 6 ] = new AlgebraicMatrix( axis6, axis4 .negate(), zAxis );\n \n mMatrices[ 7 ] = new AlgebraicMatrix( axis0, axis2 .negate(), zAxisNeg );\n mMatrices[ 8 ] = mMatrices[ 1 ] .times( mMatrices[ 7 ] );\n mMatrices[ 9 ] = mMatrices[ 2 ] .times( mMatrices[ 7 ] );\n mMatrices[ 10 ] = mMatrices[ 3 ] .times( mMatrices[ 7 ] );\n mMatrices[ 11 ] = mMatrices[ 4 ] .times( mMatrices[ 7 ] );\n mMatrices[ 12 ] = mMatrices[ 5 ] .times( mMatrices[ 7 ] );\n mMatrices[ 13 ] = mMatrices[ 6 ] .times( mMatrices[ 7 ] );\n\t}", "public void addBoneRef(BoneRef ref){\n \t\tthis.boneRefs[bonePointer++] = ref;\n \t}", "public final void ruleJointTypeReference() 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:829:2: ( ( ( rule__JointTypeReference__RefAssignment ) ) )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:830:1: ( ( rule__JointTypeReference__RefAssignment ) )\n {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:830:1: ( ( rule__JointTypeReference__RefAssignment ) )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:831:1: ( rule__JointTypeReference__RefAssignment )\n {\n before(grammarAccess.getJointTypeReferenceAccess().getRefAssignment()); \n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:832:1: ( rule__JointTypeReference__RefAssignment )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:832:2: rule__JointTypeReference__RefAssignment\n {\n pushFollow(FOLLOW_rule__JointTypeReference__RefAssignment_in_ruleJointTypeReference1714);\n rule__JointTypeReference__RefAssignment();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getJointTypeReferenceAccess().getRefAssignment()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public BruceWayne()\n {\n GeneralPath leftSide = new GeneralPath();\n\tleftSide.moveTo(195,200);\n\tleftSide.lineTo(195,230);//neck\n\tleftSide.lineTo(150,230);//shoulder\n\tleftSide.lineTo(140,250);//shoulder slant\n\tleftSide.lineTo(140,340);//armleft\n\tleftSide.lineTo(165,340);//armbottom\n\tleftSide.lineTo(160,260);//armright\n\tleftSide.lineTo(170,270);//armpit\n\tleftSide.lineTo(170,350);//chest\n\tleftSide.lineTo(160,510);//legleft\n\tleftSide.lineTo(185,510);//legbottom\n\tleftSide.lineTo(200,360);//legright\n\tleftSide.lineTo(220,360);//middle\n\n Shape rightSide = ShapeTransforms.horizontallyFlippedCopyOf(leftSide);\n rightSide = ShapeTransforms.translatedCopyOf(rightSide, 140.0, 0.0);\n\tCircle head = new Circle(210,170,35);\n \n\twholeFigure = new GeneralPath();\n\twholeFigure.append(head,false);\n wholeFigure.append(leftSide, false);\n wholeFigure.append(rightSide, false);\n }", "org.apache.calcite.avatica.proto.Common.Frame getFrame();", "private static Frame makeNextFrame(Player player) {\r\n Frame nextFrame = new Frame();\r\n nextFrame.setPlayer(player);\r\n\r\n return nextFrame;\r\n }", "protected abstract void addJointImpl( Joint joint );", "public final FixedJoint newFixedJoint( Body body1, Body body2 )\n {\n FixedJoint joint = newFixedJointImpl( body1, body2 );\n \n //addJoint( joint );\n \n return ( joint );\n }", "private Point getHeadLocation (Note note)\r\n {\r\n return new Point(tailLocation.x, note.getReferencePoint().y);\r\n }", "public final void rule__Joint__Body1Assignment_6() 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:9670:1: ( ( ruleBodyReference ) )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:9671:1: ( ruleBodyReference )\n {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:9671:1: ( ruleBodyReference )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:9672:1: ruleBodyReference\n {\n before(grammarAccess.getJointAccess().getBody1BodyReferenceParserRuleCall_6_0()); \n pushFollow(FOLLOW_ruleBodyReference_in_rule__Joint__Body1Assignment_619417);\n ruleBodyReference();\n\n state._fsp--;\n\n after(grammarAccess.getJointAccess().getBody1BodyReferenceParserRuleCall_6_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 }", "private void createFrame() {\n System.out.println(\"Assembling \" + name + \" frame\");\n }", "public void getCurrentJointPosition(iiwa_msgs.JointPosition currentJointPosition, LBR robot) {\n double[] position = robot.getCurrentJointPosition().getInternalArray();\n currentJointPosition.getHeader().setStamp(time.getCurrentTime());\n Conversions.vectorToJointQuantity(position, currentJointPosition.getPosition());\n }", "public T caseJointRef(JointRef object) {\r\n\t\treturn null;\r\n\t}", "public PageFrame getHeadFrame() {\n return ram[head][0];\n }", "public static void buildFrame() {\r\n\t\t// Make sure we have nice window decorations\r\n\t\tJFrame.setDefaultLookAndFeelDecorated(true);\r\n\t\t\r\n\t\t// Create and set up the window.\r\n\t\t//ParentFrame frame = new ParentFrame();\r\n\t\tMediator frame = new Mediator();\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\t\r\n\t\t// Display the window\r\n\t\tframe.setVisible(true);\r\n\t}", "static public NewRotateLeft create(AnimatableModelInstance originObject, ModelInstance targetObject, int duration) {\n\t\t\n\t\t\n\t\t\n\t\tVector3 posT = new Vector3();\n\t\ttargetObject.transform.getTranslation(posT);\t\t\n\t\t\t\n\t\treturn create(originObject, posT.x, posT.y, duration);\n\t}", "public void frontUp(){\n frontSolenoid.set(DoubleSolenoid.Value.kForward);\n }", "@Test(expected = IllegalArgumentException.class)\r\n\tpublic void createWithSameBody() {\r\n\t\tnew WeldJoint<Body>(b1, b1, new Vector2());\r\n\t}", "public Frame readFrame() {\n _buffer.flip();\n if(_buffer.hasRemaining()) {\n int frameSize = _buffer.getInt();\n byte[] body = new byte[frameSize];\n _buffer.get(body);\n return new Frame(frameSize, body);\n } else {\n return null;\n }\n }", "private com.google.protobuf.SingleFieldBuilderV3<\n org.apache.calcite.avatica.proto.Common.Frame, org.apache.calcite.avatica.proto.Common.Frame.Builder, org.apache.calcite.avatica.proto.Common.FrameOrBuilder> \n getFrameFieldBuilder() {\n if (frameBuilder_ == null) {\n frameBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<\n org.apache.calcite.avatica.proto.Common.Frame, org.apache.calcite.avatica.proto.Common.Frame.Builder, org.apache.calcite.avatica.proto.Common.FrameOrBuilder>(\n getFrame(),\n getParentForChildren(),\n isClean());\n frame_ = null;\n }\n return frameBuilder_;\n }", "private SequenceFlow createSequenceFlow(FlowNode source, FlowNode target, ICreateConnectionContext context) {\r\n SequenceFlow sequenceFlow = new SequenceFlow();\r\n\r\n sequenceFlow.setId(getNextId());\r\n sequenceFlow.setSourceRef(source.getId());\r\n sequenceFlow.setTargetRef(target.getId());\r\n\r\n if (PreferencesUtil.getBooleanPreference(Preferences.EDITOR_ADD_LABELS_TO_NEW_SEQUENCEFLOWS)) {\r\n sequenceFlow.setName(String.format(\"to %s\", target.getName()));\r\n } else {\r\n sequenceFlow.setName(\"\");\r\n }\r\n\r\n ContainerShape targetContainer = null;\r\n if (source instanceof BoundaryEvent) {\r\n BoundaryEvent boundaryEvent = (BoundaryEvent) source;\r\n if (boundaryEvent.getAttachedToRef() != null) {\r\n Activity attachedActivity = boundaryEvent.getAttachedToRef();\r\n targetContainer = (ContainerShape) getFeatureProvider().getPictogramElementForBusinessObject(attachedActivity);\r\n }\r\n } else {\r\n targetContainer = (ContainerShape) context.getSourcePictogramElement();\r\n }\r\n \r\n ContainerShape parentContainer = targetContainer.getContainer();\r\n if (parentContainer instanceof Diagram) {\r\n ModelHandler.getModel(EcoreUtil.getURI(getDiagram())).getBpmnModel().getMainProcess().addFlowElement(sequenceFlow);\r\n\r\n } else {\r\n Object parentObject = getBusinessObjectForPictogramElement(parentContainer);\r\n if (parentObject instanceof SubProcess) {\r\n ((SubProcess) parentObject).addFlowElement(sequenceFlow);\r\n\r\n } else if (parentObject instanceof Lane) {\r\n Lane lane = (Lane) parentObject;\r\n lane.getParentProcess().addFlowElement(sequenceFlow);\r\n }\r\n }\r\n \r\n source.getOutgoingFlows().add(sequenceFlow);\r\n target.getIncomingFlows().add(sequenceFlow);\r\n return sequenceFlow;\r\n }", "@Test(expected = NullPointerException.class)\r\n\tpublic void createWithNullBody1() {\r\n\t\tnew WeldJoint<Body>(null, b2, new Vector2());\r\n\t}", "public void initActor(){\n this.root = new Node(\"root\");\n this.body = new Node(\"body\");\n this.rLeg = new Node(\"rLeg\");\n this.lLeg = new Node(\"lLeg\");\n this.rArm = new Node(\"rArm\");\n this.lArm = new Node(\"lArm\");\n this.head = new Node(\"head\");\n this.handle = new Node(\"handle\");\n \n //r2 -- Add a weapons node and create empty target node\n this.weapon = new Node(\"weapon\");\n this.target_pivot = new Node(\"target\");\n \n //Create the relationships between the joint nodes\n this.root.attachChild(this.body);\n this.handle.attachChild(this.root);\n this.body.attachChild(this.lLeg);\n this.body.attachChild(this.rLeg);\n this.body.attachChild(this.lArm);\n this.body.attachChild(this.rArm);\n this.body.attachChild(this.head);\n this.rArm.attachChild(this.weapon);\n \n //Move joints to local positions\n this.body.move(0,3f,0);\n this.lLeg.move(0.5f,0,0);\n this.rLeg.move(-0.5f,0,0);\n this.lArm.move(1.5f,3f,0);\n this.rArm.move(-1.5f,3f,0);\n this.head.move(0,3f,0);\n this.weapon.move(0,-3f,0.75f);\n \n \n //Create the physical dimensions of the actor 'minecraft-style'\n this.legBox = new Box(0.5f, 1.5f, 0.5f);\n this.bodyBox = new Box(1, 1.5f, 0.5f);\n this.armBox = new Box(0.5f, 1.5f, 0.5f);\n this.headBox = new Box(1, 1, 1);\n this.weaponBox = new Box(0.25f,0.75f,0.25f);\n \n //Create the visual elements and add materials\n this.lLegGeom = new Geometry(\"lLeg\", this.legBox);\n this.rLegGeom = new Geometry(\"rLeg\", this.legBox);\n this.bodyGeom = new Geometry(\"Body\", this.bodyBox);\n this.lArmGeom = new Geometry(\"lArm\", this.armBox);\n this.rArmGeom = new Geometry(\"rArm\", this.armBox);\n this.headGeom = new Geometry(\"Head\", this.headBox);\n this.weaponGeom = new Geometry(\"Weapon\", this.weaponBox);\n \n //Set materials\n this.lLegGeom.setMaterial(this.legMat);\n this.rLegGeom.setMaterial(this.legMat);\n this.bodyGeom.setMaterial(this.bodyMat);\n this.lArmGeom.setMaterial(this.armMat);\n this.rArmGeom.setMaterial(this.armMat);\n this.headGeom.setMaterial(this.headMat);\n \n //TODO: Give weapons their own material\n this.weaponGeom.setMaterial(this.legMat);\n \n //Set the local transforms of geometry to align with joints properly\n this.lLegGeom.move(0,-1.5f,0);\n this.rLegGeom.move(0,-1.5f,0);\n this.bodyGeom.move(0,1.5f,0);\n this.lArmGeom.move(0,-1.5f,0);\n this.rArmGeom.move(0,-1.5f,0);\n this.headGeom.move(0,1f,0);\n this.weaponGeom.move(0,0,0);\n \n //Attach geometries to nodes\n this.body.attachChild(this.bodyGeom);\n this.lLeg.attachChild(this.lLegGeom);\n this.rLeg.attachChild(this.rLegGeom);\n this.lArm.attachChild(this.lArmGeom);\n this.rArm.attachChild(this.rArmGeom);\n this.head.attachChild(this.headGeom);\n this.weapon.attachChild(this.weaponGeom);\n \n Quaternion xRot = new Quaternion().fromAngleAxis(FastMath.DEG_TO_RAD * 0,Vector3f.UNIT_X.clone());\n Quaternion yRot = new Quaternion().fromAngleAxis(FastMath.DEG_TO_RAD * 0,Vector3f.UNIT_Z.clone());\n \n //Refactor ActorControl with Character Control\n CapsuleCollisionShape capsuleShape = new CapsuleCollisionShape(2.5f,3f,1);\n this.mobControl = new CharacterControl(capsuleShape, 3f);//Step size is set in last argument\n this.mobControl.setJumpSpeed(20);\n this.mobControl.setFallSpeed(45);\n this.mobControl.setGravity(50);\n \n \n this.root.setLocalRotation(xRot.mult(yRot));\n //this.handle.getLocalRotation().lookAt(Vector3f.UNIT_Z, Vector3f.UNIT_Y);\n \n this.root.scale(0.75f, 0.75f, 0.75f);\n \n //this.handle.setLocalTranslation(10f, 5f, 15f);\n \n rootNode.attachChild(this.handle);\n }", "public void rebuildFrame(){\n \n // Re-initialize frame with default attributes\n controlFrame.dispose();\n controlFrame = buildDefaultFrame(\"CSCI 446 - A.I. - Montana State University\");\n \n // Initialize header with default attributes\n header = buildDefaultHeader();\n \n // Initialize control panel frame with default attributes\n controlPanel = buildDefaultPanel(BoxLayout.Y_AXIS);\n \n // Combine objects\n controlPanel.add(header, BorderLayout.NORTH);\n controlFrame.add(controlPanel);\n \n }", "public int getJointIndex() {\r\n\t\treturn this.jointIndex;\r\n\t}", "protected void createFrames() {\n createStandingRight();\n createStandingLeft();\n createWalkingRight();\n createWalkingLeft();\n createJumpingRight();\n createJumpingLeft();\n createDying();\n }", "public B2FlxPulleyJoint(B2FlxShape spriteA, B2FlxShape spriteB, PulleyJointDef jointDef)\r\n\t{\r\n\t\tsuper(spriteA, spriteB, jointDef);\r\n\t\tanchorA = bodyA.getWorldCenter();\r\n\t\tanchorB = bodyB.getWorldCenter();\r\n\t}", "public Front() {\n\t\twheels.getrWheel().getBoundingSphereTree().getBoundingSphere().translateCenter(0.8 * Specification.TIRE_RADIUS, 0.5 * Specification.TIRE_RADIUS, 0.5 * Specification.B_DEPTH - 1.1 * Specification.TIRE_DEPTH);\n\t\twheels.getlWheel().getBoundingSphereTree().getBoundingSphere().translateCenter(0.8 * Specification.TIRE_RADIUS, 0.5 * Specification.TIRE_RADIUS, -0.5 * Specification.B_DEPTH + 1.1 * Specification.TIRE_DEPTH);\n\t}", "@Test(expected = NullPointerException.class)\r\n\tpublic void createWithNullBody2() {\r\n\t\tnew WeldJoint<Body>(b1, null, new Vector2());\r\n\t}", "protected static CTGraphicalObjectFrame prototype() {\n\t\tif (prototype == null) {\n\t\t\tCTGraphicalObjectFrame graphicFrame = CTGraphicalObjectFrame.Factory.newInstance();\n\n\t\t\tCTGraphicalObjectFrameNonVisual nvGraphic = graphicFrame.addNewNvGraphicFramePr();\n\t\t\tCTNonVisualDrawingProps props = nvGraphic.addNewCNvPr();\n\t\t\tprops.setId(0);\n\t\t\tprops.setName(\"Diagramm 1\");\n\t\t\tnvGraphic.addNewCNvGraphicFramePr();\n\n\t\t\tCTTransform2D transform = graphicFrame.addNewXfrm();\n\t\t\tCTPositiveSize2D extPoint = transform.addNewExt();\n\t\t\tCTPoint2D offPoint = transform.addNewOff();\n\n\t\t\textPoint.setCx(0);\n\t\t\textPoint.setCy(0);\n\t\t\toffPoint.setX(0);\n\t\t\toffPoint.setY(0);\n\n\t\t\tCTGraphicalObject graphic = graphicFrame.addNewGraphic();\n\n\t\t\tprototype = graphicFrame;\n\t\t}\n\t\treturn prototype;\n\t}", "public Vec4 getReferencePoint()\n {\n return this.currentData.getReferencePoint();\n }", "Activity getTransformForwardActivity();", "public void build() {\n x = vertices.get(0);\n y = vertices.get(1);\n vertices.reverse();\n BodyFactory.createPolyLine(x, y, vertices.toArray(), BodyDef.BodyType.StaticBody, LineType.SOLID);\n }", "@Override\n protected Object getModelObject()\n {\n return frame;\n }", "public final void rule__Joint__RelTrans1Assignment_7() 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:9685:1: ( ( ruleRelativeTransformation ) )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:9686:1: ( ruleRelativeTransformation )\n {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:9686:1: ( ruleRelativeTransformation )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:9687:1: ruleRelativeTransformation\n {\n before(grammarAccess.getJointAccess().getRelTrans1RelativeTransformationParserRuleCall_7_0()); \n pushFollow(FOLLOW_ruleRelativeTransformation_in_rule__Joint__RelTrans1Assignment_719448);\n ruleRelativeTransformation();\n\n state._fsp--;\n\n after(grammarAccess.getJointAccess().getRelTrans1RelativeTransformationParserRuleCall_7_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public Frame prevFrame(final Frame frame) {\n\t\tif (isInitialFrame(frame))throw new IllegalStateException(\"Invalid Entry\");// input sanitization -- out of bounds when at first frame\n\t\telse return frames.get(frames.indexOf(frame) - 1);\n\t}", "public final HingeJoint newHingeJoint( Body body1, Body body2 )\n {\n HingeJoint joint = newHingeJointImpl( body1, body2 );\n \n //addJoint( joint );\n \n return ( joint );\n }", "public void attachStructure(CrosswordStructure structure);", "public JexlEngine.Frame createFrame(Object... values) {\r\n return scope != null? scope.createFrame(values) : null;\r\n }", "private void createFrame(){\n System.out.println(\"Assembling \" + name + \" frame.\");\n }", "protected abstract Hinge2Joint newHinge2JointImpl( Body body1, Body body2 );", "@View( VIEW_CREATE_REFERENCE )\r\n public String getCreateReference( HttpServletRequest request )\r\n {\r\n _reference = ( _reference != null ) ? _reference : new Reference( );\r\n Map<String, Object> model = getModel( );\r\n model.put( MARK_REFERENCE, _reference );\r\n return getPage( PROPERTY_PAGE_TITLE_CREATE_REFERENCE, TEMPLATE_CREATE_REFERENCE, model );\r\n }", "public Reference() {\n super();\n }", "public void xsetFrame(com.walgreens.rxit.ch.cda.StrucDocTable.Frame frame)\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.walgreens.rxit.ch.cda.StrucDocTable.Frame target = null;\n target = (com.walgreens.rxit.ch.cda.StrucDocTable.Frame)get_store().find_attribute_user(FRAME$24);\n if (target == null)\n {\n target = (com.walgreens.rxit.ch.cda.StrucDocTable.Frame)get_store().add_attribute_user(FRAME$24);\n }\n target.set(frame);\n }\n }", "@Override\n protected void initialize() {\n mDrive.resetGyroPosition();\n try {\n Trajectory left_trajectory = PathfinderFRC.getTrajectory(pathName + \".left\");\n Trajectory right_trajectory = PathfinderFRC.getTrajectory(pathName + \".right\");\n\n m_left_follower = new EncoderFollower(left_trajectory);\n m_right_follower = new EncoderFollower(right_trajectory);\n\n if(isBackwards) {\n initBackwards();\n } else {\n initForwards();\n }\n } catch (IOException e) {\n\t\t e.printStackTrace();\n\t }\n }", "public void\nshiftToOrigin()\n{\n\tthis.setLine(0.0, 0.0,\n\t\tthis.getP2().getX() - this.getP1().getX(),\n\t\tthis.getP2().getY() - this.getP1().getY());\n}", "public TransformNR getHeadLocation(){\n\t\treturn headLocation;\n\t}", "static void translateToFace(MatrixStack matrices, PlayerEntityModel<AbstractClientPlayerEntity> model,\n\t\t\tAbstractClientPlayerEntity player, float headYaw, float headPitch) {\n\n\t\tif (player.isInSwimmingPose() || player.isFallFlying()) {\n\t\t\tmatrices.multiply(RotationAxis.POSITIVE_Z.rotationDegrees(model.head.roll));\n\t\t\tmatrices.multiply(RotationAxis.POSITIVE_Y.rotationDegrees(headYaw));\n\t\t\tmatrices.multiply(RotationAxis.POSITIVE_X.rotationDegrees(-45.0F));\n\t\t} else {\n\n\t\t\tif (player.isInSneakingPose() && !model.riding) {\n\t\t\t\tmatrices.translate(0.0F, 0.25F, 0.0F);\n\t\t\t}\n\t\t\tmatrices.multiply(RotationAxis.POSITIVE_Y.rotationDegrees(headYaw));\n\t\t\tmatrices.multiply(RotationAxis.POSITIVE_X.rotationDegrees(headPitch));\n\t\t}\n\t\tmatrices.translate(0.0F, -0.25F, -0.3F);\n\t}", "public final BallJoint newBallJoint( Body body1, Body body2 )\n {\n BallJoint joint = newBallJointImpl( body1, body2 );\n \n //addJoint( joint );\n \n return ( joint );\n }", "public GeneralPath createArrowHeads() {\n return OMArrowHead.createArrowHeads(OMArrowHead.ARROWHEAD_DIRECTION_FORWARD,\n 100,\n this,\n OMArrowHead.DEFAULT_WINGTIP,\n OMArrowHead.DEFAULT_WINGLENGTH);\n }", "ReferenceLink createReferenceLink();", "private static String[] BackSub(Matrix REF){\r\n\t\t// Start at bottom right of Matrix -1 to offset starting from index 0\r\n\t\t// Track two index\r\n\t\t// [1, 2, 3| 1] \r\n\t\t// [1, 2, 3| 1] \r\n\t\t// [1, 2, 3| 1] < (rowPoint, augmentY)\r\n\t\t//\t\t ^\r\n\t\t//(rowPoint, colPoint)\r\n\t\t//\t REF.col\r\n\t\t// ------------\r\n\t\t// [ ] |\r\n\t\t// [ ] | REF.row\r\n\t\t// [ ] |\r\n\t\tint rowPoint = REF.row() - 1;\r\n\t\tint colPoint = REF.col() - 2;\r\n\t\tint augmentY = REF.col() - 1;\r\n\t\tDouble[][] REFval = REF.getAll();\r\n\t\t// if matrix inconsistent the last rows will look like [0,...,0| 1]\r\n\t\tif (REFval[rowPoint][colPoint] == 0 && REFval[rowPoint][augmentY] != 0) {\r\n\t\t\treturn null;\r\n\t\t}else {\r\n\t\t\tString[] Solution = new String[REF.col - 1];\r\n\t\t\t// find first pivot\r\n\t\t\t// we now have form ax + b + .. + c = d\r\n\t\t\t// x = (d - b - .. - c)/a\r\n\t\t\twhile (rowPoint >= 0) {\r\n\t\t\t\tDouble[] row = REFval[rowPoint];\r\n\t\t\t\tMatrix.processRow(Solution, row);\r\n\t\t\t\trowPoint--;\r\n\t\t\t}\r\n\t\t\treturn Solution;\r\n\t\t}\r\n\t}", "@Override\n public void onNewFrame(HeadTransform headTransform) {\n float[] mtx = new float[16];\n GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT | GLES20.GL_DEPTH_BUFFER_BIT);\n surface.updateTexImage();\n surface.getTransformMatrix(mtx);\n }", "public Builder mergeFirstFrame(org.apache.calcite.avatica.proto.Common.Frame value) {\n if (firstFrameBuilder_ == null) {\n if (firstFrame_ != null) {\n firstFrame_ =\n org.apache.calcite.avatica.proto.Common.Frame.newBuilder(firstFrame_).mergeFrom(value).buildPartial();\n } else {\n firstFrame_ = value;\n }\n onChanged();\n } else {\n firstFrameBuilder_.mergeFrom(value);\n }\n\n return this;\n }", "public void createFrame() {\r\n System.out.println(\"Framing: Adding the log walls.\");\r\n }", "public frame() {\r\n\t\tframeOwner = 0;\r\n\t\tassignedProcess = 0;\r\n\t\tpageNumber = 0;\r\n\t}", "public static native PointerByReference OpenMM_AmoebaTorsionTorsionForce_create();", "private Frame initFrameExternalConstraintForNonOverlappingCircle() {\n\n return new NonOverlappingFrame();\n }", "public Point getReferencePoint(){\n return referencePoint;\n }", "public interface FrameBuilder {\r\n\r\n /**\r\n * Creates graphic frames.\r\n * @param num The frame index for which the graphic is to be \r\n * produced for.\r\n * @return The graphic for the respective frame index.\r\n */\r\n Graphic create(int num);\r\n }", "public RMParentShape getParent() { return _parent; }", "private void onUpdateFrame(FrameTime frameTime) {\n Frame frame = arFragment.getArSceneView().getArFrame();\n\n //In case there's no frame\n if (frame == null) {\n return;\n }\n\n //Used to Create Model at a certain Point on the Floor automatically\n if (frame.getCamera().getTrackingState() == TrackingState.TRACKING && !placed) {\n Pose pos = frame.getCamera().getPose().compose(Pose.makeTranslation(1f, 0f, -2.5f));\n\n //Anchor Node to set the Model in place\n Anchor anchor = arFragment.getArSceneView().getSession().createAnchor(pos);\n AnchorNode anchorNode = new AnchorNode(anchor);\n anchorNode.setParent(arFragment.getArSceneView().getScene());\n\n createModel(anchorNode, activeNode, activeRenderable);\n }\n }", "public void getCurrentCartesianPose(iiwa_msgs.CartesianPose currentPose, LBR robot, ObjectFrame frame) {\n Frame cartesianFrame = robot.getCurrentCartesianPosition(frame);\n Transformation transform = cartesianFrame.transformationFromWorld();\n\n currentPose.getPoseStamped().getHeader().setFrameId(baseFrameID);\n currentPose.getPoseStamped().getHeader().setStamp(time.getCurrentTime());\n\n Conversions.kukaTransformationToRosPose(transform, currentPose.getPoseStamped().getPose());\n\n LBRE1Redundancy redundancy = (LBRE1Redundancy) cartesianFrame.getRedundancyInformationForDevice(robot);\n currentPose.getRedundancy().setE1(redundancy.getE1());\n currentPose.getRedundancy().setStatus(redundancy.getStatus());\n currentPose.getRedundancy().setTurn(redundancy.getTurn());\n }", "public WorldCoord getFrameLinkset()\r\n/* 45: */ {\r\n/* 46: 34 */ return null;\r\n/* 47: */ }", "private com.google.protobuf.SingleFieldBuilderV3<\n com.google.cloud.networkmanagement.v1beta1.ForwardInfo,\n com.google.cloud.networkmanagement.v1beta1.ForwardInfo.Builder,\n com.google.cloud.networkmanagement.v1beta1.ForwardInfoOrBuilder>\n getForwardFieldBuilder() {\n if (forwardBuilder_ == null) {\n if (!(stepInfoCase_ == 13)) {\n stepInfo_ = com.google.cloud.networkmanagement.v1beta1.ForwardInfo.getDefaultInstance();\n }\n forwardBuilder_ =\n new com.google.protobuf.SingleFieldBuilderV3<\n com.google.cloud.networkmanagement.v1beta1.ForwardInfo,\n com.google.cloud.networkmanagement.v1beta1.ForwardInfo.Builder,\n com.google.cloud.networkmanagement.v1beta1.ForwardInfoOrBuilder>(\n (com.google.cloud.networkmanagement.v1beta1.ForwardInfo) stepInfo_,\n getParentForChildren(),\n isClean());\n stepInfo_ = null;\n }\n stepInfoCase_ = 13;\n onChanged();\n return forwardBuilder_;\n }", "public ReferenceRange() {\n\t\tsuper();\n\t\tmRr = CDAFactory.eINSTANCE.createReferenceRange();\n\t\tmRr.setObservationRange(getObsR());\n\t\tmRr.setTypeCode(ActRelationshipType.REFV);\n\t\tthis.setInterpretationCode(ObservationInterpretation.NORMAL);\n\t}" ]
[ "0.69799787", "0.69591904", "0.51146865", "0.48457846", "0.48049423", "0.4767985", "0.47437993", "0.47165182", "0.4715671", "0.46922454", "0.46742383", "0.46682847", "0.46369013", "0.46224195", "0.46223685", "0.46155837", "0.4610501", "0.45616534", "0.45597303", "0.455631", "0.45451134", "0.45336145", "0.45283368", "0.4506204", "0.4500535", "0.44848368", "0.44643906", "0.4457257", "0.44493282", "0.4437739", "0.4432946", "0.4429852", "0.44269937", "0.43920946", "0.43857363", "0.43805787", "0.4360688", "0.43450347", "0.43379602", "0.43292847", "0.4312026", "0.4299707", "0.4298069", "0.42975077", "0.42971286", "0.4291927", "0.42766276", "0.4275177", "0.42653808", "0.4254022", "0.4249928", "0.4240025", "0.4237724", "0.42331862", "0.4218664", "0.42151278", "0.42135516", "0.421254", "0.4211763", "0.42072535", "0.4202023", "0.419359", "0.41924262", "0.4189625", "0.4189398", "0.41497815", "0.41488528", "0.41455257", "0.41423178", "0.41398492", "0.41275603", "0.41259208", "0.4122986", "0.41216582", "0.4113366", "0.4112854", "0.41081387", "0.4097361", "0.4096841", "0.40967467", "0.40935177", "0.40933982", "0.40922132", "0.4086258", "0.40850616", "0.40848485", "0.40827104", "0.40791523", "0.40742892", "0.4073841", "0.40713584", "0.40682888", "0.40675187", "0.40646037", "0.40633845", "0.40622658", "0.40609118", "0.40592366", "0.4057641", "0.40543172" ]
0.69159293
2
Creates the reference frame that is at the joint and rigidly attached to the joint's successor.
public static MovingReferenceFrame newFrameAfterJoint(JointReadOnly joint) { MovingReferenceFrame frameBeforeJoint = joint.getFrameBeforeJoint(); if (frameBeforeJoint == null) throw new NullPointerException("The frameBeforeJoint has to be created before the frameAfterJoint."); return new MovingReferenceFrame("after" + MecanoTools.capitalize(joint.getName()), frameBeforeJoint) { @Override protected void updateTransformToParent(RigidBodyTransform transformToParent) { joint.getJointConfiguration(transformToParent); } @Override protected void updateTwistRelativeToParent(Twist twistRelativeToParentToPack) { twistRelativeToParentToPack.setIncludingFrame(joint.getJointTwist()); } }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static MovingReferenceFrame newJointFrame(JointReadOnly joint, RigidBodyTransformReadOnly transformToParent, String beforeJointName)\n {\n MovingReferenceFrame parentFrame;\n RigidBodyReadOnly parentBody = joint.getPredecessor();\n if (parentBody.isRootBody())\n {\n parentFrame = parentBody.getBodyFixedFrame();\n\n /*\n * TODO Special case to keep the beforeJointFrame of the SixDoFJoint to be the elevatorFrame. This\n * should probably removed, might cause reference frame exceptions though.\n */\n if (transformToParent == null)\n return parentFrame;\n }\n else\n parentFrame = parentBody.getParentJoint().getFrameAfterJoint();\n\n return MovingReferenceFrame.constructFrameFixedInParent(beforeJointName, parentFrame, transformToParent);\n }", "public static MovingReferenceFrame newFrameBeforeJoint(JointReadOnly joint, RigidBodyTransformReadOnly transformToParent)\n {\n String beforeJointName = \"before\" + MecanoTools.capitalize(joint.getName());\n\n return newJointFrame(joint, transformToParent, beforeJointName);\n }", "public void buildFrame();", "protected abstract FixedJoint newFixedJointImpl( Body body1, Body body2 );", "public void createJoint(World world) {\n if (joint != null) {\n return;\n }\n joint = (RevoluteJoint) world.createJoint(this);\n }", "public static FixedFrameWrenchBasics newPlanarFixedFrameWrenchBasics(ReferenceFrame bodyFrame, ReferenceFrame expressedInFrame)\n {\n return new FixedFrameWrenchBasics()\n {\n private final FixedFrameVector3DBasics angularPart = newYOnlyFixedFrameVector3DBasics(expressedInFrame);\n private final FixedFrameVector3DBasics linearPart = newXZOnlyFixedFrameVector3DBasics(expressedInFrame);\n\n @Override\n public ReferenceFrame getBodyFrame()\n {\n return bodyFrame;\n }\n\n @Override\n public ReferenceFrame getReferenceFrame()\n {\n return expressedInFrame;\n }\n\n @Override\n public FixedFrameVector3DBasics getAngularPart()\n {\n return angularPart;\n }\n\n @Override\n public FixedFrameVector3DBasics getLinearPart()\n {\n return linearPart;\n }\n\n @Override\n public String toString()\n {\n return MecanoIOTools.getWrenchString(this);\n }\n };\n }", "protected abstract BallJoint newBallJointImpl( Body body1, Body body2 );", "@Test\r\n\tpublic void createSuccess() {\r\n\t\tnew WeldJoint<Body>(b1, b2, new Vector2());\r\n\t}", "private Frame buildFrame() {\n return new Frame(command, headers, body);\n }", "Frame createFrame();", "public static FixedFrameTwistBasics newPlanarFixedFrameTwistBasics(ReferenceFrame bodyFrame, ReferenceFrame baseFrame, ReferenceFrame expressedInFrame)\n {\n return new FixedFrameTwistBasics()\n {\n private final FixedFrameVector3DBasics angularPart = newYOnlyFixedFrameVector3DBasics(expressedInFrame);\n private final FixedFrameVector3DBasics linearPart = newXZOnlyFixedFrameVector3DBasics(expressedInFrame);\n\n @Override\n public ReferenceFrame getBodyFrame()\n {\n return bodyFrame;\n }\n\n @Override\n public ReferenceFrame getBaseFrame()\n {\n return baseFrame;\n }\n\n @Override\n public ReferenceFrame getReferenceFrame()\n {\n return expressedInFrame;\n }\n\n @Override\n public FixedFrameVector3DBasics getAngularPart()\n {\n return angularPart;\n }\n\n @Override\n public FixedFrameVector3DBasics getLinearPart()\n {\n return linearPart;\n }\n\n @Override\n public String toString()\n {\n return MecanoIOTools.getTwistString(this);\n }\n };\n }", "@Override\r\n protected void computeReferencePoint ()\r\n {\r\n setReferencePoint(getHeadLocation());\r\n }", "private void checkAndAddReferenceFrame(ReferenceFrame referenceFrame)\n {\n checkAndAddReferenceFrame(referenceFrame, referenceFrame.getNameBasedHashCode());\n }", "protected void createFrames() {\n createStandingRight();\n createStandingLeft();\n createWalkingRight();\n createWalkingLeft();\n createJumpingRight();\n createJumpingLeft();\n createDying();\n }", "ReferenceTreatment createReferenceTreatment();", "FRAME createFRAME();", "public void forward() {\n\t\t\n\t\tif(hasEaten()) {\n\t\t\taddBodyPart();\n\t\t} else {\n\t\t\tshuffleBody();\n\t\t}\n\t\t\n\t\tthis.setLocation(this.getX()+dX, this.getY()+dY); // move head\n\t\tthis.display(w); \n\t}", "public void getCurrentJointState(sensor_msgs.JointState currentJointState, LBR robot) {\n\n currentJointState.getHeader().setStamp(time.getCurrentTime());\n currentJointState.setName(Arrays.asList(joint_names));\n currentJointState.setPosition(robot.getCurrentJointPosition().getInternalArray());\n currentJointState.setEffort(robot.getMeasuredTorque().getTorqueValues());\n }", "@Override\n\tpublic void onNewFrame(HeadTransform headTransform) {\n\t}", "protected abstract HingeJoint newHingeJointImpl( Body body1, Body body2 );", "public final void ruleJointTypeReference() 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:829:2: ( ( ( rule__JointTypeReference__RefAssignment ) ) )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:830:1: ( ( rule__JointTypeReference__RefAssignment ) )\n {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:830:1: ( ( rule__JointTypeReference__RefAssignment ) )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:831:1: ( rule__JointTypeReference__RefAssignment )\n {\n before(grammarAccess.getJointTypeReferenceAccess().getRefAssignment()); \n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:832:1: ( rule__JointTypeReference__RefAssignment )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:832:2: rule__JointTypeReference__RefAssignment\n {\n pushFollow(FOLLOW_rule__JointTypeReference__RefAssignment_in_ruleJointTypeReference1714);\n rule__JointTypeReference__RefAssignment();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getJointTypeReferenceAccess().getRefAssignment()); \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 }", "private void createFrame() {\n System.out.println(\"Assembling \" + name + \" frame\");\n }", "@Test(expected = NullPointerException.class)\r\n\tpublic void createWithNullAnchor() {\r\n\t\tnew WeldJoint<Body>(b1, b2, null);\r\n\t}", "void updateJointTransform(RigidBodyTransform jointTransformToUpdate);", "public final void rule__Joint__Body1Assignment_6() 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:9670:1: ( ( ruleBodyReference ) )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:9671:1: ( ruleBodyReference )\n {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:9671:1: ( ruleBodyReference )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:9672:1: ruleBodyReference\n {\n before(grammarAccess.getJointAccess().getBody1BodyReferenceParserRuleCall_6_0()); \n pushFollow(FOLLOW_ruleBodyReference_in_rule__Joint__Body1Assignment_619417);\n ruleBodyReference();\n\n state._fsp--;\n\n after(grammarAccess.getJointAccess().getBody1BodyReferenceParserRuleCall_6_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public static NewRotateLeft create(AnimatableModelInstance originObject, float ex, float ey, int duration) {\n\n\t\tVector3 posO = originObject.transState.position.cpy();\t\n\t\t//Vector3 posO = new Vector3();\n\t\t//originObject.transform.getTranslation(posO);\n\t\t\n\t\tQuaternion rotation = originObject.transState.rotation.cpy();\t\n\t\t//Quaternion rotation = new Quaternion();\n\t\t//originObject.transform.getRotation(rotation,true); //existing rotation\n\t\t\n\t\t Vector3 axisVec = new Vector3();\n\t float existingangle = (float) (rotation.getAxisAngle(axisVec) * axisVec.nor().z);\n\t existingangle = existingangle < 0 ? existingangle + 360 : existingangle; //convert <0 values\n\t\t\n\t\tGdx.app.log(logstag,\"_____________________________________existing angle=\"+existingangle); //relative to x axis pointing left anticlockwise\n\t\n\t\t//float scalex = originObject.transform.getScaleX(); //get how much the object has been scaled\n\t\t//float scaley = originObject.transform.getScaleY();\n\t\t\n\t\tVector2 fromPoint = new Vector2(posO.x,posO.y); //we need to scale them down due to how the positions might have been scaled up if the matrix is scaled (I hate how matrixs work :-/ Just cant get it in my head)\n\t\tVector2 tooPoint = new Vector2(ex,ey);\n\n\t\tfromPoint.sub(tooPoint); \n\n\t\t//Log.info(\"length=\"+corner2.len());\n\n\t\tfloat angle = 180+fromPoint.angle(); //absolute angle between the two objects\n\t\tGdx.app.log(logstag,\"________target angle=\"+angle); //should point towards ex/ey \n\t\t\n\t//\tfloat distance = fromPoint.len();\n\n\t\t\n\t\t//difference between this angle and existing one\n\t\tangle = angle - existingangle;\n\t\t\n\t\tNewRotateLeft rot = new NewRotateLeft(angle,500);\n\t\t//NewForward forward = new NewForward(distance,duration-500);\n\t\t\t\t\n\t\treturn rot;\n\t}", "public void initActor(){\n this.root = new Node(\"root\");\n this.body = new Node(\"body\");\n this.rLeg = new Node(\"rLeg\");\n this.lLeg = new Node(\"lLeg\");\n this.rArm = new Node(\"rArm\");\n this.lArm = new Node(\"lArm\");\n this.head = new Node(\"head\");\n this.handle = new Node(\"handle\");\n \n //r2 -- Add a weapons node and create empty target node\n this.weapon = new Node(\"weapon\");\n this.target_pivot = new Node(\"target\");\n \n //Create the relationships between the joint nodes\n this.root.attachChild(this.body);\n this.handle.attachChild(this.root);\n this.body.attachChild(this.lLeg);\n this.body.attachChild(this.rLeg);\n this.body.attachChild(this.lArm);\n this.body.attachChild(this.rArm);\n this.body.attachChild(this.head);\n this.rArm.attachChild(this.weapon);\n \n //Move joints to local positions\n this.body.move(0,3f,0);\n this.lLeg.move(0.5f,0,0);\n this.rLeg.move(-0.5f,0,0);\n this.lArm.move(1.5f,3f,0);\n this.rArm.move(-1.5f,3f,0);\n this.head.move(0,3f,0);\n this.weapon.move(0,-3f,0.75f);\n \n \n //Create the physical dimensions of the actor 'minecraft-style'\n this.legBox = new Box(0.5f, 1.5f, 0.5f);\n this.bodyBox = new Box(1, 1.5f, 0.5f);\n this.armBox = new Box(0.5f, 1.5f, 0.5f);\n this.headBox = new Box(1, 1, 1);\n this.weaponBox = new Box(0.25f,0.75f,0.25f);\n \n //Create the visual elements and add materials\n this.lLegGeom = new Geometry(\"lLeg\", this.legBox);\n this.rLegGeom = new Geometry(\"rLeg\", this.legBox);\n this.bodyGeom = new Geometry(\"Body\", this.bodyBox);\n this.lArmGeom = new Geometry(\"lArm\", this.armBox);\n this.rArmGeom = new Geometry(\"rArm\", this.armBox);\n this.headGeom = new Geometry(\"Head\", this.headBox);\n this.weaponGeom = new Geometry(\"Weapon\", this.weaponBox);\n \n //Set materials\n this.lLegGeom.setMaterial(this.legMat);\n this.rLegGeom.setMaterial(this.legMat);\n this.bodyGeom.setMaterial(this.bodyMat);\n this.lArmGeom.setMaterial(this.armMat);\n this.rArmGeom.setMaterial(this.armMat);\n this.headGeom.setMaterial(this.headMat);\n \n //TODO: Give weapons their own material\n this.weaponGeom.setMaterial(this.legMat);\n \n //Set the local transforms of geometry to align with joints properly\n this.lLegGeom.move(0,-1.5f,0);\n this.rLegGeom.move(0,-1.5f,0);\n this.bodyGeom.move(0,1.5f,0);\n this.lArmGeom.move(0,-1.5f,0);\n this.rArmGeom.move(0,-1.5f,0);\n this.headGeom.move(0,1f,0);\n this.weaponGeom.move(0,0,0);\n \n //Attach geometries to nodes\n this.body.attachChild(this.bodyGeom);\n this.lLeg.attachChild(this.lLegGeom);\n this.rLeg.attachChild(this.rLegGeom);\n this.lArm.attachChild(this.lArmGeom);\n this.rArm.attachChild(this.rArmGeom);\n this.head.attachChild(this.headGeom);\n this.weapon.attachChild(this.weaponGeom);\n \n Quaternion xRot = new Quaternion().fromAngleAxis(FastMath.DEG_TO_RAD * 0,Vector3f.UNIT_X.clone());\n Quaternion yRot = new Quaternion().fromAngleAxis(FastMath.DEG_TO_RAD * 0,Vector3f.UNIT_Z.clone());\n \n //Refactor ActorControl with Character Control\n CapsuleCollisionShape capsuleShape = new CapsuleCollisionShape(2.5f,3f,1);\n this.mobControl = new CharacterControl(capsuleShape, 3f);//Step size is set in last argument\n this.mobControl.setJumpSpeed(20);\n this.mobControl.setFallSpeed(45);\n this.mobControl.setGravity(50);\n \n \n this.root.setLocalRotation(xRot.mult(yRot));\n //this.handle.getLocalRotation().lookAt(Vector3f.UNIT_Z, Vector3f.UNIT_Y);\n \n this.root.scale(0.75f, 0.75f, 0.75f);\n \n //this.handle.setLocalTranslation(10f, 5f, 15f);\n \n rootNode.attachChild(this.handle);\n }", "public void rebuildFrame(){\n \n // Re-initialize frame with default attributes\n controlFrame.dispose();\n controlFrame = buildDefaultFrame(\"CSCI 446 - A.I. - Montana State University\");\n \n // Initialize header with default attributes\n header = buildDefaultHeader();\n \n // Initialize control panel frame with default attributes\n controlPanel = buildDefaultPanel(BoxLayout.Y_AXIS);\n \n // Combine objects\n controlPanel.add(header, BorderLayout.NORTH);\n controlFrame.add(controlPanel);\n \n }", "public AddContactFrame(TableFrame tableFrame) {\n this(tableFrame, new Contact());\n }", "public final BallJoint newBallJoint( Body body1, Body body2 )\n {\n BallJoint joint = newBallJointImpl( body1, body2 );\n \n //addJoint( joint );\n \n return ( joint );\n }", "public KinectSkeleton(Main main) {\r\n Material matW = new Material(main.getAssetManager(), \"Common/MatDefs/Misc/Unshaded.j3md\");\r\n matW.setColor(\"Color\", ColorRGBA.Black);\r\n if (main.kinect.joint != null) {\r\n //starting joints\r\n float[][] StartingJoint = {{(float) main.kinect.joint[10][1] / 1000f, (float) main.kinect.joint[10][2] / 1000f, (float) main.kinect.joint[10][3] / 1000f}, //right wrist\r\n {(float) main.kinect.joint[9][1] / 1000f, (float) main.kinect.joint[9][2] / 1000f, (float) main.kinect.joint[9][3] / 1000f}, //right elbow\r\n {(float) main.kinect.joint[8][1] / 1000f, (float) main.kinect.joint[8][2] / 1000f, (float) main.kinect.joint[8][3] / 1000f}, //right shoulder\r\n {(float) main.kinect.joint[2][1] / 1000f, (float) main.kinect.joint[2][2] / 1000f, (float) main.kinect.joint[2][3] / 1000f}, //shoulder center\r\n {(float) main.kinect.joint[4][1] / 1000f, (float) main.kinect.joint[4][2] / 1000f, (float) main.kinect.joint[4][3] / 1000f}, //left shoulder\r\n {(float) main.kinect.joint[5][1] / 1000f, (float) main.kinect.joint[5][2] / 1000f, (float) main.kinect.joint[5][3] / 1000f}, //left elbow\r\n {(float) main.kinect.joint[0][1] / 1000f, (float) main.kinect.joint[0][2] / 1000f, (float) main.kinect.joint[0][3] / 1000f}, //hip center\r\n {(float) main.kinect.joint[0][1] / 1000f, (float) main.kinect.joint[0][2] / 1000f, (float) main.kinect.joint[0][3] / 1000f}, //hip center\r\n {(float) main.kinect.joint[0][1] / 1000f, (float) main.kinect.joint[0][2] / 1000f, (float) main.kinect.joint[0][3] / 1000f}, //hip center\r\n {(float) main.kinect.joint[0][1] / 1000f, (float) main.kinect.joint[0][2] / 1000f, (float) main.kinect.joint[0][3] / 1000f}, //hip center\r\n {(float) main.kinect.joint[0][1] / 1000f, (float) main.kinect.joint[0][2] / 1000f, (float) main.kinect.joint[0][3] / 1000f}, //hip center\r\n {(float) main.kinect.joint[13][1] / 1000f, (float) main.kinect.joint[13][2] / 1000f, (float) main.kinect.joint[13][3] / 1000f}, //left knee\r\n {(float) main.kinect.joint[17][1] / 1000f, (float) main.kinect.joint[17][2] / 1000f, (float) main.kinect.joint[17][3] / 1000f}}; //right knee\r\n //joint the starting joints connect to\r\n float[][] ConnectingJoint = {{(float) main.kinect.joint[9][1] / 1000f, (float) main.kinect.joint[9][2] / 1000f, (float) main.kinect.joint[9][3] / 1000f}, //right elbow\r\n {(float) main.kinect.joint[8][1] / 1000f, (float) main.kinect.joint[8][2] / 1000f, (float) main.kinect.joint[8][3] / 1000f}, //right shoulder\r\n {(float) main.kinect.joint[2][1] / 1000f, (float) main.kinect.joint[2][2] / 1000f, (float) main.kinect.joint[2][3] / 1000f}, //shoulder center\r\n {(float) main.kinect.joint[4][1] / 1000f, (float) main.kinect.joint[4][2] / 1000f, (float) main.kinect.joint[4][3] / 1000f}, //left shoulder\r\n {(float) main.kinect.joint[5][1] / 1000f, (float) main.kinect.joint[5][2] / 1000f, (float) main.kinect.joint[5][3] / 1000f}, //left elbow\r\n {(float) main.kinect.joint[6][1] / 1000f, (float) main.kinect.joint[6][2] / 1000f, (float) main.kinect.joint[6][3] / 1000f}, //left wrist\r\n {(float) main.kinect.joint[2][1] / 1000f, (float) main.kinect.joint[2][2] / 1000f, (float) main.kinect.joint[2][3] / 1000f}, //shoulder center\r\n {(float) main.kinect.joint[8][1] / 1000f, (float) main.kinect.joint[8][2] / 1000f, (float) main.kinect.joint[8][3] / 1000f}, //right shoulder\r\n {(float) main.kinect.joint[4][1] / 1000f, (float) main.kinect.joint[4][2] / 1000f, (float) main.kinect.joint[4][3] / 1000f}, //left shoulder\r\n {(float) main.kinect.joint[13][1] / 1000f, (float) main.kinect.joint[13][2] / 1000f, (float) main.kinect.joint[13][3] / 1000f}, //left knee\r\n {(float) main.kinect.joint[17][1] / 1000f, (float) main.kinect.joint[17][2] / 1000f, (float) main.kinect.joint[17][3] / 1000f}, //right knee\r\n {(float) main.kinect.joint[14][1] / 1000f, (float) main.kinect.joint[14][2] / 1000f, (float) main.kinect.joint[14][3] / 1000f}, //left ankle\r\n {(float) main.kinect.joint[18][1] / 1000f, (float) main.kinect.joint[18][2] / 1000f, (float) main.kinect.joint[18][3] / 1000f}}; //right ankle\r\n //start loop to connect all joints\r\n for (int i = 0; i < bones.length; i++) {\r\n Cylinder c = new Cylinder(10, 10, 0.04f, 1f, true);\r\n //set geometry, connect and transform cylinder, set material\r\n bones[i] = new Geometry(\"Cylinder\", c);\r\n setConnectiveTransform(ConnectingJoint[i], StartingJoint[i], bones[i]);\r\n bones[i].setMaterial(matW);\r\n //attach physics to bones\r\n RigidBodyControl phy = new RigidBodyControl(1f); //0f = 0 mass\r\n bones[i].addControl(phy);\r\n phy.setKinematic(true);\r\n //attach physics to world\r\n main.bulletAppState.getPhysicsSpace().add(phy);\r\n //attach to node so we can play\r\n skeleton.attachChild(bones[i]);\r\n }\r\n //float y = (float) main.kinect.joint[0][3] / 1000f+(float) main.kinect.joint[0][3] / 1000f;\r\n skeleton.move(0, 0.75f, 0);\r\n ;\r\n } else {\r\n System.out.println(\"NULL!\");\r\n }\r\n }", "MolecularSequenceReferenceSeq getReferenceSeq();", "@Override\n\tprotected void createFrameOrbit( String frameColor )\n\t{\n\t\t\n AlgebraicField hf = this .mField;\n\n AlgebraicNumber one = hf .one();\n AlgebraicNumber s = hf .getAffineScalar().reciprocal(); // reciprocal of sigma\n AlgebraicNumber R = hf .createPower( 1 ) .times( s ); // rho / sigma\n\n // (-s,1) Y\n // +---+------ [2] ---------+-----------+--------+---+\n // / / / (s,R) / /\n // +---+--------+-----------+--------- [1] ------+---+\n // / / / / / /\n // / / / / / / /\n // / / / / / /\n // (-1,s) [3] -+--------+-----------+-----------+--------+---+\n // / / / / / /\n // / / / / / / /\n // / / / / / / /\n // / / / / / \n // +---+--------+--------- O ---------+--------+- [0] (1,0) X\n // / / / / / \n // / / / /<--- s --->/ / /\n // / / / /<-------- R ------->/ /\n // / / /<---------- 1 --------->/\n // +- [4| ------+-----------+-----------+--------+---+\n // / (-R,-s) / / / / /\n // / / / / / / /\n // / / / / / (R,-R) /\n // +---+--------+-----------+-----------+------ [6] -+\n // / / / / /\n // +---+--------+--------- [5] ---------+--------+---+\n // (0,-1)\n \n AlgebraicVector zAxis = hf .basisVector( 3, AlgebraicVector.Z );\n AlgebraicVector zAxisNeg = zAxis .negate();\n AlgebraicVector axis0 = hf .basisVector( 3, AlgebraicVector.X );\n AlgebraicVector axis1 = hf .origin( 3 )\n \t\t.setComponent( AlgebraicVector.X, s )\n\t\t\t\t.setComponent( AlgebraicVector.Y, R );\n AlgebraicVector axis2 = hf .origin( 3 )\n \t\t.setComponent( AlgebraicVector.X, s .negate() )\n\t\t\t\t.setComponent( AlgebraicVector.Y, one );\n AlgebraicVector axis3 = hf .origin( 3 )\n \t\t.setComponent( AlgebraicVector.X, one .negate() )\n\t\t\t\t.setComponent( AlgebraicVector.Y, s );\n AlgebraicVector axis4 = hf .origin( 3 )\n \t\t.setComponent( AlgebraicVector.X, R .negate() )\n\t\t\t\t.setComponent( AlgebraicVector.Y, s .negate() );\n AlgebraicVector axis5 = hf .origin( 3 )\n\t\t\t\t.setComponent( AlgebraicVector.Y, one .negate() );\n AlgebraicVector axis6 = hf .origin( 3 )\n \t\t.setComponent( AlgebraicVector.X, R )\n\t\t\t\t.setComponent( AlgebraicVector.Y, R .negate() );\n\n // all mMatrices are mappings of [X,Y,Z] = [ axis0, -axis5, zAxis ]\n mMatrices[ 0 ] = hf .identityMatrix( 3 );\n mMatrices[ 1 ] = new AlgebraicMatrix( axis1, axis6 .negate(), zAxis );\n mMatrices[ 2 ] = new AlgebraicMatrix( axis2, axis0 .negate(), zAxis );\n mMatrices[ 3 ] = new AlgebraicMatrix( axis3, axis1 .negate(), zAxis );\n mMatrices[ 4 ] = new AlgebraicMatrix( axis4, axis2 .negate(), zAxis );\n mMatrices[ 5 ] = new AlgebraicMatrix( axis5, axis3 .negate(), zAxis );\n mMatrices[ 6 ] = new AlgebraicMatrix( axis6, axis4 .negate(), zAxis );\n \n mMatrices[ 7 ] = new AlgebraicMatrix( axis0, axis2 .negate(), zAxisNeg );\n mMatrices[ 8 ] = mMatrices[ 1 ] .times( mMatrices[ 7 ] );\n mMatrices[ 9 ] = mMatrices[ 2 ] .times( mMatrices[ 7 ] );\n mMatrices[ 10 ] = mMatrices[ 3 ] .times( mMatrices[ 7 ] );\n mMatrices[ 11 ] = mMatrices[ 4 ] .times( mMatrices[ 7 ] );\n mMatrices[ 12 ] = mMatrices[ 5 ] .times( mMatrices[ 7 ] );\n mMatrices[ 13 ] = mMatrices[ 6 ] .times( mMatrices[ 7 ] );\n\t}", "@Test(expected = IllegalArgumentException.class)\r\n\tpublic void createWithSameBody() {\r\n\t\tnew WeldJoint<Body>(b1, b1, new Vector2());\r\n\t}", "public BruceWayne()\n {\n GeneralPath leftSide = new GeneralPath();\n\tleftSide.moveTo(195,200);\n\tleftSide.lineTo(195,230);//neck\n\tleftSide.lineTo(150,230);//shoulder\n\tleftSide.lineTo(140,250);//shoulder slant\n\tleftSide.lineTo(140,340);//armleft\n\tleftSide.lineTo(165,340);//armbottom\n\tleftSide.lineTo(160,260);//armright\n\tleftSide.lineTo(170,270);//armpit\n\tleftSide.lineTo(170,350);//chest\n\tleftSide.lineTo(160,510);//legleft\n\tleftSide.lineTo(185,510);//legbottom\n\tleftSide.lineTo(200,360);//legright\n\tleftSide.lineTo(220,360);//middle\n\n Shape rightSide = ShapeTransforms.horizontallyFlippedCopyOf(leftSide);\n rightSide = ShapeTransforms.translatedCopyOf(rightSide, 140.0, 0.0);\n\tCircle head = new Circle(210,170,35);\n \n\twholeFigure = new GeneralPath();\n\twholeFigure.append(head,false);\n wholeFigure.append(leftSide, false);\n wholeFigure.append(rightSide, false);\n }", "public final FixedJoint newFixedJoint( Body body1, Body body2 )\n {\n FixedJoint joint = newFixedJointImpl( body1, body2 );\n \n //addJoint( joint );\n \n return ( joint );\n }", "private void createFrame(){\n System.out.println(\"Assembling \" + name + \" frame.\");\n }", "public static void buildFrame() {\r\n\t\t// Make sure we have nice window decorations\r\n\t\tJFrame.setDefaultLookAndFeelDecorated(true);\r\n\t\t\r\n\t\t// Create and set up the window.\r\n\t\t//ParentFrame frame = new ParentFrame();\r\n\t\tMediator frame = new Mediator();\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\t\r\n\t\t// Display the window\r\n\t\tframe.setVisible(true);\r\n\t}", "public void createFrame() {\r\n System.out.println(\"Framing: Adding the log walls.\");\r\n }", "public interface FrameBuilder {\r\n\r\n /**\r\n * Creates graphic frames.\r\n * @param num The frame index for which the graphic is to be \r\n * produced for.\r\n * @return The graphic for the respective frame index.\r\n */\r\n Graphic create(int num);\r\n }", "public JexlEngine.Frame createFrame(Object... values) {\r\n return scope != null? scope.createFrame(values) : null;\r\n }", "private static Frame makeNextFrame(Player player) {\r\n Frame nextFrame = new Frame();\r\n nextFrame.setPlayer(player);\r\n\r\n return nextFrame;\r\n }", "@Test(expected = NullPointerException.class)\r\n\tpublic void createWithNullBody2() {\r\n\t\tnew WeldJoint<Body>(b1, null, new Vector2());\r\n\t}", "public void addBoneRef(BoneRef ref){\n \t\tthis.boneRefs[bonePointer++] = ref;\n \t}", "public void run() {\n\tObjectFrame flange = lbr_iiwa_14_R820_1.getFlange();\t\t//flange frame\n\tObjectFrame lbrRoot = lbr_iiwa_14_R820_1.getRootFrame();\t//root frame\n\t\t\t\n\t// define frames for task trajectory:\n\tFrame F_contactEnd = new Frame(lbrRoot,500,0,385,Math.toRadians(180),Math.toRadians(0),Math.toRadians(180));\n\t\n\tFrame F_tmp = F_contactEnd.copy();\n\t\n\tF_flyMin \t\t= F_tmp.transform(lbrRoot,XyzAbcTransformation.ofTranslation( -40,0, 50)).copy();\n\tF_fly3 \t\t\t= F_tmp.transform(lbrRoot,XyzAbcTransformation.ofTranslation( 40,0, 60)).copy();\n\tF_fly4 \t\t\t= F_tmp.transform(lbrRoot,XyzAbcTransformation.ofTranslation( 200,0, 0)).copy();\n\tF_flyMax \t\t= F_tmp.transform(lbrRoot,XyzAbcTransformation.ofTranslation( 40,0, -60)).copy();\t\t\n\tF_contactStart \t= F_tmp.transform(lbrRoot,XyzAbcTransformation.ofTranslation( -40,0, -50)).copy();\n\t\n\tSystem.out.println(String.format(\"F_flyMin, x: %1$f y: %2$f z: %3$f\", F_flyMin.getX(), F_flyMin.getY(), F_flyMin.getZ()));\n\tSystem.out.println(String.format(\"F_fly3, x: %1$f y: %2$f z: %3$f\", F_fly3.getX(), F_fly3.getY(), F_fly3.getZ()));\n\tSystem.out.println(String.format(\"F_fly4, x: %1$f y: %2$f z: %3$f\", F_fly4.getX(), F_fly4.getY(), F_fly4.getZ()));\n\tSystem.out.println(String.format(\"F_flyMax, x: %1$f y: %2$f z: %3$f\", F_flyMax.getX(), F_flyMax.getY(), F_flyMax.getZ()));\n\tSystem.out.println(String.format(\"F_contactStart, x: %1$f y: %2$f z: %3$f\", F_contactStart.getX(), F_contactStart.getY(), F_contactStart.getZ()));\n\t\n\tSpline flyingPhase_spline = new Spline(\n\t\t\tlin(F_contactEnd),\n\t\t\tspl(F_flyMin).setOrientationType(SplineOrientationType.Ignore),\n\t\t\tlin(F_fly3).setOrientationType(SplineOrientationType.Ignore),\n\t\t\tspl(F_fly4).setOrientationType(SplineOrientationType.Ignore),\n\t\t\tlin(F_flyMax).setOrientationType(SplineOrientationType.Ignore),\n\t\t\tspl(F_contactStart)\n\t\t);\n\t\n\t\n\t// move to standBy position:\n\tSystem.out.println(\"going to standBy position\");\n\tlbr_iiwa_14_R820_1.move(ptp(J_standBy).setJointVelocityRel(vRel_taxing));\n\t\n\n\t\n\t/*\n\tSystem.out.println(\"going to end frame of contact phase\");\n\tlbr_iiwa_14_R820_1.move(lin(F_contactEnd).setCartVelocity(v_taxing));\n\t*/\n\t\n\t/*\n\tlbr_iiwa_14_R820_1.move(lin(F_flyMin).setCartVelocity(v_taxing));\n\tlbr_iiwa_14_R820_1.move(lin(F_fly3).setCartVelocity(v_taxing));\n\tlbr_iiwa_14_R820_1.move(lin(F_fly4).setCartVelocity(v_taxing));\n\t\n\tlbr_iiwa_14_R820_1.move(lin(F_flyMax).setCartVelocity(v_taxing));\n\tlbr_iiwa_14_R820_1.move(lin(F_contactStart).setCartVelocity(v_taxing));\n\tlbr_iiwa_14_R820_1.move(lin(F_contactEnd).setCartVelocity(v_taxing)); \n\t*/\n\t\n\t/*\n\tSystem.out.println(\"start flying phase - spline (3x)\");\n\tfor (int i=1; i<=3; i++)\n\t{\n\t\tlbr_iiwa_14_R820_1.move(flyingPhase_spline.setCartVelocity(v_fly).setCartAcceleration(250));\n\t}\n\t*/\n\t\n\t/*\n\tSystem.out.println(\"start flying phase - batch\");\n\tlbr_iiwa_14_R820_1.moveAsync(batch(\n\t\t\tlin(F_contactEnd),\n\t\t\tlin(F_flyMin).setOrientationType(SplineOrientationType.Ignore),\n\t\t\tlin(F_fly3).setOrientationType(SplineOrientationType.Ignore),\n\t\t\tlin(F_fly4).setOrientationType(SplineOrientationType.Ignore),\n\t\t\tlin(F_flyMax).setOrientationType(SplineOrientationType.Ignore),\n\t\t\tlin(F_contactStart)\n\t).setCartVelocity(v_fly));\n\t*/\n\t\n\t\n\tSystem.out.println(\"Setting impedance mode\");\n\tCartesianImpedanceControlMode cartImpMode = new CartesianImpedanceControlMode();\n\n\t/*\n\tcartImpMode.parametrize(CartDOF.TRANSL).setStiffness(1500);\n\tcartImpMode.parametrize(CartDOF.TRANSL).setDamping(0.7);\n\n\tcartImpMode.parametrize(CartDOF.Z).setStiffness(100);\n\n\tcartImpMode.parametrize(CartDOF.ROT).setStiffness(200);\n\tcartImpMode.parametrize(CartDOF.ROT).setDamping(0.7);\n\n\tcartImpMode.setNullSpaceDamping(0.3);\n\tcartImpMode.setNullSpaceStiffness(0);\n\n\tcartImpMode.setMaxControlForce(30, 30, 30, 10, 10, 10, false);\n\t*/\n\t\n\t// manage data recording\n\tDataRecorder rec = new DataRecorder(); //data recording \n\trec.setFileName(\"Recording.log\");\n\trec.setSampleRate(100);\n\trec.addCartesianForce(lbr_iiwa_14_R820_1.getFlange(),lbrRoot);\n\tStartRecordingAction startAction = new StartRecordingAction(rec);\n\t\n\tForceCondition condstart = ForceCondition.createNormalForceCondition(null, CoordinateAxis.Z, 1); //recording trigger\n\tForceCondition condend = ForceCondition.createNormalForceCondition(null, CoordinateAxis.Z, force_z); //stop movement trigger\n\t\n\t\n\tSystem.out.println(\"going to start frame of contact phase\");\n\tlbr_iiwa_14_R820_1.move(lin(F_contactStart).setCartVelocity(v_taxing).setCartAcceleration(200));\t\n\t\n\t//start cycling\n\tfor (int i_cycle=1; i_cycle <= 3; i_cycle ++)\n\t{\n\t\tSystem.out.println(String.format(\"cycle # %1$d\", i_cycle));\n\t\t\n\t\t//PHASE 1: transition, landing\n\t\t//System.out.println(\"start transition phase, landing, impedance mode \");\n\t\t//lbr_iiwa_14_R820_1.move(linRel(0,0,-dz,lbrRoot).triggerWhen(condstart, startAction).breakWhen(condend).setCartVelocity(v_transition).setMode(cartImpMode));\n\t\t\n\t\tif (i_cycle == 1)\n\t\t{\n\t\t\t// check data recording\n\t\t\tSystem.out.println(\"recording activated\");\n\t\t\tif(rec.isFileAvailable())\n\t\t\t\tSystem.out.println(\"data file available\");\n\t\t\t\n\t\t\tURL url = rec.getURL();\n\t\t\tdummy = url.toString();\n\t\t\tSystem.out.println(dummy);\n\t\t}\n\t\t\n\t\t// print current force value\n\t\tForceSensorData data = lbr_iiwa_14_R820_1.getExternalForceTorque(lbr_iiwa_14_R820_1.getFlange());\n\t\tSystem.out.println(String.format(\"Fz = %1$f \",data.getForce().getZ()));\n\t\t\n\t\t// PHASE 2: contact phase\n\t\t//System.out.println(\"start contact phase, impedance mode\");\n\t\t//lbr_iiwa_14_R820_1.move(lin(F_contactEnd).setCartVelocity(v_contact).setMode(cartImpMode));\n\t\t/*\n\t\t// PHASE 3: transition phase, take off\n\t\tSystem.out.println(\"start transition phase, impedance mode\");\n\t\tlbr_iiwa_14_R820_1.move(linRel(0,0,dz,lbrRoot).setCartVelocity(v_transition).setMode(cartImpMode));\n\t\t*/\n\t\t// PHASE 4: flying phase \n\t\tSystem.out.println(\"start flying phase, swift\");\n\t\tlbr_iiwa_14_R820_1.move(flyingPhase_spline.setCartVelocity(v_fly).setCartAcceleration(250).setMode(cartImpMode));\n\t}\n\t\n\t\n\t// stop recording\n\trec.stopRecording();\n\tSystem.out.println(\"data recording stopped\");\n\t\n\t\n\t// move to standBy position:\n\tlbr_iiwa_14_R820_1.move(ptp(J_standBy).setJointVelocityRel(vRel_taxing));\n\t\t\n\t}", "public final void rule__Joint__Body2Assignment_9() 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:9700:1: ( ( ruleBodyReference ) )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:9701:1: ( ruleBodyReference )\n {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:9701:1: ( ruleBodyReference )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:9702:1: ruleBodyReference\n {\n before(grammarAccess.getJointAccess().getBody2BodyReferenceParserRuleCall_9_0()); \n pushFollow(FOLLOW_ruleBodyReference_in_rule__Joint__Body2Assignment_919479);\n ruleBodyReference();\n\n state._fsp--;\n\n after(grammarAccess.getJointAccess().getBody2BodyReferenceParserRuleCall_9_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 }", "ReferenceEmbed createReferenceEmbed();", "public Record makeReferenceRecord(RecordOwner recordOwner)\n {\n try {\n return (Record)this.getRecord().clone();\n } catch (CloneNotSupportedException ex) {\n ex.printStackTrace();\n }\n return null;\n }", "@Test(expected = NullPointerException.class)\r\n\tpublic void createWithNullBody1() {\r\n\t\tnew WeldJoint<Body>(null, b2, new Vector2());\r\n\t}", "private void makeFrame(){\n frame = new JFrame(\"Rebellion\");\n\n frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n frame.setSize(800,800);\n\n makeContent(frame);\n\n frame.setBackground(Color.getHSBColor(10,99,35));\n frame.pack();\n frame.setVisible(true);\n }", "private com.google.protobuf.SingleFieldBuilderV3<\n org.apache.calcite.avatica.proto.Common.Frame, org.apache.calcite.avatica.proto.Common.Frame.Builder, org.apache.calcite.avatica.proto.Common.FrameOrBuilder> \n getFrameFieldBuilder() {\n if (frameBuilder_ == null) {\n frameBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<\n org.apache.calcite.avatica.proto.Common.Frame, org.apache.calcite.avatica.proto.Common.Frame.Builder, org.apache.calcite.avatica.proto.Common.FrameOrBuilder>(\n getFrame(),\n getParentForChildren(),\n isClean());\n frame_ = null;\n }\n return frameBuilder_;\n }", "public final void rule__BodyReference__NewAssignment_1() 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:9423:1: ( ( ( 'new' ) ) )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:9424:1: ( ( 'new' ) )\n {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:9424:1: ( ( 'new' ) )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:9425:1: ( 'new' )\n {\n before(grammarAccess.getBodyReferenceAccess().getNewNewKeyword_1_0()); \n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:9426:1: ( 'new' )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:9427:1: 'new'\n {\n before(grammarAccess.getBodyReferenceAccess().getNewNewKeyword_1_0()); \n match(input,75,FOLLOW_75_in_rule__BodyReference__NewAssignment_118923); \n after(grammarAccess.getBodyReferenceAccess().getNewNewKeyword_1_0()); \n\n }\n\n after(grammarAccess.getBodyReferenceAccess().getNewNewKeyword_1_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 }", "protected abstract void addJointImpl( Joint joint );", "public frame() {\r\n\t\tframeOwner = 0;\r\n\t\tassignedProcess = 0;\r\n\t\tpageNumber = 0;\r\n\t}", "protected abstract Hinge2Joint newHinge2JointImpl( Body body1, Body body2 );", "public Joint (SkeletonJoint skeletonJoint) {\n\t\tthis.skeletonJoint = skeletonJoint;\n\t\tposition2d = new Vector2f();\n\t\tposition3d = new Vector3f();\n\t\tconfidence = 0;\n\t}", "public B2FlxPulleyJoint(B2FlxShape spriteA, B2FlxShape spriteB, PulleyJointDef jointDef)\r\n\t{\r\n\t\tsuper(spriteA, spriteB, jointDef);\r\n\t\tanchorA = bodyA.getWorldCenter();\r\n\t\tanchorB = bodyB.getWorldCenter();\r\n\t}", "private Frame initFrameExternalConstraintForCompatible() {\n return new NonOverlappingFrame();\n }", "public T caseJointRef(JointRef object) {\r\n\t\treturn null;\r\n\t}", "public FrameBodyASPI() {\r\n super();\r\n }", "public CyFrame captureCurrentFrame() throws IOException{\n\t//\tCyNetwork currentNetwork = Cytoscape.getCurrentNetwork();\n\t\tCyFrame frame = new CyFrame(bundleContext);\n\n\t/*\tCyApplicationManager appManager = (CyApplicationManager) getService(CyApplicationManager.class);\n\t\tCyNetworkView networkView = appManager.getCurrentNetworkView(); */\n\t\n\t\t//extract view data to make the frame\n\t\tframe.populate(); \n\t\n\t\t//set the interpolation count, or number of frames between this frame and the next to be interpolated\n\t\tframe.setInterCount(fps);\n\t\n\t\t//frame.setID(networkView.getIdentifier()+\"_\"+frameid);\n\t\t//System.out.println(\"Frame ID: \"+frameid);\n\t\n\t\t//capture an image of the frame\n\t\tframe.captureImage();\n\t\n\t\t//frameid++;\n\t\n\t\treturn frame;\n\t\n\t}", "public void xsetFrame(com.walgreens.rxit.ch.cda.StrucDocTable.Frame frame)\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.walgreens.rxit.ch.cda.StrucDocTable.Frame target = null;\n target = (com.walgreens.rxit.ch.cda.StrucDocTable.Frame)get_store().find_attribute_user(FRAME$24);\n if (target == null)\n {\n target = (com.walgreens.rxit.ch.cda.StrucDocTable.Frame)get_store().add_attribute_user(FRAME$24);\n }\n target.set(frame);\n }\n }", "public org.apache.calcite.avatica.proto.Common.Frame.Builder getFrameBuilder() {\n \n onChanged();\n return getFrameFieldBuilder().getBuilder();\n }", "private ReferenceFrame selectFrame(String prompt) {\n System.out.println(\"\\n\" + prompt);\n System.out.println(\"(0) \" + world.getMasterFrame().getName());\n for (int i = 0; i < world.getRelativeFrames().size(); i++) {\n RelativeFrame relativeFrame = world.getRelativeFrames().get(i);\n String listNumber = \"(\" + (i + 1) + \") \";\n String frameName = relativeFrame.getName();\n String speed = \" moving at \" + relativeFrame.getVelocity() + \"c relative to the Stationary Frame\";\n System.out.println(listNumber + frameName + speed);\n }\n int index = input.nextInt();\n\n if (index == 0) {\n return world.getMasterFrame();\n } else if ((index > 0) && (index <= world.getRelativeFrames().size())) {\n return world.getRelativeFrames().get(index - 1);\n } else {\n System.out.println(\"Invalid frame.\");\n return selectFrame(prompt);\n }\n }", "@Override\n public void start() throws DialException {\n frame = new JFrame();\n JointActionListener jointListener = new JointActionListener();\n MyActionListener actionListener = new MyActionListener();\n\n JPanel jointPanel = new JPanel();\n JPanel actionPanel = new JPanel();\n JPanel statusPanel = new JPanel();\n frame.add(jointPanel);\n frame.add(actionPanel);\n frame.add(statusPanel);\n BoxLayout actionPanelLayout = new BoxLayout(actionPanel, BoxLayout.Y_AXIS);\n BoxLayout jointPanelLayout = new BoxLayout(jointPanel, BoxLayout.Y_AXIS);\n BoxLayout statusPanelLayout = new BoxLayout(statusPanel, BoxLayout.Y_AXIS);\n\n BoxLayout frameLayout = new BoxLayout(frame.getContentPane(), BoxLayout.X_AXIS);\n\n jointPanel.setLayout(jointPanelLayout);\n actionPanel.setLayout(actionPanelLayout);\n statusPanel.setLayout(statusPanelLayout);\n frame.setLayout(frameLayout);\n\n ArrayList<String> jointNames = readJointNames();\n for (String jointName : jointNames) {\n JButton button = new JButton(jointName);\n button.addActionListener(jointListener);\n\n jointPanel.add(button);\n }\n\n String actions[] = {\"up\", \"down\", \"max\", \"min\", \"def\", \"GO\", \"USER_READY\", \"YES\", \"NO\"};\n for (String action : actions) {\n JButton button = new JButton(action);\n button.addActionListener(actionListener);\n\n actionPanel.add(button);\n\n }\n\n currentAction.setText(actions[0]);\n currentJoint.setText(jointNames.get(0));\n statusPanel.add(currentJoint);\n\n statusPanel.add(currentAction);\n\n frame.setSize(800, 600);\n // frame.setLocation(600, 600);\n paused = false;\n frame.setVisible(true);\n }", "public PulleyJoint getJoint()\r\n\t{\r\n\t\treturn (PulleyJoint)joint;\r\n\t}", "private void buildBody() {\n\t\tBodyDef def = new BodyDef();\n\t\tdef.type = BodyType.KinematicBody;\n\t\tdef.position.set(new Vector2(0, 0));\n\t\tmouseBody = GamePlayManager.world.createBody(def);\n\n\t\t//this body is jointed to the above body and is physically pulled towards the mouse\n\t\tBodyDef def2 = new BodyDef();\n\t\tdef2.type = BodyType.DynamicBody;\n\t\tdef2.position.set(new Vector2(0, 0));\n\t\tBody collisionBody = GamePlayManager.world.createBody(def2);\n\t\tCircleShape shape = new CircleShape();\n\t\tshape.setRadius(8 * Util.PIXEL_TO_BOX);\n\t\tFixtureDef fixDef2 = new FixtureDef();\n\t\tfixDef2.shape = shape;\n\t\tfixDef2.isSensor = true;\n\t\tfixDef2.density = 1f;\n\t\tfixDef2.filter.categoryBits = Util.CATEGORY_EVERYTHING;\n\t\tfixDef2.filter.maskBits = Util.CATEGORY_EVERYTHING;\n\t\tcollisionBody.createFixture(fixDef2);\n\t\tcollisionBody.setUserData(this);\n\t\tshape.dispose();\n\t\t\n\t\tWeldJointDef jDef = new WeldJointDef();\n\t\tjDef.bodyA = mouseBody;\n\t\tjDef.bodyB = collisionBody;\n\t\tjDef.collideConnected = false;\n\t\tjDef.type = JointType.WeldJoint;\n\t\tjDef.referenceAngle = 0;\n\t\tjDef.dampingRatio = 0;\n\t\tGamePlayManager.world.createJoint(jDef);\n\t}", "public ArmJoint() {\n \t\n \tMotor = new CANTalon(RobotMap.Ports.bucketLifter);\n \tMotor.setFeedbackDevice(FeedbackDevice.CtreMagEncoder_Relative);\n \tMotor.clearStickyFaults();\n \tMotor.setSafetyEnabled(false);\n \tMotor.configNominalOutputVoltage(0, 0);\n \tMotor.configPeakOutputVoltage(12, -12);\n \tMotor.setAllowableClosedLoopErr(10);\n \tMotor.setProfile(0);\n \tMotor.setP(RobotMap.Values.armPidP);\n \tMotor.setI(RobotMap.Values.armPidI);\n \tMotor.setD(RobotMap.Values.armPidD);\n \tMotor.setF(0);\n\n \t//Motor.configEncoderCodesPerRev(1);\n \t//Motor.enableLimitSwitch(true, true);\n \t//Motor.enableBrakeMode(false);\n \t//Motor.enable();\n \t//Motor.changeControlMode(TalonControlMode.PercentVbus);\n \tMotor.enableZeroSensorPositionOnReverseLimit(true);\n \tMotor.set(0);\n \t\n \tLiveWindow.addActuator(\"ArmJoint\", 1, (CANTalon) Motor);\n // Use these to get going:\n // setSetpoint() - Sets where the PID controller should move the system\n // to\n // enable() - Enables the PID controller.\n }", "org.apache.calcite.avatica.proto.Common.Frame getFrame();", "private void addFrame() {\n String name = selectString(\"What is the name of this frame?\");\n ReferenceFrame frame = selectFrame(\"What frame are you defining this frame relative to?\");\n double v = selectDouble(\"How fast is this frame moving (as a fraction of c)?\", -1, 1);\n try {\n frame.boost(name, v);\n System.out.println(\"Frame added!\");\n } catch (NameInUseException e) {\n System.out.println(\"A frame with that name already exists!\");\n } catch (FasterThanLightException e) {\n System.out.println(\"Nothing can move as quickly as light!\");\n }\n }", "public static Entity translate(Frame frame)\r\n/* 54: */ {\r\n/* 55:65 */ return (Entity)frame.getThing().clone();\r\n/* 56: */ }", "private void referenceFrameExtractor(Object obj) throws IllegalAccessException, InvocationTargetException\n {\n Class clazz = obj.getClass();\n Method[] declaredMethods = clazz.getMethods();\n for (Method method : declaredMethods)\n {\n if (ReferenceFrame.class.isAssignableFrom(method.getReturnType()))\n {\n if (method.getParameterCount() == 0)\n {\n ReferenceFrame referenceFrame = (ReferenceFrame) method.invoke(obj);\n if(referenceFrame != null)\n {\n checkAndAddReferenceFrame(referenceFrame);\n }\n }\n else if (method.getParameterCount() == 1 && method.getParameterTypes()[0] == RobotSide.class)\n {\n for (RobotSide robotSide : RobotSide.values)\n {\n ReferenceFrame referenceFrame = (ReferenceFrame) method.invoke(obj, robotSide);\n if(referenceFrame != null)\n {\n checkAndAddReferenceFrame(referenceFrame);\n }\n }\n }\n else if (method.getParameterCount() == 1 && method.getParameterTypes()[0] == RobotQuadrant.class)\n {\n for (RobotQuadrant robotQuadrant : RobotQuadrant.values)\n {\n ReferenceFrame referenceFrame = (ReferenceFrame) method.invoke(obj, robotQuadrant);\n if(referenceFrame != null)\n {\n checkAndAddReferenceFrame(referenceFrame);\n }\n }\n }\n else if (method.getParameterCount() == 1 && method.getParameterTypes()[0] == RobotSextant.class)\n {\n for (RobotSextant robotSextant : RobotSextant.values)\n {\n ReferenceFrame referenceFrame = (ReferenceFrame) method.invoke(obj, robotSextant);\n if(referenceFrame != null)\n {\n checkAndAddReferenceFrame(referenceFrame);\n }\n }\n }\n }\n }\n }", "private Vector2 getNewBombPosition() {\n float xx=heroBody.getBody().getPosition().x*16, yy=heroBody.getBody().getPosition().y*16;\n if(heroBody.getCurrentState() == HeroBody.State.STAND_UP || heroBody.getCurrentState() == HeroBody.State.WALK_UP)\n yy+=16;\n else if(heroBody.getCurrentState() == HeroBody.State.STAND_DOWN || heroBody.getCurrentState() == HeroBody.State.WALK_DOWN)\n yy-=16;\n else if(heroBody.getCurrentState() == HeroBody.State.STAND_RIGHT || heroBody.getCurrentState() == HeroBody.State.WALK_RIGHT)\n xx+=16;\n else if(heroBody.getCurrentState() == HeroBody.State.STAND_LEFT || heroBody.getCurrentState() == HeroBody.State.WALK_LEFT)\n xx-=16;\n return new Vector2(xx,yy);\n }", "public void getCurrentJointPosition(iiwa_msgs.JointPosition currentJointPosition, LBR robot) {\n double[] position = robot.getCurrentJointPosition().getInternalArray();\n currentJointPosition.getHeader().setStamp(time.getCurrentTime());\n Conversions.vectorToJointQuantity(position, currentJointPosition.getPosition());\n }", "public static native PointerByReference OpenMM_AmoebaTorsionTorsionForce_create();", "void currentFrame(List<IShape> shapes);", "public Frame readFrame() {\n _buffer.flip();\n if(_buffer.hasRemaining()) {\n int frameSize = _buffer.getInt();\n byte[] body = new byte[frameSize];\n _buffer.get(body);\n return new Frame(frameSize, body);\n } else {\n return null;\n }\n }", "public WorldCoord getFrameLinkset()\r\n/* 45: */ {\r\n/* 46: 34 */ return null;\r\n/* 47: */ }", "ReferenceLink createReferenceLink();", "private Action refuelAt(Position target) {\n\t\tif (position.equals(target)) return new RefuelAction();\n\n\t\treturn moveTowardsPosition(target);\n\t}", "private void onUpdateFrame(FrameTime frameTime) {\n Frame frame = arFragment.getArSceneView().getArFrame();\n\n //In case there's no frame\n if (frame == null) {\n return;\n }\n\n //Used to Create Model at a certain Point on the Floor automatically\n if (frame.getCamera().getTrackingState() == TrackingState.TRACKING && !placed) {\n Pose pos = frame.getCamera().getPose().compose(Pose.makeTranslation(1f, 0f, -2.5f));\n\n //Anchor Node to set the Model in place\n Anchor anchor = arFragment.getArSceneView().getSession().createAnchor(pos);\n AnchorNode anchorNode = new AnchorNode(anchor);\n anchorNode.setParent(arFragment.getArSceneView().getScene());\n\n createModel(anchorNode, activeNode, activeRenderable);\n }\n }", "public int getJointIndex() {\r\n\t\treturn this.jointIndex;\r\n\t}", "public void attachStructure(CrosswordStructure structure);", "Frame getFrame();", "public final void rule__BodyReference__Alternatives() 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:1733:1: ( ( ( rule__BodyReference__BaseAssignment_0 ) ) | ( ( rule__BodyReference__NewAssignment_1 ) ) | ( ( rule__BodyReference__Group_2__0 ) ) | ( ( rule__BodyReference__Group_3__0 ) ) )\n int alt7=4;\n switch ( input.LA(1) ) {\n case 74:\n {\n alt7=1;\n }\n break;\n case 75:\n {\n alt7=2;\n }\n break;\n case 76:\n {\n alt7=3;\n }\n break;\n case RULE_ID:\n {\n alt7=4;\n }\n break;\n default:\n NoViableAltException nvae =\n new NoViableAltException(\"\", 7, 0, input);\n\n throw nvae;\n }\n\n switch (alt7) {\n case 1 :\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1734:1: ( ( rule__BodyReference__BaseAssignment_0 ) )\n {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1734:1: ( ( rule__BodyReference__BaseAssignment_0 ) )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1735:1: ( rule__BodyReference__BaseAssignment_0 )\n {\n before(grammarAccess.getBodyReferenceAccess().getBaseAssignment_0()); \n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1736:1: ( rule__BodyReference__BaseAssignment_0 )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1736:2: rule__BodyReference__BaseAssignment_0\n {\n pushFollow(FOLLOW_rule__BodyReference__BaseAssignment_0_in_rule__BodyReference__Alternatives3660);\n rule__BodyReference__BaseAssignment_0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getBodyReferenceAccess().getBaseAssignment_0()); \n\n }\n\n\n }\n break;\n case 2 :\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1740:6: ( ( rule__BodyReference__NewAssignment_1 ) )\n {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1740:6: ( ( rule__BodyReference__NewAssignment_1 ) )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1741:1: ( rule__BodyReference__NewAssignment_1 )\n {\n before(grammarAccess.getBodyReferenceAccess().getNewAssignment_1()); \n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1742:1: ( rule__BodyReference__NewAssignment_1 )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1742:2: rule__BodyReference__NewAssignment_1\n {\n pushFollow(FOLLOW_rule__BodyReference__NewAssignment_1_in_rule__BodyReference__Alternatives3678);\n rule__BodyReference__NewAssignment_1();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getBodyReferenceAccess().getNewAssignment_1()); \n\n }\n\n\n }\n break;\n case 3 :\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1746:6: ( ( rule__BodyReference__Group_2__0 ) )\n {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1746:6: ( ( rule__BodyReference__Group_2__0 ) )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1747:1: ( rule__BodyReference__Group_2__0 )\n {\n before(grammarAccess.getBodyReferenceAccess().getGroup_2()); \n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1748:1: ( rule__BodyReference__Group_2__0 )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1748:2: rule__BodyReference__Group_2__0\n {\n pushFollow(FOLLOW_rule__BodyReference__Group_2__0_in_rule__BodyReference__Alternatives3696);\n rule__BodyReference__Group_2__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getBodyReferenceAccess().getGroup_2()); \n\n }\n\n\n }\n break;\n case 4 :\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1752:6: ( ( rule__BodyReference__Group_3__0 ) )\n {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1752:6: ( ( rule__BodyReference__Group_3__0 ) )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1753:1: ( rule__BodyReference__Group_3__0 )\n {\n before(grammarAccess.getBodyReferenceAccess().getGroup_3()); \n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1754:1: ( rule__BodyReference__Group_3__0 )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1754:2: rule__BodyReference__Group_3__0\n {\n pushFollow(FOLLOW_rule__BodyReference__Group_3__0_in_rule__BodyReference__Alternatives3714);\n rule__BodyReference__Group_3__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getBodyReferenceAccess().getGroup_3()); \n\n }\n\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "@Override\n public void onNewFrame(HeadTransform headTransform) {\n float[] mtx = new float[16];\n GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT | GLES20.GL_DEPTH_BUFFER_BIT);\n surface.updateTexImage();\n surface.getTransformMatrix(mtx);\n }", "public void defineBody()\n {\n if(B2body != null){\n PlayScreen.world.destroyBody(B2body);}\n\n BodyDef bdef = new BodyDef();\n bdef.type = BodyDef.BodyType.KinematicBody;\n B2body = PlayScreen.world.createBody(bdef);\n\n\n calculateTriangle(mirror.getX(), mirror.getY(), mirror.getRotation());\n }", "public void setRotationAngles(float parTime, float parSwingSuppress, float par3, float parHeadAngleY, float parHeadAngleX, float par6, EntityElephant parEntity)\n {\n \t// return rotation point in case there was previous rearing animation\n \thead.setRotationPoint(headRotPointXDefault, headRotPointYDefault, headRotPointZDefault);\n body.setRotationPoint(bodyRotPointXDefault, bodyRotPointYDefault, bodyRotPointZDefault);\n legFrontRight.setRotationPoint(legFrontRightRotPointXDefault, legFrontRightRotPointYDefault, legFrontRightRotPointZDefault);\n legFrontLeft.setRotationPoint(legFrontLeftRotPointXDefault, legFrontLeftRotPointYDefault, legFrontLeftRotPointZDefault);\n childHead.setRotationPoint(childHeadRotPointXDefault, childHeadRotPointYDefault, childHeadRotPointZDefault);\n\n head.rotateAngleX = degToRad(parHeadAngleX);\n head.rotateAngleY = degToRad(parHeadAngleY);\n childHead.rotateAngleX = degToRad(parHeadAngleX);\n childHead.rotateAngleY = degToRad(parHeadAngleY);\n body.rotateAngleX = ((float)Math.PI / 2F);\n // swingSuppress goes to 0 when still so gates the movement\n legRearRight.rotateAngleX = MathHelper.cos(parTime * 0.6662F) * 1.4F * parSwingSuppress;\n legRearLeft.rotateAngleX = MathHelper.cos(parTime * 0.6662F + (float)Math.PI) * 1.4F * parSwingSuppress;\n legFrontRight.rotateAngleX = MathHelper.cos(parTime * 0.6662F + (float)Math.PI) * 1.4F * parSwingSuppress;\n legFrontLeft.rotateAngleX = MathHelper.cos(parTime * 0.6662F) * 1.4F * parSwingSuppress;\n trunk1.rotateAngleX = MathHelper.cos(degToRad(parEntity.ticksExisted*7)) * degToRad(15);\n childTrunk1.rotateAngleX = MathHelper.cos(degToRad(parEntity.ticksExisted*7)) * degToRad(15);\n trunk2.rotateAngleX = trunk1.rotateAngleX * 3;\n\n // flick ears\n ear1.rotateAngleY = (float) Math.pow(MathHelper.cos(degToRad(parEntity.ticksExisted*3)), 6) * degToRad(15);\n ear2.rotateAngleY = (float) Math.pow(MathHelper.cos(degToRad(parEntity.ticksExisted*3)), 6) * degToRad(-15);\n childEar1.rotateAngleY = (float) Math.pow(MathHelper.cos(degToRad(parEntity.ticksExisted*3)), 6) * degToRad(15);\n childEar2.rotateAngleY = (float) Math.pow(MathHelper.cos(degToRad(parEntity.ticksExisted*3)), 6) * degToRad(-15);\n\n // raise trunk if in water \n if (parEntity.isInWater())\n {\n \ttrunk1.rotateAngleX = degToRad(-150);\n \ttrunk2.rotateAngleX = degToRad(-20);\n \tchildTrunk1.rotateAngleX = degToRad(-150);\n }\n \n // perform rearing animation if appropriate\n if (parEntity.isRearing())\n {\n \tint rearingCounter = parEntity.getRearingCounter();\n// \t// DEBUG\n// \tSystem.out.println(\"ModelElephant entity is rearing with rearing counter = \"+rearingCounter);\n \t\n \t// move retain connection between body parts, hind legs stay where they were\n \thead.setRotationPoint(headRotPointXDefault, headRotPointYDefault+rearingOffsetCycle[rearingCounter][0], headRotPointZDefault+rearingOffsetCycle[rearingCounter][1]);\n body.setRotationPoint(bodyRotPointXDefault, bodyRotPointYDefault+rearingOffsetCycle[rearingCounter][2], bodyRotPointZDefault+rearingOffsetCycle[rearingCounter][3]);\n legFrontRight.setRotationPoint(legFrontRightRotPointXDefault, legFrontRightRotPointYDefault+rearingOffsetCycle[rearingCounter][4], legFrontRightRotPointZDefault+rearingOffsetCycle[rearingCounter][5]);\n legFrontLeft.setRotationPoint(legFrontLeftRotPointXDefault, legFrontLeftRotPointYDefault+rearingOffsetCycle[rearingCounter][6], legFrontLeftRotPointZDefault+rearingOffsetCycle[rearingCounter][7]);\n childHead.setRotationPoint(childHeadRotPointXDefault, childHeadRotPointYDefault+rearingOffsetCycle[rearingCounter][8], childHeadRotPointZDefault+rearingOffsetCycle[rearingCounter][9]);\n \n // rotate for rearing\n \tbody.rotateAngleX += degToRad(rearingAngleCycle[rearingCounter][0]);\n head.rotateAngleX += degToRad(rearingAngleCycle[rearingCounter][0]);\n \tchildHead.rotateAngleX += degToRad(rearingAngleCycle[rearingCounter][0]);\n \ttrunk1.rotateAngleX = degToRad(rearingAngleCycle[rearingCounter][1]);\n \ttrunk2.rotateAngleX = degToRad(rearingAngleCycle[rearingCounter][2]);\n \tchildTrunk1.rotateAngleX = degToRad(rearingAngleCycle[rearingCounter][1]);\n \tlegFrontRight.rotateAngleX = degToRad(rearingAngleCycle[rearingCounter][0]);\n \tlegFrontLeft.rotateAngleX = degToRad(rearingAngleCycle[rearingCounter][0]);\n }\n }", "public void newFrame()\n {\n //////////////////////////////////////////////////////////////\n // If vehicle is moving, update its position (by calling its \n // newFrame method. \n // Somehow, need to know if it has reached its goal position. \n // If so, figure out what the next goal should be.\n // \n // If previous goal was emergency site, new goal is hospital\n // If previous goal was a hospital (or if it was at home,\n // or if it was going home), new goal is the next\n // emergency site, if there is one, or home if no more \n // emergencies.\n //////////////////////////////////////////////////////////////\n if( state == 2 )\n {\n line.setVisible( false );\n if( reset == false ) \n { \n car.travelTo( 10, 10, EMTApp.normalSpeed );\n if( car.getLocation().x == 10 )\n {\n if( car.getLocation().y == 10 )\n {\n reset = true;\n }\n }\n }\n car.traveledReset();\n car.newFrame();\n if( _emergency.size() > 0 )\n {\n reset = false;\n state = 0; \n }\n }\n if( state == 3 )\n {\n Hospital h1 = this.getClosestHospital( car.getLocation() );\n line.setPoints( car.getLocation().x + car.getWidth() / 2, \n car.getLocation().y + car.getHeight() / 2, \n h1.getLocation().x, h1.getLocation().y );\n line.setVisible( true );\n car.travelTo( h1.getLocation().x, \n h1.getLocation().y , EMTApp.highSpeed );\n car.newFrame();\n }\n if( car.isTargetReached() == true )\n {\n if( state == 0 )\n { \n _frametimer.restart();\n boolean justGoHome = false;\n if( _emergency.size() > 0 ) \n {\n _emergency.get( 0 ).setColor( Color.BLUE );\n _emergency.get( 0 ).setVisible( false );\n _emergency.remove( 0 ); //removes the first object\n } else if ( _emergency.size() == 0 )\n {\n justGoHome = true;\n state = 1;\n }\n state = 3; \n } \n else if ( state == 1 )\n { \n _frametimer.restart(); \n if( _emergency.size() > 0 )\n { \n state = 0; \n } else \n {\n state = 2;\n }\n } \n else if ( state == 3 )\n {\n if( _emergency.size() > 0 )\n {\n _frametimer.restart();\n state = 0;\n } else \n {\n _frametimer.restart();\n state = 2;\n }\n }\n }\n if ( state == 1 ) \n {\n car.newFrame(); \n } \n else if( state == 0 )\n {\n if( this.nextSite() != null )\n {\n EmergencySite e = this.nextSite();\n currentSite = e;\n }\n currentSite.setNoDrag( true );\n \n int nextX = currentSite.getXLocation();\n int nextY = currentSite.getYLocation();\n line.setPoints( car.getX() + car.getWidth() / 2 , \n car.getY() + car.getHeight() / 2 , \n nextX + currentSite.getWidth() / 2 , \n nextY + currentSite.getHeight() / 2 );\n line.setVisible( true );\n \n int tmpx = currentSite.getXLocation();\n car.travelTo( tmpx, currentSite.getYLocation(), EMTApp.highSpeed );\n car.newFrame();\n } \n }", "public void addChildFrame(JFrame frame);", "@Override\n protected Object getModelObject()\n {\n return frame;\n }", "protected abstract SliderJoint newSliderJointImpl( Body body1, Body body2 );", "protected static CTGraphicalObjectFrame prototype() {\n\t\tif (prototype == null) {\n\t\t\tCTGraphicalObjectFrame graphicFrame = CTGraphicalObjectFrame.Factory.newInstance();\n\n\t\t\tCTGraphicalObjectFrameNonVisual nvGraphic = graphicFrame.addNewNvGraphicFramePr();\n\t\t\tCTNonVisualDrawingProps props = nvGraphic.addNewCNvPr();\n\t\t\tprops.setId(0);\n\t\t\tprops.setName(\"Diagramm 1\");\n\t\t\tnvGraphic.addNewCNvGraphicFramePr();\n\n\t\t\tCTTransform2D transform = graphicFrame.addNewXfrm();\n\t\t\tCTPositiveSize2D extPoint = transform.addNewExt();\n\t\t\tCTPoint2D offPoint = transform.addNewOff();\n\n\t\t\textPoint.setCx(0);\n\t\t\textPoint.setCy(0);\n\t\t\toffPoint.setX(0);\n\t\t\toffPoint.setY(0);\n\n\t\t\tCTGraphicalObject graphic = graphicFrame.addNewGraphic();\n\n\t\t\tprototype = graphicFrame;\n\t\t}\n\t\treturn prototype;\n\t}", "protected void createInternalFrame() {\n\t\tJInternalFrame frame = new JInternalFrame();\n\t\tframe.setVisible(true);\n\t\tframe.setClosable(true);\n\t\tframe.setResizable(true);\n\t\tframe.setFocusable(true);\n\t\tframe.setSize(new Dimension(300, 200));\n\t\tframe.setLocation(100, 100);\n\t\tdesktop.add(frame);\n\t\ttry {\n\t\t\tframe.setSelected(true);\n\t\t} catch (java.beans.PropertyVetoException e) {\n\t\t}\n\t}", "private void setupFrame() {\n this.setTitle(TITRE);\n this.setPreferredSize(new Dimension(TAILLE_FRAME[1], TAILLE_FRAME[0]));\n this.setResizable(false);\n \n this.getContentPane().setBackground(new Color(0,153,0));\n this.getContentPane().setLayout(new GridLayout(3,1)); \n \n this.pack();\n Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();\n this.setLocation(dim.width/2-this.getSize().width/2, dim.height/2-this.getSize().height/2);\n \n this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n this.setVisible(true);\n }", "@Test\n public void noteRef() throws Exception {\n Document doc = new Document();\n DocumentBuilder builder = new DocumentBuilder(doc);\n\n builder.write(\"CrossReference: \");\n\n FieldNoteRef field = (FieldNoteRef)builder.insertField(FieldType.FIELD_NOTE_REF, false); // <--- don't update field\n field.setBookmarkName(\"CrossRefBookmark\");\n field.setInsertHyperlink(true);\n field.setInsertReferenceMark(true);\n field.setInsertRelativePosition(false);\n builder.writeln();\n\n builder.startBookmark(\"CrossRefBookmark\");\n builder.write(\"Hello world!\");\n builder.insertFootnote(FootnoteType.FOOTNOTE, \"Cross referenced footnote.\");\n builder.endBookmark(\"CrossRefBookmark\");\n builder.writeln();\n\n doc.updateFields();\n\n // This field works only in older versions of Microsoft Word.\n doc.save(getArtifactsDir() + \"Field.NOTEREF.doc\");\n //ExEnd\n\n doc = new Document(getArtifactsDir() + \"Field.NOTEREF.doc\");\n field = (FieldNoteRef)doc.getRange().getFields().get(0);\n\n TestUtil.verifyField(FieldType.FIELD_NOTE_REF, \" NOTEREF CrossRefBookmark \\\\h \\\\f\", \"1\", field);\n TestUtil.verifyFootnote(FootnoteType.FOOTNOTE, true, null, \"Cross referenced footnote.\",\n (Footnote)doc.getChild(NodeType.FOOTNOTE, 0, true));\n }", "private SequenceFlow createSequenceFlow(FlowNode source, FlowNode target, ICreateConnectionContext context) {\r\n SequenceFlow sequenceFlow = new SequenceFlow();\r\n\r\n sequenceFlow.setId(getNextId());\r\n sequenceFlow.setSourceRef(source.getId());\r\n sequenceFlow.setTargetRef(target.getId());\r\n\r\n if (PreferencesUtil.getBooleanPreference(Preferences.EDITOR_ADD_LABELS_TO_NEW_SEQUENCEFLOWS)) {\r\n sequenceFlow.setName(String.format(\"to %s\", target.getName()));\r\n } else {\r\n sequenceFlow.setName(\"\");\r\n }\r\n\r\n ContainerShape targetContainer = null;\r\n if (source instanceof BoundaryEvent) {\r\n BoundaryEvent boundaryEvent = (BoundaryEvent) source;\r\n if (boundaryEvent.getAttachedToRef() != null) {\r\n Activity attachedActivity = boundaryEvent.getAttachedToRef();\r\n targetContainer = (ContainerShape) getFeatureProvider().getPictogramElementForBusinessObject(attachedActivity);\r\n }\r\n } else {\r\n targetContainer = (ContainerShape) context.getSourcePictogramElement();\r\n }\r\n \r\n ContainerShape parentContainer = targetContainer.getContainer();\r\n if (parentContainer instanceof Diagram) {\r\n ModelHandler.getModel(EcoreUtil.getURI(getDiagram())).getBpmnModel().getMainProcess().addFlowElement(sequenceFlow);\r\n\r\n } else {\r\n Object parentObject = getBusinessObjectForPictogramElement(parentContainer);\r\n if (parentObject instanceof SubProcess) {\r\n ((SubProcess) parentObject).addFlowElement(sequenceFlow);\r\n\r\n } else if (parentObject instanceof Lane) {\r\n Lane lane = (Lane) parentObject;\r\n lane.getParentProcess().addFlowElement(sequenceFlow);\r\n }\r\n }\r\n \r\n source.getOutgoingFlows().add(sequenceFlow);\r\n target.getIncomingFlows().add(sequenceFlow);\r\n return sequenceFlow;\r\n }", "String getContainmentReference();", "public Reference() {\n super();\n }", "public Builder mergeFirstFrame(org.apache.calcite.avatica.proto.Common.Frame value) {\n if (firstFrameBuilder_ == null) {\n if (firstFrame_ != null) {\n firstFrame_ =\n org.apache.calcite.avatica.proto.Common.Frame.newBuilder(firstFrame_).mergeFrom(value).buildPartial();\n } else {\n firstFrame_ = value;\n }\n onChanged();\n } else {\n firstFrameBuilder_.mergeFrom(value);\n }\n\n return this;\n }" ]
[ "0.6926796", "0.65345055", "0.5381833", "0.51389384", "0.50921583", "0.50557697", "0.5046574", "0.5041005", "0.49636006", "0.4937711", "0.4877397", "0.48767626", "0.48453975", "0.48417678", "0.4839418", "0.4834843", "0.4830505", "0.48304597", "0.48068553", "0.4785025", "0.4782267", "0.47806647", "0.47719708", "0.47688568", "0.4763297", "0.47438356", "0.47269443", "0.46846214", "0.46808422", "0.46806103", "0.46800065", "0.46796018", "0.4678713", "0.466687", "0.4654241", "0.4645511", "0.46284875", "0.4626898", "0.46143946", "0.4603553", "0.45792696", "0.45647803", "0.45613787", "0.4560068", "0.45594156", "0.45580703", "0.453889", "0.45317388", "0.4527063", "0.4522023", "0.4486294", "0.44850013", "0.4470396", "0.44694132", "0.44686005", "0.44590044", "0.44588184", "0.4447825", "0.4439807", "0.44312787", "0.44222742", "0.44187823", "0.44098607", "0.4407101", "0.4392365", "0.43826285", "0.43792528", "0.43788806", "0.4375958", "0.43745938", "0.4373622", "0.43711302", "0.4360365", "0.43559664", "0.43496445", "0.4344879", "0.43400738", "0.43216506", "0.43103713", "0.42953944", "0.4295379", "0.42852867", "0.42767748", "0.427259", "0.42713332", "0.42601043", "0.4252237", "0.42496514", "0.42488545", "0.42477694", "0.42418373", "0.42177853", "0.42160836", "0.42141315", "0.42132723", "0.42025226", "0.41938263", "0.4190861", "0.41876158", "0.41847804" ]
0.75954515
0
Creates a new transform updater that is optimized when the joint axis is aligned with either the x, y, or z axis of the local frame.
public static RevoluteJointTransformUpdater newRevoluteJointTransformUpdater(RevoluteJointReadOnly joint) { FrameVector3DReadOnly jointAxis = joint.getJointAxis(); RevoluteJointTransformUpdater jointTransformUpdater; if (jointAxis.geometricallyEquals(Axis.X, TRANSFORM_UPDATER_EPSILON)) { jointTransformUpdater = transform -> transform.setRotationRollAndZeroTranslation(joint.getQ()); } else if (jointAxis.geometricallyEquals(Axis.Y, TRANSFORM_UPDATER_EPSILON)) { jointTransformUpdater = transform -> transform.setRotationPitchAndZeroTranslation(joint.getQ()); } else if (jointAxis.geometricallyEquals(Axis.Z, TRANSFORM_UPDATER_EPSILON)) { jointTransformUpdater = transform -> transform.setRotationYawAndZeroTranslation(joint.getQ()); } else { AxisAngle axisAngle = new AxisAngle(); jointTransformUpdater = transform -> { axisAngle.set(joint.getJointAxis(), joint.getQ()); transform.setRotationAndZeroTranslation(axisAngle); }; } return jointTransformUpdater; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void updateJointTransform(RigidBodyTransform jointTransformToUpdate);", "private void updateTranslated() {\r\n\r\n\tfloat[] dp = new float[3];\r\n\tTools3d.subtract(p, _p, dp);\r\n\r\n\tfor (int i = 0; i < npoints * 3; i+= 3) {\r\n\t // translate by adding the amount local origin has moved by\r\n\t ps[i] += dp[0];\r\n\t ps[i + 1] += dp[1];\r\n\t ps[i + 2] += dp[2];\r\n\t}\r\n\t\r\n\t// reset bounding box and clear dirty flag\r\n\tbox.setBB();\r\n\tdirtyT = false;\r\n\r\n\t// finally\r\n\t_p[0] = p[0];\r\n\t_p[1] = p[1];\r\n\t_p[2] = p[2];\r\n }", "public static interface RevoluteJointTransformUpdater\n {\n /**\n * Updates the joint transform given its current configuration.\n * \n * @param jointTransformToUpdate the transform to update. Modified.\n */\n void updateJointTransform(RigidBodyTransform jointTransformToUpdate);\n }", "public void updateExtraTransformMatrix(float[] fArr) {\n }", "private void updateTransform() {\n Matrix matrix = new Matrix();\n float centerX = dataBinding.viewFinder.getWidth() / 2f;\n float centerY = dataBinding.viewFinder.getHeight() / 2f;\n int rotation = dataBinding.viewFinder.getDisplay().getRotation();\n int rotationDegrees = 0;\n switch (rotation) {\n case Surface.ROTATION_0:\n rotationDegrees = 0;\n break;\n case Surface.ROTATION_90:\n rotationDegrees = 90;\n break;\n case Surface.ROTATION_180:\n rotationDegrees = 180;\n break;\n case Surface.ROTATION_270:\n rotationDegrees = 270;\n break;\n default:\n }\n matrix.postRotate(-rotationDegrees, centerX, centerY);\n }", "public void setTransform(float a11, float a12, float a21, float a22, float x, float y);", "public void cameraTransform(Vector3f targ, Vector3f up) {\r\n\t\t// First normalize the target\r\n\t\tVector3f n = targ;\r\n\t\tn.normalize();\r\n\t\t// Then normalize the up vector\r\n\t\tVector3f u = up;\r\n\t\tu.normalize();\r\n\t\t// Then cross the two together to get the right vector\r\n\t\tu = u.cross(n);\r\n\t\tVector3f v = n.cross(u);\r\n\r\n\t\t// Finally build a matrix from the result\r\n\t\tm[0][0] = u.x; m[0][1] = u.y; m[0][2] = u.z; m[0][3] = 0.0f;\r\n\t\tm[1][0] = v.x; m[1][1] = v.y; m[1][2] = v.z; m[1][3] = 0.0f;\r\n\t\tm[2][0] = n.x; m[2][1] = n.y; m[2][2] = n.z; m[2][3] = 0.0f;\r\n\t\tm[3][0] = 0.0f; m[3][1] = 0.0f; m[3][2] = 0.0f; m[3][3] = 1.0f;\r\n\r\n\t}", "public void applyTransform() {\n\t\tglRotatef(xaxisrot, 1.0f, 0.0f, 0.0f);\n\t\tglRotatef(yaxisrot, 0.0f, 1.0f, 0.0f);\n\t\tglRotatef(tilt, 0.0f, 0.0f, 1.0f);\n\t\tglTranslatef(-pos.geti(), -pos.getj(), -pos.getk());\n\t}", "private void updateCamera() {\n\t\tVector3f x = new Vector3f();\n\t\tVector3f y = new Vector3f();\n\t\tVector3f z = new Vector3f();\n\t\tVector3f temp = new Vector3f(this.mCenterOfProjection);\n\n\t\ttemp.sub(this.mLookAtPoint);\n\t\ttemp.normalize();\n\t\tz.set(temp);\n\n\t\ttemp.set(this.mUpVector);\n\t\ttemp.cross(temp, z);\n\t\ttemp.normalize();\n\t\tx.set(temp);\n\n\t\ty.cross(z, x);\n\n\t\tMatrix4f newMatrix = new Matrix4f();\n\t\tnewMatrix.setColumn(0, x.getX(), x.getY(), x.getZ(), 0);\n\t\tnewMatrix.setColumn(1, y.getX(), y.getY(), y.getZ(), 0);\n\t\tnewMatrix.setColumn(2, z.getX(), z.getY(), z.getZ(), 0);\n\t\tnewMatrix.setColumn(3, mCenterOfProjection.getX(),\n\t\t\t\tmCenterOfProjection.getY(), mCenterOfProjection.getZ(), 1);\n\t\ttry {\n\t\t\tnewMatrix.invert();\n\t\t\tthis.mCameraMatrix.set(newMatrix);\n\t\t} catch (SingularMatrixException exc) {\n\t\t\tLog.d(\"Camera\",\n\t\t\t\t\t\"SingularMatrixException on Matrix: \"\n\t\t\t\t\t\t\t+ newMatrix.toString());\n\t\t}\n\t}", "protected void updatePosition() {\n\t\tif(motion == null) {\n\t\t\tmotion = new Motion3D(player, true);\n\t\t} else motion.update(player, true);\n\t\t\n\t\tmotion.applyToEntity(this);\n\t\tthis.rotationPitch = player.rotationPitch;\n\t\tthis.rotationYaw = player.rotationYaw;\n\t}", "private void updateRotated() {\r\n\r\n\tfor (int n = 0; n < npoints * 3; n += 3) {\r\n\r\n\t // take the linear sum of local co-ords with local\r\n\t // unit vectors and then translate by adding the local\r\n\t // origin's co-ords\r\n\t ps[n] = locals[n] * i[0] + locals[n + 1] * j[0] + locals[n + 2] * k[0];\r\n\t ps[n + 1] = locals[n] * i[1] + locals[n + 1] * j[1] + locals[n + 2] * k[1];\r\n\t ps[n + 2] = locals[n] * i[2] + locals[n + 1] * j[2] + locals[n + 2] * k[2];\r\n\r\n\t ps[n] += p[0];\r\n\t ps[n + 1] += p[1];\r\n\t ps[n + 2] += p[2];\r\n\t}\r\n\r\n\t// reset bounding box and clear dirty flags\r\n\tbox.setBB();\r\n\tdirtyR = false;\r\n\tdirtyT = false;\r\n\r\n\t// normals must be reset\r\n\tthis.setNormals();\r\n\r\n\t// finally\r\n\t_p[0] = p[0];\r\n\t_p[1] = p[1];\r\n\t_p[2] = p[2];\r\n\t_roll = roll;\r\n }", "public void updateTransformMatrix(float[] fArr) {\n boolean z;\n float f;\n float f2;\n boolean z2 = true;\n if (!this.mVideoStabilizationCropped || !ModuleManager.isVideoModule()) {\n f2 = 1.0f;\n f = 1.0f;\n z = false;\n } else {\n f2 = MOVIE_SOLID_CROPPED_X * 1.0f;\n f = MOVIE_SOLID_CROPPED_Y * 1.0f;\n z = true;\n }\n if (this.mNeedCropped) {\n f2 *= this.mScaleX;\n f *= this.mScaleY;\n z = true;\n }\n if (this.mDisplayOrientation == 0) {\n z2 = z;\n }\n if (z2) {\n Matrix.translateM(fArr, 0, 0.5f, 0.5f, 0.0f);\n Matrix.rotateM(fArr, 0, (float) this.mDisplayOrientation, 0.0f, 0.0f, 1.0f);\n Matrix.scaleM(fArr, 0, f2, f, 1.0f);\n Matrix.translateM(fArr, 0, -0.5f, -0.5f, 0.0f);\n }\n }", "private void updateJoinPos()\n {\n this.xLastJoinPos = (int) this.getX();\n this.yLastJoinPos = (int) this.getY();\n this.zLastJoinPos = (int) this.getZ();\n }", "public void updateTranslationAnimation() {\n\t\tif (target == null)\n\t\t\treturn;\n\t\t\n\t\tfinal float\n\t\t\t// Declare the distance to the target position.\n\t\t\tdeltaX = target.x - this.x(),\n\t\t\tdeltaY = target.y - this.y(),\n\t\t\t// Declare the new coordinates for the SwipeTile to use.\n\t\t\tnewX = this.x() + (deltaX * translationDamping),\n\t\t\tnewY = this.y() + (deltaY * translationDamping);\n\t\t\n\t\t// Set the SwipeTile to the new-coordinates.\n\t\tsetPosition(newX, newY);\n\t}", "public static NewMovement create(PosRotScale originLoc, float ex, float ey,float ez, int duration) {\n\n/*\n\t\tVector3 posO = new Vector3();\n\t\toriginObject.transform.getTranslation(posO);\n\t\t\n\t\tQuaternion orotation = new Quaternion();\n\t\toriginObject.transform.getRotation(orotation,true); //existing rotation\n\t\t\n\t\t//first we create a matrix for the destination location reusing the same rotation\n\t\t Vector3 destination_loc = new Vector3(ex,ey,ez);\n\t\t Vector3 destination_scale = new Vector3(1,1,1);\n\t\t// Matrix4 destination = new Matrix4(destination_loc,orotation,destination_scale);\n\t\t \n\t\t //the difference is the new movement\n\t\tMatrix4 oldloc = originObject.transform.cpy();\n\t\t\n\t\t Gdx.app.log(logstag, \"_____________________________________________destination_loc:\"+destination_loc.x+\",\"+destination_loc.y+\",\"+destination_loc.z);\n\t\t\t\n\t\t Vector3 destination_loc2 = destination_loc.mul(oldloc);\n\t\t \n\t\t Gdx.app.log(logstag, \"________________________=______destination_loc:\"+destination_loc2.x+\",\"+destination_loc2.y+\",\"+destination_loc2.z);\n\t\t\t\n\t\t\t\n\t\tMatrix4 destinationmatrix = new Matrix4().setTranslation(destination_loc2);\n\t\t\n\t\t*/\n\t\t Vector3 destination_loc = new Vector3(ex,ey,ez);\n\t\t \n\t\treturn create( originLoc, destination_loc, duration);\n\t\t\n\t}", "private void setOrigin() {\n Hep3Vector origin = VecOp.mult(CoordinateTransformations.getMatrix(), _sensor.getGeometry().getPosition());\n // transform to p-side\n Polygon3D psidePlane = this.getPsidePlane();\n Translation3D transformToPside = new Translation3D(VecOp.mult(-1 * psidePlane.getDistance(),\n psidePlane.getNormal()));\n this._org = transformToPside.translated(origin);\n }", "@Override\n public void update(String member, float[] values) {\n if (values.length == 3) {\n set(new Vector3f(values[0], values[1], values[2]));\n } else if (values.length == 1 && member.equalsIgnoreCase(\"X\")) {\n set(new Vector3f(values[0], cur.y, cur.z));\n } else if (values.length == 1 && member.equalsIgnoreCase(\"Y\")) {\n set(new Vector3f(cur.x, values[0], cur.z));\n } else if (values.length == 1 && member.equalsIgnoreCase(\"Z\")) {\n set(new Vector3f(cur.x, cur.y, values[0]));\n } else {\n throw new IllegalArgumentException(\"Unable to update \" + getSid() + \n \": must update entire transform \" +\n \" or X, Y, or Z\");\n }\n }", "public void apply() {\n\t\tglTranslated(0, 0, -centerDistance);\n\t\tglRotated(pitch, 1, 0, 0);\n\t\tglRotated(yaw, 0, 0, 1);\n\t\tglScaled(scale, scale, scale);\n\n\t\tglTranslated(-pos.get(0), -pos.get(1), -pos.get(2));\n\t}", "public static Transform newTranslation(float tx, float ty, float tz){\n return new Transform(new float[][]{{1.0f, 0.0f, 0.0f, tx},\n {0.0f, 1.0f, 0.0f, ty},\n {0.0f, 0.0f, 1.0f, tz},\n {0.0f, 0.0f, 0.0f, 1.0f}\n });\n }", "private Mat4x4 calculateMatCamera(Vec4df up, Vec4df target, Mat4x4 transform) {\n lookDirection = MatrixMath.matrixMultiplyVector(transform, target);\n target = MatrixMath.vectorAdd(origin, lookDirection);\n return MatrixMath.matrixPointAt(origin, target, up);\n }", "private void onUpdateFrame(FrameTime frameTime) {\n Frame frame = arFragment.getArSceneView().getArFrame();\n\n //In case there's no frame\n if (frame == null) {\n return;\n }\n\n //Used to Create Model at a certain Point on the Floor automatically\n if (frame.getCamera().getTrackingState() == TrackingState.TRACKING && !placed) {\n Pose pos = frame.getCamera().getPose().compose(Pose.makeTranslation(1f, 0f, -2.5f));\n\n //Anchor Node to set the Model in place\n Anchor anchor = arFragment.getArSceneView().getSession().createAnchor(pos);\n AnchorNode anchorNode = new AnchorNode(anchor);\n anchorNode.setParent(arFragment.getArSceneView().getScene());\n\n createModel(anchorNode, activeNode, activeRenderable);\n }\n }", "private void applyTransform() {\n GlStateManager.rotate(180, 1.0F, 0.0F, 0.0F);\n GlStateManager.translate(offsetX, offsetY - 26, offsetZ);\n }", "protected Matrix4 computeTransform() {\n return super.computeTransform();\n }", "protected void applyMatrices () {\n combinedMatrix.set(projectionMatrix).mul(transformMatrix);\n getShader().setUniformMatrix(\"u_projTrans\", combinedMatrix);\n }", "public static Transform newTranslation(Vec3 tr){\n return newTranslation(tr.x, tr.y, tr.z);\n }", "public void setTransform(int jointIndex, int index, float value) {\r\n\t\tswitch(index) {\r\n\t\tcase 0: this.translations[jointIndex].x = value; break;\r\n\t\tcase 1: this.translations[jointIndex].y = value; break;\r\n\t\tcase 2: this.translations[jointIndex].z = value; break;\r\n\t\tcase 3: this.orientations[jointIndex].x = value; break;\r\n\t\tcase 4: this.orientations[jointIndex].y = value; break;\r\n\t\tcase 5:\r\n\t\t\tthis.orientations[jointIndex].z = value;\r\n\t\t\tthis.processOrientation(this.orientations[jointIndex]);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "public void postTranslate(float tx, float ty, float tz) {\n float[] t = {\n 1, 0, 0, tx,\n 0, 1, 0, ty,\n 0, 0, 1, tz,\n 0, 0, 0, 1};\n \n matrix = mulMM(matrix, t);\n }", "@Override\n public void onNewFrame(HeadTransform headTransform) {\n float[] mtx = new float[16];\n GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT | GLES20.GL_DEPTH_BUFFER_BIT);\n surface.updateTexImage();\n surface.getTransformMatrix(mtx);\n }", "private void UpdateTransform()\n\t{\t\n\t\tTransform transform = parent.transform;\n\t\t\n\t\tVector2 friction = Vector2.Scale(-frictionCoefficient,velocity);\n\t\tfloat angularFriction = -frictionCoefficient*angularVelocity;\n\t\t\n\t\t//Newton integration P = P + dP + acceleration * dt^2\n\t\ttransform.position.x += velocity.x + (acceleration.x *deltaTime*deltaTime) + friction.x;\n\t\ttransform.position.y += velocity.y + (acceleration.y *deltaTime*deltaTime) + friction.y;\n\t\ttransform.rotation += angularVelocity + angularAcceleration*deltaTime*deltaTime + angularFriction ;\n\t\t\n\t}", "public void setFrame(float[] p, float[] v, float roll) {\r\n\r\n\t// any movement of origin since we last updated the co-ords\r\n\tif (p[0] == _p[0] && p[1] == _p[1] && p[2] == _p[2]) {\r\n\t // local origin has not moved\r\n\t // so lets look at rotation\r\n\t} else {\r\n\t this.p[0] = p[0];\r\n\t this.p[1] = p[1];\r\n\t this.p[2] = p[2];\r\n\t dirtyT = true;\r\n\t}\r\n\r\n\t// any rotation of axes ?\r\n\tif (roll == _roll && j[0] == v[0] && \r\n\t j[1] == v[1] && j[2] == v[2]) {\r\n\t // no rotation - job done !\r\n\t return;\r\n\t}\r\n\r\n\tj[0] = v[0];\r\n\tj[1] = v[1];\r\n\tj[2] = v[2];\r\n\tthis.roll = roll;\r\n\r\n\tTools3d.cross(v,UP,i_);\r\n\tTools3d.cross(i_, j, k_);\r\n\r\n\t// now apply roll\r\n\tif (roll != 0) {\r\n\t //Tools3d.linearSum(Tools3d.quickSin(roll), i_, Tools3d.quickCos(roll), k_, k);\r\n\t //Tools3d.linearSum(Tools3d.quickCos(roll), i_, - Tools3d.quickSin(roll), k_, i);\r\n\t Tools3d.linearSum((float) Math.sin(roll), i_, (float) Math.cos(roll), k_, k);\r\n\t Tools3d.linearSum((float) Math.cos(roll), i_, (float) - Math.sin(roll), k_, i);\r\n\t} else {\r\n\t k[0] = k_[0]; \r\n\t k[1] = k_[1]; \r\n\t k[2] = k_[2];\r\n\t i[0] = i_[0];\r\n\t i[1] = i_[1];\r\n\t i[2] = i_[2];\r\n\t}\r\n\tdirtyR = true;\r\n }", "abstract public Vector3[][] update();", "private void updateTranslationfromCenterAnchor(Pose pose, int teapotId) {\n float poseX = pose.tx();\n float poseZ = pose.tz();\n\n float anchorPoseX = globalCenterPose.tx();\n float anchorPoseZ = globalCenterPose.tz();\n\n float[] translate = new float[3];\n\n if (poseX > anchorPoseX) {\n translate[0] = poseX - anchorPoseX;\n } else {\n translate[0] = -(anchorPoseX - poseX);\n }\n\n if (poseZ > anchorPoseZ) {\n translate[2] = poseZ - anchorPoseZ;\n } else {\n translate[2] = -(anchorPoseZ - poseZ);\n }\n\n teapotTranslations[teapotId] = translate;\n }", "@Override\n public boolean isTransforming() {\n return super.isTransforming() || desiredWorldPosition != null;\n }", "public void transform(Vector3D V) {\r\n\t\tVector3D rv = new Vector3D();\r\n\t\trv.x = V.x * M11 + V.y * M21 + V.z * M31 + V.w * M41;\r\n\t\trv.y = V.x * M12 + V.y * M22 + V.z * M32 + V.w * M42;\r\n\t\trv.z = V.x * M13 + V.y * M23 + V.z * M33 + V.w * M43;\r\n\t\trv.w = V.x * M14 + V.y * M24 + V.z * M34 + V.w * M44;\r\n\t\tV.set(rv);\r\n\t}", "protected abstract FixedJoint newFixedJointImpl( Body body1, Body body2 );", "public void translate(double x, double y, double z){\n \n \tMatrix trans = new Matrix();\n \ttrans.identity();\n \ttrans.set(1,4,x);\n \ttrans.set(2,4,y);\n \ttrans.set(3,4,x);\n \tthis.leftMultiply(trans);\n\n /* this doesn't work yet\n this.temp.identity();\n temp.set(1,4,x);\n temp.set(2,4,y);\n temp.set(3,4,x);\n this.leftMultiply(temp); */\n }", "public AlignByCamera ()\n\t{\n\t\trequires(Subsystems.transmission);\n\t\trequires(Subsystems.goalVision);\n\n\t\tthis.motorRatio = DEFAULT_ALIGNMENT_SPEED;\n\t}", "public void transform(float a11, float a12, float a21, float a22, float x, float y);", "@NativeType(\"uint32_t\")\n public static int bgfx_encoder_set_transform(@NativeType(\"bgfx_encoder_t *\") long _this, @NativeType(\"void const *\") FloatBuffer _mtx) {\n return nbgfx_encoder_set_transform(_this, memAddress(_mtx), (short)(_mtx.remaining() >> 4));\n }", "public void changePositionOfAdjuster() {\n final float txOffset = currentSittingTranslationX;\n final float tyOffset = currentSittingTranslationY;\n final float tzOffset = currentSittingTranslationZ;\n float rxOffset = currentSittingRotationX;\n float ryOffset = currentSittingRotationY;\n float rzOffset = currentSittingRotationZ;\n \n //get cell transform of the sceneroot of cell\n CellRendererJME ret = (CellRendererJME) editor.getCell().getCellRenderer(Cell.RendererType.RENDERER_JME);\n Entity mye = ret.getEntity();\n RenderComponent rc = (RenderComponent) mye.getComponent(RenderComponent.class);\n Node localNode = rc.getSceneRoot();\n Vector3f v3fa = localNode.getWorldTranslation();\n Quaternion quata = localNode.getWorldRotation();\n float[] angles = new float[3];\n angles = quata.toAngles(angles);\n\n //prepare the translation values\n final float tx = v3fa.x + txOffset;\n final float ty = v3fa.y + tyOffset;\n final float tz = v3fa.z + tzOffset;\n\n //prepare the rotation values\n //add 20 degree to y as an adjuster\n final float rx = (float) Math.toRadians((rxOffset + Math.toDegrees(angles[0])));\n final float ry = (float) Math.toRadians((ryOffset + Math.toDegrees(angles[1]) + 20.0f));\n final float rz = (float) Math.toRadians((rzOffset + Math.toDegrees(angles[2])));\n\n //apply the changes\n final WorldManager wm = ClientContextJME.getWorldManager();\n RenderUpdater u = new RenderUpdater() {\n public void update(Object obj) {\n SitAdjusterEntity.getInstance(editor.getCell()).getRootNode()\n .setLocalTranslation(tx, ty, tz);\n SitAdjusterEntity.getInstance(editor.getCell()).getRootNode()\n .setLocalRotation(new Quaternion(new float[]{rx, ry, rz}));\n WorldManager wm = ClientContextJME.getWorldManager();\n wm.addToUpdateList(SitAdjusterEntity.getInstance(editor.getCell()).getRootNode());\n }\n };\n wm.addRenderUpdater(u, this);\n }", "@Override\n public final void updateOrigin() {\n }", "private void updatePosition() {\n position.add(deltaPosition);\n Vector2[] points = getRotatedPoints();\n\n for (Vector2 point : points) {\n if (point.getX() < bound.getX() || point.getX() > bound.getX() + bound.getWidth()) { //If the point is outside of the bounds because of X\n position.addX(-deltaPosition.getX() * 2); //Undo the move so it is back in bounds\n deltaPosition.setX(-deltaPosition.getX()); //Make the direction it is going bounce to the other direction\n break;\n }\n if (point.getY() < bound.getY() || point.getY() > bound.getY() + bound.getHeight()) { //If the point is outside of the bounds because of Y\n position.addY(-deltaPosition.getY() * 2); //Undo the move so it is back in bounds\n deltaPosition.setY(-deltaPosition.getY()); //Make the direction it is going bounce to the other direction\n break;\n }\n }\n deltaPosition.scale(.98);\n }", "protected void setupRotationOrigin()\n\t{\n\t\tthis.currentRotationAxis = new Point2D.Double(getOriginX(), getOriginY());\n\t\tupdateDefaultMomentMass();\n\t\tthis.currentMomentMass = this.defaultMomentMass;\n\t\t\n\t\t//changeRotationAxisTo(new Point2D.Double(0, 0));\n\t}", "private void updatePosition(FrameTime frameTime) {\n Vector3 desiredWorldPosition = this.desiredWorldPosition;\n if (desiredWorldPosition == null) {\n return;\n }\n\n Vector3 worldPosition = getTransformableNode().getWorldPosition();\n float lerpFactor = MathHelper.clamp(frameTime.getDeltaSeconds() * LERP_SPEED, 0, 1);\n worldPosition = Vector3.lerp(worldPosition, desiredWorldPosition, lerpFactor);\n\n float lengthDiff = Math.abs(Vector3.subtract(desiredWorldPosition, worldPosition).length());\n if (lengthDiff <= POSITION_LENGTH_THRESHOLD) {\n worldPosition = desiredWorldPosition;\n this.desiredWorldPosition = null;\n }\n\n getTransformableNode().setWorldPosition(worldPosition);\n }", "public static NewRotateLeft create(AnimatableModelInstance originObject, float ex, float ey, int duration) {\n\n\t\tVector3 posO = originObject.transState.position.cpy();\t\n\t\t//Vector3 posO = new Vector3();\n\t\t//originObject.transform.getTranslation(posO);\n\t\t\n\t\tQuaternion rotation = originObject.transState.rotation.cpy();\t\n\t\t//Quaternion rotation = new Quaternion();\n\t\t//originObject.transform.getRotation(rotation,true); //existing rotation\n\t\t\n\t\t Vector3 axisVec = new Vector3();\n\t float existingangle = (float) (rotation.getAxisAngle(axisVec) * axisVec.nor().z);\n\t existingangle = existingangle < 0 ? existingangle + 360 : existingangle; //convert <0 values\n\t\t\n\t\tGdx.app.log(logstag,\"_____________________________________existing angle=\"+existingangle); //relative to x axis pointing left anticlockwise\n\t\n\t\t//float scalex = originObject.transform.getScaleX(); //get how much the object has been scaled\n\t\t//float scaley = originObject.transform.getScaleY();\n\t\t\n\t\tVector2 fromPoint = new Vector2(posO.x,posO.y); //we need to scale them down due to how the positions might have been scaled up if the matrix is scaled (I hate how matrixs work :-/ Just cant get it in my head)\n\t\tVector2 tooPoint = new Vector2(ex,ey);\n\n\t\tfromPoint.sub(tooPoint); \n\n\t\t//Log.info(\"length=\"+corner2.len());\n\n\t\tfloat angle = 180+fromPoint.angle(); //absolute angle between the two objects\n\t\tGdx.app.log(logstag,\"________target angle=\"+angle); //should point towards ex/ey \n\t\t\n\t//\tfloat distance = fromPoint.len();\n\n\t\t\n\t\t//difference between this angle and existing one\n\t\tangle = angle - existingangle;\n\t\t\n\t\tNewRotateLeft rot = new NewRotateLeft(angle,500);\n\t\t//NewForward forward = new NewForward(distance,duration-500);\n\t\t\t\t\n\t\treturn rot;\n\t}", "abstract void translate(double x, double y, double z);", "public void update(Vehicle v, float dt) {\nPoint2D.Float p = v.getPosition();\r\nPoint2D.Float tp = target.getPosition();\r\nPoint2D.Float desired_velocity = new Point2D.Float(tp.x - p.x , tp.y - p.y);\r\nVehicle.scale(desired_velocity, v.getMaxSpeed());\r\nv.updateSteering(desired_velocity.x, desired_velocity.y);\r\n}", "public void updateTransform() {\n \t\tif (viewBox != null) {\n \t\t\tOMSVGRect bbox = ((SVGRectElement)viewBox.getElement()).getBBox();\n //\t\t\tGWT.log(\"bbox = \" + bbox.getDescription());\n \t\t\tfloat d = (float)Math.sqrt((bbox.getWidth() * bbox.getWidth() + bbox.getHeight() * bbox.getHeight()) * 0.25) * scale * 2;\n //\t\t\tGWT.log(\"d = \" + d);\n \t\t\n \t\t\t// Compute the actual canvas size. It is the max of the window rect\n \t\t\t// and the transformed bbox.\n \t\t\tfloat width = Math.max(d, windowRect.getWidth());\n \t\t\tfloat height = Math.max(d, windowRect.getHeight());\n //\t\t\tGWT.log(\"width = \" + width);\n //\t\t\tGWT.log(\"height = \" + height);\n \n \t\t\t// Compute the display transform to center the image in the\n \t\t\t// canvas\n \t\t\tOMSVGMatrix m = svg.createSVGMatrix();\n \t\t\tfloat cx = bbox.getCenterX();\n \t\t\tfloat cy = bbox.getCenterY();\n \t\t\tm = m.translate(0.5f * (width - bbox.getWidth()) -bbox.getX(), 0.5f * (height - bbox.getHeight()) -bbox.getY())\n \t\t\t.translate(cx, cy)\n \t\t\t.rotate(angle)\n \t\t\t.scale(scale)\n \t\t\t.translate(-cx, -cy);\n \t\t\t((ISVGTransformable)xformGroup).getTransform().getBaseVal().getItem(0).setMatrix(m);\n \t\t\t((ISVGTransformable)modelGroup.getTwinWrapper()).getTransform().getBaseVal().getItem(0).setMatrix(m);\n //\t\t\tGWT.log(\"m=\" + m.getDescription());\n \t\t\tsvg.getStyle().setWidth(width, Unit.PX);\n \t\t\tsvg.getStyle().setHeight(height, Unit.PX);\n \t\t}\n \t}", "public static Point PointRotate3D(final Point origin, final Point toRotate, final Vector rotationAxis, final float angle) { \n Vector axis = (rotationAxis.magnitude() == 1) ? rotationAxis : rotationAxis.normal();\n float dist = sqrt(sq(axis.y) + sq(axis.z)); \n Matrix T = new Matrix(new double[][]{\n new double[] {1, 0, 0, -origin.x},\n new double[] {0, 1, 0, -origin.y},\n new double[] {0, 0, 1, -origin.z},\n new double[] {0, 0, 0, 1},\n });\n Matrix TInv = T.inverse();\n\n float aZ = (axis.z == 0 && dist == 0) ? 0 : (axis.z / dist);\n float aY = (axis.y == 0 && dist == 0) ? 0 : (axis.y / dist);\n Matrix Rx = new Matrix(new double[][]{\n new double[] {1, 0, 0, 0},\n new double[] {0, aZ, -aY, 0},\n new double[] {0, aY, aZ, 0},\n new double[] {0, 0, 0, 1},\n });\n\n Matrix RxInv = new Matrix(new double[][]{\n new double[] {1, 0, 0, 0},\n new double[] {0, aZ, aY, 0},\n new double[] {0, -aY, aZ, 0},\n new double[] {0, 0, 0, 1},\n });\n\n Matrix Ry = new Matrix(new double[][]{\n new double[] {dist, 0, -axis.x, 0},\n new double[] {0, 1, 0, 0},\n new double[] {axis.x, 0, dist, 0},\n new double[] {0, 0, 0, 1},\n });\n\n Matrix RyInv = Ry.inverse();\n\n Matrix Rz = new Matrix(new double[][]{\n new double[] {cos(angle), -sin(angle), 0, 0},\n new double[] {sin(angle), cos(angle), 0, 0},\n new double[] {0, 0, 1, 0},\n new double[] {0, 0, 0, 1},\n });\n\n Matrix origSpace = new Matrix(new double[][] {\n new double[]{toRotate.x},\n new double[]{toRotate.y},\n new double[]{toRotate.z},\n new double[]{1}\n });\n Matrix rotated = TInv.times(RxInv).times(RyInv).times(Rz).times(Ry).times(Rx).times(T).times(origSpace);\n\n return new Point((float) rotated.get(0, 0), (float) rotated.get(1, 0), (float) rotated.get(2, 0));\n }", "protected void updateMobilityMove(CommandHelper cmdHelp, PlanState planState) {\r\n ParameterList params = cmdHelp.getParameters();\r\n double[] xyt = params.getVec3d(MOBILITY_METHOD_MOVE_PARAM_END_LOCATION.VALUE).userData;\r\n double[] xytTolerance = params.getVec3d(MOBILITY_METHOD_MOVE_PARAM_END_LOCATION_TOLERANCE.VALUE).userData;\r\n //String refFrame = params.getString(MOBILITY_METHOD_MOVE_PARAM_FRAME_NAME.VALUE);\r\n // FIXME we will assume site frame for now\r\n //Matrix3 wpRot = new Matrix3();\r\n Vector3 wpXyz = new Vector3(xyt[0], xyt[1], 0);\r\n double theta = xyt[2];\r\n float tolerance = 0.5f*(float)(xytTolerance[0]+xytTolerance[1]);\r\n boolean isDirectional = Math.abs(xytTolerance[2]) <= Math.PI;\r\n\r\n //-- get z from terrain\r\n ReadOnlyTransform siteToWorld = planState.getSiteToWorldTransform();\r\n siteToWorld.applyForward(wpXyz, t_world);\r\n VerveBaseMap.setZFromMap(t_world, 0);\r\n siteToWorld.applyInverse(t_world, wpXyz);\r\n\r\n setIsDirectional(isDirectional);\r\n setTolerance(tolerance);\r\n setDirection(theta);\r\n\r\n planState.setXyz(wpXyz);\r\n planState.setYaw(theta);\r\n }", "void updateFrom(ClonalGeneAlignmentParameters alignerParameters);", "@Override\n public Matrix4 calculateTransform(long now, float deltaSeconds) {\n transform.idt();\n for (final Action action : pressed.values().toArray()) {\n action.perform(deltaSeconds);\n }\n scrollAction.perform();\n return transform;\n }", "public Vector2f normalizeLocal ()\n {\n return normalize(this);\n }", "public void prepareAlignment(String sq1, String sq2) {\n if(F == null) {\n this.n = sq1.length(); this.m = sq2.length();\n this.seq1 = strip(sq1); this.seq2 = strip(sq2);\n F = new float[3][n+1][m+1];\n B = new TracebackAffine[3][n+1][m+1];\n for(int k = 0; k < 3; k++) {\n for(int i = 0; i < n+1; i ++) {\n for(int j = 0; j < m+1; j++)\n B[k][i][j] = new TracebackAffine(0,0,0);\n }\n }\n }\n\n //alignment already been run and existing matrix is big enough to reuse.\n else if(seq1.length() <= n && seq2.length() <= m) {\n this.n = sq1.length(); this.m = sq2.length();\n this.seq1 = strip(sq1); this.seq2 = strip(sq2);\n }\n\n //alignment already been run but matrices not big enough for new alignment.\n //create all new matrices.\n else {\n this.n = sq1.length(); this.m = sq2.length();\n this.seq1 = strip(sq1); this.seq2 = strip(sq2);\n F = new float[3][n+1][m+1];\n B = new TracebackAffine[3][n+1][m+1];\n for(int k = 0; k < 3; k++) {\n for(int i = 0; i < n+1; i ++) {\n for(int j = 0; j < m+1; j++)\n B[k][i][j] = new TracebackAffine(0,0,0);\n }\n }\n }\n }", "@NativeType(\"uint32_t\")\n public static int bgfx_set_transform(@NativeType(\"void const *\") FloatBuffer _mtx) {\n return nbgfx_set_transform(memAddress(_mtx), (short)(_mtx.remaining() >> 4));\n }", "public void translate( Vector3f t )\n\t{\n\t\tMatrix4f opMat = new Matrix4f();\n\t\topMat.set( t );\n\t\tmat.mul( opMat );\n\t}", "abstract void setOrigin(double x, double y, double z);", "public static void new_position( Body body, double t ){\r\n body.lastState.copyStateVectors( body.currentState );\r\n body.currentState.x = body.currentState.x + body.currentState.vx * t; // new x\r\n body.currentState.y = body.currentState.y + body.currentState.vy * t; // new y\r\n body.currentState.z = body.currentState.z + body.currentState.vz * t; // new z\r\n }", "public static Mesh transformMesh(Matrix3f rotation, Matrix3f rotationForYPR, Vector3f moveOrigin, Mesh mesh) {\n VertexBuffer vb = mesh.getBuffer(Type.Position);\n FloatBuffer vbData = (FloatBuffer) vb.getData();\n int elements = vb.getNumElements();\n Vector3f[] points;// = new Vector3f[elements];\n points = BufferUtils.getVector3Array(vbData);\n\n for (int i = 0; i < elements; i++) {\n points[i] = points[i].add(moveOrigin);\n points[i] = rotationForYPR.mult((points[i]));\n points[i] = points[i].add(new Vector3f(-moveOrigin.x, -moveOrigin.y, -moveOrigin.z));\n points[i] = rotation.mult((points[i]));\n BufferUtils.setInBuffer(points[i], vbData, i);\n\n }\n\n //Update it:\n mesh.updateBound();\n return mesh;\n }", "@NativeType(\"uint32_t\")\n public static int bgfx_encoder_set_transform(@NativeType(\"bgfx_encoder_t *\") long _this, @NativeType(\"void const *\") ByteBuffer _mtx) {\n return nbgfx_encoder_set_transform(_this, memAddress(_mtx), (short)(_mtx.remaining() >> 6));\n }", "public Vector3 normalizeLocal () {\n return normalize(this);\n }", "public void updateAccelerations(double xLimit, double yLimit) {\n // Loop all entities and update their accelerations in parallel\n entities.parallelStream().forEach(cur -> {\n int alignmentNeighbors = 0;\n int cohesionNeighbors = 0;\n int separationNeighbors = 0;\n Vector2D alignment = new Vector2D();\n Vector2D cohesion = new Vector2D();\n Vector2D separation = new Vector2D();\n\n // Use nearby entities to determinate forces\n for (Entity ee : entities) {\n if (ee == cur) continue;\n //if (cur.angleToEntity(ee) > detectionAngleBox.val/2) continue;\n double dist = Math.max(cur.distanceFrom(ee), 0.001);\n\n if (dist < alignmentDistanceBox.val) {\n alignmentNeighbors++;\n alignment.add(ee.getVelocity());\n }\n if (dist < cohesionDistanceBox.val) {\n cohesionNeighbors++;\n cohesion.add(ee.getPosition());\n }\n if (dist < separationDistanceBox.val) {\n separationNeighbors++;\n separation.add(new Vector2D(cur.getPosition()).subtract(ee.getPosition())\n .ensureDirection()\n .divide(dist*dist));\n }\n }\n\n if (alignmentNeighbors != 0)\n alignment\n .divide(alignmentNeighbors)\n .setMagnitude(maxSpeedBox.val)\n .subtract(cur.getVelocity())\n .limit(maxForceBox.val);\n if (cohesionNeighbors != 0)\n cohesion\n .divide(cohesionNeighbors)\n .subtract(cur.getPosition())\n .setMagnitude(maxSpeedBox.val)\n .subtract(cur.getVelocity())\n .limit(maxForceBox.val);\n if (separationNeighbors != 0)\n separation\n .divide(separationNeighbors)\n .setMagnitude(maxSpeedBox.val)\n .subtract(cur.getVelocity())\n .limit(maxForceBox.val);\n\n cur.getAcceleration()\n .add(alignment.multiply(alignmentMultiplierBox.val))\n .add(cohesion.multiply(cohesionMultiplierBox.val))\n .add(separation.multiply(separationMultiplierBox.val))\n .limit(maxSpeedBox.val);\n\n // Border force\n double bfX = cur.getX() < xLimit/2 ? 100/Math.pow(cur.getX(),2) : -100/Math.pow(xLimit - cur.getX(),2);\n double bfY = cur.getY() < yLimit/2 ? 100/Math.pow(cur.getY(),2) : -100/Math.pow(yLimit - cur.getY(),2);\n cur.getAcceleration().add(new Vector2D(bfX, bfY)).limit(maxSpeedBox.val);\n });\n }", "private native void UpdateAcceleration(float infAccelerationX, float infAccelerationY, float infAccelerationZ);", "private void adjustCameraPosition() {\n if (upward) {\n\n if (tilt<90) {\n tilt ++;\n zoom-=0.01f;\n } else {\n upward=false;\n }\n\n } else {\n if (tilt>0) {\n tilt --;\n zoom+=0.01f;\n } else {\n upward=true;\n }\n }\n }", "protected Matrix4 computeTransform() {\n return internalGroup.computeTransform();\n }", "public void updateTrifecta() {\n\n\t\taccelX = (xl.getX() - 0) * 9.8 * Math.cos(angleToForward * (Math.PI / 180.0)); //convert from g's\n\t\taccelY = (xl.getY() - 0) * 9.8 * Math.sin(angleToForward * (Math.PI / 180.0));\n\t\taccelZ = (xl.getZ() - 0) * 9.8;\n\t\t\n\t\t//velocity updated by acceleration integral\n\t\tvelX += accelX * dT;\n\t\tvelY += accelY * dT;\n\t\tvelZ += accelZ * dT;\n\t\t\n\t\t//position updated by velocity integral and adjusted for robot rotation\n\t\tposX += velX * dT;\n\t\tposY += velY * dT;\n\t\tposZ += velZ * dT;\n\t}", "@Override\t\t\t\n\tpublic final myPointf transformPoint(myPointf A, int transformIDX, float t) {\treturn trans[transformIDX].transformPoint(A, t);}", "private void updateBaseMatrix(Drawable d) {\n ImageView imageView = getImageView();\n if (null == imageView || null == d) {\n return;\n }\n\n final float viewWidth = getImageViewWidth(imageView);\n final float viewHeight = getImageViewHeight(imageView);\n final int drawableWidth = d.getIntrinsicWidth();\n final int drawableHeight = d.getIntrinsicHeight();\n\n mBaseMatrix.reset();\n\n final float widthScale = viewWidth / drawableWidth;\n final float heightScale = viewHeight / drawableHeight;\n\n if (mScaleType == ScaleType.CENTER) {\n mBaseMatrix.postTranslate((viewWidth - drawableWidth) / 2F,\n (viewHeight - drawableHeight) / 2F);\n\n } else if (mScaleType == ScaleType.CENTER_CROP) {\n float scale = Math.max(widthScale, heightScale);\n mBaseMatrix.postScale(scale, scale);\n mBaseMatrix.postTranslate((viewWidth - drawableWidth * scale) / 2F,\n (viewHeight - drawableHeight * scale) / 2F);\n\n } else if (mScaleType == ScaleType.CENTER_INSIDE) {\n float scale = Math.min(1.0f, Math.min(widthScale, heightScale));\n mBaseMatrix.postScale(scale, scale);\n mBaseMatrix.postTranslate((viewWidth - drawableWidth * scale) / 2F,\n (viewHeight - drawableHeight * scale) / 2F);\n\n } else {\n RectF mTempSrc = new RectF(0, 0, drawableWidth, drawableHeight);\n RectF mTempDst = new RectF(0, 0, viewWidth, viewHeight);\n\n switch (mScaleType) {\n case FIT_CENTER:\n mBaseMatrix\n .setRectToRect(mTempSrc, mTempDst, ScaleToFit.CENTER);\n break;\n\n case FIT_START:\n mBaseMatrix.setRectToRect(mTempSrc, mTempDst, ScaleToFit.START);\n break;\n\n case FIT_END:\n mBaseMatrix.setRectToRect(mTempSrc, mTempDst, ScaleToFit.END);\n break;\n\n case FIT_XY:\n mBaseMatrix.setRectToRect(mTempSrc, mTempDst, ScaleToFit.FILL);\n break;\n\n default:\n break;\n }\n }\n\n resetMatrix();\n }", "public final native Mat4 translate(double x, double y, double z) /*-{\n return $wnd.mat4.translate(this, [x, y, z]);\n }-*/;", "public interface ITransformablePacket {\n\n default boolean isPacketOnMainThread(INetHandlerPlayServer server, boolean callingFromSponge) {\n if (!MixinLoadManager.isSpongeEnabled() || callingFromSponge) {\n NetHandlerPlayServer serverHandler = (NetHandlerPlayServer) server;\n EntityPlayerMP player = serverHandler.player;\n return player.getServerWorld().isCallingFromMinecraftThread();\n } else {\n return false;\n }\n }\n\n /**\n * Puts the player into local coordinates and makes a record of where they used to be.\n */\n default void doPreProcessing(INetHandlerPlayServer server, boolean callingFromSponge) {\n if (isPacketOnMainThread(server, callingFromSponge)) {\n // System.out.println(\"Pre packet process\");\n NetHandlerPlayServer serverHandler = (NetHandlerPlayServer) server;\n EntityPlayerMP player = serverHandler.player;\n PhysicsWrapperEntity wrapper = getPacketParent(serverHandler);\n if (wrapper != null\n && wrapper.getPhysicsObject().getShipTransformationManager() != null) {\n ISubspaceProvider worldProvider = (ISubspaceProvider) player.getServerWorld();\n ISubspace worldSubspace = worldProvider.getSubspace();\n worldSubspace.snapshotSubspacedEntity((ISubspacedEntity) player);\n wrapper.getPhysicsObject().getShipTransformationManager()\n .getCurrentTickTransform().transform(player,\n TransformType.GLOBAL_TO_SUBSPACE);\n }\n\n }\n }\n\n /**\n * Restores the player from local coordinates to where they used to be.\n */\n default void doPostProcessing(INetHandlerPlayServer server, boolean callingFromSponge) {\n if (isPacketOnMainThread(server, callingFromSponge)) {\n NetHandlerPlayServer serverHandler = (NetHandlerPlayServer) server;\n EntityPlayerMP player = serverHandler.player;\n PhysicsWrapperEntity wrapper = getPacketParent(serverHandler);\n // I don't care what happened to that ship in the time between, we must restore\n // the player to their proper coordinates.\n ISubspaceProvider worldProvider = (ISubspaceProvider) player.getServerWorld();\n ISubspace worldSubspace = worldProvider.getSubspace();\n ISubspacedEntity subspacedEntity = (ISubspacedEntity) player;\n ISubspacedEntityRecord record = worldSubspace\n .getRecordForSubspacedEntity(subspacedEntity);\n // System.out.println(player.getPosition());\n if (subspacedEntity.currentSubspaceType() == CoordinateSpaceType.SUBSPACE_COORDINATES) {\n subspacedEntity.restoreSubspacedEntityStateToRecord(record);\n player.setPosition(player.posX, player.posY, player.posZ);\n }\n // System.out.println(player.getPosition());\n // We need this because Sponge Mixins prevent this from properly working. This\n // won't be necessary on client however.\n }\n }\n\n PhysicsWrapperEntity getPacketParent(NetHandlerPlayServer server);\n}", "static void translateToFace(MatrixStack matrices, PlayerEntityModel<AbstractClientPlayerEntity> model,\n\t\t\tAbstractClientPlayerEntity player, float headYaw, float headPitch) {\n\n\t\tif (player.isInSwimmingPose() || player.isFallFlying()) {\n\t\t\tmatrices.multiply(RotationAxis.POSITIVE_Z.rotationDegrees(model.head.roll));\n\t\t\tmatrices.multiply(RotationAxis.POSITIVE_Y.rotationDegrees(headYaw));\n\t\t\tmatrices.multiply(RotationAxis.POSITIVE_X.rotationDegrees(-45.0F));\n\t\t} else {\n\n\t\t\tif (player.isInSneakingPose() && !model.riding) {\n\t\t\t\tmatrices.translate(0.0F, 0.25F, 0.0F);\n\t\t\t}\n\t\t\tmatrices.multiply(RotationAxis.POSITIVE_Y.rotationDegrees(headYaw));\n\t\t\tmatrices.multiply(RotationAxis.POSITIVE_X.rotationDegrees(headPitch));\n\t\t}\n\t\tmatrices.translate(0.0F, -0.25F, -0.3F);\n\t}", "private void updateBoundary() {\n //pos = _newPos ;\n heading = myRoute.getCurrentHeading() ;\n //System.out.println(\"heading=\"+heading);\n Point vertex = new Point(0,0) ;\n vertex.x = length/2 ;\n vertex.y = width/2 ;\n boundary[0] = transform(vertex) ;\n \n vertex.x = -length/2 ;\n vertex.y = width/2 ;\n boundary[1] = transform(vertex) ;\n \n vertex.x = -length/2 ;\n vertex.y = -width/2 ;\n boundary[2] = transform(vertex) ;\n \n vertex.x = length/2 ;\n vertex.y = -width/2 ;\n boundary[3] = transform(vertex) ;\n for (int i=0; i<4; i++) {\n xpoints[i] = boundary[i].x ;\n ypoints[i] = boundary[i].y ;\n }\n }", "@Override\n\tpublic void update()\n\t{\n\t\tsuper.update();\n\n\t\tcalcAcceleration();\n\t\tsetVelocity(Vector2D.add(getVelocity(), getAcceleration()));\n\n\t\tcalcVelocity();\n\t\tsetPosition(Vector2D.add(getPosition(), getVelocity()));\n\n\t\tbm.update(getPosition(), getWidth(), getHeight());\n\t}", "Transform<A, B> getTransform();", "void updateMotion(boolean altitudeLock)\n {\n \n ascendDescendLift:\n {\n // as pitch and roll increases, lift decreases by fall-off function.\n\t // thrust.y ranges from 0 to 1. at 1, almost perfectly balances gravity\n\t \n //thrust.y = MathHelper.cos(pitchRad) * MathHelper.cos(rollRad);\n thrust.y = MathHelper.cos(pitchRad) * MathHelper.cos(rollRad) * MathHelper.cos(rollRad);\n }\n\n forwardBack:\n {\n // as pitch increases, forward-back motion increases\n // but sin function was too touchy so using 1-cos\n float accel = 1f - MathHelper.cos(pitchRad);\n if (pitchRad > 0f) accel *= -1f;\n \n thrust.x = -fwd.x * accel;\n thrust.z = -fwd.z * accel;\n \n // also adjust y in addition to ascend/descend to simulate diving\n thrust.y += -fwd.y * accel * .3f;\n }\n\n strafeLeftRight:\n {\n // float strafe = -MathHelper.sin(roll);\n float strafe = 1f - MathHelper.cos(rollRad);\n if (rollRad > 0f) strafe *= -1f;\n\n // use perp of yaw and scale by roll\n thrust.x -= fwd.z * strafe;\n thrust.z += fwd.x * strafe;\n }\n\n // start with current velocity\n velocity.set((float)motionX, (float)motionY, (float)motionZ);\n\n // friction, very little!\n velocity.scale(FRICTION);\n\n // scale thrust by current throttle and delta time\n //thrust.normalize().scale(MAX_ACCEL * (1f + throttle) * deltaTime / .05f);\n thrust.normalize().scale(MAX_ACCEL * (1f + throttle) * deltaTime / .05f);\n\n // apply the thrust\n Vector3.add(velocity, thrust, velocity);\n\n // gravity is always straight down\n //if (!inWater && !onGround) velocity.y -= GRAVITY * deltaTime / .05f;\n velocity.y -= GRAVITY * deltaTime / .05f;\n\n // limit max velocity\n if (velocity.lengthSquared() > MAX_VELOCITY * MAX_VELOCITY)\n {\n velocity.scale(MAX_VELOCITY / velocity.length());\n }\n\n // apply velocity changes\n motionX = (double) velocity.x;\n motionY = (double) velocity.y;\n motionZ = (double) velocity.z;\n \n if (altitudeLock && riddenByEntity != null)\n {\n motionY *= .9;\n if (motionY < .00001) motionY = .0;\n }\n \n moveEntity(motionX, motionY, motionZ);\n }", "private void setupTransformationMatrix(ShapeRenderer renderer){\n\t\trenderer.identity();\n\t\trenderer.translate(cx, cy, 0);\n\t\trenderer.rotate(0, 0, 1, angle); \n\t\trenderer.translate(-cx, -cy, 0);\n\t}", "public abstract Vector4fc normalize3();", "private void translateStructure(Point3d originalCoord, Point3d newCoord, IAtomContainer ac) {\n\t\tPoint3d transVector = new Point3d(originalCoord);\n\t\ttransVector.sub(newCoord);\n\t\tfor (int i = 0; i < ac.getAtomCount(); i++) {\n\t\t\tif (!(ac.getAtom(i).getFlag(CDKConstants.ISPLACED))) {\n\t\t\t\tac.getAtom(i).getPoint3d().sub(transVector);\n\t\t\t\t//ac.getAtomAt(i).setFlag(CDKConstants.ISPLACED, true);\n\t\t\t}\n\t\t}\n\t}", "public static MovingReferenceFrame newFrameBeforeJoint(JointReadOnly joint, RigidBodyTransformReadOnly transformToParent)\n {\n String beforeJointName = \"before\" + MecanoTools.capitalize(joint.getName());\n\n return newJointFrame(joint, transformToParent, beforeJointName);\n }", "protected abstract void calcOrigin();", "public static MovingReferenceFrame newJointFrame(JointReadOnly joint, RigidBodyTransformReadOnly transformToParent, String beforeJointName)\n {\n MovingReferenceFrame parentFrame;\n RigidBodyReadOnly parentBody = joint.getPredecessor();\n if (parentBody.isRootBody())\n {\n parentFrame = parentBody.getBodyFixedFrame();\n\n /*\n * TODO Special case to keep the beforeJointFrame of the SixDoFJoint to be the elevatorFrame. This\n * should probably removed, might cause reference frame exceptions though.\n */\n if (transformToParent == null)\n return parentFrame;\n }\n else\n parentFrame = parentBody.getParentJoint().getFrameAfterJoint();\n\n return MovingReferenceFrame.constructFrameFixedInParent(beforeJointName, parentFrame, transformToParent);\n }", "public void onUpdate()\n {\n super.onUpdate();\n this.jumpMovementFactor = 0.0F;\n this.renderYawOffset = this.rotationPitch = this.rotationYaw = 0.0F;\n\n if (this.target != null && this.target instanceof EntityLiving)\n {\n EntityLiving var1 = (EntityLiving) this.target;\n\n if (var1.getHealth() <= 0 || !this.canEntityBeSeen(var1))\n {\n this.target = null;\n this.stop();\n this.moveTimer = 0;\n return;\n }\n } else\n {\n if (this.target != null && this.target.isDead)\n {\n this.target = null;\n this.stop();\n this.moveTimer = 0;\n return;\n }\n\n if (this.target == null)\n {\n this.target = this.worldObj.getClosestPlayerToEntity(this, -1.0D);\n\n if (this.target == null)\n {\n this.target = null;\n this.stop();\n this.moveTimer = 0;\n\n if (!this.worldObj.isRemote)\n {\n this.setDead();\n }\n\n return;\n }\n }\n }\n\n if (this.posX == (double) this.getOrgX() && this.posY == (double) this.getOrgY() && this.posZ == (double) this.getOrgZ())\n {\n if (!this.isReformed())\n {\n this.setReformed(true);\n }\n\n this.stop();\n this.moveTimer = 0;\n }\n\n if (this.slider == null)\n {\n Vec3 var16 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);\n Vec3 var2 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);\n MovingObjectPosition var18 = this.worldObj.rayTraceBlocks(var16, var2);\n var16 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);\n var2 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);\n\n if (var18 != null)\n {\n var2 = Vec3.createVectorHelper(var18.hitVec.xCoord, var18.hitVec.yCoord, var18.hitVec.zCoord);\n }\n\n if (!this.worldObj.isRemote)\n {\n Object var4 = null;\n List var15 = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(4.0D, 4.0D, 4.0D));\n double var6 = 0.0D;\n\n for (int var8 = 0; var8 < var15.size(); ++var8)\n {\n Entity var9 = (Entity) var15.get(var8);\n\n if (var9.canBeCollidedWith() && var9 != this)\n {\n float var10 = 0.3F;\n\n if (var9 instanceof EntitySlider)\n {\n this.slider = (EntitySlider) var9;\n var18 = null;\n }\n\n AxisAlignedBB var11 = var9.boundingBox.expand((double) var10, (double) var10, (double) var10);\n MovingObjectPosition var12 = var11.calculateIntercept(var16, var2);\n\n if (var12 != null)\n {\n double var13 = var16.distanceTo(var12.hitVec);\n\n if (var13 < var6 || var6 == 0.0D)\n {\n var6 = var13;\n }\n }\n }\n }\n }\n\n if (this.slider == null || this.slider.isDead)\n {\n this.target = null;\n this.stop();\n this.moveTimer = 0;\n\n if (!this.worldObj.isRemote)\n {\n this.setDead();\n }\n }\n } else if (this.slider.target != this.target)\n {\n this.target = null;\n this.stop();\n this.moveTimer = 0;\n\n if (!this.worldObj.isRemote)\n {\n this.setDead();\n }\n } else\n {\n this.fallDistance = 0.0F;\n double var17;\n double var5;\n double var3;\n\n if (this.gotMovement)\n {\n if (this.isCollided)\n {\n var17 = this.posX - 0.5D;\n var3 = this.boundingBox.minY + 0.75D;\n var5 = this.posZ - 0.5D;\n\n if (this.crushed)\n {\n this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, \"random.explode\", 3.0F, (0.625F + (this.worldObj.rand.nextFloat() - this.worldObj.rand.nextFloat()) * 0.2F) * 0.7F);\n this.worldObj.playSoundAtEntity(this, \"aeboss.slider.collide\", 2.5F, 1.0F / (this.rand.nextFloat() * 0.2F + 0.9F));\n }\n\n this.stop();\n } else\n {\n if (this.speedy < 2.0F)\n {\n this.speedy += 0.035F;\n }\n\n this.motionX = 0.0D;\n this.motionY = 0.0D;\n this.motionZ = 0.0D;\n\n if (this.direction == 0)\n {\n this.motionY = (double) this.speedy;\n\n if (this.boundingBox.minY > (this.reform ? (double) this.getOrgY() : this.target.boundingBox.minY + 0.35D))\n {\n this.stop();\n this.moveTimer = 8;\n }\n } else if (this.direction == 1)\n {\n this.motionY = (double) (-this.speedy);\n\n if (this.boundingBox.minY < (this.reform ? (double) this.getOrgY() : this.target.boundingBox.minY - 0.25D))\n {\n this.stop();\n this.moveTimer = 8;\n }\n } else if (this.direction == 2)\n {\n this.motionX = (double) this.speedy;\n\n if (this.posX > (this.reform ? (double) this.getOrgX() - 1.0D : this.target.posX + 0.125D))\n {\n this.stop();\n this.moveTimer = 8;\n }\n } else if (this.direction == 3)\n {\n this.motionX = (double) (-this.speedy);\n\n if (this.posX < (this.reform ? (double) this.getOrgX() - 1.0D : this.target.posX - 0.125D))\n {\n this.stop();\n this.moveTimer = 8;\n }\n } else if (this.direction == 4)\n {\n this.motionZ = (double) this.speedy;\n\n if (this.posZ > (this.reform ? (double) this.getOrgZ() - 1.0D : this.target.posZ + 0.125D))\n {\n this.stop();\n this.moveTimer = 8;\n }\n } else if (this.direction == 5)\n {\n this.motionZ = (double) (-this.speedy);\n\n if (this.posZ < (this.reform ? (double) this.getOrgZ() - 1.0D : this.target.posZ - 0.125D))\n {\n this.stop();\n this.moveTimer = 8;\n }\n }\n }\n } else\n {\n this.motionY = 0.0D;\n\n if (this.moveTimer > 0)\n {\n --this.moveTimer;\n this.motionX = 0.0D;\n this.motionY = 0.0D;\n this.motionZ = 0.0D;\n } else\n {\n var17 = Math.abs(this.posX - (this.reform ? (double) this.getOrgX() : this.target.posX));\n var3 = Math.abs(this.boundingBox.minY - (this.reform ? (double) this.getOrgY() : this.target.boundingBox.minY));\n var5 = Math.abs(this.posZ - (this.reform ? (double) this.getOrgZ() : this.target.posZ));\n\n if (var17 > var5)\n {\n this.direction = 2;\n\n if (this.posX > (this.reform ? (double) this.getOrgX() - 1.0D : this.target.posX))\n {\n this.direction = 3;\n }\n } else\n {\n this.direction = 4;\n\n if (this.posZ > (this.reform ? (double) this.getOrgZ() - 1.0D : this.target.posZ))\n {\n this.direction = 5;\n }\n }\n\n if (var3 > var17 && var3 > var5 || var3 > 0.25D && this.rand.nextInt(5) == 0)\n {\n this.direction = 0;\n\n if (this.posY > (this.reform ? (double) this.getOrgY() : this.target.posY))\n {\n this.direction = 1;\n }\n }\n\n this.gotMovement = true;\n }\n }\n\n if (this.harvey > 0.01F)\n {\n this.harvey *= 0.8F;\n }\n }\n }", "public void postRotateQuat(float x, float y, float z, float w) {\n \n float len = (float) Math.sqrt(x*x+y*y+z*z+w*w);\n if(len != 1){\n x /= len;\n y /= len;\n z /= len;\n w /= len;\n }\n \n float[] r = { \n 1 - (2*y*y + 2*z*z), 2*x*y - 2*z*w, 2*x*z+2*y*w, 0,\n 2*x*y + 2*z*w, 1 - (2*x*x + 2*z*z), 2*y*z-2*x*w, 0,\n 2*x*z - 2*y*w, 2*y*z + 2*x*w, 1 - (2*x*x+2*y*y), 0,\n 0, 0, 0, 1.0f};\n matrix = mulMM(matrix, r);\n }", "public void translate( float x, float y, float z )\n\t{\n\t\tMatrix4f opMat = new Matrix4f();\n\t\topMat.set( new Vector3f( x, y, z ) );\n\t\tmat.mul( opMat );\n\t}", "@Override\n\tpublic Pnt2d applyTo(Pnt2d uv) {\n\t\tdouble[] xy = Ai.operate(MathUtil.toHomogeneous(uv.toDoubleArray()));\n\t\t// apply the camera's radial lens distortion in the normalized plane:\n\t\tdouble[] xyd = cam.warp(xy);\n\t\t// apply the (forward) camera mapping to get the undistorted sensor point (u',v'):\n\t\treturn PntDouble.from(cam.mapToSensorPlane(xyd));\n\t}", "public static Entity translate(Frame frame)\r\n/* 54: */ {\r\n/* 55:65 */ return (Entity)frame.getThing().clone();\r\n/* 56: */ }", "protected void build_transforms()\n {\n goniometer_rotation = tof_calc.makeEulerRotation( phi, chi, -omega );\n\n goniometer_rotation_inverse = \n tof_calc.makeEulerRotationInverse( phi, chi, -omega );\n }", "public Joint (SkeletonJoint skeletonJoint) {\n\t\tthis.skeletonJoint = skeletonJoint;\n\t\tposition2d = new Vector2f();\n\t\tposition3d = new Vector3f();\n\t\tconfidence = 0;\n\t}", "public Matrix getTransform()\n {\n return transform;\n }", "@Override\r\n public void update(long fps,\r\n Transform t,\r\n Transform playerTransform) {\n }", "public void refreshPosition() {\n\n this.setTransform(getTransform());\n }", "public OpenGLMatrix createMatrix(float x, float y, float z, float u, float v, float w) {\n return OpenGLMatrix.translation(x, y, z).\n multiplied(Orientation.getRotationMatrix(\n AxesReference.EXTRINSIC, AxesOrder.XYZ, AngleUnit.DEGREES, u, v, w));\n }", "void setupPointScaleFree() {\n\t\tbeginOffsetP.set(P);\n\n\t\tleftOppositeLine = neighborOppositeLinesFromPoint(selectedPoint)[0];\n\t\trightOppositeLine = neighborOppositeLinesFromPoint(selectedPoint)[1];\n\t\tleftOppositeLine.resetLockPoints(P);\n\t\trightOppositeLine.resetLockPoints(P);\n\t\tbeginP.set(P);\n\t\tbeginOffsetP.set(P);\n\n\t\tbeginOffset.set(P); // lock the beginning position of the\n\t\t\t\t\t\t\t// offset vector\n\t\tbeginOffsetP.set(point[selectedPoint].position); // lock the beginning\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// of the vector to\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// be transformed\n\n\t\tleftOppositeLine.isOnThisSideOfLine = leftOppositeLine.checkLineSide(P); // check\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// on\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// which\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// side\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// of\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// mirror\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// we\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// are\n\t\trightOppositeLine.isOnThisSideOfLine = rightOppositeLine.checkLineSide(P);\n\t}", "public abstract Vector4fc set(float x, float y, float z, float w);", "public void translateBy(float x, float y, float z) {\n\t\tposition.add(x, y, z);\n\t\tmodified = true;\n\t}", "public abstract Transformation updateTransform(Rectangle selectionBox);", "@AnyThread\n private void updatePitchMatrix() {\n // The camera's pitch needs to be rotated along an axis that is parallel to the real world's\n // horizon. This is the <1, 0, 0> axis after compensating for the device's roll.\n Matrix.setRotateM(touchPitchMatrix, 0,\n -touchPitch, (float) Math.cos(deviceRoll), (float) Math.sin(deviceRoll), 0);\n }", "private void translate(final double w, final double h, final double z) {\n mesh.setTranslation(0, w / 2, h / 2 + z);\n }", "@NativeType(\"uint32_t\")\n public static int bgfx_set_transform(@NativeType(\"void const *\") ByteBuffer _mtx) {\n return nbgfx_set_transform(memAddress(_mtx), (short)(_mtx.remaining() >> 6));\n }", "public void update(float deltaTime) {\n\t\tif (m_motionMode == NvCameraMotionType.DUAL_ORBITAL) {\n\t Transform xfm = m_xforms[NvCameraXformType.MAIN];\n\t Transform xfs = m_xforms[NvCameraXformType.SECONDARY];\n//\t xfm.m_rotate += xfm.m_rotateVel*deltaTime;\n\t VectorUtil.linear(xfm.m_rotate, xfm.m_rotateVel, deltaTime, xfm.m_rotate);\n//\t xfs.m_rotate += xfs.m_rotateVel*deltaTime;\n\t VectorUtil.linear(xfs.m_rotate, xfs.m_rotateVel, deltaTime, xfs.m_rotate);\n//\t xfm.m_translate += xfm.m_translateVel * deltaTime;\n\t VectorUtil.linear(xfm.m_translate, xfm.m_translateVel, deltaTime, xfm.m_translate);\n\n\t updateMats(NvCameraXformType.MAIN);\n\t updateMats(NvCameraXformType.SECONDARY);\n\t } else {\n\t Transform xf = m_xforms[NvCameraXformType.MAIN];\n//\t xf.m_rotate += xf.m_rotateVel*deltaTime;\n\t VectorUtil.linear(xf.m_rotate, xf.m_rotateVel, deltaTime, xf.m_rotate);\n\t Vector3f transVel;\n\t if (m_motionMode == NvCameraMotionType.FIRST_PERSON) {\n\t // obviously, this should clamp to [-1,1] for the mul, but we don't care for sample use.\n\t xf.m_translateVel.x = xf.m_maxTranslationVel * (m_xVel_kb+m_xVel_gp);\n\t xf.m_translateVel.z = xf.m_maxTranslationVel * (m_zVel_mouse+m_zVel_kb+m_zVel_gp);\n//\t transVel = nv.vec3f(nv.transpose(xf.m_rotateMat) * \n//\t nv.vec4f(-xf.m_translateVel.x, xf.m_translateVel.y, xf.m_translateVel.z, 0.0f));\n\t xf.m_rotateMat.transpose();\n\t transVel = new Vector3f(-xf.m_translateVel.x, xf.m_translateVel.y, xf.m_translateVel.z);\n\t VectorUtil.transformNormal(transVel, xf.m_rotateMat, transVel);\n\t xf.m_rotateMat.transpose();\n\t } else {\n\t transVel = xf.m_translateVel;\n\t }\n\n//\t xf.m_translate += transVel * deltaTime;\n\t VectorUtil.linear(xf.m_translate, transVel, deltaTime, xf.m_translate);\n\t updateMats(NvCameraXformType.MAIN);\n\t }\n\t}" ]
[ "0.6687651", "0.5715076", "0.5637236", "0.55665565", "0.5383874", "0.5311712", "0.5308835", "0.53020006", "0.5294784", "0.52886397", "0.5264399", "0.5140677", "0.5140649", "0.5139238", "0.5128281", "0.51120764", "0.5098027", "0.50492954", "0.49725533", "0.4926261", "0.4925061", "0.48918504", "0.48734486", "0.48683172", "0.48617214", "0.48540112", "0.48497716", "0.48319194", "0.48168126", "0.48060635", "0.480026", "0.47648215", "0.47609803", "0.47552526", "0.4729259", "0.47246647", "0.47213927", "0.47148567", "0.46889168", "0.46842685", "0.4668881", "0.4634797", "0.46346956", "0.46334794", "0.4630344", "0.46075308", "0.46024832", "0.46010283", "0.4599574", "0.4584063", "0.4579095", "0.45532537", "0.45479256", "0.4533645", "0.45333064", "0.45226717", "0.45219073", "0.45195666", "0.45161948", "0.4514801", "0.44884506", "0.44820613", "0.4469779", "0.44687095", "0.44622958", "0.44593558", "0.445582", "0.445559", "0.44512883", "0.44456023", "0.4428781", "0.4428599", "0.44246635", "0.44219944", "0.44159877", "0.44012272", "0.43901396", "0.4387888", "0.43846354", "0.4381349", "0.43784952", "0.43782607", "0.43621942", "0.4361266", "0.43571743", "0.43527427", "0.43490204", "0.43459916", "0.434348", "0.43433854", "0.43425795", "0.4337827", "0.43342456", "0.43327606", "0.4328671", "0.43204483", "0.43203577", "0.4310863", "0.43085226", "0.4306603" ]
0.5749906
1
Implementations of this interface can provide a custom updater that benefits from the joint property and allows to optimize the joint transform calculation.
public static interface RevoluteJointTransformUpdater { /** * Updates the joint transform given its current configuration. * * @param jointTransformToUpdate the transform to update. Modified. */ void updateJointTransform(RigidBodyTransform jointTransformToUpdate); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void updateJointTransform(RigidBodyTransform jointTransformToUpdate);", "public PulleyJoint getJoint()\r\n\t{\r\n\t\treturn (PulleyJoint)joint;\r\n\t}", "protected abstract void addJointImpl( Joint joint );", "public static RevoluteJointTransformUpdater newRevoluteJointTransformUpdater(RevoluteJointReadOnly joint)\n {\n FrameVector3DReadOnly jointAxis = joint.getJointAxis();\n\n RevoluteJointTransformUpdater jointTransformUpdater;\n\n if (jointAxis.geometricallyEquals(Axis.X, TRANSFORM_UPDATER_EPSILON))\n {\n jointTransformUpdater = transform -> transform.setRotationRollAndZeroTranslation(joint.getQ());\n }\n else if (jointAxis.geometricallyEquals(Axis.Y, TRANSFORM_UPDATER_EPSILON))\n {\n jointTransformUpdater = transform -> transform.setRotationPitchAndZeroTranslation(joint.getQ());\n }\n else if (jointAxis.geometricallyEquals(Axis.Z, TRANSFORM_UPDATER_EPSILON))\n {\n jointTransformUpdater = transform -> transform.setRotationYawAndZeroTranslation(joint.getQ());\n }\n else\n {\n AxisAngle axisAngle = new AxisAngle();\n jointTransformUpdater = transform ->\n {\n axisAngle.set(joint.getJointAxis(), joint.getQ());\n transform.setRotationAndZeroTranslation(axisAngle);\n };\n }\n\n return jointTransformUpdater;\n }", "public void setTransform(int jointIndex, int index, float value) {\r\n\t\tswitch(index) {\r\n\t\tcase 0: this.translations[jointIndex].x = value; break;\r\n\t\tcase 1: this.translations[jointIndex].y = value; break;\r\n\t\tcase 2: this.translations[jointIndex].z = value; break;\r\n\t\tcase 3: this.orientations[jointIndex].x = value; break;\r\n\t\tcase 4: this.orientations[jointIndex].y = value; break;\r\n\t\tcase 5:\r\n\t\t\tthis.orientations[jointIndex].z = value;\r\n\t\t\tthis.processOrientation(this.orientations[jointIndex]);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "interface Joint\n{\n /** Return a panel containing any knobs this\n * joint wishes to expose.\n */\n public JPanel getParameterPanel(int n);\n\n /** Render the joint in question */\n public VisObject getVis();\n\n /** Get rotation component */\n public double[][] getRotation();\n\n /** Get translation component */\n public double[][] getTranslation();\n\n /** Set the movement value to val */\n public void set(double val);\n\n /** Get an arm command back */\n public dynamixel_command_t getArmCommand();\n}", "public void update() {\n\t\tmrRoboto.move();\n\t\tobsMatrix.updateSensor(mrRoboto.x, mrRoboto.y);\n\t\thmm.updateProb(obsMatrix.getSensorReading());\n\t}", "@Override\r\n\tpublic void update(Person p) \r\n\t{\n\t\t\r\n\t}", "protected abstract void removeJointImpl( Joint joint );", "@Override\r\n\tpublic void update(Person person) {\n\r\n\t}", "protected abstract void updateImpl(M newValue);", "@Override\n\tpublic void update() {\n\t\tobj.update();\n\t}", "protected void updatePosition() {\n\t\tif(motion == null) {\n\t\t\tmotion = new Motion3D(player, true);\n\t\t} else motion.update(player, true);\n\t\t\n\t\tmotion.applyToEntity(this);\n\t\tthis.rotationPitch = player.rotationPitch;\n\t\tthis.rotationYaw = player.rotationYaw;\n\t}", "public void setJointIndex(int index) {\r\n\t\tthis.jointIndex = index;\r\n\t}", "public Joint (SkeletonJoint skeletonJoint) {\n\t\tthis.skeletonJoint = skeletonJoint;\n\t\tposition2d = new Vector2f();\n\t\tposition3d = new Vector3f();\n\t\tconfidence = 0;\n\t}", "public int getJointIndex() {\r\n\t\treturn this.jointIndex;\r\n\t}", "public SWIGTYPE_p_SimTK__MobilizedBody updMobilizedBody() {\n return new SWIGTYPE_p_SimTK__MobilizedBody(opensimSimulationJNI.PhysicalFrame_updMobilizedBody(swigCPtr, this), false);\n }", "@Override\n\t\tpublic void update() {\n\n\t\t}", "@Override\n\t\tpublic void update() {\n\n\t\t}", "@Override\n\t\tpublic void update() {\n\n\t\t}", "public interface Updatable {\n\n\tpublic void update(Simulation simulation);\n\tpublic void update(double x, double y);\n\n}", "public final void ruleJointMovement() 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:885:2: ( ( ( rule__JointMovement__Alternatives ) ) )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:886:1: ( ( rule__JointMovement__Alternatives ) )\n {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:886:1: ( ( rule__JointMovement__Alternatives ) )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:887:1: ( rule__JointMovement__Alternatives )\n {\n before(grammarAccess.getJointMovementAccess().getAlternatives()); \n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:888:1: ( rule__JointMovement__Alternatives )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:888:2: rule__JointMovement__Alternatives\n {\n pushFollow(FOLLOW_rule__JointMovement__Alternatives_in_ruleJointMovement1834);\n rule__JointMovement__Alternatives();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getJointMovementAccess().getAlternatives()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public T caseJoint(Joint object) {\r\n\t\treturn null;\r\n\t}", "@Override\n\tpublic void update() {}", "@Override\n\tpublic void update() {}", "interface WithConstraints {\n /**\n * Specifies constraints.\n * @param constraints Constraints associated with the Job\n * @return the next update stage\n */\n Update withConstraints(JobBasePropertiesConstraints constraints);\n }", "private void updateJoinPos()\n {\n this.xLastJoinPos = (int) this.getX();\n this.yLastJoinPos = (int) this.getY();\n this.zLastJoinPos = (int) this.getZ();\n }", "protected abstract SliderJoint newSliderJointImpl( Body body1, Body body2 );", "protected abstract void update();", "protected abstract void update();", "@Override\r\n\tpublic void update(Object object) {\n\t\t\r\n\t}", "abstract public Vector3[][] update();", "@Override\n public final void updateOrigin() {\n }", "@Override\r\n\t\tpublic void update() {\n\t\t\t\r\n\t\t}", "@Override\r\n\t\tpublic void update() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void update() { }", "public void basicMotion() {\r\n\t\tPVector v = behavior.behavior(obj.getMotion());\r\n\t\tobj.getMotion().setVelocity(v);\r\n\t\t\r\n\t\tobj.getMotion().kinematicUpdate();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tfloat x = obj.getMotion().getPosition().x;\r\n\t\tfloat y = obj.getMotion().getPosition().y;\r\n\t\tif(y <= turnCornerMin ) {\r\n\t\t\tbehavior.setDest(turnCornerMax,turnCornerMin);\r\n\t\t\t\t\r\n\t\t}\r\n\t\tif(x >= turnCornerMax) {\r\n\t\t\tbehavior.setDest(turnCornerMax, turnCornerMax);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif(y >= turnCornerMax) {\r\n\t\t\tbehavior.setDest(turnCornerMin, turnCornerMax);\r\n\t\t}\r\n\t\t\r\n\t\tif(x < turnCornerMin) {\r\n\t\t\treturn;\r\n\t\t\t\r\n\t\t}\r\n\t\t\t\r\n\t\tobj.updateObjKinematics(x, y, obj.getMotion().getOrientation());\r\n\t}", "@Override\r\n protected void updateObject(SimpleBody object, Entity e) {\n }", "@Override\r\n protected void updateObject(SimpleBody object, Entity e) {\n }", "@Override\n public void update(Observable arg0, Object arg1) {\n \n }", "public abstract void update(Object obj) ;", "public interface ClonalUpdatableParameters {\n /**\n * Set absent parameters from ClonalGeneAlignmentParameters object\n *\n * @param alignerParameters\n */\n void updateFrom(ClonalGeneAlignmentParameters alignerParameters);\n\n /**\n * Returns true if all parameters are defined\n */\n boolean isComplete();\n}", "@Override\n public void update(Observable o, Object arg)\n {\n \n }", "@Override\n\tpublic void update(Object o) {\n\n\t}", "@Override\n\tpublic void update(Object o) {\n\n\t}", "@Override\n\tpublic void update(Observable arg0, Object arg1) {\n\t\t\n\t}", "@Override\n\tpublic void update(Observable o, Object arg) {\n\t\t\n\t}", "@Override\r\n\t\tpublic void update(Observable arg0, Object arg1) {\n\t\t}", "public interface UpdatablePhysicsComponent extends Component, Updatable {\n}", "@Override\r\n\tpublic void update(Observable arg0, Object arg1) {\n\t\t\r\n\t}", "@Override\n\tpublic void update() {\n\n\t}", "@Override\n\tpublic void update() {\n\n\t}", "@Override\n\tpublic void update() {\n\n\t}", "@Override\n\tpublic void update() {\n\n\t}", "@Override\n\tpublic void update() {\n\n\t}", "@Override\n\tpublic void update() {\n\n\t}", "protected Matrix4 computeTransform() {\n return super.computeTransform();\n }", "abstract public void update();", "public static interface Updater {\n\t/**\n\t * Updates image data that is accessed by reference.\n\t * This method is called by the updateData method of an\n\t * ImageComponent object to effect\n\t * safe updates to image data that\n\t * is referenced by that object. Applications that wish to modify\n\t * such data must implement this method and perform all updates\n\t * within it.\n\t * <br>\n\t * NOTE: Applications should <i>not</i> call this method directly.\n\t *\n\t * @param imageComponent the ImageComponent object being updated.\n\t * @param index index of the image to be modified.\n\t * @param x starting X offset of the subregion.\n\t * @param y starting Y offset of the subregion.\n\t * @param width width of the subregion.\n\t * @param height height of the subregion.\n\t *\n\t * @see ImageComponent3D#updateData\n\t */\n\tpublic void updateData(ImageComponent3D imageComponent,\n\t\t\t int index,\n\t\t\t int x, int y,\n\t\t\t int width, int height);\n }", "void updateFrom(ClonalGeneAlignmentParameters alignerParameters);", "@Override\r\n\tpublic void update(Observable o, Object arg) {\n\t\t\r\n\t}", "public void apply() {\n double currentHeading = self.getHeading();\n IGameIterator iter = target.getCollection().getIterator();\n Pylon nextPylon = null;\n while (iter.hasNext()) {\n iter.getNext();\n if (iter.get() instanceof Pylon) {\n if (((Pylon) iter.get()).getNum() == self.getLatestPylon() + 1) { //if it is the next pylon\n nextPylon = (Pylon) iter.get();\n }\n }\n }\n if (nextPylon == null) { //if there are no more pylons\n self.changeSpeed(0 - ((int) self.getMaxSpeed())); //stop at the finish line\n return;\n }\n\n double deltaX = nextPylon.getPosition().getX() - self.getPosition().getX();\n double deltaY = nextPylon.getPosition().getY() - self.getPosition().getY();\n newHeading = Math.toDegrees(Math.atan2(deltaY, deltaX));\n double rightTurn;\n double leftTurn;\n\n rightTurn = (newHeading - currentHeading);\n if (rightTurn < 0)\n rightTurn += 360;\n leftTurn = 360 - rightTurn;\n\n if (leftTurn <= rightTurn) {\n //turn left\n self.steer(-15);\n } else {\n // turn right\n self.steer(15);\n }\n //self.steer((int) (newHeading - currentHeading));\n currentHeading = self.getHeading();\n\n //move at max speed towards it\n self.changeSpeed((int) self.getMaxSpeed());\n }", "@Override\n\tpublic void update() {\n\t}", "@Override\n\tpublic void update() {\n\t}", "@Override\n\tpublic void update() {\n\t}", "public void update(){}", "public void update(){}", "@Override\n public void update (Observable o, Object arg) {\n }", "protected abstract FixedJoint newFixedJointImpl( Body body1, Body body2 );", "@Override\n public void update() {\n \n }", "@Override\r\n\tpublic void update() {\r\n\t}", "public T caseJointRef(JointRef object) {\r\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic void update(Observable o, Object arg) {\n\r\n\t}", "@Override\r\n\tpublic void update(Observable o, Object arg) {\n\r\n\t}", "public List<PhysicsJoint> getJoints() {\n return joints;\n }", "@Override\r\n\tpublic void update() {\r\n\r\n\t}", "@Override\r\n\tpublic void update(FollowUp followup) {\n\t\t\r\n\t}", "@Override\n public void update(Observable o, Object arg) {\n }", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\r\n\tpublic void update() {\n\t}", "@Override\r\n\tpublic void update() {\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "public void update(Vehicle v, float dt) {\nPoint2D.Float p = v.getPosition();\r\nPoint2D.Float tp = target.getPosition();\r\nPoint2D.Float desired_velocity = new Point2D.Float(tp.x - p.x , tp.y - p.y);\r\nVehicle.scale(desired_velocity, v.getMaxSpeed());\r\nv.updateSteering(desired_velocity.x, desired_velocity.y);\r\n}", "public void update(final Observable peer, final Object obj) {\n \t\tif (obj != null) {\n \t\t\tif (obj instanceof PhysicalObject) {\n \t\t\t\taddObject((PhysicalObject) obj);\n \t\t\t\t\n \t\t\t} else if (obj instanceof CollidableObject) {\n \t\t\t\taddObject(new PhysicalObject((CollidableObject) obj));\n \t\t\t}\n \t\t}\n \t}", "protected abstract void update();", "public abstract void update();", "public abstract void update();" ]
[ "0.78872615", "0.57360095", "0.5723537", "0.56717604", "0.5511963", "0.54625356", "0.5347795", "0.5295207", "0.5280046", "0.5236677", "0.5233273", "0.5226604", "0.51879174", "0.518769", "0.5186834", "0.51812464", "0.51692355", "0.5103721", "0.5103721", "0.5103721", "0.50912213", "0.50885123", "0.50616693", "0.50593823", "0.50593823", "0.5057706", "0.50532544", "0.5021369", "0.5016655", "0.5016655", "0.5011361", "0.5008567", "0.5004912", "0.49964926", "0.49964926", "0.4992425", "0.49849188", "0.49804848", "0.49804848", "0.49729037", "0.4965167", "0.49640977", "0.4963839", "0.49421656", "0.49421656", "0.49417078", "0.49405858", "0.49295187", "0.49096414", "0.4907967", "0.48961115", "0.48961115", "0.48961115", "0.48961115", "0.48961115", "0.48961115", "0.48945534", "0.48922098", "0.48778883", "0.48735428", "0.48691285", "0.48613647", "0.48550725", "0.48550725", "0.48550725", "0.4852576", "0.4852576", "0.48483172", "0.48456746", "0.48416534", "0.48327565", "0.4825812", "0.48242727", "0.48242727", "0.48219767", "0.48183388", "0.48154104", "0.4811548", "0.4806739", "0.4806739", "0.4806739", "0.4806739", "0.4806739", "0.4806739", "0.4806739", "0.4806739", "0.4806739", "0.4806739", "0.48010793", "0.48010793", "0.4797441", "0.4797441", "0.4797441", "0.4797441", "0.4797441", "0.4793589", "0.47911826", "0.4791055", "0.47902542", "0.47902542" ]
0.7120582
1
Updates the joint transform given its current configuration.
void updateJointTransform(RigidBodyTransform jointTransformToUpdate);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static interface RevoluteJointTransformUpdater\n {\n /**\n * Updates the joint transform given its current configuration.\n * \n * @param jointTransformToUpdate the transform to update. Modified.\n */\n void updateJointTransform(RigidBodyTransform jointTransformToUpdate);\n }", "public void setTransform(int jointIndex, int index, float value) {\r\n\t\tswitch(index) {\r\n\t\tcase 0: this.translations[jointIndex].x = value; break;\r\n\t\tcase 1: this.translations[jointIndex].y = value; break;\r\n\t\tcase 2: this.translations[jointIndex].z = value; break;\r\n\t\tcase 3: this.orientations[jointIndex].x = value; break;\r\n\t\tcase 4: this.orientations[jointIndex].y = value; break;\r\n\t\tcase 5:\r\n\t\t\tthis.orientations[jointIndex].z = value;\r\n\t\t\tthis.processOrientation(this.orientations[jointIndex]);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "private void updateScriptRobotConfiguration(RobotConfigurationData configuration)\n {\n scriptFullRobotModel.getRootJoint().getJointPose().set(configuration.getRootPosition(), configuration.getRootOrientation());\n for (int i = 0; i < configuration.getJointAngles().size(); i++)\n allScriptJoints[i].setQ(configuration.getJointAngles().get(i));\n scriptFullRobotModel.updateFrames();\n }", "public void setTransform(Transform transform);", "public void applyTransform() {\n\t\tglRotatef(xaxisrot, 1.0f, 0.0f, 0.0f);\n\t\tglRotatef(yaxisrot, 0.0f, 1.0f, 0.0f);\n\t\tglRotatef(tilt, 0.0f, 0.0f, 1.0f);\n\t\tglTranslatef(-pos.geti(), -pos.getj(), -pos.getk());\n\t}", "private void updateTransform() {\n Matrix matrix = new Matrix();\n float centerX = dataBinding.viewFinder.getWidth() / 2f;\n float centerY = dataBinding.viewFinder.getHeight() / 2f;\n int rotation = dataBinding.viewFinder.getDisplay().getRotation();\n int rotationDegrees = 0;\n switch (rotation) {\n case Surface.ROTATION_0:\n rotationDegrees = 0;\n break;\n case Surface.ROTATION_90:\n rotationDegrees = 90;\n break;\n case Surface.ROTATION_180:\n rotationDegrees = 180;\n break;\n case Surface.ROTATION_270:\n rotationDegrees = 270;\n break;\n default:\n }\n matrix.postRotate(-rotationDegrees, centerX, centerY);\n }", "public void setTransform(AffineTransform transform)\n/* */ {\n/* 202 */ AffineTransform old = getTransform();\n/* 203 */ this.transform = transform;\n/* 204 */ setDirty(true);\n/* 205 */ firePropertyChange(\"transform\", old, transform);\n/* */ }", "protected abstract void addJointImpl( Joint joint );", "public void updateProjector(Matrix4f trans) {\r\n\t\tMatrix4f oldM = new Matrix4f(getProjector().getModelM());\r\n\t\tgetProjector().setModelM(trans.multiply(oldM.transpose()).transpose().toArray());\r\n\t}", "public void setJointIndex(int index) {\r\n\t\tthis.jointIndex = index;\r\n\t}", "protected void updatePosition() {\n\t\tif(motion == null) {\n\t\t\tmotion = new Motion3D(player, true);\n\t\t} else motion.update(player, true);\n\t\t\n\t\tmotion.applyToEntity(this);\n\t\tthis.rotationPitch = player.rotationPitch;\n\t\tthis.rotationYaw = player.rotationYaw;\n\t}", "public void transform(AffineTransform at) {\n\t\tif (_child != null) {\n\t\t\t_child.transform(at);\n\t\t}\n\t}", "public void update() {\n\t\tmrRoboto.move();\n\t\tobsMatrix.updateSensor(mrRoboto.x, mrRoboto.y);\n\t\thmm.updateProb(obsMatrix.getSensorReading());\n\t}", "void updateFrom(ClonalGeneAlignmentParameters alignerParameters);", "public static RevoluteJointTransformUpdater newRevoluteJointTransformUpdater(RevoluteJointReadOnly joint)\n {\n FrameVector3DReadOnly jointAxis = joint.getJointAxis();\n\n RevoluteJointTransformUpdater jointTransformUpdater;\n\n if (jointAxis.geometricallyEquals(Axis.X, TRANSFORM_UPDATER_EPSILON))\n {\n jointTransformUpdater = transform -> transform.setRotationRollAndZeroTranslation(joint.getQ());\n }\n else if (jointAxis.geometricallyEquals(Axis.Y, TRANSFORM_UPDATER_EPSILON))\n {\n jointTransformUpdater = transform -> transform.setRotationPitchAndZeroTranslation(joint.getQ());\n }\n else if (jointAxis.geometricallyEquals(Axis.Z, TRANSFORM_UPDATER_EPSILON))\n {\n jointTransformUpdater = transform -> transform.setRotationYawAndZeroTranslation(joint.getQ());\n }\n else\n {\n AxisAngle axisAngle = new AxisAngle();\n jointTransformUpdater = transform ->\n {\n axisAngle.set(joint.getJointAxis(), joint.getQ());\n transform.setRotationAndZeroTranslation(axisAngle);\n };\n }\n\n return jointTransformUpdater;\n }", "public void apply() {\n\t\tglTranslated(0, 0, -centerDistance);\n\t\tglRotated(pitch, 1, 0, 0);\n\t\tglRotated(yaw, 0, 0, 1);\n\t\tglScaled(scale, scale, scale);\n\n\t\tglTranslated(-pos.get(0), -pos.get(1), -pos.get(2));\n\t}", "public void transform(AffineTransform Tx)\r\n\t{\r\n\t\t// System.out.println(\"transform\");\r\n\t}", "public void updateTranslationAnimation() {\n\t\tif (target == null)\n\t\t\treturn;\n\t\t\n\t\tfinal float\n\t\t\t// Declare the distance to the target position.\n\t\t\tdeltaX = target.x - this.x(),\n\t\t\tdeltaY = target.y - this.y(),\n\t\t\t// Declare the new coordinates for the SwipeTile to use.\n\t\t\tnewX = this.x() + (deltaX * translationDamping),\n\t\t\tnewY = this.y() + (deltaY * translationDamping);\n\t\t\n\t\t// Set the SwipeTile to the new-coordinates.\n\t\tsetPosition(newX, newY);\n\t}", "public void setTransform(float a11, float a12, float a21, float a22, float x, float y);", "@Override\r\n\tpublic void transformComponent(AffineTransform transform, Set<JVGShape> locked) {\n\t}", "public void setTransform(AffineTransform Tx)\r\n\t{\r\n\t\t// System.out.println(\"setTransform\");\r\n\t}", "public synchronized void transform() {\n Iterator<String> it = entity_to_wxy.keySet().iterator();\n while (it.hasNext()) {\n String entity = it.next();\n double wx = entity_to_wxy.get(entity).getX(),\n wy = entity_to_wxy.get(entity).getY();\n int sx, sy;\n entity_to_sxy.put(entity, (sx = wxToSx(wx)) + BundlesDT.DELIM + (sy = wyToSy(wy)));\n entity_to_sx.put(entity, sx); entity_to_sy.put(entity, sy);\n }\n transform_id++;\n }", "public void refreshPosition() {\n\n this.setTransform(getTransform());\n }", "public SmooksTransformModel setConfig(String config);", "public void getCurrentJointState(sensor_msgs.JointState currentJointState, LBR robot) {\n\n currentJointState.getHeader().setStamp(time.getCurrentTime());\n currentJointState.setName(Arrays.asList(joint_names));\n currentJointState.setPosition(robot.getCurrentJointPosition().getInternalArray());\n currentJointState.setEffort(robot.getMeasuredTorque().getTorqueValues());\n }", "protected void establishTransformationMatrix(final AffineTransform at) {\n saveGraphicsState();\n concatenateTransformationMatrix(UnitConv.mptToPt(at));\n }", "void setTransforms(Transforms transforms);", "public Joint (SkeletonJoint skeletonJoint) {\n\t\tthis.skeletonJoint = skeletonJoint;\n\t\tposition2d = new Vector2f();\n\t\tposition3d = new Vector3f();\n\t\tconfidence = 0;\n\t}", "private void applyTransform() {\n GlStateManager.rotate(180, 1.0F, 0.0F, 0.0F);\n GlStateManager.translate(offsetX, offsetY - 26, offsetZ);\n }", "public abstract Transformation updateTransform(Rectangle selectionBox);", "public void transformChanged(Transform3D transform) {\r\n\t}", "public void apply() {\n double currentHeading = self.getHeading();\n IGameIterator iter = target.getCollection().getIterator();\n Pylon nextPylon = null;\n while (iter.hasNext()) {\n iter.getNext();\n if (iter.get() instanceof Pylon) {\n if (((Pylon) iter.get()).getNum() == self.getLatestPylon() + 1) { //if it is the next pylon\n nextPylon = (Pylon) iter.get();\n }\n }\n }\n if (nextPylon == null) { //if there are no more pylons\n self.changeSpeed(0 - ((int) self.getMaxSpeed())); //stop at the finish line\n return;\n }\n\n double deltaX = nextPylon.getPosition().getX() - self.getPosition().getX();\n double deltaY = nextPylon.getPosition().getY() - self.getPosition().getY();\n newHeading = Math.toDegrees(Math.atan2(deltaY, deltaX));\n double rightTurn;\n double leftTurn;\n\n rightTurn = (newHeading - currentHeading);\n if (rightTurn < 0)\n rightTurn += 360;\n leftTurn = 360 - rightTurn;\n\n if (leftTurn <= rightTurn) {\n //turn left\n self.steer(-15);\n } else {\n // turn right\n self.steer(15);\n }\n //self.steer((int) (newHeading - currentHeading));\n currentHeading = self.getHeading();\n\n //move at max speed towards it\n self.changeSpeed((int) self.getMaxSpeed());\n }", "public void onChange(Transform transform);", "public void updateTransform() {\n \t\tif (viewBox != null) {\n \t\t\tOMSVGRect bbox = ((SVGRectElement)viewBox.getElement()).getBBox();\n //\t\t\tGWT.log(\"bbox = \" + bbox.getDescription());\n \t\t\tfloat d = (float)Math.sqrt((bbox.getWidth() * bbox.getWidth() + bbox.getHeight() * bbox.getHeight()) * 0.25) * scale * 2;\n //\t\t\tGWT.log(\"d = \" + d);\n \t\t\n \t\t\t// Compute the actual canvas size. It is the max of the window rect\n \t\t\t// and the transformed bbox.\n \t\t\tfloat width = Math.max(d, windowRect.getWidth());\n \t\t\tfloat height = Math.max(d, windowRect.getHeight());\n //\t\t\tGWT.log(\"width = \" + width);\n //\t\t\tGWT.log(\"height = \" + height);\n \n \t\t\t// Compute the display transform to center the image in the\n \t\t\t// canvas\n \t\t\tOMSVGMatrix m = svg.createSVGMatrix();\n \t\t\tfloat cx = bbox.getCenterX();\n \t\t\tfloat cy = bbox.getCenterY();\n \t\t\tm = m.translate(0.5f * (width - bbox.getWidth()) -bbox.getX(), 0.5f * (height - bbox.getHeight()) -bbox.getY())\n \t\t\t.translate(cx, cy)\n \t\t\t.rotate(angle)\n \t\t\t.scale(scale)\n \t\t\t.translate(-cx, -cy);\n \t\t\t((ISVGTransformable)xformGroup).getTransform().getBaseVal().getItem(0).setMatrix(m);\n \t\t\t((ISVGTransformable)modelGroup.getTwinWrapper()).getTransform().getBaseVal().getItem(0).setMatrix(m);\n //\t\t\tGWT.log(\"m=\" + m.getDescription());\n \t\t\tsvg.getStyle().setWidth(width, Unit.PX);\n \t\t\tsvg.getStyle().setHeight(height, Unit.PX);\n \t\t}\n \t}", "protected abstract void concatenateTransformationMatrix(\n final AffineTransform at);", "public void updateExtraTransformMatrix(float[] fArr) {\n }", "private void updateTranslated() {\r\n\r\n\tfloat[] dp = new float[3];\r\n\tTools3d.subtract(p, _p, dp);\r\n\r\n\tfor (int i = 0; i < npoints * 3; i+= 3) {\r\n\t // translate by adding the amount local origin has moved by\r\n\t ps[i] += dp[0];\r\n\t ps[i + 1] += dp[1];\r\n\t ps[i + 2] += dp[2];\r\n\t}\r\n\t\r\n\t// reset bounding box and clear dirty flag\r\n\tbox.setBB();\r\n\tdirtyT = false;\r\n\r\n\t// finally\r\n\t_p[0] = p[0];\r\n\t_p[1] = p[1];\r\n\t_p[2] = p[2];\r\n }", "private void UpdateTransform()\n\t{\t\n\t\tTransform transform = parent.transform;\n\t\t\n\t\tVector2 friction = Vector2.Scale(-frictionCoefficient,velocity);\n\t\tfloat angularFriction = -frictionCoefficient*angularVelocity;\n\t\t\n\t\t//Newton integration P = P + dP + acceleration * dt^2\n\t\ttransform.position.x += velocity.x + (acceleration.x *deltaTime*deltaTime) + friction.x;\n\t\ttransform.position.y += velocity.y + (acceleration.y *deltaTime*deltaTime) + friction.y;\n\t\ttransform.rotation += angularVelocity + angularAcceleration*deltaTime*deltaTime + angularFriction ;\n\t\t\n\t}", "public void changePositionOfAdjuster() {\n final float txOffset = currentSittingTranslationX;\n final float tyOffset = currentSittingTranslationY;\n final float tzOffset = currentSittingTranslationZ;\n float rxOffset = currentSittingRotationX;\n float ryOffset = currentSittingRotationY;\n float rzOffset = currentSittingRotationZ;\n \n //get cell transform of the sceneroot of cell\n CellRendererJME ret = (CellRendererJME) editor.getCell().getCellRenderer(Cell.RendererType.RENDERER_JME);\n Entity mye = ret.getEntity();\n RenderComponent rc = (RenderComponent) mye.getComponent(RenderComponent.class);\n Node localNode = rc.getSceneRoot();\n Vector3f v3fa = localNode.getWorldTranslation();\n Quaternion quata = localNode.getWorldRotation();\n float[] angles = new float[3];\n angles = quata.toAngles(angles);\n\n //prepare the translation values\n final float tx = v3fa.x + txOffset;\n final float ty = v3fa.y + tyOffset;\n final float tz = v3fa.z + tzOffset;\n\n //prepare the rotation values\n //add 20 degree to y as an adjuster\n final float rx = (float) Math.toRadians((rxOffset + Math.toDegrees(angles[0])));\n final float ry = (float) Math.toRadians((ryOffset + Math.toDegrees(angles[1]) + 20.0f));\n final float rz = (float) Math.toRadians((rzOffset + Math.toDegrees(angles[2])));\n\n //apply the changes\n final WorldManager wm = ClientContextJME.getWorldManager();\n RenderUpdater u = new RenderUpdater() {\n public void update(Object obj) {\n SitAdjusterEntity.getInstance(editor.getCell()).getRootNode()\n .setLocalTranslation(tx, ty, tz);\n SitAdjusterEntity.getInstance(editor.getCell()).getRootNode()\n .setLocalRotation(new Quaternion(new float[]{rx, ry, rz}));\n WorldManager wm = ClientContextJME.getWorldManager();\n wm.addToUpdateList(SitAdjusterEntity.getInstance(editor.getCell()).getRootNode());\n }\n };\n wm.addRenderUpdater(u, this);\n }", "public void setTransform (float x, float y, float angle) {\n\t\ttmp.set(x, y);\n\t\tbody.setTransform(tmp, angle);\n\t}", "public Transform apply(Transform transform) {\n\n setPosition(transform.getTransformedPosition());\n setRotation(transform.getTransformedRotation());\n setScale(transform.getScale());\n\n return this;\n }", "@Override\n public void setAffineTransform(AffineTransform af) {\n\n }", "public void setTransform (Vector2 position, float angle) {\n\t\ttmp.set(position.x, position.y);\n\t\tbody.setTransform(tmp, angle);\n\t}", "private void updatePivot(int objIndex) {\n if (haveChanged[objIndex]){\n return;\n }\n int parentIndex=parentIndexes[objIndex];\n if (parentIndex!=-1){\n updatePivot(parentIndex);\n }\n pivots[objIndex].interpolateTransforms(beginPointTime.look[objIndex],endPointTime.look[objIndex],delta);\n if (parentIndex!=-1)\n pivots[objIndex].combineWithParent(pivots[parentIndex]);\n haveChanged[objIndex]=true;\n }", "public final void ruleJointMovement() 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:885:2: ( ( ( rule__JointMovement__Alternatives ) ) )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:886:1: ( ( rule__JointMovement__Alternatives ) )\n {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:886:1: ( ( rule__JointMovement__Alternatives ) )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:887:1: ( rule__JointMovement__Alternatives )\n {\n before(grammarAccess.getJointMovementAccess().getAlternatives()); \n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:888:1: ( rule__JointMovement__Alternatives )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:888:2: rule__JointMovement__Alternatives\n {\n pushFollow(FOLLOW_rule__JointMovement__Alternatives_in_ruleJointMovement1834);\n rule__JointMovement__Alternatives();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getJointMovementAccess().getAlternatives()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public void basicMotion() {\r\n\t\tPVector v = behavior.behavior(obj.getMotion());\r\n\t\tobj.getMotion().setVelocity(v);\r\n\t\t\r\n\t\tobj.getMotion().kinematicUpdate();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tfloat x = obj.getMotion().getPosition().x;\r\n\t\tfloat y = obj.getMotion().getPosition().y;\r\n\t\tif(y <= turnCornerMin ) {\r\n\t\t\tbehavior.setDest(turnCornerMax,turnCornerMin);\r\n\t\t\t\t\r\n\t\t}\r\n\t\tif(x >= turnCornerMax) {\r\n\t\t\tbehavior.setDest(turnCornerMax, turnCornerMax);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif(y >= turnCornerMax) {\r\n\t\t\tbehavior.setDest(turnCornerMin, turnCornerMax);\r\n\t\t}\r\n\t\t\r\n\t\tif(x < turnCornerMin) {\r\n\t\t\treturn;\r\n\t\t\t\r\n\t\t}\r\n\t\t\t\r\n\t\tobj.updateObjKinematics(x, y, obj.getMotion().getOrientation());\r\n\t}", "public void transform() {\n final var bounds = getParentBounds();\n transform( bounds.width, bounds.height );\n }", "public void updatePosition(Matrix4x4 transform, Vector yawPitchRoll) {\n if (this.posSet) {\n Vector v = new Vector(this.posX, this.posY, this.posZ);\n transform.transformPoint(v);\n updatePosition(v, yawPitchRoll);\n } else {\n updatePosition(transform.toVector(), yawPitchRoll);\n }\n }", "public SmooksTransformModel setTransformType(String type);", "public Matrix getTransform()\n {\n return transform;\n }", "public void transform() {\n\t\tOrganism newOrg;\n\t\t\n\t\tfor (int i=0; i < 1; i++) {\n\t\t\tnewOrg = new Organism(_world);\n\t\t\tif (newOrg.inheritTransformation(this, i==0)) {\n\t\t\t\t// It can be created\n\t\t\t\t_world.addOrganism(newOrg,this);\n\t\t\t}\n\t\t}\n\t}", "void setBioAssemblyTrans(int bioAssemblyIndex, int[] inputChainIndices, double[] inputTransform, String name);", "public void set(Transform transform) {\n \tif(transform == null){ // TODO: Quick workaround for wap3 cars problem\n \t\tsetIdentity();\n \t}\n \telse {\n \t\tSystem.arraycopy(transform.matrix, 0, this.matrix, 0, 16);\n \t}\n }", "@Generated\n @Selector(\"setTransform:atTime:\")\n public native void setTransformAtTime(@ByValue CGAffineTransform transform, @ByValue CMTime time);", "private void applyMerge() {\n try {\n SolutionTrajectory trajectory = solution.getShortestTrajectory();\n trajectory.setModel(this.scope);\n trajectory.doTransformation();\n applied = true;\n } catch (IncQueryException e) {\n logger.error(e.getMessage(), e);\n }\n }", "public void update() {\n\n\t\tif (!talking) {\n\t\t\tif (pointWalking) {\n\t\t\t\tpointWalkBehavior();\n\t\t\t} else if (behavior == ACTION.STAND) {\n\n\t\t\t} else if (behavior == ACTION.ROTATE) {\n\t\t\t\trotatingBehavior();\n\t\t\t} else if (behavior == ACTION.RANDOM) {\n\t\t\t\trandomBehavior();\n\t\t\t} else if (behavior == ACTION.WANDER) {\n\t\t\t\twanderingBehavior();\n\t\t\t} else if (behavior == ACTION.PATROL) {\n\t\t\t\tpatrolBehavior();\n\t\t\t}\n\t\t}\n\t}", "protected Matrix4 computeTransform() {\n return super.computeTransform();\n }", "void setPose(IPose2D newPose);", "public Configuration update(final Configuration configuration);", "interface WithConstraints {\n /**\n * Specifies constraints.\n * @param constraints Constraints associated with the Job\n * @return the next update stage\n */\n Update withConstraints(JobBasePropertiesConstraints constraints);\n }", "protected void applyTransformations(Graphics2D g2d) {\n\t\tg2d.translate(position.x,position.y);\n\t\tg2d.translate(pivotPoint.x, pivotPoint.y);\n\t\t//Would still like to rotate around scaled pivot point maybe\n\t\tg2d.rotate(rotation);\n\t\tg2d.scale(scaleX, scaleY);\n\t\tg2d.translate(-pivotPoint.x, -pivotPoint.y);\n\t\tpointTransform = g2d.getTransform();\n\t}", "public void postMultiply(Transform transform) {\n matrix = mulMM(matrix, transform.matrix);\n }", "public void establishOldAffineTransform ( Graphics2D graphics2d )\n {\n oldAffineTransformation = graphics2d.getTransform ( );\n }", "@FXML\n public void translation(){\n double x = Double.parseDouble(translation_x.getText());\n double y = Double.parseDouble(translation_y.getText());\n double z = Double.parseDouble(translation_z.getText());\n\n double[] A = t1.getTetraeder()[0].getPoint();\n double[] B = t1.getTetraeder()[1].getPoint();\n double[] C = t1.getTetraeder()[2].getPoint();\n double[] D = t1.getTetraeder()[3].getPoint();\n\n t1.getTetraeder()[0].setPoint(A[0]+x,A[1]+y,A[2]+z);\n t1.getTetraeder()[1].setPoint(B[0]+x,B[1]+y,B[2]+z);\n t1.getTetraeder()[2].setPoint(C[0]+x,C[1]+y,C[2]+z);\n t1.getTetraeder()[3].setPoint(D[0]+x,D[1]+y,D[2]+z);\n\n redraw();\n }", "public void apply() {\n this.vgcomponent.setFont( this.fontchooser.getSelectedFont() );\n this.vgcomponent.setFontcolor( this.fontcolor.getColor() );\n\n if( this.vgcomponent instanceof VisualEdge ) {\n VisualEdge vEdge = (VisualEdge) this.vgcomponent;\n vEdge.getEdge().setFollowVertexLabel( this.followLabel.isSelected() );\n if( !this.followLabel.isSelected() ) {\n vEdge.getEdge().setLabel( this.textarea.getText() );\n }\n }\n else {\n this.vgcomponent.setLabel( this.textarea.getText() );\n }\n }", "public void update()\n {\n scene.realDistance(cfg,\n segway.position(),\n segway.pitch(),\n segway.yaw(),\n result);\n \n scale.setX(result.distance());\n }", "public void update() {\n\t\tif (fAssociationClassOrLinkObjectNode.isDragged()) { // && fDiagram.isDoAutoLayout() ) {\n\t\t\tfFirstCall = false;\n\t\t\tfX_old = fAssociationClassOrLinkObjectNode.getX();\n\t\t\tfY_old = fAssociationClassOrLinkObjectNode.getY();\n\t\t\tfX_con_old = fConNode.getX();\n\t\t\tfY_con_old = fConNode.getY();\n\t\t} else if (!fAssociationClassOrLinkObjectNode.isDragged()) { // && fDiagram.isDoAutoLayout() ) {\n\t\t\tdouble x = fX_old - fX_con_old;\n\t\t\tdouble y = fY_old - fY_con_old;\n\t\t\tdouble newX = x + fConNode.getX();\n\t\t\tdouble newY = y + fConNode.getY();\n\t\t\tfNENode.setPosition(newX, newY);\n\t\t\tfAssociationClassOrLinkObjectNode.setPosition(newX, newY);\n\t\t}\n\n\t\tif (fFirstCall && !fAssociationClassOrLinkObjectNode.isSelected()) {\n\t\t\tfinal int maxSpace = 30;\n\t\t\tdouble newX = 0.0;\n\t\t\tdouble newY = 0.0;\n\n\t\t\tif (fAssociationClassOrLinkObjectNode.getCenter().getX() >= fConNode.getCenter().getX()) {\n\t\t\t\tnewX = fConNode.getCenter().getX() + maxSpace + fAssociationClassOrLinkObjectNode.getWidth() / 2;\n\t\t\t\tnewY = fConNode.getCenter().getY();\n\t\t\t} else {\n\t\t\t\tnewX = fConNode.getCenter().getX() - maxSpace - fAssociationClassOrLinkObjectNode.getWidth() / 2;\n\t\t\t\tnewY = fConNode.getCenter().getY();\n\t\t\t}\n\t\t\tfNENode.setPosition(newX, newY);\n\t\t\tfAssociationClassOrLinkObjectNode.setPosition(newX, newY);\n\t\t}\n\n\t\tupdateConnectionPoint(fSourceWayPoint.getX(), fSourceWayPoint.getY(), fTargetWayPoint.getX(),\n\t\t\t\tfTargetWayPoint.getY());\n\t}", "protected void applyMatrices () {\n combinedMatrix.set(projectionMatrix).mul(transformMatrix);\n getShader().setUniformMatrix(\"u_projTrans\", combinedMatrix);\n }", "protected abstract void updateImpl(M newValue);", "@Override\n public void transform(double mxx, double myx, double mxy, double myy, double mxt, double myt) {\n graphicsEnvironmentImpl.transform(canvas, mxx, myx, mxy, myy, mxt, myt);\n }", "public void getCurrentJointPosition(iiwa_msgs.JointPosition currentJointPosition, LBR robot) {\n double[] position = robot.getCurrentJointPosition().getInternalArray();\n currentJointPosition.getHeader().setStamp(time.getCurrentTime());\n Conversions.vectorToJointQuantity(position, currentJointPosition.getPosition());\n }", "protected void establishTransformationModel() {\r\n\t \r\n\t\tTransformationModel transformModel ;\r\n\t\tArrayList<TransformationStack> modelTransformStacks ;\r\n\t\t\r\n\t\t\r\n\t\t// the variables needed for the profile\r\n\t\t// targetStruc = getTargetVector();\r\n\t\tsomData = soappTransformer.getSomData() ; \r\n\t\t// soappTransformer.setSomData( somApplication.getSomData() );\r\n\t\tsomApplication.setSomData(somData) ;\r\n\t\t\r\n\t\tsomData.getVariablesLabels() ;\r\n\t\t \r\n\t\t\r\n\t\t// from here we transfer...\r\n\t\tmodelTransformStacks = soappTransformer.getTransformationModel().getVariableTransformations();\r\n\t\ttransformModel = soappTransformer.getTransformationModel() ;\r\n\t\t \r\n\t\t\r\n\t\ttransformationModelImported = true;\r\n\t}", "@Override\r\n\tpublic Behaviour update(GameContext context) {\n\t\tif (Math.abs(thing.getX() - moveToX) < thing.getSpeed().getXv() / context.getTimeSinceLastUpdate()) {\r\n\t\t\tthing.setX(moveToX);\r\n\t\t}\r\n\t\tif (Math.abs(thing.getY() - moveToY) < thing.getSpeed().getYv() / context.getTimeSinceLastUpdate()) {\r\n\t\t\tthing.setY(moveToY);\r\n\t\t};\r\n\t\t\r\n\t\tif (!isContinueAfterTarget()) {\r\n\t\t\tthing.changeDirection(moveToX, moveToY, thing.getX(), thing.getY());\r\n\t\t}\r\n\t\tthing.updatePositionBasedOnSpeed(context);\r\n\t\t\r\n\t\tif (!isContinueAfterTarget()) {\r\n\t\t\tif ((int) thing.getX() == (int) moveToX) { // && thing.getY() == moveToLocation.y){\r\n\t\t\t\treturn new IdleBehaviour(thing);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn this;\r\n\t}", "public void transform(int npcid) {\n\t\tthis.transformTo = npcid;\n\t\tthis.getUpdateFlags().flag(UpdateFlag.TRANSFORM);\n\t}", "public PulleyJoint getJoint()\r\n\t{\r\n\t\treturn (PulleyJoint)joint;\r\n\t}", "public SWIGTYPE_p_SimTK__MobilizedBody updMobilizedBody() {\n return new SWIGTYPE_p_SimTK__MobilizedBody(opensimSimulationJNI.PhysicalFrame_updMobilizedBody(swigCPtr, this), false);\n }", "public Transform getTransform() {return transform;}", "@Override\n\t\tpublic void update() {\n\n\t\t}", "@Override\n\t\tpublic void update() {\n\n\t\t}", "@Override\n\t\tpublic void update() {\n\n\t\t}", "void updateTransformQueueVersions() {\n\t}", "@Override\n public void setTransform(double mxx, double myx, double mxy, double myy, double mxt, double myt) {\n graphicsEnvironmentImpl.setTransform(canvas, mxx, myx, mxy, myy, mxt, myt);\n }", "public void transformChanged(Transform3D transform) {\n\t\tsuper.transformChanged(transform);\n\t}", "public abstract void updatePath(Matrix matrix, Matrix backupTransformationMatrix, boolean highlight);", "@Override\n public void configureTrapezoid(TrapezoidProfileSettings settings) {\n master.configMotionAcceleration(settings.getAccelerationRate());\n master.configMotionCruiseVelocity(settings.getMaxVelocity());\n master.configMotionSCurveStrength(settings.getCurve());\n }", "private synchronized void updatePose(Move event) {\n\t\tfloat angle = event.getAngleTurned() - angle0;\n\t\tfloat distance = event.getDistanceTraveled() - distance0;\n\t\tdouble dx = 0, dy = 0;\n\t\tdouble headingRad = (Math.toRadians(heading));\n\n\t\tif (event.getMoveType() == Move.MoveType.TRAVEL\n\t\t\t\t|| Math.abs(angle) < 0.2f) {\n\t\t\tdx = (distance) * (float) Math.cos(headingRad);\n\t\t\tdy = (distance) * (float) Math.sin(headingRad);\n\t\t} else if (event.getMoveType() == Move.MoveType.ARC) {\n\t\t\tdouble turnRad = Math.toRadians(angle);\n\t\t\tdouble radius = distance / turnRad;\n\t\t\tdy = radius\n\t\t\t\t\t* (Math.cos(headingRad) - Math.cos(headingRad + turnRad));\n\t\t\tdx = radius\n\t\t\t\t\t* (Math.sin(headingRad + turnRad) - Math.sin(headingRad));\n\t\t}\n\t\tx += dx;\n\t\ty += dy;\n\t\theading = normalize(heading + angle); // keep angle between -180 and 180\n\t\tangle0 = event.getAngleTurned();\n\t\tdistance0 = event.getDistanceTraveled();\n\t\tcurrent = !event.isMoving();\n\t}", "protected abstract void removeJointImpl( Joint joint );", "public void update(){}", "public void update(){}", "void update() {\n matrix();\n }", "private void updateTranslationfromCenterAnchor(Pose pose, int teapotId) {\n float poseX = pose.tx();\n float poseZ = pose.tz();\n\n float anchorPoseX = globalCenterPose.tx();\n float anchorPoseZ = globalCenterPose.tz();\n\n float[] translate = new float[3];\n\n if (poseX > anchorPoseX) {\n translate[0] = poseX - anchorPoseX;\n } else {\n translate[0] = -(anchorPoseX - poseX);\n }\n\n if (poseZ > anchorPoseZ) {\n translate[2] = poseZ - anchorPoseZ;\n } else {\n translate[2] = -(anchorPoseZ - poseZ);\n }\n\n teapotTranslations[teapotId] = translate;\n }", "@Override\n\tpublic void update() {\n\t\tobj.update();\n\t}", "@Override\n protected void executeTween_II(float executionPercent){\n\n attachedTo.applyTransform(scaleTransform);\n }", "public void createJoint(World world) {\n if (joint != null) {\n return;\n }\n joint = (RevoluteJoint) world.createJoint(this);\n }", "public void Update()\n\t{\n\t\tUpdateVelocity();\n\t\tUpdateAcceleration();\n\t\tUpdateTransform();\n\t}", "@Override\n public final void updateOrigin() {\n }", "public void copyConfig()\n {\n if (srcParts == null || dstParts == null)\n {\n logger.error(\"VObjectTreeCopier.copyConfig: null source or destination\");\n return;\n }\n if (hasRootTranslation)\n {\n srcParts[rootTranslationIdx].getTranslation(buf);\n dstParts[rootTranslationIdx].setTranslation(buf);\n }\n if (hasTranslation)\n {\n for (int i = 0; i < srcParts.length; i++)\n {\n srcParts[i].getTranslation(buf);\n dstParts[i].setTranslation(buf);\n }\n }\n if (hasRotation)\n {\n for (int i = 0; i < srcParts.length; i++)\n {\n srcParts[i].getRotation(buf);\n dstParts[i].setRotation(buf);\n }\n }\n if (hasScale)\n {\n for (int i = 0; i < srcParts.length; i++)\n {\n srcParts[i].getScale(buf);\n dstParts[i].setScale(buf);\n }\n }\n if (hasVelocity)\n {\n for (int i = 0; i < srcParts.length; i++)\n {\n srcParts[i].getVelocity(buf);\n dstParts[i].setVelocity(buf);\n }\n }\n if (hasAngularVelocity)\n {\n for (int i = 0; i < srcParts.length; i++)\n {\n srcParts[i].getAngularVelocity(buf);\n dstParts[i].setAngularVelocity(buf);\n }\n }\n\n }", "public boolean updateRotationAndSendNewConfigIfNeeded() {\n boolean changed = updateRotationUnchecked(false);\n if (changed) {\n sendNewConfiguration();\n }\n return changed;\n }", "public abstract void setPoseSolver(PoseSolver poseSolver);", "public void applyUpdates() {\r\n synchronized (visualItemMap) {\r\n adder.execute(parentGroup);\r\n for (VisualItem3D item : visualItemMap.values()) {\r\n item.applyTransform();\r\n }\r\n }\r\n }" ]
[ "0.6481714", "0.62145495", "0.55476797", "0.5277154", "0.525749", "0.5156869", "0.51411855", "0.49882242", "0.49475613", "0.49456698", "0.49101734", "0.4894905", "0.48799688", "0.48565498", "0.4849714", "0.48000535", "0.47579092", "0.47424698", "0.47224927", "0.47173354", "0.47088385", "0.46877888", "0.46857652", "0.46856767", "0.4684495", "0.46655834", "0.46507585", "0.4639461", "0.46299052", "0.46292758", "0.461041", "0.46084434", "0.45958865", "0.4588377", "0.4572456", "0.45692295", "0.4557137", "0.45546958", "0.45354712", "0.45273384", "0.45192495", "0.45112103", "0.45023817", "0.449804", "0.44767916", "0.44765493", "0.44748417", "0.44656956", "0.44526094", "0.44389698", "0.44290426", "0.4414835", "0.44089097", "0.44040105", "0.43987533", "0.43899643", "0.43788004", "0.4377532", "0.43765166", "0.43748945", "0.43718523", "0.43710065", "0.4370132", "0.4363502", "0.43559355", "0.43557155", "0.43531126", "0.43518794", "0.4344504", "0.43395108", "0.43380624", "0.43318278", "0.43317193", "0.4328904", "0.43196103", "0.4314569", "0.42924896", "0.42861938", "0.42861938", "0.42861938", "0.42846859", "0.42797142", "0.4274166", "0.4270623", "0.42600954", "0.42591104", "0.42558888", "0.42553005", "0.42553005", "0.42543724", "0.42495018", "0.4245398", "0.4244072", "0.4240213", "0.4229601", "0.42225164", "0.42152098", "0.4205243", "0.41944912", "0.41855365" ]
0.80147076
0
Creates quaternion that is restricted to describe a rotation around the yaxis.
public static QuaternionBasics newPitchOnlyQuaternionBasics() { return new QuaternionBasics() { private double x, y, z, s; @Override public double getX() { return x; } @Override public double getY() { return y; } @Override public double getZ() { return z; } @Override public double getS() { return s; } @Override public void setUnsafe(double qx, double qy, double qz, double qs) { x = qx; y = qy; z = qz; s = qs; if (Math.abs(x) > 1.0e-5 || Math.abs(z) > 1.0e-5) setToPitchOrientation(getPitch()); } @Override public String toString() { return EuclidCoreIOTools.getTuple4DString(this); } }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Transform newYRotation(float th){\n float sinth = (float) Math.sin(th);\n float costh = (float) Math.cos(th);\n return new Transform(new float[][]{\n {costh, 0.0f, sinth, 0.0f},\n {0.0f, 1.0f, 0.0f, 0.0f},\n {-sinth, 0.0f, costh, 0.0f},\n {0.0f, 0.0f, 0.0f, 1.0f}\n });\n }", "public double getYRotate() {\n\t\tif (Math.abs(getRawAxis(Axis_YRotate)) > stickDeadband) {\n\t\t\treturn getRawAxis(Axis_YRotate);\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}", "public void testYAxisRotation() {\n v = 1;\n theta = 2*pi;\n double[] point = new double[] {1, 1, 0};\n RotationMatrix rM = new RotationMatrix(a, b, c, u, v, w, theta);\n double[] result = rM.timesXYZ(point);\n double[] expect = new double[] {1, 1, 0, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(expect[i], result[i], TOLERANCE);\n }\n\n theta = 12*pi;\n rM = new RotationMatrix(a, b, c, u, v, w, theta);\n //rM.logMatrix();\n result = rM.timesXYZ(point);\n expect = new double[] {1, 1, 0, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(\"coord: \"+i, expect[i], result[i], TOLERANCE);\n }\n\n theta = pi;\n rM = new RotationMatrix(a, b, c, u, v, w, theta);\n //rM.logMatrix();\n result = rM.timesXYZ(point);\n expect = new double[] {-1, 1, 0, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(\"coord: \"+i, expect[i], result[i], TOLERANCE);\n }\n\n theta = pi/2;\n rM = new RotationMatrix(a, b, c, u, v, w, theta);\n result = rM.timesXYZ(point);\n expect = new double[] {0, 1, -1, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(\"coord: \"+i, expect[i], result[i], TOLERANCE);\n }\n\n theta = pi/4;\n rM = new RotationMatrix(a, b, c, u, v, w, theta);\n result = rM.timesXYZ(point);\n expect = new double[] {Math.sqrt(2)/2, 1, -Math.sqrt(2)/2, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(\"coord: \"+i, expect[i], result[i], TOLERANCE);\n }\n }", "public GLKQuaternion() {}", "public float getRotationY() {\n return mRotationY;\n }", "public Quaternion getPhysicsRotation(){\n return getPhysicsRotation(null);\n }", "public void setRotationY(float rotationY) {\n mRotationY = rotationY;\n }", "public double getRightJoystickVertical() {\n\t\treturn getRawAxis(RIGHT_STICK_VERTICAL) * -1;\n\t}", "void setQuaternion (DQuaternionC quat);", "public Vector4d setY(double y) {\n\t\tthis.y = y;\n\t\treturn this;\n\t}", "DQuaternionC getQuaternion ();", "public double getAngleYZ() {\r\n\t\tdouble l = this.lenght();\r\n\t\tif (l==0)\r\n\t\t\treturn 0;\r\n\t\treturn Math.asin(this.x/l);\r\n\t}", "private Node rotateright(Node y) {\n Node x = y.left;\n Node z = x.right;\n\n // Perform rotation\n x.right = y;\n y.left = z;\n\n // updating the heights for y and x\n y.height = max(height(y.left), height(y.right)) + 1;\n x.height = max(height(x.left), height(x.right)) + 1;\n\n return x;\n }", "@Override\n public void quaternion(int w, int x, int y, int z, int timestamp) {\n }", "static void getYawPitchRoll(Quaternion q, FloatVectorStruct gravity, FloatVectorStruct ypr) {\n ypr.x = (float)Math.atan2(2*q.x*q.y - 2*q.w*q.z, 2*q.w*q.w + 2*q.x*q.x - 1);\n // pitch: (node up/down, about X axis)\n ypr.y = (float)Math.atan(gravity.y / Math.sqrt(gravity.x*gravity.x + gravity.z*gravity.z));\n // roll: (tilt left/right, about Y axis)\n ypr.z = (float)Math.atan(gravity.x / Math.sqrt(gravity.y*gravity.y + gravity.z*gravity.z));\n }", "public static Matrix3D rotY(double theta) {\n Matrix3D m = new Matrix3D();\n m.set(0,0, Math.cos(theta));\n m.set(0,2, Math.sin(theta));\n m.set(2,0,-Math.sin(theta));\n m.set(2,2, Math.cos(theta));\n m.set(1,1, 1.0);\n return m;\n }", "@Override\n\tpublic float getCenterOfRotationY() {\n\t\treturn 0.5f;\n\t}", "void setOffsetWorldQuaternion(DQuaternionC q);", "public final void rotY(float angle) {\n\tdouble c = Math.cos(angle);\n\tdouble s = Math.sin(angle);\n\tm00 = (float)c; m01 = 0.0f; m02 = (float)s;\n\tm10 = 0.0f; m11 = 1.0f; m12 = 0.0f;\n\tm20 = (float)-s; m21 = 0.0f; m22 = (float)c;\n }", "public Quaternion quatProduct(Quaternion q){\n Quaternion result = new Quaternion();\n double wSample = _w, wRotation = q._w;\n Vector3d v = new Vector3d(_i, _j, _k);\n Vector3d u = new Vector3d(q._i, q._j, q._k);\n result.set_W(wSample * wRotation - v.dot(u));\n Vector3d uScale = new Vector3d(wSample * u.getX(), wSample * u.getY(), wSample * u.getZ());\n Vector3d vScale = new Vector3d(wRotation * v.getX(), wRotation * v.getY(), wRotation * v.getZ());\n Vector3d vCrossU = v.cross(u);\n Vector3d fin = (uScale.plus(vScale)).plus(vCrossU);\n result.set_I(fin.getX());\n result.set_J(fin.getY());\n result.set_K(fin.getZ());\n return result;\n }", "public static Quad quad (double ym, double y0, double yp) {\r\n\t\r\n\t\tdouble a, b, c, dx, dis, XE, YE, Z1, Z2;\r\n\t\tint NZ;\r\n\t\tNZ = 0;\r\n\t\tXE = 0;\r\n\t\tYE = 0;\r\n\t\tZ1 = 0;\r\n\t\tZ2 = 0;\r\n\t\ta = .5 * (ym + yp) - y0;\r\n\t\tb = .5 * (yp - ym);\r\n\t\tc = y0;\r\n\t\tXE = (0.0 - b) / (a * 2.0); // 'x coord of symmetry line\r\n\t\tYE = (a * XE + b) * XE + c; // 'extreme value for y in interval\r\n\t\tdis = b * b - 4.0 * a * c; // 'discriminant\r\n\t\t//more nested if's\r\n\t\t\tif ( dis > 0.000000 ) { //'there are zeros\r\n\t\t\tdx = (0.5 * Math.sqrt(dis)) / (Math.abs(a));\r\n\t\t\tZ1 = XE - dx;\r\n\t\t\tZ2 = XE + dx;\r\n\t\t\tif (Math.abs(Z1) <= 1) {\r\n\t\t\t\tNZ = NZ + 1 ; // 'This zero is in interval\r\n\t\t\t}\r\n\t\t\tif (Math.abs(Z2) <= 1) {\r\n\t\t\t\tNZ = NZ + 1 ; //'This zero is in interval\r\n\t\t\t}\r\n\t\t\tif (Z1 < -1) {\r\n\t\t\t\tZ1 = Z2;\r\n\t\t\t}\r\n\t\t}\r\n\t\tQuad returnQuad = new Quad();\r\n\t\treturnQuad.setXe(XE);\r\n\t\treturnQuad.setYe(YE);\r\n\t\treturnQuad.setZ1(Z1);\r\n\t\treturnQuad.setZ2(Z2);\r\n\t\treturnQuad.setNz(NZ);\r\n\r\n\t\treturn returnQuad;\r\n\t}", "public Quaternion()\n {\n this.x = 0.0f;\n this.y = 0.0f;\n this.z = 0.0f;\n this.w = 0.0f;\n }", "public ActionListener getRotationYListener() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\treturn new ActionListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tit.rotationY(Math.PI/32);\r\n\t\t\t}\r\n\t\t};\r\n\t}", "public void setToRotationY(double theta_y) {\r\n\t\tthis.set(getRotateX(theta_y));\r\n\t}", "public float setRotationY(float hand_positionX, float r_mapY_start) {\n r_yStart = r_mapY_start - ((270.0f / (1200.0f-100.0f)) * (hand_positionX-100.0f));\n return r_yStart;\n}", "public DynamicModelPart setY(float[] y) {\n this.y = y;\n return this;\n }", "public static Quaternion calculateQuaternionNineAxis(\n\t\t\tdouble accel1, double accel2, double accel3, \n\t\t\tdouble gyro1, double gyro2, double gyro3, \n\t\t\tdouble mag1, double mag2, double mag3){\n\t\t\n\t\tif(currentTime != 0){\n\t\t\tlong sampleTime = System.currentTimeMillis() - currentTime;\n//\t\t\tSystem.out.println(\"Sample time: \"+sampleTime);\n\t\t\tsampleFreq = 1.0 * 1000 / sampleTime;\n//\t\t\tSystem.out.println(\"Sample Freq: \"+sampleFreq);\n\t\t}\n\t\t\n\t\t// update current time when updating coordinate\n\t\tcurrentTime = System.currentTimeMillis();\n\t\t\n\t\tdouble normalizedDenominator;\n\t\tdouble s0, s1, s2, s3;\n\t\tdouble qDot1, qDot2, qDot3, qDot4;\n\t\tdouble hx, hy;\n\t\tdouble _2q0mx, _2q0my, _2q0mz, _2q1mx, _2bx, _2bz, _4bx, _4bz;\n\t\tdouble _2q0, _2q1, _2q2, _2q3, _2q0q2, _2q2q3, q0q0, q0q1, q0q2, q0q3, q1q1, q1q2, q1q3, q2q2, q2q3, q3q3;\n\n\t\t// Rate of change of quaternion from gyroscope\n\t\tqDot1 = 0.5f * (-q1 * gyro1 - q2 * gyro2 - q3 * gyro3);\n\t\tqDot2 = 0.5f * (q0 * gyro1 + q2 * gyro3 - q3 * gyro2);\n\t\tqDot3 = 0.5f * (q0 * gyro2 - q1 * gyro3 + q3 * gyro1);\n\t\tqDot4 = 0.5f * (q0 * gyro3 + q1 * gyro2 - q2 * gyro1);\n\n\t\t// Compute feedback only if accelerometer measurement valid (avoids NaN in accelerometer normalisation)\n\t\tif(!((accel1 == 0.0f) && (accel2 == 0.0f) && (accel3 == 0.0f))) {\n\n\t\t\t// Normalise accelerometer measurement\n\t\t\tnormalizedDenominator = 1 / Math.sqrt(accel1 * accel1 + accel2 * accel2 + accel3 * accel3);\n\t\t\taccel1 *= normalizedDenominator;\n\t\t\taccel2 *= normalizedDenominator;\n\t\t\taccel3 *= normalizedDenominator; \n\n\t\t\t// Normalise magnetometer measurement\n\t\t\tnormalizedDenominator = 1 / Math.sqrt(mag1 * mag1 + mag2 * mag2 + mag3 * mag3);\n\t\t\tmag1 *= normalizedDenominator;\n\t\t\tmag2 *= normalizedDenominator;\n\t\t\tmag3 *= normalizedDenominator;\n\n\t\t\t// Auxiliary variables to avoid repeated arithmetic\n\t\t\t_2q0mx = 2.0f * q0 * mag1;\n\t\t\t_2q0my = 2.0f * q0 * mag2;\n\t\t\t_2q0mz = 2.0f * q0 * mag3;\n\t\t\t_2q1mx = 2.0f * q1 * mag1;\n\t\t\t_2q0 = 2.0f * q0;\n\t\t\t_2q1 = 2.0f * q1;\n\t\t\t_2q2 = 2.0f * q2;\n\t\t\t_2q3 = 2.0f * q3;\n\t\t\t_2q0q2 = 2.0f * q0 * q2;\n\t\t\t_2q2q3 = 2.0f * q2 * q3;\n\t\t\tq0q0 = q0 * q0;\n\t\t\tq0q1 = q0 * q1;\n\t\t\tq0q2 = q0 * q2;\n\t\t\tq0q3 = q0 * q3;\n\t\t\tq1q1 = q1 * q1;\n\t\t\tq1q2 = q1 * q2;\n\t\t\tq1q3 = q1 * q3;\n\t\t\tq2q2 = q2 * q2;\n\t\t\tq2q3 = q2 * q3;\n\t\t\tq3q3 = q3 * q3;\n\n\t\t\t// Reference direction of Earth's magnetic field\n\t\t\thx = mag1 * q0q0 - _2q0my * q3 + _2q0mz * q2 + mag1 * q1q1 + _2q1 * mag2 * q2 + \n\t\t\t\t\t_2q1 * mag3 * q3 - mag1 * q2q2 - mag1 * q3q3;\n\t\t\thy = _2q0mx * q3 + mag2 * q0q0 - _2q0mz * q1 + _2q1mx * q2 - mag2 * q1q1 + \n\t\t\t\t\tmag2 * q2q2 + _2q2 * mag3 * q3 - mag2 * q3q3;\n\t\t\t_2bx = Math.sqrt(hx * hx + hy * hy);\n\t\t\t_2bz = -_2q0mx * q2 + _2q0my * q1 + mag3 * q0q0 + _2q1mx * q3 - mag3 * q1q1 + \n\t\t\t\t\t_2q2 * mag2 * q3 - mag3 * q2q2 + mag3 * q3q3;\n\t\t\t_4bx = 2.0f * _2bx;\n\t\t\t_4bz = 2.0f * _2bz;\n\n\t\t\t// Gradient decent algorithm corrective step\n\t\t\ts0 = -_2q2 * (2.0f * q1q3 - _2q0q2 - accel1) + _2q1 * (2.0f * q0q1 + _2q2q3 - accel2) - \n\t\t\t\t\t_2bz * q2 * (_2bx * (0.5f - q2q2 - q3q3) + _2bz * (q1q3 - q0q2) - mag1) + \n\t\t\t\t\t(-_2bx * q3 + _2bz * q1) * (_2bx * (q1q2 - q0q3) + _2bz * (q0q1 + q2q3) - mag2) + \n\t\t\t\t\t_2bx * q2 * (_2bx * (q0q2 + q1q3) + _2bz * (0.5f - q1q1 - q2q2) - mag3);\n\t\t\ts1 = _2q3 * (2.0f * q1q3 - _2q0q2 - accel1) + _2q0 * (2.0f * q0q1 + _2q2q3 - accel2) - \n\t\t\t\t\t4.0f * q1 * (1 - 2.0f * q1q1 - 2.0f * q2q2 - accel3) + _2bz * q3 * (_2bx * (0.5f - q2q2 - q3q3) + \n\t\t\t\t\t\t\t_2bz * (q1q3 - q0q2) - mag1) + (_2bx * q2 + _2bz * q0) * (_2bx * (q1q2 - q0q3) + \n\t\t\t\t\t\t\t\t\t_2bz * (q0q1 + q2q3) - mag2) + (_2bx * q3 - _4bz * q1) * (_2bx * (q0q2 + q1q3) + \n\t\t\t\t\t\t\t\t\t\t\t_2bz * (0.5f - q1q1 - q2q2) - mag3);\n\t\t\ts2 = -_2q0 * (2.0f * q1q3 - _2q0q2 - accel1) + _2q3 * (2.0f * q0q1 + _2q2q3 - accel2) - \n\t\t\t\t\t4.0f * q2 * (1 - 2.0f * q1q1 - 2.0f * q2q2 - accel3) + \n\t\t\t\t\t(-_4bx * q2 - _2bz * q0) * (_2bx * (0.5f - q2q2 - q3q3) + _2bz * (q1q3 - q0q2) - mag1) + \n\t\t\t\t\t(_2bx * q1 + _2bz * q3) * (_2bx * (q1q2 - q0q3) + _2bz * (q0q1 + q2q3) - mag2) + \n\t\t\t\t\t(_2bx * q0 - _4bz * q2) * (_2bx * (q0q2 + q1q3) + _2bz * (0.5f - q1q1 - q2q2) - mag3);\n\t\t\ts3 = _2q1 * (2.0f * q1q3 - _2q0q2 - accel1) + _2q2 * (2.0f * q0q1 + _2q2q3 - accel2) + \n\t\t\t\t\t(-_4bx * q3 + _2bz * q1) * (_2bx * (0.5f - q2q2 - q3q3) + _2bz * (q1q3 - q0q2) - mag1) + \n\t\t\t\t\t(-_2bx * q0 + _2bz * q2) * (_2bx * (q1q2 - q0q3) + _2bz * (q0q1 + q2q3) - mag2) + \n\t\t\t\t\t_2bx * q1 * (_2bx * (q0q2 + q1q3) + _2bz * (0.5f - q1q1 - q2q2) - mag3);\n\t\t\tnormalizedDenominator = 1 / Math.sqrt(s0 * s0 + s1 * s1 + s2 * s2 + s3 * s3); \n\t\t\t\n\t\t\t// normalise step magnitude\n\t\t\ts0 *= normalizedDenominator;\n\t\t\ts1 *= normalizedDenominator;\n\t\t\ts2 *= normalizedDenominator;\n\t\t\ts3 *= normalizedDenominator;\n\n\t\t\t// Apply feedback step\n\t\t\tqDot1 -= beta * s0;\n\t\t\tqDot2 -= beta * s1;\n\t\t\tqDot3 -= beta * s2;\n\t\t\tqDot4 -= beta * s3;\n\t\t}\n\n\t\t// Integrate rate of change of quaternion to yield quaternion\n\t\tq0 += qDot1 * (1.0f / sampleFreq);\n\t\tq1 += qDot2 * (1.0f / sampleFreq);\n\t\tq2 += qDot3 * (1.0f / sampleFreq);\n\t\tq3 += qDot4 * (1.0f / sampleFreq);\n\n\t\t// Normalise quaternion\n\t\tnormalizedDenominator = 1 / Math.sqrt(q0 * q0 + q1 * q1 + q2 * q2 + q3 * q3);\n\t\tq0 *= normalizedDenominator;\n\t\tq1 *= normalizedDenominator;\n\t\tq2 *= normalizedDenominator;\n\t\tq3 *= normalizedDenominator;\n\t\t\n\t\t\n\t\t// set Quaternion object\n\t\tQuaternion quaternion = new Quaternion(q0, q1, q2, q3);\n\t\t\n\t\treturn quaternion;\n\t}", "public static Quaternion slerp(Quaternion qa, Quaternion qb, double t) {\n \t// quaternion to return\n \tQuaternion qm = new Quaternion();\n \t// Calculate angle between them.\n \tdouble cosHalfTheta = qa.w * qb.w + qa.x * qb.x + qa.y * qb.y + qa.z * qb.z;\n \t// if qa=qb or qa=-qb then theta = 0 and we can return qa\n \tif (Math.abs(cosHalfTheta) >= 1.0){\n \t\tqm.w = qa.w;\n \t\tqm.x = qa.x;\n \t\tqm.y = qa.y;\n \t\tqm.z = qa.z;\n \t\treturn qm;\n \t}\n \t// Calculate temporary values.\n \tdouble halfTheta = Math.acos(cosHalfTheta);\n \tdouble sinHalfTheta = Math.sqrt(1.0 - cosHalfTheta*cosHalfTheta);\n \t// if theta = 180 degrees then result is not fully defined\n \t// we could rotate around any axis normal to qa or qb\n \tif (Math.abs(sinHalfTheta) < 0.001){ \n \t\tqm.w = (qa.w * 0.5f + qb.w * 0.5f);\n \t\tqm.x = (qa.x * 0.5f + qb.x * 0.5f);\n \t\tqm.y = (qa.y * 0.5f + qb.y * 0.5f);\n \t\tqm.z = (qa.z * 0.5f + qb.z * 0.5f);\n \t\treturn qm;\n \t}\n \tfloat ratioA = (float)(Math.sin((1 - t) * halfTheta) / sinHalfTheta);\n \tfloat ratioB = (float)(Math.sin(t * halfTheta) / sinHalfTheta); \n \t//calculate Quaternion.\n \tqm.w = (qa.w * ratioA + qb.w * ratioB);\n \tqm.x = (qa.x * ratioA + qb.x * ratioB);\n \tqm.y = (qa.y * ratioA + qb.y * ratioB);\n \tqm.z = (qa.z * ratioA + qb.z * ratioB);\n \treturn qm;\n }", "public int getQuatity() {\n\t\treturn 0;\r\n\t}", "public DynamicCuboid setY(float y) {\n this.y = y;\n return this;\n }", "Node rightRotate(Node y) \n { \n Node x = y.left; \n Node T2 = x.right; \n\n // rotation \n x.right = y; \n y.left = T2; \n\n // heights \n y.height = Math.max(height(y.left), height(y.right)) + 1; \n x.height = Math.max(height(x.left), height(x.right)) + 1; \n\n // Return new root \n return x; \n }", "public godot.wire.Wire.Vector3.Builder getYBuilder() {\n \n onChanged();\n return getYFieldBuilder().getBuilder();\n }", "@Override\n \t\t\t\tpublic void doRotateY() {\n \n \t\t\t\t}", "public godot.wire.Wire.Quat.Builder getQuatValueBuilder() {\n return getQuatValueFieldBuilder().getBuilder();\n }", "godot.wire.Wire.Quat getQuatValue();", "default void setY(double y)\n {\n getAxis().setY(y);\n }", "public final Point3D setY(double y)\n {\n m_jso.setY(y);\n\n return this;\n }", "godot.wire.Wire.QuatOrBuilder getQuatValueOrBuilder();", "@Override\r\n\t/**\r\n\t * Method that gives the condition for y coordinate \r\n\t * \r\n\t * @see com.ogp.pp.tp.geoconstruction.Point#getYCondition()\r\n\t */\r\n\tpublic SymbolicPolynomial getYCondition() {\n\t\tSymbolicPolynomial yConditionForRotatedPoint = new SymbolicPolynomial();\r\n\t\tSymbolicVariable y0 = new SymbolicVariable(Variable.VAR_TYPE_SYMB_Y, M0Label);\r\n\t\tSymbolicVariable xA = new SymbolicVariable(Variable.VAR_TYPE_SYMB_X, ALabel);\r\n\t\tSymbolicVariable yA = new SymbolicVariable(Variable.VAR_TYPE_SYMB_Y, ALabel);\r\n\t\tSymbolicVariable xS = new SymbolicVariable(Variable.VAR_TYPE_SYMB_X, SLabel);\r\n\t\tSymbolicVariable yS = new SymbolicVariable(Variable.VAR_TYPE_SYMB_Y, SLabel);\r\n\t\t\r\n\t\tSymbolicPolynomial m0Part = new SymbolicPolynomial();\r\n\t\tSymbolicPolynomial xPart = new SymbolicPolynomial();\r\n\t\tSymbolicPolynomial yPart = new SymbolicPolynomial();\r\n\t\tSymbolicPolynomial zPart = new SymbolicPolynomial();\r\n\t\tSymbolicTerm tempTerm = null;\r\n\t\t\r\n\t\ttempTerm = new SymbolicTerm(1);\r\n\t\ttempTerm.addPower(new Power(y0, 1));\r\n\t\tm0Part.addTerm(tempTerm);\r\n\t\t\r\n\t\ttempTerm = new SymbolicTerm(1);\r\n\t\ttempTerm.addPower(new Power(xA, 1));\r\n\t\txPart.addTerm(tempTerm);\r\n\t\ttempTerm = new SymbolicTerm(-1);\r\n\t\ttempTerm.addPower(new Power(xS, 1));\r\n\t\txPart.addTerm(tempTerm);\r\n\t\txPart.multiplyByRealConstant(Math.sin(this.radAngleMeasure));\r\n\t\t\r\n\t\ttempTerm = new SymbolicTerm(1);\r\n\t\ttempTerm.addPower(new Power(yA, 1));\r\n\t\tyPart.addTerm(tempTerm);\r\n\t\ttempTerm = new SymbolicTerm(-1);\r\n\t\ttempTerm.addPower(new Power(yS, 1));\r\n\t\tyPart.addTerm(tempTerm);\r\n\t\tyPart.multiplyByRealConstant(Math.cos(this.radAngleMeasure));\r\n\t\t\r\n\t\ttempTerm = new SymbolicTerm(1);\r\n\t\ttempTerm.addPower(new Power(yS, 1));\r\n\t\tzPart.addTerm(tempTerm);\r\n\t\t\r\n\t\tyConditionForRotatedPoint.addPolynomial(m0Part);\r\n\t\tyConditionForRotatedPoint.subtractPolynomial(xPart);\r\n\t\tyConditionForRotatedPoint.subtractPolynomial(yPart);\r\n\t\tyConditionForRotatedPoint.subtractPolynomial(zPart);\r\n\t\t\r\n\t\treturn yConditionForRotatedPoint;\r\n\t}", "public AVLNode rotateRight(AVLNode y) {\n AVLNode x = y.getLeft();\n AVLNode T2 = x.getRight();\n \n //rotation\n x.setRight(y);\n y.setLeft(T2);\n \n //update heights\n x.setHeight(Math.max(getHeight(x.getLeft()), getHeight(x.getRight())) + 1);\n y.setHeight(Math.max(getHeight(y.getLeft()), getHeight(y.getRight())) + 1);\n \n return x;\n }", "boolean hasQuatValue();", "public static Vec3d rotate(Vec3d self, Quaternion q) {\n Vec3d u = new Vec3d(q.getX(), q.getY(), q.getZ());\n\n // Extract the scalar part of the quaternion\n float s = q.getW();\n\n // Do the math\n return u.multiply(2.0f * u.dotProduct(self))\n .add(self.multiply(s * s - u.dotProduct(u)))\n .add(u.crossProduct(self).multiply(2.0f * s));\n }", "Node rightRotate(Node y) {\n Node x = y.left;\n Node T2 = x.right;\n\n // Perform rotation\n x.right = y;\n y.left = T2;\n\n // Update heights\n y.height = max(height(y.left), height(y.right)) + 1;\n x.height = max(height(x.left), height(x.right)) + 1;\n\n // Return new root\n return x;\n }", "protected float getGyroscopeAngle() {\n if (doGyro) {\n Orientation exangles = bosch.getAngularOrientation(AxesReference.EXTRINSIC, AxesOrder.XYZ, AngleUnit.DEGREES);\n float gyroAngle = exangles.thirdAngle;\n //exangles.\n //telemetry.addData(\"angle\", \"angle: \" + exangles.thirdAngle);\n float calculated = normalizeAngle(reverseAngle(gyroAngle));\n //telemetry.addData(\"angle2\",\"calculated:\" + calculated);\n return calculated;\n } else {\n return 0.0f;\n }\n }", "public double getGyroAngleY() {\n return m_gyro.getAngleY();\n }", "public double getRightYAxis() {\n\t\treturn getRawAxis(Axis_RightY);\n\t}", "public Vector deflectY() {\n\t\treturn new Vector(deltaX, -deltaY);\n\t}", "void setOffsetQuaternion(DQuaternionC q);", "public static AffineTransform3D getRotateY(double theta) {\r\n\r\n\t\tAffineTransform3D rv = new AffineTransform3D();\r\n\t\tdouble sin = Math.sin(theta);\r\n\t\tdouble cos = Math.cos(theta);\r\n\t\trv.M11 = cos;\r\n\t\trv.M31 = sin;\r\n\t\trv.M13 = -sin;\r\n\t\trv.M33 = cos;\r\n\t\trv.M22 = 1;\r\n\t\trv.M12 = 0;\r\n\t\trv.M23 = 0;\r\n\t\trv.M14 = 0;\r\n\t\trv.M21 = 0;\r\n\t\trv.M24 = 0;\r\n\t\trv.M32 = 0;\r\n\t\trv.M34 = 0;\r\n\t\trv.M41 = 0;\r\n\t\trv.M42 = 0;\r\n\t\trv.M43 = 0;\r\n\t\trv.M44 = 1;\r\n\t\treturn rv;\r\n\t}", "void interpolateQuaternion(double q1w, double q1x, double q1y, double q1z, double q2w, double q2x, double q2y, double q2z, double[] out, double t) {\n\t\t\n\t\t//System.out.println(\"interpolateQuaternion 1 \"+q1w+\" \"+q1x+\" \"+q1y+\" \"+q1z);\n\t\t//System.out.println(\"interpolateQuaternion 2 \"+q2w+\" \"+q2x+\" \"+q2y+\" \"+q2z);\t\t\n\t\t//System.out.println(\"interpolateQuaternion t==\"+t);\n\t\t// Calculate angle between them.\n\t\tdouble cosHalfTheta = q1w * q2w + q1x * q2x + q1y * q2y + q1z * q2z;\n\t\t//System.out.println(\"cosHalfTheta==\"+cosHalfTheta);\n\t\t// if qa=qb or qa=-qb then theta = 0 and we can return qa\n\t\tif (Math.abs(cosHalfTheta) >= 1.0){\n\t\t\tout[0] = q1w; out[1] = q1x; out[2] = q1y; out[3] = q1z;\n\t\t\treturn;\n\t\t}\n\t\t// Calculate temporary values.\n\t\tdouble halfTheta = Math.acos(cosHalfTheta);\n\t\t\n\t\t// This is a workaround because the math is not right and I can't fix it - \n\t\t// prevents rover model from spinning around in the wrong direction, \n\t\t// in other words turning 358 degrees instead of 2 degrees.\n\t\tif (halfTheta > Math.PI/2) {\n\t\t\tif (t < 0.5) {\n\t\t\t\tout[0] = q1w;\n\t\t\t\tout[1] = q1x;\n\t\t\t\tout[2] = q1y;\n\t\t\t\tout[3] = q1z;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tout[0] = q2w;\n\t\t\t\tout[1] = q2x;\n\t\t\t\tout[2] = q2y;\n\t\t\t\tout[3] = q2z;\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tdouble sinHalfTheta = Math.sqrt(1.0 - cosHalfTheta*cosHalfTheta);\n\t\t//System.out.println(\"halfTheta==\"+halfTheta+\" sinHalfTheta==\"+sinHalfTheta);\n\t\t\n\t\t// if theta = 180 degrees then result is not fully defined\n\t\t// we could rotate around any axis normal to qa or qb\n\t\tif (Math.abs(sinHalfTheta) < 0.0001){\n\t\t\tout[0] = (q1w * 0.5 + q2w * 0.5);\n\t\t\tout[1] = (q1x * 0.5 + q2x * 0.5);\n\t\t\tout[2] = (q1y * 0.5 + q2y * 0.5);\n\t\t\tout[3] = (q1z * 0.5 + q2z * 0.5);\n\t\t\treturn;\n\t\t}\n\t\tdouble ratioA = Math.sin((1 - t) * halfTheta) / sinHalfTheta;\n\t\tdouble ratioB = Math.sin(t * halfTheta) / sinHalfTheta; \n\t\t//System.out.println(\"ratioA==\"+ratioA+\" ratioB==\"+ratioB);\n\t\t//calculate Quaternion.\n\t\tout[0] = (q1w * ratioA + q2w * ratioB);\n\t\tout[1] = (q1x * ratioA + q2x * ratioB);\n\t\tout[2] = (q1y * ratioA + q2y * ratioB);\n\t\tout[3] = (q1z * ratioA + q2z * ratioB);\n\t}", "public Quaternion getConjugated()\n {\n return new Quaternion(-x, -y, -z, w);\n }", "@java.lang.Override\n public boolean hasQuatValue() {\n return typeCase_ == 11;\n }", "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 void reverseYVelocity() {\n yVelocity = -yVelocity + 50;\n this.normalizeVelocity(this.xVelocity, this.yVelocity);\n }", "public abstract Vector4fc rotate(IQuaternionf quat);", "Node rightRotate(Node y) \n { \n Node x = y.left; \n Node T2 = x.right; \n \n // Perform rotation \n x.right = y; \n y.left = T2; \n \n // Update heights \n y.height = max(height(y.left), height(y.right)) + 1; \n x.height = max(height(x.left), height(x.right)) + 1; \n \n // Return new root \n return x; \n }", "public float[] eulerAnglesRadToQuat(float yaw, float pitch, float roll) {\n final float hr = roll * 0.5f;\n final float shr = (float) Math.sin(hr);\n final float chr = (float) Math.cos(hr);\n final float hp = pitch * 0.5f;\n final float shp = (float) Math.sin(hp);\n final float chp = (float) Math.cos(hp);\n final float hy = yaw * 0.5f;\n final float shy = (float) Math.sin(hy);\n final float chy = (float) Math.cos(hy);\n final float chy_shp = chy * shp;\n final float shy_chp = shy * chp;\n final float chy_chp = chy * chp;\n final float shy_shp = shy * shp;\n\n float x = (chy_shp * chr) + (shy_chp * shr); // cos(yaw/2) * sin(pitch/2) * cos(roll/2) + sin(yaw/2) * cos(pitch/2) * sin(roll/2)\n float y = (shy_chp * chr) - (chy_shp * shr); // sin(yaw/2) * cos(pitch/2) * cos(roll/2) - cos(yaw/2) * sin(pitch/2) * sin(roll/2)\n float z = (chy_chp * shr) - (shy_shp * chr); // cos(yaw/2) * cos(pitch/2) * sin(roll/2) - sin(yaw/2) * sin(pitch/2) * cos(roll/2)\n float w = (chy_chp * chr) + (shy_shp * shr); // cos(yaw/2) * cos(pitch/2) * cos(roll/2) + sin(yaw/2) * sin(pitch/2) * sin(roll/2)\n\n float[] new_quat = {x, y, z, w};\n return new_quat;\n }", "public Builder setY(godot.wire.Wire.Vector3 value) {\n if (yBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n y_ = value;\n onChanged();\n } else {\n yBuilder_.setMessage(value);\n }\n\n return this;\n }", "public Vector rotateAroundAxisY(Vector center, double theta) {\n double cosTheta = Math.cos(theta);\n double sinTheta = Math.sin(theta);\n Vector centered = difference(center);\n Vector rotated = new Vector(\n centered.z * sinTheta - centered.x * cosTheta,\n centered.y,\n centered.z * cosTheta + centered.x * sinTheta\n );\n return rotated.sum(center);\n }", "public Quaternion orientationAlongSegment(Point beg, Point end) {\n\n // Use Apache vectors and matrices to do the math.\n\n Vector3D b = new Vector3D(beg.getX(), beg.getY(), beg.getZ());\n Vector3D e = new Vector3D(end.getX(), end.getY(), end.getZ());\n\n Vector3D vfwd = e.subtract(b);\n\n double len = vfwd.getNorm();\n if (len > 0)\n vfwd = vfwd.normalize();\n else\n vfwd = new Vector3D(1.0, 0.0, 0.0);\n\n Vector3D vdown = new Vector3D(0.0, 0.0, 1.0);\n Vector3D vright = new Vector3D(0.0, 1.0, 0.0);\n\n // Check that the direction of motion is not along the Z axis. In this\n // case the approach of taking the cross product with the world Z will\n // fail and we need to choose a different axis.\n double epsilon = 1.0e-3;\n if (Math.abs(vdown.dotProduct(vfwd)) < 1.0 - epsilon) {\n vright = vdown.crossProduct(vfwd);\n vdown = vfwd.crossProduct(vright);\n if (vdown.getZ() < 0) {\n vright = vright.negate();\n vdown = vfwd.crossProduct(vright);\n }\n }\n else {\n vdown = vfwd.crossProduct(vright);\n vright = vdown.crossProduct(vfwd);\n if (vright.getY() < 0) {\n vdown = vdown.negate();\n vright = vdown.crossProduct(vfwd);\n }\n }\n\n // Make sure all vectors are normalized\n vfwd = vfwd.normalize();\n vright = vright.normalize();\n vdown = vdown.normalize();\n\n // Construct a rotation matrix\n double dcm[][] = new double[3][3];\n dcm[0][0] = vfwd.getX(); dcm[0][1] = vright.getX(); dcm[0][2] = vdown.getX();\n dcm[1][0] = vfwd.getY(); dcm[1][1] = vright.getY(); dcm[1][2] = vdown.getY();\n dcm[2][0] = vfwd.getZ(); dcm[2][1] = vright.getZ(); dcm[2][2] = vdown.getZ();\n Rotation R = new Rotation(dcm, 1e-8);\n\n //Print the rotation matrix\n //double d[][] = R.getMatrix();\n //for (int row = 0; row < 3; row++) {\n // logger.info(\"\\nMatrix is \" +\n //\t\tFloat.toString((float)d[row][0]) + \" \" +\n //\t\tFloat.toString((float)d[row][1]) + \" \" +\n //\t\tFloat.toString((float)d[row][2]));\n //}\n\n return new Quaternion(-(float)R.getQ1(), -(float)R.getQ2(),\n -(float)R.getQ3(), (float)R.getQ0());\n }", "@java.lang.Override\n public boolean hasQuatValue() {\n return typeCase_ == 11;\n }", "public godot.wire.Wire.Vector2.Builder getYBuilder() {\n \n onChanged();\n return getYFieldBuilder().getBuilder();\n }", "public void postRotateQuat(float x, float y, float z, float w) {\n \n float len = (float) Math.sqrt(x*x+y*y+z*z+w*w);\n if(len != 1){\n x /= len;\n y /= len;\n z /= len;\n w /= len;\n }\n \n float[] r = { \n 1 - (2*y*y + 2*z*z), 2*x*y - 2*z*w, 2*x*z+2*y*w, 0,\n 2*x*y + 2*z*w, 1 - (2*x*x + 2*z*z), 2*y*z-2*x*w, 0,\n 2*x*z - 2*y*w, 2*y*z + 2*x*w, 1 - (2*x*x+2*y*y), 0,\n 0, 0, 0, 1.0f};\n matrix = mulMM(matrix, r);\n }", "@Test\n\tpublic void testYGivenT() {\n\t\t\n\t\tdouble y1 = 0, y2 = 7.6, y3 = 5.38, y4 = 3.76;\n\t\tdouble v0 = 25;\n\t\tdouble theta = 30;\n\t\tdouble t1 = 0, t2 = 1, t3 = 2, t4 = 2.2;\n\t\tassertEquals(PhysicsEngine.findYPos(v0, theta, t1, 0), y1, DELTA);\n\t\tassertEquals(PhysicsEngine.findYPos(v0, theta, t2, 0), y2, DELTA);\n\t\tassertEquals(PhysicsEngine.findYPos(v0, theta, t3, 0), y3, DELTA);\n\t\tassertEquals(PhysicsEngine.findYPos(v0, theta, t4, 0), y4, DELTA);\n\t\t\n\t\tdouble y5 = 0, y6 = 27.47, y7 = 45.13, y8 = 47.48;\n\t\tdouble v1 = 38.6;\n\t\tdouble phi = 57;\n\t\tassertEquals(PhysicsEngine.findYPos(v1, phi, t1, 0), y5, DELTA);\n\t\tassertEquals(PhysicsEngine.findYPos(v1, phi, t2, 0), y6, DELTA);\n\t\tassertEquals(PhysicsEngine.findYPos(v1, phi, t3, 0), y7, DELTA);\n\t\tassertEquals(PhysicsEngine.findYPos(v1, phi, t4, 0), y8, DELTA);\n\t}", "public double getYDirection() {\r\n return Math.sin(Math.toRadians(angle));\r\n }", "AxisOrientation getAxisOrientation();", "public void reverseDirectionY()\n\t{\n\t\t\n\t\tvy = -vy;\n\t}", "protected void setYWithinBounds(double y) {\n\t\tif (getWorld() != null && (y < 0 || y >= getWorld().getWorldHeight()))\n\t\t\t\tterminate();\n\t\tsetY(Math.max(y, 0));\n\t}", "public static native long GetRotation(long lpjFbxDualQuaternion);", "public godot.wire.Wire.Vector3 getY() {\n if (yBuilder_ == null) {\n return y_ == null ? godot.wire.Wire.Vector3.getDefaultInstance() : y_;\n } else {\n return yBuilder_.getMessage();\n }\n }", "public void setRotY(double rad) {\r\n setRot(rad, new Vector3d(0, 1, 0));\r\n }", "public String getYKey(){\n return getAxisKey(Axis.Y);\n }", "public interface AxisAngleBasics extends AxisAngleReadOnly, Orientation3DBasics, Clearable\n{\n /**\n * Gets the reference to the axis part of this axis-angle.\n *\n * @return the reference to the axis vector.\n */\n @Override\n UnitVector3DBasics getAxis();\n\n /**\n * Sets a new angle to this axis-angle.\n *\n * @param angle the new angle.\n */\n void setAngle(double angle);\n\n /**\n * Sets a new x-component for the axis of this axis-angle.\n *\n * @param x the new axis x-component.\n */\n default void setX(double x)\n {\n getAxis().setX(x);\n }\n\n /**\n * Sets a new y-component for the axis of this axis-angle.\n *\n * @param y the new axis y-component.\n */\n default void setY(double y)\n {\n getAxis().setY(y);\n }\n\n /**\n * Sets a new z-component for the axis of this axis-angle.\n *\n * @param z the new axis z-component.\n */\n default void setZ(double z)\n {\n getAxis().setZ(z);\n }\n\n /**\n * Sets the components of this axis-angle to represent a \"zero\" rotation. After calling the axis is\n * equal to {@link Axis3D#X} and the angle to 0.\n */\n @Override\n default void setToZero()\n {\n getAxis().set(Axis3D.X);\n setAngle(0.0);\n }\n\n /**\n * Sets the components of this axis-angle to {@link Double#NaN}.\n */\n @Override\n default void setToNaN()\n {\n getAxis().setToNaN();\n setAngle(Double.NaN);\n }\n\n /**\n * Tests if this axis-angle contains a {@link Double#NaN}.\n *\n * @return {@code true} if this axis-angle contains a {@link Double#NaN}, {@code false} otherwise.\n */\n @Override\n default boolean containsNaN()\n {\n return AxisAngleReadOnly.super.containsNaN();\n }\n\n /**\n * Sets each component of this axis-angle to its absolute value.\n */\n default void absolute()\n {\n getAxis().absolute();\n setAngle(Math.abs(getAngle()));\n }\n\n /**\n * Negates each component of this axis-angle.\n */\n default void negate()\n {\n getAxis().negate();\n setAngle(-getAngle());\n }\n\n /** {@inheritDoc} */\n @Override\n default void invert()\n {\n setAngle(-getAngle());\n }\n\n /**\n * Normalizes the axis of this axis-angle such that its norm is equal to 1 after calling this method\n * and its direction remains unchanged.\n * <p>\n * Edge cases:\n * <ul>\n * <li>if this axis-angle contains {@link Double#NaN}, this method is ineffective.\n * </ul>\n * </p>\n */\n @Override\n default void normalize()\n {\n getAxis().normalize();\n }\n\n /**\n * Multiplies the angle of this axis-angle by the given {@code scale}.\n *\n * @param scale the scaling factor to apply to the angle of this axis-angle.\n */\n default void scaleAngle(double scale)\n {\n setAngle(scale * getAngle());\n }\n\n /**\n * Sets this axis-angle to represent a new rotation of axis ({@code x}, {@code y}, {@code z}) and\n * angle of {@code angle}.\n *\n * @param x x-component of the new axis.\n * @param y y-component of the new axis.\n * @param z z-component of the new axis.\n * @param angle the new angle.\n */\n default void set(double x, double y, double z, double angle)\n {\n getAxis().set(x, y, z);\n setAngle(angle);\n }\n\n /** {@inheritDoc} */\n @Override\n default void set(Orientation3DReadOnly orientation3DReadOnly)\n {\n if (orientation3DReadOnly instanceof AxisAngleReadOnly)\n set((AxisAngleReadOnly) orientation3DReadOnly);\n else\n orientation3DReadOnly.get(this);\n }\n\n /**\n * Sets the axis and the angle of this axis-angle.\n *\n * @param axis the new axis. Not modified.\n * @param angle the new angle.\n */\n default void set(Vector3DReadOnly axis, double angle)\n {\n getAxis().set(axis);\n setAngle(angle);\n }\n\n /**\n * Sets this axis-angle to the same value as the given axis-angle {@code other}.\n *\n * @param other the other axis-angle. Not modified.\n */\n default void set(AxisAngleReadOnly other)\n {\n getAxis().set(other.getAxis());\n setAngle(other.getAngle());\n }\n\n /**\n * Sets this axis-angle to {@code other} and then calls {@link #negate()}.\n *\n * @param other the other axis-angle to copy the values from. Not modified.\n */\n default void setAndNegate(AxisAngleReadOnly other)\n {\n set(other);\n negate();\n }\n\n /**\n * Copies the values in the given array into this axis-angle as follows:\n * <ul>\n * <li>{@code this.setX(axisAngleArray[0]);}\n * <li>{@code this.setY(axisAngleArray[1]);}\n * <li>{@code this.setZ(axisAngleArray[2]);}\n * <li>{@code this.setAngle(axisAngleArray[3]);}\n * </ul>\n *\n * @param axisAngleArray the array containing the new values for this axis-angle. Not modified.\n */\n default void set(double[] axisAngleArray)\n {\n set(0, axisAngleArray);\n }\n\n /**\n * Copies the values in the given array into this axis-angle as follows:\n * <ul>\n * <li>{@code this.setX(axisAngleArray[startIndex + 0]);}\n * <li>{@code this.setY(axisAngleArray[startIndex + 1]);}\n * <li>{@code this.setZ(axisAngleArray[startIndex + 2]);}\n * <li>{@code this.setAngle(axisAngleArray[startIndex + 3]);}\n * </ul>\n *\n * @param startIndex the first index to start reading from in the array.\n * @param axisAngleArray the array containing the new values for this axis-angle. Not modified.\n */\n default void set(int startIndex, double[] axisAngleArray)\n {\n setX(axisAngleArray[startIndex++]);\n setY(axisAngleArray[startIndex++]);\n setZ(axisAngleArray[startIndex++]);\n setAngle(axisAngleArray[startIndex]);\n }\n\n /**\n * Copies the values in the given array into this axis-angle as follows:\n * <ul>\n * <li>{@code this.setX(axisAngleArray[0]);}\n * <li>{@code this.setY(axisAngleArray[1]);}\n * <li>{@code this.setZ(axisAngleArray[2]);}\n * <li>{@code this.setAngle(axisAngleArray[3]);}\n * </ul>\n *\n * @param axisAngleArray the array containing the new values for this axis-angle. Not modified.\n */\n default void set(float[] axisAngleArray)\n {\n set(0, axisAngleArray);\n }\n\n /**\n * Copies the values in the given array into this axis-angle as follows:\n * <ul>\n * <li>{@code this.setX(axisAngleArray[startIndex + 0]);}\n * <li>{@code this.setY(axisAngleArray[startIndex + 1]);}\n * <li>{@code this.setZ(axisAngleArray[startIndex + 2]);}\n * <li>{@code this.setAngle(axisAngleArray[startIndex + 3]);}\n * </ul>\n *\n * @param startIndex the first index to start reading from in the array.\n * @param axisAngleArray the array containing the new values for this axis-angle. Not modified.\n */\n default void set(int startIndex, float[] axisAngleArray)\n {\n setX(axisAngleArray[startIndex++]);\n setY(axisAngleArray[startIndex++]);\n setZ(axisAngleArray[startIndex++]);\n setAngle(axisAngleArray[startIndex]);\n }\n\n /** {@inheritDoc} */\n @Override\n default void setAxisAngle(double x, double y, double z, double angle)\n {\n set(x, y, z, angle);\n }\n\n /** {@inheritDoc} */\n @Override\n default void setQuaternion(double x, double y, double z, double s)\n {\n AxisAngleConversion.convertQuaternionToAxisAngle(x, y, z, s, this);\n }\n\n /** {@inheritDoc} */\n @Override\n default void setRotationVector(double x, double y, double z)\n {\n AxisAngleConversion.convertRotationVectorToAxisAngle(x, y, z, this);\n }\n\n /** {@inheritDoc} */\n @Override\n default void setYawPitchRoll(double yaw, double pitch, double roll)\n {\n AxisAngleConversion.convertYawPitchRollToAxisAngle(yaw, pitch, roll, this);\n }\n\n /** {@inheritDoc} */\n @Override\n default void setRotationMatrix(double m00, double m01, double m02, double m10, double m11, double m12, double m20, double m21, double m22)\n {\n AxisAngleConversion.convertMatrixToAxisAngle(m00, m01, m02, m10, m11, m12, m20, m21, m22, this);\n }\n\n @Override\n default void setToYawOrientation(double yaw)\n {\n getAxis().set(Axis3D.Z);\n setAngle(yaw);\n }\n\n @Override\n default void setToPitchOrientation(double pitch)\n {\n getAxis().set(Axis3D.Y);\n setAngle(pitch);\n }\n\n @Override\n default void setToRollOrientation(double roll)\n {\n getAxis().set(Axis3D.X);\n setAngle(roll);\n }\n\n /**\n * Selects a component of this axis-angle based on {@code index} and sets it to {@code value}.\n * <p>\n * For {@code index} values of 0, 1, and 2, the corresponding components are x, y, and z,\n * respectively, while 3 corresponds to the angle.\n * </p>\n *\n * @param index the index of the component to set.\n * @param value the new value of the selected component.\n * @throws IndexOutOfBoundsException if {@code index} &notin; [0, 3].\n */\n default void setElement(int index, double value)\n {\n switch (index)\n {\n case 0:\n setX(value);\n break;\n case 1:\n setY(value);\n break;\n case 2:\n setZ(value);\n break;\n case 3:\n setAngle(value);\n break;\n default:\n throw new IndexOutOfBoundsException(Integer.toString(index));\n }\n }\n\n /**\n * Multiplies this axis-angle by {@code other}.\n * <p>\n * this = this * other\n * </p>\n *\n * @param other the other axis-angle to multiply this. Not modified.\n */\n default void multiply(AxisAngleReadOnly other)\n {\n AxisAngleTools.multiply(this, other, this);\n }\n\n /** {@inheritDoc} */\n @Override\n default void append(Orientation3DReadOnly other)\n {\n AxisAngleTools.multiply(this, false, other, false, this);\n }\n\n /**\n * Sets this axis-angle to the multiplication of {@code aa1} and {@code aa2}.\n * <p>\n * this = aa1 * aa2\n * </p>\n *\n * @param aa1 the first axis-angle in the multiplication. Not modified.\n * @param aa2 the second axis-angle in the multiplication. Not modified.\n */\n default void multiply(AxisAngleReadOnly aa1, AxisAngleReadOnly aa2)\n {\n AxisAngleTools.multiply(aa1, aa2, this);\n }\n\n /**\n * Multiplies this axis-angle by the inverse of {@code other}.\n * <p>\n * this = this * other<sup>-1</sup>\n * </p>\n *\n * @param other the other axis-angle to multiply this. Not modified.\n */\n default void multiplyInvertOther(AxisAngleReadOnly other)\n {\n AxisAngleTools.multiplyInvertRight(this, other, this);\n }\n\n /** {@inheritDoc} */\n @Override\n default void appendInvertOther(Orientation3DReadOnly orientation)\n {\n AxisAngleTools.multiply(this, false, orientation, true, this);\n }\n\n /**\n * Sets this axis-angle to the multiplication of the inverse of {@code this} and {@code other}.\n * <p>\n * this = this<sup>-1</sup> * other\n * </p>\n *\n * @param other the other axis-angle to multiply this. Not modified.\n */\n default void multiplyInvertThis(AxisAngleReadOnly other)\n {\n AxisAngleTools.multiplyInvertLeft(this, other, this);\n }\n\n /**\n * Sets this axis-angle to the multiplication of the inverse of {@code this} and the inverse of\n * {@code other}.\n * <p>\n * this = this<sup>-1</sup> * other<sup>-1</sup>\n * </p>\n *\n * @param other the other axis-angle to multiply this. Not modified.\n */\n default void multiplyInvertBoth(AxisAngleReadOnly other)\n {\n AxisAngleTools.multiplyInvertBoth(this, other, this);\n }\n\n /**\n * Appends a rotation about the z-axis to this axis-angle.\n *\n * <pre>\n * / ux = 0 \\\n * this = this * | uy = 0 |\n * | uz = 1 |\n * \\ angle = yaw /\n * </pre>\n *\n * @param yaw the angle to rotate about the z-axis.\n */\n @Override\n default void appendYawRotation(double yaw)\n {\n AxisAngleTools.appendYawRotation(this, yaw, this);\n }\n\n /**\n * Appends a rotation about the y-axis to this axis-angle.\n *\n * <pre>\n * / ux = 0 \\\n * this = this * | uy = 1 |\n * | uz = 0 |\n * \\ angle = pitch /\n * </pre>\n *\n * @param pitch the angle to rotate about the y-axis.\n */\n @Override\n default void appendPitchRotation(double pitch)\n {\n AxisAngleTools.appendPitchRotation(this, pitch, this);\n }\n\n /**\n * Appends a rotation about the x-axis to this axis-angle.\n *\n * <pre>\n * / ux = 1 \\\n * this = this * | uy = 0 |\n * | uz = 0 |\n * \\ angle = roll /\n * </pre>\n *\n * @param roll the angle to rotate about the x-axis.\n */\n @Override\n default void appendRollRotation(double roll)\n {\n AxisAngleTools.appendRollRotation(this, roll, this);\n }\n\n /**\n * Pre-multiplies this axis-angle by {@code other}.\n * <p>\n * this = other * other\n * </p>\n *\n * @param other the other axis-angle to multiply this. Not modified.\n */\n default void preMultiply(AxisAngleReadOnly other)\n {\n AxisAngleTools.multiply(other, this, this);\n }\n\n /** {@inheritDoc} */\n @Override\n default void prepend(Orientation3DReadOnly orientation)\n {\n AxisAngleTools.multiply(orientation, false, this, false, this);\n }\n\n /**\n * Sets this axis-angle to the multiplication of the inverse of {@code other} and {@code this}.\n * <p>\n * this = other<sup>-1</sup> * this\n * </p>\n *\n * @param other the other axis-angle to multiply this. Not modified.\n */\n default void preMultiplyInvertOther(AxisAngleReadOnly other)\n {\n AxisAngleTools.multiplyInvertLeft(other, this, this);\n }\n\n /** {@inheritDoc} */\n @Override\n default void prependInvertOther(Orientation3DReadOnly orientation)\n {\n AxisAngleTools.multiply(orientation, true, this, false, this);\n }\n\n /**\n * Sets this axis-angle to the multiplication of {@code other} and the inverse of {@code this}.\n * <p>\n * this = other * this<sup>-1</sup>\n * </p>\n *\n * @param other the other axis-angle to multiply this. Not modified.\n */\n default void preMultiplyInvertThis(AxisAngleReadOnly other)\n {\n AxisAngleTools.multiplyInvertRight(other, this, this);\n }\n\n /**\n * Sets this axis-angle to the multiplication of the inverse of {@code other} and the inverse of\n * {@code this}.\n * <p>\n * this = other<sup>-1</sup> * this<sup>-1</sup>\n * </p>\n *\n * @param other the other axis-angle to multiply this. Not modified.\n */\n default void preMultiplyInvertBoth(AxisAngleReadOnly other)\n {\n AxisAngleTools.multiplyInvertBoth(other, this, this);\n }\n\n /**\n * Prepends a rotation about the z-axis to this axis-angle.\n *\n * <pre>\n * / ux = 0 \\\n * this = | uy = 0 | * this\n * | uz = 1 |\n * \\ angle = yaw /\n * </pre>\n *\n * @param yaw the angle to rotate about the z-axis.\n */\n @Override\n default void prependYawRotation(double yaw)\n {\n AxisAngleTools.prependYawRotation(yaw, this, this);\n }\n\n /**\n * Prepends a rotation about the y-axis to this axis-angle.\n *\n * <pre>\n * / ux = 0 \\\n * this = | uy = 1 | * this\n * | uz = 0 |\n * \\ angle = pitch /\n * </pre>\n *\n * @param pitch the angle to rotate about the y-axis.\n */\n @Override\n default void prependPitchRotation(double pitch)\n {\n AxisAngleTools.prependPitchRotation(pitch, this, this);\n }\n\n /**\n * Prepends a rotation about the x-axis to this axis-angle.\n *\n * <pre>\n * / ux = 1 \\\n * this = | uy = 0 | * this\n * | uz = 0 |\n * \\ angle = roll /\n * </pre>\n *\n * @param roll the angle to rotate about the x-axis.\n */\n @Override\n default void prependRollRotation(double roll)\n {\n AxisAngleTools.prependRollRotation(roll, this, this);\n }\n}", "public DynamicCuboid setSizeY(float y) {\n this.sizeY = y;\n return this;\n }", "public void setY(double y)\r\n\t{\t\r\n\t\tvirtualDxfPoint.setTransformationY(y);\r\n\t\tAnchor.setY(y);\r\n\t}", "@SuppressWarnings(\"unchecked\")\n public AnimatorType y(float y)\n {\n addTransformer(new YTransformer(getShape(), y));\n return (AnimatorType) this;\n }", "public static Transform newZRotation(float th){\n float sinth = (float) Math.sin(th);\n float costh = (float) Math.cos(th);\n return new Transform(new float[][]{\n {costh, -sinth, 0.0f, 0.0f},\n {sinth, costh, 0.0f, 0.0f},\n {0.0f, 0.0f, 1.0f, 0.0f},\n {0.0f, 0.0f, 0.0f, 1.0f}\n });\n }", "@java.lang.Override\n public godot.wire.Wire.Vector3 getY() {\n return y_ == null ? godot.wire.Wire.Vector3.getDefaultInstance() : y_;\n }", "public Bearing reverse() {\n return Bearing.get( (this.bearing + 4) % 8);\n }", "public void setStandardY(double y)\n {\n standardy=y; \n }", "public SVGLength getY() {\n return y;\n }", "private float genY(float x) {\r\n x = Math.abs(x);\r\n if (_rand.nextBoolean()) {\r\n return x * (float)Math.tan(Math.acos(x/20.0));\r\n } else {\r\n return -x * (float)Math.tan(Math.acos(x/20.0));\r\n }\r\n }", "public void testZAxisRotation() {\n w = 1;\n theta = 2*pi;\n double[] point = new double[] {1, 1, 0};\n RotationMatrix rM = new RotationMatrix(a, b, c, u, v, w, theta);\n double[] result = rM.timesXYZ(point);\n double[] expect = new double[] {1, 1, 0, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(expect[i], result[i], TOLERANCE);\n }\n\n theta = pi;\n rM = new RotationMatrix(a, b, c, u, v, w, theta);\n //rM.logMatrix();\n result = rM.timesXYZ(point);\n expect = new double[] {-1, -1, 0, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(\"coord: \"+i, expect[i], result[i], TOLERANCE);\n }\n\n theta = pi/2;\n rM = new RotationMatrix(a, b, c, u, v, w, theta);\n //rM.logMatrix();\n result = rM.timesXYZ(point);\n expect = new double[] {-1, 1, 0, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(\"coord: \"+i, expect[i], result[i], TOLERANCE);\n }\n\n theta = pi/4;\n rM = new RotationMatrix(a, b, c, u, v, w, theta);\n result = rM.timesXYZ(point);\n expect = new double[] {0, Math.sqrt(2), 0, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(\"coord: \"+i, expect[i], result[i], TOLERANCE);\n }\n\n theta = 3*pi/4;\n rM = new RotationMatrix(a, b, c, u, v, w, theta);\n result = rM.timesXYZ(point);\n expect = new double[] {-Math.sqrt(2), 0, 0, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(\"coord: \"+i, expect[i], result[i], TOLERANCE);\n }\n\n theta = -3*pi/4;\n rM = new RotationMatrix(a, b, c, u, v, w, theta);\n result = rM.timesXYZ(point);\n expect = new double[] {0, -Math.sqrt(2), 0, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(\"coord: \"+i, expect[i], result[i], TOLERANCE);\n }\n }", "boolean hasYAxisCharacteristicId();", "private com.google.protobuf.SingleFieldBuilderV3<\n godot.wire.Wire.Vector3, godot.wire.Wire.Vector3.Builder, godot.wire.Wire.Vector3OrBuilder> \n getYFieldBuilder() {\n if (yBuilder_ == null) {\n yBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<\n godot.wire.Wire.Vector3, godot.wire.Wire.Vector3.Builder, godot.wire.Wire.Vector3OrBuilder>(\n getY(),\n getParentForChildren(),\n isClean());\n y_ = null;\n }\n return yBuilder_;\n }", "double deltaY() {\n return Math.sin(Math.toRadians(this.theta)) * this.length;\n }", "public static TreapNode rightRotate(TreapNode y)\n {\n TreapNode x = y.left, T2 = x.right;\n\n // Perform rotation\n x.right = y;\n y.left = T2;\n\n // Return new root\n return x;\n }", "public Quaternion(final float x, final float y, final float z, final float w)\n {\n this.x = x;\n this.y = y;\n this.z = z;\n this.w = w;\n }", "public double getRotation();", "public double getYawAngle () {\n return gyro.getAngle() * Math.PI / 180; //Convert the angle to radians.\n }", "public float getAlignmentY() { return 0.5f; }", "protected NumberAxis createVAxis() {\n NumberAxis yAxis = new NumberAxis(0, 55, 5);\n //yAxis.setLabel(\"Price\");\n yAxis.setSide(Side.RIGHT);\n yAxis.setTickMarkVisible(false);\n yAxis.setMinorTickVisible(false);\n return yAxis;\n }", "public DynamicCuboid setExtraY(float y) {\n this.extraY = y;\n return this;\n }", "@Override\n default void appendYawRotation(double yaw)\n {\n AxisAngleTools.appendYawRotation(this, yaw, this);\n }", "int getMaxRotation();", "public godot.wire.Wire.Vector3OrBuilder getYOrBuilder() {\n if (yBuilder_ != null) {\n return yBuilder_.getMessageOrBuilder();\n } else {\n return y_ == null ?\n godot.wire.Wire.Vector3.getDefaultInstance() : y_;\n }\n }", "public void SetY2()\n\t{\n\t\tdouble h;\n\t\th = Math.pow(this.length, 2) - Math.pow((this.length/2), 2);\n\t\th = Math.sqrt(h);\n\t\tthis.y[2] = this.y[0] - h;\n\t}", "public double getRotation2() {\n return rotation2;\n }", "public Builder setY(float value) {\n bitField0_ |= 0x00000002;\n y_ = value;\n onChanged();\n return this;\n }", "public Builder setY(float value) {\n bitField0_ |= 0x00000002;\n y_ = value;\n onChanged();\n return this;\n }" ]
[ "0.6027501", "0.59230834", "0.56047165", "0.52631956", "0.5194816", "0.5190343", "0.51507396", "0.51272875", "0.5115077", "0.5110006", "0.50854945", "0.50466144", "0.50335", "0.50306207", "0.5027091", "0.4995032", "0.499219", "0.49916148", "0.49714562", "0.49654278", "0.49404356", "0.4903728", "0.4881457", "0.48803338", "0.48665482", "0.48435137", "0.48355108", "0.48078516", "0.47996876", "0.47957087", "0.47924238", "0.47916222", "0.47718558", "0.47703555", "0.47636762", "0.47563955", "0.4755255", "0.47486", "0.4741377", "0.47386104", "0.4738551", "0.47338468", "0.47309348", "0.47308025", "0.4715839", "0.47149518", "0.46958336", "0.46915507", "0.46835202", "0.46715724", "0.46620756", "0.4660875", "0.4649604", "0.46478522", "0.4644779", "0.4642951", "0.46390414", "0.4633549", "0.46098164", "0.46087965", "0.46019772", "0.45964074", "0.45909208", "0.4588437", "0.45702347", "0.4545889", "0.45436445", "0.45364282", "0.45349118", "0.4531968", "0.45284322", "0.4528178", "0.45226645", "0.45204237", "0.4507851", "0.44925386", "0.44848648", "0.44846544", "0.4474641", "0.44706473", "0.4469573", "0.44678074", "0.44672337", "0.44654712", "0.44628787", "0.44596124", "0.4451612", "0.44465175", "0.44464582", "0.44380367", "0.4436905", "0.44327584", "0.44324535", "0.443188", "0.4430697", "0.44269675", "0.44196686", "0.44162673", "0.44113865", "0.44113865" ]
0.5099024
10
Creates a new point that is restricted to the XZplane.
public static Point3DBasics newXZOnlyPoint3DBasics() { return new Point3DBasics() { private double x, z; @Override public double getX() { return x; } @Override public double getY() { return 0.0; } @Override public double getZ() { return z; } @Override public void setX(double x) { this.x = x; } @Override public void setY(double y) { } @Override public void setZ(double z) { this.z = z; } @Override public String toString() { return EuclidCoreIOTools.getTuple3DString(this); } }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Point createPoint();", "public Point( Double x, Double y, Double z ) {\n this.x = x;\n this.y = y;\n this.z = z;\n\n keepExtent();\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}", "public static Vect3 mkXYZ(double x, double y, double z) {\n\t\treturn new Vect3(x,y,z);\n\t}", "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 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 }", "Coordinate createCoordinate();", "Viewpoint createViewpoint();", "public static Point createPoint(double x, double y) {\n Point point = new Point();\n point.setX(x);\n point.setY(y);\n\n return point;\n }", "public Point transform(double x, double y, double z) {\n\t\t\n\t\n\t\tdouble uIso = (x * xToU) + (y * yToU) + (z * zToU);\n\t\tdouble vIso = (x * xToV) + (y * yToV) + (z * zToV);\n\t\t\n\t\tint uDraw = xOffset + (int)(scale * uIso);\n\t\tint vDraw = yOffset + (int)(scale * vIso);\n\t\t\n\t\treturn new Point(uDraw, vDraw);\n\t}", "public GeoPoint(Geometry geometry, Point3D point) {\n\tsuper();\n\tthis.geometry = geometry;\n\tthis.point = point;\n}", "protected abstract BaseVector3d createBaseVector3d(double x, double y, double z);", "public PointImpl( double x, double y, double z, CoordinateSystem crs ) {\n super( crs );\n position = new PositionImpl( x, y, z );\n empty = false;\n centroid = this;\n }", "public static Coordinate create3D(double x, double y, double z) {\r\n return new Coordinate(x, y, z, Double.NaN);\r\n }", "private void createXVertices() {\n\n\t\tfor (int i = 0; i < this.numXVertices; i++) {\n\t\t\t// determine external degree -- random number between d_0 and d_1\n\t\t\tint upperBoundAdjusted = this.d1 - this.d0; // Shift to 0 so that the randomGen can be used\n\t\t\tint externalDegree = this.randomGen(upperBoundAdjusted) + this.d0; // Shift back for a degree within the\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// range\n\t\t\tvertices.add(new XVertex('x', this.countXID++, externalDegree));\n\t\t}\n\t}", "public Plane() {\r\n\t\tvecX = new Vector3D();\r\n\t\tvecY = new Vector3D();\r\n\t\tnorm = new Vector3D();\r\n\t\tthis.setD(0);\r\n\t\tpos = new Position3D();\r\n\t}", "public abstract APoint3<DataType> newOffset(DataType x, DataType y, DataType z);", "public void moveToPoint(double x, double y, double z);", "public Point(Vector position) {\n\t\tthis(position, 5.0);\n\t}", "private void CreaCoordinate(){\n \n this.punto = new Point(80, 80);\n \n }", "Point3D (double x, double y, double z) {\n this.x = x;\n this.y = y;\n this.z = z;\n }", "public BSimVertex(double newX, double newY, double newZ){\r\n\t\tVector3d newLocation = new Vector3d(newX,newY,newZ);\r\n\t\tlocation = newLocation;\r\n\t}", "void turnToPoint(float x, float y) {\n _rotVector.set(x - _x, y - _y, 0);\n _rotVector.setMag(1);\n }", "public Vec3D(Point3D point) {\n\t\tx = point.x;\n\t\ty = point.y;\n\t\tz = point.z;\n\t}", "public double getPlaneX()\n {\n return planeX;\n }", "Point() {\n\t\tthis.x = 0;\n\t\tthis.y = 0;\n\t}", "public Vector(Coordinate x, Coordinate y, Coordinate z) {\n this(new Point3D(x, y, z));\n }", "public void addPoint(double x, double y, double z);", "public zCoordinates(int x, int y){\n this.x = x;\n this.y = y;\n }", "Point() {\n this.x = 0;\n this.y = 0;\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}", "Point(Double x, Double y) {\n\t\tthis.setX(x);\n\t\tthis.setY(y);\n\t}", "public Point3D(Point3D point) {\n\t this.x = point.x;\n\t this.y = point.y;\n\t this.z = point.z;\n }", "public Point(){\n this.x = 0;\n this.y = 0;\n }", "public Vector(double x, double y, double z) {\n this(new Point3D(x, y, z));\n }", "public void setX(double point) {\n this.x = point;\n }", "public Plane(Point spawnPoint, boolean flyingHorizontally, Level parentLevel){\n // Initialize the variables for the plane\n this.flyingHorizontally = flyingHorizontally;\n this.drawOps = new DrawOptions();\n this.planeImage = new Image(\"res/images/airsupport.png\");\n this.parentLevel = parentLevel;\n this.isFinished = false;\n this.bombs = new ArrayList<>();\n\n // Initialize the timekeeper that will control when a bomb should be dropped\n // '1' is added to the RNG here as the upper bound is not inclusive\n int initialDropTime = ThreadLocalRandom.current().nextInt(DROP_TIME_LOWER_BOUND,DROP_TIME_UPPER_BOUND + 1);\n this.bombDropper = new Timekeeper(initialDropTime);\n this.justDropped = false;\n // The Plane can either fly horizontally or vertically, which is specified in its constructor\n if (flyingHorizontally){\n // Set the plane facing to the right, at the leftmost point of the window and at the correct\n // height given by the spawn position\n this.currPos = new Point(0, spawnPoint.y);\n this.drawOps.setRotation(Math.PI/2);\n this.flyingHorizontally = true;\n }\n else {\n // Set the plane facing downward, at the top of the window and at the correct\n // x co-ordinate given by the spawn position\n this.currPos = new Point(spawnPoint.x, 0);\n this.drawOps.setRotation(Math.PI);\n this.flyingHorizontally = false;\n }\n }", "public static Vect3 mk(double x, double y, double z) {\n\t\treturn new Vect3(x,y,z);\n\t}", "public Point() {\n\t\tthis.x = 0;\n\t\tthis.y = 0;\n\t}", "void addHasXCoordinate(Object newHasXCoordinate);", "@Override\r\n\tpublic WB_Normal3d addAndCopy(final double x, final double y, final double z) {\r\n\t\treturn new WB_Normal3d(this.x + x, this.y + y, this.z + z);\r\n\t}", "public Point evaluate(double x, double y, double z) {\n\t\t// x=(-(yn(y-y0)+zn(z-z0))+xn*x0)/xn\n\t\tif (x != x) {\n\t\t\tx = (-(normal.y * (y - origin.y) + normal.z * (z - origin.z)) + normal.x\n\t\t\t\t\t* origin.x)\n\t\t\t\t\t/ normal.x;\n\t\t\treturn new Point(x, y, z);\n\t\t} else if (y != y) {\n\t\t\ty = (-(normal.x * (x - origin.x) + normal.z * (z - origin.z)) + normal.y\n\t\t\t\t\t* origin.y)\n\t\t\t\t\t/ normal.y;\n\t\t\treturn new Point(x, y, z);\n\t\t} else if (z != z) {\n\t\t\tz = (-(normal.y * (y - origin.y) + normal.x * (x - origin.x)) + normal.z\n\t\t\t\t\t* origin.z)\n\t\t\t\t\t/ normal.z;\n\t\t\treturn new Point(x, y, z);\n\t\t}\n\t\treturn null;\n\t}", "public void setPointX(int pointX) {\n this.pointX = pointX;\n }", "public XYPointFloat()\r\n\t{\r\n\t\tthis(0, 0);\r\n\t}", "public Point3D(double x,double y,double z)\n {\n _x=x;\n _y=y;\n _z=z;\n }", "Point(int x_, int y_){\n x = x_;\n y = y_;\n }", "public void place(float x,float y,float z){\n\t\tthis.x=x;\r\n\t\tthis.y=y;\r\n\t\tthis.z=z;\r\n\t\tdx=x;\r\n\t\tdy=y;\r\n\t\tvz=0;\r\n\t\tvx=0;\r\n\t\tvy=0;\r\n\t}", "public Point(Point point) {\n this.x = point.x;\n this.y = point.y;\n }", "public MyPoint1 (double x, double y) {}", "final public Vector3 x(final Vector3 v){\n if(v == null){\n throw new IllegalArgumentException(\"v must not be null\");\n }\n return new Vector3((y*v.z)-(z*v.y), (z*v.x)-(x*v.z), (x*v.y)-(y*v.x)); \n }", "@Override\r\n\tpublic Point clone() {\r\n\t\tPoint p = new RotatedPoint(this.geoObjectLabel, this.originalPoint, this.centerOfRotation, this.degAngleMeasure);\r\n\t\t\r\n\t\tif (this.getX() != null)\r\n\t\t\tp.setX((UXVariable) this.getX().clone());\r\n\t\tif (this.getY() != null)\r\n\t\t\tp.setY((UXVariable) this.getY().clone());\r\n\t\tp.setInstanceType(this.instanceType);\r\n\t\tp.setPointState(this.pointState);\r\n\t\tp.setConsProtocol(this.consProtocol);\r\n\t\tp.setIndex(this.index);\r\n\t\t\r\n\t\treturn p;\r\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 void NewX(double x){\n\t\tthis.x = x;\n\t}", "public NurbsPoint getYforXZ(double x, double z) {\n\n double u = 0.0;\n double v = 0.0;\n double mystep = 0.01;\n NurbsPoint p;\n int i = 0;\n int j = points_per_segment / 2;\n\n // this works only for a rectangular mesh, fix later...\n do {\n u = u + mystep;\n if (u >= 1.0) {\n u = 0.0;\n i = i + 1;\n }\n\n p = get_point_on_surface(i, j, u, v);\n\n } while (p.x <= x && i < nr_of_segments - 1);\n\n do {\n v = v + mystep;\n if (v >= 1.0) {\n v = 0.0;\n j = j + 1;\n }\n\n p = get_point_on_surface(i, j, u, v);\n\n } while (Math.abs(p.z) <= Math.abs(z) && j < points_per_segment);\n\n p.i = i;\n p.j = j;\n p.u = u;\n p.v = v;\n\n return p;\n\n }", "void addHasZCoordinate(Object newHasZCoordinate);", "public Vector(Point point) {\n\t\tthis(point.x, point.y);\n\t}", "public PointImpl( CoordinateSystem crs ) {\n super( crs );\n position = new PositionImpl();\n empty = true;\n centroid = this;\n }", "int addPoint(float x, float y, float z) {\r\n\tint _npoints = npoints;\r\n\tint index = super.addPoint(x, y, z);\r\n\r\n\t// if we have added a new point we must copy it to locals\r\n\tif (npoints > _npoints) {\r\n\r\n\t if (locals == null) {\r\n\t\tlocals = new float[maxpoints * 3];\r\n\t } else if (index >= locals.length) {\r\n\t\t//double array size\r\n\t\tfloat[] qs = new float[locals.length * 2];\r\n\t\tSystem.arraycopy(locals, 0, qs, 0, locals.length);\r\n\t\tlocals = qs;\r\n\t }\r\n\r\n\t locals[index] = ps[index];\r\n\t locals[index + 1] = ps[index + 1];\r\n\t locals[index + 2] = ps[index + 2];\r\n\t}\r\n\treturn index;\r\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 FieldPoint(double x, double y) {\n setX(x);\n setY(y);\n }", "Position createPosition();", "public DynamicCuboid setXYZ(float x, float y, float z) {\n return this.setX(x).setY(y).setZ(z);\n }", "protected Place(float x, float y) {\n position = new PointF(x, y);\n }", "public static com.topcoder.diagraminterchange.Point createDiagramInterchangePoint(int x, int y) {\n com.topcoder.diagraminterchange.Point pt = new com.topcoder.diagraminterchange.Point();\n pt.setX(x);\n pt.setY(y);\n return pt;\n }", "public Position(double x, double y, double z) {\n xCoord = x;\n yCoord = y;\n zCoord = 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}", "void position(double x, double y, double z);", "public Point3F(float x, float y, float z) {\n this.x = x;\n this.y = y;\n this.z = z;\n }", "public org.astrogrid.stc.coords.v1_10.beans.Double3Type addNewPoint()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.astrogrid.stc.coords.v1_10.beans.Double3Type target = null;\n target = (org.astrogrid.stc.coords.v1_10.beans.Double3Type)get_store().add_element_user(POINT$0);\n return target;\n }\n }", "private void positionObjectInScene(float x, float y, float z) {\n setIdentityM(modelMatrix, 0);\n translateM(modelMatrix, 0, x, y, z);\n multiplyMM(modelViewProjectionMatrix, 0, viewProjectionMatrix,\n 0, modelMatrix, 0);\n }", "public static Vect3 make(double x, double y, double z) {\n\t\treturn new Vect3(Units.from(\"NM\",x),Units.from(\"NM\",y),Units.from(\"ft\",z));\n\t}", "public PaperAirplane (int x, int y)\n\t{\n\t\tsuper (x, y);\t//Superclass called to set x and y\n\t\t\n\t\txPoints = new int [3];\t//sets xPoints to have 3 elements\n\t\tyPoints = new int [3];\t//sets yPoints to have 3 elements\n\t\t\n\t\t//Using the getX_Pos () set in the superclass, the following sets the\n\t\t//xDimensions.\n\t\txDimension1 = getX_Pos () - 23;\n\t\txDimension2 = getX_Pos () - 18;\n\t\txDimension3 = getX_Pos () + 22;\n\t\t\n\t\t//Using the getY_Pos () set in the superclass, the following sets the\n\t\t//yDimensions.\n\t\tyDimension1 = getY_Pos() - 2;\n\t\tyDimension2 = getY_Pos() - 17;\n\t\tyDimension3 = getY_Pos() + 5;\n\t\t\n\t\t//The following sets the same dimensions from above, but these never\n\t\t//change and can be used for reconstruction\n\t\trXD1 = getX_Pos () - 23;\n\t\trXD2 = getX_Pos () - 18;\n\t\trXD3 = getX_Pos () + 22;\n\t\trYD1 = getY_Pos() - 2;\n\t\trYD2 = getY_Pos() - 17;\n\t\trYD3 = getY_Pos() + 5;\n\t}", "public point(int a, int b, int c) {\n\t\t\t\tx = a;\n\t\t\t\ty = b;\n\t\t\t\tz = c;\n\t\t\t}", "protected Atom createXAtom() {\n \t\treturn new Atom();\n \t}", "public void setXCoordinates(double newX) { this.xCoordinates = newX; }", "public Point() {\n\t\tthis.hasSrsName = false;\n\t}", "public GLGraphics drawPoint(float x, float y) {\n\t\tif (isInvalid(x) || isInvalid(y))\n\t\t\treturn this;\n\t\tgl.glBegin(GL.GL_POINTS);\n\t\tgl.glVertex3f(x, y, z);\n\t\tgl.glEnd();\n\t\treturn this;\n\t}", "public Vector3 set (double x, double y, double z) {\n this.x = x;\n this.y = y;\n this.z = z;\n return this;\n }", "abstract void setOrigin(double x, double y, double z);", "public XYPointFloat(float x, float y)\r\n\t{\r\n\t\tthis.x = x;\r\n\t\tthis.y = y;\r\n\t}", "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}", "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 Point(float x, float y)\n {\n this.x = x;\n this.y = y;\n }", "public Point()\n\t{ \n\t\t// Instantiate default properties\n\t\tx = 0;\n\t\ty = 0;\n\t}", "public final Point3D setX(double x)\n {\n m_jso.setX(x);\n\n return this;\n }", "public Plane(Vector3D vecX, Vector3D vecY, Position3D pos) {\r\n\t\tthis.vecX = vecX.normalize();\r\n\t\tthis.vecY = this.vecX.perp(vecY).normalize();\r\n\t\tthis.norm = this.vecX.cross(this.vecY);\r\n\t\tthis.pos = pos;\r\n\t\tthis.setD(norm.dot(this.pos.toVec()));\r\n\t}", "Point clone ();", "private GoodPoint(double x, double y) {\n this.x = x;\n this.y = y;\n }", "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 static Point randomPoint() {\r\n\t\tString n = \"\" + (char) (65 + rand.nextInt(26));\r\n\t\tint x = rand.nextInt(11);\r\n\t\tint y = rand.nextInt(11);\r\n\t\treturn new Point(n, x, y);\r\n\t}", "public Point(double x, double y){\n\t\tsuper();\n\t\tthis.x = x; \n\t\tthis.y = y;\n\t}", "public Point3(double x_, double y_, double z_) {\n x = x_; y = y_; z = z_;\n }", "public VariablePoint2(){\n super(0, 0);\n x = 0;\n y = 0;\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 }", "List<Zone> getActiveZones(SpacedVector3 point);", "Vaisseau_positionner createVaisseau_positionner();", "private Vector3D(int x, int y, int z) {\n this(x, y, z, null);\n }", "public XzPair structurePosInRegion(long x, long z, long seed){\n rnd.setSeed((long) x * 341873128712L + (long)z * 132897987541L + seed + 10387313);\n return new XzPair((rnd.nextInt(27) + rnd.nextInt(27)) / 2 , (rnd.nextInt(27) + rnd.nextInt(27)) / 2);\n }", "public Point(double xCoordinate, double yCoordinate){\r\n\t\tthis.xCoordinate = xCoordinate;\r\n\t\tthis.yCoordinate = yCoordinate;\r\n\t}", "void setPosition (DVector3C xyz);" ]
[ "0.6426493", "0.59603995", "0.59109664", "0.5767576", "0.55889595", "0.5566304", "0.5535775", "0.55315435", "0.55082065", "0.55076784", "0.5478439", "0.54518515", "0.54358715", "0.5434988", "0.53895485", "0.5374796", "0.53737175", "0.53701", "0.53603315", "0.5350662", "0.53291875", "0.52908087", "0.52841073", "0.5271549", "0.52599245", "0.5243755", "0.5195377", "0.519059", "0.5185092", "0.51850903", "0.5174183", "0.51547515", "0.5141792", "0.51264006", "0.5107684", "0.5102868", "0.5100575", "0.5095218", "0.5075407", "0.50651807", "0.5063346", "0.50558096", "0.5055529", "0.50503534", "0.504151", "0.5033441", "0.502083", "0.5019951", "0.5017558", "0.50016767", "0.49996388", "0.49904296", "0.49886447", "0.49844733", "0.49759188", "0.4940233", "0.49396554", "0.49369287", "0.49266696", "0.4924916", "0.492241", "0.4903562", "0.49013612", "0.48951367", "0.48947158", "0.48885408", "0.48868865", "0.48849037", "0.48745435", "0.48680517", "0.486664", "0.4856741", "0.48563373", "0.4839685", "0.48374364", "0.4823436", "0.48223883", "0.48174286", "0.48153418", "0.48033276", "0.47992158", "0.4792101", "0.47892708", "0.47794524", "0.47763947", "0.47750103", "0.47723454", "0.47617474", "0.47591576", "0.4756363", "0.47452226", "0.4741421", "0.47414118", "0.47365502", "0.473456", "0.47306848", "0.4722836", "0.47205797", "0.47197676", "0.471892" ]
0.557356
5
Creates a vector that is restricted to the XZplane.
public static FixedFrameVector3DBasics newXZOnlyFixedFrameVector3DBasics(ReferenceFrame referenceFrame) { return new FixedFrameVector3DBasics() { private double x, z; @Override public ReferenceFrame getReferenceFrame() { return referenceFrame; } @Override public double getX() { return x; } @Override public double getY() { return 0.0; } @Override public double getZ() { return z; } @Override public void setX(double x) { this.x = x; } @Override public void setY(double y) { } @Override public void setZ(double z) { this.z = z; } @Override public String toString() { return EuclidCoreIOTools.getTuple3DString(this); } }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract BaseVector3d createBaseVector3d(double x, double y, double z);", "Vector getZeroVector();", "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 static Vect3 mkXYZ(double x, double y, double z) {\n\t\treturn new Vect3(x,y,z);\n\t}", "final public Vector3 x(final Vector3 v){\n if(v == null){\n throw new IllegalArgumentException(\"v must not be null\");\n }\n return new Vector3((y*v.z)-(z*v.y), (z*v.x)-(x*v.z), (x*v.y)-(y*v.x)); \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 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}", "public Vector(double x, double y, double z){\n double longueur = Math.sqrt(sqr(x) + sqr(y) + sqr(z));\n\n this.x = longueur > 0 ? x/longueur : this.x;\n this.y = longueur > 0 ? y/longueur : this.y;\n this.z = longueur > 0 ? z/longueur : this.z;\n \n }", "public Vector(Coordinate x, Coordinate y, Coordinate z) {\n this(new Point3D(x, y, z));\n }", "public Vector(double x, double y, double z) {\n this(new Point3D(x, y, z));\n }", "public Vector3D() {\n zero();\n }", "public double getPlaneX()\n {\n return planeX;\n }", "void vectorFromWorld(double px, double py, double pz, DVector3 result);", "public Plane() {\r\n\t\tvecX = new Vector3D();\r\n\t\tvecY = new Vector3D();\r\n\t\tnorm = new Vector3D();\r\n\t\tthis.setD(0);\r\n\t\tpos = new Position3D();\r\n\t}", "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 abstract Vector4fc zero();", "public ThreeVector unitVector() {\r\n\t\tif (this.magnitude()==0) { \r\n\t\t\treturn new ThreeVector(0,0,0);\r\n\t\t} else {\r\n\t\t\treturn new ThreeVector(this.x/this.magnitude(), this.y/this.magnitude(), this.z/this.magnitude());\r\n\t\t}\r\n\t}", "private boolean isVecInXZ(Vec3 vec) {\n\t\treturn vec == null ? false : vec.xCoord >= this.minX && vec.xCoord <= this.maxX && vec.zCoord >= this.minZ && vec.zCoord <= this.maxZ;\n\t}", "public Vector3 zeroed() {\n return new Vector3(zeroed(x), zeroed(y), zeroed(z));\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}", "private Vector3D(int x, int y, int z) {\n this(x, y, z, null);\n }", "public Vector3D() {\r\n\t\tthis(0.0);\r\n\t}", "public Vector(double x, double y, double z) {\n super(new double[][] {\n { x },\n { y },\n { z },\n { 1 }\n });\n }", "public VectorA scalarAdd(double z)\n {\n return new VectorA(this.x+z, this.y+z);\n }", "public Vector3D(double x, double y, double z) {\n this.x = x;\n this.y = y;\n this.z = z;\n }", "public static Vect3 make(double x, double y, double z) {\n\t\treturn new Vect3(Units.from(\"NM\",x),Units.from(\"NM\",y),Units.from(\"ft\",z));\n\t}", "private void createXVertices() {\n\n\t\tfor (int i = 0; i < this.numXVertices; i++) {\n\t\t\t// determine external degree -- random number between d_0 and d_1\n\t\t\tint upperBoundAdjusted = this.d1 - this.d0; // Shift to 0 so that the randomGen can be used\n\t\t\tint externalDegree = this.randomGen(upperBoundAdjusted) + this.d0; // Shift back for a degree within the\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// range\n\t\t\tvertices.add(new XVertex('x', this.countXID++, externalDegree));\n\t\t}\n\t}", "public Vector normalize(){\n\t\tdouble mag = magnitude();\n\t\treturn new Vector(x/mag, y/mag, z/mag);\n\t}", "public FXRequestVector( int maxFloor ) {\n this( \"Unnamed vector\", maxFloor );\n }", "public Vec3D() {\n\t\tx = y = z = 0.0f;\n\t}", "public static Vect3 mk(double x, double y, double z) {\n\t\treturn new Vect3(x,y,z);\n\t}", "public Vector deflectX() {\n\t\treturn new Vector(-deltaX, deltaY);\n\t}", "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 }", "@java.lang.Override\n public godot.wire.Wire.Vector3 getZ() {\n return z_ == null ? godot.wire.Wire.Vector3.getDefaultInstance() : z_;\n }", "public LorentzVector(LorentzVector vect){\n\t\tthis.vector = new Vector3(vect.px(), vect.py(), vect.pz());\n\t\tthis.energy = vect.e();\n\t}", "public Vector3D(double x, double y, double z) {\n this.xCoord = x;\n this.yCoord = y;\n this.zCoord = z;\n }", "VectorType11 getVector();", "public static Vector4 zero()\n {\n return new Vector4(0,0,0,0);\n }", "public abstract Vector4fc set(float x, float y, float z, float w);", "public godot.wire.Wire.Vector3 getZ() {\n if (zBuilder_ == null) {\n return z_ == null ? godot.wire.Wire.Vector3.getDefaultInstance() : z_;\n } else {\n return zBuilder_.getMessage();\n }\n }", "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 abstract Vector4fc rotateX(float angle);", "public Vector4d setZ(double z) {\n\t\tthis.z = z;\n\t\treturn this;\n\t}", "public Coordinates unitVector(Coordinates vector, Coordinates origin);", "public Vector produitVectorielle(Vector vec){\n return new Vector(y * vec.z - z * vec.y, z * vec.x - x * vec.z, x * vec.y - y * vec.x);\t\t\n }", "public Vector4d(double x, double y, double z, double w) {\n\t\tset(x, y, z, w);\n\t}", "void vectorToWorld(double px, double py, double pz, DVector3 result);", "public Vector3D(double x, double y, double z) {\r\n super(x, y, z);\r\n\t}", "private Vector(double x, double y){\n this.x = x;\n this.y = y;\n }", "public static Coordinate create3D(double x, double y, double z) {\r\n return new Coordinate(x, y, z, Double.NaN);\r\n }", "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 Vector(double x, double y, double z, double w) {\n super(new double[][] {\n { x },\n { y },\n { z },\n { w }\n });\n }", "public Coordinates unitVector(Coordinates vector);", "@java.lang.Override\n public godot.wire.Wire.Vector3 getX() {\n return x_ == null ? godot.wire.Wire.Vector3.getDefaultInstance() : x_;\n }", "godot.wire.Wire.Vector3 getZ();", "Vec(double x, double y) {\n this.x = x; this.y = y;\n }", "public VectorN getV()\n\t{\n\t\tVectorN out = new VectorN(3);\n\t\tout.x[0] = this.rv.x[3];\n\t\tout.x[1] = this.rv.x[4];\n\t\tout.x[2] = this.rv.x[5];\n\t\treturn out;\n\t}", "public static Vector fromCartesian(double x, double y){\n return new Vector(x, y);\n }", "public ImgMathVec(int x, int y) {\r\n\t\tv = new int[3];\r\n\t\tv[0] = x;\r\n\t\tv[1] = y;\r\n\t\tv[2] = 1;\r\n\t}", "public Vector3 () {\r\n\t\tx = 0;\r\n\t\ty = 0;\r\n\t\tz = 0;\r\n\t}", "@Override\r\n\tpublic WB_Normal3d addAndCopy(final double x, final double y, final double z) {\r\n\t\treturn new WB_Normal3d(this.x + x, this.y + y, this.z + z);\r\n\t}", "public Vector3f CubeToWorldVector(float pX, float pY, float pZ) {\n return new Vector3f((pX * this.blockScale) + (this.blockScale * 0.5f),(pY * this.blockScale) + this.blockScale,(pZ * this.blockScale) + (this.blockScale * 0.5f));\n }", "public Vector3 set (double x, double y, double z) {\n this.x = x;\n this.y = y;\n this.z = z;\n return this;\n }", "public Vector3(double x, double y, double z) {\n this.x = x; this.y = y; this.z = z;\n }", "public Vector at ( float x ) { return A.add(D.prod(x)); }", "public UniformVector() {\n super(3);\n this.min = new VectorN(3);\n this.max = new VectorN(1.0, 1.0, 1.0);\n this.idum = -1;\n this.rn = new RandomNumber(this.idum);\n fillVector();\n }", "public Vector(double x, double y){\n this.x=x;\n this.y=y;\n }", "public Vector3<T> build() {\n return new Vector3<>(x, y, z);\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 set(x, y, z);\n }", "public FloatVector3D(){}", "public FloatVector3D(float x, float y, float z)\n {\n fx = x;\n fy = y;\n fz = z;\n setMagnitude();\n }", "public Vector scalar(double scalar) {\n return new Vector(\n scalar * getX(),\n scalar * getY(),\n scalar * getZ()\n );\n }", "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}", "public VelocityComponent(double xVector, double yVector, double zVector) {\n velocity = new Point3D(xVector, yVector, zVector);\n }", "public godot.wire.Wire.Vector3OrBuilder getZOrBuilder() {\n if (zBuilder_ != null) {\n return zBuilder_.getMessageOrBuilder();\n } else {\n return z_ == null ?\n godot.wire.Wire.Vector3.getDefaultInstance() : z_;\n }\n }", "public Vect3d getCenter (){\r\n Vect3d v = new Vect3d();\r\n v.x = (min.x + max.x) / 2;\r\n v.y = (min.y + max.y) / 2;\r\n v.z = (min.z + max.z) / 2;\r\n return v;\r\n }", "public abstract Vector4fc rotateZ(float angle);", "public static Point3DBasics newXZOnlyPoint3DBasics()\n {\n return new Point3DBasics()\n {\n private double x, z;\n\n @Override\n public double getX()\n {\n return x;\n }\n\n @Override\n public double getY()\n {\n return 0.0;\n }\n\n @Override\n public double getZ()\n {\n return z;\n }\n\n @Override\n public void setX(double x)\n {\n this.x = x;\n }\n\n @Override\n public void setY(double y)\n {\n }\n\n @Override\n public void setZ(double z)\n {\n this.z = z;\n }\n\n @Override\n public String toString()\n {\n return EuclidCoreIOTools.getTuple3DString(this);\n }\n };\n }", "public Vector4d sub(double x, double y, double z, double w) {\n\t\tthis.x -= x; this.y -= y; this.z -= z; this.w -= w;\n\t\treturn this;\n\t}", "private Vector(double x, double y) {\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tmagnitude = Math.sqrt(x * x + y * y);\n\t\tangle = Math.toDegrees(Math.atan2(y, x));\n\t}", "public abstract Vector4fc add(float x, float y, float z, float w);", "static Vec vector(PointDouble a, PointDouble b) {\n return new Vec(b.x - a.x, b.y - a.y);\n }", "public Vector4d() {\n\t\t// intentionally left empty\n\t}", "public static int[] vector(int x, int y) { return new int[] {x,y}; }", "public final void mZ() throws RecognitionException {\n try {\n // /Users/devdatta.kulkarni/Documents/Cassandra/apache-cassandra-0.8.6-src/src/java/org/apache/cassandra/cql/Cql.g:552:11: ( ( 'z' | 'Z' ) )\n // /Users/devdatta.kulkarni/Documents/Cassandra/apache-cassandra-0.8.6-src/src/java/org/apache/cassandra/cql/Cql.g:552:13: ( 'z' | 'Z' )\n {\n if ( input.LA(1)=='Z'||input.LA(1)=='z' ) {\n input.consume();\n\n }\n else {\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;}\n\n\n }\n\n }\n finally {\n }\n }", "public Vector3D getTransformedVector(Vector3D V) {\r\n\t\tVector3D rv = new Vector3D();\r\n\t\trv.x = V.x * M11 + V.y * M21 + V.z * M31 + V.w * M41;\r\n\t\trv.y = V.x * M12 + V.y * M22 + V.z * M32 + V.w * M42;\r\n\t\trv.z = V.x * M13 + V.y * M23 + V.z * M33 + V.w * M43;\r\n\t\trv.w = V.x * M14 + V.y * M24 + V.z * M34 + V.w * M44;\r\n\t\treturn rv;\r\n\t}", "public Vec3(){\n\t\tthis(0,0,0);\n\t}", "@Basic\n\tpublic double getVx() {\n\t\treturn this.vx;\n\t}", "public ThreeVector() { \r\n\t\t//returns null for no arguments\r\n\t}", "double getVx() { return vel[0]; }", "public Vector4d setX(double x) {\n\t\tthis.x = x;\n\t\treturn this;\n\t}", "public nvo_coords.CoordsType getVector() {\n return vector;\n }", "public static Vector4 forward()\n {\n return new Vector4(0,0,1,0);\n }", "public Vec3D(double ax, double ay, double az) {\n\t\tx = ax;\n\t\ty = ay;\n\t\tz = az;\n\t}", "final public Vector3 normalized(){\n return new Vector3(x/magnitude, y/magnitude, z/magnitude);\n }", "public static Vector cartesian(double x, double y) {\n\t\treturn new Vector(x, y);\n\t}", "private boolean isVecInsideXZBounds(World world, BlockPos pos, Vec3 vec) {\n double[] bounds = getBlockBounds(world, pos);\n return bounds!=null && vec!=null && vec.xCoord>=bounds[0] && vec.xCoord<=bounds[3] && vec.zCoord>=bounds[2] && vec.zCoord<=bounds[5];\n }", "@Override\n public Vector getFacingVector() {\n double[] rotation = {Math.cos(this.rot), Math.sin(this.rot)};\n Vector v = new Vector(rotation);\n v = VectorUtil.direction(v);\n Vector w = VectorUtil.direction(this.getR());\n v.plus(w);\n return v;\n }", "@Basic @Immutable\n\tpublic double getVxi() {\n\t\treturn this.vxi;\n\t}" ]
[ "0.60497075", "0.6019027", "0.5968545", "0.59629124", "0.5920669", "0.59155506", "0.58942086", "0.58751065", "0.58542377", "0.57326674", "0.57237333", "0.5661078", "0.563364", "0.56131727", "0.55601126", "0.55092466", "0.5496968", "0.54768884", "0.54741246", "0.5461996", "0.54591244", "0.54058295", "0.5388008", "0.5359487", "0.53517437", "0.53484225", "0.53470284", "0.5346159", "0.53459567", "0.5336688", "0.5334174", "0.53258365", "0.5297861", "0.5294847", "0.52821106", "0.52786934", "0.5275464", "0.52702755", "0.525221", "0.5239138", "0.5235309", "0.52335113", "0.52301395", "0.52155477", "0.52089405", "0.52013683", "0.51715267", "0.51693386", "0.51460415", "0.513466", "0.51319855", "0.51266205", "0.51216596", "0.5102875", "0.5099375", "0.50930667", "0.50900793", "0.50855666", "0.50779057", "0.5076213", "0.5075043", "0.5053401", "0.5048881", "0.5043376", "0.5042627", "0.5041068", "0.5026705", "0.502196", "0.50187427", "0.50183535", "0.5016521", "0.5010303", "0.5006698", "0.49920464", "0.4982809", "0.49766424", "0.49619135", "0.4955522", "0.49534735", "0.4938545", "0.49327838", "0.4930232", "0.49299577", "0.49209568", "0.49167567", "0.4905966", "0.49043965", "0.48954773", "0.48946136", "0.4891352", "0.48850474", "0.48784316", "0.48750415", "0.4871191", "0.48706928", "0.48706776", "0.4870659", "0.48611364", "0.48591134", "0.48566663" ]
0.5069708
61
Creates a vector that is restricted to the yaxis.
public static FixedFrameVector3DBasics newYOnlyFixedFrameVector3DBasics(ReferenceFrame referenceFrame) { return new FixedFrameVector3DBasics() { private double y; @Override public ReferenceFrame getReferenceFrame() { return referenceFrame; } @Override public double getX() { return 0.0; } @Override public double getY() { return y; } @Override public double getZ() { return 0.0; } @Override public void setX(double x) { } @Override public void setY(double y) { this.y = y; } @Override public void setZ(double z) { } @Override public String toString() { return EuclidCoreIOTools.getTuple3DString(this); } }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Vector deflectY() {\n\t\treturn new Vector(deltaX, -deltaY);\n\t}", "default void setY(double y)\n {\n getAxis().setY(y);\n }", "protected NumberAxis createVAxis() {\n NumberAxis yAxis = new NumberAxis(0, 55, 5);\n //yAxis.setLabel(\"Price\");\n yAxis.setSide(Side.RIGHT);\n yAxis.setTickMarkVisible(false);\n yAxis.setMinorTickVisible(false);\n return yAxis;\n }", "public static NumberAxis calcAxisY() {\n double minY = Math.round(\n Collections.min(GlobalVariables.systemCorridor.getDistances()) / 100) * 100 - 100;\n double maxY = Math.round(\n Collections.max(GlobalVariables.systemCorridor.getDistances()) / 100) * 100 + 100;\n double scaleY = Math.round(0.1 * (maxY - minY) / 100) * 100;\n NumberAxis axis = new NumberAxis(\"Distance (ft)\", minY, maxY, scaleY);\n axis.setTickLabelFont(Font.font(16));\n axis.setMinorTickCount(4);\n return axis;\n }", "public void setY(double value) {\n this.y = value;\n }", "protected void setYWithinBounds(double y) {\n\t\tif (getWorld() != null && (y < 0 || y >= getWorld().getWorldHeight()))\n\t\t\t\tterminate();\n\t\tsetY(Math.max(y, 0));\n\t}", "private ArrayList<Entry> setYAxisValues(){\n ArrayList<Entry> yVals = new ArrayList<Entry>();\n for (int z = 0; z < 235; z++) {\n yVals.add(new Entry((float)graphArray[z], z));\n }\n return yVals;\n }", "public int getY()\n {\n return yaxis;\n }", "Double getYLength();", "public double tDotY(Vector2 v)\n\t{\n\t\treturn this.matrix[0].y * v.x + matrix[1].y * v.y;\n\t}", "public SVGLength getY() {\n return y;\n }", "public void setUpperRightY(float value)\n {\n rectArray.set(3, new COSFloat( value ) );\n }", "private void drawVerticalAxisLabels(Graphics2D g2) {\r\n double axisV = xPositionToPixel(originX);\r\n\r\n// double startY = Math.floor((minY - originY) / majorY) * majorY;\r\n double startY = Math.floor(minY / majorY) * majorY;\r\n for (double y = startY; y < maxY + majorY; y += majorY) {\r\n if (((y - majorY / 2.0) < originY) &&\r\n ((y + majorY / 2.0) > originY)) {\r\n continue;\r\n }\r\n \r\n int position = (int) yPositionToPixel(y);\r\n g2.drawString(format(y), (int) axisV + 5, position);\r\n }\r\n }", "public FractalTrace setY2(double value) throws ParameterOutOfRangeException\n {\n\t\tif(value > 50.00 || value < -50.00)\n\t {\n\t throw new ParameterOutOfRangeException(value, -50.00, 50.00);\n\t }\n\n m_Y2 = value;\n setProperty(\"Y2\", value);\n return this;\n }", "public void setY(Double y);", "float yMax();", "public double getEndY() {\n\treturn v2.getY();\n }", "public double getYValue(){\r\n\t\treturn ((Double)(super.yValue) ).doubleValue(); \r\n\t}", "public double getRightYAxis() {\n\t\treturn getRawAxis(Axis_RightY);\n\t}", "public void SetY2()\n\t{\n\t\tdouble h;\n\t\th = Math.pow(this.length, 2) - Math.pow((this.length/2), 2);\n\t\th = Math.sqrt(h);\n\t\tthis.y[2] = this.y[0] - h;\n\t}", "public Vector4d setY(double y) {\n\t\tthis.y = y;\n\t\treturn this;\n\t}", "@java.lang.Override\n public godot.wire.Wire.Vector2 getY() {\n return y_ == null ? godot.wire.Wire.Vector2.getDefaultInstance() : y_;\n }", "public void setYDataRange(float min, float max);", "public static Component vertical() {\n return Box.createRigidArea(new Dimension(0, gap));\n }", "public Builder setY(float value) {\n \n y_ = value;\n onChanged();\n return this;\n }", "public Builder setY(float value) {\n \n y_ = value;\n onChanged();\n return this;\n }", "public Builder setY(float value) {\n \n y_ = value;\n onChanged();\n return this;\n }", "public ChartYAxis getYAxis() { return _yaxis; }", "public void setY(int value) {\n this.y = value;\n }", "public Builder setY(godot.wire.Wire.Vector2 value) {\n if (yBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n y_ = value;\n onChanged();\n } else {\n yBuilder_.setMessage(value);\n }\n\n return this;\n }", "public double getScaleY() {\n return 1.0;\n }", "public void setY(double value) {\n origin.setY(value);\n }", "public void setEndY(double y)\n {\n endycoord=y; \n }", "double getYLength();", "public double getMaxY() { return getY() + getHeight(); }", "public Builder setY(double value) {\n bitField0_ |= 0x00000008;\n y_ = value;\n onChanged();\n return this;\n }", "public Builder setY(float value) {\n bitField0_ |= 0x00000002;\n y_ = value;\n onChanged();\n return this;\n }", "public Builder setY(float value) {\n bitField0_ |= 0x00000002;\n y_ = value;\n onChanged();\n return this;\n }", "public void setY(double y) throws IllegalArgumentException {\n\t\tif (!isValidY(y)) {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\tthis.y = y;\n\t}", "public godot.wire.Wire.Vector2OrBuilder getYOrBuilder() {\n if (yBuilder_ != null) {\n return yBuilder_.getMessageOrBuilder();\n } else {\n return y_ == null ?\n godot.wire.Wire.Vector2.getDefaultInstance() : y_;\n }\n }", "public Builder setY(double value) {\n bitField0_ |= 0x00001000;\n y_ = value;\n onChanged();\n return this;\n }", "public void setStandardY(double y)\n {\n standardy=y; \n }", "public Builder setY(double value) {\n bitField0_ |= 0x00000020;\n y_ = value;\n onChanged();\n return this;\n }", "public Builder setY(double value) {\n bitField0_ |= 0x00000020;\n y_ = value;\n onChanged();\n return this;\n }", "public Builder setY(double value) {\n bitField0_ |= 0x00000020;\n y_ = value;\n onChanged();\n return this;\n }", "public void setY(double val) {\r\n\t\t this.yCoord = val;\r\n\t }", "public Builder setY(double value) {\n bitField0_ |= 0x00000010;\n y_ = value;\n onChanged();\n return this;\n }", "public Builder setY(double value) {\n bitField0_ |= 0x00000010;\n y_ = value;\n onChanged();\n return this;\n }", "@Override\n\tpublic double GetY() {\n\t\treturn 0f;\n\t}", "public double getY();", "public void setY(double y) {\n this.y = y;\r\n }", "public void changeRangeY(double limiteInitial, double limiteFinal, double space){\n //rango eje y\n //plot.getRangeAxis().setRange(limiteInitial, limiteFinal);\n yaxis = (NumberAxis) plot.getRangeAxis();\n yaxis.setRange(limiteInitial, limiteFinal);//agrego el rango en el eje de las y\n yaxis.setTickUnit(new NumberTickUnit(space));//agrego el espacio entre cada rango\n }", "public Builder setY(double value) {\n bitField0_ |= 0x00000004;\n y_ = value;\n onChanged();\n return this;\n }", "public void setY(double y){\n this.y = y;\n }", "public void setY(double y){\n this.y = y;\n }", "public double getMaximumY () {\n return minimumY + height;\n }", "public double getYValue(){\n return(yValue);\n }", "public void reverseYVelocity() {\n yVelocity = -yVelocity + 50;\n this.normalizeVelocity(this.xVelocity, this.yVelocity);\n }", "public void setY(double y) {\n this.y = y;\n }", "public void setY(double y) {\n this.y = y;\n }", "public void setY(double y) {\n this.y = y;\n }", "public void setY(double y)\n {\n this.y = y;\n }", "@Override\r\n\tpublic double getY2() {\n\t\treturn 0;\r\n\t}", "public double getY() { return y; }", "public Range getYRange() {\r\n\t\treturn yRange;\r\n\t}", "public int worldToViewportY(double y) {\n return (int)(0.5 + yMargin + yViewport + (y - yWindow) * yScaleFactor);\n }", "private int [] createYArray(){\r\n\t\tint [] yCoord = {\r\n\t\t\t\tyStart,\r\n\t\t\t\tyStart,\r\n\t\t\t\tyStart + Constants.FLOOR_HEIGHT,\r\n\t\t\t\tyStart,\r\n\t\t\t\tyStart - Constants.FLOOR_HEIGHT,\r\n\t\t\t\tyStart - Constants.FLOOR_HEIGHT,\r\n\t\t\t\tyStart,\r\n\t\t\t\tyStart,\r\n\t\t\t\tyStart - Constants.FLOOR_HEIGHT,\r\n\t\t\t\tyStart - Constants.FLOOR_HEIGHT,\r\n\t\t\t\tyStart\r\n\t\t};\r\n\t\treturn yCoord;\r\n\t}", "public void setDimY (int value)\n {\n m_dim_y = value;\n }", "public DynamicModelPart setY(float[] y) {\n this.y = y;\n return this;\n }", "public void setY(double y)\n\t\t{\n\t\t this.y[0] = y;\n\t\t}", "public YoVector2D(YoDouble xVariable, YoDouble yVariable)\n {\n super(xVariable, yVariable);\n }", "public int yPos() {\n\t\treturn Engine.scaleY(y);\n\t}", "public void setY(Double y) {\n\t\tthis.y = y;\n\t}", "public godot.wire.Wire.Vector2 getY() {\n if (yBuilder_ == null) {\n return y_ == null ? godot.wire.Wire.Vector2.getDefaultInstance() : y_;\n } else {\n return yBuilder_.getMessage();\n }\n }", "String getYAxisLabel();", "public Builder setPositionY(double value) {\n bitField0_ |= 0x00000008;\n positionY_ = value;\n onChanged();\n return this;\n }", "double getEndY();", "public void drawYaxis(Graphics2D g)\r\n { \r\n //draw y axis\r\n g.drawLine( 0, 0, 0, -height );\r\n \r\n //scale y axis\r\n for (double i = 0; i <= yRange; i += yScale)\r\n {\r\n int yP = -yPixScale(i);\r\n g.drawLine(-dWidth, yP, dWidth, yP);\r\n String numLabel = Fun.round( (i + yStart), scaleSigFig ) + \"\";\r\n drawStringY( numLabel, -dWidth - 1, yP, g );\r\n }\r\n \r\n //label y axis, and the label has to be sideways\r\n \r\n //orig = the way g is oriented right now\r\n AffineTransform orig = g.getTransform();\r\n \r\n //move g and display the label\r\n g.translate( -leftSpace/2 - 10, -height/2 );\r\n g.rotate(-Math.PI / 2); //-90 degrees\r\n drawStringX(yName, 0, 0, g);\r\n\r\n //move g back\r\n g.setTransform(orig);\r\n }", "public double getScaleY(double y) {\r\n return scalingFactorY*y;\r\n }", "public void setY(double y)\n\t{\n\t\tthis.y = y;\n\t}", "public void setYValue( double value ){\r\n\t\tsuper.setYValue( new Double( value ) );\r\n\t}", "public float getYChartMax() {\n return 0.0F;\n }", "public void setYCoordinates(double newY) { this.yCoordinates = newY; }", "public void setY(double y) {\n\t\tthis.y = y;\n\t}", "@Override\n\tpublic double getY() {\n\t\treturn y;\n\t}", "public Builder setPositionY(double value) {\n bitField0_ |= 0x00000080;\n positionY_ = value;\n onChanged();\n return this;\n }", "public VerticalBoundary(Platformer mainSketch, int startXPoint, int startYPoint, int y2Offset, int boundaryLineThickness,\n boolean initAsActive) {\n super(mainSketch, startXPoint, startYPoint, 0, y2Offset, boundaryLineThickness,\n true, true, true, initAsActive);\n }", "public Builder setPositionY(double value) {\n bitField0_ |= 0x00000010;\n positionY_ = value;\n onChanged();\n return this;\n }", "@java.lang.Override\n public godot.wire.Wire.Vector2OrBuilder getYOrBuilder() {\n return getY();\n }", "public void setUnitVector(double x, double y)\n {\n unitVector.setVector(new double [] {x,y}, true);\n }", "public void setVelocityY(double y) {\n\t\tvelocity.setY(y);\n\t}", "private double scaley(double y) {\n return y/scalingFactor;\n }", "double getY();", "double getY();", "double getY();", "double getY();", "double getY();", "double getY();", "double getY();", "double getY();", "double getY();" ]
[ "0.6446902", "0.62568784", "0.6253113", "0.6143118", "0.6030045", "0.5930026", "0.59052753", "0.5885189", "0.5877503", "0.5848503", "0.58473295", "0.5824942", "0.5793757", "0.5792252", "0.57911724", "0.57742083", "0.57629496", "0.57563007", "0.5742624", "0.57369304", "0.57179976", "0.5693611", "0.5692538", "0.568", "0.5655091", "0.5655091", "0.5655091", "0.56530803", "0.5650267", "0.56435597", "0.5642007", "0.5638817", "0.5636715", "0.56353396", "0.5628656", "0.5621515", "0.5610484", "0.5610484", "0.5604655", "0.55951065", "0.5594217", "0.5588857", "0.55866843", "0.55866843", "0.558506", "0.55779064", "0.55756724", "0.5574868", "0.5574699", "0.55658543", "0.5560571", "0.55560726", "0.5551479", "0.55478334", "0.55478334", "0.5535799", "0.5533669", "0.55264956", "0.5526051", "0.5526051", "0.5526051", "0.55226743", "0.55134094", "0.5512011", "0.5506563", "0.54867274", "0.54846275", "0.547604", "0.5462105", "0.54580575", "0.54570585", "0.54483044", "0.54443574", "0.5437919", "0.5422111", "0.54168427", "0.54136634", "0.54095197", "0.540916", "0.5403542", "0.5401794", "0.53962713", "0.5395521", "0.53932405", "0.5389857", "0.5383079", "0.53785473", "0.53773445", "0.53767735", "0.53739184", "0.5372444", "0.53706497", "0.53671765", "0.53671765", "0.53671765", "0.53671765", "0.53671765", "0.53671765", "0.53671765", "0.53671765", "0.53671765" ]
0.0
-1
Creates a new pose 3D that is restricted to the XZplane.
public static Pose3DBasics newPlanarPose3DBasics() { return new Pose3DBasics() { private final QuaternionBasics jointRotation = newPitchOnlyQuaternionBasics(); private final Point3DBasics jointTranslation = newXZOnlyPoint3DBasics(); @Override public Point3DBasics getPosition() { return jointTranslation; } @Override public QuaternionBasics getOrientation() { return jointRotation; } }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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}", "public static Vect3 mkXYZ(double x, double y, double z) {\n\t\treturn new Vect3(x,y,z);\n\t}", "protected abstract BaseVector3d createBaseVector3d(double x, double y, double z);", "Point3D (double x, double y, double z) {\n this.x = x;\n this.y = y;\n this.z = z;\n }", "public static Vect3 mk(double x, double y, double z) {\n\t\treturn new Vect3(x,y,z);\n\t}", "public static Coordinate create3D(double x, double y, double z) {\r\n return new Coordinate(x, y, z, Double.NaN);\r\n }", "public static Vect3 make(double x, double y, double z) {\n\t\treturn new Vect3(Units.from(\"NM\",x),Units.from(\"NM\",y),Units.from(\"ft\",z));\n\t}", "public Point3D(double x,double y,double z)\n {\n _x=x;\n _y=y;\n _z=z;\n }", "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 Point3D(Point3D point) {\n\t this.x = point.x;\n\t this.y = point.y;\n\t this.z = point.z;\n }", "public Point3F(float x, float y, float z) {\n this.x = x;\n this.y = y;\n this.z = z;\n }", "public Vector3D(double x, double y, double z) {\n this.xCoord = x;\n this.yCoord = y;\n this.zCoord = z;\n }", "public static Point3DBasics newXZOnlyPoint3DBasics()\n {\n return new Point3DBasics()\n {\n private double x, z;\n\n @Override\n public double getX()\n {\n return x;\n }\n\n @Override\n public double getY()\n {\n return 0.0;\n }\n\n @Override\n public double getZ()\n {\n return z;\n }\n\n @Override\n public void setX(double x)\n {\n this.x = x;\n }\n\n @Override\n public void setY(double y)\n {\n }\n\n @Override\n public void setZ(double z)\n {\n this.z = z;\n }\n\n @Override\n public String toString()\n {\n return EuclidCoreIOTools.getTuple3DString(this);\n }\n };\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 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}", "private void positionObjectInScene(float x, float y, float z) {\n setIdentityM(modelMatrix, 0);\n translateM(modelMatrix, 0, x, y, z);\n multiplyMM(modelViewProjectionMatrix, 0, viewProjectionMatrix,\n 0, modelMatrix, 0);\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 Vertex3D(double x, double y, double 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}", "public Vec3D() {\n\t\tx = y = z = 0.0f;\n\t}", "public Point3(double x_, double y_, double z_) {\n x = x_; y = y_; z = z_;\n }", "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 ViewerPosition3D()\n {\n }", "private Vector3D(int x, int y, int z) {\n this(x, y, z, null);\n }", "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}", "public Plane() {\r\n\t\tvecX = new Vector3D();\r\n\t\tvecY = new Vector3D();\r\n\t\tnorm = new Vector3D();\r\n\t\tthis.setD(0);\r\n\t\tpos = new Position3D();\r\n\t}", "public Vector3D(double x, double y, double z) {\r\n super(x, y, z);\r\n\t}", "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 FloatVector3D(float x, float y, float z)\n {\n fx = x;\n fy = y;\n fz = z;\n setMagnitude();\n }", "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 Vector3(double x, double y, double z) {\n this.x = x; this.y = y; this.z = z;\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 Vector3D() {\n zero();\n }", "public Vector3 () {\r\n\t\tx = 0;\r\n\t\ty = 0;\r\n\t\tz = 0;\r\n\t}", "public static Coordinate create3DM(double x, double y, double z, double m) {\r\n return new Coordinate(x, y, z, m);\r\n }", "public Vector(Coordinate x, Coordinate y, Coordinate z) {\n this(new Point3D(x, y, z));\n }", "public Vector3 (double x, double y, double z) {\n set(x, y, z);\n }", "public us.ihmc.euclid.geometry.Pose3D getPose()\n {\n return pose_;\n }", "public Vect3(double xx, double yy, double zz) {\n\t\tx = xx;\n\t\ty = yy;\n\t\tz = zz;\n\t}", "final public Vector3 x(final Vector3 v){\n if(v == null){\n throw new IllegalArgumentException(\"v must not be null\");\n }\n return new Vector3((y*v.z)-(z*v.y), (z*v.x)-(x*v.z), (x*v.y)-(y*v.x)); \n }", "protected TransformGroup createPopsicle(float x, float y, float z)\r\n\t{\r\n\t\t// create stick\r\n\t\tColoringAttributes ca_stick = new ColoringAttributes();\r\n\t\tca_stick.setColor(0.75f, 0.5f, 0.0f);\r\n\t\t\r\n\t\tPolygonAttributes pa_stick = new PolygonAttributes();\r\n\t\tpa_stick.setCullFace(PolygonAttributes.CULL_NONE);\r\n\t\t\r\n\t\tMaterial m_stick = new Material();\r\n\t\tm_stick.setDiffuseColor(0.75f, 0.5f, 0.0f);\r\n\t\tm_stick.setAmbientColor(1.0f, 1.0f, 1.0f);\r\n\t\t\r\n\t\tAppearance app_stick = new Appearance();\r\n\t\tapp_stick.setColoringAttributes(ca_stick);\r\n\t\tapp_stick.setMaterial(m_stick);\r\n\t\tapp_stick.setPolygonAttributes(pa_stick);\r\n\t\t\r\n\t\tCylinder cyl_stick = new Cylinder(\r\n\t\t\t\t0.1f, 2.0f, \r\n\t\t\t\tCylinder.GENERATE_NORMALS, \r\n\t\t\t\tapp_stick);\r\n\r\n\t\tTransform3D t3d_stick = new Transform3D();\r\n\t\tt3d_stick.setTranslation(new Vector3f(0.0f, -1.0f, 0.0f));\r\n\t\t\r\n\t\tTransformGroup tg_stick = new TransformGroup(t3d_stick);\r\n\t\ttg_stick.addChild(cyl_stick);\r\n\t\t\r\n\t\t// create candy\r\n\t\tColoringAttributes ca_candy = new ColoringAttributes();\r\n\t\tca_candy.setColor(0.0f, 1.0f, 0.0f);\r\n\t\t\r\n\t\tMaterial m_candy = new Material();\r\n\t\t\r\n\t\tAppearance app_candy = new Appearance();\r\n\t\tapp_candy.setColoringAttributes(ca_candy);\r\n\t\tapp_candy.setMaterial(m_candy);\r\n\t\t\r\n\t\tCylinder cyl_candy = new Cylinder(\r\n\t\t\t\t0.5f, 0.2f, \r\n\t\t\t\tCylinder.GENERATE_NORMALS,\r\n\t\t\t\tapp_candy);\r\n\t\t\r\n\t\tTransform3D t3d_candy = new Transform3D();\r\n\t\tt3d_candy.setTranslation(new Vector3f(0.0f, 0.5f, 0.0f));\r\n\t\tt3d_candy.rotX(HALF_PI);\r\n\t\t\r\n\t\tTransformGroup tg_candy = new TransformGroup(t3d_candy);\r\n\t\ttg_candy.addChild(cyl_candy);\r\n\t\t\r\n\t\t// create position transform for shape\r\n\t\tTransform3D t3d_pos = new Transform3D();\r\n\t\tt3d_pos.setTranslation(new Vector3f(x, y, z));\r\n\t\t\r\n\t\t// join primitives into transform group\r\n\t\tTransformGroup tg = new TransformGroup(t3d_pos);\r\n\t\ttg.addChild(tg_stick);\r\n\t\ttg.addChild(tg_candy);\r\n\t\treturn tg;\r\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 Point3(Point3 p) {\n this.x = p.x; this.y = p.y; this.z = p.z;\n }", "Obj(double x1, double y1, double z1, double x2, double y2, double z2, double x3, double y3, double z3){\t// CAMBIAR LAS COORDENADAS X,Y,Z CON 0,1 PARA CONSTRUIR PRISMA, CILINDRO, PIRAMIDE, CONO Y ESFERA.\n w\t= new Point3D[4];\n\tvScr\t= new Point2D[4];\n \n w[0]\t= new Point3D(0, 0, 0); // desde la base\n\tw[1]\t= new Point3D(x1, y1, z1);\n\tw[2]\t= new Point3D(x2, y2, z2);\n\tw[3]\t= new Point3D(x3, y3, z3);\n \n\tobjSize = (float) Math.sqrt(12F); \n rho\t= 5 * objSize;\n }", "public Vector3D() {\r\n\t\tthis(0.0);\r\n\t}", "public Pj3dBox Box(int x, int y, int z)\r\n\t{\r\n\t\tPj3dBox b = new Pj3dBox(this, x, y, z);\r\n\t\treturn b;\r\n\t}", "public Vector(double x, double y, double z) {\n this(new Point3D(x, y, z));\n }", "public FloatVector3D(){}", "public Vec3D(double ax, double ay, double az) {\n\t\tx = ax;\n\t\ty = ay;\n\t\tz = az;\n\t}", "public static Object3D buildChild(Object3D parent, double x, double y, double z) {\n Object3D child = parent.clone();\n child.setPosition(x, y, z);\n // Parent is set to invisible to prevent it from randomly floating at position (0, 0, 0).\n // Since child inherits from its parent and needs to be visible, set the child's visibility\n // state to visible.\n child.setVisible(true);\n\n return child;\n }", "public Vector3 set (double x, double y, double z) {\n this.x = x;\n this.y = y;\n this.z = z;\n return this;\n }", "public SFVec3f(float x, float y, float z) {\n\t\tset(x, y, z);\n\t}", "public DynamicCuboid setXYZ(float x, float y, float z) {\n return this.setX(x).setY(y).setZ(z);\n }", "public Vertex3D() {\n this(0.0, 0.0, 0.0);\n }", "Maze3d generate(int x, int y, int z) throws Exception;", "public Vector3 set(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\treturn this;\r\n\t}", "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()\n\t{\n\t\tx = y = z = 0;\n\t}", "public three_d_object(int ob_x, int ob_y, int ob_z, int new_ob_size, int new_ob_rotation_X,\n\t\t\t\t\tint new_ob_rotation_Y) {\n\t\t\t\tx = ob_x;\n\t\t\t\ty = ob_y;\n\t\t\t\tz = ob_z;\n\t\t\t\tob_size = new_ob_size;\n\t\t\t\trotation_X = new_ob_rotation_X;\n\t\t\t\trotation_Y = new_ob_rotation_Y;\n\n\t\t\t}", "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 CMLVector3() {\r\n }", "@Override\r\n\tpublic WB_Normal3d addAndCopy(final double x, final double y, final double z) {\r\n\t\treturn new WB_Normal3d(this.x + x, this.y + y, this.z + z);\r\n\t}", "public Vec3(){\n\t\tthis(0,0,0);\n\t}", "void setPosition (DVector3C xyz);", "private ThreePP createThreePP(String[] mavenCoord) {\n String vendor = mavenCoord[0];\n String product = mavenCoord[1];\n String version = mavenCoord[2];\n String url = String.format(mvnUrlFormat, vendor, product, version);\n if(vendor.startsWith(\"com.\")){\n vendor = vendor.replaceFirst(\"^com.\", \"\");\n }else if(vendor.startsWith(\"org.\")){\n vendor = vendor.replaceFirst(\"^org.\", \"\");\n }\n String cpe = String.format(\"cpe:2.3:a:%s:%s:%s:*:*:*:*:linux:*:*\", vendor, product, version);\n ThreePP threePP = new ThreePP(cpe);\n threePP.setWebLink(url);\n return threePP;\n }", "public static FixedFrameVector3DBasics newXZOnlyFixedFrameVector3DBasics(ReferenceFrame referenceFrame)\n {\n return new FixedFrameVector3DBasics()\n {\n private double x, z;\n\n @Override\n public ReferenceFrame getReferenceFrame()\n {\n return referenceFrame;\n }\n\n @Override\n public double getX()\n {\n return x;\n }\n\n @Override\n public double getY()\n {\n return 0.0;\n }\n\n @Override\n public double getZ()\n {\n return z;\n }\n\n @Override\n public void setX(double x)\n {\n this.x = x;\n }\n\n @Override\n public void setY(double y)\n {\n }\n\n @Override\n public void setZ(double z)\n {\n this.z = z;\n }\n\n @Override\n public String toString()\n {\n return EuclidCoreIOTools.getTuple3DString(this);\n }\n };\n }", "public static final PS3 create(int index){\n if( !libraryLoaded() ){\n System.out.println(\"PS3-ERROR: cannot create camera, dll not loaded\");\n return null;\n }\n \n PS3_Library.GUID guid = LIBRARY.CLEyeGetCameraUUID( index );\n if( guid.Data1 == 0){\n System.out.println(\"PS3-ERROR: index(\"+index+\") is not valid\");\n return null;\n }\n return new PS3(index, guid);\n }", "public Vec3 toVec3()\n {\n return Vec3.createVectorHelper(this.x, this.y, this.z);\n }", "public Position(double x, double y, double z) {\n xCoord = x;\n yCoord = y;\n zCoord = z;\n }", "public static AffineTransform3D getTranslateInstance(double Tx, double Ty,\r\n\t\t\tdouble Tz) {\r\n\r\n\t\tAffineTransform3D rv = new AffineTransform3D();\r\n\t\trv.setToTranslate(Tx, Ty, Tz);\r\n\t\treturn rv;\r\n\t}", "public BoundingBox3d(float xmin, float xmax, float ymin, float ymax, float zmin, float zmax) {\n this.xmin = xmin;\n this.xmax = xmax;\n this.ymin = ymin;\n this.ymax = ymax;\n this.zmin = zmin;\n this.zmax = zmax;\n }", "public Vector3<T> build() {\n return new Vector3<>(x, y, z);\n }", "public void place(float x,float y,float z){\n\t\tthis.x=x;\r\n\t\tthis.y=y;\r\n\t\tthis.z=z;\r\n\t\tdx=x;\r\n\t\tdy=y;\r\n\t\tvz=0;\r\n\t\tvx=0;\r\n\t\tvy=0;\r\n\t}", "public void drawSimple(int pitch, int yaw, int roll, int eyePitch, int eyeX, int eyeY, int eyeZ) {\n\t\tint centerX = Draw3D.centerX;\n\t\tint centerY = Draw3D.centerY;\n\t\tint sinPitch = sin[pitch];\n\t\tint cosPitch = cos[pitch];\n\t\tint sinYaw = sin[yaw];\n\t\tint cosYaw = cos[yaw];\n\t\tint sinRoll = sin[roll];\n\t\tint cosRoll = cos[roll];\n\t\tint sinEyePitch = sin[eyePitch];\n\t\tint cosEyePitch = cos[eyePitch];\n\t\tint midZ = ((eyeY * sinEyePitch) + (eyeZ * cosEyePitch)) >> 16;\n\n\t\tfor (int v = 0; v < vertexCount; v++) {\n\t\t\tint x = vertexX[v];\n\t\t\tint y = vertexY[v];\n\t\t\tint z = vertexZ[v];\n\n\t\t\t// Local Space -> Model Space\n\n\t\t\tif (roll != 0) {\n\t\t\t\tint x_ = ((y * sinRoll) + (x * cosRoll)) >> 16;\n\t\t\t\ty = ((y * cosRoll) - (x * sinRoll)) >> 16;\n\t\t\t\tx = x_;\n\t\t\t}\n\n\t\t\tif (pitch != 0) {\n\t\t\t\tint y_ = ((y * cosPitch) - (z * sinPitch)) >> 16;\n\t\t\t\tz = ((y * sinPitch) + (z * cosPitch)) >> 16;\n\t\t\t\ty = y_;\n\t\t\t}\n\n\t\t\tif (yaw != 0) {\n\t\t\t\tint x_ = ((z * sinYaw) + (x * cosYaw)) >> 16;\n\t\t\t\tz = ((z * cosYaw) - (x * sinYaw)) >> 16;\n\t\t\t\tx = x_;\n\t\t\t}\n\n\t\t\t// Model Space -> View Space\n\n\t\t\tx += eyeX;\n\t\t\ty += eyeY;\n\t\t\tz += eyeZ;\n\n\t\t\tint y_ = ((y * cosEyePitch) - (z * sinEyePitch)) >> 16;\n\t\t\tz = ((y * sinEyePitch) + (z * cosEyePitch)) >> 16;\n\t\t\ty = y_;\n\n\t\t\t// View Space -> Screen Space\n\n\t\t\tvertexScreenX[v] = centerX + ((x << 9) / z);\n\t\t\tvertexScreenY[v] = centerY + ((y << 9) / z);\n\t\t\tvertexScreenZ[v] = z - midZ;\n\n\t\t\t// Store viewspace coordinates to be transformed into screen space later (textured or clipped triangles)\n\n\t\t\tif (texturedFaceCount > 0) {\n\t\t\t\tvertexViewSpaceX[v] = x;\n\t\t\t\tvertexViewSpaceY[v] = y;\n\t\t\t\tvertexViewSpaceZ[v] = z;\n\t\t\t}\n\t\t}\n\t\ttry {\n\t\t\tdraw(false, false, 0);\n\t\t} catch (Exception ignored) {\n\t\t}\n\t}", "public AffineTransform3D() {\r\n\t\tthis.M11 = 1;\r\n\t\tthis.M12 = 0;\r\n\t\tthis.M13 = 0;\r\n\t\tthis.M14 = 0;\r\n\t\tthis.M21 = 0;\r\n\t\tthis.M22 = 1;\r\n\t\tthis.M23 = 0;\r\n\t\tthis.M24 = 0;\r\n\t\tthis.M31 = 0;\r\n\t\tthis.M32 = 0;\r\n\t\tthis.M33 = 1;\r\n\t\tthis.M34 = 0;\r\n\t\tthis.M41 = 0;\r\n\t\tthis.M42 = 0;\r\n\t\tthis.M43 = 0;\r\n\t\tthis.M44 = 1;\r\n\t}", "public abstract APoint3<DataType> newOffset(DataType x, DataType y, DataType z);", "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 void setTranslation(float x, float y,float z) {\n\t\tm_xforms[NvCameraXformType.MAIN].m_translate.set(x, y, z);\n\t}", "public final Point3D setZ(double z)\n {\n m_jso.setZ(z);\n\n return this;\n }", "public void setCameraPosition(float x, float y, float z) {\n\t\tthis.x=x;\n\t\tthis.y=y;\n\t\tthis.z=z;\n\t}", "public BSimVertex(double newX, double newY, double newZ){\r\n\t\tVector3d newLocation = new Vector3d(newX,newY,newZ);\r\n\t\tlocation = newLocation;\r\n\t}", "public\n\tVector3( Point3 point )\n\t{\n\t\tdata = new double[3];\n\t\tcopy( point );\n\t}", "@Override\n\tpublic Simplex2v3d getTangentPlane(float xPos, float zPos) {\n\t\treturn new Simplex2v3d(func.evaluateDerivative(new float[] {xPos, zPos}, 0), func.evaluateDerivative(new float[] {xPos, zPos}, 1), new Vector3f(xPos, getHeight(xPos, zPos), zPos));\n\t}", "public final void initialize()\n {\n x3dModel = new X3DObject().setProfile(\"Immersive\").setVersion(\"3.3\")\n .setHead(new headObject()\n .addComponent(new componentObject().setName(\"Navigation\").setLevel(3))\n .addUnit(new unitObject().setName(\"AngleUnitConversion\").setConversionFactor(1.0).setCategory(\"angle\"))\n .addUnit(new unitObject().setName(\"LengthUnitConversion\").setConversionFactor(1.0).setCategory(\"length\"))\n .addMeta(new metaObject().setName(\"title\").setContent(\"HelloWorldProgramOutput.x3d\"))\n .addMeta(new metaObject().setName(\"description\").setContent(\"Example HelloWorldProgram creates an X3D model using the X3D Java Scene Access Interface (SAI) Library\"))\n .addMeta(new metaObject().setName(\"reference\").setContent(\"http://www.web3d.org/specifications/java/X3DJSAIL.html\"))\n .addMeta(new metaObject().setName(\"generator\").setContent(\"HelloWorldProgramOutput.java\"))\n .addMeta(new metaObject().setName(\"created\").setContent(\"6 September 2016\"))\n .addMeta(new metaObject().setName(\"modified\").setContent(\"29 May 2017\"))\n .addMeta(new metaObject().setName(\"generator\").setContent(\"X3D Java Scene Access Interface Library (X3DJSAIL)\"))\n .addMeta(new metaObject().setName(\"generator\").setContent(\"http://www.web3d.org/specifications/java/examples/HelloWorldProgram.java\"))\n .addMeta(new metaObject().setName(\"generator\").setContent(\"Netbeans http://www.netbeans.org\"))\n .addMeta(new metaObject().setName(\"creator\").setContent(\"Don Brutzman\"))\n .addMeta(new metaObject().setName(\"reference\").setContent(\"https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/java/examples/HelloWorldProgramOutput.x3d\"))\n .addMeta(new metaObject().setName(\"reference\").setContent(\"Console output, ClassicVRML encoding, VRML97 encoding and pretty-print documentation:\"))\n .addMeta(new metaObject().setName(\"reference\").setContent(\"HelloWorldProgramOutput.txt\"))\n .addMeta(new metaObject().setName(\"reference\").setContent(\"HelloWorldProgramOutput.x3dv\"))\n .addMeta(new metaObject().setName(\"reference\").setContent(\"HelloWorldProgramOutput.wrl\"))\n .addMeta(new metaObject().setName(\"reference\").setContent(\"HelloWorldProgramOutput.html\"))\n .addMeta(new metaObject().setName(\"X3dValidator\").setContent(\"https://savage.nps.edu/X3dValidator?url=http://www.web3d.org/specifications/java/examples/HelloWorldProgramOutput.x3d\"))\n .addMeta(new metaObject().setName(\"identifier\").setContent(\"http://www.web3d.org/specifications/java/examples/HelloWorldProgramOutput.x3d\"))\n .addMeta(new metaObject().setName(\"license\").setContent(\"../license.html\"))\n .addMeta(new metaObject().setName(\"SpecialTest\").setContent(\"tested sat: name value cannot contain embedded space character\"))\n .addComments(\" comment #1 \")\n .addComments(\" comment #2 \")\n .addComments(\" comment #3 \")\n .addComments(\" comment #4 \"))\n .setScene(new SceneObject()\n .addChild(new ViewpointGroupObject().setDescription(\"Available viewpoints\")\n .addChild(new ViewpointObject(\"DefaultView\").setDescription(\"Hello X3DJSAIL\"))\n .addChild(new ViewpointObject(\"TopDownView\").setDescription(\"top-down view from above\").setPosition(0.0f,100.0f,0.0f).setOrientation(1.0f,0.0f,0.0f,-1.570796f)))\n .addChild(new WorldInfoObject(\"WorldInfoDEF\").setTitle(\"HelloWorldProgram produced by X3D Java SAI Library (X3DJSAIL)\"))\n .addChild(new WorldInfoObject().setUSE(\"WorldInfoDEF\"))\n .addChild(new WorldInfoObject().setUSE(\"WorldInfoDEF\"))\n .addMetadata(new MetadataStringObject(\"scene.addChildMetadataObject\").setName(\"test\"))\n .addChild(new LayerSetObject(\"scene.addChildLayerSetObjectTest\"))\n .addChild(new TransformObject(\"LogoGeometryTransform\").setTranslation(0.0f,1.5f,0.0f)\n .addChild(new AnchorObject().setDescription(\"select for X3D Java SAI Library (X3DJSAIL) description\").setUrl(new MFStringObject(\"\\\"../X3DJSAIL.html\\\" \\\"http://www.web3d.org/specifications/java/X3DJSAIL.html\\\"\"))\n .addChild(new ShapeObject(\"BoxShape\")\n .setAppearance(new AppearanceObject()\n .setMaterial(new MaterialObject(\"GreenMaterial\").setDiffuseColor(0.0f,1.0f,1.0f).setTransparency(0.1f).setEmissiveColor(0.8f,0.0f,0.0f))\n .setTexture(new ImageTextureObject().setUrl(new MFStringObject(\"\\\"images/X3dJavaSceneAccessInterfaceSaiLibrary.png\\\" \\\"http://www.web3d.org/specifications/java/examples/images/X3dJavaSceneAccessInterfaceSaiLibrary.png\\\"\"))))\n .setGeometry(new BoxObject(\"test-NMTOKEN_regex.0123456789\").setCssClass(\"textured\")))))\n .addChild(new ShapeObject(\"LineShape\")\n .setAppearance(new AppearanceObject()\n .setMaterial(new MaterialObject().setEmissiveColor(0.6f,0.19607843f,0.8f)))\n .setGeometry(new IndexedLineSetObject().setCoordIndex(new int[] {0,1,2,3,4,0})\n .setCoord(new CoordinateObject().setPoint(new MFVec3fObject(new float[] {0.0f,1.5f,0.0f,2.0f,1.5f,0.0f,2.0f,1.5f,-2.0f,-2.0f,1.5f,-2.0f,-2.0f,1.5f,0.0f,0.0f,1.5f,0.0f})))))\n .addChild(new PositionInterpolatorObject(\"BoxPathAnimator\").setKey(new float[] {0.0f,0.125f,0.375f,0.625f,0.875f,1.0f}).setKeyValue(new MFVec3fObject(new float[] {0.0f,1.5f,0.0f,2.0f,1.5f,0.0f,2.0f,1.5f,-2.0f,-2.0f,1.5f,-2.0f,-2.0f,1.5f,0.0f,0.0f,1.5f,0.0f})))\n .addChild(new TimeSensorObject(\"OrbitClock\").setCycleInterval(8.0).setLoop(true))\n .addChild(new ROUTEObject().setFromNode(\"OrbitClock\").setFromField(\"fraction_changed\").setToNode(\"BoxPathAnimator\").setToField(\"set_fraction\"))\n .addChild(new ROUTEObject().setFromNode(\"BoxPathAnimator\").setFromField(\"value_changed\").setToNode(\"LogoGeometryTransform\").setToField(\"set_translation\"))\n .addChild(new TransformObject(\"TextTransform\").setTranslation(0.0f,-1.5f,0.0f)\n .addChild(new ShapeObject()\n .setAppearance(new AppearanceObject()\n .setMaterial(new MaterialObject().setUSE(\"GreenMaterial\")))\n .setGeometry(new TextObject().setString(new MFStringObject(\"\\\"X3D Java\\\" \\\"SAI Library\\\" \\\"X3DJSAIL\\\"\"))\n .setMetadata(new MetadataSetObject().setName(\"EscapedQuotationMarksMetadataSet\")\n .addValue(new MetadataStringObject().setName(\"escapedQuotesTest1\").setValue(new MFStringObject(\"\\\"escaped quotation marks example 1: He said, \\\\\\\"Immel did it!\\\\\\\"\\\"\")))\n .addValue(new MetadataStringObject().setName(\"escapedQuotesTest2\").setValue(new MFStringObject(\"\\\"escaped quotation marks example 2: He said, &quot;Immel did it!&quot;\\\"\"))))\n .setFontStyle(new FontStyleObject().setJustify(new MFStringObject(\"\\\"MIDDLE\\\" \\\"MIDDLE\\\"\")))\n .addComments(\" escaped quotation marks example 3: He said, \\\"Immel did it!\\\" \")\n .addComments(\" escaped quotation marks example 4: He said, &quot;Immel did it!&quot; \")))\n .addChild(new CollisionObject()\n .addComments(\" test containerField='proxy' \")\n .setProxy(new ShapeObject(\"ProxyShape\")\n .setGeometry(new TextObject().setString(new MFStringObject(\"\\\"One, Two, Three\\\" \\\"\\\" \\\"He said, \\\\\\\"Immel did it!\\\\\\\"\\\"\")))\n .addComments(\" alternative XML encoding: Text string='\\\"One, Two, Three\\\" \\\"\\\" \\\"He said, \\\\&quot;Immel did it!\\\\&quot;\\\"' \")\n .addComments(\" alternative Java source: .setString(new String [] {\\\"One, Two, Three\\\", \\\"\\\", \\\"He said, \\\\\\\"Immel did it!\\\\\\\"\\\"}) \")\n .addComments(\" reference: http://www.web3d.org/x3d/content/examples/Basic/X3dSpecifications/StringArrayEncodingExamplesIndex.html \")))\n .addComments(\" It's a beautiful world \")\n .addComments(\" ... for you! \")\n .addComments(\" https://en.wikipedia.org/wiki/Beautiful_World_(Devo_song) \"))\n .addComments(\" repeatedly spin 180 degrees as a readable special effect \")\n .addChild(new OrientationInterpolatorObject(\"SpinInterpolator\").setKey(new float[] {0.0f,0.5f,1.0f}).setKeyValue(new MFRotationObject(new float[] {0.0f,1.0f,0.0f,4.712389f,0.0f,1.0f,0.0f,0.0f,0.0f,1.0f,0.0f,1.5707964f})))\n .addChild(new TimeSensorObject(\"SpinClock\").setCycleInterval(5.0).setLoop(true))\n .addChild(new ROUTEObject().setFromNode(\"SpinClock\").setFromField(\"fraction_changed\").setToNode(\"SpinInterpolator\").setToField(\"set_fraction\"))\n .addChild(new ROUTEObject().setFromNode(\"SpinInterpolator\").setFromField(\"value_changed\").setToNode(\"TextTransform\").setToField(\"rotation\"))\n .addChild(new GroupObject(\"BackgroundGroup\")\n .addChild(new BackgroundObject(\"GradualBackground\"))\n .addChild(new ScriptObject(\"colorTypeConversionScript\").setSourceCode(\n\"<![CDATA[\" + \"\\n\" +\n\"\\n\" + \n\"\\n\" + \n\"ecmascript:\" + \"\\n\" + \n\"\\n\" + \n\"function colorInput (eventValue) // Example source code\" + \"\\n\" + \n\"{\" + \"\\n\" + \n\" colorsOutput = new MFColor(eventValue); // assigning value sends output event\" + \"\\n\" + \n\"// Browser.print('colorInput=' + eventValue + ', colorsOutput=' + colorsOutput + '\\\\n');\" + \"\\n\" + \n\"}\" + \"\\n\" + \"]]>\"\n)\n .addField(new fieldObject().setAccessType(\"inputOnly\").setName(\"colorInput\").setType(\"SFColor\"))\n .addField(new fieldObject().setAccessType(\"outputOnly\").setName(\"colorsOutput\").setType(\"MFColor\")))\n .addChild(new ColorInterpolatorObject(\"ColorAnimator\").setKey(new float[] {0.0f,0.5f,1.0f}).setKeyValue(new MFColorObject(new float[] {0.9411765f,1.0f,1.0f,0.29411766f,0.0f,0.50980395f,0.9411765f,1.0f,1.0f}))\n .addComments(\" AZURE to INDIGO and back again \"))\n .addChild(new TimeSensorObject(\"ColorClock\").setCycleInterval(60.0).setLoop(true))\n .addChild(new ROUTEObject().setFromNode(\"colorTypeConversionScript\").setFromField(\"colorsOutput\").setToNode(\"GradualBackground\").setToField(\"skyColor\"))\n .addChild(new ROUTEObject().setFromNode(\"ColorAnimator\").setFromField(\"value_changed\").setToNode(\"colorTypeConversionScript\").setToField(\"colorInput\"))\n .addChild(new ROUTEObject().setFromNode(\"ColorClock\").setFromField(\"fraction_changed\").setToNode(\"ColorAnimator\").setToField(\"set_fraction\")))\n .addChild(new ProtoDeclareObject().setName(\"ArtDeco01Material\").setAppinfo(\"tooltip: ArtDeco01 prototype is a Material node\")\n .setProtoInterface(new ProtoInterfaceObject()\n .addField(new fieldObject().setAccessType(\"inputOutput\").setName(\"description\").setType(\"SFString\").setValue(\"ArtDeco01 prototype is a Material node\").setAppinfo(\"tooltip for descriptionField\"))\n .addField(new fieldObject().setAccessType(\"inputOutput\").setName(\"enabled\").setType(\"SFBool\").setValue(\"true\")))\n .setProtoBody(new ProtoBodyObject()\n .addComments(\" Initial node of ProtoBody determines prototype node type \")\n .addChild(new MaterialObject().setShininess(0.127273f).setAmbientIntensity(0.25f).setSpecularColor(0.276305f,0.11431f,0.139857f).setDiffuseColor(0.282435f,0.085159f,0.134462f))\n .addComments(\" [HelloWorldProgram diagnostic] should be connected to scene graph: ArtDeco01ProtoDeclare.getNodeType()=\\\"Material\\\" \")\n .addComments(\" presence of follow-on TouchSensor shows that additional nodes are allowed in ProtoBody after initial node, regardless of node types \")\n .addChild(new TouchSensorObject().setDescription(\"within ProtoBody\")\n .setIS(new ISObject()\n .addConnect(new connectObject().setNodeField(\"description\").setProtoField(\"description\"))\n .addConnect(new connectObject().setNodeField(\"enabled\").setProtoField(\"enabled\"))))))\n .addChild(new ExternProtoDeclareObject().setName(\"ArtDeco02Material\").setAppinfo(\"this is a different Material node\").setUrl(new MFStringObject(\"\\\"http://X3dGraphics.com/examples/X3dForWebAuthors/Chapter14Prototypes/ArtDecoPrototypesExcerpt.x3d#ArtDeco02\\\" \\\"http://X3dGraphics.com/examples/X3dForWebAuthors/Chapter14Prototypes/ArtDecoPrototypesExcerpt.x3dv#ArtDeco02\\\"\"))\n .addField(new fieldObject().setAccessType(\"inputOutput\").setName(\"description\").setType(\"SFString\").setAppinfo(\"tooltip for descriptionField\"))\n .addComments(\" [HelloWorldProgram diagnostic] ArtDeco02ExternProtoDeclare.getNodeType()=\\\"ERROR_UNKNOWN_EXTERNPROTODECLARE_NODE_TYPE: ExternProtoDeclare name='ArtDeco02Material' type cannot be remotely accessed at run time, TODO X3DJSAIL needs to add further capability.\\\" \"))\n .addComments(\" Tested ArtDeco01ProtoInstance, ArtDeco02ProtoInstance for improper node type when ProtoInstance is added in wrong place \")\n .addChild(new ShapeObject(\"TestShape1\")\n .setAppearance(new AppearanceObject(\"TestAppearance1\")\n .setMaterial(new ProtoInstanceObject().setName(\"ArtDeco01\")\n .addFieldValue(new fieldValueObject().setName(\"description\").setValue(\"ArtDeco01 can substitute for a Material node\"))\n .addComments(\" [HelloWorldProgram diagnostic] ArtDeco01ProtoInstance.getNodeType()=\\\"ERROR_UNKNOWN_PROTOINSTANCE_NODE_TYPE: ProtoInstance name='ArtDeco01' has no corresponding ProtoDeclareObject or ExternProtoDeclareObject to provide type.\\\" \"))\n .addComments(\" ArtDeco01 Material prototype goes here... \"))\n .setGeometry(new SphereObject().setRadius(0.001f)))\n .addChild(new ShapeObject(\"TestShape2\")\n .setAppearance(new AppearanceObject(\"TestAppearance2\")\n .setMaterial(new ProtoInstanceObject().setName(\"ArtDeco02\")\n .addFieldValue(new fieldValueObject().setName(\"description\").setValue(\"ArtDeco02 can substitute for another Material node\"))\n .addComments(\" [HelloWorldProgram diagnostic] ArtDeco02ProtoInstance.getNodeType()=\\\"ERROR_UNKNOWN_PROTOINSTANCE_NODE_TYPE: ProtoInstance name='ArtDeco02' has no corresponding ProtoDeclareObject or ExternProtoDeclareObject to provide type.\\\" \"))\n .addComments(\" ArtDeco02 Material prototype goes here... \"))\n .setGeometry(new ConeObject().setBottomRadius(0.001f).setHeight(0.001f)))\n .addChild(new InlineObject(\"inlineSceneDef\").setUrl(new MFStringObject(\"\\\"someOtherScene.x3d\\\"\")))\n .addChild(new IMPORTObject().setImportedDEF(\"WorldInfoDEF\").setInlineDEF(\"inlineSceneDef\").setAS(\"WorldInfoDEF2\"))\n .addChild(new EXPORTObject().setLocalDEF(\"WorldInfoDEF\").setAS(\"WorldInfoDEF3\"))\n .addChild(new ProtoDeclareObject().setName(\"MaterialModulator\").setAppinfo(\"mimic a Material node and modulate fields as an animation effect\").setDocumentation(\"http://x3dgraphics.com/examples/X3dForWebAuthors/Chapter14Prototypes/MaterialModulatorIndex.html\")\n .setProtoInterface(new ProtoInterfaceObject()\n .addField(new fieldObject().setAccessType(\"inputOutput\").setName(\"enabled\").setType(\"SFBool\").setValue(\"true\"))\n .addField(new fieldObject().setAccessType(\"inputOutput\").setName(\"diffuseColor\").setType(\"SFColor\").setValue(\"0 0 0\"))\n .addField(new fieldObject().setAccessType(\"inputOutput\").setName(\"emissiveColor\").setType(\"SFColor\").setValue(\"0.05 0.05 0.5\"))\n .addField(new fieldObject().setAccessType(\"inputOutput\").setName(\"specularColor\").setType(\"SFColor\").setValue(\"0 0 0\"))\n .addField(new fieldObject().setAccessType(\"inputOutput\").setName(\"transparency\").setType(\"SFFloat\").setValue(\"0.0\"))\n .addField(new fieldObject().setAccessType(\"inputOutput\").setName(\"shininess\").setType(\"SFFloat\").setValue(\"0.0\"))\n .addField(new fieldObject().setAccessType(\"inputOutput\").setName(\"ambientIntensity\").setType(\"SFFloat\").setValue(\"0.0\")))\n .setProtoBody(new ProtoBodyObject()\n .addChild(new MaterialObject(\"MaterialNode\")\n .setIS(new ISObject()\n .addConnect(new connectObject().setNodeField(\"diffuseColor\").setProtoField(\"diffuseColor\"))\n .addConnect(new connectObject().setNodeField(\"emissiveColor\").setProtoField(\"emissiveColor\"))\n .addConnect(new connectObject().setNodeField(\"specularColor\").setProtoField(\"specularColor\"))\n .addConnect(new connectObject().setNodeField(\"transparency\").setProtoField(\"transparency\"))\n .addConnect(new connectObject().setNodeField(\"shininess\").setProtoField(\"shininess\"))\n .addConnect(new connectObject().setNodeField(\"ambientIntensity\").setProtoField(\"ambientIntensity\"))))\n .addComments(\" Only first node (the node type) is renderable, others are along for the ride \")\n .addChild(new ScriptObject(\"MaterialModulatorScript\").setSourceCode(\n\"<![CDATA[\" + \"\\n\" +\n\"\\n\" + \n\"\\n\" + \n\"ecmascript:\" + \"\\n\" + \n\"function initialize ()\" + \"\\n\" + \n\"{\" + \"\\n\" + \n\" newColor = diffuseColor; // start with correct color\" + \"\\n\" + \n\"}\" + \"\\n\" + \n\"function set_enabled (newValue)\" + \"\\n\" + \n\"{\" + \"\\n\" + \n\"\tenabled = newValue;\" + \"\\n\" + \n\"}\" + \"\\n\" + \n\"function clockTrigger (timeValue)\" + \"\\n\" + \n\"{\" + \"\\n\" + \n\" if (!enabled) return;\" + \"\\n\" + \n\" red = newColor.r;\" + \"\\n\" + \n\" green = newColor.g;\" + \"\\n\" + \n\" blue = newColor.b;\" + \"\\n\" + \n\" \" + \"\\n\" + \n\" // note different modulation rates for each color component, % is modulus operator\" + \"\\n\" + \n\" newColor = new SFColor ((red + 0.02) % 1, (green + 0.03) % 1, (blue + 0.04) % 1);\" + \"\\n\" + \n\"\tif (enabled)\" + \"\\n\" + \n\"\t{\" + \"\\n\" + \n\"\t\tBrowser.print ('diffuseColor=(' + red + ',' + green + ',' + blue + ') newColor=' + newColor.toString() + '\\\\n');\" + \"\\n\" + \n\"\t}\" + \"\\n\" + \n\"}\" + \"\\n\" + \"]]>\"\n)\n .addField(new fieldObject().setAccessType(\"inputOutput\").setName(\"enabled\").setType(\"SFBool\"))\n .addField(new fieldObject().setAccessType(\"inputOutput\").setName(\"diffuseColor\").setType(\"SFColor\"))\n .addField(new fieldObject().setAccessType(\"outputOnly\").setName(\"newColor\").setType(\"SFColor\"))\n .addField(new fieldObject().setAccessType(\"inputOnly\").setName(\"clockTrigger\").setType(\"SFTime\"))\n .setIS(new ISObject()\n .addConnect(new connectObject().setNodeField(\"enabled\").setProtoField(\"enabled\"))\n .addConnect(new connectObject().setNodeField(\"diffuseColor\").setProtoField(\"diffuseColor\"))))))\n .addComments(\" Test success: declarative statement createDeclarativeShapeTests() \")\n .addChild(new GroupObject(\"DeclarativeGroupExample\")\n .addChild(new ShapeObject()\n .setMetadata(new MetadataStringObject(\"FindableMetadataStringTest\").setName(\"findThisNameValue\").setValue(new MFStringObject(\"\\\"test case\\\"\")))\n .setAppearance(new AppearanceObject(\"DeclarativeAppearanceExample\")\n .setMaterial(new ProtoInstanceObject(\"MyMaterialModulator\", \"MaterialModulator\").setDEF(\"MyMaterialModulator\").setName(\"MaterialModulator\"))\n .addComments(\" DeclarativeMaterialExample gets overridden by subsequently added MaterialModulator ProtoInstance \"))\n .setGeometry(new ConeObject().setBottomRadius(0.05f).setHeight(0.1f).setBottom(false)))\n .addComments(\" Test success: declarativeGroup.addChild() singleton pipeline method \"))\n .addComments(\" Test success: declarative statement addChild() \")\n .addComments(new String[] {\" Test success: x3dModel.findNodeByDEF(DeclarativeAppearanceExample) = <Appearance DEF='DeclarativeAppearanceExample'/> i.e.\",\n\"<Appearance DEF='DeclarativeAppearanceExample'>\",\n\" <ProtoInstance DEF='MyMaterialModulator' name='MaterialModulator' containerField='material'/>\",\n\" <!- - DeclarativeMaterialExample gets overridden by subsequently added MaterialModulator ProtoInstance - ->\",\n\"</Appearance> \"})\n .addComments(\" Test success: x3dModel.findElementByNameValue(findThisNameValue) = <MetadataString DEF='FindableMetadataStringTest' name='findThisNameValue' value='\\\"test case\\\"'/> \")\n .addComments(\" Test success: x3dModel.findElementByNameValue(\\\"ArtDeco01Material\\\", \\\"ProtoDeclare\\\") found \")\n .addComments(\" Test success: x3dModel.findElementByNameValue(\\\"MaterialModulator\\\", \\\"ProtoDeclare\\\") found \")\n .addComments(\" Test success: x3dModel.findElementByNameValue(\\\"MaterialModulator\\\", \\\"ProtoInstance\\\") found \")\n .addChild(new GroupObject(\"TestFieldObjectsGroup\")\n .addComments(\" testFieldObjects() results \")\n .addComments(\" SFBool default=true, true=true, false=false, negate()=true \")\n .addComments(\" MFBool default=, initial=true false true, negate()=false true false \")\n .addComments(\" SFFloat default=0.0, initial=1.0, setValue(2)=2.0, setValue(3.0f)=3.0, setValue(4.0)=4.0 \")\n .addComments(\" MFFloat default=, initial=1 2 3, append(5)=1 2 3 5, inserts(3,4)(0,0)=0 1 2 3 4 5, append(6)=0 1 2 3 4 5 6, size()=7 \")\n .addComments(\" ... get1Value[3]=3.0, remove[1]=0 2 3 4 5 6, set1Value(0,10)=10 2 3 4 5 6, multiply(2)=20 4 6 8 10 12, clear= \")\n .addComments(\" SFVec3f default=0 0 0, initial=1 2 3, setValue=4 5 6, multiply(2)=8 10 12, normalize()=0.45584232 0.5698029 0.68376344 \"))\n .addChild(new SoundObject()\n .setSource(new AudioClipObject().setUrl(new MFStringObject(\"\\\"chimes.wav\\\" \\\"http://www.web3d.org/x3d/content/examples/ConformanceNist/Sounds/AudioClip/chimes.wav\\\"\")))\n .addComments(\" Scene example fragment from http://www.web3d.org/x3d/content/examples/ConformanceNist/Sounds/AudioClip/default.x3d \"))\n .addChild(new SoundObject()\n .setSource(new MovieTextureObject().setUrl(new MFStringObject(\"\\\"mpgsys.mpg\\\" \\\"http://www.web3d.org/x3d/content/examples/ConformanceNist/Appearance/MovieTexture/mpgsys.mpg\\\"\")))\n .addComments(\" Scene example fragment from http://www.web3d.org/x3d/content/examples/ConformanceNist/Appearance/MovieTexture/mpeg1-systems.x3d \")\n .addComments(\" Expected containerField='source', allowed containerField values=\\\"texture\\\" \\\"source\\\" \\\"back\\\" \\\"bottom\\\" \\\"front\\\" \\\"left\\\" \\\"right\\\" \\\"top\\\" \\\"backTexture\\\" \\\"bottomTexture\\\" \\\"frontTexture\\\" \\\"leftTexture\\\" \\\"rightTexture\\\" \\\"topTexture\\\" \")));\n }", "public Maze3d(int y,int z,int x)\r\n\t{\r\n\t\tthis.maze = new int[y][z][x];\r\n\t\tfor(int i = 0;i<y;i++)\r\n\t\t{\r\n\t\t\tfor(int j = 0;j<z;j++)\r\n\t\t\t{\r\n\t\t\t\tfor(int k = 0;k<x;k++)\r\n\t\t\t\t{\r\n\t\t\t\t\tthis.maze[i][j][k]=1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "public PositionComponent(float x, float y, int z) {\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tthis.z = z;\n\t}", "public godot.wire.Wire.Vector3 getZ() {\n if (zBuilder_ == null) {\n return z_ == null ? godot.wire.Wire.Vector3.getDefaultInstance() : z_;\n } else {\n return zBuilder_.getMessage();\n }\n }", "public Point transform(double x, double y, double z) {\n\t\t\n\t\n\t\tdouble uIso = (x * xToU) + (y * yToU) + (z * zToU);\n\t\tdouble vIso = (x * xToV) + (y * yToV) + (z * zToV);\n\t\t\n\t\tint uDraw = xOffset + (int)(scale * uIso);\n\t\tint vDraw = yOffset + (int)(scale * vIso);\n\t\t\n\t\treturn new Point(uDraw, vDraw);\n\t}", "@java.lang.Override\n public godot.wire.Wire.Vector3 getZ() {\n return z_ == null ? godot.wire.Wire.Vector3.getDefaultInstance() : z_;\n }", "public Object3D() {\n objectVectors = new ArrayList<>();\n linesToDraw = new ArrayList<>();\n }", "public void setPosition(float x, float y, float z) {\n\t\tposition = new Vectorf3(x, y, z);\n\t\tmodified = true;\n\t}", "public X3DObject getX3dModel()\n {\t \n\t return x3dModel;\n }", "private void createXVertices() {\n\n\t\tfor (int i = 0; i < this.numXVertices; i++) {\n\t\t\t// determine external degree -- random number between d_0 and d_1\n\t\t\tint upperBoundAdjusted = this.d1 - this.d0; // Shift to 0 so that the randomGen can be used\n\t\t\tint externalDegree = this.randomGen(upperBoundAdjusted) + this.d0; // Shift back for a degree within the\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// range\n\t\t\tvertices.add(new XVertex('x', this.countXID++, externalDegree));\n\t\t}\n\t}", "public Vertex3D(Vertex3D c) {\n this(c.x, c.y, c.z);\n }", "public Quaternion(final float x, final float y, final float z, final float w)\n {\n this.x = x;\n this.y = y;\n this.z = z;\n this.w = w;\n }", "public\n Projection project ( double x , double y , double z , ClampMode clampModeOutside , boolean extrudeInverted ) {\n boolean outsideFrustum;\n if ( this.viewport == null || this.modelview == null || this.projection == null )\n return new Projection ( 0.0 , 0.0 , Projection.Type.FAIL );\n Vector3D posVec = new Vector3D ( x , y , z );\n boolean[] frustum = this.doFrustumCheck ( this.frustum , this.frustumPos , x , y , z );\n boolean bl = outsideFrustum = frustum[0] || frustum[1] || frustum[2] || frustum[3];\n if ( outsideFrustum ) {\n boolean outsideInvertedFrustum;\n boolean opposite = posVec.sub ( this.frustumPos ).dot ( this.viewVec ) <= 0.0;\n boolean[] invFrustum = this.doFrustumCheck ( this.invFrustum , this.frustumPos , x , y , z );\n boolean bl2 = outsideInvertedFrustum = invFrustum[0] || invFrustum[1] || invFrustum[2] || invFrustum[3];\n if ( extrudeInverted && ! outsideInvertedFrustum || outsideInvertedFrustum && clampModeOutside != ClampMode.NONE ) {\n if ( extrudeInverted && ! outsideInvertedFrustum || clampModeOutside == ClampMode.DIRECT && outsideInvertedFrustum ) {\n double vecX = 0.0;\n double vecY = 0.0;\n if ( ! GLU.gluProject ( (float) x , (float) y , (float) z , this.modelview , this.projection , this.viewport , this.coords ) )\n return new Projection ( 0.0 , 0.0 , Projection.Type.FAIL );\n if ( opposite ) {\n vecX = this.displayWidth * this.widthScale - (double) this.coords.get ( 0 ) * this.widthScale - this.displayWidth * this.widthScale / 2.0;\n vecY = this.displayHeight * this.heightScale - ( this.displayHeight - (double) this.coords.get ( 1 ) ) * this.heightScale - this.displayHeight * this.heightScale / 2.0;\n } else {\n vecX = (double) this.coords.get ( 0 ) * this.widthScale - this.displayWidth * this.widthScale / 2.0;\n vecY = ( this.displayHeight - (double) this.coords.get ( 1 ) ) * this.heightScale - this.displayHeight * this.heightScale / 2.0;\n }\n Vector3D vec = new Vector3D ( vecX , vecY , 0.0 ).snormalize ( );\n vecX = vec.x;\n vecY = vec.y;\n Line vectorLine = new Line ( this.displayWidth * this.widthScale / 2.0 , this.displayHeight * this.heightScale / 2.0 , 0.0 , vecX , vecY , 0.0 );\n double angle = Math.toDegrees ( Math.acos ( vec.y / Math.sqrt ( vec.x * vec.x + vec.y * vec.y ) ) );\n if ( vecX < 0.0 ) {\n angle = 360.0 - angle;\n }\n Vector3D intersect = new Vector3D ( 0.0 , 0.0 , 0.0 );\n intersect = angle >= this.bra && angle < this.tra ? this.rb.intersect ( vectorLine ) : ( angle >= this.tra && angle < this.tla ? this.tb.intersect ( vectorLine ) : ( angle >= this.tla && angle < this.bla ? this.lb.intersect ( vectorLine ) : this.bb.intersect ( vectorLine ) ) );\n return new Projection ( intersect.x , intersect.y , outsideInvertedFrustum ? Projection.Type.OUTSIDE : Projection.Type.INVERTED );\n }\n if ( clampModeOutside != ClampMode.ORTHOGONAL || ! outsideInvertedFrustum )\n return new Projection ( 0.0 , 0.0 , Projection.Type.FAIL );\n if ( ! GLU.gluProject ( (float) x , (float) y , (float) z , this.modelview , this.projection , this.viewport , this.coords ) )\n return new Projection ( 0.0 , 0.0 , Projection.Type.FAIL );\n double guiX = (double) this.coords.get ( 0 ) * this.widthScale;\n double guiY = ( this.displayHeight - (double) this.coords.get ( 1 ) ) * this.heightScale;\n if ( opposite ) {\n guiX = this.displayWidth * this.widthScale - guiX;\n guiY = this.displayHeight * this.heightScale - guiY;\n }\n if ( guiX < 0.0 ) {\n guiX = 0.0;\n } else if ( guiX > this.displayWidth * this.widthScale ) {\n guiX = this.displayWidth * this.widthScale;\n }\n if ( guiY < 0.0 ) {\n guiY = 0.0;\n return new Projection ( guiX , guiY , outsideInvertedFrustum ? Projection.Type.OUTSIDE : Projection.Type.INVERTED );\n } else {\n if ( ! ( guiY > this.displayHeight * this.heightScale ) )\n return new Projection ( guiX , guiY , outsideInvertedFrustum ? Projection.Type.OUTSIDE : Projection.Type.INVERTED );\n guiY = this.displayHeight * this.heightScale;\n }\n return new Projection ( guiX , guiY , outsideInvertedFrustum ? Projection.Type.OUTSIDE : Projection.Type.INVERTED );\n }\n if ( ! GLU.gluProject ( (float) x , (float) y , (float) z , this.modelview , this.projection , this.viewport , this.coords ) )\n return new Projection ( 0.0 , 0.0 , Projection.Type.FAIL );\n double guiX = (double) this.coords.get ( 0 ) * this.widthScale;\n double guiY = ( this.displayHeight - (double) this.coords.get ( 1 ) ) * this.heightScale;\n if ( ! opposite )\n return new Projection ( guiX , guiY , outsideInvertedFrustum ? Projection.Type.OUTSIDE : Projection.Type.INVERTED );\n guiX = this.displayWidth * this.widthScale - guiX;\n guiY = this.displayHeight * this.heightScale - guiY;\n return new Projection ( guiX , guiY , outsideInvertedFrustum ? Projection.Type.OUTSIDE : Projection.Type.INVERTED );\n }\n if ( ! GLU.gluProject ( (float) x , (float) y , (float) z , this.modelview , this.projection , this.viewport , this.coords ) )\n return new Projection ( 0.0 , 0.0 , Projection.Type.FAIL );\n double guiX = (double) this.coords.get ( 0 ) * this.widthScale;\n double guiY = ( this.displayHeight - (double) this.coords.get ( 1 ) ) * this.heightScale;\n return new Projection ( guiX , guiY , Projection.Type.INSIDE );\n }", "public MessageTeleportPlayer(int x, int y, int z) \r\n\t{\r\n\t\tposX = x;\r\n\t\tposY = y;\r\n\t\tposZ = z;\r\n\t}", "public DynamicModelPart setZ(float[] z) {\n this.z = z;\n return this;\n }", "public Vector3 () {\n }" ]
[ "0.7027603", "0.6710127", "0.64007527", "0.638012", "0.63569206", "0.6270587", "0.61701566", "0.61361694", "0.60152155", "0.59945226", "0.59290123", "0.5915713", "0.5895436", "0.58844906", "0.5882448", "0.58750653", "0.58629316", "0.5858374", "0.57952696", "0.5776175", "0.577502", "0.5768589", "0.57671964", "0.5755256", "0.5738024", "0.5715646", "0.57057726", "0.56932783", "0.5674607", "0.5654032", "0.5597976", "0.55914736", "0.5547602", "0.54964674", "0.54613227", "0.54591894", "0.54455274", "0.5422067", "0.54071194", "0.5396417", "0.53602487", "0.5356665", "0.53466105", "0.5312337", "0.5302812", "0.5293208", "0.5253803", "0.5253709", "0.525159", "0.5240002", "0.52171135", "0.5210998", "0.52080476", "0.520469", "0.51996726", "0.5197507", "0.5182652", "0.51819676", "0.51787627", "0.51698333", "0.5167095", "0.51189643", "0.5118366", "0.5108577", "0.51077676", "0.51061034", "0.5050617", "0.5044009", "0.5039378", "0.50053227", "0.49998748", "0.49946815", "0.49675813", "0.49670944", "0.49581522", "0.49467406", "0.49407658", "0.49407563", "0.49323136", "0.4927983", "0.49195293", "0.49144843", "0.4911017", "0.49062693", "0.49062192", "0.49022663", "0.48981932", "0.4895765", "0.48939615", "0.4892525", "0.4889453", "0.48867646", "0.48656708", "0.4855148", "0.48511538", "0.4850396", "0.48427725", "0.4795237", "0.4789944", "0.47848412" ]
0.5234415
50
Creates a twist that is constrained to the XZplane. The frames of the new twist cannot be changed.
public static FixedFrameTwistBasics newPlanarFixedFrameTwistBasics(ReferenceFrame bodyFrame, ReferenceFrame baseFrame, ReferenceFrame expressedInFrame) { return new FixedFrameTwistBasics() { private final FixedFrameVector3DBasics angularPart = newYOnlyFixedFrameVector3DBasics(expressedInFrame); private final FixedFrameVector3DBasics linearPart = newXZOnlyFixedFrameVector3DBasics(expressedInFrame); @Override public ReferenceFrame getBodyFrame() { return bodyFrame; } @Override public ReferenceFrame getBaseFrame() { return baseFrame; } @Override public ReferenceFrame getReferenceFrame() { return expressedInFrame; } @Override public FixedFrameVector3DBasics getAngularPart() { return angularPart; } @Override public FixedFrameVector3DBasics getLinearPart() { return linearPart; } @Override public String toString() { return MecanoIOTools.getTwistString(this); } }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Tube(float x) {\r\n topTube = new Texture(\"topTube.png\");\r\n botTube = new Texture(\"botTube.png\");\r\n rand = new Random();\r\n\r\n posTopTube = new Vector2(x, rand.nextInt(FLUCT) + TUBE_GAP + LOWEST_OPENING);\r\n posBotTube = new Vector2(x, posTopTube.y - TUBE_GAP - botTube.getHeight());\r\n\r\n boundsTop = new Rectangle(posTopTube.x, posTopTube.y, topTube.getWidth(), topTube.getHeight());\r\n boundsBot = new Rectangle(posBotTube.x, posBotTube.y, botTube.getWidth(), botTube.getHeight());\r\n }", "public Snowman(int theX, int theY)\n { x = theX;\n y = theY;\n }", "public void reposition(float x) {\r\n posTopTube.set(x, rand.nextInt(FLUCT) + TUBE_GAP + LOWEST_OPENING);\r\n posBotTube.set(x, posTopTube.y - TUBE_GAP - botTube.getHeight());\r\n\r\n boundsTop.setPosition(posTopTube.x, posTopTube.y);\r\n boundsBot.setPosition(posBotTube.x, posBotTube.y);\r\n }", "public abstract void makePlayer(Vector2 origin);", "BoxX(BoxX ob) {\n width = ob.width;\n height = ob.height;\n depth = ob.depth;\n }", "Viewpoint createViewpoint();", "private void placeShip() {\r\n\t\t// Expire the ship ship\r\n\t\tParticipant.expire(ship);\r\n\r\n\t\tclipShip.stop();\r\n\r\n\t\t// Create a new ship\r\n\t\tship = new Ship(SIZE / 2, SIZE / 2, -Math.PI / 2, this);\r\n\t\taddParticipant(ship);\r\n\t\tdisplay.setLegend(\"\");\r\n\t}", "public void setFrameX(double anX) { double x = _x + anX - getFrameX(); setX(x); }", "public Tank(){ //initializes the x, y, and rectangle\n\t\t\tx = 350;\n\t\t\tlx = x + 100;\n\t\t\tly = 490;\n\t\t\tthis.setBounds(x,y,540,200);\n\t\t}", "public Wall(int x1, int y1,int x2,int y2) {\r\n\tthis.x1 = x1 + TRANSLATION;\r\n\tthis.x2 = x2 + TRANSLATION;\r\n\tthis.y1 = y1 + TRANSLATION;\r\n\tthis.y2 = y2 + TRANSLATION;\r\n\tbustedWall = false; \r\n}", "@Override\n\tpublic Simplex2v3d getTangentPlane(float xPos, float zPos) {\n\t\treturn new Simplex2v3d(func.evaluateDerivative(new float[] {xPos, zPos}, 0), func.evaluateDerivative(new float[] {xPos, zPos}, 1), new Vector3f(xPos, getHeight(xPos, zPos), zPos));\n\t}", "public TankModel(float x, float y) {\n super(x, y);\n hp = HP_DEFAULT*2;\n weight = WEIGHT_DEFAULT*3;\n armor = ARMOR_DEFAULT*3;\n width = 75;\n height = 101;\n }", "public Surface(String frame,String origin,String units,float a,float b,float c,float axisAX,float axisAY,float axisAZ,float axisBX,float axisBY,float axisBZ,float axisCX,float axisCY,float axisCZ){\r\n\t\tthis(frame,origin,units,a,units,b,units,c,frame,axisAX,axisAY,axisAZ,frame,axisBX,axisBY,axisBZ,frame,axisCX,axisCY,axisCZ);\r\n\t}", "public Titik(){\r\n this.x = 0;\r\n this.y = 0;\r\n }", "public Tower(int aX , int aY , int aZ, TowerDefense aTD) {\r\n this.x = aX;\r\n this.y = aY;\r\n this.size = 150;\r\n this.z = aZ;\r\n this.firing = false;\r\n this.damage = (1 / 10);\r\n this.td = aTD;\r\n this.cost = 100;\r\n }", "public Skull(int positionX, int positionY) {\n\t\tsuper(positionX, positionY);\n\t\tsuper.setWidth(width);\n\t\tsuper.setheight(height);\n\t\tloadPattern();\n\t\tcurrentPattern = walkPattern;\n\t}", "protected void createFrames() {\n createStandingRight();\n createStandingLeft();\n createWalkingRight();\n createWalkingLeft();\n createJumpingRight();\n createJumpingLeft();\n createDying();\n }", "public Board twin() {\n exchangeFirstKeys(); // exchange (0,0) with (0,1)\n Board twinBoard = new Board(tiles);\n exchangeFirstKeys(); // roll it back\n return twinBoard;\n }", "Point createPoint();", "public Place(int x, int y){\n this.x=x;\n this.y=y;\n isFull=false;\n }", "public void run() {\n\tObjectFrame flange = lbr_iiwa_14_R820_1.getFlange();\t\t//flange frame\n\tObjectFrame lbrRoot = lbr_iiwa_14_R820_1.getRootFrame();\t//root frame\n\t\t\t\n\t// define frames for task trajectory:\n\tFrame F_contactEnd = new Frame(lbrRoot,500,0,385,Math.toRadians(180),Math.toRadians(0),Math.toRadians(180));\n\t\n\tFrame F_tmp = F_contactEnd.copy();\n\t\n\tF_flyMin \t\t= F_tmp.transform(lbrRoot,XyzAbcTransformation.ofTranslation( -40,0, 50)).copy();\n\tF_fly3 \t\t\t= F_tmp.transform(lbrRoot,XyzAbcTransformation.ofTranslation( 40,0, 60)).copy();\n\tF_fly4 \t\t\t= F_tmp.transform(lbrRoot,XyzAbcTransformation.ofTranslation( 200,0, 0)).copy();\n\tF_flyMax \t\t= F_tmp.transform(lbrRoot,XyzAbcTransformation.ofTranslation( 40,0, -60)).copy();\t\t\n\tF_contactStart \t= F_tmp.transform(lbrRoot,XyzAbcTransformation.ofTranslation( -40,0, -50)).copy();\n\t\n\tSystem.out.println(String.format(\"F_flyMin, x: %1$f y: %2$f z: %3$f\", F_flyMin.getX(), F_flyMin.getY(), F_flyMin.getZ()));\n\tSystem.out.println(String.format(\"F_fly3, x: %1$f y: %2$f z: %3$f\", F_fly3.getX(), F_fly3.getY(), F_fly3.getZ()));\n\tSystem.out.println(String.format(\"F_fly4, x: %1$f y: %2$f z: %3$f\", F_fly4.getX(), F_fly4.getY(), F_fly4.getZ()));\n\tSystem.out.println(String.format(\"F_flyMax, x: %1$f y: %2$f z: %3$f\", F_flyMax.getX(), F_flyMax.getY(), F_flyMax.getZ()));\n\tSystem.out.println(String.format(\"F_contactStart, x: %1$f y: %2$f z: %3$f\", F_contactStart.getX(), F_contactStart.getY(), F_contactStart.getZ()));\n\t\n\tSpline flyingPhase_spline = new Spline(\n\t\t\tlin(F_contactEnd),\n\t\t\tspl(F_flyMin).setOrientationType(SplineOrientationType.Ignore),\n\t\t\tlin(F_fly3).setOrientationType(SplineOrientationType.Ignore),\n\t\t\tspl(F_fly4).setOrientationType(SplineOrientationType.Ignore),\n\t\t\tlin(F_flyMax).setOrientationType(SplineOrientationType.Ignore),\n\t\t\tspl(F_contactStart)\n\t\t);\n\t\n\t\n\t// move to standBy position:\n\tSystem.out.println(\"going to standBy position\");\n\tlbr_iiwa_14_R820_1.move(ptp(J_standBy).setJointVelocityRel(vRel_taxing));\n\t\n\n\t\n\t/*\n\tSystem.out.println(\"going to end frame of contact phase\");\n\tlbr_iiwa_14_R820_1.move(lin(F_contactEnd).setCartVelocity(v_taxing));\n\t*/\n\t\n\t/*\n\tlbr_iiwa_14_R820_1.move(lin(F_flyMin).setCartVelocity(v_taxing));\n\tlbr_iiwa_14_R820_1.move(lin(F_fly3).setCartVelocity(v_taxing));\n\tlbr_iiwa_14_R820_1.move(lin(F_fly4).setCartVelocity(v_taxing));\n\t\n\tlbr_iiwa_14_R820_1.move(lin(F_flyMax).setCartVelocity(v_taxing));\n\tlbr_iiwa_14_R820_1.move(lin(F_contactStart).setCartVelocity(v_taxing));\n\tlbr_iiwa_14_R820_1.move(lin(F_contactEnd).setCartVelocity(v_taxing)); \n\t*/\n\t\n\t/*\n\tSystem.out.println(\"start flying phase - spline (3x)\");\n\tfor (int i=1; i<=3; i++)\n\t{\n\t\tlbr_iiwa_14_R820_1.move(flyingPhase_spline.setCartVelocity(v_fly).setCartAcceleration(250));\n\t}\n\t*/\n\t\n\t/*\n\tSystem.out.println(\"start flying phase - batch\");\n\tlbr_iiwa_14_R820_1.moveAsync(batch(\n\t\t\tlin(F_contactEnd),\n\t\t\tlin(F_flyMin).setOrientationType(SplineOrientationType.Ignore),\n\t\t\tlin(F_fly3).setOrientationType(SplineOrientationType.Ignore),\n\t\t\tlin(F_fly4).setOrientationType(SplineOrientationType.Ignore),\n\t\t\tlin(F_flyMax).setOrientationType(SplineOrientationType.Ignore),\n\t\t\tlin(F_contactStart)\n\t).setCartVelocity(v_fly));\n\t*/\n\t\n\t\n\tSystem.out.println(\"Setting impedance mode\");\n\tCartesianImpedanceControlMode cartImpMode = new CartesianImpedanceControlMode();\n\n\t/*\n\tcartImpMode.parametrize(CartDOF.TRANSL).setStiffness(1500);\n\tcartImpMode.parametrize(CartDOF.TRANSL).setDamping(0.7);\n\n\tcartImpMode.parametrize(CartDOF.Z).setStiffness(100);\n\n\tcartImpMode.parametrize(CartDOF.ROT).setStiffness(200);\n\tcartImpMode.parametrize(CartDOF.ROT).setDamping(0.7);\n\n\tcartImpMode.setNullSpaceDamping(0.3);\n\tcartImpMode.setNullSpaceStiffness(0);\n\n\tcartImpMode.setMaxControlForce(30, 30, 30, 10, 10, 10, false);\n\t*/\n\t\n\t// manage data recording\n\tDataRecorder rec = new DataRecorder(); //data recording \n\trec.setFileName(\"Recording.log\");\n\trec.setSampleRate(100);\n\trec.addCartesianForce(lbr_iiwa_14_R820_1.getFlange(),lbrRoot);\n\tStartRecordingAction startAction = new StartRecordingAction(rec);\n\t\n\tForceCondition condstart = ForceCondition.createNormalForceCondition(null, CoordinateAxis.Z, 1); //recording trigger\n\tForceCondition condend = ForceCondition.createNormalForceCondition(null, CoordinateAxis.Z, force_z); //stop movement trigger\n\t\n\t\n\tSystem.out.println(\"going to start frame of contact phase\");\n\tlbr_iiwa_14_R820_1.move(lin(F_contactStart).setCartVelocity(v_taxing).setCartAcceleration(200));\t\n\t\n\t//start cycling\n\tfor (int i_cycle=1; i_cycle <= 3; i_cycle ++)\n\t{\n\t\tSystem.out.println(String.format(\"cycle # %1$d\", i_cycle));\n\t\t\n\t\t//PHASE 1: transition, landing\n\t\t//System.out.println(\"start transition phase, landing, impedance mode \");\n\t\t//lbr_iiwa_14_R820_1.move(linRel(0,0,-dz,lbrRoot).triggerWhen(condstart, startAction).breakWhen(condend).setCartVelocity(v_transition).setMode(cartImpMode));\n\t\t\n\t\tif (i_cycle == 1)\n\t\t{\n\t\t\t// check data recording\n\t\t\tSystem.out.println(\"recording activated\");\n\t\t\tif(rec.isFileAvailable())\n\t\t\t\tSystem.out.println(\"data file available\");\n\t\t\t\n\t\t\tURL url = rec.getURL();\n\t\t\tdummy = url.toString();\n\t\t\tSystem.out.println(dummy);\n\t\t}\n\t\t\n\t\t// print current force value\n\t\tForceSensorData data = lbr_iiwa_14_R820_1.getExternalForceTorque(lbr_iiwa_14_R820_1.getFlange());\n\t\tSystem.out.println(String.format(\"Fz = %1$f \",data.getForce().getZ()));\n\t\t\n\t\t// PHASE 2: contact phase\n\t\t//System.out.println(\"start contact phase, impedance mode\");\n\t\t//lbr_iiwa_14_R820_1.move(lin(F_contactEnd).setCartVelocity(v_contact).setMode(cartImpMode));\n\t\t/*\n\t\t// PHASE 3: transition phase, take off\n\t\tSystem.out.println(\"start transition phase, impedance mode\");\n\t\tlbr_iiwa_14_R820_1.move(linRel(0,0,dz,lbrRoot).setCartVelocity(v_transition).setMode(cartImpMode));\n\t\t*/\n\t\t// PHASE 4: flying phase \n\t\tSystem.out.println(\"start flying phase, swift\");\n\t\tlbr_iiwa_14_R820_1.move(flyingPhase_spline.setCartVelocity(v_fly).setCartAcceleration(250).setMode(cartImpMode));\n\t}\n\t\n\t\n\t// stop recording\n\trec.stopRecording();\n\tSystem.out.println(\"data recording stopped\");\n\t\n\t\n\t// move to standBy position:\n\tlbr_iiwa_14_R820_1.move(ptp(J_standBy).setJointVelocityRel(vRel_taxing));\n\t\t\n\t}", "public Board twin() {\r\n\t\tint n = dimension();\r\n\t\tint x = -1;\r\n\t\tfor (int i = 0; i < n; i++) {\r\n\t\t\tfor (int j = 0; j < n; j++) {\r\n\t\t\t\tif (this.blocks[i][j] == 0) {\r\n\t\t\t\t\tx = i;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tint[][] copy = copyBlocks();\r\n\t\tfor (int i = 0; i < n; i++) {\r\n\t\t\tif (i != x) {\r\n\t\t\t\tswap(i, 0, i, 1, copy);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn new Board(copy);\r\n\t}", "public Ninja(int x, int y)\r\n {\r\n super(x, y, 5);\r\n }", "ZTFrame toZTFrame(ZoneId zoneID);", "public PlayerWL() {\n super();\n rotateYAxis = 0;\n positionZ = 0;\n positionX = 0;\n camera = new PerspectiveCamera(true);\n camera.getTransforms().addAll(\n new Rotate(0, Rotate.Y_AXIS),\n new Rotate(-10, Rotate.X_AXIS),\n new Translate(0, 0, 0));\n cameraGroup = new Group(camera);\n camera.setRotationAxis(new Point3D(0, 1, 0));\n }", "Hazard createHazard();", "private Board twinBySwitching(int x1, int y1, int x2, int y2) {\n int value1 = blocks[x1][y1];\n int value2 = blocks[x2][y2];\n\n int[][] newBlocks = new int[dimension()][dimension()];\n for (int i = 0; i < dimension(); i++){\n for (int j = 0; j < dimension(); j++) {\n if (i == x1 && j == y1) {\n newBlocks[i][j] = value2;\n } else if (i == x2 && j == y2) {\n newBlocks[i][j] = value1;\n } else {\n newBlocks[i][j] = blocks[i][j];\n }\n }\n }\n\n return new Board(newBlocks);\n }", "public void addAnimationViewOnTopOfLetter(LottieAnimationView lav, int x, int y, FrameLayout f) {\n lav.setX(x);\n lav.setY(y);\n f.addView(lav, 300, 300);\n lav.playAnimation();\n lav.addAnimatorListener(new Animator.AnimatorListener() {\n @Override\n public void onAnimationStart(Animator animation) {\n }\n\n @Override\n public void onAnimationEnd(Animator animation) {\n f.removeView(lav);\n }\n\n @Override\n public void onAnimationCancel(Animator animation) {\n }\n\n @Override\n public void onAnimationRepeat(Animator animation) {\n }\n });\n }", "public Skull(double x, double y) {\n\t\tsuper(x, y);\n\t\t\n\t\tangle = 0;\n\t\t\n\t\tnumberGen = 694.2953; //681.7969; was ok\n\t\t\n\t\tjesusFuckingChrist = false;\n\t\t\n\t\tkeptSeedX = new double[2];\n\t\twipeSeedRecord();\n\t\t\n\t\ttargetX = 320;\n\t\t\n\t\timLeaving = false;\n\t\t\n\t\thavePetals = petals;\n\t\t\n\t\tme = this;\n\t\tmySeed = null;\n\t\t\n\t\tseedClaimedWhistle = null;\n\t\t\n\t\tflowerX = 0;\n\t\tflowerY = 0;\n\t\t\n\t\tjetpackTimer = -1;\n\t\t\n\t\tsqueezeTimer = -1;\n\t\t\n\t\thurt = -1;\n\t\t\n\t\tsetDepth(-10);\n\t\tsetCollisionGroup(Global.BASICENEMY, Global.DEACTIVATEME);\n\t\t\n\t\thealth = maxHealth;\n\t\t//health = 1;\n\t\tanimateSpeed = .3;\n\t\t\n\t\tspd = new double[stemParts];\n\t\ttoSpd = new double[stemParts];\n\t\tang = new double[stemParts];\n\t\t\n\t\tdist = new double[petals];\n\t\t\n\t\tfor (int i=0; i<stemParts; i++){\n\t\t\tif (i == 0)\n\t\t\t\tang[i] = 90 + Calc.rangedRandom(20);\n\t\t\telse\n\t\t\t\tang[i] = Calc.rangedRandom(12 - (11.0 * ((double)i/(double)stemParts)));\n\t\t\tspd[i] = 2 + (4 * ((double)i / (double)stemParts));\n\t\t\tspd[i] *= (Double)Calc.choose(1.0,-1.0);\n\t\t\ttoSpd[i] = spd[i];\n\t\t}\n\t\t\n\t\tfor (int i=0; i<petals; i++){\n\t\t\tdist[i] = 0;\n\t\t}\n\t\t\n\t\tquiverPetals(30);\n\t}", "@Test\n\tpublic void testZhang() throws Exception {\n\t\tfinal List<Point2dImpl> modelPoints = loadModelPoints();\n\t\tfinal List<List<Point2dImpl>> points = loadImagePoints();\n\n\t\tfinal List<List<? extends IndependentPair<? extends Point2d, ? extends Point2d>>> pointMatches =\n\t\t\t\tnew ArrayList<List<? extends IndependentPair<? extends Point2d, ? extends Point2d>>>();\n\n\t\tfor (int i = 0; i < points.size(); i++) {\n\t\t\tfinal List<IndependentPair<Point2dImpl, Point2dImpl>> data =\n\t\t\t\t\tIndependentPair.pairList(modelPoints, points.get(i));\n\t\t\tpointMatches.add(data);\n\t\t}\n\n\t\tfinal CameraCalibrationZhang calib = new CameraCalibrationZhang(pointMatches, 640, 480);\n\t\tfinal CameraIntrinsics intrisics = calib.getIntrisics();\n\n\t\tassertEquals(832.5, intrisics.getFocalLengthX(), EPS_PIX);\n\t\tassertEquals(0.204494, intrisics.getSkewFactor(), EPS);\n\t\tassertEquals(832.53, intrisics.getFocalLengthY(), EPS_PIX);\n\t\tassertEquals(303.959, intrisics.getPrincipalPointX(), EPS_PIX);\n\t\tassertEquals(206.585, intrisics.getPrincipalPointY(), EPS_PIX);\n\n\t\tassertEquals(-0.228601, intrisics.k1, EPS);\n\t\tassertEquals(0.190353, intrisics.k2, EPS);\n\n\t\tfinal double[][] e1 = {\n\t\t\t\t{ 0.992759, -0.026319, 0.117201 },\n\t\t\t\t{ 0.0139247, 0.994339, 0.105341 },\n\t\t\t\t{ -0.11931, -0.102947, 0.987505 } };\n\t\tfinal double[] t1 = { -3.84019, 3.65164, 12.791 };\n\t\tcheckValues(e1, t1, calib.getCameras().get(0));\n\n\t\tfinal double[][] e2 = {\n\t\t\t\t{ 0.997397, -0.00482564, 0.0719419 },\n\t\t\t\t{ 0.0175608, 0.983971, -0.17746 },\n\t\t\t\t{ -0.0699324, 0.178262, 0.981495 } };\n\t\tfinal double[] t2 = { -3.71693, 3.76928, 13.1974 };\n\t\tcheckValues(e2, t2, calib.getCameras().get(1));\n\n\t\tfinal double[][] e3 = {\n\t\t\t\t{ 0.915213, -0.0356648, 0.401389 },\n\t\t\t\t{ -0.00807547, 0.994252, 0.106756 },\n\t\t\t\t{ -0.402889, -0.100946, 0.909665 } };\n\t\tfinal double[] t3 = { -2.94409, 3.77653, 14.2456 };\n\t\tcheckValues(e3, t3, calib.getCameras().get(2));\n\n\t\tfinal double[][] e4 = {\n\t\t\t\t{ 0.986617, -0.0175461, -0.16211 },\n\t\t\t\t{ 0.0337573, 0.994634, 0.0977953 },\n\t\t\t\t{ 0.159524, -0.101959, 0.981915 } };\n\t\tfinal double[] t4 = { -3.40697, 3.6362, 12.4551 };\n\t\tcheckValues(e4, t4, calib.getCameras().get(3));\n\n\t\tfinal double[][] e5 = {\n\t\t\t\t{ 0.967585, -0.196899, -0.158144 },\n\t\t\t\t{ 0.191542, 0.980281, -0.0485827 },\n\t\t\t\t{ 0.164592, 0.0167167, 0.98622 } };\n\t\tfinal double[] t5 = { -4.07238, 3.21033, 14.3441 };\n\t\tcheckValues(e5, t5, calib.getCameras().get(4));\n\t}", "public static Vect3 make(double x, double y, double z) {\n\t\treturn new Vect3(Units.from(\"NM\",x),Units.from(\"NM\",y),Units.from(\"ft\",z));\n\t}", "protected Place(float x, float y) {\n position = new PointF(x, y);\n }", "public Board twin() {\n Board twin;\n int[][] input = numArray(this.tiles);\n if (input[0][0] != 0 && input[0][1] != 0)\n twin = new Board(swap(input, 0, 0, 0, 1));\n else\n twin = new Board(swap(input, 1, 0, 1, 1));\n return twin;\n }", "private void createRock() {\n\n // generate x,y coordinates\n\n RockView newRock = new RockView(getWidth(), currentSpeed, gameLevel-1);\n newRock.setCenter(getRandCoordinate());\n\n // assign city target deending on what third of the screen the rock was created in\n\n float maxWidth = getWidth() / density;\n float boundry1 = maxWidth / 3;\n float boundry2 = (maxWidth * 2) / 3;\n\n int target;\n if (newRock.getCenter().x > 0 && newRock.getCenter().x < boundry1) {\n target = 0;\n } else if (newRock.getCenter().x > boundry1 && newRock.getCenter().x < boundry2) {\n target = 1;\n } else {\n target = 2;\n }\n\n newRock.setTarget(cityLocations[target]);\n\n // add rock to array of rocks\n rockList.add(newRock);\n\n }", "public void createNew(int xSize, int ySize, int countOfMines);", "void makeNew(int x, int y)\n\t{\n\t\tPair temp = new Pair(x,y);\n\t\tmySeq.add(temp);\n\t}", "public void place(float x,float y){\n\t\tz=0.2f+Main.world.land.getHigh(Main.world.timeline.getTerra(),(int)x, (int)y);\r\n\t\tMain.world.contacts(this);\r\n\t\tz+=getTopObjects();\r\n\t\tplace(x,y,z);\r\n\t}", "protected void skybox() {\n Triple pos1, pos2, pos3, pos4, pos5, pos6, pos7, pos8, col1, col2, col3, col4;\n\n pos1 = new Triple(0, 0, 0);\n pos2 = new Triple(100, 0, 0);\n pos3 = new Triple(100, 0, 100);\n pos4 = new Triple(0, 0, 100);\n pos5 = new Triple(0, 100, 0);\n pos6 = new Triple(100, 100, 0);\n pos7 = new Triple(100, 100, 100);\n pos8 = new Triple(0, 100, 100);\n\n // Front Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos1, 0, 0),\n new Vertex(pos2, .25, 0),\n new Vertex(pos3, .25, 1),\n 21 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos3, .25, 1),\n new Vertex(pos4, 0, 1),\n new Vertex(pos1, 0, 0),\n 21 ) );\n\n // Left Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos1, 1, 0),\n new Vertex(pos5, .75, 0),\n new Vertex(pos8, .75, 1),\n 21 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos8, .75, 1),\n new Vertex(pos4, 1, 1),\n new Vertex(pos1, 1, 0),\n 21 ) );\n\n // Right Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos2, .25, 0),\n new Vertex(pos6, .5, 0),\n new Vertex(pos7, .5, 1),\n 21 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos7, .5, 1),\n new Vertex(pos3, .25, 1),\n new Vertex(pos2, .25, 0),\n 21 ) );\n\n // Back Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos5, .75, 0),\n new Vertex(pos6, .5, 0),\n new Vertex(pos7, .5, 1),\n 21 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos7, .5, 1),\n new Vertex(pos8, .75, 1),\n new Vertex(pos5, .75, 0),\n 21 ) );\n\n // Top Triangles\n// frozenSoups.addTri( new Triangle(new Vertex(pos4, 0, 0),\n// new Vertex(pos3, 0, 1),\n// new Vertex(pos7, 1, 1),\n// 20 ) );\n\n// frozenSoups.addTri( new Triangle(new Vertex(pos7, 0, 0),\n// new Vertex(pos8, 1, 0),\n// new Vertex(pos4, 1, 1),\n// 20 ) );\n }", "Position createPosition();", "@Override\n\tprotected void createFrameOrbit( String frameColor )\n\t{\n\t\t\n AlgebraicField hf = this .mField;\n\n AlgebraicNumber one = hf .one();\n AlgebraicNumber s = hf .getAffineScalar().reciprocal(); // reciprocal of sigma\n AlgebraicNumber R = hf .createPower( 1 ) .times( s ); // rho / sigma\n\n // (-s,1) Y\n // +---+------ [2] ---------+-----------+--------+---+\n // / / / (s,R) / /\n // +---+--------+-----------+--------- [1] ------+---+\n // / / / / / /\n // / / / / / / /\n // / / / / / /\n // (-1,s) [3] -+--------+-----------+-----------+--------+---+\n // / / / / / /\n // / / / / / / /\n // / / / / / / /\n // / / / / / \n // +---+--------+--------- O ---------+--------+- [0] (1,0) X\n // / / / / / \n // / / / /<--- s --->/ / /\n // / / / /<-------- R ------->/ /\n // / / /<---------- 1 --------->/\n // +- [4| ------+-----------+-----------+--------+---+\n // / (-R,-s) / / / / /\n // / / / / / / /\n // / / / / / (R,-R) /\n // +---+--------+-----------+-----------+------ [6] -+\n // / / / / /\n // +---+--------+--------- [5] ---------+--------+---+\n // (0,-1)\n \n AlgebraicVector zAxis = hf .basisVector( 3, AlgebraicVector.Z );\n AlgebraicVector zAxisNeg = zAxis .negate();\n AlgebraicVector axis0 = hf .basisVector( 3, AlgebraicVector.X );\n AlgebraicVector axis1 = hf .origin( 3 )\n \t\t.setComponent( AlgebraicVector.X, s )\n\t\t\t\t.setComponent( AlgebraicVector.Y, R );\n AlgebraicVector axis2 = hf .origin( 3 )\n \t\t.setComponent( AlgebraicVector.X, s .negate() )\n\t\t\t\t.setComponent( AlgebraicVector.Y, one );\n AlgebraicVector axis3 = hf .origin( 3 )\n \t\t.setComponent( AlgebraicVector.X, one .negate() )\n\t\t\t\t.setComponent( AlgebraicVector.Y, s );\n AlgebraicVector axis4 = hf .origin( 3 )\n \t\t.setComponent( AlgebraicVector.X, R .negate() )\n\t\t\t\t.setComponent( AlgebraicVector.Y, s .negate() );\n AlgebraicVector axis5 = hf .origin( 3 )\n\t\t\t\t.setComponent( AlgebraicVector.Y, one .negate() );\n AlgebraicVector axis6 = hf .origin( 3 )\n \t\t.setComponent( AlgebraicVector.X, R )\n\t\t\t\t.setComponent( AlgebraicVector.Y, R .negate() );\n\n // all mMatrices are mappings of [X,Y,Z] = [ axis0, -axis5, zAxis ]\n mMatrices[ 0 ] = hf .identityMatrix( 3 );\n mMatrices[ 1 ] = new AlgebraicMatrix( axis1, axis6 .negate(), zAxis );\n mMatrices[ 2 ] = new AlgebraicMatrix( axis2, axis0 .negate(), zAxis );\n mMatrices[ 3 ] = new AlgebraicMatrix( axis3, axis1 .negate(), zAxis );\n mMatrices[ 4 ] = new AlgebraicMatrix( axis4, axis2 .negate(), zAxis );\n mMatrices[ 5 ] = new AlgebraicMatrix( axis5, axis3 .negate(), zAxis );\n mMatrices[ 6 ] = new AlgebraicMatrix( axis6, axis4 .negate(), zAxis );\n \n mMatrices[ 7 ] = new AlgebraicMatrix( axis0, axis2 .negate(), zAxisNeg );\n mMatrices[ 8 ] = mMatrices[ 1 ] .times( mMatrices[ 7 ] );\n mMatrices[ 9 ] = mMatrices[ 2 ] .times( mMatrices[ 7 ] );\n mMatrices[ 10 ] = mMatrices[ 3 ] .times( mMatrices[ 7 ] );\n mMatrices[ 11 ] = mMatrices[ 4 ] .times( mMatrices[ 7 ] );\n mMatrices[ 12 ] = mMatrices[ 5 ] .times( mMatrices[ 7 ] );\n mMatrices[ 13 ] = mMatrices[ 6 ] .times( mMatrices[ 7 ] );\n\t}", "SimpleGen(X objX, Y objY){\n\t\tthis.objXReff=objX;\n\t\tthis.objYReff=objY;\n\t}", "public static Transform newXRotation(float th){\n float sinth = (float) Math.sin(th);\n float costh = (float) Math.cos(th);\n return new Transform(new float[][]{\n {1.0f, 0.0f, 0.0f, 0.0f},\n {0.0f, costh, -sinth, 0.0f},\n {0.0f, sinth, costh, 0.0f},\n {0.0f, 0.0f, 0.0f, 1.0f}\n });\n }", "public Zoe(int x, int y) {\r\n super('&', 5, x, y);\r\n }", "static float[] makeSwell(float x, float y, float z,\n float scale, float pt_size, float f0, float f1,\n float[] vx, float[] vy, float[] vz, int[] numv) {\n \n float d, xd, yd;\n float x0, y0, x1, y1, x2, y2, x3, y3, x4, y4;\n float sscale = 0.75f * scale;\n \n float[] mbarb = new float[4];\n mbarb[0] = x;\n mbarb[1] = y;\n \n float swell_height = (float) Math.sqrt(f0 * f0 + f1 * f1);\n \n int lenv = vx.length;\n int nv = numv[0];\n \n //determine the initial (minimum) length of the flag pole\n if (swell_height >= 0.1f) {\n // normalize direction\n x0 = f0 / swell_height;\n y0 = f1 / swell_height;\n \n float start_arrow = 0.9f * sscale;\n float end_arrow = 1.9f * sscale;\n float arrow_head = 0.3f * sscale;\n x1 = (x + x0 * start_arrow);\n y1 = (y + y0 * start_arrow);\n x2 = (x + x0 * end_arrow);\n y2 = (y + y0 * end_arrow);\n \n // draw arrow shaft\n vx[nv] = x1;\n vy[nv] = y1;\n vz[nv] = z;\n nv++;\n vx[nv] = x2;\n vy[nv] = y2;\n vz[nv] = z;\n nv++;\n \n mbarb[2] = x2;\n mbarb[3] = y2;\n \n xd = x2 - x1;\n yd = y2 - y1;\n \n x3 = x2 - 0.3f * (xd - yd);\n y3 = y2 - 0.3f * (yd + xd);\n x4 = x2 - 0.3f * (xd + yd);\n y4 = y2 - 0.3f * (yd - xd);\n \n // draw arrow head\n vx[nv] = x2;\n vy[nv] = y2;\n vz[nv] = z;\n nv++;\n vx[nv] = x3;\n vy[nv] = y3;\n vz[nv] = z;\n nv++;\n \n vx[nv] = x2;\n vy[nv] = y2;\n vz[nv] = z;\n nv++;\n vx[nv] = x4;\n vy[nv] = y4;\n vz[nv] = z;\n nv++;\n \n int shi = (int) (10.0f * (swell_height + 0.5f));\n float shf = 0.1f * shi;\n String sh_string = Float.toString(shf);\n int point = sh_string.indexOf('.');\n sh_string = sh_string.substring(0, point + 2);\n double[] start = {x, y - 0.25 * sscale, 0.0};\n double[] base = {0.5 * sscale, 0.0, 0.0};\n double[] up = {0.0, 0.5 * sscale, 0.0};\n VisADLineArray array =\n PlotText.render_label(sh_string, start, base, up, true);\n int nl = array.vertexCount;\n int k = 0;\n for (int i=0; i<nl; i++) {\n vx[nv] = array.coordinates[k++];\n vy[nv] = array.coordinates[k++];\n vz[nv] = array.coordinates[k++];\n nv++;\n }\n }\n else { // if (swell_height < 0.1)\n \n // wind < 2.5 kts. Plot a circle\n float rad = (0.7f * pt_size);\n \n // draw 8 segment circle, center = (x, y), radius = rad\n // 1st segment\n vx[nv] = x - rad;\n vy[nv] = y;\n vz[nv] = z;\n nv++;\n vx[nv] = x - 0.7f * rad;\n vy[nv] = y + 0.7f * rad;\n vz[nv] = z;\n nv++;\n // 2nd segment\n vx[nv] = x - 0.7f * rad;\n vy[nv] = y + 0.7f * rad;\n vz[nv] = z;\n nv++;\n vx[nv] = x;\n vy[nv] = y + rad;\n vz[nv] = z;\n nv++;\n // 3rd segment\n vx[nv] = x;\n vy[nv] = y + rad;\n vz[nv] = z;\n nv++;\n vx[nv] = x + 0.7f * rad;\n vy[nv] = y + 0.7f * rad;\n vz[nv] = z;\n nv++;\n // 4th segment\n vx[nv] = x + 0.7f * rad;\n vy[nv] = y + 0.7f * rad;\n vz[nv] = z;\n nv++;\n vx[nv] = x + rad;\n vy[nv] = y;\n vz[nv] = z;\n nv++;\n // 5th segment\n vx[nv] = x + rad;\n vy[nv] = y;\n vz[nv] = z;\n nv++;\n vx[nv] = x + 0.7f * rad;\n vy[nv] = y - 0.7f * rad;\n vz[nv] = z;\n nv++;\n // 6th segment\n vx[nv] = x + 0.7f * rad;\n vy[nv] = y - 0.7f * rad;\n vz[nv] = z;\n nv++;\n vx[nv] = x;\n vy[nv] = y - rad;\n vz[nv] = z;\n nv++;\n // 7th segment\n vx[nv] = x;\n vy[nv] = y - rad;\n vz[nv] = z;\n nv++;\n vx[nv] = x - 0.7f * rad;\n vy[nv] = y - 0.7f * rad;\n vz[nv] = z;\n nv++;\n // 8th segment\n vx[nv] = x - 0.7f * rad;\n vy[nv] = y - 0.7f * rad;\n vz[nv] = z;\n nv++;\n vx[nv] = x - rad;\n vy[nv] = y;\n vz[nv] = z;\n nv++;\n // System.out.println(\"circle \" + x + \" \" + y + \"\" + rad);\n mbarb[2] = x;\n mbarb[3] = y;\n }\n \n numv[0] = nv;\n return mbarb;\n }", "public BlackTile(float posX, float posY, float posZ, float height, float width) {\n super(new Box3D(posX, posY, posZ, height, width, 1f));\n this.setTexture(\"black_tile\");\n this.canWalkOver = true;\n }", "public void create () {\n // TODO random generation of a ~100 x 100 x 100 world\n }", "@Override\n\tpublic AbstractTileOLD createTile(Frame frame, Point pos, Point sourcePos) {\n\t\t// TileOLD t = new TileOLD(frame, pos.x, pos.y, new ZoneSheet(frame,\n\t\t// ZoneSheet.TILE_SHEET), sourcePos.x, sourcePos.y);\n\t\t// t.setData((TileDataOLD) data[sourcePos.x][sourcePos.y]);\n\t\treturn null;\n\t}", "public Tupla2(A x, A y) {\n\t\t \n\t\tthis.fst = x;\n\t\tthis.snd = y;\n\t}", "public Board twin() {\n if (tiles[0][0] != 0 && tiles[0][1] != 0)\n return new Board(tiles, new Position(0, 0), new Position(0, 1));\n else\n return new Board(tiles, new Position(1, 0), new Position(1, 1));\n }", "public Zombie() {\r\n\t\tsuper(myAnimationID, 0, 0, 60, 60);\r\n\t}", "Lehrkraft createLehrkraft();", "public void NewTrail(float[] positions, float trailLength)\n {\n float distanceBetweenEffects = trailLength / instantiateNumber;\n Log.d(\"--WTF--\",\"tl \" + trailLength + \"dbe \" + distanceBetweenEffects);\n //trail.clear();\n trail.get(0).Set(getWorldCoords(new Vec2(positions[0], positions[1]))); // początek\n\n float currUnusedLength = 0f;\n int effects = 1;\n for (int i = 2; i < positions.length; i=i+2)\n {\n // reszta odl. z poprzednich punktow + dystans miedzy tym pkt a poprzednim\n Vec2 A = new Vec2(positions[i-2],positions[i-1]);\n Vec2 B = new Vec2(positions[i],positions[i+1]);\n float distanceBetweenPoints = GetPointsDistance(A,B);\n currUnusedLength = currUnusedLength + distanceBetweenPoints;\n if(currUnusedLength > distanceBetweenEffects)\n {\n // jest wiekszy od odleglosci miedzy kolejnymi efektami, oznacza to ze\n // juz nie czas na umieszczenie kolejnego efektu\n float d = distanceBetweenPoints - (currUnusedLength-distanceBetweenEffects);\n float Xac = d * (B.X()-A.X())/distanceBetweenPoints;\n float Yac = d * (B.Y()-A.Y())/distanceBetweenPoints;\n\n if(effects < instantiateNumber)trail.get(effects).Set(getWorldCoords(new Vec2(A.X()+Xac, A.Y()+Yac)));\n else break;\n\n effects++;\n currUnusedLength = (currUnusedLength-distanceBetweenEffects);\n }\n }\n if(effects <= instantiateNumber)sqNumber = effects;\n else sqNumber = instantiateNumber;\n showThem = true;\n showBigStar = false;\n }", "public RockerSwitch(int x, int y) {\n this.x = x;\n this.y = y;\n this.width = 21;\n this.height = 12;\n state |= STATE_SIZE_FIXED;\n }", "public Wander() \t\r\n\t{ \r\n\t\tm_pos = new Point2d(30,0); \r\n\t\tm_r = 20; \r\n\t\tm_influence = 1; \r\n\t\tm_seekPoint = new Point2d(0,0);\r\n\t\tm_rate = 10;\r\n\t\tinit();\r\n\t}", "protected void addZombie(int x, int y) {\r\n units.add(new EnemyZombie(game, String.format(\"Zombie %d\", game.nextEnemyID()), new Posn(x,y), game.getPlayer(2)));\r\n }", "@Override\n protected Animation<TextureRegion> createAcceleratingAnimation(Arena arena) {\n Texture animated = getAsset(arena, \"spaceship-thrust.png\");\n\n TextureRegion[][] thrustRegion = TextureRegion.split(animated, animated.getWidth() / numberOfAnimations, animated.getHeight());\n\n TextureRegion[] frames = new TextureRegion[numberOfAnimations];\n System.arraycopy(thrustRegion[0], 0, frames, 0, numberOfAnimations);\n\n return new Animation<TextureRegion>(FRAME_TIME, frames);\n }", "public PaperAirplane (int x, int y)\n\t{\n\t\tsuper (x, y);\t//Superclass called to set x and y\n\t\t\n\t\txPoints = new int [3];\t//sets xPoints to have 3 elements\n\t\tyPoints = new int [3];\t//sets yPoints to have 3 elements\n\t\t\n\t\t//Using the getX_Pos () set in the superclass, the following sets the\n\t\t//xDimensions.\n\t\txDimension1 = getX_Pos () - 23;\n\t\txDimension2 = getX_Pos () - 18;\n\t\txDimension3 = getX_Pos () + 22;\n\t\t\n\t\t//Using the getY_Pos () set in the superclass, the following sets the\n\t\t//yDimensions.\n\t\tyDimension1 = getY_Pos() - 2;\n\t\tyDimension2 = getY_Pos() - 17;\n\t\tyDimension3 = getY_Pos() + 5;\n\t\t\n\t\t//The following sets the same dimensions from above, but these never\n\t\t//change and can be used for reconstruction\n\t\trXD1 = getX_Pos () - 23;\n\t\trXD2 = getX_Pos () - 18;\n\t\trXD3 = getX_Pos () + 22;\n\t\trYD1 = getY_Pos() - 2;\n\t\trYD2 = getY_Pos() - 17;\n\t\trYD3 = getY_Pos() + 5;\n\t}", "public static NewRotateLeft create(AnimatableModelInstance originObject, float ex, float ey, int duration) {\n\n\t\tVector3 posO = originObject.transState.position.cpy();\t\n\t\t//Vector3 posO = new Vector3();\n\t\t//originObject.transform.getTranslation(posO);\n\t\t\n\t\tQuaternion rotation = originObject.transState.rotation.cpy();\t\n\t\t//Quaternion rotation = new Quaternion();\n\t\t//originObject.transform.getRotation(rotation,true); //existing rotation\n\t\t\n\t\t Vector3 axisVec = new Vector3();\n\t float existingangle = (float) (rotation.getAxisAngle(axisVec) * axisVec.nor().z);\n\t existingangle = existingangle < 0 ? existingangle + 360 : existingangle; //convert <0 values\n\t\t\n\t\tGdx.app.log(logstag,\"_____________________________________existing angle=\"+existingangle); //relative to x axis pointing left anticlockwise\n\t\n\t\t//float scalex = originObject.transform.getScaleX(); //get how much the object has been scaled\n\t\t//float scaley = originObject.transform.getScaleY();\n\t\t\n\t\tVector2 fromPoint = new Vector2(posO.x,posO.y); //we need to scale them down due to how the positions might have been scaled up if the matrix is scaled (I hate how matrixs work :-/ Just cant get it in my head)\n\t\tVector2 tooPoint = new Vector2(ex,ey);\n\n\t\tfromPoint.sub(tooPoint); \n\n\t\t//Log.info(\"length=\"+corner2.len());\n\n\t\tfloat angle = 180+fromPoint.angle(); //absolute angle between the two objects\n\t\tGdx.app.log(logstag,\"________target angle=\"+angle); //should point towards ex/ey \n\t\t\n\t//\tfloat distance = fromPoint.len();\n\n\t\t\n\t\t//difference between this angle and existing one\n\t\tangle = angle - existingangle;\n\t\t\n\t\tNewRotateLeft rot = new NewRotateLeft(angle,500);\n\t\t//NewForward forward = new NewForward(distance,duration-500);\n\t\t\t\t\n\t\treturn rot;\n\t}", "Yard createYard();", "public static final Vector<JARWall> createBridge( int x, int y, int width )\n {\n Vector<JARWall> ret = new Vector<JARWall>();\n\n int drawX = x;\n\n //left socket\n ret.add( new JARWall( drawX, y, JARImage.EWallWood1Small, CollisionType.EColliding, DrawingLayer.EBehindPlayer ) );\n ret.add( new JARWall( drawX + 64, y, JARImage.EWallWood1ArcLeft, CollisionType.ENonColliding, DrawingLayer.EBeforePlayer ) );\n ret.add( new JARWall( drawX, y - 64, JARImage.EWallWood1Ascending, CollisionType.EColliding, DrawingLayer.EBehindPlayer ) );\n ret.add( new JARWall( drawX, y - 128, JARImage.EDecoRailing1Ascending, CollisionType.ENonColliding, DrawingLayer.EBeforePlayer ) );\n\n //water\n drawX += 64;\n ret.add( new JARWall( drawX, y, JARImage.EWallWater1, CollisionType.ENonColliding, DrawingLayer.EBehindPlayer ) );\n\n //browse width\n for ( int i = 0; i < width; ++i )\n {\n drawX += 64;\n\n //railing\n ret.add( new JARWall( drawX, y - 128, JARImage.EDecoRailing1, CollisionType.ENonColliding, DrawingLayer.EBeforePlayer ) );\n //rack\n ret.add( new JARWall( drawX, y - 64, JARImage.EWallWood1, CollisionType.EColliding, DrawingLayer.EBehindPlayer ) );\n //water\n drawX += 64;\n ret.add( new JARWall( drawX, y, JARImage.EWallWater1, CollisionType.ENonColliding, DrawingLayer.EBehindPlayer ) );\n }\n\n //right socket\n drawX += 64;\n ret.add( new JARWall( drawX, y - 64, JARImage.EWallWood1Descending, CollisionType.EColliding, DrawingLayer.EBehindPlayer ) );\n ret.add( new JARWall( drawX, y - 128, JARImage.EDecoRailing1Descending, CollisionType.ENonColliding, DrawingLayer.EBeforePlayer ) );\n drawX += 64;\n ret.add( new JARWall( drawX, y, JARImage.EWallWood1Small, CollisionType.EColliding, DrawingLayer.EBehindPlayer ) );\n ret.add( new JARWall( drawX - 64, y, JARImage.EWallWood1ArcRight, CollisionType.ENonColliding, DrawingLayer.EBeforePlayer ) );\n\n return ret;\n }", "public Bomb(int x, int y) {\n\t\tsuper(x, y);\n\t\tthis.state = new Spawned();\n\t\tthis.visualStatus = new SimpleIntegerProperty(0);\n\t}", "private void placeBullet(double x, double y) {\r\n\t\tb = new Bullet(x, y);\r\n\t\taddParticipant(b);\r\n\t\tb.setVelocity(BULLET_SPEED, ship.getRotation());\r\n\t\tnew ParticipantCountdownTimer(b, \"expire\", BULLET_DURATION);\r\n\t}", "FRAME createFRAME();", "public BMTron()\n\t{\n\t\tframe = new JFrame(\"Serpentine\");\n\t\tframe.setVisible(true);\n\t\tframe.setSize(793 + 5, 623 + 25);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.setResizable(false);\n\t\tframe.addKeyListener(this);\n\t\tdraw = new Drawing();\n\t\tframe.add(draw);\n\t\tinitial();\n\t\tinitialize();\n\t\tstartMove();\n\t}", "public static Transform newZRotation(float th){\n float sinth = (float) Math.sin(th);\n float costh = (float) Math.cos(th);\n return new Transform(new float[][]{\n {costh, -sinth, 0.0f, 0.0f},\n {sinth, costh, 0.0f, 0.0f},\n {0.0f, 0.0f, 1.0f, 0.0f},\n {0.0f, 0.0f, 0.0f, 1.0f}\n });\n }", "@Override\n\t//THIS IS THE BULLET HITBOX@@@!\n\tpublic void compile() {\n\t\thitBox = new Polygon();\n\t\thitBox.addPoint((int)getX(), (int)getY());\n\t\thitBox.addPoint((int) getX() + 10, (int) getY());\n\t\thitBox.addPoint((int) getX() + 10, (int) getY() + 10);\n\t\thitBox.addPoint((int) getX(), (int) getY() + 10);\n\t\trotateHitBox(vector.getRadians());\n\t}", "@objid (\"d94b407b-55b6-11e2-877f-002564c97630\")\n @Override\n public PlacementConstraint createPlacementConstraint(final GmModel model, final int x, final int y, final int width, final int height) {\n return new LifelinePlacementConstraint((Lifeline) model.getRelatedElement(),\n x,\n y,\n width,\n height,\n (GmSequenceDiagram) model.getDiagram());\n }", "Surface createSurface();", "Turn createTurn();", "public Kyykka(int x, int y, int z) {\n super(x, y, z, 160, 160, 200, 250); //Double-sized kyykkas for visibility\n this.setSprite(new KyykkaSprite(this));\n this.hasInteracted = false;\n }", "public Board twin()\n {\n // int[][] twinBlocks = new int[N][N];??\n int temp;\n int[][] twinBlocks = convertTo2D(blocks);\n \n if (twinBlocks[0][0] != 0 && twinBlocks[0][1] != 0)\n {\n temp = twinBlocks[0][0];\n twinBlocks[0][0] = twinBlocks[0][1];\n twinBlocks[0][1] = temp;\n }\n \n else\n {\n temp = twinBlocks[1][0];\n twinBlocks[1][0] = twinBlocks[1][1];\n twinBlocks[1][1] = temp;\n }\n \n return new Board(twinBlocks);\n }", "public static void test10(World w){\n\t\tUtilities.generateGeometry2(w.points ,w.pivots, \"Front.png\", \"Side.png\", 1900, 2500, 0, 0, 1/7.0);\r\n\t\t\r\n\t}", "private void createTunnel(int tunnelX, int tunnelWidth, double angle) {\n this.tunnelX = tunnelX;\n this.tunnelWidth = tunnelWidth;\n //calculate the sections of the wall\n int leftWallStart = 0;\n int leftWallEnd = tunnelX - tunnelWidth / 2;\n int leftWallWidth = leftWallEnd - leftWallStart;\n\n int rightWallStart = tunnelX + tunnelWidth / 2;\n int rightWallEnd = AbstractGame.APP_WIDTH;\n int rightWallWidth = rightWallEnd - rightWallStart;\n\n //make walls\n leftWall = new Wall(getWorld(),leftWallStart, (int) getY(), leftWallWidth, length, 0);\n rightWall = new Wall(getWorld(),rightWallStart, (int) getY(), rightWallWidth, length, 0);\n\n //\n if (angle != 0) {\n Rotate rotate = new Rotate(angle);\n leftWall.getMyShape().getTransforms().add(rotate);\n rightWall.getMyShape().getTransforms().add(rotate);\n }\n//add to the section list of objects\n getSectionObjects().add(leftWall);\n getSectionObjects().add(rightWall);\n }", "public wall() { //default constructor makes a 10x10 square extending right and down from the pixel located at 5,5\r\n x = 5;\r\n y = 5;\r\n height = 10;\r\n width = 10;\r\n }", "Frame createFrame();", "public Monster(int x,int y){\n\tposition[0] = x; //x position\n\tposition[1] = y; //y position\n }", "private void createTile(){\n for(int i = 0; i < COPY_TILE; i++){\n for(int k = 0; k < DIFF_TILES -2; k++){\n allTiles.add(new Tile(k));\n }\n }\n }", "public Hobbit(int x, int y) {\n\t\tthis(x, y, GameConstants.HOBBIT_HEALTH, GameConstants.HOBBIT_DAMAGE);\n\t\trewardMana = GameConstants.HOBBIT_REWARD;\n\t\ttryLoad(new File(\"resources/images/hobbit_16p.png\"));\n\t}", "private void init() {\r\n\t\tx = (float) (Math.random() * 2 - 1);\r\n\t\ty = (float) (Math.random() * 2 - 1);\r\n\t\tz[0] = (float) (Math.random() * 3f);\r\n\t\tz[1] = z[0];\r\n\t}", "public void place(float x,float y,float z){\n\t\tthis.x=x;\r\n\t\tthis.y=y;\r\n\t\tthis.z=z;\r\n\t\tdx=x;\r\n\t\tdy=y;\r\n\t\tvz=0;\r\n\t\tvx=0;\r\n\t\tvy=0;\r\n\t}", "void loopy() {\n if (position.y < -50) {\n position.y = Constants.height + 50;\n } else\n if (position.y > Constants.height + 50) {\n position.y = -50;\n }\n if (position.x< -50) {\n position.x = Constants.width +50;\n } else if (position.x > Constants.width + 50) {\n position.x = -50;\n }\n }", "public void Attack(){\n float randomx = (float)(Math.random()-0.5)*attackRange*GameView.instance.cameraSize/10;\n float randomy = (float)(Math.random()-0.5)*attackRange*GameView.instance.cameraSize/5;\n Vector2 target = GameView.instance.player.aimFor();\n float dx = target.x-creationPoint.x;\n float dy =target.y-creationPoint.y;\n float l= (float)Math.sqrt(dx*dx+dy*dy);\n dx = dx/l-((float)Math.random()-0.5f)/2;\n dy = dy/l-(float)(Math.random())/10;\n ProjectilePool.instance.shootArrow(creationPoint.x, creationPoint.y, 1, dx, dy, 3);\n }", "public void displace( double xi, double eta, double[] xyz1 ) {\n dtp2v( xi, eta, x0_, y0_, z0_, xyz1 );\n assert Math.abs( ( xyz1[ 0 ] * xyz1[ 0 ] +\n xyz1[ 1 ] * xyz1[ 1 ] +\n xyz1[ 2 ] * xyz1[ 2 ] ) - 1 ) < 1e-8;\n }", "public void createTurn() {\n Turn turn = new Turn(this.getOnlinePlayers());\n this.setCurrentTurn(turn);\n }", "VolaTile(int x, int y, boolean isSurfaced, Set<VirtualZone> aWatchers, Zone zon) {\n/* 291 */ this.tilex = x;\n/* 292 */ this.tiley = y;\n/* 293 */ this.surfaced = isSurfaced;\n/* 294 */ this.zone = zon;\n/* 295 */ this.watchers = aWatchers;\n/* 296 */ checkTransition();\n/* 297 */ checkIsLava();\n/* */ }", "public void createBullet(String name, double x, double y) {\n Player player = (Player) players.get(name);\r\n if (player != null) {\r\n Bullet bullet = new Bullet(x, y);\r\n bullet.player = name;\r\n playAudio(\"shoot\");\r\n }\r\n }", "public Board twin() {\n int[][] twinBlocks = new int[dimension][dimension];\n for (int i = 0; i < dimension; i++) {\n for (int j = 0; j < dimension; j++) {\n twinBlocks[i][j] = blocks[i * dimension + j];\n }\n }\n if (twinBlocks[0][0] == 0 || twinBlocks[0][1] == 0) swap(twinBlocks, 1, 0, 1, 1);\n else swap(twinBlocks, 0, 0, 0, 1);\n Board twin = new Board(twinBlocks);\n return twin;\n }", "BoxX(double w, double h, double d) {\n width = w;\n height = h;\n depth = d;\n }", "private void genObstacle(Group root, String runwayId, Integer verticalOffset){\n String obstacleId = controller.getRunwayObstacle(runwayId);\n Integer obstacleHeight = controller.getPredefinedObstacleHeight(obstacleId);\n Integer obstacleWidth = controller.getPredefinedObstacleWidth(obstacleId);\n Integer obstacleLength = controller.getPredefinedObstacleLength(obstacleId);\n Integer distanceFromCenterline = controller.getDistanceFromCenterline(runwayId);\n Integer distanceFromThreshold = controller.getDistanceFromThreshold(runwayId) + controller.getObstacleOffset(runwayId);\n\n // Obstacle box fill\n Box obstacle = new Box(obstacleWidth, obstacleHeight, obstacleLength);\n PhongMaterial obstacleMaterial = new PhongMaterial(convertToJFXColour(OBSTACLE_FILL_COLOUR));\n obstacle.setMaterial(obstacleMaterial);\n //The position of the obstacle on the runway has to dependent on the distance from threshold and centerline\n Point runwayPos = controller.getRunwayPos(runwayId);\n obstacle.setTranslateX(runwayPos.x - distanceFromCenterline);\n obstacle.setTranslateZ(-runwayPos.y + distanceFromThreshold + obstacleWidth/2);\n obstacle.setTranslateY(-obstacleHeight/2-verticalOffset);\n obstacle.setDrawMode(DrawMode.FILL);\n\n // Obstacle box borders\n /*Box obstacleStroke = new Box(obstacleWidth, obstacleHeight, obstacleLength);\n PhongMaterial obstacleStrokeMaterial = new PhongMaterial(convertToJFXColour(Settings.OBSTACLE_STROKE_COLOUR));\n obstacleStroke.setMaterial(obstacleStrokeMaterial);\n obstacleStroke.setTranslateX(runwayPos.x - distanceFromCenterline);\n obstacleStroke.setTranslateZ(-runwayPos.y + distanceFromThreshold + obstacleWidth/2);\n obstacleStroke.setTranslateY(-obstacleHeight/2-verticalOffset);\n obstacleStroke.setDrawMode(DrawMode.LINE);*/\n\n// Box slopePlane = genSlope(root, runwayId, verticalOffset);\n\n Rotate rotate = new Rotate(controller.getBearing(runwayId), distanceFromCenterline, 0,-distanceFromThreshold - obstacleWidth/2, Rotate.Y_AXIS);\n obstacle.getTransforms().add(rotate);\n //obstacleStroke.getTransforms().add(rotate);\n// slopePlane.getTransforms().add(rotate);\n\n //root.getChildren().addAll(obstacle, obstacleStroke);\n// root.getChildren().addAll(obstacle, slopePlane);\n root.getChildren().add(obstacle);\n }", "public TransformationMatrix(double x, double y, double z) {\n\t\tthis(1, 0, 0, x, \n\t\t 0, 1, 0, y, \n\t\t 0, 0, 1, z);\n\t}", "public MarsTile(Point position) {\n\t\tthis.weight = 0;\n\t\tthis.position = position;\n\t}", "public void swim() {\r\n\t\tif(super.getPosition()[0] == Ocean.getInstance().getWidth()-71){\r\n\t\t\tinvX = true;\r\n\t\t} else if(super.getPosition()[0] == 0){\r\n\t\t\tinvX = false;\r\n\t\t}\r\n\t\tif(super.getPosition()[1] == Ocean.getInstance().getDepth()-71){\r\n\t\t\tinvY = true;\r\n\t\t} else if(super.getPosition()[1] == 0){\r\n\t\t\tinvY = false;\r\n\t\t}\r\n\t\tif(invX){\r\n\t\t\tsuper.getPosition()[0]-=1;\r\n\t\t} else {\r\n\t\t\tsuper.getPosition()[0]+=1;\r\n\t\t}\r\n\t\tif(invY){\r\n\t\t\tsuper.getPosition()[1]-=1;\r\n\t\t} else {\r\n\t\t\tsuper.getPosition()[1]+=1;\r\n\t\t}\r\n\t}", "public Point transform(double x, double y, double z) {\n\t\t\n\t\n\t\tdouble uIso = (x * xToU) + (y * yToU) + (z * zToU);\n\t\tdouble vIso = (x * xToV) + (y * yToV) + (z * zToV);\n\t\t\n\t\tint uDraw = xOffset + (int)(scale * uIso);\n\t\tint vDraw = yOffset + (int)(scale * vIso);\n\t\t\n\t\treturn new Point(uDraw, vDraw);\n\t}", "public void setSkewXY(double skx, double sky) { setSkewX(skx); setSkewY(sky); }", "private static FXForwardTrade createFxForwardTrade() {\n\n Counterparty counterparty = new SimpleCounterparty(ExternalId.of(Counterparty.DEFAULT_SCHEME, \"COUNTERPARTY\"));\n BigDecimal tradeQuantity = BigDecimal.valueOf(1);\n LocalDate tradeDate = LocalDate.of(2014, 7, 11);\n OffsetTime tradeTime = OffsetTime.of(LocalTime.of(0, 0), ZoneOffset.UTC);\n SimpleTrade trade = new SimpleTrade(createFxForwardSecurity(), tradeQuantity, counterparty, tradeDate, tradeTime);\n trade.setPremium(0.00);\n trade.setPremiumDate(LocalDate.of(2014, 7, 25));\n trade.setPremiumCurrency(Currency.GBP);\n\n FXForwardTrade fxForwardTrade = new FXForwardTrade(trade);\n\n return fxForwardTrade;\n }", "public Flame_Tank(int defx, int defy) {\n\t\tsuper(defx,defy);\n\t\twidth = 58;\n\t\theight = 31;\n\t\thitBox = new Rectangle(defx, defy, width, height); // fix this\n\t\txMaxSpeed = 0.3f;\n\t\tfriction = 0.01f;\n\t\tjumpStrength = 0.5f;\n\t\telasticity = 0.2f;\n\t\thp = 1000;\n\t\t\n\t\ttry {\n\t\t\tblank = new Image (\"res/blank.png\");\n\t\t\tft1 = new Image (\"res/Flare_Tank1.png\");\n\t\t\tft2 = new Image (\"res/Flare_Tank2.png\");\n\t\t\tftb1 = new Image (\"res/Flare_Tank_b1.png\");\n\t\t\tftb2 = new Image (\"res/Flare_Tank_b2.png\");\n\t\t\tftb3 = new Image (\"res/Flare_Tank_b3.png\");\n\t\t\tftb4 = new Image (\"res/Flare_Tank_b4.png\");\n\t\t} catch (SlickException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tftank[0] = ft1;\n\t\tftank[1] = ft2;\n\t\tftank[2] = ft2;\n\t\tftank[3] = ftb1;\n\t\tftank[4] = ftb2;\n\t\tftank[5] = ftb3;\n\t\tftank[6] = ftb4;\n\t\tftank[7] = blank;\n\t\tFlame_tank = new Animation(ftank,200,true);\n\t\t\n\t\tweapons.add(new Weapon(Weapon.getWeapons().get(7)));\n\t\tfor(Weapon w : weapons) {\n\t\t\tw.setEnemy(true);\n\t\t}\n\t\tcurrentWeapon = weapons.get(1);\n\t}", "Obj(double x1, double y1, double z1, double x2, double y2, double z2, double x3, double y3, double z3){\t// CAMBIAR LAS COORDENADAS X,Y,Z CON 0,1 PARA CONSTRUIR PRISMA, CILINDRO, PIRAMIDE, CONO Y ESFERA.\n w\t= new Point3D[4];\n\tvScr\t= new Point2D[4];\n \n w[0]\t= new Point3D(0, 0, 0); // desde la base\n\tw[1]\t= new Point3D(x1, y1, z1);\n\tw[2]\t= new Point3D(x2, y2, z2);\n\tw[3]\t= new Point3D(x3, y3, z3);\n \n\tobjSize = (float) Math.sqrt(12F); \n rho\t= 5 * objSize;\n }", "private Spatial makeCharacter(final float x, final float y, final float z, final EgocentricContextData data) {\n Spatial golem = assetManager.loadModel(\"Models/Oto/Oto.mesh.xml\");\n golem.scale(0.2f);\n golem.setLocalTranslation(x, y, z);\n\n golem.setUserData(EgocentricContextData.TAG, data);\n\n // We must add a light to make the model visible\n DirectionalLight sun = new DirectionalLight();\n sun.setDirection(new Vector3f(-0.1f, -0.7f, -1.0f));\n golem.addLight(sun);\n return golem;\n }", "public void placeDust(double x, double y) {\r\n\r\n\t\t// Place 4 dust objects, and add them as participants\r\n\t\tDust du = new Dust(x, y);\r\n\t\tDust du2 = new Dust(x + 5, y);\r\n\t\tDust du3 = new Dust(x + 5, y + 5);\r\n\t\tDust du4 = new Dust(x, y + 5);\r\n\t\taddParticipant(du);\r\n\t\taddParticipant(du2);\r\n\t\taddParticipant(du3);\r\n\t\taddParticipant(du4);\r\n\r\n\t\t// Set the velocities of the 4 dust objects\r\n\t\tdu.setVelocity(RANDOM.nextInt(16) / 10 + 1, 20);\r\n\t\tdu2.setVelocity(RANDOM.nextInt(16) / 10 + 1, 10);\r\n\t\tdu3.setVelocity(RANDOM.nextInt(16) / 10 + 1, -20);\r\n\t\tdu4.setVelocity(RANDOM.nextInt(16) / 10 + 1, -5);\r\n\r\n\t\t// Expire the 4 dust objects\r\n\t\tnew ParticipantCountdownTimer(du, 2000);\r\n\t\tnew ParticipantCountdownTimer(du2, 2100);\r\n\t\tnew ParticipantCountdownTimer(du3, 2200);\r\n\t\tnew ParticipantCountdownTimer(du4, 2300);\r\n\r\n\t\tdisplay.setLegend(\"\");\r\n\r\n\t}", "public zCoordinates(int x, int y){\n this.x = x;\n this.y = y;\n }" ]
[ "0.49370435", "0.4902606", "0.47344685", "0.463922", "0.4617739", "0.45943516", "0.45435646", "0.44644853", "0.4422914", "0.4405067", "0.4398902", "0.43950287", "0.43802676", "0.4375382", "0.43598446", "0.43521568", "0.43488285", "0.43355876", "0.43326864", "0.4329505", "0.4318308", "0.43160623", "0.43079785", "0.4306111", "0.43045145", "0.4303414", "0.4287122", "0.4287002", "0.42768672", "0.4264487", "0.42622072", "0.4261041", "0.42589152", "0.42438805", "0.42430887", "0.42410612", "0.42371035", "0.4234789", "0.42175058", "0.42163667", "0.42148837", "0.42137736", "0.42131406", "0.42017913", "0.42005643", "0.4199739", "0.41926518", "0.41880822", "0.41800487", "0.4179479", "0.41666055", "0.41594166", "0.41573355", "0.41548562", "0.4152741", "0.41515166", "0.41514271", "0.4150931", "0.41492307", "0.41470665", "0.41452855", "0.41403404", "0.41383272", "0.4135309", "0.41290018", "0.4127027", "0.41193417", "0.41118035", "0.41107187", "0.41055563", "0.41047448", "0.41000503", "0.4099135", "0.40977466", "0.40962335", "0.40919054", "0.40870795", "0.40863737", "0.40809903", "0.40778452", "0.406809", "0.4066354", "0.4063764", "0.40633693", "0.4061794", "0.4060717", "0.40595984", "0.4058679", "0.40576014", "0.4054398", "0.40518734", "0.40517405", "0.4049597", "0.40448588", "0.40436754", "0.4043364", "0.4039874", "0.40393585", "0.40365636", "0.403473" ]
0.4477927
7
Creates a acceleration that is constrained to the XZplane. The frames of the new acceleration cannot be changed.
public static FixedFrameSpatialAccelerationBasics newPlanarFixedFrameSpatialAccelerationVectorBasics(ReferenceFrame bodyFrame, ReferenceFrame baseFrame, ReferenceFrame expressedInFrame) { return new FixedFrameSpatialAccelerationBasics() { private final FixedFrameVector3DBasics angularPart = newYOnlyFixedFrameVector3DBasics(expressedInFrame); private final FixedFrameVector3DBasics linearPart = newXZOnlyFixedFrameVector3DBasics(expressedInFrame); @Override public ReferenceFrame getBodyFrame() { return bodyFrame; } @Override public ReferenceFrame getBaseFrame() { return baseFrame; } @Override public ReferenceFrame getReferenceFrame() { return expressedInFrame; } @Override public FixedFrameVector3DBasics getAngularPart() { return angularPart; } @Override public FixedFrameVector3DBasics getLinearPart() { return linearPart; } @Override public String toString() { return MecanoIOTools.getSpatialAccelerationString(this); } }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private native void UpdateAcceleration(float infAccelerationX, float infAccelerationY, float infAccelerationZ);", "public void setAcceleration(double x, double y, double z) {\n getMotion().setAcceleration(x, y, z);\n }", "public void accelerateXR() {\n double temp;\n temp = this.getxSpeed();\n if (temp <= this.getMaxSpeed()) {\n temp += this.getMaxSpeed() / 10;\n }\n this.setxSpeed(temp);\n }", "private void accelerate()\n {\n if(accelX < maxAccelRate)\n {\n accelX += accelerationRate;\n }\n }", "public Acceleration getGzAsAcceleration() {\n return new Acceleration(mGz, AccelerationUnit.METERS_PER_SQUARED_SECOND);\n }", "public void onAccelerationChanged(float x, float y, float z) {\n\n }", "public Acceleration getGxAsAcceleration() {\n return new Acceleration(mGx, AccelerationUnit.METERS_PER_SQUARED_SECOND);\n }", "private static Vector2 calculateAcceleration(PhysicsGameObject obj){\n Vector2 gravity = gravityForce(obj);\n Vector2 friction = frictionForce(obj);\n return new Vector2(friction.x + gravity.x,friction.y + gravity.y);\n }", "public void restrictAcceleration() {\n\t\tif (acceleration.x > MAX_ACCELERATION.x)\r\n\t\t\tacceleration.x = MAX_ACCELERATION.x;\r\n\t\tif (acceleration.y > MAX_ACCELERATION.y)\r\n\t\t\tacceleration.y = MAX_ACCELERATION.y;\r\n\t\t\r\n\t\t// Caps Deceleration at Max Deceleration.\r\n\t\tif (acceleration.x < MAX_DECELERATION.x)\r\n\t\t\tacceleration.x = MAX_DECELERATION.x;\r\n\t\tif (acceleration.y < MAX_DECELERATION.y)\r\n\t\t\tacceleration.y = MAX_DECELERATION.y;\r\n\t}", "public float getAccelX() {\n return mAccelX;\n }", "public void setAcceleration(double acceleration) {\r\n this.acceleration = acceleration;\r\n }", "@Override\n public void setAcceleration(float x, float y, float z, byte[] array) {\n String accelerationString = getString(motion_acceleration_g);\n accelerationX.setText(String.format(accelerationString, x));\n\n accelerationX.setText(\"testing\");\n //String accelString = getString(array[0] + array [1]);\n //acceleration_x1.setText(\"test\");\n //acceleration_x1.setText(String.format(accelerationString, y));\n /*accelerationY.setText(String.format(accelerationString, y));\n accelerationZ.setText(String.format(accelerationString, z));*/\n }", "public void getGzAsAcceleration(final Acceleration result) {\n result.setValue(mGz);\n result.setUnit(AccelerationUnit.METERS_PER_SQUARED_SECOND);\n }", "public void inertia_x() {\n if (!isMovingLeft && !isMovingRight) {\n if (Math.abs(speedX) < acceleration) speedX = 0;\n else if (speedX < 0) speedX += acceleration;\n else speedX -= acceleration;\n }\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}", "public abstract Vector4fc rotateX(float angle);", "public void setFrameX(double anX) { double x = _x + anX - getFrameX(); setX(x); }", "public void setAcceleration(Vector2D acceleration)\n\t{\n\t\tthis.acceleration = acceleration;\n\t}", "public Builder setAccZ(float value) {\n bitField0_ |= 0x00000010;\n accZ_ = value;\n onChanged();\n return this;\n }", "public void setAcceleration(Vector3d acceleration) {\n getMotion().setAcceleration(acceleration);\n }", "public void accelerate(float acceleration)\n\t{\n\t\t\n\t\tif(type == PhysicsType.BULLET)\n\t\t{\n\t\t\t// apply double force to front wheels instead of single force to all wheels\n\t\t\tbulletVehicleControl.accelerate(0, 2*acceleration);\n\t\t\tbulletVehicleControl.accelerate(1, 2*acceleration);\n\t\t}\n\t\telse\n\t\t\tchronoVehicleControl.setAcceleratorPedalIntensity(-acceleration/1000f);\n\t}", "public void accelerate(){\n double acceleration = .1;\n if(xVel<0)\n xVel-=acceleration;\n if(xVel>0)\n xVel+=acceleration;\n if(yVel<0)\n yVel-=acceleration;\n if(yVel>0)\n yVel+=acceleration;\n System.out.println(xVel + \" \" + yVel);\n \n }", "private Vector2d acceleration(Vector2d position, Vector2d velocity) {\n\t\tVector2d gradient = course.height.gradient(position);\n\t\tdouble accelerationX = -GRAVITY * (gradient.x + course.getFriction() * velocity.x / velocity.length());\n\t\tdouble accelerationY = -GRAVITY * (gradient.y + course.getFriction() * velocity.y / velocity.length());\n\t\treturn new Vector2d(accelerationX,accelerationY);\n\t}", "public float getAccelZ() {\n return mAccelZ;\n }", "public void getGxAsAcceleration(final Acceleration result) {\n result.setValue(mGx);\n result.setUnit(AccelerationUnit.METERS_PER_SQUARED_SECOND);\n }", "public void setX() {\n m_frontLeft.setDesiredState(new SwerveModuleState(0, Rotation2d.fromDegrees(45)));\n m_frontRight.setDesiredState(new SwerveModuleState(0, Rotation2d.fromDegrees(-45)));\n m_rearLeft.setDesiredState(new SwerveModuleState(0, Rotation2d.fromDegrees(-45)));\n m_rearRight.setDesiredState(new SwerveModuleState(0, Rotation2d.fromDegrees(45)));\n }", "@NativeType(\"ovrVector3f\")\n public OVRVector3f AngularAcceleration() { return nAngularAcceleration(address()); }", "public void place(float x,float y,float z){\n\t\tthis.x=x;\r\n\t\tthis.y=y;\r\n\t\tthis.z=z;\r\n\t\tdx=x;\r\n\t\tdy=y;\r\n\t\tvz=0;\r\n\t\tvx=0;\r\n\t\tvy=0;\r\n\t}", "private static FXForwardSecurity createFxForwardSecurity() {\n\n Currency payCurrency = Currency.GBP;\n Currency recCurrency = Currency.USD;\n\n double payAmount = 1_000_000;\n double recAmount = 1_600_000;\n\n ZonedDateTime forwardDate = DateUtils.getUTCDate(2019, 2, 4);\n\n ExternalId region = ExternalSchemes.currencyRegionId(Currency.GBP);\n\n FXForwardSecurity fxForwardSecurity = new FXForwardSecurity(payCurrency, payAmount, recCurrency, recAmount, forwardDate, region);\n\n return fxForwardSecurity;\n }", "private static FXForwardTrade createFxForwardTrade() {\n\n Counterparty counterparty = new SimpleCounterparty(ExternalId.of(Counterparty.DEFAULT_SCHEME, \"COUNTERPARTY\"));\n BigDecimal tradeQuantity = BigDecimal.valueOf(1);\n LocalDate tradeDate = LocalDate.of(2014, 7, 11);\n OffsetTime tradeTime = OffsetTime.of(LocalTime.of(0, 0), ZoneOffset.UTC);\n SimpleTrade trade = new SimpleTrade(createFxForwardSecurity(), tradeQuantity, counterparty, tradeDate, tradeTime);\n trade.setPremium(0.00);\n trade.setPremiumDate(LocalDate.of(2014, 7, 25));\n trade.setPremiumCurrency(Currency.GBP);\n\n FXForwardTrade fxForwardTrade = new FXForwardTrade(trade);\n\n return fxForwardTrade;\n }", "public abstract Vector4fc rotateZ(float angle);", "public double getPlaneX()\n {\n return planeX;\n }", "public Builder setAccX(float value) {\n bitField0_ |= 0x00000004;\n accX_ = value;\n onChanged();\n return this;\n }", "public abstract Vector4fc set(float x, float y, float z, float w);", "protected void calcAcceleration()\n\t{\n\t\tfloat aLength = getAcceleration().getExactLength();\n\t\tif (aLength > 1) { // limit to circular movement\n\t\t\tgetAcceleration().quickNormalize(aLength);\n\t\t}\n\t\tsetAcceleration(Vector2D.getScaled(getAcceleration(), getThrust()));\n\t}", "protected abstract BaseVector3d createBaseVector3d(double x, double y, double z);", "public double getAcceleration() {\r\n return acceleration;\r\n }", "public Airplane(){\n\t\tsuper(106, 111);\n\t\tspeed = Math.random() + 2.0;\n\t}", "public double getAcceleration() {\n return acceleration;\n }", "public PaperAirplane (int x, int y)\n\t{\n\t\tsuper (x, y);\t//Superclass called to set x and y\n\t\t\n\t\txPoints = new int [3];\t//sets xPoints to have 3 elements\n\t\tyPoints = new int [3];\t//sets yPoints to have 3 elements\n\t\t\n\t\t//Using the getX_Pos () set in the superclass, the following sets the\n\t\t//xDimensions.\n\t\txDimension1 = getX_Pos () - 23;\n\t\txDimension2 = getX_Pos () - 18;\n\t\txDimension3 = getX_Pos () + 22;\n\t\t\n\t\t//Using the getY_Pos () set in the superclass, the following sets the\n\t\t//yDimensions.\n\t\tyDimension1 = getY_Pos() - 2;\n\t\tyDimension2 = getY_Pos() - 17;\n\t\tyDimension3 = getY_Pos() + 5;\n\t\t\n\t\t//The following sets the same dimensions from above, but these never\n\t\t//change and can be used for reconstruction\n\t\trXD1 = getX_Pos () - 23;\n\t\trXD2 = getX_Pos () - 18;\n\t\trXD3 = getX_Pos () + 22;\n\t\trYD1 = getY_Pos() - 2;\n\t\trYD2 = getY_Pos() - 17;\n\t\trYD3 = getY_Pos() + 5;\n\t}", "public abstract Vector4fc add(float x, float y, float z, float w);", "public GLGraphics incZ(float zDelta) {\n\t\tthis.z += zDelta;\n\t\treturn this;\n\t}", "public static StateVector acceleration( StateVector state, int ai ){\r\n double x, y, z, r, a;\r\n double G = 6.671984315419034E-11; // G = NASA mu / b[0].m Orbit3D sep 2017 value\r\n a = 0;\r\n StateVector acc = new StateVector();\r\n StateVector s = new StateVector();\r\n\r\n acc.copyStateVectors( state ); // set accelerations to zero\r\n acc.ax = 0;\r\n acc.ay = 0;\r\n acc.az = 0;\r\n\r\n for( int n=0; n<ap.ss.nbodies; n++ ) {\r\n if ( body.activated && body.inFreeMotion && (n != body.num) && (ap.ss.b[n].status == 3) ) {\r\n\r\n x = state.x - ap.ss.b[n].advanced[ai].x; // x distance from m\r\n y = state.y - ap.ss.b[n].advanced[ai].y; // y distance .. ..\r\n z = state.z - ap.ss.b[n].advanced[ai].z; // z distance .. ..\r\n r = Math.sqrt(x * x + y * y + z * z); // distance .. ..\r\n\r\n // only find interactions with massive bodies > 1 kg mass\r\n if ( ap.ss.b[n].m > 1.0 ) {\r\n\r\n // gravitational accelerations act on bodies if > 5 metres distance (to avoid large accelarations)\r\n if ( ap.ss.b[n].status == 3 && ap.ss.b[n].activated && ( r > 5.0 ) ) {\r\n a = -(G * ap.ss.b[n].m) / (r * r); // acceleration towards that\r\n acc.ax = acc.ax + a * x / r; // x component of accel\r\n acc.ay = acc.ay + a * y / r; // y component of accel\r\n acc.az = acc.az + a * z / r; // z component of accel\r\n }\r\n }\r\n }\r\n }\r\n\r\n return( acc );\r\n }", "public static void setAcceleration(int acceleration) {\n leftMotor.setAcceleration(acceleration);\n rightMotor.setAcceleration(acceleration);\n }", "public void compile() {\n\t\tdouble zn = params.getZn();\n\t\tdouble zf = params.getZf();\n\t\tdouble sw = params.getSw();\n\t\tdouble sh = params.getSh();\n\n\t\tdouble d[][] = { { 2 * zn / sw, 0, 0, 0 }, { 0, 2 * zn / sh, 0, 0 },\n\t\t\t\t{ 0, 0, zf / (zf - zn), -zn * zf / (zf - zn) }, { 0, 0, 1, 0 } };\n\t\tTransformation proj = new Transformation(d);\n\t\tmk = proj.mult(VCS);\n\t\tsetChanged();\n\t\tnotifyObservers();\n\t}", "double getAcceleration ();", "public void displace( double xi, double eta, double[] xyz1 ) {\n dtp2v( xi, eta, x0_, y0_, z0_, xyz1 );\n assert Math.abs( ( xyz1[ 0 ] * xyz1[ 0 ] +\n xyz1[ 1 ] * xyz1[ 1 ] +\n xyz1[ 2 ] * xyz1[ 2 ] ) - 1 ) < 1e-8;\n }", "void setAcceleration(double acc) {\r\n if (acc * ACCELERATION_COST_FACTOR <= energy) {\r\n rAcc = acc;\r\n xAcc = rAcc * Math.cos(orientation);\r\n yAcc = rAcc * Math.sin(orientation);\r\n }\r\n }", "@Override\r\n\tpublic WB_Normal3d addAndCopy(final double x, final double y, final double z) {\r\n\t\treturn new WB_Normal3d(this.x + x, this.y + y, this.z + z);\r\n\t}", "public void rotateX(int angle) {\n\t\tint sin = Model.sin[angle];\n\t\tint cos = Model.cos[angle];\n\t\tfor (int v = 0; v < vertexCount; v++) {\n\t\t\tint y_ = ((vertexY[v] * cos) - (vertexZ[v] * sin)) >> 16;\n\t\t\tvertexZ[v] = ((vertexY[v] * sin) + (vertexZ[v] * cos)) >> 16;\n\t\t\tvertexY[v] = y_;\n\t\t}\n\t}", "private void UpdateAcceleration()\n\t{\n\t\tVector2 newAcceleration = new Vector2(0,0);\n\t\t\n\t\tfor(int i=0;i<forcesList.size();i++)\n\t\t{\n\t\t\tnewAcceleration.x += forcesList.get(i).force.x / mass;\n\t\t\tnewAcceleration.y += forcesList.get(i).force.y / mass;\n\t\t\t\n\t\t\tif(forcesList.get(i).mode == ForceMode.Impulse)\n\t\t\t{\n\t\t\t\tRemoveForce(forcesList.get(i));\n\t\t\t}\n\t\t}\n\t\tacceleration = newAcceleration;\n\t\t\n\t\tfloat newAngularAcc = 0;\n\t\t\n\t\tfor(int i=0;i<torqueList.size();i++)\n\t\t{\n\t\t\tnewAngularAcc += torqueList.get(i).torqueVal / mass;\n\t\t\tif(torqueList.get(i).mode == ForceMode.Impulse)\n\t\t\t{\n\t\t\t\tRemoveTorque(torqueList.get(i));\n\t\t\t}\n\t\t}\n\t\tangularAcceleration = newAngularAcc;\n\t\t\n\t}", "public Vec4 rotateX(final double alpha) {\n expectDirection();\n final double sin = Math.sin(alpha);\n final double cos = Math.cos(alpha);\n return new Vec4(x, cos * y - sin * z, sin * y + cos * z, false);\n }", "private void createXVertices() {\n\n\t\tfor (int i = 0; i < this.numXVertices; i++) {\n\t\t\t// determine external degree -- random number between d_0 and d_1\n\t\t\tint upperBoundAdjusted = this.d1 - this.d0; // Shift to 0 so that the randomGen can be used\n\t\t\tint externalDegree = this.randomGen(upperBoundAdjusted) + this.d0; // Shift back for a degree within the\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// range\n\t\t\tvertices.add(new XVertex('x', this.countXID++, externalDegree));\n\t\t}\n\t}", "public void calcAcceleration() {\n double firstSpeed = get(0).distanceTo(get(1)) / ((get(1).getTime() - get(0).getTime()) * INTER_FRAME_TIME);\n double lastSpeed = get(length() - 2).distanceTo(get(length() - 1))\n / ((get(length() - 1).getTime() - get(length() - 2).getTime()) * INTER_FRAME_TIME);\n avgAcceleration = (firstSpeed + lastSpeed) / ((get(length() - 1).getTime() - get(0).getTime()) * INTER_FRAME_TIME);\n }", "public void setVelocity(double x, double y, double z) {\n/* 72 */ this.motionX = x;\n/* 73 */ this.motionY = y;\n/* 74 */ this.motionZ = z;\n/* */ \n/* 76 */ if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F) {\n/* */ \n/* 78 */ float var7 = MathHelper.sqrt_double(x * x + z * z);\n/* 79 */ this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(x, z) * 180.0D / Math.PI);\n/* 80 */ this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(y, var7) * 180.0D / Math.PI);\n/* */ } \n/* */ }", "public Vector2D getAcceleration()\n\t{\n\t\treturn acceleration;\n\t}", "public static Vect3 mkXYZ(double x, double y, double z) {\n\t\treturn new Vect3(x,y,z);\n\t}", "public static void setForwardAcceleration(int acc) {\n LEFT_MOTOR.setAcceleration(acc);\n RIGHT_MOTOR.setAcceleration(acc);\n }", "Service withAcceleration(boolean accelerate);", "public a(@NotNull Context context, boolean z) {\n super(context, C0906R.style.w_);\n Intrinsics.checkParameterIsNotNull(context, \"context\");\n this.i = z;\n }", "private void accelerate() {\r\n\t\tif(physics.angleTo(closestShipPhysics) < 0){\r\n\t\t\tphysics.move(true, RIGHT);\r\n\t\t}\r\n\t\tif(physics.angleTo(closestShipPhysics) > 0){\r\n\t\t\tphysics.move(true, LEFT);\r\n\t\t}\r\n\t\telse{\r\n\t\tphysics.move(true, STRIGHT);\r\n\t\t}\r\n\t}", "public static native PointerByReference OpenMM_AmoebaInPlaneAngleForce_create();", "public void accelerateXL() {\n double temp;\n temp = this.getxSpeed();\n if (temp >= -this.getMaxSpeed()) {\n temp += -this.getMaxSpeed() / 10;\n }\n this.setxSpeed(temp);\n\n }", "public void changeAngle (int horizontalSpeed)\n\t{\n\t\t//The following makes the PaperAirplane face as far right as it can\n\t\t//(but it still faces downward slightly).\n\t\tif (horizontalSpeed >= 5)\n\t\t{\n\t\t\txDimension1 = getX_Pos () - 23;\n\t\t\txDimension2 = getX_Pos () - 18;\n\t\t\txDimension3 = getX_Pos () + 22;\n\t\t\t\n\t\t\tyDimension1 = getY_Pos () - 2;\n\t\t\tyDimension2 = getY_Pos () - 17;\n\t\t\tyDimension3 = getY_Pos () + 5;\n\t\t}\n\t\t//When the horizontal speed progresses from 5 to 0, the plane faces\n\t\t//further downward, which is shown by the if statements below. Likewise,\n\t\t//as the horizontal speed progresses from 0 to 5, the plane faces\n\t\t//further right.\n\t\telse if (horizontalSpeed == 4)\n\t\t{\n\t\t\txDimension1 = getX_Pos () - 20;\n\t\t\txDimension2 = getX_Pos () - 12;\n\t\t\txDimension3 = getX_Pos () + 20;\n\t\t\t\n\t\t\tyDimension1 = getY_Pos () - 7;\n\t\t\tyDimension2 = getY_Pos () - 19;\n\t\t\tyDimension3 = getY_Pos () + 11;\n\t\t}\n\t\telse if (horizontalSpeed == 3)\n\t\t{\n\t\t\txDimension1 = getX_Pos () - 15;\n\t\t\txDimension2 = getX_Pos () - 5;\n\t\t\txDimension3 = getX_Pos () + 14;\n\t\t\t\n\t\t\tyDimension1 = getY_Pos () - 12;\n\t\t\tyDimension2 = getY_Pos () - 22;\n\t\t\tyDimension3 = getY_Pos () + 13;\n\t\t}\n\t\telse if (horizontalSpeed == 2)\n\t\t{\n\t\t\txDimension1 = getX_Pos () - 10;\n\t\t\txDimension2 = getX_Pos () + 2;\n\t\t\txDimension3 = getX_Pos () + 12;\n\t\t\t\n\t\t\tyDimension1 = getY_Pos () - 17;\n\t\t\tyDimension2 = getY_Pos () - 22;\n\t\t\tyDimension3 = getY_Pos () + 18;\n\t\t}\n\t\telse if (horizontalSpeed == 1)\n\t\t{\n\t\t\txDimension1 = getX_Pos () - 10;\n\t\t\txDimension2 = getX_Pos () + 4;\n\t\t\txDimension3 = getX_Pos () + 6;\n\t\t\t\n\t\t\tyDimension1 = getY_Pos () - 18;\n\t\t\tyDimension2 = getY_Pos () - 20;\n\t\t\tyDimension3 = getY_Pos () + 20;\n\t\t}\n\t\t//The following makes the plane face straight down.\n\t\telse if (horizontalSpeed == 0)\n\t\t{\n\t\t\txDimension1 = getX_Pos () - 7;\n\t\t\txDimension2 = getX_Pos ();\n\t\t\txDimension3 = getX_Pos () + 7;\n\t\t\t\n\t\t\tyDimension1 = getY_Pos () - 20;\n\t\t\tyDimension2 = getY_Pos () + 24;\n\t\t\tyDimension3 = getY_Pos () - 20;\n\t\t}\n\t\t//When the horizontal speed progresses from -5 to 0, the plane faces\n\t\t//further downward, which is shown by the if statements below. Likewise,\n\t\t//as the horizontal speed progresses from 0 to -5, the plane faces\n\t\t//further left.\n\t\telse if (horizontalSpeed == -1)\n\t\t{\n\t\t\txDimension1 = getX_Pos () + 10;\n\t\t\txDimension2 = getX_Pos () - 4;\n\t\t\txDimension3 = getX_Pos () - 6;\n\t\t\t\n\t\t\tyDimension1 = getY_Pos () - 18;\n\t\t\tyDimension2 = getY_Pos () - 20;\n\t\t\tyDimension3 = getY_Pos () + 20;\n\t\t}\n\t\telse if (horizontalSpeed == -2)\n\t\t{\n\t\t\txDimension1 = getX_Pos () + 10;\n\t\t\txDimension2 = getX_Pos () - 2;\n\t\t\txDimension3 = getX_Pos () - 12;\n\t\t\t\n\t\t\tyDimension1 = getY_Pos () - 17;\n\t\t\tyDimension2 = getY_Pos () - 22;\n\t\t\tyDimension3 = getY_Pos () + 18;\n\t\t}\n\t\telse if (horizontalSpeed == -3)\n\t\t{\n\t\t\txDimension1 = getX_Pos () + 15;\n\t\t\txDimension2 = getX_Pos () + 5;\n\t\t\txDimension3 = getX_Pos () - 14;\n\t\t\t\n\t\t\tyDimension1 = getY_Pos () - 12;\n\t\t\tyDimension2 = getY_Pos () - 22;\n\t\t\tyDimension3 = getY_Pos () + 13;\n\t\t}\n\t\telse if (horizontalSpeed == -4)\n\t\t{\n\t\t\txDimension1 = getX_Pos () + 20;\n\t\t\txDimension2 = getX_Pos () + 12;\n\t\t\txDimension3 = getX_Pos () - 20;\n\t\t\t\n\t\t\tyDimension1 = getY_Pos () - 7;\n\t\t\tyDimension2 = getY_Pos () - 19;\n\t\t\tyDimension3 = getY_Pos () + 11;\n\t\t}\n\t\t//The following makes the PaperAirplane face as far left as it can\n\t\t//(but it still faces downward slightly).\n\t\telse if (horizontalSpeed <= -5)\n\t\t{\n\t\t\txDimension1 = getX_Pos () + 23;\n\t\t\txDimension2 = getX_Pos () + 18;\n\t\t\txDimension3 = getX_Pos () - 22;\n\t\t\t\n\t\t\tyDimension1 = getY_Pos () - 2;\n\t\t\tyDimension2 = getY_Pos () - 17;\n\t\t\tyDimension3 = getY_Pos () + 5;\n\t\t}\n\t}", "public static void add_damping_acceleration( Body body ) {\r\n body.currentState.ax = body.currentState.ax - body.currentState.vx * body.damping / body.m;\r\n body.currentState.ay = body.currentState.ay - body.currentState.vy * body.damping / body.m;\r\n body.currentState.az = body.currentState.az - body.currentState.vz * body.damping / body.m;\r\n }", "public abstract Vector4fc rotateAbout(float angle, float x, float y, float z);", "public three_d_object(int ob_x, int ob_y, int ob_z, int new_ob_size, int new_ob_rotation_X,\n\t\t\t\t\tint new_ob_rotation_Y) {\n\t\t\t\tx = ob_x;\n\t\t\t\ty = ob_y;\n\t\t\t\tz = ob_z;\n\t\t\t\tob_size = new_ob_size;\n\t\t\t\trotation_X = new_ob_rotation_X;\n\t\t\t\trotation_Y = new_ob_rotation_Y;\n\n\t\t\t}", "public Vector3 add(float x, float y, float z) {\r\n\t\treturn this.set(this.x + x, this.y + y, this.z + z);\r\n\t}", "final public Vector3 x(final Vector3 v){\n if(v == null){\n throw new IllegalArgumentException(\"v must not be null\");\n }\n return new Vector3((y*v.z)-(z*v.y), (z*v.x)-(x*v.z), (x*v.y)-(y*v.x)); \n }", "public FloatVector3D(float x, float y, float z)\n {\n fx = x;\n fy = y;\n fz = z;\n setMagnitude();\n }", "public Vector3 set (double x, double y, double z) {\n this.x = x;\n this.y = y;\n this.z = z;\n return this;\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 DynamicCuboid setSizeZ(float z) {\n this.sizeZ = z;\n return this;\n }", "@MavlinkFieldInfo(\n position = 8,\n unitSize = 2,\n signed = true,\n description = \"Ground Z Speed (Altitude, positive down)\"\n )\n public final Builder vz(int vz) {\n this.vz = vz;\n return this;\n }", "@Override\n\tpublic Simplex2v3d getTangentPlane(float xPos, float zPos) {\n\t\treturn new Simplex2v3d(func.evaluateDerivative(new float[] {xPos, zPos}, 0), func.evaluateDerivative(new float[] {xPos, zPos}, 1), new Vector3f(xPos, getHeight(xPos, zPos), zPos));\n\t}", "public void setAAxis(String frame,float x,float y, float z){\r\n\t\tsetAxis(\"axisA\",frame,x,y,z);\r\n\t}", "public static FixedFrameVector3DBasics newXZOnlyFixedFrameVector3DBasics(ReferenceFrame referenceFrame)\n {\n return new FixedFrameVector3DBasics()\n {\n private double x, z;\n\n @Override\n public ReferenceFrame getReferenceFrame()\n {\n return referenceFrame;\n }\n\n @Override\n public double getX()\n {\n return x;\n }\n\n @Override\n public double getY()\n {\n return 0.0;\n }\n\n @Override\n public double getZ()\n {\n return z;\n }\n\n @Override\n public void setX(double x)\n {\n this.x = x;\n }\n\n @Override\n public void setY(double y)\n {\n }\n\n @Override\n public void setZ(double z)\n {\n this.z = z;\n }\n\n @Override\n public String toString()\n {\n return EuclidCoreIOTools.getTuple3DString(this);\n }\n };\n }", "public Plane() {\r\n\t\tvecX = new Vector3D();\r\n\t\tvecY = new Vector3D();\r\n\t\tnorm = new Vector3D();\r\n\t\tthis.setD(0);\r\n\t\tpos = new Position3D();\r\n\t}", "public float getAccZ() {\n return accZ_;\n }", "private static void updateComponents(PhysicsGameObject obj, Vector3 position, Velocity velocity, Vector3 acceleration,double dt){\n float newX = (float) (position.x +(dt * velocity.Vx) + (dt*acceleration.x * dt / 2));\n float newY = (float) (position.y + (dt * velocity.Vy) + ( dt*acceleration.y * dt / 2));\n\n //v(t+h) = v(t) + h*a\n float newVelX = (float) (velocity.Vx + dt * acceleration.x );\n float newVelY = (float) (velocity.Vy + dt * acceleration.y );\n\n obj.setPositionX(newX);\n obj.setPositionY(newY);\n\n obj.setVelocityComponents(newVelX, newVelY);\n\n\n }", "public Vector3 set(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\treturn this;\r\n\t}", "public Vector4d setZ(double z) {\n\t\tthis.z = z;\n\t\treturn this;\n\t}", "public float getAccZ() {\n return accZ_;\n }", "@MavlinkFieldInfo(\n position = 6,\n unitSize = 2,\n signed = true,\n description = \"Ground X Speed (Latitude, positive north)\"\n )\n public final Builder vx(int vx) {\n this.vx = vx;\n return this;\n }", "public void setAccelerations(int acceleration) {\n\t\tleftMotor.setAcceleration(acceleration);\n\t\trightMotor.setAcceleration(acceleration);\n\t}", "public VelocityComponent(double xVector, double yVector, double zVector) {\n velocity = new Point3D(xVector, yVector, zVector);\n }", "public static Vect3 make(double x, double y, double z) {\n\t\treturn new Vect3(Units.from(\"NM\",x),Units.from(\"NM\",y),Units.from(\"ft\",z));\n\t}", "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 void setAccelerationFlat(float acceleration)\n\t{\n\t\tthis.acceleration = acceleration;\n\t}", "public void setAcceleration(double x, double y) {\n getMotion().setAcceleration(x, y);\n }", "public double getAccelZ() {\n return m_accelerometer.getZ();\n }", "public DynamicCuboid setZ(float z) {\n this.z = z;\n return this;\n }", "protected abstract void setGravityImpl( float x, float y, float z );", "Grad(final double aX, final double aY, final double aZ) {\n x = aX;\n y = aY;\n z = aZ;\n }", "public void accelerate(float dvx, float dvy){\n\t\tvelocity.x += dvx;\n\t\tvelocity.y += dvy;\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 }", "private void UpdateTransform()\n\t{\t\n\t\tTransform transform = parent.transform;\n\t\t\n\t\tVector2 friction = Vector2.Scale(-frictionCoefficient,velocity);\n\t\tfloat angularFriction = -frictionCoefficient*angularVelocity;\n\t\t\n\t\t//Newton integration P = P + dP + acceleration * dt^2\n\t\ttransform.position.x += velocity.x + (acceleration.x *deltaTime*deltaTime) + friction.x;\n\t\ttransform.position.y += velocity.y + (acceleration.y *deltaTime*deltaTime) + friction.y;\n\t\ttransform.rotation += angularVelocity + angularAcceleration*deltaTime*deltaTime + angularFriction ;\n\t\t\n\t}", "public void updateXPosition(){\r\n if (centerX + speedX <= 60) {\r\n centerX = 60;\r\n }\r\n if(centerX + bg.getBackX() > 4890) {\r\n bg.setBackX(4890-startScrolling);\r\n if(centerX + speedX >= 1500) {\r\n centerX = 1500;\r\n rect1= new FloatRect (centerX,centerY,80,110);\r\n }\r\n if(centerX < 1504) {\r\n centerX+=speedX;\r\n rect1= new FloatRect (centerX,centerY,80,110);\r\n }\r\n }\r\n else if (speedX < 0) {\r\n centerX += speedX;\r\n rect1= new FloatRect (centerX,centerY,80,110);\r\n }\r\n else {\r\n if (centerX <= startScrolling) {\r\n centerX += speedX;\r\n rect1= new FloatRect (centerX,centerY,80,110);\r\n } else {\r\n background.setPosition((-bg.getBackX ()),0);\r\n }\r\n }\r\n }", "public DynamicCuboid setXYZ(float x, float y, float z) {\n return this.setX(x).setY(y).setZ(z);\n }", "public Vector3d getAcceleration() {\n return getMotion().getAcceleration();\n }", "public Builder setZ(float value) {\n \n z_ = value;\n onChanged();\n return this;\n }" ]
[ "0.54129297", "0.53938085", "0.53065264", "0.5296389", "0.51968557", "0.506751", "0.50503886", "0.50410575", "0.50392854", "0.5003886", "0.5000826", "0.49850747", "0.4945383", "0.49337304", "0.4917158", "0.48971534", "0.4894723", "0.48813635", "0.48558095", "0.48540053", "0.4845397", "0.48362926", "0.4834223", "0.48223507", "0.47933757", "0.47349378", "0.47117323", "0.46986234", "0.46731225", "0.4661755", "0.46324652", "0.4617351", "0.46071184", "0.4604043", "0.45969003", "0.45962384", "0.4592475", "0.45919463", "0.45918226", "0.45773315", "0.45765477", "0.45699742", "0.4565998", "0.45421576", "0.45195335", "0.45178786", "0.45143524", "0.4506996", "0.45001626", "0.4491187", "0.44887486", "0.4484468", "0.4479276", "0.4467033", "0.4462785", "0.44564632", "0.44265616", "0.4424296", "0.44195175", "0.440631", "0.43976626", "0.43951634", "0.43947753", "0.43869275", "0.4386414", "0.43841466", "0.438384", "0.43737537", "0.4363009", "0.4361103", "0.4358949", "0.43570668", "0.43471962", "0.43450022", "0.43440047", "0.4335936", "0.43354633", "0.4331573", "0.432911", "0.43265262", "0.43217018", "0.4314414", "0.43135664", "0.43054095", "0.43033406", "0.43024245", "0.42998022", "0.42906815", "0.42873898", "0.4285611", "0.42792544", "0.4273813", "0.42726436", "0.42717525", "0.4270639", "0.42694455", "0.42660043", "0.4265043", "0.42647344", "0.42646208", "0.42641827" ]
0.0
-1
Creates a wrench that is constrained to the XZplane. The frames of the new wrench cannot be changed.
public static FixedFrameWrenchBasics newPlanarFixedFrameWrenchBasics(ReferenceFrame bodyFrame, ReferenceFrame expressedInFrame) { return new FixedFrameWrenchBasics() { private final FixedFrameVector3DBasics angularPart = newYOnlyFixedFrameVector3DBasics(expressedInFrame); private final FixedFrameVector3DBasics linearPart = newXZOnlyFixedFrameVector3DBasics(expressedInFrame); @Override public ReferenceFrame getBodyFrame() { return bodyFrame; } @Override public ReferenceFrame getReferenceFrame() { return expressedInFrame; } @Override public FixedFrameVector3DBasics getAngularPart() { return angularPart; } @Override public FixedFrameVector3DBasics getLinearPart() { return linearPart; } @Override public String toString() { return MecanoIOTools.getWrenchString(this); } }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setX() {\n m_frontLeft.setDesiredState(new SwerveModuleState(0, Rotation2d.fromDegrees(45)));\n m_frontRight.setDesiredState(new SwerveModuleState(0, Rotation2d.fromDegrees(-45)));\n m_rearLeft.setDesiredState(new SwerveModuleState(0, Rotation2d.fromDegrees(-45)));\n m_rearRight.setDesiredState(new SwerveModuleState(0, Rotation2d.fromDegrees(45)));\n }", "public void getCurrentCartesianWrench(iiwa_msgs.CartesianWrench currentWrench, LBR robot, ObjectFrame frame) {\n currentWrench.getHeader().setFrameId(frame.getName());\n currentWrench.getHeader().setStamp(time.getCurrentTime());\n\n ForceSensorData forceData = robot.getExternalForceTorque(frame);\n\n currentWrench.getWrench().getForce().setX(forceData.getForce().getX());\n currentWrench.getWrench().getForce().setY(forceData.getForce().getY());\n currentWrench.getWrench().getForce().setZ(forceData.getForce().getZ());\n\n currentWrench.getWrench().getTorque().setX(forceData.getTorque().getX());\n currentWrench.getWrench().getTorque().setY(forceData.getTorque().getY());\n currentWrench.getWrench().getTorque().setZ(forceData.getTorque().getZ());\n\n currentWrench.getInaccuracy().getForce().setX(forceData.getForceInaccuracy().getX());\n currentWrench.getInaccuracy().getForce().setY(forceData.getForceInaccuracy().getY());\n currentWrench.getInaccuracy().getForce().setZ(forceData.getForceInaccuracy().getZ());\n\n currentWrench.getInaccuracy().getTorque().setX(forceData.getTorqueInaccuracy().getX());\n currentWrench.getInaccuracy().getTorque().setY(forceData.getTorqueInaccuracy().getY());\n currentWrench.getInaccuracy().getTorque().setZ(forceData.getTorqueInaccuracy().getZ());\n }", "private static FXForwardSecurity createFxForwardSecurity() {\n\n Currency payCurrency = Currency.GBP;\n Currency recCurrency = Currency.USD;\n\n double payAmount = 1_000_000;\n double recAmount = 1_600_000;\n\n ZonedDateTime forwardDate = DateUtils.getUTCDate(2019, 2, 4);\n\n ExternalId region = ExternalSchemes.currencyRegionId(Currency.GBP);\n\n FXForwardSecurity fxForwardSecurity = new FXForwardSecurity(payCurrency, payAmount, recCurrency, recAmount, forwardDate, region);\n\n return fxForwardSecurity;\n }", "private void createWVertices() {\n\t\tfor (int i = 0; i < this.numWVertices; i++) {\n\t\t\tvertices.add(new Vertex('w', this.countWID++));\n\t\t}\n\t}", "public Vector4d sub(double x, double y, double z, double w) {\n\t\tthis.x -= x; this.y -= y; this.z -= z; this.w -= w;\n\t\treturn this;\n\t}", "private static FXForwardTrade createFxForwardTrade() {\n\n Counterparty counterparty = new SimpleCounterparty(ExternalId.of(Counterparty.DEFAULT_SCHEME, \"COUNTERPARTY\"));\n BigDecimal tradeQuantity = BigDecimal.valueOf(1);\n LocalDate tradeDate = LocalDate.of(2014, 7, 11);\n OffsetTime tradeTime = OffsetTime.of(LocalTime.of(0, 0), ZoneOffset.UTC);\n SimpleTrade trade = new SimpleTrade(createFxForwardSecurity(), tradeQuantity, counterparty, tradeDate, tradeTime);\n trade.setPremium(0.00);\n trade.setPremiumDate(LocalDate.of(2014, 7, 25));\n trade.setPremiumCurrency(Currency.GBP);\n\n FXForwardTrade fxForwardTrade = new FXForwardTrade(trade);\n\n return fxForwardTrade;\n }", "public Wander() \t\r\n\t{ \r\n\t\tm_pos = new Point2d(30,0); \r\n\t\tm_r = 20; \r\n\t\tm_influence = 1; \r\n\t\tm_seekPoint = new Point2d(0,0);\r\n\t\tm_rate = 10;\r\n\t\tinit();\r\n\t}", "public Builder zhlx(String zhlx) {\n obj.setZhlx(zhlx);\n return this;\n }", "public PlayerWL() {\n super();\n rotateYAxis = 0;\n positionZ = 0;\n positionX = 0;\n camera = new PerspectiveCamera(true);\n camera.getTransforms().addAll(\n new Rotate(0, Rotate.Y_AXIS),\n new Rotate(-10, Rotate.X_AXIS),\n new Translate(0, 0, 0));\n cameraGroup = new Group(camera);\n camera.setRotationAxis(new Point3D(0, 1, 0));\n }", "public abstract Vector4fc set(float x, float y, float z, float w);", "WormCharacter(int inx, int iny, int inw, int inl, int sw, int sl){\n\t\tx = inx;\n\t\ty = iny;\n\t\twidth = inw;\n\t\tlength = inl;\n\t\tisVisible = true;\n\t\tscreenwidth = sw;\n\t\tscreenlength = sl;\n\t}", "public Vector4d set(double x, double y, double z, double w) {\n\t\tthis.x = x; this.y = y; this.z = z; this.w = w;\n\t\treturn this;\n\t}", "private Spatial makeCharacter(final float x, final float y, final float z, final EgocentricContextData data) {\n Spatial golem = assetManager.loadModel(\"Models/Oto/Oto.mesh.xml\");\n golem.scale(0.2f);\n golem.setLocalTranslation(x, y, z);\n\n golem.setUserData(EgocentricContextData.TAG, data);\n\n // We must add a light to make the model visible\n DirectionalLight sun = new DirectionalLight();\n sun.setDirection(new Vector3f(-0.1f, -0.7f, -1.0f));\n golem.addLight(sun);\n return golem;\n }", "protected void moveWest(){\n\t\tcar.setXLocation(currentX - 1);\n\t\tcurrentX -= 1;\n\t}", "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}", "private void createTunnel(int tunnelX, int tunnelWidth, double angle) {\n this.tunnelX = tunnelX;\n this.tunnelWidth = tunnelWidth;\n //calculate the sections of the wall\n int leftWallStart = 0;\n int leftWallEnd = tunnelX - tunnelWidth / 2;\n int leftWallWidth = leftWallEnd - leftWallStart;\n\n int rightWallStart = tunnelX + tunnelWidth / 2;\n int rightWallEnd = AbstractGame.APP_WIDTH;\n int rightWallWidth = rightWallEnd - rightWallStart;\n\n //make walls\n leftWall = new Wall(getWorld(),leftWallStart, (int) getY(), leftWallWidth, length, 0);\n rightWall = new Wall(getWorld(),rightWallStart, (int) getY(), rightWallWidth, length, 0);\n\n //\n if (angle != 0) {\n Rotate rotate = new Rotate(angle);\n leftWall.getMyShape().getTransforms().add(rotate);\n rightWall.getMyShape().getTransforms().add(rotate);\n }\n//add to the section list of objects\n getSectionObjects().add(leftWall);\n getSectionObjects().add(rightWall);\n }", "Lehrkraft createLehrkraft();", "public void set(final float x, final float y, final float z, final float w)\n {\n this.x = x;\n this.y = y;\n this.z = z;\n this.w = w;\n }", "public Builder clearZ() {\n \n z_ = getDefaultInstance().getZ();\n onChanged();\n return this;\n }", "public void setW(int w) {\n\t\tthis.W = w;\n\t}", "public Builder clearZ() {\n \n z_ = 0F;\n onChanged();\n return this;\n }", "public Builder clearZ() {\n \n z_ = 0F;\n onChanged();\n return this;\n }", "public XWingFighter(Integer fuelLevel, Integer destructionLevel) throws Exception {\n super(fuelLevel, destructionLevel);\n }", "public static final Vector<JARWall> createBridge( int x, int y, int width )\n {\n Vector<JARWall> ret = new Vector<JARWall>();\n\n int drawX = x;\n\n //left socket\n ret.add( new JARWall( drawX, y, JARImage.EWallWood1Small, CollisionType.EColliding, DrawingLayer.EBehindPlayer ) );\n ret.add( new JARWall( drawX + 64, y, JARImage.EWallWood1ArcLeft, CollisionType.ENonColliding, DrawingLayer.EBeforePlayer ) );\n ret.add( new JARWall( drawX, y - 64, JARImage.EWallWood1Ascending, CollisionType.EColliding, DrawingLayer.EBehindPlayer ) );\n ret.add( new JARWall( drawX, y - 128, JARImage.EDecoRailing1Ascending, CollisionType.ENonColliding, DrawingLayer.EBeforePlayer ) );\n\n //water\n drawX += 64;\n ret.add( new JARWall( drawX, y, JARImage.EWallWater1, CollisionType.ENonColliding, DrawingLayer.EBehindPlayer ) );\n\n //browse width\n for ( int i = 0; i < width; ++i )\n {\n drawX += 64;\n\n //railing\n ret.add( new JARWall( drawX, y - 128, JARImage.EDecoRailing1, CollisionType.ENonColliding, DrawingLayer.EBeforePlayer ) );\n //rack\n ret.add( new JARWall( drawX, y - 64, JARImage.EWallWood1, CollisionType.EColliding, DrawingLayer.EBehindPlayer ) );\n //water\n drawX += 64;\n ret.add( new JARWall( drawX, y, JARImage.EWallWater1, CollisionType.ENonColliding, DrawingLayer.EBehindPlayer ) );\n }\n\n //right socket\n drawX += 64;\n ret.add( new JARWall( drawX, y - 64, JARImage.EWallWood1Descending, CollisionType.EColliding, DrawingLayer.EBehindPlayer ) );\n ret.add( new JARWall( drawX, y - 128, JARImage.EDecoRailing1Descending, CollisionType.ENonColliding, DrawingLayer.EBeforePlayer ) );\n drawX += 64;\n ret.add( new JARWall( drawX, y, JARImage.EWallWood1Small, CollisionType.EColliding, DrawingLayer.EBehindPlayer ) );\n ret.add( new JARWall( drawX - 64, y, JARImage.EWallWood1ArcRight, CollisionType.ENonColliding, DrawingLayer.EBeforePlayer ) );\n\n return ret;\n }", "public VoXtdzqx() {\n }", "Obj(double x1, double y1, double z1, double x2, double y2, double z2, double x3, double y3, double z3){\t// CAMBIAR LAS COORDENADAS X,Y,Z CON 0,1 PARA CONSTRUIR PRISMA, CILINDRO, PIRAMIDE, CONO Y ESFERA.\n w\t= new Point3D[4];\n\tvScr\t= new Point2D[4];\n \n w[0]\t= new Point3D(0, 0, 0); // desde la base\n\tw[1]\t= new Point3D(x1, y1, z1);\n\tw[2]\t= new Point3D(x2, y2, z2);\n\tw[3]\t= new Point3D(x3, y3, z3);\n \n\tobjSize = (float) Math.sqrt(12F); \n rho\t= 5 * objSize;\n }", "private void createRock() {\n\n // generate x,y coordinates\n\n RockView newRock = new RockView(getWidth(), currentSpeed, gameLevel-1);\n newRock.setCenter(getRandCoordinate());\n\n // assign city target deending on what third of the screen the rock was created in\n\n float maxWidth = getWidth() / density;\n float boundry1 = maxWidth / 3;\n float boundry2 = (maxWidth * 2) / 3;\n\n int target;\n if (newRock.getCenter().x > 0 && newRock.getCenter().x < boundry1) {\n target = 0;\n } else if (newRock.getCenter().x > boundry1 && newRock.getCenter().x < boundry2) {\n target = 1;\n } else {\n target = 2;\n }\n\n newRock.setTarget(cityLocations[target]);\n\n // add rock to array of rocks\n rockList.add(newRock);\n\n }", "@Override\n\tpublic void create() {\n\t\twithdrawFrame = new JFrame();\n\t\tthis.constructContent();\n\t\twithdrawFrame.setSize(800,500);\n\t\twithdrawFrame.show();\n\t\twithdrawFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t}", "public Plane(Point spawnPoint, boolean flyingHorizontally, Level parentLevel){\n // Initialize the variables for the plane\n this.flyingHorizontally = flyingHorizontally;\n this.drawOps = new DrawOptions();\n this.planeImage = new Image(\"res/images/airsupport.png\");\n this.parentLevel = parentLevel;\n this.isFinished = false;\n this.bombs = new ArrayList<>();\n\n // Initialize the timekeeper that will control when a bomb should be dropped\n // '1' is added to the RNG here as the upper bound is not inclusive\n int initialDropTime = ThreadLocalRandom.current().nextInt(DROP_TIME_LOWER_BOUND,DROP_TIME_UPPER_BOUND + 1);\n this.bombDropper = new Timekeeper(initialDropTime);\n this.justDropped = false;\n // The Plane can either fly horizontally or vertically, which is specified in its constructor\n if (flyingHorizontally){\n // Set the plane facing to the right, at the leftmost point of the window and at the correct\n // height given by the spawn position\n this.currPos = new Point(0, spawnPoint.y);\n this.drawOps.setRotation(Math.PI/2);\n this.flyingHorizontally = true;\n }\n else {\n // Set the plane facing downward, at the top of the window and at the correct\n // x co-ordinate given by the spawn position\n this.currPos = new Point(spawnPoint.x, 0);\n this.drawOps.setRotation(Math.PI);\n this.flyingHorizontally = false;\n }\n }", "public Quaternion(final float x, final float y, final float z, final float w)\n {\n this.x = x;\n this.y = y;\n this.z = z;\n this.w = w;\n }", "public static NewRotateLeft create(AnimatableModelInstance originObject, float ex, float ey, int duration) {\n\n\t\tVector3 posO = originObject.transState.position.cpy();\t\n\t\t//Vector3 posO = new Vector3();\n\t\t//originObject.transform.getTranslation(posO);\n\t\t\n\t\tQuaternion rotation = originObject.transState.rotation.cpy();\t\n\t\t//Quaternion rotation = new Quaternion();\n\t\t//originObject.transform.getRotation(rotation,true); //existing rotation\n\t\t\n\t\t Vector3 axisVec = new Vector3();\n\t float existingangle = (float) (rotation.getAxisAngle(axisVec) * axisVec.nor().z);\n\t existingangle = existingangle < 0 ? existingangle + 360 : existingangle; //convert <0 values\n\t\t\n\t\tGdx.app.log(logstag,\"_____________________________________existing angle=\"+existingangle); //relative to x axis pointing left anticlockwise\n\t\n\t\t//float scalex = originObject.transform.getScaleX(); //get how much the object has been scaled\n\t\t//float scaley = originObject.transform.getScaleY();\n\t\t\n\t\tVector2 fromPoint = new Vector2(posO.x,posO.y); //we need to scale them down due to how the positions might have been scaled up if the matrix is scaled (I hate how matrixs work :-/ Just cant get it in my head)\n\t\tVector2 tooPoint = new Vector2(ex,ey);\n\n\t\tfromPoint.sub(tooPoint); \n\n\t\t//Log.info(\"length=\"+corner2.len());\n\n\t\tfloat angle = 180+fromPoint.angle(); //absolute angle between the two objects\n\t\tGdx.app.log(logstag,\"________target angle=\"+angle); //should point towards ex/ey \n\t\t\n\t//\tfloat distance = fromPoint.len();\n\n\t\t\n\t\t//difference between this angle and existing one\n\t\tangle = angle - existingangle;\n\t\t\n\t\tNewRotateLeft rot = new NewRotateLeft(angle,500);\n\t\t//NewForward forward = new NewForward(distance,duration-500);\n\t\t\t\t\n\t\treturn rot;\n\t}", "public void setZwsalary(Float zwsalary) {\n this.zwsalary = zwsalary;\n }", "static float[] makeSwell(float x, float y, float z,\n float scale, float pt_size, float f0, float f1,\n float[] vx, float[] vy, float[] vz, int[] numv) {\n \n float d, xd, yd;\n float x0, y0, x1, y1, x2, y2, x3, y3, x4, y4;\n float sscale = 0.75f * scale;\n \n float[] mbarb = new float[4];\n mbarb[0] = x;\n mbarb[1] = y;\n \n float swell_height = (float) Math.sqrt(f0 * f0 + f1 * f1);\n \n int lenv = vx.length;\n int nv = numv[0];\n \n //determine the initial (minimum) length of the flag pole\n if (swell_height >= 0.1f) {\n // normalize direction\n x0 = f0 / swell_height;\n y0 = f1 / swell_height;\n \n float start_arrow = 0.9f * sscale;\n float end_arrow = 1.9f * sscale;\n float arrow_head = 0.3f * sscale;\n x1 = (x + x0 * start_arrow);\n y1 = (y + y0 * start_arrow);\n x2 = (x + x0 * end_arrow);\n y2 = (y + y0 * end_arrow);\n \n // draw arrow shaft\n vx[nv] = x1;\n vy[nv] = y1;\n vz[nv] = z;\n nv++;\n vx[nv] = x2;\n vy[nv] = y2;\n vz[nv] = z;\n nv++;\n \n mbarb[2] = x2;\n mbarb[3] = y2;\n \n xd = x2 - x1;\n yd = y2 - y1;\n \n x3 = x2 - 0.3f * (xd - yd);\n y3 = y2 - 0.3f * (yd + xd);\n x4 = x2 - 0.3f * (xd + yd);\n y4 = y2 - 0.3f * (yd - xd);\n \n // draw arrow head\n vx[nv] = x2;\n vy[nv] = y2;\n vz[nv] = z;\n nv++;\n vx[nv] = x3;\n vy[nv] = y3;\n vz[nv] = z;\n nv++;\n \n vx[nv] = x2;\n vy[nv] = y2;\n vz[nv] = z;\n nv++;\n vx[nv] = x4;\n vy[nv] = y4;\n vz[nv] = z;\n nv++;\n \n int shi = (int) (10.0f * (swell_height + 0.5f));\n float shf = 0.1f * shi;\n String sh_string = Float.toString(shf);\n int point = sh_string.indexOf('.');\n sh_string = sh_string.substring(0, point + 2);\n double[] start = {x, y - 0.25 * sscale, 0.0};\n double[] base = {0.5 * sscale, 0.0, 0.0};\n double[] up = {0.0, 0.5 * sscale, 0.0};\n VisADLineArray array =\n PlotText.render_label(sh_string, start, base, up, true);\n int nl = array.vertexCount;\n int k = 0;\n for (int i=0; i<nl; i++) {\n vx[nv] = array.coordinates[k++];\n vy[nv] = array.coordinates[k++];\n vz[nv] = array.coordinates[k++];\n nv++;\n }\n }\n else { // if (swell_height < 0.1)\n \n // wind < 2.5 kts. Plot a circle\n float rad = (0.7f * pt_size);\n \n // draw 8 segment circle, center = (x, y), radius = rad\n // 1st segment\n vx[nv] = x - rad;\n vy[nv] = y;\n vz[nv] = z;\n nv++;\n vx[nv] = x - 0.7f * rad;\n vy[nv] = y + 0.7f * rad;\n vz[nv] = z;\n nv++;\n // 2nd segment\n vx[nv] = x - 0.7f * rad;\n vy[nv] = y + 0.7f * rad;\n vz[nv] = z;\n nv++;\n vx[nv] = x;\n vy[nv] = y + rad;\n vz[nv] = z;\n nv++;\n // 3rd segment\n vx[nv] = x;\n vy[nv] = y + rad;\n vz[nv] = z;\n nv++;\n vx[nv] = x + 0.7f * rad;\n vy[nv] = y + 0.7f * rad;\n vz[nv] = z;\n nv++;\n // 4th segment\n vx[nv] = x + 0.7f * rad;\n vy[nv] = y + 0.7f * rad;\n vz[nv] = z;\n nv++;\n vx[nv] = x + rad;\n vy[nv] = y;\n vz[nv] = z;\n nv++;\n // 5th segment\n vx[nv] = x + rad;\n vy[nv] = y;\n vz[nv] = z;\n nv++;\n vx[nv] = x + 0.7f * rad;\n vy[nv] = y - 0.7f * rad;\n vz[nv] = z;\n nv++;\n // 6th segment\n vx[nv] = x + 0.7f * rad;\n vy[nv] = y - 0.7f * rad;\n vz[nv] = z;\n nv++;\n vx[nv] = x;\n vy[nv] = y - rad;\n vz[nv] = z;\n nv++;\n // 7th segment\n vx[nv] = x;\n vy[nv] = y - rad;\n vz[nv] = z;\n nv++;\n vx[nv] = x - 0.7f * rad;\n vy[nv] = y - 0.7f * rad;\n vz[nv] = z;\n nv++;\n // 8th segment\n vx[nv] = x - 0.7f * rad;\n vy[nv] = y - 0.7f * rad;\n vz[nv] = z;\n nv++;\n vx[nv] = x - rad;\n vy[nv] = y;\n vz[nv] = z;\n nv++;\n // System.out.println(\"circle \" + x + \" \" + y + \"\" + rad);\n mbarb[2] = x;\n mbarb[3] = y;\n }\n \n numv[0] = nv;\n return mbarb;\n }", "SpacesInvaders_positionnerUnNouveauVaisseau createSpacesInvaders_positionnerUnNouveauVaisseau();", "SpacesInvaders_positionnerUnNouveauVaisseau createSpacesInvaders_positionnerUnNouveauVaisseau();", "public void setFrameX(double anX) { double x = _x + anX - getFrameX(); setX(x); }", "private void arretes_fW(){\n\t\tthis.cube[4] = this.cube[1]; \n\t\tthis.cube[1] = this.cube[3];\n\t\tthis.cube[3] = this.cube[7];\n\t\tthis.cube[7] = this.cube[5];\n\t\tthis.cube[5] = this.cube[4];\n\t}", "public LeggedPlankton(float w, int x, int y, boolean tame) {\n super(w, x, y, tame);\n setType(\"Omnivore\");\n setDiet(\"Plankton\");\n }", "public Surface(String frame,String origin,String units,float a,float b,float c,float axisAX,float axisAY,float axisAZ,float axisBX,float axisBY,float axisBZ,float axisCX,float axisCY,float axisCZ){\r\n\t\tthis(frame,origin,units,a,units,b,units,c,frame,axisAX,axisAY,axisAZ,frame,axisBX,axisBY,axisBZ,frame,axisCX,axisCY,axisCZ);\r\n\t}", "private void translate(final double w, final double h, final double z) {\n mesh.setTranslation(0, w / 2, h / 2 + z);\n }", "public OpenGLMatrix createMatrix(float x, float y, float z, float u, float v, float w) {\n return OpenGLMatrix.translation(x, y, z).\n multiplied(Orientation.getRotationMatrix(\n AxesReference.EXTRINSIC, AxesOrder.XYZ, AngleUnit.DEGREES, u, v, w));\n }", "public Vector4d add(double x, double y, double z, double w) {\n\t\tthis.x += x; this.y += y; this.z += z; this.w += w;\n\t\treturn this;\n\t}", "public static void test10(World w){\n\t\tUtilities.generateGeometry2(w.points ,w.pivots, \"Front.png\", \"Side.png\", 1900, 2500, 0, 0, 1/7.0);\r\n\t\t\r\n\t}", "public a(@NotNull Context context, boolean z) {\n super(context, C0906R.style.w_);\n Intrinsics.checkParameterIsNotNull(context, \"context\");\n this.i = z;\n }", "public Vector4d setW(double w) {\n\t\tthis.w = w;\n\t\treturn this;\n\t}", "public static LayerDefinition createLayer(boolean isRightHand) {\n MeshDefinition meshdefinition = new MeshDefinition();\n PartDefinition partdefinition = meshdefinition.getRoot();\n\n // Main arm parts\n /** mainarm is supposed to be a first person representation of the player's actual arm */\n partdefinition.addOrReplaceChild(\"mainarm\", CubeListBuilder.create().texOffs( 0, 16).addBox(-3F, 0F, -8F, 6, 6, 10).mirror(isRightHand), PartPose.offsetAndRotation(0F, 0F, 0F, 0.2617994F, 0F, 0F));\n partdefinition.addOrReplaceChild(\"armorright\", CubeListBuilder.create().texOffs( 42, 0).addBox(1F, -1F, -9F, 3, 5, 8).mirror(isRightHand), PartPose.offsetAndRotation(0F, 0F, 0F, 0.2617994F, 0F, 0F));\n partdefinition.addOrReplaceChild(\"armorleft\", CubeListBuilder.create().texOffs( 42, 0).addBox(-4F, -1F, -9F, 3, 5, 8).mirror(isRightHand), PartPose.offsetAndRotation(0F, 0F, 0F, 0.2617994F, 0F, 0F));\n partdefinition.addOrReplaceChild(\"wristtopright\", CubeListBuilder.create().texOffs( 0, 11).addBox(1F, 1F, 2F, 1, 1, 4).mirror(isRightHand), PartPose.offsetAndRotation(0F, 0F, 0F, 0.2617994F, 0F, 0F));\n partdefinition.addOrReplaceChild(\"wristtopleft\", CubeListBuilder.create().texOffs( 0, 11).addBox(-2F, 1F, 2F, 1, 1, 4).mirror(isRightHand), PartPose.offsetAndRotation(0F, 0F, 0F, 0.2617994F, 0F, 0F));\n partdefinition.addOrReplaceChild(\"wristbottomright\", CubeListBuilder.create().texOffs( 0, 11).addBox(1F, 3F, 2F, 1, 1, 4).mirror(isRightHand), PartPose.offsetAndRotation(0F, 0F, 0F, 0.2617994F, 0F, 0F));\n partdefinition.addOrReplaceChild(\"wristbottomleft\", CubeListBuilder.create().texOffs( 0, 11).addBox(-2F, 3F, 2F, 1, 1, 4).mirror(isRightHand), PartPose.offsetAndRotation(0F, 0F, 0F, 0.2617994F, 0F, 0F));\n partdefinition.addOrReplaceChild(\"fingerguard\", CubeListBuilder.create().texOffs( 28, 9).addBox(-3F, -2F, 8.1F, 5, 2, 2).mirror(isRightHand), PartPose.offsetAndRotation(0F, 0F, 0F, 0F, 0F, 0F));\n partdefinition.addOrReplaceChild(\"crystalholder\", CubeListBuilder.create().texOffs( 48, 13).addBox(-2F, -1F, -3F, 4, 4, 4).mirror(isRightHand), PartPose.offsetAndRotation(0F, 0F, 0F, 0F, 0F, 0F));\n partdefinition.addOrReplaceChild(\"crystal\", CubeListBuilder.create().texOffs( 32, 27).addBox(-1F, -2F, -2F, 2, 2, 2).mirror(isRightHand), PartPose.offsetAndRotation(0F, 0F, 0F, 0F, 0F, 0F));\n\n // Hand Parts ---------------------------------------------------------------------------------------------------\n PartDefinition palmPartDef = partdefinition.addOrReplaceChild(\"palm\", CubeListBuilder.create().texOffs( 18, 0).addBox(isRightHand? -4F : -3F, -1F, 5F, 7, 4, 5).mirror(isRightHand), PartPose.offsetAndRotation(0F, 0F, 0F, 0F, 0F, 0F));\n\n // Thumb\n PartDefinition thumb1PartDef = palmPartDef.addOrReplaceChild(\"thumb1\", CubeListBuilder.create().texOffs( 16, 9).addBox(-.5F, -1F, 0F, 1, 2, 4).mirror(isRightHand), PartPose.offsetAndRotation(isRightHand ? -4F : 4F, 1.5F, 8F, 0F, isRightHand? -0.4014257F : 0.4014257F, 0F));\n thumb1PartDef.addOrReplaceChild(\"thumb2\", CubeListBuilder.create().texOffs( 10, 0).addBox(-.5F, -.5F, 0F, 1, 1, 3).mirror(isRightHand), PartPose.offsetAndRotation(0, 0, 4F, 0F, 0F, 0F));\n\n // Index finger\n PartDefinition index1PartDef = palmPartDef.addOrReplaceChild(\"index1\", CubeListBuilder.create().texOffs(34, 13).addBox(-.5F, -.5F, 0F, 1, 1, 5).mirror(isRightHand), PartPose.offsetAndRotation(isRightHand? -3.5F : 3.5F, -1.5F, 10F, 0.2617994F, 0F, 0F));\n index1PartDef.addOrReplaceChild(\"index2\", CubeListBuilder.create().texOffs( 34, 13).addBox(-.5F, -.5F, 0F, 1, 1, 4).mirror(isRightHand), PartPose.offsetAndRotation(0, 0, 5F, -0.2617994F * 2, 0F, 0F));\n\n // Middle finger\n PartDefinition middlefinger1PartDef = palmPartDef.addOrReplaceChild(\"middlefinger1\", CubeListBuilder.create().texOffs( 34, 13).addBox(-.5F, -.5F, 0F, 1, 1, 6).mirror(isRightHand), PartPose.offsetAndRotation(isRightHand? -1.5F : 1.5F, -1.5F, 10F, 0.2617994F, 0F, 0F));\n middlefinger1PartDef.addOrReplaceChild(\"middlefinger2\", CubeListBuilder.create().texOffs( 34, 13).addBox(-.5F, -.5F, 0F, 1, 1, 4).mirror(isRightHand), PartPose.offsetAndRotation(0, 0, 6F, -0.3444116F, 0F, 0F));\n\n // Ring finger\n PartDefinition ringfinger1PartDef = palmPartDef.addOrReplaceChild(\"ringfinger1\", CubeListBuilder.create().texOffs( 34, 13).addBox(-.5F, -.5F, 0F, 1, 1, 5).mirror(isRightHand), PartPose.offsetAndRotation(isRightHand? 0.5F : -0.5F, -1.5F, 10F, 0.2617994F, 0F, 0F));\n ringfinger1PartDef.addOrReplaceChild(\"ringfinger2\", CubeListBuilder.create().texOffs( 34, 13).addBox(-.5F, -.5F, 0F, 1, 1, 4).mirror(isRightHand), PartPose.offsetAndRotation(0, 0, 5F, -0.2617994F, 0F, 0F));\n\n // Pinky\n PartDefinition pinky1PartDef = palmPartDef.addOrReplaceChild(\"pinky1\", CubeListBuilder.create().texOffs( 34, 13).addBox(-.5F, -.5F, 0F, 1, 1, 4).mirror(isRightHand), PartPose.offsetAndRotation(isRightHand? 2.5F : -2.5F, -1.5F, 10F, 0.2617994F, 0F, 0F));\n pinky1PartDef.addOrReplaceChild(\"pinky2\", CubeListBuilder.create().texOffs( 34, 13).addBox(-.5F, -.5F, 0F, 1, 1, 4).mirror(isRightHand), PartPose.offsetAndRotation(0, 0, 4F, -0.4537856F, 0F, 0F));\n\n /** FINISH me below *--------------------*/\n // Left supports\n partdefinition.addOrReplaceChild(\"supportbaseleft\", CubeListBuilder.create().texOffs( 47, 21).addBox(-4.4F, -0.6666667F, -5.4F, 3, 3, 5).mirror(isRightHand), PartPose.offsetAndRotation(0F, 0F, 0F, 0.2617994F, 0F, 0F));\n partdefinition.addOrReplaceChild(\"supportleftfront\", CubeListBuilder.create().texOffs( 49, 23).addBox(isRightHand? -4.333333F : -3.333333F, 0.3333333F, 4.666667F, 1, 2, 3).mirror(isRightHand), PartPose.offsetAndRotation(0F, 0F, 0F, 0F, 0F, 0F));\n partdefinition.addOrReplaceChild(\"supportleft1\", CubeListBuilder.create().texOffs( 54, 27).addBox(-2.2F, -0.4F, -6.066667F, 4, 1, 1).mirror(isRightHand), PartPose.offsetAndRotation(0F, 0F, 0F, 0.2722714F, 1.066978F, 0F));\n partdefinition.addOrReplaceChild(\"supportleft2\", CubeListBuilder.create().texOffs( 52, 21).addBox(-6F, 0.4666667F, 2.5F, 2, 2, 1).mirror(isRightHand), PartPose.offsetAndRotation(0F, 0F, 0F, 0F, -0.6329727F, 0F));\n partdefinition.addOrReplaceChild(\"supportleft3\", CubeListBuilder.create().texOffs(52, 21).addBox(-6.5F, 1F, -0.5F, 1, 1, 5).mirror(isRightHand), PartPose.offsetAndRotation(0F, 0F, 0F, 0F, 0F, 0F));\n partdefinition.addOrReplaceChild(\"supportleft4\", CubeListBuilder.create().texOffs(52, 21).addBox(-7.9F, 0.4666667F, 1.7F, 2, 2, 1).mirror(isRightHand), PartPose.offsetAndRotation(0F, 0F, 0F, 0F, 0.3688462F, 0F));\n partdefinition.addOrReplaceChild(\"supportleft5\", CubeListBuilder.create().texOffs(54, 27).addBox(-0.8666667F, 1F, isRightHand? 7F : 6.333333F, 4, 1, 1).mirror(isRightHand), PartPose.offsetAndRotation(0F, 0F, 0F,0F, -0.7714355F, 0F));\n\n // Right supports\n partdefinition.addOrReplaceChild(\"supportbaseright\", CubeListBuilder.create().texOffs( 47, 21).addBox(1.433333F, -0.6666667F, -5.4F, 3, 3, 5).mirror(isRightHand), PartPose.offsetAndRotation(0F, 0F, 0F, 0.2617994F, 0F, 0F));\n partdefinition.addOrReplaceChild(\"supportrightfront\", CubeListBuilder.create().texOffs( 49, 23).addBox(isRightHand? 2.3F : 3.3F, 0.3333333F, 4.666667F, 1, 2, 3).mirror(isRightHand), PartPose.offsetAndRotation(0F, 0F, 0F, 0F, 0F, 0F));\n partdefinition.addOrReplaceChild(\"supportright1\", CubeListBuilder.create().texOffs( 54, 27).addBox(-1.8F, -0.8F, -6.066667F, 4, 1, 1).mirror(isRightHand), PartPose.offsetAndRotation(0F, 0F, 0F, 0.2722714F, -1.066972F, 0F));\n partdefinition.addOrReplaceChild(\"supportright2\", CubeListBuilder.create().texOffs( 52, 21).addBox(4F, 0.4666667F, 2.5F, 2, 2, 1).mirror(isRightHand), PartPose.offsetAndRotation(0F, 0F, 0F, 0F, 0.6329786F, 0F));\n partdefinition.addOrReplaceChild(\"supportright3\", CubeListBuilder.create().texOffs( 52, 21).addBox(5.1F, 1F, -0.8333333F, 1, 1, 5).mirror(isRightHand), PartPose.offsetAndRotation(0F, 0F, 0F, 0F, 0F, 0F));\n partdefinition.addOrReplaceChild(\"supportright4\", CubeListBuilder.create().texOffs( 52, 21).addBox(5.633333F, 0.4666667F, 1.7F, 2, 2, 1).mirror(isRightHand), PartPose.offsetAndRotation(0F, 0F, 0F, 0F, -0.3688404F, 0F));\n partdefinition.addOrReplaceChild(\"supportright5\", CubeListBuilder.create().texOffs( 54, 27).addBox(-2.866667F, 1F, isRightHand? 6.333333F : 7F, 4, 1, 1).mirror(isRightHand), PartPose.offsetAndRotation(0F, 0F, 0F, 0F, 0.7714355F, 0F));\n\n return LayerDefinition.create(meshdefinition, 64, 32);\n }", "public void compile() {\n\t\tdouble zn = params.getZn();\n\t\tdouble zf = params.getZf();\n\t\tdouble sw = params.getSw();\n\t\tdouble sh = params.getSh();\n\n\t\tdouble d[][] = { { 2 * zn / sw, 0, 0, 0 }, { 0, 2 * zn / sh, 0, 0 },\n\t\t\t\t{ 0, 0, zf / (zf - zn), -zn * zf / (zf - zn) }, { 0, 0, 1, 0 } };\n\t\tTransformation proj = new Transformation(d);\n\t\tmk = proj.mult(VCS);\n\t\tsetChanged();\n\t\tnotifyObservers();\n\t}", "private void aretes_aW(){\n\t\tthis.cube[4] = this.cube[16]; \n\t\tthis.cube[16] = this.cube[23];\n\t\tthis.cube[23] = this.cube[37];\n\t\tthis.cube[37] = this.cube[30];\n\t\tthis.cube[30] = this.cube[4];\n\t}", "public WpWallSurface(int x, int y,Position position,SurfaceType type,boolean passing) {\n super(x, y,position);\n this.type = type;\n this.passing = passing;\n }", "@Override\n\tprotected void createFrameOrbit( String frameColor )\n\t{\n\t\t\n AlgebraicField hf = this .mField;\n\n AlgebraicNumber one = hf .one();\n AlgebraicNumber s = hf .getAffineScalar().reciprocal(); // reciprocal of sigma\n AlgebraicNumber R = hf .createPower( 1 ) .times( s ); // rho / sigma\n\n // (-s,1) Y\n // +---+------ [2] ---------+-----------+--------+---+\n // / / / (s,R) / /\n // +---+--------+-----------+--------- [1] ------+---+\n // / / / / / /\n // / / / / / / /\n // / / / / / /\n // (-1,s) [3] -+--------+-----------+-----------+--------+---+\n // / / / / / /\n // / / / / / / /\n // / / / / / / /\n // / / / / / \n // +---+--------+--------- O ---------+--------+- [0] (1,0) X\n // / / / / / \n // / / / /<--- s --->/ / /\n // / / / /<-------- R ------->/ /\n // / / /<---------- 1 --------->/\n // +- [4| ------+-----------+-----------+--------+---+\n // / (-R,-s) / / / / /\n // / / / / / / /\n // / / / / / (R,-R) /\n // +---+--------+-----------+-----------+------ [6] -+\n // / / / / /\n // +---+--------+--------- [5] ---------+--------+---+\n // (0,-1)\n \n AlgebraicVector zAxis = hf .basisVector( 3, AlgebraicVector.Z );\n AlgebraicVector zAxisNeg = zAxis .negate();\n AlgebraicVector axis0 = hf .basisVector( 3, AlgebraicVector.X );\n AlgebraicVector axis1 = hf .origin( 3 )\n \t\t.setComponent( AlgebraicVector.X, s )\n\t\t\t\t.setComponent( AlgebraicVector.Y, R );\n AlgebraicVector axis2 = hf .origin( 3 )\n \t\t.setComponent( AlgebraicVector.X, s .negate() )\n\t\t\t\t.setComponent( AlgebraicVector.Y, one );\n AlgebraicVector axis3 = hf .origin( 3 )\n \t\t.setComponent( AlgebraicVector.X, one .negate() )\n\t\t\t\t.setComponent( AlgebraicVector.Y, s );\n AlgebraicVector axis4 = hf .origin( 3 )\n \t\t.setComponent( AlgebraicVector.X, R .negate() )\n\t\t\t\t.setComponent( AlgebraicVector.Y, s .negate() );\n AlgebraicVector axis5 = hf .origin( 3 )\n\t\t\t\t.setComponent( AlgebraicVector.Y, one .negate() );\n AlgebraicVector axis6 = hf .origin( 3 )\n \t\t.setComponent( AlgebraicVector.X, R )\n\t\t\t\t.setComponent( AlgebraicVector.Y, R .negate() );\n\n // all mMatrices are mappings of [X,Y,Z] = [ axis0, -axis5, zAxis ]\n mMatrices[ 0 ] = hf .identityMatrix( 3 );\n mMatrices[ 1 ] = new AlgebraicMatrix( axis1, axis6 .negate(), zAxis );\n mMatrices[ 2 ] = new AlgebraicMatrix( axis2, axis0 .negate(), zAxis );\n mMatrices[ 3 ] = new AlgebraicMatrix( axis3, axis1 .negate(), zAxis );\n mMatrices[ 4 ] = new AlgebraicMatrix( axis4, axis2 .negate(), zAxis );\n mMatrices[ 5 ] = new AlgebraicMatrix( axis5, axis3 .negate(), zAxis );\n mMatrices[ 6 ] = new AlgebraicMatrix( axis6, axis4 .negate(), zAxis );\n \n mMatrices[ 7 ] = new AlgebraicMatrix( axis0, axis2 .negate(), zAxisNeg );\n mMatrices[ 8 ] = mMatrices[ 1 ] .times( mMatrices[ 7 ] );\n mMatrices[ 9 ] = mMatrices[ 2 ] .times( mMatrices[ 7 ] );\n mMatrices[ 10 ] = mMatrices[ 3 ] .times( mMatrices[ 7 ] );\n mMatrices[ 11 ] = mMatrices[ 4 ] .times( mMatrices[ 7 ] );\n mMatrices[ 12 ] = mMatrices[ 5 ] .times( mMatrices[ 7 ] );\n mMatrices[ 13 ] = mMatrices[ 6 ] .times( mMatrices[ 7 ] );\n\t}", "protected void skybox() {\n Triple pos1, pos2, pos3, pos4, pos5, pos6, pos7, pos8, col1, col2, col3, col4;\n\n pos1 = new Triple(0, 0, 0);\n pos2 = new Triple(100, 0, 0);\n pos3 = new Triple(100, 0, 100);\n pos4 = new Triple(0, 0, 100);\n pos5 = new Triple(0, 100, 0);\n pos6 = new Triple(100, 100, 0);\n pos7 = new Triple(100, 100, 100);\n pos8 = new Triple(0, 100, 100);\n\n // Front Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos1, 0, 0),\n new Vertex(pos2, .25, 0),\n new Vertex(pos3, .25, 1),\n 21 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos3, .25, 1),\n new Vertex(pos4, 0, 1),\n new Vertex(pos1, 0, 0),\n 21 ) );\n\n // Left Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos1, 1, 0),\n new Vertex(pos5, .75, 0),\n new Vertex(pos8, .75, 1),\n 21 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos8, .75, 1),\n new Vertex(pos4, 1, 1),\n new Vertex(pos1, 1, 0),\n 21 ) );\n\n // Right Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos2, .25, 0),\n new Vertex(pos6, .5, 0),\n new Vertex(pos7, .5, 1),\n 21 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos7, .5, 1),\n new Vertex(pos3, .25, 1),\n new Vertex(pos2, .25, 0),\n 21 ) );\n\n // Back Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos5, .75, 0),\n new Vertex(pos6, .5, 0),\n new Vertex(pos7, .5, 1),\n 21 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos7, .5, 1),\n new Vertex(pos8, .75, 1),\n new Vertex(pos5, .75, 0),\n 21 ) );\n\n // Top Triangles\n// frozenSoups.addTri( new Triangle(new Vertex(pos4, 0, 0),\n// new Vertex(pos3, 0, 1),\n// new Vertex(pos7, 1, 1),\n// 20 ) );\n\n// frozenSoups.addTri( new Triangle(new Vertex(pos7, 0, 0),\n// new Vertex(pos8, 1, 0),\n// new Vertex(pos4, 1, 1),\n// 20 ) );\n }", "public static Transform newXRotation(float th){\n float sinth = (float) Math.sin(th);\n float costh = (float) Math.cos(th);\n return new Transform(new float[][]{\n {1.0f, 0.0f, 0.0f, 0.0f},\n {0.0f, costh, -sinth, 0.0f},\n {0.0f, sinth, costh, 0.0f},\n {0.0f, 0.0f, 0.0f, 1.0f}\n });\n }", "private void createLayers() {\n mAktieCubeLayers[kUp] = new AktieCubeLayer(AktieCubeLayer.kAxisY);\n mAktieCubeLayers[kDown] = new AktieCubeLayer(AktieCubeLayer.kAxisY);\n mAktieCubeLayers[kLeft] = new AktieCubeLayer(AktieCubeLayer.kAxisX);\n mAktieCubeLayers[kRight] = new AktieCubeLayer(AktieCubeLayer.kAxisX);\n mAktieCubeLayers[kFront] = new AktieCubeLayer(AktieCubeLayer.kAxisZ);\n mAktieCubeLayers[kBack] = new AktieCubeLayer(AktieCubeLayer.kAxisZ);\n mAktieCubeLayers[kMiddle] = new AktieCubeLayer(AktieCubeLayer.kAxisX);\n mAktieCubeLayers[kEquator] = new AktieCubeLayer(AktieCubeLayer.kAxisY);\n mAktieCubeLayers[kSide] = new AktieCubeLayer(AktieCubeLayer.kAxisZ);\n }", "@Override\r\n\tpublic SurpriseBox createSurpriseBox(int weight)\r\n\t{\r\n\t\treturn new SurpriseBox(weight);\r\n\t}", "private void westRegion() {\r\n\t\tContainer westContainer = new Container(new BoxLayout(BoxLayout.Y_AXIS));\r\n\t\t\r\n\t\twestContainer.getAllStyles().setPadding(Component.TOP, 50);\r\n\t\twestContainer.getAllStyles().setBorder(Border.createLineBorder(4, ColorUtil.BLACK));\r\n\t\t\r\n\t\tAccelerateCommand accelerateCommand = new AccelerateCommand(gw);\r\n\t\tButton accelerateButton = new Button(accelerateCommand);\r\n\t\t\r\n\t\tLeftCommand leftCommand = new LeftCommand(gw);\r\n\t\tButton leftButton = new Button(leftCommand);\r\n\t\t\r\n\t\twestContainer.add(accelerateButton);\r\n\t\tbuttonStyling(accelerateButton, true, false);\r\n\t\t\r\n\t\twestContainer.add(leftButton);\r\n\t\tbuttonStyling(leftButton, false, false);\r\n\t\t\r\n\t\taccelerateButton.setCommand(accelerateCommand);\r\n\t\taddKeyListener('a', accelerateCommand);\r\n\t\t\r\n\t\tleftButton.setCommand(leftCommand);\r\n\t\taddKeyListener('l', leftCommand);\r\n\t\t\r\n\t\tadd(BorderLayout.WEST, westContainer);\r\n\t}", "protected final void resetClipPlanes()\n {\n // set the point for each plane to the viewer position\n Vector3d loc = myPosition.getLocation();\n myLeftClip.setPoint(loc);\n myRightClip.setPoint(loc);\n myBottomClip.setPoint(loc);\n myTopClip.setPoint(loc);\n myRightClip.setNormal(myPosition.getRight().rotate(myPosition.getUp(), Math.PI - myHalfFOVx));\n myLeftClip.setNormal(myPosition.getRight().rotate(myPosition.getUp(), myHalfFOVx));\n myBottomClip.setNormal(myPosition.getUp().rotate(myPosition.getRight(), -myHalfFOVy));\n // Increase the top clip a bit to account for zoomed in with terrain.\n myTopClip.setNormal(myPosition.getUp().rotate(myPosition.getRight(), myHalfFOVy - Math.PI + ourTopClipIncreaseAngle));\n }", "public Builder clearW() {\n \n w_ = 0F;\n onChanged();\n return this;\n }", "static public void make() {\n\t\tif (window != null)\n\t\t\treturn;\n\n\t\twindow = new JFrame();\n\t\twindow.setTitle(\"Finecraft\");\n\t\twindow.setMinimumSize(new Dimension(500, 300));\n\t\twindow.setSize(asInteger(WINDOW_WIDTH), asInteger(WINDOW_HEIGHT));\n\t\twindow.setResizable(asBoolean(WINDOW_RESIZE));\n\t\twindow.setLocationRelativeTo(null);\n\t\twindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t}", "BoxX(BoxX ob) {\n width = ob.width;\n height = ob.height;\n depth = ob.depth;\n }", "private void toXW() {\n if (fragment_XW == null) {\n fragment_XW = new Fragment_XW();\n fragmenttransaction.add(R.id.frame_content, fragment_XW);\n } else {\n fragmenttransaction.show(fragment_XW);\n }\n }", "public Vector4d setZero() {\n\t\tx = y = z = w =0;\n\t\treturn this;\n\t}", "private static void createParty() {\n\n\n JFrame fenetre = new JFrame(\"Little Thief Auto\");\n\n Route route = new Route();\n User user = new User();\n\n Affichage affichage = new Affichage(fenetre, user, route);\n Controleur ctrl = new Controleur(affichage, user, route);\n //ctrl.setAffichage(affichage);\n //ctrl.setCmds();\n //Deplace deplace = new Deplace(user, route, affichage);\n\n //deplace.start();//Voir qui le lance, en fonction de si il y a une fenetre de demarage ou pas\n Data.initGame();\n\n //fenetre.add(affichage);\n //fenetre.add(affichage.outScreen);\n affichage.switchInteface(false);\n\n //ctrl.startPartie(); //Pas d ecran dacceuil\n /*\n\n Voler fly = new Voler();\n Etat modele = new Etat(fly);\n Controleur ctrl = new Controleur(modele);\n Affichage affichage = new Affichage(ctrl, modele);\n VueBird bird = new VueBird(affichage);\n\n Instant start = Instant.now();\n affichage.setTimer(start);\n\n ctrl.setVue(affichage);\n Avancer avance = new Avancer(affichage, modele.getParcours());\n\n ctrl.enableKeyPad();\n enableReload(fenetre, affichage);\n\n modele.getParcours().setTime(start);\n fly.start();\n avance.start();\n\n\n\n fenetre.add(affichage);\n*/\n\n\n\n\n fenetre.pack();\n fenetre.setVisible(true);\n fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n }", "public Witch(List<Coven> covenList, int w) {\n this.covenList = covenList;\n this.w = w;\n }", "public Winzer() {\r\n\t\tthis(\"Max\", \"Musterwinzer\");\r\n\t}", "public abstract void makeSafeZone(float renderHeight);", "public void stworzWrogow() {\n\t\tfor(; aktualnaLiczbaWrogow < MAX_LICZBA_WROGOW; aktualnaLiczbaWrogow++) {\n\t\t\tdouble x = (generatorWspolrzednych.nextInt(550)) + 20 ;\n\t\t\tdouble y = ((generatorWspolrzednych.nextInt(750)) + 20);\n\t\t\tx = x < 0 ? -x : x; \n\t\t\ty = y < 0 ? y : -y;\n\t\t\tStatekWroga statekWroga = new StatekWroga(new Wspolrzedne(x, y));\n\t\t\t\n\t\t\tstatekWroga.setDol(DLUGOSC_RUCHU);\n\t\t\t\n\t\t\tstatkiWroga.add(statekWroga);\n\t\t}\n\t}", "public void setXForwarding(boolean enable){\n xforwading=enable; \n }", "public Vector4d(double x, double y, double z, double w) {\n\t\tset(x, y, z, w);\n\t}", "private void placeShip() {\r\n\t\t// Expire the ship ship\r\n\t\tParticipant.expire(ship);\r\n\r\n\t\tclipShip.stop();\r\n\r\n\t\t// Create a new ship\r\n\t\tship = new Ship(SIZE / 2, SIZE / 2, -Math.PI / 2, this);\r\n\t\taddParticipant(ship);\r\n\t\tdisplay.setLegend(\"\");\r\n\t}", "public abstract Vector4fc add(float x, float y, float z, float w);", "public Builder setW(float value) {\n \n w_ = value;\n onChanged();\n return this;\n }", "public Builder clearZ() {\n bitField0_ = (bitField0_ & ~0x00000004);\n z_ = 0F;\n onChanged();\n return this;\n }", "public DynamicCuboid setSizeZ(float z) {\n this.sizeZ = z;\n return this;\n }", "public Zug_V2() {\n\t\tsetLayout();\n\t\tthis.initStyle(StageStyle.UNDECORATED);\n\t\tthis.scene = new Scene(fenster, 500, 300);\n\t\tthis.setScene(scene);\n\t}", "@Test\n\tpublic void westSWC()\n\t{\n\t\t\n\t\tData d = new Data();\n\t\td.set(19, 35);\n\t\td.set(21, 46);\n\t\td.set(23, 89);\n\t\td.set(27, 68);\n\t\td.set(29, 79);\n\t\td.set(1, 34);\n\t\td.set(2, 45);\n\t\td.set(3, 56);\n\t\td.set(4, 67);\n\t\td.set(5, 78);\n\t\td.set(31, 23);\n\t\tArrayList<Coordinate> test_arr = d.shieldWallCapture(23);\n\t\tassertTrue(0==test_arr.get(0).getX() && 3==test_arr.get(0).getY()\n\t\t\t&& 0==test_arr.get(1).getX() && 4==test_arr.get(1).getY()\n\t\t\t&& 0==test_arr.get(2).getX() && 5==test_arr.get(2).getY()\n\t\t\t&& 0==test_arr.get(3).getX() && 6==test_arr.get(3).getY()\n\t\t\t&& 0==test_arr.get(4).getX() && 7==test_arr.get(4).getY());\n\t}", "FRAME createFRAME();", "void moveWest() {\n xpos = xpos - xspeed;\n if (xpos <= 0){ // 20\n xpos = width; // 25\n }\n }", "public void reverseDirectionX()\n\t{\n\t\t\n\t\tvx = -vx;\n\t\t\n\t}", "public DynamicCuboid setSizeX(float x) {\n this.sizeX = x;\n return this;\n }", "public void creerRequin(){\n\n requins[1] = new Requin(zone[1][2]);\n requins[1].start();\n }", "public Wall(int x1, int y1,int x2,int y2) {\r\n\tthis.x1 = x1 + TRANSLATION;\r\n\tthis.x2 = x2 + TRANSLATION;\r\n\tthis.y1 = y1 + TRANSLATION;\r\n\tthis.y2 = y2 + TRANSLATION;\r\n\tbustedWall = false; \r\n}", "public WorldScene makeScene() {\n WorldScene ws = new WorldScene(ForbiddenIslandWorld.ISLAND_SIZE,\n ForbiddenIslandWorld.ISLAND_SIZE);\n for (Cell c : this.board) {\n ws.placeImageXY(c.drawCell(waterHeight), c.x * 10, c.y * 10);\n }\n for (Target t : this.helicopterpieces) {\n ws.placeImageXY(t.drawPiece(), t.x * 10, t.y * 10);\n }\n ws.placeImageXY(this.player.drawPerson(), player.x * 10, player.y * 10);\n ws.placeImageXY(this.player2.drawPerson2(), player2.x * 10, player2.y * 10);\n return ws;\n }", "Surface createSurface();", "BackwardMinAction createBackwardMinAction();", "public void reverseXVelocity() {\n if(xVelocity > 0) //collision on right wall\n xVelocity = -xVelocity - 50;\n else //collision on left wall\n xVelocity = -xVelocity + 50;\n this.normalizeVelocity(this.xVelocity, this.yVelocity);\n }", "public static void waltz() {\n //test code written by bokun: self rotation\n leftMotor.setSpeed(ROTATE_SPEED);\n rightMotor.setSpeed(ROTATE_SPEED);\n leftMotor.forward();\n rightMotor.backward();\n }", "public void setAxis(String name,String frame,float x,float y, float z){\r\n\t\tthis.addChild(new DirectionVector(name,frame,x,y,z));\r\n\t}", "public void rotateCCW(){\n rotState = (rotState + 3) % 4;\n for (int i = 0; i < tiles.length; ++i){\n tiles[i] = new Point(tiles[i].y , -tiles[i].x);\n }\n }", "public void frontUp(){\n frontSolenoid.set(DoubleSolenoid.Value.kForward);\n }", "Circles(LX lx) {\n super(lx);\n addModulator(wave360).start();\n addModulator(wave100).start();\n addParameter(waveSlope);\n addParameter(speedParam);\n\n for (BaseCube cube : model.baseCubes) {\n if (cube.z < minz) {minz = cube.z;}\n if (cube.z > maxz) {maxz = cube.z;}\n }\n }", "static void wing(GL2 gl){\n gl.glPushMatrix();\n gl.glScaled(2.5, 0.1, 1);\n gl.glTranslated(0.5, 0, 0.5);\n cube(gl,1);\n gl.glPopMatrix();\n gl.glPushMatrix();\n gl.glTranslated(2.5, 0, 0);\n cannon(gl);\n gl.glPopMatrix();\n }", "public abstract Vector4fc rotateX(float angle);", "public PaperAirplane (int x, int y)\n\t{\n\t\tsuper (x, y);\t//Superclass called to set x and y\n\t\t\n\t\txPoints = new int [3];\t//sets xPoints to have 3 elements\n\t\tyPoints = new int [3];\t//sets yPoints to have 3 elements\n\t\t\n\t\t//Using the getX_Pos () set in the superclass, the following sets the\n\t\t//xDimensions.\n\t\txDimension1 = getX_Pos () - 23;\n\t\txDimension2 = getX_Pos () - 18;\n\t\txDimension3 = getX_Pos () + 22;\n\t\t\n\t\t//Using the getY_Pos () set in the superclass, the following sets the\n\t\t//yDimensions.\n\t\tyDimension1 = getY_Pos() - 2;\n\t\tyDimension2 = getY_Pos() - 17;\n\t\tyDimension3 = getY_Pos() + 5;\n\t\t\n\t\t//The following sets the same dimensions from above, but these never\n\t\t//change and can be used for reconstruction\n\t\trXD1 = getX_Pos () - 23;\n\t\trXD2 = getX_Pos () - 18;\n\t\trXD3 = getX_Pos () + 22;\n\t\trYD1 = getY_Pos() - 2;\n\t\trYD2 = getY_Pos() - 17;\n\t\trYD3 = getY_Pos() + 5;\n\t}", "public static Vect3 make(double x, double y, double z) {\n\t\treturn new Vect3(Units.from(\"NM\",x),Units.from(\"NM\",y),Units.from(\"ft\",z));\n\t}", "public Location west()\r\n {\r\n return new Location(x - 1, y);\r\n }", "public void setW(boolean w) {\n\tthis.w = w;\n }", "@Spawns(\"wrench\")\n public Entity spawnWrench(SpawnData data) {\n return entityBuilder()\n .from(data)\n .type(WRENCH)\n .viewWithBBox(texture(\"wrench.png\", 40, 58))\n .with(new CollidableComponent(true))\n .with(new OffscreenCleanComponent())\n .with(new LiftComponent().yAxisSpeedDuration(150, Duration.seconds(15)))\n .build();\n }", "Turn createTurn();", "ZTFrame toZTFrame(ZoneId zoneID);", "public com.vodafone.global.er.decoupling.binding.request.CustcareFullRefundMonetaryRequest createCustcareFullRefundMonetaryRequest()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.CustcareFullRefundMonetaryRequestImpl();\n }" ]
[ "0.4991046", "0.49166653", "0.48425192", "0.4815239", "0.4791942", "0.47342986", "0.47307384", "0.46842843", "0.4634785", "0.46287277", "0.45933315", "0.45895898", "0.45267576", "0.45183542", "0.44925594", "0.44718143", "0.44261178", "0.44025365", "0.43746275", "0.4357342", "0.4340209", "0.4340209", "0.433883", "0.4333616", "0.43239403", "0.43162006", "0.43150494", "0.4309327", "0.43081152", "0.43058974", "0.43049166", "0.43016076", "0.43010706", "0.42897785", "0.42897785", "0.4287007", "0.42867547", "0.42855445", "0.42692962", "0.42649925", "0.42434853", "0.42423698", "0.4237729", "0.42361018", "0.42330486", "0.42247215", "0.42207813", "0.42170498", "0.42123154", "0.42071423", "0.42022327", "0.41984373", "0.41971052", "0.41956013", "0.41870192", "0.41837692", "0.41639915", "0.41614327", "0.41610414", "0.41458535", "0.41438547", "0.41399696", "0.41392252", "0.4123613", "0.41229", "0.41177267", "0.4113096", "0.41101143", "0.4107367", "0.41073173", "0.41072077", "0.41048107", "0.40997323", "0.40993625", "0.40986764", "0.40915656", "0.40912235", "0.40841758", "0.4082421", "0.40817136", "0.40753725", "0.40701717", "0.40699995", "0.40612072", "0.40600842", "0.40576655", "0.40576154", "0.40537307", "0.40505368", "0.4048719", "0.40431926", "0.40376073", "0.40373126", "0.40358946", "0.40317383", "0.40308636", "0.40297955", "0.40268925", "0.40224177", "0.4016754" ]
0.51489544
0
Creates a new spatial acceleration that can be used to describe the gravitational acceleration that a multisystem is under.
public static SpatialAccelerationReadOnly newGravitationalSpatialAcceleration(RigidBodyReadOnly rootBody, double gravity) { Vector3D gravitationalAcceleration = new Vector3D(0.0, 0.0, gravity); Vector3D zero = new Vector3D(); MovingReferenceFrame bodyFixedFrame = rootBody.getBodyFixedFrame(); ReferenceFrame worldFrame = ReferenceFrame.getWorldFrame(); return new SpatialAcceleration(bodyFixedFrame, worldFrame, bodyFixedFrame, zero, gravitationalAcceleration); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void add_gravitational_acceleration( Body body ) {\r\n double x, y, z, r, a;\r\n double G = 6.671984315419034E-11; // G = NASA mu / b[0].m Orbit3D sep 2017 value\r\n Body that;\r\n\r\n if ( ap.localGravity ) {\r\n// body.currentState.ay = body.currentState.ay - smallg;\r\n } else {\r\n // go through SolarSystem ss and find gravitational accelerations due to each planet in it.\r\n for ( int n=0; n<ap.nPlanets; n++ ) {\r\n that = ap.ss.b[n];\r\n if ( body.inFreeMotion && body.num != that.num ) {\r\n x = body.currentState.x - that.currentState.x; // x distance from m\r\n y = body.currentState.y - that.currentState.y; // y distance .. ..\r\n z = body.currentState.z - that.currentState.z; // z distance .. ..\r\n r = Math.sqrt(x * x + y * y + z * z); // distance .. ..\r\n a = -(G * that.m) / (r * r); // acceleration towards that\r\n body.currentState.ax = body.currentState.ax + a * x / r; // x component of accel\r\n body.currentState.ay = body.currentState.ay + a * y / r; // y component of accel\r\n body.currentState.az = body.currentState.az + a * z / r; // z component of accel\r\n }\r\n }\r\n\r\n }\r\n }", "public Acceleration getGxAsAcceleration() {\n return new Acceleration(mGx, AccelerationUnit.METERS_PER_SQUARED_SECOND);\n }", "private native void UpdateAcceleration(float infAccelerationX, float infAccelerationY, float infAccelerationZ);", "public Acceleration getGzAsAcceleration() {\n return new Acceleration(mGz, AccelerationUnit.METERS_PER_SQUARED_SECOND);\n }", "public static void add_damping_acceleration( Body body ) {\r\n body.currentState.ax = body.currentState.ax - body.currentState.vx * body.damping / body.m;\r\n body.currentState.ay = body.currentState.ay - body.currentState.vy * body.damping / body.m;\r\n body.currentState.az = body.currentState.az - body.currentState.vz * body.damping / body.m;\r\n }", "public static StateVector acceleration( StateVector state, int ai ){\r\n double x, y, z, r, a;\r\n double G = 6.671984315419034E-11; // G = NASA mu / b[0].m Orbit3D sep 2017 value\r\n a = 0;\r\n StateVector acc = new StateVector();\r\n StateVector s = new StateVector();\r\n\r\n acc.copyStateVectors( state ); // set accelerations to zero\r\n acc.ax = 0;\r\n acc.ay = 0;\r\n acc.az = 0;\r\n\r\n for( int n=0; n<ap.ss.nbodies; n++ ) {\r\n if ( body.activated && body.inFreeMotion && (n != body.num) && (ap.ss.b[n].status == 3) ) {\r\n\r\n x = state.x - ap.ss.b[n].advanced[ai].x; // x distance from m\r\n y = state.y - ap.ss.b[n].advanced[ai].y; // y distance .. ..\r\n z = state.z - ap.ss.b[n].advanced[ai].z; // z distance .. ..\r\n r = Math.sqrt(x * x + y * y + z * z); // distance .. ..\r\n\r\n // only find interactions with massive bodies > 1 kg mass\r\n if ( ap.ss.b[n].m > 1.0 ) {\r\n\r\n // gravitational accelerations act on bodies if > 5 metres distance (to avoid large accelarations)\r\n if ( ap.ss.b[n].status == 3 && ap.ss.b[n].activated && ( r > 5.0 ) ) {\r\n a = -(G * ap.ss.b[n].m) / (r * r); // acceleration towards that\r\n acc.ax = acc.ax + a * x / r; // x component of accel\r\n acc.ay = acc.ay + a * y / r; // y component of accel\r\n acc.az = acc.az + a * z / r; // z component of accel\r\n }\r\n }\r\n }\r\n }\r\n\r\n return( acc );\r\n }", "void addCoordinateSystem(CoordinateSystem cs);", "protected abstract void setGravityImpl( float x, float y, float z );", "public BSimVertex(double newX, double newY, double newZ){\r\n\t\tVector3d newLocation = new Vector3d(newX,newY,newZ);\r\n\t\tlocation = newLocation;\r\n\t}", "public void getGxAsAcceleration(final Acceleration result) {\n result.setValue(mGx);\n result.setUnit(AccelerationUnit.METERS_PER_SQUARED_SECOND);\n }", "private void UpdateAcceleration()\n\t{\n\t\tVector2 newAcceleration = new Vector2(0,0);\n\t\t\n\t\tfor(int i=0;i<forcesList.size();i++)\n\t\t{\n\t\t\tnewAcceleration.x += forcesList.get(i).force.x / mass;\n\t\t\tnewAcceleration.y += forcesList.get(i).force.y / mass;\n\t\t\t\n\t\t\tif(forcesList.get(i).mode == ForceMode.Impulse)\n\t\t\t{\n\t\t\t\tRemoveForce(forcesList.get(i));\n\t\t\t}\n\t\t}\n\t\tacceleration = newAcceleration;\n\t\t\n\t\tfloat newAngularAcc = 0;\n\t\t\n\t\tfor(int i=0;i<torqueList.size();i++)\n\t\t{\n\t\t\tnewAngularAcc += torqueList.get(i).torqueVal / mass;\n\t\t\tif(torqueList.get(i).mode == ForceMode.Impulse)\n\t\t\t{\n\t\t\t\tRemoveTorque(torqueList.get(i));\n\t\t\t}\n\t\t}\n\t\tangularAcceleration = newAngularAcc;\n\t\t\n\t}", "Service withAcceleration(boolean accelerate);", "public Acceleration getGyAsAcceleration() {\n return new Acceleration(mGy, AccelerationUnit.METERS_PER_SQUARED_SECOND);\n }", "public static FixedFrameSpatialAccelerationBasics newPlanarFixedFrameSpatialAccelerationVectorBasics(ReferenceFrame bodyFrame, ReferenceFrame baseFrame,\n ReferenceFrame expressedInFrame)\n {\n return new FixedFrameSpatialAccelerationBasics()\n {\n private final FixedFrameVector3DBasics angularPart = newYOnlyFixedFrameVector3DBasics(expressedInFrame);\n private final FixedFrameVector3DBasics linearPart = newXZOnlyFixedFrameVector3DBasics(expressedInFrame);\n\n @Override\n public ReferenceFrame getBodyFrame()\n {\n return bodyFrame;\n }\n\n @Override\n public ReferenceFrame getBaseFrame()\n {\n return baseFrame;\n }\n\n @Override\n public ReferenceFrame getReferenceFrame()\n {\n return expressedInFrame;\n }\n\n @Override\n public FixedFrameVector3DBasics getAngularPart()\n {\n return angularPart;\n }\n\n @Override\n public FixedFrameVector3DBasics getLinearPart()\n {\n return linearPart;\n }\n\n @Override\n public String toString()\n {\n return MecanoIOTools.getSpatialAccelerationString(this);\n }\n };\n }", "double getAcceleration ();", "public Matrix gravityGradient()\n\t{\n\t\tVectorN r = this.getR();\n\t\tdouble rmag = r.mag();\n\t\tdouble r2 = rmag * rmag;\n\t\tdouble muor3 = this.mu / (r2 * rmag);\n\t\tdouble jk = 3.0 * muor3 / (r2);\n\t\tMatrix gg = new Matrix(3, 3);\n\n\t\tdouble xx = r.x[0];\n\t\tdouble yy = r.x[1];\n\t\tdouble zz = r.x[2];\n\n\t\tgg.A[0][0] = jk * xx * xx - muor3;\n\t\tgg.A[0][1] = jk * xx * yy;\n\t\tgg.A[0][2] = jk * xx * zz;\n\n\t\tgg.A[1][0] = gg.A[0][1];\n\t\tgg.A[1][1] = jk * yy * yy - muor3;\n\t\tgg.A[1][2] = jk * yy * zz;\n\n\t\tgg.A[2][0] = gg.A[0][2];\n\t\tgg.A[2][1] = gg.A[1][2];\n\t\tgg.A[2][2] = jk * zz * zz - muor3;\n\n\t\treturn gg;\n\t}", "private Vector2d acceleration(Vector2d position, Vector2d velocity) {\n\t\tVector2d gradient = course.height.gradient(position);\n\t\tdouble accelerationX = -GRAVITY * (gradient.x + course.getFriction() * velocity.x / velocity.length());\n\t\tdouble accelerationY = -GRAVITY * (gradient.y + course.getFriction() * velocity.y / velocity.length());\n\t\treturn new Vector2d(accelerationX,accelerationY);\n\t}", "public Thrust(Shape host, float acceleration, float max_speed)\n\t{\n\t\tthis.host = host;\n\t\tthis.max_speed = max_speed;\n\t\tthis.acceleration = acceleration;\n\n\t\tthis.speed = 0;\n\t}", "public Space_Object (){\n groundPosition = 0;\n }", "public abstract Vector4fc add(float x, float y, float z, float w);", "public EarthGeometry(){\n\t\tgcl1 = new GeodeticCalculator();\n\t\trnd1 = new Random(56789);\n\t}", "public void getGzAsAcceleration(final Acceleration result) {\n result.setValue(mGz);\n result.setUnit(AccelerationUnit.METERS_PER_SQUARED_SECOND);\n }", "protected abstract BaseVector3d createBaseVector3d(double x, double y, double z);", "public Vector2D getAcceleration()\n\t{\n\t\treturn acceleration;\n\t}", "public VectorN local_grav()\n\t{\n\t\tVectorN r = this.getR();\n\t\tdouble rmag = r.mag();\n\t\tdouble muor3 = this.mu / (rmag * rmag * rmag);\n\n\t\tdouble gx = -1.0 * (muor3 * r.x[0]);\n\t\tdouble gy = -1.0 * (muor3 * r.x[1]);\n\t\tdouble gz = -1.0 * (muor3 * r.x[2]);\n\n\t\tVectorN grav = new VectorN(gx, gy, gz);\n\t\treturn grav;\n\t}", "private static Vector2 calculateAcceleration(PhysicsGameObject obj){\n Vector2 gravity = gravityForce(obj);\n Vector2 friction = frictionForce(obj);\n return new Vector2(friction.x + gravity.x,friction.y + gravity.y);\n }", "public Acceleration getNormAsAcceleration() {\n return new Acceleration(getNorm(),\n AccelerationUnit.METERS_PER_SQUARED_SECOND);\n }", "public Continuous2D getGeographySpace() {\n return obstacleSpace;\n }", "public SpaceThing() {\n\t\tlocation = new Location();\n\t\tvector = new Vector();\n\t\tcenterX = centerY = 0;\n\t}", "public double getAcceleration() {\r\n return acceleration;\r\n }", "public void setAcceleration(double acceleration) {\r\n this.acceleration = acceleration;\r\n }", "protected WorldController(float width, float height, float gravity) {\n\t\tthis(new Rectangle(0,0,width,height), new Vector2(0,gravity));\n\t}", "@NativeType(\"ovrVector3f\")\n public OVRVector3f AngularAcceleration() { return nAngularAcceleration(address()); }", "public double getAcceleration() {\n return acceleration;\n }", "public AccelerometerGs getAccelerometerGs()\n {\n return finchController.getAccelerometerGs();\n }", "public EnvEntityClient(float x, float y, float z, long time) {\n\t\tsuper(x,y,z,time);\n\t\tgenerate();\n\t}", "public abstract Vector4fc set(float x, float y, float z, float w);", "private void accelerate()\n {\n if(accelX < maxAccelRate)\n {\n accelX += accelerationRate;\n }\n }", "public void createSpaceClasses(){\n\t//add the number of classe demand in a list of superchannel\n\t\tspaceSC_List = new ArrayList<OpticalSuperChannel>();\n\t\tfor ( int i = 1 ; i < this.spatialDimension+1 ; i++ ) {\n\t\t\tspaceSC_List.add(new OpticalSuperChannel( i , this.signalBw, this.channelSpacing, this.bandGuard,\n\t\t\t\t\tthis.slotBw, this.modulationFormat));\n\t\t}\n\n\n\t}", "public Accelerate(double[] in, long _time) {\n\t\tacc = new Vector3D(in);\n\t\ttime.setTime(_time);\n\t}", "Fog createFog();", "private Geometry getGeom2() {\n return DefaultReference.getGeometryFactory().toGeometry(new ReferencedEnvelope(\n DefaultEnvMinX + 4,\n DefaultEnvMinX + 9,\n DefaultEnvMinY + 4,\n DefaultEnvMinY + 9,\n CRS\n ));\n }", "public SpaceShip() {\r\n\t\tsuper();\r\n\t\tthis.radius = 15;\r\n\t\tgameController.setSpaceShip(this);\r\n\t\tArrayList<Point> shipList = new ArrayList<Point>();\r\n\t\tshipList.add(new Point(-10, -10));\r\n\t\tshipList.add(new Point(-10, 10));\r\n\t\tshipList.add(new Point(15, 0));\r\n\t\tthis.addShape(new Polygon(shipList, Color.WHITE, false));\r\n\t\t// this.addShape(new Circle(radius, this.getCenterPoint().copy(),\r\n\t\t// Color.RED, false));\r\n\t}", "public FloatVector3D(){}", "@Override\n\t\tpublic void create() {\n\t\t\tcannon = new CannonLogic();\n\t\t\tlines = new LineLogic();\n\t\t\tboxes = new BoxLogic();\n\t\t\tcontroller = new PlayerController();\n\t\t\tshapeList = new ArrayList<Shape>();\n\t\t\t\n\t\t\tGdx.gl11.glEnableClientState(GL11.GL_VERTEX_ARRAY);\n\t\t\tGdx.gl11.glClearColor(0.4f, 0.6f, 1.0f, 1.0f);\n\t\t\tvertexBuffer = BufferUtils.newFloatBuffer(8);\n\t\t\tvertexBuffer.put(new float[] {-50,-50, -50,50, 50,-50, 50,50});\n\t\t\tvertexBuffer.rewind();\n\t\t}", "public void addSpaceStation()\n\t{\n\t\t//if a space station is already spawned, one will not be added\n\n\t\tgameObj.add(new SpaceStation(getHeight(), getWidth()));\n\t\tSystem.out.println(\"Space station added\");\n\t\tnotifyObservers();\n\t}", "public CoordinateSystem( final String name ) {\n super( name );\n }", "public void generate() {\n\t\t\n\t\t// For this system, there are two particles per cell:\n\t\tint nc = size[0][0]*size[0][1]*size[0][2];\n\t\tn = 3*nc;\n\t\t\n\t\t// The AB2 Lattice:\n\t\tAB2Lattice ab2 = new AB2Lattice();\n\t\tab2.setSizeInCells(size[0][0],size[0][1],size[0][2]);\n\t\t\n\t\t// Stick them in the latt member:\n\t\tlatt = new VectorD3[2][];\n\t\tlatt[0] = new VectorD3[n];\t\t\n\t\tSystem.arraycopy(ab2.getLattice(0),0,latt[0], 0, nc);\n\t\tSystem.arraycopy(ab2.getLattice(1),0,latt[0], nc, 2*nc);\n\t\tlatt_name[0] = \"AB2\";\n\t\tab2.saveAsWRL(\"initAB2\");\n\t\t\n\t\t// Build the A and B lattices, A first, then B second:\n\n\t\t// The seperate A and B2 lattices\n\t\tFaceCentredCubicABCLattice fcc = new FaceCentredCubicABCLattice();\n\t\t\n\t\t// Create the new system at the new size:\n\t\tNtp = n-nc;\n\t\tfcc.setSizeInCells(size[1][0],size[1][1],size[1][2]);\n\n\t\t// Copy the two FCC lattices into the 1th phase:\n\t\tlatt[1] = new VectorD3[n];\n\t\tlatt_name[1] = \"FCC\";\n\t\tSystem.arraycopy(fcc.getLattice(), 0, latt[1], 0, n);\n\n\t\t/* Define distances between neighbouring atoms in the same stacking plane \n\t\t * taking advantage of the fact that both lattices have the same Unit Cell: */\n\t\tdouble[] c_uc = new double[3];\n\t\tc_uc = ab2.getUnitCell();\n\t\tuc.x = c_uc[0];\n\t\tuc.y = c_uc[1];\n\t\tuc.z = c_uc[2];\n\t\t\n\t\t// Put the lattices in the class members, for later use:\n\t\tlats[0] = (Lattice)ab2;\n\t\tlats[1] = (Lattice)fcc;\n\t\t\n\t}", "public ShotEngine(StartSettings ss, Polygon[] p)\n\t{\n\t\tssp = new SpatialPartition(0, 0, ss.getMapWidth(), ss.getMapHeight(), 20, 60, 100);\n\t\tpsp = new SpatialPartition(0, 0, ss.getMapWidth(), ss.getMapHeight(), 10, 20, 100);\n\t\tfor(int i = 0; i < p.length; i++)\n\t\t{\n\t\t\tpsp.addRegion(p[i]);\n\t\t}\n\t}", "public Fortress(int waterCapacityInitial, Vector2 position) {\r\n\t\tthis.position =position;\r\n\t\tthis.waterCapacity = waterCapacityInitial; \r\n\t\tthis.waterLevel = 0;\r\n\t\tthis.level = 1;\r\n\t\tthis.pumpSpeed = 1; \r\n\t\t//this.weapon = new Weapon();\r\n\t}", "private void updatePhysics ( ECSEntity entity, long t )\n {\n // Constants.\n \n final double SCREEN_HEIGHT = 600.0;\n final double FRICTION_COEFFICIENT = 0.0001 / SCREEN_HEIGHT;\n final double ACCELERATION = 0.001 / SCREEN_HEIGHT;\n \n // Initialize working variables.\n \n double ax = 0.0;\n double ay = 0.0;\n \n // Retrieve the entity's components.\n \n this.transform = ( ComponentTransform ) entity.getComponent ( Constants.COMPONENT_TRANSFORM );\n this.physics = ( ComponentPhysics ) entity.getComponent ( Constants.COMPONENT_PHYSICS );\n \n // Initialize working variables.\n \n Vector2D a = new Vector2D ( this.physics.acceleration );\n Vector2D v = new Vector2D (); \n Vector2D d = new Vector2D ();\n Vector2D u = new Vector2D ();\n Vector2D dUp = new Vector2D ( 0.0, 1.0 );\n Vector2D dDown = new Vector2D ( 0.0, -1.0 );\n Vector2D dRight = new Vector2D ( 1.0, 0.0 );\n Vector2D dLeft = new Vector2D ( -1.0, 0.0 );\n double p = FRICTION_COEFFICIENT;\n double vMax = this.physics.vMax;\n \n // Calculate velocity.\n \n v.setVector ( a.scale ( t ) ); // Acceleration: a = v/t ↔ v = a·t (Newtonian acceleration).\n \n // Apply accelerator.\n \n if ( v.magnitude() < vMax / t )\n { \n if ( this.physics.accelerateUp ) { a.setVector ( a.add ( dUp.scale ( ACCELERATION ) ) ); }\n if ( this.physics.accelerateDown ) { a.setVector ( a.add ( dDown.scale ( ACCELERATION ) ) ); }\n if ( this.physics.accelerateRight ) { a.setVector ( a.add ( dRight.scale ( ACCELERATION ) ) ); }\n if ( this.physics.accelerateLeft ) { a.setVector ( a.add ( dLeft.scale ( ACCELERATION ) ) ); } \n } \n else\n { \n if ( this.physics.accelerateUp ) { a.setVector ( a.subtract ( dUp.scale ( ACCELERATION ) ) ); }\n if ( this.physics.accelerateDown ) { a.setVector ( a.subtract ( dDown.scale ( ACCELERATION ) ) ); }\n if ( this.physics.accelerateRight ) { a.setVector ( a.subtract ( dRight.scale ( ACCELERATION ) ) ); }\n if ( this.physics.accelerateLeft ) { a.setVector ( a.subtract ( dLeft.scale ( ACCELERATION ) ) ); }\n }\n \n // Calculate displacement. ( Distance to move in this time slice ).\n \n d.setVector ( v.scale ( t ) ); // Velocity: v = d/t ↔ d = v·t (Newtonian velocity).\n \n // Apply friction coefficient.\n \n double a2 = 4.0; // Friction amplifier. Used to speed up lateral deceleration, which improves the sense of control response experienced by the user.\n \n ax = a.getX ();\n ay = a.getY ();\n \n if ( this.physics.accelerateUp || this.physics.accelerateDown )\n {\n // If the user is currently accelerating up or down, then use the friction amplifier to speed up deceleration along the horizontal axis.\n \n if ( ax < 0 ) ax += p*a2;\n if ( ax > 0 ) ax -= p*a2;\n if ( ay < 0 ) ay += p;\n if ( ay > 0 ) ay -= p;\n }\n else if ( this.physics.accelerateLeft || this.physics.accelerateRight )\n {\n // If the user is currently accelerating left or right, then use the friction amplifier to speed up deceleration along the vertical axis.\n \n if ( ax < 0 ) ax += p;\n if ( ax > 0 ) ax -= p;\n if ( ay < 0 ) ay += p*a2;\n if ( ay > 0 ) ay -= p*a2;\n }\n else\n {\n // If the user is not accelerating in any direction, then just apply the normal friction coefficient in all direction.\n \n if ( ax < 0 ) { ax += p; if ( ax > 0.0 ) ax = 0.0; }\n if ( ax > 0 ) { ax -= p; if ( ax < 0.0 ) ax = 0.0; }\n if ( ay < 0 ) { ay += p; if ( ay > 0.0 ) ay = 0.0; }\n if ( ay > 0 ) { ay -= p; if ( ay < 0.0 ) ay = 0.0; }\n }\n \n a.setVector ( ax, ay );\n \n // Update physics.\n \n this.physics.acceleration.setVector ( a );\n this.physics.velocity.setVector ( v );\n \n // Update translation.\n \n this.transform.translation.setVector ( this.transform.translation.add ( d ) );\n }", "@Override\n\tpublic void update()\n\t{\n\t\tsuper.update();\n\n\t\tcalcAcceleration();\n\t\tsetVelocity(Vector2D.add(getVelocity(), getAcceleration()));\n\n\t\tcalcVelocity();\n\t\tsetPosition(Vector2D.add(getPosition(), getVelocity()));\n\n\t\tbm.update(getPosition(), getWidth(), getHeight());\n\t}", "public void setAcceleration(Vector2D acceleration)\n\t{\n\t\tthis.acceleration = acceleration;\n\t}", "public static void setScene() {\n\n Shape ground = new Plane(vec3(0.0, -1.0, 0.0), vec3(0, 1, -0.2), new Diffuse(new Vec3(1,1,1), white));\n \n /* Shape globe1 = new Sphere(vec3(0.0, 2, -6.0), 0.5, new Diffuse(new Vec3(1,1,1), new Vec3(0.5, 0.5, 0.5)));\n Shape globe2 = new Sphere(vec3(2, 0, -6.0), 0.5, new Diffuse(new Vec3(1,1,1), new Vec3(0.5, 0.5, 0.5)));\n Shape globe3 = new Sphere(vec3(-2, 0, -6.0), 0.5, new Diffuse(new Vec3(1,1,1), new Vec3(0.5, 0.5, 0.5)));\n*/\n Shape globe1T = new Sphere(vec3(0.0, 2, -2.0), 0.3, new Diffuse(new Vec3(1,1,1), white));\n // Shape globe2T = new Sphere(vec3(-0.5, -2, -3.0), 0.5, new Diffuse(new Vec3(1,1,1),yellow));\n // Shape globe3T = new Sphere(vec3(0.5, -2, -3.0), 0.5, new Diffuse(new Vec3(1,1,1), yellow));\n\n \n \n Shape globe4 = new Sphere(vec3(0.0, 2, -4.0), 0.5, new Diffuse(new Vec3(1,1,1), new Vec3(0.3, 0.3, 0.3)));\n Shape globe5 = new Sphere(vec3(2, 0, -4.0), 0.5, new Diffuse(new Vec3(1,1,1), new Vec3(0.3, 0.3, 0.3)));\n Shape globe6 = new Sphere(vec3(-2, 0, -4.0), 0.5, new Diffuse(new Vec3(1,1,1), new Vec3(0.3, 0.3, 0.3)));\n \n Shape globe7 = new Sphere(vec3(0.0, 2, -8.0), 0.5, new Diffuse(new Vec3(1,1,1), new Vec3(0.7, 0.7, 0.7)));\n Shape globe8 = new Sphere(vec3(2, 0, -8.0), 0.5, new Diffuse(new Vec3(1,1,1), new Vec3(0.7, 0.7, 0.7)));\n Shape globe9 = new Sphere(vec3(-2, 0, -8.0), 0.5, new Diffuse(new Vec3(1,1,1), new Vec3(0.7, 0.7, 0.7)));\n Shape globe7D = new Sphere(vec3(0.0, -2, -8.0), 0.5, new Diffuse(new Vec3(1,1,1), new Vec3(0.7, 0.7, 0.7)));\n\n Shape globeC = new Sphere(vec3(0.0, 0.0, -6.0), 1.0, new Diffuse(new Vec3(1,1,1), red));\n \n ArrayList<Shape> shapes = new ArrayList<>();\n shapes.add(bg);\n shapes.add(ground);\n shapes.add(globe1T);\n // shapes.add(globe2T);\n // shapes.add(globe3T);\n //shapes.add(globe4);\n //shapes.add(globe5);\n shapes.add(globe7);\n shapes.add(globe8);\n shapes.add(globe9);\n shapes.add(globe7D);\n shapes.add(globeC);\n gr = new Group(shapes);\n /////////////////////////////--------------------------------------\n \n \n }", "public Vector3D() {\n zero();\n }", "public Ocean()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 400, 1); \n BF bf = new BF();\n addObject(bf,500,300);\n SF sf = new SF();\n addObject(sf,100,300);\n }", "public void update() { \n rS = globeR;\n // *Generate the vector of the obj on the surface\n drawPosS = sphereToCart(lon, lat, rS);\n // *Generate the vector of the obj inside the globe\n drawPosD = sphereToCart(lon, lat, rD);\n }", "public Vector3D() {\r\n\t\tthis(0.0);\r\n\t}", "@Override\n \t\t\t\tpublic void doCreateQuadWater() {\n \n \t\t\t\t}", "public FuldaGasStation() {\n\t\tgasPumpsList = new ArrayList<GasPump>(GAS_PUMPS_NUMBER);\n\t\tgasPricesList = new Hashtable<GasType, Double>(GAS_PUMPS_NUMBER);\n\t}", "Geq createGeq();", "public Vector3 addAndCreate(Vector3 addition) {\n\t\treturn new Vector3(addition.x + this.x, addition.y + this.y, addition.z + this.z);\n\t}", "@DISPID(1611005952) //= 0x60060000. The runtime will prefer the VTID if present\n @VTID(28)\n void newWithAxisSystem(\n boolean oAxisSystemCreated);", "void updatePositionAndAcceleration(double massObject, double gravConstant, double x_coord, double y_coord){\n\t\tthis.x = (this.x - this.x_velocity);\n\t\tthis.y = (this.y - this.y_velocity);\n\t\t\n\t\t//find distance between subject and object\n\t\tdouble distance = Point2D.distance(this.getX(), this.getY(), x_coord, y_coord);\n\t\t//calculates the acceleration upon the orbiting Point (metres per second per second if seconds = 1)\n\t\tdouble acceleration = (gravConstant * massObject) / (distance * distance);\n\t\t//finds direction of acceleration, as a modifier for X and modifier for Y.\n\t\tdouble xDiff = x_coord - this.getX(); //if point is to the right of centerMass, xDiff is positive\n\t\tdouble yDiff = y_coord - this.getY(); //if point is below center, yDiff is positive\n\t\t//find angle from orbiting point to center\n\t\tdouble oppOverAdj = yDiff / xDiff;\n\t\tdouble angleR = Math.atan(oppOverAdj);\n\t\t//share acceleration out between both vectors\n\t\tdouble xChange = Math.cos(angleR) * acceleration;\n\t\tdouble yChange = Math.sin(angleR) * acceleration;\n\t\tif (xDiff < 0) {\n\t\t//change velocity variables.\n\t\t\tthis.x_velocity = this.x_velocity + xChange;\n\t\t\tthis.y_velocity = this.y_velocity + yChange;\n\t\t} else {\n\t\t\tthis.x_velocity = this.x_velocity - xChange;\n\t\t\tthis.y_velocity = this.y_velocity - yChange;\n\t\t}\n\t}", "Gtr createGtr();", "public void getGyAsAcceleration(final Acceleration result) {\n result.setValue(mGy);\n result.setUnit(AccelerationUnit.METERS_PER_SQUARED_SECOND);\n }", "DSpace getSpace();", "public Station(){\n\t\tthis.Name = \"\";\n\t\tthis.x_location = 0;\n\t\tthis.y_location = 0;\n\t\tthis.capacity = 0;\n\t\tthis.ambulances = null;\n\t\tthis.location = (\"(\" + x_location + \", \" + y_location + \")\");\n\n\t}", "public MovingPolygon() {\r\n\t\tsuper();\r\n\t}", "Coordinate createCoordinate();", "public void onAccelerationChanged(float x, float y, float z) {\n\n }", "public Spatial(Location tr)\r\n {\r\n this(new Location.Location2D(0, 0), tr);\r\n }", "public void setAccelerationFlat(float acceleration)\n\t{\n\t\tthis.acceleration = acceleration;\n\t}", "public void updateTrifecta() {\n\n\t\taccelX = (xl.getX() - 0) * 9.8 * Math.cos(angleToForward * (Math.PI / 180.0)); //convert from g's\n\t\taccelY = (xl.getY() - 0) * 9.8 * Math.sin(angleToForward * (Math.PI / 180.0));\n\t\taccelZ = (xl.getZ() - 0) * 9.8;\n\t\t\n\t\t//velocity updated by acceleration integral\n\t\tvelX += accelX * dT;\n\t\tvelY += accelY * dT;\n\t\tvelZ += accelZ * dT;\n\t\t\n\t\t//position updated by velocity integral and adjusted for robot rotation\n\t\tposX += velX * dT;\n\t\tposY += velY * dT;\n\t\tposZ += velZ * dT;\n\t}", "public void newGameWorld()\r\n {\r\n addObject(new Blackout(\"Fade\"), getWidth() / 2, getHeight() / 2);\r\n removeAllObjects();\r\n\r\n GameWorld gameWorld = new GameWorld();\r\n Greenfoot.setWorld(gameWorld);\r\n }", "public ColladaFloatVector() {\n super();\n }", "public SimulationWorld( SimulationEngine engine )\n {\n this.engine = engine;\n this.gravity = new Vector3f( 0f, -9.81f, 0f );\n }", "public Quadcopter() {\r\n\t\tsuper();\r\n\t\tmaxFlyingSpeed = 0;\r\n\t}", "public Sun getAntihelionLocalPositionsForGEO(double mjd, Geodetic obs){\n Sun sp = new Sun();\n\n Vector sunVector = new Vector(3); //equatorial coordinates of the Sun\n Vector horizontal = new Vector(3); //horizontal coordinates of object\n Vector equatorial = new Vector(3); //equatorial coordinates of object from observer view\n Vector observatory = new Vector(3); //equatorial coordinates of observer\n\n sunVector = sunVector.multiplyVector(new Sun().getSunPosition(mjd),-1);\n sunVector = Vector.multiplyVector(sunVector, (double)1/Vector.getSize(sunVector));\n sunVector = Vector.multiplyVector(sunVector, 42164150.0);\n\n horizontal=(new Transformation()).getHorizontalCoordinates3(sunVector,obs, mjd);\n //horizontal coordinates\n sp.az = horizontal.v[0];\n sp.h = horizontal.v[1];\n\n //equatorial (observer) coordinates\n //observer eq. coordinates\n observatory = (new Transformation()).fromGeodToGeoc(obs.lon, obs.lat,\n obs.altitude, (new Constants()).R_Earth, (new Constants()).f_Earth);\n observatory = (new Transformation()).fromGeocToEquat(observatory,mjd);\n //equatorial coordinates of object\n equatorial = equatorial.subtractVectors(sunVector, observatory);\n equatorial = equatorial.fromCartesianToPolar(equatorial);\n //FILLING contructor\n sp.ra = equatorial.v[0];\n sp.dec = equatorial.v[1];\n\n return sp;\n }", "public CoordinateSystem() {\r\n\t\torigin = new GuiPoint(0, 0);\r\n\t\tzoomFactor = 1f;\r\n\t}", "public BSimVertex(Vector3d newLocation){\r\n\t\tlocation = newLocation;\r\n\t}", "private void initialize() {\n //Asteroid Shape (8 sided)\n polygon = new Vector2f[]{new Vector2f(400, -800), new Vector2f(-400, -800), new Vector2f(-800, -400),\n new Vector2f(-800, 400), new Vector2f(-400, 800), new Vector2f(400, 800), new Vector2f(800, 400), new Vector2f(800, -400)};\n //Translation variables\n this.tx = spawnX;\n this.ty = spawnY; //Start above screen to gain momentum\n this.velocity = new Vector2f();\n\n //World initialize\n this.world = new Matrix3x3f();\n\n }", "public void init(){\n\t\n\t\t//background init\n\t\tthis.background = new Sprite(this.scene, \"space-backdrop.png\", 1280 * 5, 800 * 5);\n\t\tthis.background.setBoundAction(\"background\");\n\t\tthis.background.setSpeedScale(0.2);\n\t\tthis.background.setSpeed(0);\n\t\tthis.sprites.add(this.background);\n\t\t\n\t\t//compass init\n\t\tthis.compass = new Sprite(this.scene, \"compass.png\", 100, 100);\n\t\tthis.compass.setSpeed(0);\n\t\tthis.compass.setPosition(this.compass.getWidth() / 2, this.scene.getHeight() - this.compass.getHeight() / 2);\n\t\t\n\t\t//earth init\n\t\tthis.earth = new Planet(this.scene, \"earth.png\", 4800, 4800);\n\t\tthis.earth.setSpeed(0);\n\t\tthis.earth.setPosition(0, 7000);\n\t\tthis.earth.setBoundAction(\"continue\");\n\t\tthis.sprites.add(this.earth);\n\t\t\n\t\t//ship init\n\t\tthis.mainSprite = new Ship(this.scene, \"cannon.png\", 50, 50, this.k);\n\t\tthis.mainSprite.keyListen = true;\n\t\tthis.mainSprite.setSpeed(0);\n\t\tthis.mainSprite.setPosition(this.scene.getWidth() / 2, this.scene.getHeight() / 2);\n\t\t\n\t\t//asteroids init\n\t\tthis.asteroids.add(new Body(this.scene, \"asteroid.png\", 250, 250, this));\n\t\tthis.asteroids.get(0).setBoundAction(\"continue\");\n\t\tthis.asteroids.get(0).setSpeed(0);\n\t\tthis.asteroids.get(0).setPosition(0, 0);\n\t\tthis.sprites.add(this.asteroids.get(0));\n\t\t\n\t\tfor(int i = 1; i < 200; i++){\n\t\t\t\n\t\t\tint size = (int) Math.round(Math.random() * 400 + 50);\n\t\t\tlong x = Math.round(Math.random() * this.background.getWidth() - (this.background.getWidth() / 2));\n\t\t\tlong y = Math.round(Math.random() * this.background.getHeight() - (this.background.getHeight() / 2));\n\t\t\t\n\t\t\twhile(x > 0 && x < this.scene.getWidth()){\n\t\t\t\tx = Math.round(Math.random() * this.background.getWidth() - (this.background.getWidth() / 2));\n\t\t\t}\n\t\t\t\n\t\t\twhile(y > 0 && y < this.scene.getHeight()){\n\t\t\t\ty = Math.round(Math.random() * this.background.getHeight() - (this.background.getHeight() / 2));\n\t\t\t}\n\t\t\t\n\t\t\tthis.asteroids.add(new Body(this.scene, \"asteroid.png\", size, size, this));\n\t\t\tthis.asteroids.get(i).setBoundAction(\"continue\");\n\t\t\tthis.asteroids.get(i).setSpeed(0);\n\t\t\tthis.asteroids.get(i).setPosition(x, y);\n\t\t\t\n\t\t\tthis.sprites.add(this.asteroids.get(i));\n\t\t}\n\t\t\n\t\t\n\t\t//chest init\n\t\tthis.chests.add(new Chest(this.scene, \"chest.png\", 100, 50));\n\t\tthis.chests.get(0).setBoundAction(\"continue\");\n\t\tthis.chests.get(0).setSpeed(0);\n\t\tthis.chests.get(0).setPosition(500, 500);\n\t\tthis.sprites.add(this.chests.get(0));\n\t\t\n\t\tfor(int i = 1; i < this.numChests; i++){\n\t\t\t\n\t\t\tthis.chests.add(new Chest(this.scene, \"chest.png\", 100, 50));\n\t\t\tthis.chests.get(i).setBoundAction(\"continue\");\n\t\t\tthis.chests.get(i).setSpeed(0);\n\t\t\t\n\t\t\tboolean keepGoing = true;\n\t\t\tdo{\n\t\t\t\t\n\t\t\t\tlong x = Math.round(Math.random() * this.background.getWidth() - (this.background.getWidth() / 2));\n\t\t\t\tlong y = Math.round(Math.random() * this.background.getHeight() - (this.background.getHeight() / 2));\n\t\t\t\t\n\t\t\t\twhile(x > 0 && x < this.scene.getWidth()){\n\t\t\t\t\tx = Math.round(Math.random() * this.background.getWidth() - (this.background.getWidth() / 2));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\twhile(y > 0 && y < this.scene.getHeight()){\n\t\t\t\t\ty = Math.round(Math.random() * this.background.getHeight() - (this.background.getHeight() / 2));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tthis.chests.get(i).setPosition(x, y);\n\t\t\t\t\n\t\t\t\t//check for collisions with asteroids\n\t\t\t\tboolean colliding = false;\n\t\t\t\tfor(int j = 0; j < this.asteroids.size() && colliding == false; j++){\n\t\t\t\t\tif(this.asteroids.get(j).collidesWith(this.chests.get(i))){\n\t\t\t\t\t\tcolliding = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tkeepGoing = colliding;\n\t\t\t\t\n\t\t\t}while(keepGoing);\n\t\t\t\n\t\t\tthis.sprites.add(this.chests.get(i));\n\t\t\t\n\t\t}//end for\n\t\n\t\tthis.scene.start();\n\t\t\n\t\tSystem.out.println(\"==== Welcome to Space Smuggler! ====\");\n\t\tSystem.out.println(\"(WASD to move)\");\n\t\tSystem.out.println(\"Follow your compass in the bottom left corner to find treasure.\");\n\t\tSystem.out.println(\"Collect all of the treasure, then follow your compass to Earth!\");\n\t\tSystem.out.println(\"Watch out for the asteroids though, their gravitational pull is strong!\");\n\t\tSystem.out.println(\"Crashing into one will certainly kill you! D:\");\n\t\tSystem.out.println(\"Good Luck!\");\n\t\t\n\t}", "public AccelerationDomain(AccelerationDomain source) {\n if (source.OriginDetail != null) {\n this.OriginDetail = new OriginDetail(source.OriginDetail);\n }\n if (source.CreatedOn != null) {\n this.CreatedOn = new String(source.CreatedOn);\n }\n if (source.DomainName != null) {\n this.DomainName = new String(source.DomainName);\n }\n if (source.ModifiedOn != null) {\n this.ModifiedOn = new String(source.ModifiedOn);\n }\n if (source.ZoneId != null) {\n this.ZoneId = new String(source.ZoneId);\n }\n if (source.DomainStatus != null) {\n this.DomainStatus = new String(source.DomainStatus);\n }\n if (source.Cname != null) {\n this.Cname = new String(source.Cname);\n }\n if (source.IdentificationStatus != null) {\n this.IdentificationStatus = new String(source.IdentificationStatus);\n }\n }", "public Vector3 getGravity() {\n if (!isSupported())\n throw new UnsupportedOperationException(\"Gravity sensor not supported\");\n if (!isAvailable())\n throw new IllegalStateException(\"Gravity reading not available\");\n return gravity;\n }", "public void calcAcceleration() {\n double firstSpeed = get(0).distanceTo(get(1)) / ((get(1).getTime() - get(0).getTime()) * INTER_FRAME_TIME);\n double lastSpeed = get(length() - 2).distanceTo(get(length() - 1))\n / ((get(length() - 1).getTime() - get(length() - 2).getTime()) * INTER_FRAME_TIME);\n avgAcceleration = (firstSpeed + lastSpeed) / ((get(length() - 1).getTime() - get(0).getTime()) * INTER_FRAME_TIME);\n }", "public World() {\n\t\tblockIDArray = new byte[WORLD_SIZE][WORLD_HEIGHT][WORLD_SIZE];\n\t\tentities\t = new ArrayList<Entity>();\n\t\trand\t\t = new Random();\n\t\t\n new GravityThread(this);\n\t\t\t\t\n\t\tgenerateWorld();\n\t}", "public LSystemBuilderImpl() {\n\t\tthis.commands = new Dictionary();\n\t\tthis.productions = new Dictionary();\n\t\tunitLength = 0.1;\n\t\tunitLengthDegreeScaler = 1;\n\t\torigin = new Vector2D(0, 0);\n\t\tangle = 0;\n\t\taxiom = \"\";\n\t}", "public final GeoFunction getGeoFunction(){\r\n\t\tGeoFunction geof=new GeoFunction(kernel.getConstruction(),\"ny\",newf);\r\n\t\treturn geof;\r\n\t}", "public Asteroid() {\n\t\t// create, seed random number\n\t\trandomNumber = new Random();\n\n\t\t// random location\n\t\tlocation = new Tuple(\n\t\t\t\t(randomNumber.nextDouble() - 0.5) * FIELD_SIZE, \n\t\t\t\t(randomNumber.nextDouble() - 0.5) * FIELD_SIZE, \n\t\t\t\t(randomNumber.nextDouble() - 0.5) * FIELD_SIZE);\n\n\t\t// random movement vector\n\t\tmovement = new Tuple(\n\t\t\t\t(randomNumber.nextDouble() - 0.5) * MAX_SPEED,\n\t\t\t\t(randomNumber.nextDouble() - 0.5) * MAX_SPEED, \n\t\t\t\t(randomNumber.nextDouble() - 0.5) * MAX_SPEED);\n\t\t\n\t\t// random radius\n\t\tsize = randomNumber.nextInt() % 20 + 1;\n\t\t\n\t\t// create Sphere\n\t\tsphere = new Sphere(size, location);\n\n\t}", "public Space() \n {\n super(600, 500, 1);\n\n createBackground();\n \n /**\n * TODO (10): Make a method call to the paint stars method.\n * Play around with the parameter value until you are \n * happy with the look of your scenario\n */\n paintStars(1000);\n \n prepareGame();\n }", "public gameWorld()\n { \n // Create a new world with 600x600 cells with a cell size of 1x1 pixels.\n super(600, 600, 1); \n \n addObject(new winSign(), 310, 300);\n addObject(new obscureDecorative(), 300, 400);\n addObject(new obscureDecorative(), 300, 240);\n \n for(int i = 1; i < 5; i++) {\n addObject(new catchArrow(i * 90), 125 * i, 100);\n }\n for (int i = 0; i < 12; i++) {\n addObject(new damageArrowCatch(), 50 * i + 25, 50); \n }\n \n \n //Spawning Interval\n\n if(timerInterval >= 10) {\n arrowNumber = Greenfoot.getRandomNumber(3);\n }\n if(arrowNumber == 0) {\n addObject(new upArrow(directionOfArrow[0], imageOfArrow[0]), 125, 590);\n arrowNumber = 5;\n }\n if(arrowNumber == 1) {\n addObject(new upArrow(directionOfArrow[1], imageOfArrow[1]), 125 * 2, 590);\n arrowNumber = 5;\n }\n if(arrowNumber == 2) {\n addObject(new upArrow(directionOfArrow[2], imageOfArrow[2]), 125 * 3, 590);\n arrowNumber = 5;\n }\n if( arrowNumber == 3) {\n addObject(new upArrow(directionOfArrow[3], imageOfArrow[3]), 125 * 4, 590);\n arrowNumber = 5;\n }\n \n \n\n \n }", "public Vector3d getAcceleration() {\n return getMotion().getAcceleration();\n }", "public void CalculateForces(){\n\n Vec3f gravon= mult(this.gravity,this.mass);\n this.force.add(gravon);\n// Totalforce.add(force);\n }", "@Override\n\tpublic void create() {\n\t\tthis.mesh = new Mesh(VertexDataType.VertexArray, false, 4, 6, \n\t\t\t\tnew VertexAttribute(VertexAttributes.Usage.Position, 3, \"attr_position\"));\n\n\t\tmesh.setVertices(new float[] {\n\t\t\t\t-8192f, -512f, 0,\n\t\t\t\t8192f, -512f, 0,\n\t\t\t\t8192f, 512f, 0,\n\t\t\t\t-8192f, 512f, 0\n\t\t});\n\t\tmesh.setIndices(new short[] {0, 1, 2, 2, 3, 0});\n\n\t\t// creates the camera\n\t\tcamera = new OrthographicCamera(CoordinateConverter.getCameraWidth(), CoordinateConverter.getCameraHeight());\n\n\t\t// Sets the positions of the camera\n\t\tcamera.position.set(CoordinateConverter.getCameraWidth()/2, CoordinateConverter.getCameraHeight()/2, 0);\n\t\tcamera.update();\n\n\t\t// Sets how much of the map that is shown on the screen\n\t\tglViewport = new Rectangle(0, 0, CoordinateConverter.getCameraWidth(), CoordinateConverter.getCameraHeight());\n\t\t\n\t}", "public static SqlOperatorTable spatialInstance() {\n return SPATIAL.get();\n }", "public VectorGraphics2D createGraphics() {\n\t\treturn new VectorGraphics2D(new Graphics2DContext(), operations);\n\t}", "public Agent(int sx, int sy, int gx, int gy) {\n mStart = new Point(sx, sy);\n mGoal = new Point(gx, gy);\n }", "public ModelWithTwoGalaxies(int width, int height,double G,double theta,double dt){\n super(width,height,G,theta,dt);\n\n\n\n Galaxy galaxy1 = new Galaxy(new Vector(width/4,height/3),new Vector(-100,0),height/4,5000,1000, Color.CYAN,-1);\n Galaxy galaxy2 = new Galaxy(new Vector(3*width/4,2*height/3),new Vector(100,0),height/4,5000,1000, Color.ORANGE,1);\n this.particles.addAll(galaxy1.getParticles());\n this.particles.addAll(galaxy2.getParticles());\n\n System.out.println(galaxy1.toString());\n System.out.println(galaxy2.toString());\n\n }", "public WorldGenGrassUnderbean()\n {\n }" ]
[ "0.6270572", "0.5642183", "0.54736465", "0.53934693", "0.52745545", "0.52307063", "0.51443696", "0.514175", "0.5113155", "0.50724053", "0.506152", "0.5026274", "0.5006674", "0.49811426", "0.49472487", "0.4939046", "0.49366102", "0.49126068", "0.4902154", "0.48989767", "0.48923314", "0.4866469", "0.48069322", "0.47970998", "0.4791262", "0.47831005", "0.4755833", "0.4755022", "0.47218674", "0.46578515", "0.4638539", "0.46265876", "0.4626498", "0.46253958", "0.46216652", "0.46189246", "0.46116486", "0.4604193", "0.46031356", "0.46022508", "0.45978191", "0.4588331", "0.45816016", "0.45730272", "0.45528924", "0.45509017", "0.45471257", "0.45469248", "0.4536358", "0.45346954", "0.4533699", "0.45235154", "0.45072392", "0.45041537", "0.4500566", "0.44950452", "0.4492667", "0.4489618", "0.448899", "0.44881418", "0.4487163", "0.4487108", "0.44816843", "0.44783336", "0.44756982", "0.44648844", "0.44587687", "0.44556496", "0.44555628", "0.44526884", "0.4443084", "0.4440247", "0.44348", "0.44303536", "0.4429048", "0.4426988", "0.4426538", "0.44262403", "0.4425179", "0.44206032", "0.44164202", "0.44122487", "0.44069862", "0.44053012", "0.44007587", "0.43863055", "0.43841675", "0.4380385", "0.4377768", "0.43732086", "0.43731362", "0.43705902", "0.4368796", "0.43598992", "0.43453747", "0.43435973", "0.43405923", "0.4340496", "0.4339385", "0.4335864" ]
0.6286991
0
/ Create the frame.
public VerOffersGUI(RuralHouse casa , String noches) { setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); setBounds(100, 100, 566, 576); contentPane = new JPanel(); contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); setContentPane(contentPane); contentPane.setLayout(null); JLabel lblbltitulo = new JLabel("Estos son las offertas de la casa seleccionada:"); lblbltitulo.setFont(new Font("Tahoma", Font.BOLD, 14)); lblbltitulo.setBounds(31, 13, 312, 16); contentPane.add(lblbltitulo); JButton btnVolver = new JButton("Volver"); btnVolver.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { setVisible(false); } }); btnVolver.setBounds(238, 491, 97, 25); contentPane.add(btnVolver); Vector<Offer> vectoroffertas = facade.getOffersbyHouse(casa) ; JList list = new JList(vectoroffertas); list.setBounds(31, 71, 485, 357); ScrollPane scrollPane = new ScrollPane(); scrollPane.setBounds(31, 71, 485, 357); scrollPane.add(list); contentPane.add(scrollPane); Label label = new Label(""); label.setBounds(348, 10, 70, 24); contentPane.add(label); label.setText(casa.getCity()); JButton btnReservar = new JButton("Reservar"); btnReservar.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { Offer of= (Offer) list.getSelectedValue(); JFrame reserva = new ReservarCasaGUI(of,noches,casa); reserva.setVisible(true); dispose(); } }); btnReservar.setBounds(238, 444, 97, 25); contentPane.add(btnReservar); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Frame createFrame();", "private void createFrame() {\n System.out.println(\"Assembling \" + name + \" frame\");\n }", "private void createFrame(){\n System.out.println(\"Assembling \" + name + \" frame.\");\n }", "FRAME createFRAME();", "public void buildFrame();", "private Frame buildFrame() {\n return new Frame(command, headers, body);\n }", "public void createFrame() {\r\n System.out.println(\"Framing: Adding the log walls.\");\r\n }", "@Override\n\tpublic void create() {\n\t\twithdrawFrame = new JFrame();\n\t\tthis.constructContent();\n\t\twithdrawFrame.setSize(800,500);\n\t\twithdrawFrame.show();\n\t\twithdrawFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t}", "private void makeFrame(){\n frame = new JFrame(\"Rebellion\");\n\n frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n frame.setSize(800,800);\n\n makeContent(frame);\n\n frame.setBackground(Color.getHSBColor(10,99,35));\n frame.pack();\n frame.setVisible(true);\n }", "protected void createFrames() {\n createStandingRight();\n createStandingLeft();\n createWalkingRight();\n createWalkingLeft();\n createJumpingRight();\n createJumpingLeft();\n createDying();\n }", "public void CreateTheFrame()\n {\n setSize(250, 300);\n setMaximumSize( new Dimension(250, 300) );\n setMinimumSize(new Dimension(250, 300));\n setResizable(false);\n\n pane = getContentPane();\n insets = pane.getInsets();\n\n // Apply the null layout\n pane.setLayout(null);\n }", "private void createAndInitPictureFrame() {\r\n frame = new com.FingerVeinScanner.Frame(picture,picture2);\r\n\t\tthis.pictureFrame = frame.getFrame(); // Create the JFrame.\r\n\t\tthis.pictureFrame.setResizable(true); // Allow the user to resize it.\r\n\t\tthis.pictureFrame.getContentPane().\r\n\t\tsetLayout(new BorderLayout()); // Use border layout.\r\n\t\tthis.pictureFrame.setDefaultCloseOperation\r\n\t\t(JFrame.DISPOSE_ON_CLOSE); // When closed, stop.\r\n\t\tthis.pictureFrame.setTitle(picture.getTitle());\r\n\t\t//PictureExplorerFocusTraversalPolicy newPolicy =\r\n\t\t//\tnew PictureExplorerFocusTraversalPolicy();\r\n\t\t//this.pictureFrame.setFocusTraversalPolicy(newPolicy);\r\n\t}", "private void buildAndDisplayFrame() {\n\n\t\tframe.add(panelForIncomingCall, BorderLayout.NORTH);\n\t\tpanelForIncomingCall.add(welcomeThenDisplayCallInfo);\n\n\t\tframe.add(backgroundPanel, BorderLayout.CENTER);\n\t\tbackgroundPanel.add(userInstructions);\n\t\tbackgroundPanel.add(startButton);\n\t\tbackgroundPanel.add(declineDisplay);\n\n\t\tframe.add(acceptDeclineBlockBottomPanel, BorderLayout.SOUTH);\n\t\tacceptDeclineBlockBottomPanel.add(acceptButton);\n\t\tacceptDeclineBlockBottomPanel.add(declineButton);\n\t\tacceptDeclineBlockBottomPanel.add(blockButton);\n\n\t\tframe.setSize(650, 700); // sizes frame to whatever we want\n\t\tframe.setLocationRelativeTo(null); // puts at center of screen\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.setVisible(true);\n\t}", "public JexlEngine.Frame createFrame(Object... values) {\r\n return scope != null? scope.createFrame(values) : null;\r\n }", "public static void buildFrame() {\r\n\t\t// Make sure we have nice window decorations\r\n\t\tJFrame.setDefaultLookAndFeelDecorated(true);\r\n\t\t\r\n\t\t// Create and set up the window.\r\n\t\t//ParentFrame frame = new ParentFrame();\r\n\t\tMediator frame = new Mediator();\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\t\r\n\t\t// Display the window\r\n\t\tframe.setVisible(true);\r\n\t}", "public frame() {\r\n\t\tadd(createMainPanel());\r\n\t\tsetTitle(\"Lunch Date\");\r\n\t\tsetSize(FRAME_WIDTH, FRAME_HEIGHT);\r\n\r\n\t}", "protected void createInternalFrame() {\n\t\tJInternalFrame frame = new JInternalFrame();\n\t\tframe.setVisible(true);\n\t\tframe.setClosable(true);\n\t\tframe.setResizable(true);\n\t\tframe.setFocusable(true);\n\t\tframe.setSize(new Dimension(300, 200));\n\t\tframe.setLocation(100, 100);\n\t\tdesktop.add(frame);\n\t\ttry {\n\t\t\tframe.setSelected(true);\n\t\t} catch (java.beans.PropertyVetoException e) {\n\t\t}\n\t}", "public BreukFrame() {\n super();\n initialize();\n }", "public interface FrameBuilder {\r\n\r\n /**\r\n * Creates graphic frames.\r\n * @param num The frame index for which the graphic is to be \r\n * produced for.\r\n * @return The graphic for the respective frame index.\r\n */\r\n Graphic create(int num);\r\n }", "private static void createAndShowGUI() {\r\n\t\t// Create and set up the window.\r\n\t\tframe = new JFrame(\"Captura 977R\");\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\r\n\t\t// Set up the content pane.\r\n\t\taddComponentsToPane(frame.getContentPane());\r\n\r\n\t\t// Display the window.\r\n\t\tframe.pack();\r\n\t\tDimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\r\n\t\tDimension windowSize = frame.getSize();\r\n\r\n\t\tint windowX = Math.max(0, (screenSize.width - windowSize.width) / 2);\r\n\t\tint windowY = Math.max(0, (screenSize.height - windowSize.height) / 2);\r\n\r\n\t\tframe.setLocation(windowX, windowY); // Don't use \"f.\" inside\r\n\t\t// constructor.\r\n\t\tframe.setVisible(true);\r\n\t}", "FRAMESET createFRAMESET();", "public MassMsgFrame() {\n\t}", "public static void createMainframe()\n\t{\n\t\t//Creates the frame\n\t\tJFrame foodFrame = new JFrame(\"USDA Food Database\");\n\t\t//Sets up the frame\n\t\tfoodFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tfoodFrame.setSize(1000,750);\n\t\tfoodFrame.setResizable(false);\n\t\tfoodFrame.setIconImage(icon.getImage());\n\t\t\n\t\tGui gui = new Gui();\n\t\t\n\t\tgui.setOpaque(true);\n\t\tfoodFrame.setContentPane(gui);\n\t\t\n\t\tfoodFrame.setVisible(true);\n\t}", "private void buildFrame(){\n this.setVisible(true);\n this.getContentPane();\n this.setSize(backgrondP.getIconWidth(),backgrondP.getIconHeight());\n this.setDefaultCloseOperation(EXIT_ON_CLOSE);\t \n\t }", "private void createWindow() {\r\n\t\t// Create the picture frame and initializes it.\r\n\t\tthis.createAndInitPictureFrame();\r\n\r\n\t\t// Set up the menu bar.\r\n\t\tthis.setUpMenuBar();\r\n\r\n\t\t// Create the information panel.\r\n\t\t//this.createInfoPanel();\r\n\r\n\t\t// Create the scrollpane for the picture.\r\n\t\tthis.createAndInitScrollingImage();\r\n\r\n\t\t// Show the picture in the frame at the size it needs to be.\r\n\t\tthis.pictureFrame.pack();\r\n\t\tthis.pictureFrame.setVisible(true);\r\n\t\tpictureFrame.setSize(728,560);\r\n\t}", "private JInternalFrame createInternalFrame() {\n\n initializeChartPanel();\n\n chartPanel.setPreferredSize(new Dimension(200, 100));\n final JInternalFrame frame = new JInternalFrame(\"Frame 1\", true);\n frame.getContentPane().add(chartPanel);\n frame.setClosable(true);\n frame.setIconifiable(true);\n frame.setMaximizable(true);\n frame.setResizable(true);\n return frame;\n\n }", "public SiscobanFrame() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\t}", "private void prepareFrame() {\n logger.debug(\"prepareFrame : enter\");\n\n // initialize the actions :\n registerActions();\n final Container container;\n\n if (Bootstrapper.isHeadless()) {\n container = null;\n } else {\n final JFrame frame = new JFrame(ApplicationDescription.getInstance().getProgramName());\n\n // handle frame icon\n final Image jmmcFavImage = ResourceImage.JMMC_FAVICON.icon().getImage();\n frame.setIconImage(jmmcFavImage);\n\n // get screen size to adjust minimum window size :\n final Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\n logger.info(\"screen size = {} x {}\", screenSize.getWidth(), screenSize.getHeight());\n // hack for screens smaller than 1024x768 screens:\n final int appWidth = 950;\n final int appHeightMin = (screenSize.getHeight() >= 850) ? 800 : 700;\n\n final Dimension dim = new Dimension(appWidth, appHeightMin);\n frame.setMinimumSize(dim);\n frame.addComponentListener(new ComponentResizeAdapter(dim));\n frame.setPreferredSize(INITIAL_DIMENSION);\n\n App.setFrame(frame);\n\n container = frame.getContentPane();\n }\n // init the main panel:\n createContent(container);\n\n StatusBar.show(\"application started.\");\n\n logger.debug(\"prepareFrame : exit\");\n }", "private static void createAndShowGUI()\r\n {\r\n JFrame frame = new JFrame(\"ChangingTitleFrame Application\");\r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n frame.getContentPane().add(new FramePanel(frame).getPanel());\r\n frame.pack();\r\n frame.setLocationRelativeTo(null);\r\n frame.setVisible(true);\r\n }", "private void buildFrame() {\n String title = \"\";\n switch (formType) {\n case \"Add\":\n title = \"Add a new event\";\n break;\n case \"Edit\":\n title = \"Edit an existing event\";\n break;\n default:\n }\n frame.setTitle(title);\n frame.setResizable(false);\n frame.setPreferredSize(new Dimension(300, 350));\n frame.pack();\n frame.setLocationRelativeTo(null);\n frame.setVisible(true);\n\n frame.addWindowListener(new WindowAdapter() {\n @Override\n public void windowClosing(WindowEvent e) {\n // sets the main form to be visible if the event form was exited\n // and not completed.\n mainForm.getFrame().setEnabled(true);\n mainForm.getFrame().setVisible(true);\n }\n });\n }", "private static void createAndShowGUI() {\n JFrame frame = new JFrame(\"Firma digital\");\r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n frame.setLocationRelativeTo(null);\r\n\r\n //Create and set up the content pane.\r\n final FirmaDigital newContentPane = new FirmaDigital(frame);\r\n newContentPane.setOpaque(true); //content panes must be opaque\r\n frame.setContentPane(newContentPane);\r\n\r\n //Make sure the focus goes to the right component\r\n //whenever the frame is initially given the focus.\r\n frame.addWindowListener(new WindowAdapter() {\r\n public void windowActivated(WindowEvent e) {\r\n newContentPane.resetFocus();\r\n }\r\n });\r\n\r\n //Display the window.\r\n frame.pack();\r\n frame.setVisible(true);\r\n }", "public FirstNewFrame() {\n\t\tjbInit();\n\t}", "public void createButtonFrame()\n {\n JFrame createFrame = new JFrame();\n createFrame.setSize(560,200);\n Container pane2;\n pane2 = createFrame.getContentPane();\n JPanel createPanel = new JPanel(null);\n createEvent = new JTextArea(\"MM/DD/YYYY\");\n timeField1 = new JTextArea(\"00:00\");\n timeField2 = new JTextArea(\"00:00\");\n EventNameField = new JTextArea(\"UNTILED NAME\");\n JLabel EnterEventLabel = new JLabel(\"Enter Event Name:\");\n JLabel EnterDateLabel = new JLabel(\"Date:\");\n JLabel EnterStartLabel = new JLabel(\"Start:\");\n JLabel EnterEndLabel = new JLabel(\"End:\");\n JLabel toLabel = new JLabel(\"to\");\n pane2.add(createPanel);\n createPanel.add(createEvent);\n createPanel.add(timeField1);\n createPanel.add(EventNameField);\n createPanel.add(timeField2);\n createPanel.add(create);\n createPanel.add(EnterEventLabel);\n createPanel.add(EnterDateLabel);\n createPanel.add(EnterStartLabel);\n createPanel.add(EnterEndLabel);\n createPanel.add(toLabel);\n\n createPanel.setBounds(0, 0, 400, 200); //panel\n createEvent.setBounds(20, 90, 100, 25); //Date field\n timeField1.setBounds(150, 90, 80, 25); //Time field\n timeField2.setBounds(280, 90, 80, 25); //Time field 2\n create.setBounds(380, 100, 150, 50); //Create Button\n\n EnterStartLabel.setBounds(150, 65, 80, 25);\n EnterEndLabel.setBounds(280, 65, 80, 25);\n toLabel.setBounds(250, 90, 80, 25);\n EnterDateLabel.setBounds(20, 65, 80, 25);\n EventNameField.setBounds(20, 30, 300, 25); //Event Name Field\n EnterEventLabel.setBounds(20, 5, 150, 25);\n\n\n\n\n createFrame.setVisible(true);\n createFrame.setResizable(false);\n }", "public void createAndShowGUI() {\n JFrame.setDefaultLookAndFeelDecorated(true);\n\n //Create and set up the window.\n\tif(open==0)\n\t\tframe = new JFrame(\"Open a file\");\n\telse if(open ==1)\n\t\tframe = new JFrame(\"Save file as\");\n //frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n //Create and set up the content pane.\n JComponent newContentPane =this ;\n newContentPane.setOpaque(true); //content panes must be opaque\n frame.setContentPane(newContentPane);\n\n //Display the window.\n frame.pack();\n frame.setVisible(true);\n // frame.setSize(500,500);\n//\tvalidate();\n }", "public NewFrame() {\n initComponents();\n }", "public void createAndShowGUI() {\n JFrame frame = new JFrame();\n frame.setSize(500, 500);\n frame.setTitle(\"Face Viewer\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); \n FaceComponent component = new FaceComponent();\n frame.add(component);\n frame.setVisible(true);\n }", "NOFRAME createNOFRAME();", "private static void createAndShowGUI() {\n\n frame = new JFrame(messages.getString(\"towers.of.hanoi\"));\n frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n addComponentsToPane(frame.getContentPane());\n frame.pack();\n frame.setSize(800, 600);\n frame.setVisible(true);\n }", "public static MainFrame createNewFrame(Display display, Document doc)\n {\n Shell shell = new Shell(display);\n\n MainFrame frame = new MainFrame(shell, doc);\n frame.initComponents(null);\n\n shell.open();\n\n return frame;\n }", "public JInternalFrame createAndShow() {\r\n /** Create and set up the window. */\r\n JInternalFrame frame = new JInternalFrame(\"About\");\r\n frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\r\n \r\n frame.putClientProperty(\"JInternalFrame.isPallete\", Boolean.TRUE);\r\n\r\n /** Add content to the window. */\r\n frame.add(new About());\r\n \r\n frame.setClosable(true);\r\n\r\n /** Display the window. */\r\n frame.pack();\r\n frame.setVisible(true);\r\n \r\n return frame;\r\n }", "public void create() {\n\t\t\n\t}", "public JFrame getFrame(GLCapabilities caps) {\n\t\tcanvas = new GLCanvas(caps);\n\n\t\tframe = new JFrame(headerstring);\n\t\tframe.setSize(WINDOW_WIDTH, WINDOW_HEIGHT);\n\t\tframe.setJMenuBar(createbar());\n\t\tframe.add(canvas);\n\t\tframe.setVisible(true);\n\n\t\t// by default, an AWT Frame doesn't do anything when you click\n\t\t// the close button; this bit of code will terminate the program when\n\t\t// the window is asked to close\n\t\tframe.addWindowListener(new WindowAdapter() {\n\t\t\tpublic void windowClosing(WindowEvent e) {\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t});\n\n\t\tanimator = new FPSAnimator(canvas, REFRESH_RATE);\n\n\t\treturn frame;\t\n\t}", "private static void createAndShowGUI() {\n //Create and set up the window.\n JFrame frame = new JFrame(\"WAR OF MINE\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n //Create and set up the content pane.\n JComponent newContentPane = new Gameframe();\n newContentPane.setOpaque(true); //content panes must be opaque\n frame.setContentPane(newContentPane);\n\n //Display the window.\n frame.setSize(800,1000);\n frame.setVisible(true);\n }", "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}", "private void create() {\n\t\tGridLayout grid = new GridLayout(3,2);\n\t\tthis.setLayout(grid);\n\t\tthis.setBackground(Color.WHITE);\n\t\t\n\t\tadd(new JLabel(\"Username/Library Card #:\", SwingConstants.LEFT), grid);\n\t\tusername.setPreferredSize(new Dimension(1, 12));\n\t\tadd(username,grid);\n\t\t\n\t\tadd(new JLabel(\"Password:\", SwingConstants.LEFT), grid);\n\t\tadd(password, grid);\n\t\t\n\t\tLoginAction();\n\t\tadd(submit, grid);\n\t}", "public FrameInsert() {\n initComponents();\n }", "public FrameBodyASPI() {\r\n super();\r\n }", "private void makeFrame() {\n\t\tframe = new JFrame(calc.getTitle());\n\n\t\tJPanel contentPane = (JPanel) frame.getContentPane();\n\t\tcontentPane.setLayout(new BorderLayout(8, 8));\n\t\tcontentPane.setBorder(new EmptyBorder(10, 10, 10, 10));\n\n\t\tdisplay = new JTextField();\n\t\tdisplay.setEditable(false);\n\t\tcontentPane.add(display, BorderLayout.NORTH);\n\n\t\tJPanel buttonPanel = new JPanel(new GridLayout(6, 5));\n\n\t\taddButton(buttonPanel, \"A\");\n\t\taddButton(buttonPanel, \"B\");\n\t\taddButton(buttonPanel, \"C\");\n\t\tbuttonPanel.add(new JLabel(\" \"));\n\t\tJCheckBox check = new JCheckBox(\"HEX\");\n\t\tcheck.addActionListener(this);\n\t\tbuttonPanel.add(check);\n\n\t\taddButton(buttonPanel, \"D\");\n\t\taddButton(buttonPanel, \"E\");\n\t\taddButton(buttonPanel, \"F\");\n\t\taddButton(buttonPanel, \"(\");\n\t\taddButton(buttonPanel, \")\");\n\n\t\taddButton(buttonPanel, \"7\");\n\t\taddButton(buttonPanel, \"8\");\n\t\taddButton(buttonPanel, \"9\");\n\t\taddButton(buttonPanel, \"AC\");\n\t\taddButton(buttonPanel, \"^\");\n\n\t\taddButton(buttonPanel, \"4\");\n\t\taddButton(buttonPanel, \"5\");\n\t\taddButton(buttonPanel, \"6\");\n\t\taddButton(buttonPanel, \"*\");\n\t\taddButton(buttonPanel, \"/\");\n\n\t\taddButton(buttonPanel, \"1\");\n\t\taddButton(buttonPanel, \"2\");\n\t\taddButton(buttonPanel, \"3\");\n\t\taddButton(buttonPanel, \"+\");\n\t\taddButton(buttonPanel, \"-\");\n\n\t\tbuttonPanel.add(new JLabel(\" \"));\n\t\taddButton(buttonPanel, \"0\");\n\t\tbuttonPanel.add(new JLabel(\" \"));\n\t\taddButton(buttonPanel, \"=\");\n\n\t\tcontentPane.add(buttonPanel, BorderLayout.CENTER);\n\n\t\tframe.pack();\n\t\thexToggle();\n\n\t}", "@Override\n public void run() {\n JFrame frame = new JFrame(\"Survey\");\n frame.setPreferredSize(new Dimension(300, 400));\n frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n createComponents(frame.getContentPane());\n frame.pack();\n frame.setVisible(true);\n }", "public static void create() {\r\n render();\r\n }", "public frame() {\r\n\t\tframeOwner = 0;\r\n\t\tassignedProcess = 0;\r\n\t\tpageNumber = 0;\r\n\t}", "private void setupFrame()\n\t\t{\n\t\t\tthis.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\tthis.setResizable(false);\n\t\t\tthis.setSize(800, 600);\n\t\t\tthis.setTitle(\"SEKA Client\");\n\t\t\tthis.setContentPane(panel);\n\t\t\tthis.setVisible(true);\n\t\t}", "private Frame3() {\n\t}", "public FrameJogo() {\n initComponents();\n createBufferStrategy(2);\n Thread t = new Thread(this);\n t.start();\n }", "public void createframe(String cid) {\n\t\tviewframe = new JFrame();\n\t\tviewconsumer(cid);\n\t\tviewframe.setTitle(\"Search result\");\n\t\tviewframe.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n\t\tviewframe.setLayout(new BorderLayout()); \n\t\tviewframe.add(viewpage);\n\t\tviewframe.setVisible(true); \n\t\tviewframe.setSize(500, 400);\n\t\tviewframe.setResizable(true);\n\t}", "@Override\n\tpublic void create() {\n\t\t\n\t}", "private static void createGUI(){\r\n\t\tframe = new JFrame(\"Untitled\");\r\n\r\n\t\tBibtexImport bib = new BibtexImport();\r\n\t\tbib.setOpaque(true);\r\n\r\n\t\tframe.setExtendedState(JFrame.MAXIMIZED_BOTH);\r\n\t\tframe.setContentPane(bib);\r\n\t\tframe.setJMenuBar(bib.menu);\r\n\t\tframe.pack();\r\n\t\tframe.setVisible(true);\r\n\t}", "public EmulatorFrame() {\r\n\t\tsuper(\"Troyboy Chip8 Emulator\");\r\n\t\t\r\n\t\tsetNativeLAndF();\r\n\t\tinitComponents();\r\n\t\tinitMenubar();\r\n\t\tsetupLayout();\r\n\t\tinitFrame();\r\n\t\t//frame is now ready to run a game\r\n\t\t//running of any games must be started by loading a ROM\r\n\t}", "private static void createAndShowGUI() {\n Font f = new Font(\"微软雅黑\", 0, 12);\n String names[] = {\"Label\", \"CheckBox\", \"PopupMenu\", \"MenuItem\", \"CheckBoxMenuItem\",\n \"JRadioButtonMenuItem\", \"ComboBox\", \"Button\", \"Tree\", \"ScrollPane\",\n \"TabbedPane\", \"EditorPane\", \"TitledBorder\", \"Menu\", \"TextArea\",\n \"OptionPane\", \"MenuBar\", \"ToolBar\", \"ToggleButton\", \"ToolTip\",\n \"ProgressBar\", \"TableHeader\", \"Panel\", \"List\", \"ColorChooser\",\n \"PasswordField\", \"TextField\", \"Table\", \"Label\", \"Viewport\",\n \"RadioButtonMenuItem\", \"RadioButton\", \"DesktopPane\", \"InternalFrame\"\n };\n for (String item : names) {\n UIManager.put(item + \".font\", f);\n }\n //Create and set up the window.\n JFrame frame = new JFrame(\"AutoCapturePackagesTool\");\n\n String src = \"/optimizationprogram/GUICode/u5.png\";\n Image image = null;\n try {\n image = ImageIO.read(new CaptureGUI().getClass().getResource(src));\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n frame.setIconImage(image);\n //frame.setIconImage(Toolkit.getDefaultToolkit().getImage(src));\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.setResizable(false);\n frame.setLocation(Toolkit.getDefaultToolkit().getScreenSize().width / 2 - 520 / 2,\n Toolkit.getDefaultToolkit().getScreenSize().height / 2 - 420 / 2);\n frame.getContentPane().add(new CaptureGUI());\n //Display the window.\n frame.pack();\n frame.setVisible(true);\n }", "@Override\n\tpublic void create() {\n\t\t// This should come from the platform\n\t\theight = platform.getScreenDimension().getHeight();\n\t\twidth = platform.getScreenDimension().getWidth();\n\n\t\t// create the drawing boards\n\t\tsb = new SpriteBatch();\n\t\tsr = new ShapeRenderer();\n\n\t\t// Push in first state\n\t\tgsm.push(new CountDownState(gsm));\n//\t\tgsm.push(new PlayState(gsm));\n\t}", "private void makeContent(JFrame frame){\n Container content = frame.getContentPane();\n content.setSize(700,700);\n\n makeButtons();\n makeRooms();\n makeLabels();\n\n content.add(inputPanel,BorderLayout.SOUTH);\n content.add(roomPanel, BorderLayout.CENTER);\n content.add(infoPanel, BorderLayout.EAST);\n\n }", "private void createFrame() {\n\t\tEventQueue.invokeLater(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tfinal JFrame frame = new JFrame(\"Create Event\");\n\t\t\t\tframe.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n\t\t\t\ttry {\n\t\t\t\t\tUIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tfinal JTextArea textArea = new JTextArea(15, 50);\n\t\t\t\ttextArea.setText(\"Untitled Event\");\n\t\t\t\ttextArea.setWrapStyleWord(true);\n\t\t\t\ttextArea.setEditable(true);\n\t\t\t\ttextArea.setFont(Font.getFont(Font.SANS_SERIF));\n\n\t\t\t\tJPanel panel = new JPanel();\n\t\t\t\tpanel.setLayout(new GridLayout(1, 4));\n\t\t\t\tfinal JTextField d = new JTextField(\"\" + year + \"/\" + month + \"/\" + day);\n\t\t\t\tfinal JTextField startTime = new JTextField(\"1:00am\");\n\t\t\t\tJTextField t = new JTextField(\"to\");\n\t\t\t\tt.setEditable(false);\n\t\t\t\tfinal JTextField endTime = new JTextField(\"2:00am\");\n\t\t\t\tJButton save = new JButton(\"Save\");\n\t\t\t\tpanel.add(d);\n\t\t\t\tpanel.add(startTime);\n\t\t\t\tpanel.add(t);\n\t\t\t\tpanel.add(endTime);\n\t\t\t\tpanel.add(save);\n\n\t\t\t\tsave.addActionListener(new ActionListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\teventsData.addEvent(new Event(YYYYMMDD(d.getText().trim()), startTime.getText(),\n\t\t\t\t\t\t\t\t\tendTime.getText(), textArea.getText()));\n\t\t\t\t\t\t\tupdateEventsView(eventsRender);\n\t\t\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\t\t\tif (ex instanceof IllegalArgumentException)\n\t\t\t\t\t\t\t\tpromptMsg(ex.getMessage(), \"Error\");\n\t\t\t\t\t\t\telse promptMsg(ex.getMessage(), \"Error\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tframe.dispatchEvent(new WindowEvent(frame, WindowEvent.WINDOW_CLOSING));\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tframe.setSize(500, 100);\n\t\t\t\tframe.setLayout(new GridLayout(2, 1));\n\t\t\t\tframe.add(textArea);\n\t\t\t\tframe.add(panel);\n\t\t\t\tframe.setLocationByPlatform(true);\n\t\t\t\tframe.setVisible(true);\n\t\t\t}\n\t\t});\n\t}", "public Frame() {\n initComponents();\n }", "public Frame() {\n initComponents();\n }", "private Node createFrameHolder(Data<X,Y> dataItem){\n Node frameHolder = dataItem.getNode();\n if (frameHolder == null){\n frameHolder = new StackPane();\n dataItem.setNode(frameHolder);\n }\n frameHolder.getStyleClass().add(getStyleClass(dataItem.getExtraValue()));\n return frameHolder;\n }", "public MainFrame() {\n\t\tsuper();\n\t\tinitialize();\n\t}", "protected HFrame(){\n\t\tinit();\n\t}", "public Badminton()\n { \n frame.add(new Board()); \n frame.setSize(900, 900);\n frame.setResizable(false);\n frame.setTitle(\"PE Class\");\n //frame.setLocationRelativeTo(null);\n frame.setVisible(true);\n }", "private static void createAndShowGUI() {\r\n\t\tlogger.info(\"Creating and showing the GUI\");\r\n\t\tJFrame frame = new JFrame(\"BowlingSwing\");\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.add(new BowlingSwing());\r\n\t\tframe.pack();\r\n\t\tframe.setVisible(true);\r\n\t}", "public FrameDesign() {\n initComponents();\n }", "public RiswanAgam_HistoryFrame() {\n initComponents();\n Dimension size = Toolkit.getDefaultToolkit().getScreenSize();\n int width = (int)size.getWidth();\n int height = (int)size.getHeight();\n setBounds(width/2-200,height/2-250,670,540);\n database = new RiswanAgam_Database();\n database.connection();\n initTable();\n setResizable(false);\n setTitle(\"History\");\n setDefaultCloseOperation(this.DO_NOTHING_ON_CLOSE);\n }", "private void buildFrame() {\n mainFrame = new JFrame();\n header = new JLabel(\"View Contact Information\");\n header.setHorizontalAlignment(JLabel.CENTER);\n header.setBorder(BorderFactory.createEmptyBorder(5, 0, 0, 0));\n \n infoTable.setFillsViewportHeight(true);\n infoTable.setShowGrid(true);\n infoTable.setVisible(true);\n scrollPane = new JScrollPane(infoTable);\n\n mainFrame.add(header, BorderLayout.NORTH);\n mainFrame.add(scrollPane, BorderLayout.CENTER);\n }", "private static void createAndShowGUI() {\n JFrame frame = new JFrame(\"FEEx v. \"+VERSION);\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n \n //Create and set up the content pane.\n Main p = new Main();\n p.addComponentToPane(frame.getContentPane());\n\n frame.addWindowListener(new java.awt.event.WindowAdapter() {\n @Override\n public void windowClosing(java.awt.event.WindowEvent windowEvent) {\n \tstopPolling();\n \tstopMPP();\n p.port.close();\n Utils.storeSizeAndPosition(frame);\n }\n });\n \n //Display the window.\n frame.pack();\n Utils.restoreSizeAndPosition(frame);\n frame.setVisible(true);\n }", "@Override\n\tpublic void create () {\n\n\t}", "private static void createAndShowGUI() {\n\t\t/*\n //Create and set up the window.\n JFrame frame = new JFrame(\"HelloWorldSwing\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n //Add the ubiquitous \"Hello World\" label.\n JLabel label = new JLabel(\"Hello World\");\n frame.getContentPane().add(label);\n\n //Display the window.\n frame.pack();\n frame.setVisible(true);\n */\n\t\tfinal AC_GUI currentGUI = new AC_GUI();\n\t\t//currentGUI.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tcurrentGUI.setSize(900, 800);\n\t\t// make the frame full screen\n\t\t// currentGUI.setExtendedState(JFrame.MAXIMIZED_BOTH);\n }", "private JFrame makeFrame(String title, int width, int height, int close) {\r\n JFrame frame = new JFrame();\r\n frame.setTitle(title);\r\n frame.setLocation(700, 150);\r\n frame.setMinimumSize(new Dimension(width, height));\r\n frame.setResizable(false);\r\n frame.setDefaultCloseOperation(close);\r\n frame.setLayout(new BorderLayout());\r\n return frame;\r\n }", "@Override\r\n\tpublic void create() {\n\t\t\r\n\t}", "private void setupFrame() {\n this.setTitle(TITRE);\n this.setPreferredSize(new Dimension(TAILLE_FRAME[1], TAILLE_FRAME[0]));\n this.setResizable(false);\n \n this.getContentPane().setBackground(new Color(0,153,0));\n this.getContentPane().setLayout(new GridLayout(3,1)); \n \n this.pack();\n Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();\n this.setLocation(dim.width/2-this.getSize().width/2, dim.height/2-this.getSize().height/2);\n \n this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n this.setVisible(true);\n }", "private void createDisplay()\n {\n // Creates frame based off of the parameters passed in Display constructor\n frame = new JFrame(title); \n frame.setSize(width, height);\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.setResizable(false); \n frame.setLocationRelativeTo(null);\n frame.setVisible(true);\n // Creates the canvas that is drawn on\n canvas = new Canvas();\n canvas.setPreferredSize(new Dimension(width,height));\n canvas.setMaximumSize(new Dimension(width,height));\n canvas.setMinimumSize(new Dimension(width,height));\n canvas.setFocusable(false);\n //add the canvas to the window\n frame.add(canvas);\n //pack the window (kinda like sealing it off)\n frame.pack();\n }", "public void createAndShowGUI() {\n\n setTitle(title);\n // Sets what to do when frame closes\n setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n setIconImage(new ImageIcon(ClassLoader.getSystemResource(ICON_PATH)).getImage());\n\n //shows the frame\n pack();\n setLocationRelativeTo(null); //centers frame\n setVisible(true);\n }", "private void setFrame(Pool p)\n\t{\n\t\tthis.frame = new Frame(p);\n\t}", "public GPFrame(String title) {\r\n super(title); // call the constructor of the super class\r\n }", "private void createCanvasAndFrame(){\n image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);\n canvas = new Canvas();\n Dimension dimension = new Dimension((int)(width*scale), (int)(height*scale));\n canvas.setPreferredSize(dimension);\n canvas.setMaximumSize(dimension);\n canvas.setMinimumSize(dimension);\n\n frame = new JFrame(title);\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.setLayout(new BorderLayout());\n frame.add(canvas, BorderLayout.CENTER);\n frame.pack();\n frame.setLocationRelativeTo(null);\n frame.setResizable(false);\n frame.setVisible(true);\n\n canvas.createBufferStrategy(2);\n bufferStrategy = canvas.getBufferStrategy();\n graphics = bufferStrategy.getDrawGraphics();\n }", "public launchFrame() {\n \n initComponents();\n \n }", "private static void createAndShowGUI() {\n\n //Create and set up the window.\n JFrame frame = new JFrame(\"ButtonDemo\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n //Create and set up the content pane.\n ButtonDemo newContentPane = new ButtonDemo();\n newContentPane.setOpaque(true); //content panes must be opaque\n frame.setContentPane(newContentPane);\n\n //Display the window.\n frame.pack();\n frame.setVisible(true);\n }", "public CreateGUI() throws IOException{\r\n\t\tthis.setFocusable(false);\r\n\t\tthis.setTitle(\"Dance Dance Revolution - 201B Edition\");\r\n\t\tthis.setSize(800, 600);\t\t \t\r\n\t\tthis.setLocation(100, 100); \t\r\n\t\tthis.setVisible(true);\r\n\t\tthis.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tthis.setResizable(false);\r\n\t\tcp = getContentPane();\r\n\t\tcp.setBackground(Color.black);\r\n\t\tarrowlistener = new ArrowListener();\r\n\t\tscore = new Score();\r\n\t\tcombo = new ComboImage();\r\n\t}", "public void create()\n/* 342: */ {\n/* 343:422 */ setupPlainVariables_xjal();\n/* 344: */ \n/* 345:424 */ this.presentation = new ShapeTopLevelPresentationGroup(this, true, 0.0D, 0.0D, 0.0D, 0.0D, new Object[0]);\n/* 346:425 */ this.icon = new ShapeGroup(this, true, 0.0D, 0.0D, 0.0D, new Object[0]);\n/* 347: */ \n/* 348: */ \n/* 349:428 */ assignInitialConditions_xjal();\n/* 350:429 */ onCreate();\n/* 351: */ }", "public void rebuildFrame(){\n \n // Re-initialize frame with default attributes\n controlFrame.dispose();\n controlFrame = buildDefaultFrame(\"CSCI 446 - A.I. - Montana State University\");\n \n // Initialize header with default attributes\n header = buildDefaultHeader();\n \n // Initialize control panel frame with default attributes\n controlPanel = buildDefaultPanel(BoxLayout.Y_AXIS);\n \n // Combine objects\n controlPanel.add(header, BorderLayout.NORTH);\n controlFrame.add(controlPanel);\n \n }", "private void prepare()\n {\n\n MapButton mapButton = new MapButton(which);\n addObject(mapButton,58,57);\n Note note = new Note();\n addObject(note,1200,400);\n\n DropDownSuspects dropDownSuspects = new DropDownSuspects();\n addObject(dropDownSuspects,150,150);\n\n DropDownClues dropDownClues = new DropDownClues();\n addObject(dropDownClues,330,150);\n\n TestimonyFrame testimonyFrame = new TestimonyFrame();\n addObject(testimonyFrame,506,548);\n }", "private void setupFrame()\n\t{\n\t\tthis.setContentPane(botPanel);\n\t\tthis.setSize(800,700);\n\t\tthis.setTitle(\"- Chatbot v.2.1 -\");\n\t\tthis.setResizable(true);\n\t\tthis.setVisible(true);\n\t}", "public void run() {\n\t\t\t\tLayoutFrame frame = new LayoutFrame();\n\t\t\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\t\tframe.setVisible(true);\n\t\t\t}", "@Override\n\tpublic void create() {\n\n\t}", "private static void createAndShowGUI() {\n JFrame frame = new JFrame(\"Gomaku - 5 In A Row\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.setSize(600, 600);\n\n //Add the ubiquitous \"Hello World\" label.\n JPanel board = new JPanel();\n board.setSize(400, 400);\n board.set\n frame.getContentPane().add(board);\n\n //Display the window.\n frame.setVisible(true);\n }", "public addStFrame() {\n initComponents();\n }", "void frameSetUp() {\r\n\t\tJFrame testFrame = new JFrame();\r\n\t\ttestFrame.setSize(700, 400);\r\n\t\ttestFrame.setResizable(false);\r\n\t\ttestFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\ttestFrame.setLayout(new GridLayout(0, 2));\r\n\t\tmainFrame = testFrame;\r\n\t}", "public NewJFrame() {\n Connect();\n initComponents();\n }", "public static JFrame makeFrame (String title)\n {\n\t// make the frame and put a new TextOutputPanel in it\n\tJFrame frame = new JFrame (title);\n\tfinal TextOutputPanel panel = new TextOutputPanel (frame);\n\tframe.setContentPane (panel);\n\tframe.setDefaultCloseOperation (frame.HIDE_ON_CLOSE);\n\n\t// make the menubar for the frame\n\tJMenuBar menuBar = new JMenuBar ();\n\tframe.setJMenuBar (menuBar);\n\n\tJMenu fileMenu = new JMenu (\"File\");\n\tmenuBar.add (fileMenu);\n\tfileMenu.add (new AbstractAction (\"Save As...\")\n\t{\n\t public void actionPerformed (ActionEvent event)\n\t {\n\t\tpanel.saveAs ();\n\t }\n\t});\n\n\tJMenu editMenu = new JMenu (\"Edit\");\n\tmenuBar.add (editMenu);\n\teditMenu.add (new AbstractAction (\"Copy\")\n\t{\n\t public void actionPerformed (ActionEvent event)\n\t {\n\t\tpanel.myDocumentPane.copy ();\n\t }\n\t});\n\teditMenu.add (new AbstractAction (\"Select All\")\n\t{\n\t public void actionPerformed (ActionEvent event)\n\t {\n\t\tpanel.myDocumentPane.selectAll ();\n\t }\n\t});\n\teditMenu.add (new AbstractAction (\"Clear\")\n\t{\n\t public void actionPerformed (ActionEvent event)\n\t {\n\t\tpanel.clear ();\n\t }\n\t});\n\n\tframe.pack ();\n\treturn frame;\n }", "public static void createAndShowGUI() {\n windowContent.add(\"Center\",p1);\n\n //Create the frame and set its content pane\n JFrame frame = new JFrame(\"GridBagLayoutCalculator\");\n frame.setContentPane(windowContent);\n\n // Set the size of the window to be big enough to accommodate all controls\n frame.pack();\n\n // Display the window\n frame.setVisible(true);\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n }", "public ControlFrame addControlFrame(String theName, int theWidth, int theHeight) {\n Frame f = new Frame(theName);\n ControlFrame p = new ControlFrame(this, theWidth, theHeight);\n f.add(p);\n p.init();\n f.setTitle(theName);\n f.setSize(p.w, p.h);\n f.setLocation(50, 250);\n f.setResizable(false);\n f.setVisible(true);\n return p;\n}", "private static void createAndShowGUI() {\n\t\tJFrame window = MainWindow.newInstance();\n\t\t\n //Display the window.\n window.pack();\n window.setVisible(true);\n \n }", "public TestGeneratorGui(boolean create, JFrame frame, JTabbedPane tabbedPane) {\n\t\tthis.create = create;\n\t\ttutorControlFrame = frame;\n\t\ttutorControl = tabbedPane;\n\t}" ]
[ "0.80522114", "0.79215586", "0.78444064", "0.7717215", "0.75586283", "0.7378475", "0.71732086", "0.6884698", "0.68607867", "0.67691016", "0.6755912", "0.6735963", "0.66175365", "0.6455467", "0.6453924", "0.64262384", "0.6356539", "0.6333556", "0.62825817", "0.6279396", "0.625231", "0.6233176", "0.62243056", "0.6216533", "0.6212957", "0.62074095", "0.6177089", "0.6157888", "0.6156002", "0.61493826", "0.61476594", "0.6136018", "0.6076347", "0.6073174", "0.6071662", "0.5999226", "0.5988489", "0.59797555", "0.5975816", "0.59608656", "0.5954073", "0.5952377", "0.5939996", "0.59234464", "0.5917252", "0.5916747", "0.5905673", "0.59029067", "0.5896702", "0.5892736", "0.5886733", "0.58817416", "0.58766896", "0.586986", "0.5865532", "0.5848112", "0.58476704", "0.5845878", "0.5839394", "0.5834178", "0.5832982", "0.58080226", "0.58049387", "0.58049387", "0.5801192", "0.579892", "0.57930106", "0.5781021", "0.5775446", "0.5774369", "0.57741934", "0.57733977", "0.57715577", "0.57711434", "0.5753703", "0.5749609", "0.5748551", "0.5743062", "0.5742745", "0.5733934", "0.5726945", "0.57216054", "0.5713882", "0.57135344", "0.5710586", "0.570493", "0.56970537", "0.56955516", "0.56892073", "0.56735766", "0.567006", "0.56672674", "0.5660907", "0.56538403", "0.56536305", "0.5652005", "0.56519246", "0.5650242", "0.5649597", "0.564941", "0.5647732" ]
0.0
-1
/ renamed from: a
public static final boolean m2896a(float f, float f2, float f3) { return Math.abs(f - f2) < f3; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }", "interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }", "public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}", "public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }", "public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }", "public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}", "public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }", "protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }", "public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }", "public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}", "public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}", "public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }", "public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }", "public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }", "public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }", "public void a() {\n ((a) this.a).a();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}", "public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}", "interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}", "public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }", "@Override\n\tpublic void a() {\n\t\t\n\t}", "public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}", "public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }", "public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}", "public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}", "public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }", "public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}", "public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }", "public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}", "public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}", "public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}", "public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}", "public void acionou(int a){\n\t\t\tb=a;\n\t\t}", "public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}", "public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }", "public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}", "public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }", "public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }", "public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }", "public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }", "public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }", "public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}", "public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}", "public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }", "public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}", "protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }", "public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }", "public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }", "public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }", "public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}", "public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }", "public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }", "interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }", "public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}", "public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }", "private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }", "interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064", "0.5794689", "0.57890314", "0.57838726", "0.5775679", "0.57694733", "0.5769128", "0.57526815", "0.56907034", "0.5677874", "0.5670547", "0.56666386", "0.56592244", "0.5658682", "0.56574154", "0.5654324", "0.5644676", "0.56399715", "0.5638734", "0.5630582", "0.56183887", "0.5615435", "0.56069666", "0.5605207", "0.56005067", "0.559501", "0.55910283", "0.5590222", "0.55736613", "0.5556682", "0.5554544", "0.5550076", "0.55493855", "0.55446684", "0.5538079", "0.5529058", "0.5528109", "0.552641", "0.5525864", "0.552186", "0.5519972", "0.5509587", "0.5507195", "0.54881203", "0.5485328", "0.54826045", "0.5482066", "0.5481586", "0.5479751", "0.54776895", "0.54671466", "0.5463307", "0.54505056", "0.54436916", "0.5440517", "0.5439747", "0.5431944", "0.5422869", "0.54217863", "0.5417556", "0.5403905", "0.5400223", "0.53998446", "0.5394735", "0.5388649", "0.5388258", "0.5374842", "0.5368887", "0.53591394", "0.5357029", "0.5355688", "0.535506", "0.5355034", "0.53494394", "0.5341044", "0.5326166", "0.53236824", "0.53199095", "0.53177035", "0.53112453", "0.5298229" ]
0.0
-1
/ renamed from: a
public static final boolean m2895a(float f, float f2) { return m2896a(f, f2, 0.001f); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }", "interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }", "public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}", "public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }", "public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }", "public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}", "public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }", "protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }", "public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }", "public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}", "public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}", "public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }", "public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }", "public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }", "public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }", "public void a() {\n ((a) this.a).a();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}", "public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}", "interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}", "public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }", "@Override\n\tpublic void a() {\n\t\t\n\t}", "public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}", "public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }", "public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}", "public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}", "public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }", "public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}", "public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }", "public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}", "public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}", "public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}", "public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}", "public void acionou(int a){\n\t\t\tb=a;\n\t\t}", "public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}", "public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }", "public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}", "public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }", "public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }", "public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }", "public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }", "public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }", "public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}", "public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}", "public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }", "public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}", "protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }", "public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }", "public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }", "public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }", "public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}", "public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }", "public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }", "interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }", "public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}", "public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }", "private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }", "interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064", "0.5794689", "0.57890314", "0.57838726", "0.5775679", "0.57694733", "0.5769128", "0.57526815", "0.56907034", "0.5677874", "0.5670547", "0.56666386", "0.56592244", "0.5658682", "0.56574154", "0.5654324", "0.5644676", "0.56399715", "0.5638734", "0.5630582", "0.56183887", "0.5615435", "0.56069666", "0.5605207", "0.56005067", "0.559501", "0.55910283", "0.5590222", "0.55736613", "0.5556682", "0.5554544", "0.5550076", "0.55493855", "0.55446684", "0.5538079", "0.5529058", "0.5528109", "0.552641", "0.5525864", "0.552186", "0.5519972", "0.5509587", "0.5507195", "0.54881203", "0.5485328", "0.54826045", "0.5482066", "0.5481586", "0.5479751", "0.54776895", "0.54671466", "0.5463307", "0.54505056", "0.54436916", "0.5440517", "0.5439747", "0.5431944", "0.5422869", "0.54217863", "0.5417556", "0.5403905", "0.5400223", "0.53998446", "0.5394735", "0.5388649", "0.5388258", "0.5374842", "0.5368887", "0.53591394", "0.5357029", "0.5355688", "0.535506", "0.5355034", "0.53494394", "0.5341044", "0.5326166", "0.53236824", "0.53199095", "0.53177035", "0.53112453", "0.5298229" ]
0.0
-1
/ renamed from: a
public static float m2894a(float f) { float f2 = 1.5707964f * ((float) (f < 0.0f ? -1 : 1)); float f3 = f - (((float) ((int) (f / f2))) * f2); float f4 = 0.0f - f3; float f5 = f2 - f3; return Math.abs(f4) < Math.abs(f5) ? f4 : f5; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }", "interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }", "public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}", "public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }", "public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }", "public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}", "public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }", "protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }", "public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }", "public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}", "public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}", "public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }", "public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }", "public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }", "public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }", "public void a() {\n ((a) this.a).a();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}", "public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}", "interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}", "public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }", "@Override\n\tpublic void a() {\n\t\t\n\t}", "public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}", "public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }", "public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}", "public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}", "public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }", "public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}", "public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }", "public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}", "public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}", "public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}", "public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}", "public void acionou(int a){\n\t\t\tb=a;\n\t\t}", "public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}", "public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }", "public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}", "public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }", "public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }", "public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }", "public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }", "public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }", "public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}", "public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}", "public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }", "public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}", "protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }", "public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }", "public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }", "public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }", "public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}", "public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }", "public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }", "interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }", "public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}", "public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }", "private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }", "interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064", "0.5794689", "0.57890314", "0.57838726", "0.5775679", "0.57694733", "0.5769128", "0.57526815", "0.56907034", "0.5677874", "0.5670547", "0.56666386", "0.56592244", "0.5658682", "0.56574154", "0.5654324", "0.5644676", "0.56399715", "0.5638734", "0.5630582", "0.56183887", "0.5615435", "0.56069666", "0.5605207", "0.56005067", "0.559501", "0.55910283", "0.5590222", "0.55736613", "0.5556682", "0.5554544", "0.5550076", "0.55493855", "0.55446684", "0.5538079", "0.5529058", "0.5528109", "0.552641", "0.5525864", "0.552186", "0.5519972", "0.5509587", "0.5507195", "0.54881203", "0.5485328", "0.54826045", "0.5482066", "0.5481586", "0.5479751", "0.54776895", "0.54671466", "0.5463307", "0.54505056", "0.54436916", "0.5440517", "0.5439747", "0.5431944", "0.5422869", "0.54217863", "0.5417556", "0.5403905", "0.5400223", "0.53998446", "0.5394735", "0.5388649", "0.5388258", "0.5374842", "0.5368887", "0.53591394", "0.5357029", "0.5355688", "0.535506", "0.5355034", "0.53494394", "0.5341044", "0.5326166", "0.53236824", "0.53199095", "0.53177035", "0.53112453", "0.5298229" ]
0.0
-1
Initializes the controller class.
@Override public void initialize(URL url, ResourceBundle rb) { createBookingTimeStart.localTimeProperty().set(LocalTime.of(0,0)); createBookingTimeEnd.localTimeProperty().set(LocalTime.of(0,0)); booking = new Booking(); createBookingType.getItems().addAll(dbH.getBookingTypes(2).toArray(new String[dbH.getBookingTypes(2).size()])); createBookingMechanic.getItems().addAll(getMechanicNames(dbH.getAllMechanics())); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initialize() {\n\t\tcontroller = Controller.getInstance();\n\t}", "public MainController() {\n\t\tcontroller = new Controller(this);\n\t}", "public abstract void initController();", "public Controller() {\n super();\n }", "public Controller() {\n super();\n }", "public Controller()\n\t{\n\n\t}", "private static CompanyController initializeController() {\n\n controller = new CompanyController();\n return controller;\n }", "public MainController() {\n initializeControllers();\n initializeGui();\n runGameLoop();\n }", "public Controller() {\n this.model = new ModelFacade();\n this.view = new ViewFacade();\n }", "public Controller()\r\n\t{\r\n\t\tview = new View();\r\n\t}", "public Controller() {\n\t\tthis(null);\n\t}", "public void init(){\n\t\t//Makes the view\n\t\tsetUpView();\n\n\t\t//Make the controller. Links the action listeners to the view\n\t\tnew Controller(this);\n\t\t\n\t\t//Initilize the array list\n\t\tgameInput = new ArrayList<Integer>();\n\t\tuserInput = new ArrayList<Integer>();\n\t\thighScore = new HighScoreArrayList();\n\t}", "private void initialize() {\n\t\tinitializeModel();\n\t\tinitializeBoundary();\n\t\tinitializeController();\n\t}", "public void init() {\n\t\tkontrolleri1 = new KolikkoController(this);\n\t}", "protected void initialize() {\n super.initialize(); // Enables \"drive straight\" controller\n }", "public Controller() {\n model = new Model();\n comboBox = new ChannelComboBox();\n initView();\n new ChannelWorker().execute();\n timer = new Timer();\n }", "protected CityController() {\r\n\t}", "public void initialize() {\n warpController = new WarpController(this);\n kitController = new KitController(this);\n crafting = new CraftingController(this);\n mobs = new MobController(this);\n items = new ItemController(this);\n enchanting = new EnchantingController(this);\n anvil = new AnvilController(this);\n blockController = new BlockController(this);\n hangingController = new HangingController(this);\n entityController = new EntityController(this);\n playerController = new PlayerController(this);\n inventoryController = new InventoryController(this);\n explosionController = new ExplosionController(this);\n requirementsController = new RequirementsController(this);\n worldController = new WorldController(this);\n arenaController = new ArenaController(this);\n arenaController.start();\n if (CompatibilityLib.hasStatistics() && !CompatibilityLib.hasJumpEvent()) {\n jumpController = new JumpController(this);\n }\n File examplesFolder = new File(getPlugin().getDataFolder(), \"examples\");\n examplesFolder.mkdirs();\n\n File urlMapFile = getDataFile(URL_MAPS_FILE);\n File imageCache = new File(dataFolder, \"imagemapcache\");\n imageCache.mkdirs();\n maps = new MapController(this, urlMapFile, imageCache);\n\n // Initialize EffectLib.\n if (com.elmakers.mine.bukkit.effect.EffectPlayer.initialize(plugin, getLogger())) {\n getLogger().info(\"EffectLib initialized\");\n } else {\n getLogger().warning(\"Failed to initialize EffectLib\");\n }\n\n // Pre-create schematic folder\n File magicSchematicFolder = new File(plugin.getDataFolder(), \"schematics\");\n magicSchematicFolder.mkdirs();\n\n // One-time migration of legacy configurations\n migrateConfig(\"enchanting\", \"paths\");\n migrateConfig(\"automata\", \"blocks\");\n migrateDataFile(\"automata\", \"blocks\");\n\n // Ready to load\n load();\n resourcePacks.startResourcePackChecks();\n }", "public ClientController() {\n }", "public Controller() {\n\t\tthis.nextID = 0;\n\t\tthis.data = new HashMap<Integer, T>();\n\t}", "public ListaSEController() {\n }", "boolean InitController();", "public MenuController() {\r\n\t \r\n\t }", "@Override\n\tprotected void initController() throws Exception {\n\t\tmgr = orderPickListManager;\n\t}", "public CustomerController() {\n\t\tsuper();\n\n\t}", "public End_User_0_Controller() {\r\n\t\t// primaryStage = Users_Page_Controller.primaryStage;\r\n\t\t// this.Storeinfo = primaryStage.getTitle();\r\n\t}", "public Controller(){\r\n\t\tthis.fabricaJogos = new JogoFactory();\r\n\t\tthis.loja = new Loja();\r\n\t\tthis.preco = 0;\r\n\t\tthis.desconto = 0;\r\n\t}", "private Controller() {\n\t\tthis.gui = GUI.getInstance();\n\t\tthis.gui.setController(this);\n\t}", "public GameController() {\r\n\t\tsuper();\r\n\t\tthis.model = Main.getModel();\r\n\t\tthis.player = this.model.getPlayer();\r\n\t\tthis.timeline = this.model.getIndefiniteTimeline();\r\n\t}", "public PlantillaController() {\n }", "public Controller() {\n\t\tplaylist = new ArrayList<>();\n\t\tshowingMore = false;\n\t\tstage = Main.getStage();\n\t}", "public IfController()\n\t{\n\n\t}", "public TournamentController()\n\t{\n\t\tinitMap();\n\t}", "public GeneralListVueController() {\n\n\t}", "private ClientController() {\n }", "public Controller()\n\t{\n\t\ttheParser = new Parser();\n\t\tstarList = theParser.getStars();\n\t\tmessierList = theParser.getMessierObjects();\n\t\tmoon = new Moon(\"moon\");\n\t\tsun = new Sun(\"sun\");\n\t\tconstellationList = theParser.getConstellations();\n\t\tplanetList = new ArrayList<Planet>();\n\t\ttheCalculator = new Calculator();\n\t\tepoch2000JD = 2451545.0;\n\t}", "private void initialiseController() \r\n {\r\n defaultVectors();\r\n if(grantsByPIForm == null) \r\n {\r\n grantsByPIForm = new GrantsByPIForm(); //(Component) parent,modal);\r\n }\r\n grantsByPIForm.descriptionLabel.setText(UnitName);\r\n grantsByPIForm.descriptionLabel.setFont(new Font(\"SansSerif\",Font.BOLD,14));\r\n queryEngine = QueryEngine.getInstance();\r\n coeusMessageResources = CoeusMessageResources.getInstance();\r\n registerComponents();\r\n try {\r\n setFormData(null);\r\n }\r\n catch(Exception e) {\r\n e.printStackTrace(System.out);\r\n }\r\n }", "public LogMessageController() {\n\t}", "public LoginPageController() {\n\t}", "public ControllerEnfermaria() {\n }", "public ProvisioningEngineerController() {\n super();\n }", "private StoreController(){}", "public GenericController() {\n }", "@Override\n\tpublic void initialize() {\n\t\tinitializeModel(getSeed());\n\t\tinitializeView();\n\t\tinitializeControllers();\n\t\t\n\t\tupdateScore(8);\n\t\tupdateNumberCardsLeft(86);\n\n\t}", "public Controller() {\n\t\tenabled = false;\n\t\tloop = new Notifier(new ControllerTask(this));\n\t\tloop.startPeriodic(DEFAULT_PERIOD);\n\t}", "public MapController() {\r\n\t}", "@Override\r\n\tpublic void initControllerBean() throws Exception {\n\t}", "private void setupController() {\n setupWriter();\n Controller controller1 = new Controller(writer);\n controller = controller1;\n }", "public WfController()\n {\n }", "public Controller() {\n\n lastSearches = new SearchHistory();\n\n }", "private ClientController(){\n\n }", "public LoginController() {\r\n }", "public PersonasController() {\r\n }", "private void initBefore() {\n // Crear Modelo\n model = new Model();\n\n // Crear Controlador\n control = new Controller(model, this);\n\n // Cargar Propiedades Vista\n prpView = UtilesApp.cargarPropiedades(FICHERO);\n\n // Restaurar Estado\n control.restaurarEstadoVista(this, prpView);\n\n // Otras inicializaciones\n }", "public StoreController() {\n }", "public ConsoleController() {\n\t\tcommandDispatch = new CommandDispatch();\n\t}", "public LoginController() {\r\n\r\n }", "public final void init(final MainController mainController) {\n this.mainController = mainController;\n }", "public SMPFXController() {\n\n }", "public Controller()\r\n {\r\n fillBombs();\r\n fillBoard();\r\n scoreBoard = new ScoreBoard();\r\n }", "public GUIController() {\n\n }", "public void init(){\n this.controller = new StudentController();\n SetSection.displayLevelList(grade_comp);\n new DesignSection().designForm(this, editStudentMainPanel, \"mini\");\n }", "public void init(final Controller controller){\n Gdx.app.debug(\"View\", \"Initializing\");\n \n this.controller = controller;\n \n //clear old stuff\n cameras.clear();\n \n //set up renderer\n hudCamera = new OrthographicCamera();\n hudCamera.setToOrtho(false, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());\n \n batch = new SpriteBatch();\n igShRenderer = new ShapeRenderer();\n shapeRenderer = new ShapeRenderer();\n \n //set up stage\n stage = new Stage();\n \n //laod cursor\n cursor = new Pixmap(Gdx.files.internal(\"com/BombingGames/WurfelEngine/Core/images/cursor.png\"));\n\n controller.getLoadMenu().viewInit(this);\n \n initalized = true;\n }", "@PostConstruct\n public void init() {\n WebsocketController.getInstance().setTemplate(this.template);\n try {\n\t\t\tthis.chatController = ChatController.getInstance();\n } catch (final Exception e){\n LOG.error(e.getMessage(), e);\n }\n }", "public ControllerTest()\r\n {\r\n }", "public SearchedRecipeController() {\n }", "public FilmOverviewController() {\n }", "public CreditPayuiController() {\n\t\tuserbl = new UserController();\n\t}", "private void initComponents() {\r\n\t\temulator = new Chip8();\r\n\t\tpanel = new DisplayPanel(emulator);\r\n\t\tregisterPanel = new EmulatorInfoPanel(emulator);\r\n\t\t\r\n\t\tcontroller = new Controller(this, emulator, panel, registerPanel);\r\n\t}", "public RootLayoutController() {\n }", "public MehController() {\n updateView(null);\n }", "public Controller(int host) {\r\n\t\tsuper(host);\r\n\t}", "public WorkerController(){\r\n\t}", "public TipoInformazioniController() {\n\n\t}", "private void initializeMealsControllers() {\n trNewPetMeal = MealsControllersFactory.createTrNewPetMeal();\n trObtainAllPetMeals = MealsControllersFactory.createTrObtainAllPetMeals();\n trDeleteMeal = MealsControllersFactory.createTrDeleteMeal();\n trUpdateMeal = MealsControllersFactory.createTrUpdateMeal();\n }", "public ProductOverviewController() {\n }", "public ProduktController() {\r\n }", "public Controller(ViewIF view) {\n\t\tthis.view = view;\n\t\tthis.dao = new DAO();\n\t\tthis.stats = new Statistics(this.dao);\n\t\tthis.gameStarted = false;\n\t}", "private void initializeMedicationControllers() {\n trNewPetMedication = MedicationControllersFactory.createTrNewPetMedication();\n trObtainAllPetMedications = MedicationControllersFactory.createTrObtainAllPetMedications();\n trDeleteMedication = MedicationControllersFactory.createTrDeleteMedication();\n trUpdateMedication = MedicationControllersFactory.createTrUpdateMedication();\n }", "public PersonLoginController() {\n }", "public PremiseController() {\n\t\tSystem.out.println(\"Class PremiseController()\");\n\t}", "public TaxiInformationController() {\n }", "public LoginController() {\n\t\treadFromFile();\n\t\t// TODO Auto-generated constructor stub\n\t}", "public Controller(){\n initControl();\n this.getStylesheets().addAll(\"/resource/style.css\");\n }", "public CreateDocumentController() {\n }", "public ControllerRol() {\n }", "Main ()\n\t{\n\t\tview = new View ();\t\t\n\t\tmodel = new Model(view);\n\t\tcontroller = new Controller(model, view);\n\t}", "public Controller () {\r\n puzzle = null;\r\n words = new ArrayList <String> ();\r\n fileManager = new FileIO ();\r\n }", "public void init() {\n \n }", "public Controller() {\n\t\tdoResidu = false;\n\t\tdoTime = false;\n\t\tdoReference = false;\n\t\tdoConstraint = false;\n\t\ttimeStarting = System.nanoTime();\n\t\t\n\t\tsetPath(Files.getWorkingDirectory());\n\t\tsetSystem(true);\n\t\tsetMultithreading(true);\n\t\tsetDisplayFinal(true);\n\t\tsetFFT(FFT.getFastestFFT().getDefaultFFT());\n\t\tsetNormalizationPSF(1);\n\t\tsetEpsilon(1e-6);\n\t\tsetPadding(new Padding());\n\t\tsetApodization(new Apodization());\n\n\t\tmonitors = new Monitors();\n\t\tmonitors.add(new ConsoleMonitor());\n\t\tmonitors.add(new TableMonitor(Constants.widthGUI, 240));\n\n\t\tsetVerbose(Verbose.Log);\n\t\tsetStats(new Stats(Stats.Mode.NO));\n\t\tsetConstraint(Constraint.Mode.NO);\n\t\tsetResiduMin(-1);\n\t\tsetTimeLimit(-1);\n\t\tsetReference(null);\n\t\tsetOuts(new ArrayList<Output>());\n\t}", "public OrderInfoViewuiController() {\n\t\tuserbl = new UserController();\n\t}", "public SessionController() {\n }", "@Override\n\tprotected void setController() {\n\t\t\n\t}", "public MainFrameController() {\n }", "public LicenciaController() {\n }", "public NearestParksController() {\n this.bn = new BicycleNetwork();\n this.pf = new LocationFacade();\n // this.bn.loadData();\n }", "public MotorController() {\n\t\tresetTachometers();\n\t}", "public AwTracingController() {\n mNativeAwTracingController = nativeInit();\n }", "public Controller(IView view) {\n\t\tengine = new Engine(this);\n\t\tclock = new Clock();\n\t\tsoundEmettor = new SoundEmettor();\n\t\tthis.view = view;\n\t}", "public HomeController() {\n }", "public HomeController() {\n }" ]
[ "0.8125658", "0.78537387", "0.78320265", "0.776199", "0.776199", "0.76010174", "0.74497247", "0.7437837", "0.7430714", "0.742303", "0.74057597", "0.7341963", "0.7327749", "0.72634363", "0.72230434", "0.7102504", "0.70575505", "0.69873077", "0.69721675", "0.6944077", "0.6912564", "0.688884", "0.6881247", "0.68776786", "0.68723065", "0.6868163", "0.68672407", "0.6851157", "0.6846883", "0.6840198", "0.68382674", "0.68338853", "0.6795918", "0.67823315", "0.6766882", "0.67650586", "0.6750353", "0.6749068", "0.6745654", "0.6743223", "0.67401046", "0.6727867", "0.6723379", "0.6695514", "0.6689967", "0.66892517", "0.66791916", "0.6677345", "0.66644365", "0.6664202", "0.66616154", "0.66532296", "0.66481894", "0.6644939", "0.6639398", "0.6633576", "0.66312426", "0.662608", "0.66258574", "0.66105217", "0.6606984", "0.66024727", "0.6597095", "0.6580141", "0.65786153", "0.65752715", "0.6574144", "0.6551536", "0.655142", "0.6547574", "0.6545647", "0.6541474", "0.6529243", "0.65284246", "0.6525593", "0.6523344", "0.6519832", "0.65134746", "0.65079254", "0.6497635", "0.64952356", "0.6493943", "0.6492926", "0.6483847", "0.6483173", "0.648183", "0.6479119", "0.64789915", "0.6476928", "0.64734083", "0.6465272", "0.64616114", "0.6444024", "0.64379543", "0.6431962", "0.64292705", "0.6425357", "0.6417148", "0.6416786", "0.64161026", "0.64161026" ]
0.0
-1
Listener for when they change booking type
public void addListeners(){ createBookingType.valueProperty().addListener(new ChangeListener<String>() { @Override public void changed(ObservableValue ov, String t, String t1) { createBookingFee.setText(dbH.getBookingPrice(t1).toString()); updateFreeBays(); } }); //Listener for when they change start time createBookingTimeStart.localTimeProperty().addListener(new ChangeListener<LocalTime>() { @Override public void changed( ObservableValue<? extends LocalTime> observableValue, LocalTime oldValue, LocalTime newValue) { updateFreeBays(); } }); //Listener for when they change end time createBookingTimeEnd.localTimeProperty().addListener(new ChangeListener<LocalTime>() { @Override public void changed( ObservableValue<? extends LocalTime> observableValue, LocalTime oldValue, LocalTime newValue) { updateFreeBays(); } }); //EventHandler for when they change the date createBookingDate.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent event) { updateFreeBays(); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setBookedStatus(JGGTimeSlotModel timeSlot) {\n JGGTimeSlotBookedStatus status = timeSlot.getStatus();\n switch (status) {\n case none:\n case not_booked:\n backLayout.setBackgroundResource(R.drawable.book_background);\n txtDay.setVisibility(View.GONE);\n txtWeekDay.setText(\"Book Time Slot\");\n txtWeekDay.setTextColor(ContextCompat.getColor(mContext, R.color.JGGWhite));\n itemView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent intent = new Intent(mContext, PackageServiceTimeSlotActivity.class);\n mContext.startActivity(intent);\n }\n });\n break;\n case booking:\n break;\n case booked:\n backLayout.setBackgroundResource(R.drawable.grey_border_background);\n txtDay.setTextColor(ContextCompat.getColor(mContext, R.color.JGGGrey3));\n txtWeekDay.setTextColor(ContextCompat.getColor(mContext, R.color.JGGGrey3));\n break;\n default:\n break;\n }\n }", "void onCardTypeChange(String type);", "private void SelectionChanged(String type) {\n try {\n VaadinSession.getCurrent().getLockInstance().lock();\n Listeners_Map.values().stream().forEach((filter) -> {\n filter.selectionChanged(type);\n });\n } finally {\n VaadinSession.getCurrent().getLockInstance().unlock();\n busyTask.setVisible(false);\n }\n\n }", "private void handleInsuranceTypeChange() {\n\t\tString insurance = cbInsurance.getText();\n\n\t\tif (optionA[1].equals(insurance))\n\t\t\tbtnInsurancePop.setEnabled(true);\n\t\telse {\n\t\t\tbtnInsurancePop.setEnabled(false);\n\t\t}\n\t}", "public void updateAvailability(String type) {\n\t\tString title = \"\";\n\t\tif (startDate != null & endDate != null) {\n\t\t\ttitle = \"Available Rooms \" + formatDate(startDate) + \" - \" + formatDate(endDate);\n\t\t}\n\t\tavailabilityDisplay.setText(guestModel.getRooms(type));\n\n\t\tavailabilityLabel.setText(title);\n\t\tadd(availabilityLabel);\n\t}", "private void handleBooking() {\n\t\tString customerID;\n\t\tint recNo = table.getSelectedRow();\n\t\tif(recNo == -1){\n\t\t\treturn;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tcustomerID = JOptionPane.showInputDialog(mainPanel,\n\t\t\t\t\t\"Enter Customer ID (8 Digits)\");\n\t\t\tif (customerID != null) {\t\n\t\t\t\tcontroller.reserveRoom(recNo, customerID);\n\t\n\t\t\t\tupdateTable(nameSearchBar.getText(),\n\t\t\t\t\t\tlocationSearchBar.getText());\n\t\t\t}\n\t\t} catch (final InvalidCustomerIDException icide) {\n\t\t\tJOptionPane.showMessageDialog(mainPanel, \"Invalid format!\");\n\t\t} catch (final BookingServiceException bse) {\n\t\t\tJOptionPane.showMessageDialog(mainPanel, bse.getMessage());\n\t\t} catch (final ServiceUnavailableException sue) {\n\t\t\tJOptionPane.showMessageDialog(null, sue.getMessage());\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "private void handleLCTypeChange() {\n\t\tString lc = cbLoadingCharge.getText();\n\t\tif (optionB[3].equals(lc)) {\n\t\t\ttxtLC_article.setEnabled(false);\n\t\t\ttxtLC_article.setText(EMPTYSTRING);\n\t\t} else {\n\t\t\ttxtLC_article.setEnabled(true);\n\t\t}\n\t}", "public Booking makeBooking(Customer customer, Airline flight, int baggage, String type, Date date);", "private void handleDDCTypeChange() {\n\t\tString ddc = cbDDC.getText();\n\n\t\tif (optionC[1].equals(ddc)) {\n\t\t\ttxtDDC_minPerLR.setEnabled(true);\n\t\t\ttxtDDC_chargeArticle.setEnabled(true);\n\t\t} else {\n\t\t\ttxtDDC_minPerLR.setText(EMPTYSTRING);\n\t\t\ttxtDDC_minPerLR.setEnabled(false);\n\n\t\t\tif (optionC[0].equals(ddc)) {\n\t\t\t\ttxtDDC_chargeArticle.setEnabled(true);\n\t\t\t} else {\n\t\t\t\ttxtDDC_chargeArticle.setEnabled(false);\n\t\t\t\ttxtDDC_chargeArticle.setText(EMPTYSTRING);\n\t\t\t}\n\t\t}\n\t}", "public void onChange(TimelineModificationEvent e) {\n\t\tevent = e.getTimelineEvent();\n\n\t\t// update booking in DB...\n\n\t\t// if everything was ok, no UI update is required. Only the model should be updated\n\t\tmodel.update(event);\n\n\t\tFacesMessage msg =\n\t\t new FacesMessage(FacesMessage.SEVERITY_INFO, \"The booking dates \" + getRoom() + \" have been updated\", null);\n\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\n\n\t\t// otherwise (if DB operation failed) a rollback can be done with the same response as follows:\n\t\t// TimelineEvent oldEvent = model.getEvent(model.getIndex(event));\n\t\t// TimelineUpdater timelineUpdater = TimelineUpdater.getCurrentInstance(\":mainForm:timeline\");\n\t\t// model.update(oldEvent, timelineUpdater);\n\t}", "@Override\n public void onSelectedDayChange(CalendarView view, int year, int month,\n int dayOfMonth) {\n bookingDate = dayOfMonth + \"-\" + (month + 1) + \"-\" + year;\n date = dayOfMonth;\n mon = (month + 1);\n }", "@Override\r\n\t\t\tpublic void valueChanged(ListSelectionEvent ev) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tReservation selected = reservationsList.getSelectedValue();\r\n\t\t\t\t//Add other Values\r\n\t\t\t\t\tcodeTextField.setText(selected.getCode());\r\n\t\t\t\t\tflightTextField.setText(selected.getFlightCode());\r\n\t\t\t\t\tairlineTextField.setText(selected.getAirline());\r\n\t\t\t\t\tcostTextField.setText(\"$\"+selected.getCost());\r\n\t\t\t\t\tnameTextField.setText(selected.getName());\r\n\t\t\t\t\tcitizenshipTextField.setText(selected.getCitizenship());\r\n\t\t\t\t\tif(selected.isActive()) {\r\n\t\t\t\t\t\tstatusComboBox.setSelectedItem(\"Active\");\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\tstatusComboBox.setSelectedItem(\"Inactive\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}catch(NullPointerException ex) {\r\n\t\t\t\t\t//exists to stop crashing of program when it new list is selected.\r\n\t\t\t\t}\r\n\t\t\t}", "private void selectedDasTypeChanged() {\n\t\tselectedDasType = (DASType) jcbDasType.getSelectedItem();\n\t}", "private void setEventType(String eventType)\n\t{\n\t\tsomethingChanged = true;\n\t\tthis.eventType = eventType;\n\t}", "private void handleIECTypeChange() {\n\t\tString iec = cbIEC.getText();\n\t\tif (optionB[3].equals(iec)) {\n\t\t\ttxtIEC_article.setEnabled(false);\n\t\t\ttxtIEC_article.setText(EMPTYSTRING);\n\t\t} else {\n\t\t\ttxtIEC_article.setEnabled(true);\n\t\t}\n\t}", "public void updateCalendarType() {\n\t\tthis.calType = (this.jdCO <= this.jd ? SE_GREG_CAL : SE_JUL_CAL);\n\t\t;\n\t}", "@Override\n\t\tpublic void widgetSelected(SelectionEvent event) {\n\n\t\t\tObject source = event.getSource();\n\n\t\t\tif (source == cbLRC) { //LR Charge value change\n\t\t\t\thandleLRCTypeChange();\n\t\t\t} else if (source == cbGSC) { //GSC value change\n\t\t\t\thandleGSCTypeChange();\n\t\t\t} else if (source == cbInsurance) { //Insurance Value Change\n\t\t\t\thandleInsuranceTypeChange();\n\t\t\t} else if (source == cbDHC) { //GSC value change\n\t\t\t\thandleDHCTypeChange();\n\t\t\t} else if (source == cbCCC) { //CC Charge Type change\n\t\t\t\thandleCCCTypeChange();\n\t\t\t} else if (source == cbDCC) { //DC Charge Type change\n\t\t\t\thandleDCCTypeChange();\n\t\t\t} else if (source == cbDDC) { //DD Charge Type change\n\t\t\t\thandleDDCTypeChange();\n\t\t\t} else if (source == cbIEC) { //IEC Charge Type change\n\t\t\t\thandleIECTypeChange();\n\t\t\t} else if (source == cbLoadingCharge) { //Loading Charge Type change\n\t\t\t\thandleLCTypeChange();\n\t\t\t} else if (source == btnAdd) {\n\t\t\t\tif(isValidArticle())\n\t\t\t\t\taddArticle();\n\t\t\t} else if (source == tblArticle) {\n\t\t\t\tviewEditTblArticle();\n\t\t\t}\n\t\t\tif (source == btnLRCPop) {\n\t\t\t\thandleLRCPop();\n\t\t\t} else if (source == btnGSCPop) {\n\t\t\t\thandleGSCPop();\n\t\t\t} else if (source == btnInsurancePop) {\n\t\t\t\thandleInsurancePop();\n\t\t\t} else if (source == btnDHCPop) {\n\t\t\t\thandleDHCPop();\n\t\t\t}\n\t\t}", "private void handleLRCTypeChange() {\n\t\tString lrc = cbLRC.getText();\n\n\t\tif (optionA[1].equals(lrc))\n\t\t\tbtnLRCPop.setEnabled(true);\n\t\telse {\n\t\t\tbtnLRCPop.setEnabled(false);\n\t\t}\n\t}", "private void handleGSCTypeChange() {\n\t\tString gsc = cbGSC.getText();\n\n\t\tif (optionA[1].equals(gsc))\n\t\t\tbtnGSCPop.setEnabled(true);\n\t\telse {\n\t\t\tbtnGSCPop.setEnabled(false);\n\t\t}\n\t}", "public native final EditorBaseEvent changedType(String val) /*-{\n\t\tthis.changedType = val;\n\t\treturn this;\n\t}-*/;", "UpdateType updateType();", "public interface CHANGED_TYPE {\r\n public static final int FEE = 1;\r\n public static final int GRACE_PERIOD = 2;\r\n }", "@Override\n\tpublic void setCashierType(String status) {\n\t}", "public void setBookingId(int booking_id) {\n this.booking_id = booking_id;\n }", "private void EnterChange() {\r\n\r\n //try block to check if the customer enters an except integer for the Time field\r\n try{\r\n // create a reservation\r\n Reservation p1 = new Reservation(textName.getText(), Integer.parseInt(textTime.getText()));\r\n // TODO: add obj to arraylist\r\n _ReservationList.saveData(p1);\r\n\r\n }\r\n catch (Exception e){\r\n Alert alert = new Alert(Alert.AlertType.ERROR, \"Please type an Integer only. For Example, to book for 7:00 p.m, type just 7.\");\r\n alert.showAndWait();\r\n return;\r\n }\r\n }", "public void onBookEvent(final BookStatusEvent event) {\n if (this.feed.containsID(event.book())) {\n LOG.debug(\"update: updated feed entry\");\n UIThread.runOnUIThread(adapter::notifyDataSetChanged);\n }\n }", "public void makeBooking (Object booking);", "public void setStatus(typekey.RateBookStatus value);", "public void insertBooking(){\n \n Validator v = new Validator();\n if (createBookingType.getValue() == null)\n {\n \n Dialogs.create()\n .owner(prevStage)\n .title(\"Error!\")\n .masthead(null)\n .message(\"Set Booking Type!\")\n .showInformation();\n \n return;\n \n }\n if (createBookingType.getValue().toString().equals(\"Repair\"))\n Dialogs.create()\n .owner(prevStage)\n .title(\"Error!\")\n .masthead(null)\n .message(\"Go to Diagnosis and Repair tab for creating Repair Bookings!\")\n .showInformation();\n \n \n if(v.checkBookingDate(parseToDate(createBookingDate.getValue(),createBookingTimeStart.localTimeProperty().getValue()),\n parseToDate(createBookingDate.getValue(),createBookingTimeEnd.localTimeProperty().getValue()))\n && customerSet)\n \n { \n \n int mID = GLOBAL.getMechanicID();\n \n try {\n mID = Integer.parseInt(createBookingMechanic.getSelectionModel().getSelectedItem().toString().substring(0,1));\n } catch (Exception ex) {\n Dialogs.create()\n .owner(prevStage)\n .title(\"Error!\")\n .masthead(null)\n .message(\"Set Mechanic!\")\n .showInformation();\n return;\n }\n \n if (mID != GLOBAL.getMechanicID())\n if (!getAuth(mID)) return;\n \n createBookingClass();\n dbH.insertBooking(booking);\n booking.setID(dbH.getLastBookingID());\n appointment = createAppointment(booking);\n closeWindow();\n \n }\n else\n {\n String extra = \"\";\n if (!customerSet) extra = \" Customer and/or Vehicle is not set!\";\n Dialogs.create()\n .owner(prevStage)\n .title(\"Error!\")\n .masthead(null)\n .message(\"Errors with booking:\"+v.getError()+extra)\n .showInformation();\n }\n \n }", "@FXML\r\n public void partTypeChange() {\r\n if(this.partType.getSelectedToggle().equals(this.modPartInHouse)) {\r\n isInHouse = true;\r\n machineIdText.setText(\"Machine ID\");\r\n }\r\n else {\r\n isInHouse = false;\r\n machineIdText.setText(\"Company\");\r\n }\r\n }", "public String getBookType() {\n return bookType;\n }", "public void donutTypeChosen()\n {\n changeSubtotalTextField();\n }", "@Override\n public void toMyBookings() {\n }", "public void setBookType(String bookType) {\n this.bookType = bookType == null ? null : bookType.trim();\n }", "public void setRoomType (RoomType t) {\r\n\t\tthis.type = t;\r\n\t}", "private void poTypeChanged(javax.swing.JRadioButton jrb){\n \tif(jrb==jRadioButton1){\n \t\tif(!resetPerforming && poType==inventorycontroller.function.PurchaseOrderProcessor.AGAINST_BOM){\n \t\t\treturn;\n \t\t}\n \t\tpoType=inventorycontroller.function.PurchaseOrderProcessor.AGAINST_BOM;\n\t \tjTabbedPane1.setEnabledAt(1, true);\n\t \tjTabbedPane1.setEnabledAt(2, false);\n\t \tpoDetEditable=poDetEditableForBM;\n\t \tjTextField1.setText(\n\t \t\tnew inventorycontroller.function.PurchaseOrderProcessor(dbInterface1)\n\t \t\t .getNewPoNo(poType)\n\t \t);\n\t \t\n\t \tresetPoTable();\n\t \tresetBomTable();\n\t \tresetBomDetails();\n \t}\n \telse if(jrb==jRadioButton2){\n \t\tif(!resetPerforming && poType==inventorycontroller.function.PurchaseOrderProcessor.LOCAL_PURCHASE){\n \t\t\treturn;\n \t\t}\n \t\tpoType=inventorycontroller.function.PurchaseOrderProcessor.LOCAL_PURCHASE;\n \tjTabbedPane1.setEnabledAt(1, false);\n \tjTabbedPane1.setEnabledAt(2, true);\n \tresetSelectedBom();\n \tpoDetEditable=poDetEditableForLP;\n\t \tjTextField1.setText(\n\t \t\tnew inventorycontroller.function.PurchaseOrderProcessor(dbInterface1)\n\t \t\t .getNewPoNo(poType)\n\t \t);\n\t \tresetPoTable();\n\t \tresetItmTable(); \n\t jTable4.getColumnModel().getColumn(0).setMinWidth(48);\n\t jTable4.getColumnModel().getColumn(0).setPreferredWidth(48);\n\t jTable4.getColumnModel().getColumn(0).setMaxWidth(60); \t\t\n \t}\n }", "public void setEventtype(java.lang.String newValue) {\n\tthis.eventtype = newValue;\n}", "public void batteryType(String type)\n {\n\t batteryType = type;\n }", "public void registerNewBooking(Booking b) {\n if (!newBooking.contains(b)\n && !modifiedBooking.contains(b)) {\n newBooking.add(b);\n }\n }", "public void setBookingId(int value) {\n this.bookingId = value;\n }", "public void setBookingId(int value) {\n this.bookingId = value;\n }", "public void setBooking(Set<Booking> aBooking) {\n booking = aBooking;\n }", "public void setTransactionType(int transactionChoice);", "void scno(String type, Object data) {\r\n\t\tnotifications.put(type, data);\r\n\t\tsetChanged();\r\n\t\tnotifyObservers(type);\r\n\t\t\r\n\t}", "@Override\n public void confirm(AppointmentBean appointmentBean, AppointmentDetailPresenter presenter) {\n AppointmentStateTypeBean type = presenter.getAppointmentStateTypeBean(1);\n type.setAppointmentState(new AppointmentStateNew());\n appointmentBean.setAppointmentStateType(type);\n }", "private void handleDCCTypeChange() {\n\t\tString dcc = cbDCC.getText();\n\t\tif (optionB[2].equals(dcc) || optionB[3].equals(dcc)) {\n\t\t\ttxtDCCValue.setEnabled(false);\n\t\t\ttxtDCCValue.setText(EMPTYSTRING);\n\t\t} else {\n\t\t\ttxtDCCValue.setEnabled(true);\n\t\t}\n\t}", "private void handleAirplaneModeChanged() {\n callbacksRefreshCarrierInfo();\n }", "public void changePrice(Booking booking, float price);", "@Override\r\n\t\t\t\tpublic void stateChanged(ChangeEvent e) {\n\t\t\t\t\tif (!typeCheckBox.isSelected())\r\n\t\t\t\t\t\ttypeComboBox.setEnabled(false);\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\ttypeComboBox.setEnabled(true);\r\n\t\t\t\t}", "void changeType(NoteTypes newType) {\n this.type = newType;\n }", "@Override\n\tpublic boolean bookingStatus(UserDetails userDetails, FilghtDetails flightDetails) {\n\t\treturn false;\n\t}", "public void addListeners()\n {\n super.addListeners();\n BookingLine recBookingLine = (BookingLine)this.getRecord(BookingLine.BOOKING_LINE_FILE);\n Booking recBooking = (Booking)this.getRecord(Booking.BOOKING_FILE);\n recBooking.addArDetail(null, recBookingLine, false);\n \n recBookingLine.getField(BookingLine.PRICE).addListener(new CopyDataHandler(recBookingLine.getField(BookingLine.PRICING_STATUS_ID), new Integer(PricingStatus.MANUAL), null));\n recBookingLine.addListener(new BookingLineStatusHandler(null));\n }", "@Override\n public void onItemSelected(View view, int position) {\n\n FirebaseFirestore.getInstance()\n .collection(\"AllSalon\")\n .document(Common.state_name)\n .collection(\"Branch\")\n .document(Common.selected_salon.getSalonId())\n .collection(\"Barbers\")\n .document(Common.currentBarber.getBarberId())\n .collection(Common.simpleDateFormat.format(Common.bookingDate.getTime()))\n .document(slotValue.getSlot().toString())\n .get()\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(context, e.getMessage(), Toast.LENGTH_SHORT).show();\n }\n }).addOnCompleteListener(new OnCompleteListener<DocumentSnapshot>() {\n @Override\n public void onComplete(@NonNull Task<DocumentSnapshot> task) {\n if (task.isSuccessful()) {\n if (task.getResult().exists()) {\n Common.currentBookingInformation = task.getResult().toObject(BookingInformation.class);\n Common.currentBookingInformation.setBookingId(task.getResult().getId());\n context.startActivity(new Intent(context, DoneServicesActivity.class));\n }\n }\n }\n });\n\n }", "public void showBookType(int typeOfBook) {\n\t\tfor (int i = 0; i < bookList.size(); i++) {\n\t\t\tif (typeOfBook - 1 == bookType(bookList.get(i).getIsbn())) { // 0=ChildernsBook 1=cookBook 2=paperback\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 3=Periodic\n\t\t\t\tSystem.out.println(bookList.get(i));\n\t\t\t}\n\t\t}\n\t}", "public interface OnSelectedBookChangeListener {\r\n void onSelectedBookChanged(int bookIndex);\r\n}", "public void setEventType(String eventType){\n this.eventType = eventType;\n }", "private void setEventTypeList() {\n EventTypeAdapter listAdapter = new EventTypeAdapter(this, R.layout.spinner_item, getResources().getStringArray(R.array.event_type_list));\n listAdapter.setDropDownViewResource(R.layout.spinner_list_item);\n listEventType.setAdapter(listAdapter);\n listEventType.setSelection(listAdapter.getCount());\n listEventType.setOnItemSelectedListener(this);\n }", "public void setBookStatus(Integer bookStatus) {\n this.bookStatus = bookStatus;\n }", "public void setBookStatus(Integer bookStatus) {\n this.bookStatus = bookStatus;\n }", "public void setBookStatus(Integer bookStatus) {\n this.bookStatus = bookStatus;\n }", "public void getBookAvailability() {\n getBookReservationEligibility();\n }", "public abstract void setEventType(Context context, NAEventType type);", "public void showBookType(int typeOfBook, char freqSelected) {\n\t\tfinal int PERIODIC = 3;\n\t\tfor (int i = 0; i < bookList.size(); i++) {\n\t\t\tif (PERIODIC == bookType(bookList.get(i).getIsbn())) { // 3=Periodic\n\t\t\t\tif (((Periodic) bookList.get(i)).getFrequency() == freqSelected) {// check to see if freq is same\n\t\t\t\t\tSystem.out.println(bookList.get(i));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void alertListeners(GameChangeType type) {\n switch (type) {\n case LOSE:\n listeners.stream().forEach(e -> e.gameLose());\n break;\n case WIN:\n listeners.stream().forEach(e -> e.gameWin());\n break;\n case TICK:\n listeners.stream().forEach(e -> e.gameTick());\n break;\n case FLAG:\n listeners.stream().forEach(e -> e.flagChanged());\n break;\n default:\n return;\n }\n }", "private void parseEventType() { //TODO: add a list of all the school holidays to checkfor the 'holiday' event type.\n String tempTitle = title.toLowerCase();\n if(tempTitle.contains(\"no school\") || tempTitle.contains(\"teacher's institute\") || tempTitle.contains(\"teacher's work day\") || tempTitle.contains(\"snow day\")) { //example: no school\n this.type = EventType.noSchool;\n } else if(tempTitle.contains(\"late start\")) {//example: late start wednesday\n this.type = EventType.lateStart;\n } else if(tempTitle.contains(\"last day\")) {//example last day before spring break;\n this.type = EventType.lastDayBeforeBreak;\n } else if(tempTitle.contains(\"end of\")) { //example: end of first semester\n this.type = EventType.endOf;\n } else if(tempTitle.contains(\"meeting\")) {\n this.type = EventType.meeting;\n } else {\n this.type = EventType.regular;\n }\n }", "public void setAvailableduringbooking(int s, int e) {\n for (int i = s; i < e; ++i) {\n availableTime[i] = false;\n }\n\n }", "@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tSystem.out.println(oDate.getSelection());\t\t\t\t\n\t\t\t\teachShipment.setExpectedShipDate(oDate.getSelection());;\n\t\t\t eachShipment.setExpectedRecievedDate(sDate.getSelection());\n\t\t\t eachShipment.setRecieptNumber(recieptText.getText());\n\t\t\t\teachShipment.setOrgId(orgId);\n\t\t\t\t//need to refactor to remove duplication later\n\t\t\t\t//possible try block\n\t\t\t\tList<DatabaseAccess> affectedTables = new ArrayList<DatabaseAccess>();\n\t\t\t\tStoreInDatabase sd = new StoreInDatabase();\n\t\t\t\taffectedTables.add(eachShipment);\n\t\t\t\tsd.writeToDatabase(affectedTables);\n\t\t\t}", "private void handleCCCTypeChange() {\n\t\tString ccc = cbCCC.getText();\n\n\t\tif (optionB[2].equals(ccc) || optionB[3].equals(ccc)) {\n\t\t\ttxtCCCValue.setEnabled(false);\n\t\t\ttxtCCCValue.setText(EMPTYSTRING);\t\t\t\n\t\t} else {\n\t\t\ttxtCCCValue.setEnabled(true);\n\t\t}\n\t}", "@Override\r\n\tpublic void vehicleType() {\n\r\n\t}", "@Override\n\tpublic void valueChanged(ListSelectionEvent ls) {\n\t\tString s = (String)((JList)ls.getSource()).getSelectedValue();\n\t\tif(s!=null && !s.isEmpty()){\n\t\t\tif(!SelectEventFromCalendarListener.currentCal.equals(s)){\n\t\t\t\tSelectEventFromCalendarListener.currentCal = s;\n\t\t\t\t\n\t\t\t\tVector<Event> v = new Vector<Event>();\n\t\t\t\tfor(Event e : Main.myCals.getCalendar(SelectEventFromCalendarListener.currentCal).getAllEvent()){\n\t\t\t\t\tv.add(e);\n\t\t\t\t}\n\t\t\t\tthis.evList.setListData(v);\n\t\t\t\tRefreshList rl = new RefreshList(false);\n\t\t\t\trl.refresh();\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Activer la fonction creer evenement\n\t}", "public void control() {\n\t\tthis.searchListener = new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(final ActionEvent actionEvent) {\n\t\t\t\tClientController.this.lastSearch = ClientController.this\n\t\t\t\t\t\t.getSearchText();\n\t\t\t\tClientController.this.clientUI\n\t\t\t\t\t\t.updateTable(ClientController.this\n\t\t\t\t\t\t\t\t.getRecords(ClientController.this.lastSearch));\n\t\t\t}\n\t\t};\n\t\tthis.bookingListener = new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(final ActionEvent actionEvent) {\n\t\t\t\tfinal long selectedRecNo = ClientController.this\n\t\t\t\t\t\t.getReserveRecNo();\n\n\t\t\t\tif (selectedRecNo != -1) {\n\t\t\t\t\tfinal String owner = ClientController.this.getCustomerID();\n\n\t\t\t\t\tif (owner != null) {\n\t\t\t\t\t\tClientController.this.bookRoom(selectedRecNo, owner);\n\t\t\t\t\t\tClientController.this.clientUI\n\t\t\t\t\t\t\t\t.updateTable(ClientController.this\n\t\t\t\t\t\t\t\t\t\t.getRecords(ClientController.this.lastSearch));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tthis.clientUI.getSearchButton().addActionListener(this.searchListener);\n\t\tthis.clientUI.getBookingButton()\n\t\t\t\t.addActionListener(this.bookingListener);\n\t}", "private static void addNewBooking() {\n ArrayList<Customer> listCustomer = FuncFileCSVCustomer.getFileCSVToListCustomer();\n listCustomer.sort(new CustomerSort());\n int i = 1;\n for (Customer customer : listCustomer) {\n System.out.println(\"-------------------------\");\n System.out.println(\"Customer \" + i + \" : \");\n System.out.println(customer.showInfo());\n System.out.println(\"-------------------------\");\n i++;\n }\n System.out.println(\"Choose Customer Booking\");\n Customer customer = listCustomer.get(scanner.nextInt() - 1);\n scanner.nextLine();\n System.out.println(\"\\n1. Booking Villa.\" +\n \"\\n2. Booking House.\" +\n \"\\n3. Booking Room.\");\n System.out.println(\"Choose Service Booking\");\n String choose = scanner.nextLine();\n switch (choose) {\n case \"1\":\n i = 1;\n ArrayList<Villa> listVilla = FuncFileCSVVilla.getFileCSVToListVilla();\n for (Villa villa : listVilla) {\n System.out.println(\"-------------------------\");\n System.out.println(\"No : \" + i);\n System.out.println(villa.showInfo());\n System.out.println(\"-------------------------\");\n i++;\n }\n System.out.println(\"Choose Villa Booking\");\n int chooseVillaBooking;\n chooseVillaBooking = scanner.nextInt();\n Villa villa = listVilla.get(chooseVillaBooking - 1);\n customer.setService(villa);\n break;\n case \"2\":\n i = 1;\n ArrayList<House> listHouse = FuncFileCSVHouse.getFileCSVToListHouse();\n for (House house : listHouse) {\n System.out.println(\"-------------------------\");\n System.out.println(\"No : \" + i);\n System.out.println(house.showInfo());\n System.out.println(\"-------------------------\");\n i++;\n }\n System.out.println(\"Choose House Booking\");\n int chooseHouseBooking;\n chooseHouseBooking = scanner.nextInt();\n House house = listHouse.get(chooseHouseBooking - 1);\n customer.setService(house);\n break;\n case \"3\":\n i = 1;\n ArrayList<Room> listRoom = FuncFileCSVRoom.getFileCSVToListRoom();\n for (Room room : listRoom) {\n System.out.println(\"-------------------------\");\n System.out.println(\"No : \" + i);\n System.out.println(room.showInfo());\n System.out.println(\"-------------------------\");\n i++;\n }\n System.out.println(\"Choose Room Booking\");\n int chooseRoomBooking;\n chooseRoomBooking = scanner.nextInt();\n Room room = listRoom.get(chooseRoomBooking - 1);\n customer.setService(room);\n break;\n default:\n System.out.println(\"Nhap sai, quay ve menu.\");\n backToMenu();\n break;\n\n }\n //bi ghi de do get ra khong duoc\n ArrayList<Customer> listCustomerBooking = FuncFileCSVBooking.getFileCSVToListBooking();\n //???????????????????? get tu file ra khong duoc\n listCustomerBooking.add(customer);\n FuncFileCSVBooking.writeBookingToFileCSV(listCustomerBooking);\n displayMainMenu();\n }", "public void handleItemSpinnerChange(){\n String itemTypeText = itemType.getSelectedItem().toString();\n if(itemTypeText.equals(\"Computer\")){\n osTextView.setVisibility(View.VISIBLE);\n osInput.setVisibility(View.VISIBLE);\n printerTextView.setVisibility(View.INVISIBLE);\n printerType.setVisibility(View.GONE);\n }\n else if(itemTypeText.equals(\"Printer\")){\n osTextView.setVisibility(View.INVISIBLE);\n osInput.setVisibility(View.INVISIBLE);\n printerTextView.setVisibility(View.VISIBLE);\n printerType.setVisibility(View.VISIBLE);\n }\n }", "private void cbxTypeModifiedItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbxTypeModifiedItemStateChanged\n this.habilitarBtnActualizar();\n }", "@Override // io.reactivex.rxjava3.functions.Consumer\n public void accept(LoadingState<? super List<? extends CalendarBookingRestriction>> loadingState) {\n LoadingState<? super List<? extends CalendarBookingRestriction>> loadingState2 = loadingState;\n if (loadingState2 instanceof LoadingState.Loaded) {\n HotelsFiltersCalendarViewModelImpl.access$onCalendarRestrictionsLoaded(this.a, (List) ((LoadingState.Loaded) loadingState2).getData());\n } else if (loadingState2 instanceof LoadingState.Loading) {\n this.a.onCalendarDataLoading();\n } else if (loadingState2 instanceof LoadingState.Error) {\n this.a.onCalendarDataError(new m(this));\n }\n }", "public TypeEventFilter(String type)\n {\n super();\n setEventType(type);\n }", "private void setCellType(Cell cell, CellType type) {\n\t\tfor (AgentListener listener : listeners) {\n\t\t\tlistener.changeCellType(cell.getPosition(), type);\n\t\t}\n\t\tcell.setType(type);\n\t}", "private void onRadioTypeUpdated(Button typeWidget) {\n // Do nothing if this is an internal modification or if the widget has been\n // de-selected.\n if (mInternalTypeUpdate || !typeWidget.getSelection()) {\n return;\n }\n\n // Find type info that has just been enabled.\n TypeInfo type = null;\n for (TypeInfo ti : sTypes) {\n if (ti.getWidget() == typeWidget) {\n type = ti;\n break;\n }\n }\n\n if (type == null) {\n return;\n }\n\n // update the combo\n\n updateRootCombo(type);\n\n // update the folder path\n\n String wsFolderPath = mWsFolderPathTextField.getText();\n String newPath = null;\n\n mConfigSelector.getConfiguration(mTempConfig);\n ResourceQualifier qual = mTempConfig.getInvalidQualifier();\n if (qual == null) {\n // The configuration is valid. Reformat the folder path using the canonical\n // value from the configuration.\n\n newPath = RES_FOLDER_ABS + mTempConfig.getFolderName(type.getResFolderType());\n } else {\n // The configuration is invalid. We still update the path but this time\n // do it manually on the string.\n if (wsFolderPath.startsWith(RES_FOLDER_ABS)) {\n wsFolderPath.replaceFirst(\n \"^(\" + RES_FOLDER_ABS +\")[^-]*(.*)\", //$NON-NLS-1$ //$NON-NLS-2$\n \"\\\\1\" + type.getResFolderName() + \"\\\\2\"); //$NON-NLS-1$ //$NON-NLS-2$\n } else {\n newPath = RES_FOLDER_ABS + mTempConfig.getFolderName(type.getResFolderType());\n }\n }\n\n if (newPath != null && !newPath.equals(wsFolderPath)) {\n mInternalWsFolderPathUpdate = true;\n mWsFolderPathTextField.setText(newPath);\n mInternalWsFolderPathUpdate = false;\n }\n\n validatePage();\n }", "private void indicateAddressBookChanged() {\n raise(new AddressBookChangedEvent(addressBook));\n }", "public void completeBooking(){\r\n\t\tbookings.putAll(tempBookings);\r\n\t\ttempBookings.clear();\r\n\t}", "@Override\n\tpublic void setType(java.lang.String type) {\n\t\t_dlSyncEvent.setType(type);\n\t}", "private void comboBoxUpdate(){\n\t\tString docType = (String) combBoxDocumentTypes.getSelectedItem();\n\t\tif(!docType.isEmpty()){\n\t\t\tchangeConditionsSetsFromRadioButton(profilingConditionsInformations.getConditionSetsNames(docType));\n\t\t}else{\n\t\t\tchangeConditionsSetsFromRadioButton(new HashSet<String>());\n\t\t}\n\t\tif(docType.equals(DocBookTypes.DOCBOOK4) || docType.equals(DocBookTypes.DOCBOOK5)){\n\t\t\tremoveDocumentTypeButton.setEnabled(false);\n\t\t}else{\n\t\t\tremoveDocumentTypeButton.setEnabled(true);\n\t\t}\n\n\t}", "@Override\n\tpublic void workoutServiceStatusChanged(WorkoutServiceStatusChangeType changeType, WorkoutServiceStatus status) {\n\t\tsetUIState(workoutService.getService().getStatus());\n\t}", "public void payments(RoomList rooms, Guest guest, int type) {\t//looks for room bill by room number\t\t\t\t\t\t\n\t\tSystem.out.println(\"Please enter the room number of the Guest wishing to pay their bill?\\nROOM NO:\");\n\t\tint roomNum = keyboard.nextInt();\t\t\t\t\t\t\t//user enters room number\n\t\t\n\t\troom = rooms.getRoomByRoomNumber(roomNum, rooms);\t\t\t//call the getRoomByRoomNumber method and return the room\n\t\tdouble roomPrice = room.Price(guest, room, roomNum);\t\t//rooms bill is called using the room.Price method\n\t\t\n\t\tif(type == 2) {\t\t\t\t\t\t\t\t\t\t\t\t//if int 'type' is set to 2 when the method is called it brings\n\t\t\tmakePayment(roomPrice, room, 0);\t\t\t\t\t\t//the user to pay the bill now with the make payment method\n\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//if int is not 2 the this method is over and the user only sees\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//the bill for the room and is returned to the main menu\t\n\t}", "@Override\n\t\t\tpublic void changed(ChangeEvent event, Actor actor) {\n\t\t\t}", "@Override\n\t\t\tpublic void changed(ChangeEvent event, Actor actor) {\n\t\t\t}", "@Override\n\t\t\tpublic void changed(ChangeEvent event, Actor actor) {\n\t\t\t}", "@Override\n\t\t\tpublic void changed(ChangeEvent event, Actor actor) {\n\t\t\t}", "public interface CheckDateClicker {\n void changeDate(int type);\n}", "@Override\n\t\t\tpublic void afterTextChanged(Editable s) {\n\t\t\t\tcallback.onIdealTypeEdited(2, s.toString());\n\t\t\t}", "public void setRoomType(RoomType roomType) {\n\t\tthis.roomType = roomType;\n\t}", "public void updatePayeeTypeForAuthorization() {\n if (!ObjectUtils.isNull(getTraveler()) && !ObjectUtils.isNull(getAdvanceTravelPayment())) {\n if (getTravelerService().isEmployee(getTraveler())){\n getAdvanceTravelPayment().setPayeeTypeCode(KFSConstants.PaymentPayeeTypes.EMPLOYEE);\n }else{\n getAdvanceTravelPayment().setPayeeTypeCode(KFSConstants.PaymentPayeeTypes.CUSTOMER);\n }\n }\n }", "public void bookFlight(){\n //Steps\n //1 Show the available flights. (at least one seat with 0)\n //2 User select a flight, and the system automatically set the seat with his id. he is not able to select the seat\n //3 User confirm the reservation \n //4 Flight reserved\n \n //1\n //FlightRepository.availableFlights();\n //Scanner input = new Scanner(System.in);\n //String flightNumber = input.nextLine();\n \n //2,3 and 4\n Flight flightObject = FlightRepository.getFlight(this.number);\n if (flightObject == null){\n System.out.println(\"Please select a valid flight number\");\n }\n flightObject.setPassengerSeat(this.PassengerID);\n }", "protected abstract void activateListener(TypeSummary[] typeSummaryArray, ActionEvent evt);", "@Override // io.reactivex.functions.Consumer\n public void accept(LoadingState<? super List<? extends CalendarBookingRestriction>> loadingState) {\n LoadingState<? super List<? extends CalendarBookingRestriction>> loadingState2 = loadingState;\n if (loadingState2 instanceof LoadingState.Loaded) {\n InlineFiltersCalendarViewModelImpl.access$onCalendarRestrictionsLoaded(this.a, (List) ((LoadingState.Loaded) loadingState2).getData());\n } else if (loadingState2 instanceof LoadingState.Loading) {\n this.a.onCalendarDataLoading();\n } else if (loadingState2 instanceof LoadingState.Error) {\n this.a.onCalendarDataError(new m(this));\n }\n }", "public void setChoice_type(java.lang.String choice_type) {\n this.choice_type = choice_type;\n }", "private void setBidded(){\n this.status = \"Bidded\";\n }", "public void setBusinesstype(String businesstype) {\n this.businesstype = businesstype;\n }", "private void dataValuesChanged(){\r\n ComboBoxBean cmbTypeCode =(ComboBoxBean)awardAddDocumentForm.cmbDocumentType.getSelectedItem();\r\n if(!cmbTypeCode.getCode().equals(\"\") && !cmbTypeCode.getDescription().equals(\"\")){\r\n if( !awardAddDocumentForm.txtDescription.getText().equals(EMPTY_STRING)\r\n || !awardAddDocumentForm.txtFileName.getText().equals(EMPTY_STRING) ||\r\n Integer.parseInt(cmbTypeCode.getCode())!= DOC_CODE){\r\n dataChanged = true;\r\n }\r\n }else{\r\n if( !awardAddDocumentForm.txtDescription.getText().equals(EMPTY_STRING)\r\n || !awardAddDocumentForm.txtFileName.getText().equals(EMPTY_STRING)){\r\n dataChanged = true;\r\n }else{\r\n dataChanged = false;\r\n } \r\n } \r\n }", "public void check_in(String type) {\n int index=searchRoom(type);\n if (index<=0)\n {\n System.out.println(\"There is no available \"+type+\" room!\");\n }else\n {\n int roomNo=roomlist.get(index).getRoomid();\n /*New object is created and this object`s availability wiil be \"not available,statu will be \"check in\"*/\n Room room = new Room(type,roomNo,\"not available\",\"check in\",this,roomlist.get(index).getRoomcharge());\n changeList(room);\n System.out.println(toString());\n System.out.println(\"Checked in of the room \"+roomNo+\" .\");\n }\n }" ]
[ "0.6424436", "0.62096334", "0.6150886", "0.6078971", "0.6019267", "0.5888769", "0.57218826", "0.5687427", "0.5671283", "0.5665473", "0.560991", "0.55699784", "0.5530448", "0.55244786", "0.5500116", "0.54695195", "0.5463676", "0.54383284", "0.5428741", "0.5421273", "0.54047334", "0.54044044", "0.5393201", "0.53884065", "0.5375049", "0.53609514", "0.5346666", "0.5340607", "0.5312878", "0.531161", "0.52774066", "0.5254215", "0.5250361", "0.52492774", "0.5246544", "0.52379864", "0.522289", "0.52207756", "0.52193123", "0.51807535", "0.51807535", "0.51761305", "0.5167793", "0.51664096", "0.5157144", "0.5155015", "0.51531106", "0.5146742", "0.514669", "0.5135299", "0.51344144", "0.5134198", "0.5127323", "0.512362", "0.51231474", "0.51222575", "0.5116772", "0.5111211", "0.5111211", "0.5111211", "0.5110863", "0.5100789", "0.5099322", "0.50848275", "0.50756425", "0.50745827", "0.50713724", "0.5071061", "0.50701594", "0.50660163", "0.5057039", "0.50531477", "0.50433385", "0.50426346", "0.5036035", "0.50246316", "0.5007955", "0.5007592", "0.5001555", "0.49999776", "0.4994708", "0.49924597", "0.49895704", "0.4980389", "0.49781138", "0.49781138", "0.49781138", "0.49781138", "0.49776158", "0.4972139", "0.49712166", "0.49671486", "0.4966125", "0.49638018", "0.49491557", "0.49465424", "0.49441737", "0.49385235", "0.4938187", "0.49345717" ]
0.59882593
5
if (dbH.getBookingTypeIDbyName(createBookingType.getSelectionModel().getSelectedItem().toString()) == 3)
public void insertBooking(){ Validator v = new Validator(); if (createBookingType.getValue() == null) { Dialogs.create() .owner(prevStage) .title("Error!") .masthead(null) .message("Set Booking Type!") .showInformation(); return; } if (createBookingType.getValue().toString().equals("Repair")) Dialogs.create() .owner(prevStage) .title("Error!") .masthead(null) .message("Go to Diagnosis and Repair tab for creating Repair Bookings!") .showInformation(); if(v.checkBookingDate(parseToDate(createBookingDate.getValue(),createBookingTimeStart.localTimeProperty().getValue()), parseToDate(createBookingDate.getValue(),createBookingTimeEnd.localTimeProperty().getValue())) && customerSet) { int mID = GLOBAL.getMechanicID(); try { mID = Integer.parseInt(createBookingMechanic.getSelectionModel().getSelectedItem().toString().substring(0,1)); } catch (Exception ex) { Dialogs.create() .owner(prevStage) .title("Error!") .masthead(null) .message("Set Mechanic!") .showInformation(); return; } if (mID != GLOBAL.getMechanicID()) if (!getAuth(mID)) return; createBookingClass(); dbH.insertBooking(booking); booking.setID(dbH.getLastBookingID()); appointment = createAppointment(booking); closeWindow(); } else { String extra = ""; if (!customerSet) extra = " Customer and/or Vehicle is not set!"; Dialogs.create() .owner(prevStage) .title("Error!") .masthead(null) .message("Errors with booking:"+v.getError()+extra) .showInformation(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void jTextField1KeyReleased(java.awt.event.KeyEvent evt) {\n try{\n String selection=(String)jComboBox3.getSelectedItem();\n String sql=\"select * from book where \"+selection+\"=?\";\n pst=(OraclePreparedStatement) conn.prepareStatement(sql);\n pst.setString(1,jTextField1.getText());\n rs=(OracleResultSet) pst.executeQuery();\n jTable3.setModel(DbUtils.resultSetToTableModel(rs));\n }catch(Exception e)\n {\n JOptionPane.showMessageDialog(null,e);\n }\n \n }", "BookDO selectByPrimaryKey(String bookIsbn);", "private boolean verifica(){\n if(et_nomeAddFamiliar.getText().length()>3 && spinnerParentesco.getSelectedItemPosition()>0){\n return true;\n }\n else return false;\n\n }", "@FXML\n private void selectedBtnEdit(ActionEvent event){\n try {\n query=\"SELECT * FROM category WHERE category_id = '\"+ txtCategoryNo.getText() +\"'\";\n rset = connection.prepareStatement(query).executeQuery();\n isNewRecord = !rset.next(); //set a flag to the record retrieved as existing record and used to determine if an SQL for insert or update should be done\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n TextFieldEditableProperty(true,1.00);\n }", "SellType selectByPrimaryKey(Integer sell_type_id);", "@Override\r\npublic int selectByPrimaryKey(Integer possalesdetailid) {\n\t\r\n\tPossalesdetail p= possalesdetail.selectByPrimaryKey(possalesdetailid);\r\n if(p.getPossalesdetailid()>0){\r\n \t\r\n \treturn 1;\r\n } else{\r\n\t return 0;\r\n }\r\n}", "private void ComboUserActionPerformed(java.awt.event.ActionEvent evt) {\n if(ComboUser.getSelectedItem().equals(\"title\")){\n \n selected=1;\n }\n else if(ComboUser.getSelectedItem().equals(\"author\"))\n {\n selected=2;\n }\n else if(ComboUser.getSelectedItem().equals(\"subject\"))\n {\n selected=3;\n }\n }", "public abstract String getSelectedPhoneType2();", "public abstract String getSelectedPhoneType1();", "public abstract String getSelectedPhoneType3();", "Book selectByPrimaryKey(String bid);", "public String extraerCombo(){\n String consulta=null,combo;\n \n combo=comboBuscar.getSelectedItem().toString();\n \n if(combo.equals(\"Buscar por No.Control:\")){\n consulta=\"noControl\";\n } \n if(combo.equals(\"Buscar por Nombre:\")){\n consulta=\"nombreCompleto\"; \n }\n if(combo.equals(\"Buscar por Carrera:\")){\n consulta=\"nombreCarrera\";\n }\n return consulta;\n }", "HotelType selectByPrimaryKey(Integer typeiId);", "public void actionPerformed(ActionEvent e){\n boolean sentinel = false;\n try{\n if(listOfEBooks.getSelectedItem() == null) {\n new errorWindow(\"No E-Book was selected\");\n return;\n }\n\n if(nameField.getText().equals(\"\")) {\n new errorWindow(\"Enter a name for the E-Book!\");\n sentinel = true;\n }\n if(classForField.getText().equals(\"\")){\n new errorWindow(\"Enter the name of the class for the E-Book\");\n sentinel = true;\n }\n if(redemptionCodeField.getText().equals(\"\")){\n new errorWindow(\"Enter the redemption code of the E-Book\");\n sentinel = true;\n }\n\n if(sentinel == true){\n return;\n }\n else {\n //Updates the E-Book when it is set to have no owner.\n if(redemptionStatusComboBox.getSelectedItem().equals(\"false\")){\n EBook temp = (EBook)listOfEBooks.getSelectedItem();\n books.remove(temp);\n redemptionCodes.remove(temp.getRedemptionCode()+\",\");\n temp.setBookName(nameField.getText());\n temp.setClassFor(classForField.getText());\n temp.setRedemptionCode(redemptionCodeField.getText());\n temp.setRedemptionStatus(Boolean.parseBoolean(redemptionStatusComboBox.getSelectedItem().toString()));\n books.put(temp);\n redemptionCodes.put(redemptionCodeField.getText()+\",\");\n DefaultTableModel table = (DefaultTableModel)database.getModel();\n table.setValueAt(nameField.getText(), inputedEBook.getRowLocation() - numberOfRowsRemoved, 0);\n table.setValueAt(classForField.getText(), inputedEBook.getRowLocation() - numberOfRowsRemoved, 1);\n table.setValueAt(redemptionCodeField.getText(), inputedEBook.getRowLocation() - numberOfRowsRemoved, 2);\n table.setValueAt(redemptionStatusComboBox.getSelectedItem(), inputedEBook.getRowLocation() - numberOfRowsRemoved, 3);\n dispose();\n }\n else {\n //Checks to see if the inputed changes are appropiate.\n EBook temp = (EBook)listOfEBooks.getSelectedItem();\n books.remove(temp);\n if(studentNameField.getText().equals(\"\")){\n new errorWindow(\"Insert a name\");\n sentinel = true;\n }\n if(gradeLevelField.getText().equals(\"\")){\n new errorWindow(\"Insert a grade level\");\n sentinel = true;\n }\n \n try{\n int gradeLevel = Integer.parseInt(gradeLevelField.getText().trim());\n if(Integer.parseInt(gradeLevelField.getText().trim()) < 1 || Integer.parseInt(gradeLevelField.getText().trim()) > 12){\n new errorWindow(\"Grade Level should be between 1 and 12th\");\n sentinel = true;\n }\n }catch(NumberFormatException nfe){\n new errorWindow(\"Grade Level must be a number\");\n }\n\n \n if(sentinel == true){\n return;\n }\n //Updates the E-Book for an E-Book that has no owner.\n if(temp.getRedemptionStatus() == false){\n redemptionCodes.remove(temp.getRedemptionCode()+\",\");\n unredeemedEBooks.remove(temp);\n temp.setBookName(nameField.getText());\n temp.setClassFor(classForField.getText());\n temp.setRedemptionCode(redemptionCodeField.getText());\n temp.setRedemptionStatus(Boolean.parseBoolean(redemptionStatusComboBox.getSelectedItem().toString()));\n temp.setOwner(new Student(studentNameField.getText(), Integer.parseInt(gradeLevelField.getText())));\n books.put(temp);\n redemptionCodes.put(redemptionCodeField.getText()+\",\");\n DefaultTableModel table = (DefaultTableModel)database.getModel();\n table.setValueAt(nameField.getText(), inputedEBook.getRowLocation() - numberOfRowsRemoved, 0);\n table.setValueAt(classForField.getText(), inputedEBook.getRowLocation() - numberOfRowsRemoved, 1);\n table.setValueAt(redemptionCodeField.getText(), inputedEBook.getRowLocation() - numberOfRowsRemoved, 2);\n table.setValueAt(redemptionStatusComboBox.getSelectedItem(), inputedEBook.getRowLocation() - numberOfRowsRemoved, 3);\n table.setValueAt(studentNameField.getText(), inputedEBook.getRowLocation() - numberOfRowsRemoved, 4);\n table.setValueAt(gradeLevelField.getText(), inputedEBook.getRowLocation() - numberOfRowsRemoved, 5);\n dispose();\n }\n //Updates the E-Book if the E-Book already has an owner.\n else {\n redemptionCodes.remove(temp.getRedemptionCode()+\",\");\n temp.setBookName(nameField.getText());\n temp.setClassFor(classForField.getText());\n temp.setRedemptionCode(redemptionCodeField.getText());\n temp.setRedemptionStatus(Boolean.parseBoolean(redemptionStatusComboBox.getSelectedItem().toString()));\n temp.setRedemptionStatus(Boolean.parseBoolean(redemptionStatusComboBox.getSelectedItem().toString()));\n temp.setOwner(new Student(studentNameField.getText(), Integer.parseInt(gradeLevelField.getText())));\n books.put(temp);\n redemptionCodes.put(redemptionCodeField.getText()+\",\");\n DefaultTableModel table = (DefaultTableModel)database.getModel();\n table.setValueAt(nameField.getText(), inputedEBook.getRowLocation() - numberOfRowsRemoved, 0);\n table.setValueAt(classForField.getText(), inputedEBook.getRowLocation() - numberOfRowsRemoved, 1);\n table.setValueAt(redemptionCodeField.getText(), inputedEBook.getRowLocation() - numberOfRowsRemoved, 2);\n table.setValueAt(redemptionStatusComboBox.getSelectedItem(), inputedEBook.getRowLocation() - numberOfRowsRemoved, 3);\n table.setValueAt(studentNameField.getText(), inputedEBook.getRowLocation() - numberOfRowsRemoved, 4);\n table.setValueAt(gradeLevelField.getText(), inputedEBook.getRowLocation() - numberOfRowsRemoved, 5);\n dispose();\n }\n }\n }\n }catch(IOException ex){\n ex.printStackTrace();\n }\n }", "boolean hasInBookNo();", "public String getBookType() {\n return bookType;\n }", "private Book createBook() {\n Book book = null;\n\n try {\n\n //determine if fiction or non-fiction\n if (radFiction.isSelected()) {\n //fiction book\n book = new Fiction(Integer.parseInt(tfBookID.getText()));\n\n } else if (radNonFiction.isSelected()) {\n //non-fiction book\n book = new NonFiction(Integer.parseInt(tfBookID.getText()));\n\n } else {\n driver.errorMessageNormal(\"Please selecte fiction or non-fiction.\");\n }\n } catch (NumberFormatException nfe) {\n driver.errorMessageNormal(\"Please enter numbers only the Borrower ID and Book ID fields.\");\n }\n return book;\n }", "String searchBoxUserRecordSelected();", "public void selectNewBook(MouseEvent e)\n\t{\n\t\tBookApp.currentBook = otherAppearances.getSelectionModel().getSelectedItem();\n\t\tcurrentBookDisplay.getItems().clear();\n\t\tcurrentBookDisplay.getItems().add(BookApp.currentBook);\n\t\tcharactersNameList.getItems().clear();\n\t\tfor(Character character : (MyLinkedList<Character>) BookApp.currentBook.getCharacterList()){\n\t\t\tcharactersNameList.getItems().add(character);\n\t\t\tcharactersNameList.getSelectionModel().getSelectedIndex();\n\t\t}\n\t\totherAppearances.getItems().clear();\n\t\tfor(int i = 0; i< BookApp.unsortedBookTable.hashTable.length; i++) {\t\t\n\t\t\tfor(Book eachBook : (MyLinkedList<Book>) BookApp.unsortedBookTable.hashTable[i]) {\n\t\t\t\tfor(Character eachCharacterInTotalList : (MyLinkedList<Character>) eachBook.getCharacterList())\n\t\t\t\t{\n\t\t\t\t\tif(eachCharacterInTotalList.equals(BookApp.currentCharacter) && eachBook.equals(BookApp.currentBook))\n\t\t\t\t\t{\n\t\t\t\t\t\totherAppearances.getItems().add(eachBook);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t}", "BookInfo selectByPrimaryKey(Integer id);", "private void bookRadioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bookRadioActionPerformed\n itemList.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Select a Book\", \"Texas Homeowners Association Law\", \"Harry Potter and the Sorcerer's Stone\", \"Eldest\" }));\n }", "public boolean findType(BikeType type){ //Checks if the same name and rental price is registered - true if it's found\n try(Connection con = DatabaseConnector.getConnection();\n PreparedStatement ps = con.prepareStatement(FIND_TYPE)){\n \n ps.setString(1, type.getTypeName());\n ps.setDouble(2, type.getRentalPrice());\n ResultSet rs = ps.executeQuery();\n if(rs.isBeforeFirst()){\n return true;\n }\n }catch(Exception e){\n System.out.println(\"Exception: \" + e);\n }\n return false;\n }", "public boolean matchesSelectionType(int type) {\n\t\tif (type == DBRecord.SELECTED && selected)\n\t\t\treturn true;\n\t\telse if (type == DBRecord.UNSELECTED && !selected)\n\t\t\treturn true;\n\t\telse if (type == DBRecord.SELECTED_OR_NOT)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "CmsRoomBook selectByPrimaryKey(String bookId);", "@Override\n public void onClick(View view) {\n\n if (material_type.getSelectedItem().equals(\"--Select Material Type--\")) {\n Toast.makeText(Activity_Sell.this, \"Select Material Type to continue\", Toast.LENGTH_SHORT).show();\n } else {\n\n// LoadMaterialTypeSpinner();\n alertDialog.dismiss();\n getMaterial();\n /* getMaterialClasses();\n getMaterialDetails();\n getMaterialUnits();*/\n\n }\n }", "Book selectByPrimaryKey(String id);", "private int pickIdNumber(String type) {\n\t\tint xGetNum = -1;\n\t\ttry {\n\t\t\tSystem.out.println(\"\\nEnter the number 0 if the \" + type + \" is NOT on the list. \");\n\t\t\tSystem.out.print(\"Enter the \" + type + \"'s ID# : \");\n\t\t\txGetNum = Integer.parseInt(scanner.nextLine());\n\t\t\t//return xGetNum;\n\t\t\t}\n\t\t\tcatch(NumberFormatException e) {\n\t\t\t\tSystem.out.println(\"\\n\\t*****\\tSelection must be a number\\t*****\");\n\t\t\t}\t\t\n\t\treturn xGetNum;\t\t\n\t}", "private void getBookName(){\n db = DatabaseHelper.getInstance(this).getWritableDatabase();\n cursor = db.rawQuery(\"SELECT Name FROM Book WHERE _id = \"+bookIDSelected+\";\", null);\n startManagingCursor(cursor);\n String bookNameSelected = \"Failed to load Book Name\";\n while(cursor.moveToNext()){\n bookNameSelected = cursor.getString(0);\n }\n\n TextView txtBookTitle = findViewById(R.id.rvTxtName);\n txtBookTitle.setText(String.valueOf(bookNameSelected));\n }", "cb.Careerbuilder.Company.PhoneType getType();", "private void selectedRowInvoice(){\r\n //numOrdenInv = tb_factura.getSelectionModel().getSelectedIndex();\r\n }", "public abstract String getSelectedAddressType();", "private void chegada() {\n Pessoa pessoa = tablePessoa.getSelectionModel().getSelectedItem();\n if(pessoa==null){\n pessoa=tablePessoa.getItems().get(0);\n \n }\n// if(pessoa!=null){\n Chegada chegada = new Chegada(\n pessoa.getRg(),\n pessoa.getNome(),\n pessoa.getSegundoNome(),\n pessoa.getTelefone(),\n pessoa.getSexo(),\n HoraChegada,\n pessoa.getData()\n \n );\n \n// }\n mainApp.getPersonData2().add(chegada);\n \n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n recipeType = (String) recipeAdapter.getRecipeType(position);\n\n }", "@FXML\n\t private void loadbookinfo(ActionEvent event) {\n\t \tclearbookcache();\n\t \t\n\t \tString id = bookidinput.getText();\n\t \tString qu = \"SELECT * FROM BOOK_LMS WHERE id = '\" + id + \"'\";\n\t ResultSet rs = dbhandler.execQuery(qu);\n\t Boolean flag = false;\n\t \n\t try {\n while (rs.next()) {\n String bName = rs.getString(\"title\");\n String bAuthor = rs.getString(\"author\");\n Boolean bStatus = rs.getBoolean(\"isAvail\");\n\n Bookname.setText(bName);\n Bookauthor.setText(bAuthor);\n String status = (bStatus) ? \"Available\" : \"Not Available\";\n bookstatus.setText(status);\n\n flag = true;\n }\n\n if (!flag) {\n Bookname.setText(\"No Such Book Available\");\n }\n\n } catch (SQLException ex) {\n Logger.getLogger(MainController.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private void cbo_iniNameItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbo_iniNameItemStateChanged\n if(listLoaded) {\n String sql = \"select * from item where iName=?\";\n \n try {\n pst = conn.prepareStatement(sql);\n pst.setString(1,cbo_iniName.getSelectedItem().toString());\n rs = pst.executeQuery();\n rs.next(); //Move resultset to the first pointer\n\n txt_iniId.setText(rs.getString(1));\n\n }catch(Exception e) {\n JOptionPane.showMessageDialog(null,\"Item details cannot be found\");\n }finally {\n try{\n rs.close();\n pst.close();\n }catch(Exception e) {}\n }\n }\n }", "public boolean findType(int typeId){ //Checks if the typeId is registered - true if it's found\n try(Connection con = DatabaseConnector.getConnection();\n PreparedStatement ps = con.prepareStatement(TYPE_BY_ID + typeId);\n ResultSet rs = ps.executeQuery()){\n \n if(rs.isBeforeFirst()){ //If the resultset has data\n return true;\n }\n }catch(Exception e){\n System.out.println(\"Exception: \" + e);\n } \n return false;\n }", "private void courseDoctor() {\n conn=ConnectionDataBase.connect();\n try {\n String name=Login.user;\n ps=conn.prepareStatement(\"select * from course where nameDoctor ='\"+name+\"'\");\n rst=ps.executeQuery();\n while(rst.next())\n {\n chooseCourse.addItem(rst.getString(\"nameC\"));\n }\n chooseCourse.setSelectedIndex(-1);\n \n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, ex.getMessage());\n }finally{\n try {\n conn.close();\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, ex.getMessage());\n }\n }\n }", "public void bookItin(View view){\n try{\n // Get index of itinerary from tis user\n EditText numberEdit = (EditText) findViewById(R.id.numberEdit);\n int index = Integer.parseInt(numberEdit.getText().toString());\n Client thisClient = system.getClient(userInfo[0]);\n Itinerary itin = selectionItinerary.get(index);\n // Store this users booked itinerary\n thisClient.bookItin(itin);\n system.addClient(thisClient);\n bookedItins.add(itin);\n TextView displayText = (TextView) findViewById(R.id.displayText);\n displayText.setText(\"This Itinerary booked successfully: \" + itin.toString());\n }catch (Exception e){\n // Let user know if itinerary cannot be stored\n TextView displayText = (TextView) findViewById(R.id.displayText);\n displayText.setText(\"No such itinerary found. Please choose\\n\" +\n \"number from search list displayed\");\n Button button = (Button) findViewById(R.id.bookButton);\n button.setEnabled(false);\n EditText numberEdit = (EditText) findViewById(R.id.numberEdit);\n numberEdit.setText(\"\");\n }\n }", "int leerCodigoIngreso(){\n\t\treturn Integer.parseInt(cboCodigoIngreso.getSelectedItem().toString());\n\t}", "private void getUserTypeChoice() {\n mTypeInput = \"(\";\n if (mBinding.chipApartment.isChecked()) {\n if (!mTypeInput.equals(\"(\"))\n mTypeInput += \", \";\n mTypeInput = mTypeInput + \"'Apartment'\";\n }\n if (mBinding.chipLoft.isChecked()) {\n if (!mTypeInput.equals(\"(\"))\n mTypeInput += \", \";\n mTypeInput += \"'Loft'\";\n }\n if (mBinding.chipHouse.isChecked()) {\n if (!mTypeInput.equals(\"(\"))\n mTypeInput += \", \";\n mTypeInput += \"'House'\";\n }\n if (mBinding.chipVilla.isChecked()) {\n if (!mTypeInput.equals(\"(\"))\n mTypeInput += \", \";\n mTypeInput += \"'Villa'\";\n }\n if (mBinding.chipManor.isChecked()) {\n if (!mTypeInput.equals(\"(\"))\n mTypeInput += \", \";\n mTypeInput += \"'Manor'\";\n }\n mTypeInput += \")\";\n }", "private void userHasBooking() throws SQLException {\n BookingModel bookingModel2 = new BookingModel();\n if (bookingModel2.checkUserBooking(employeeID)) {\n hasBooking = true;\n } else {\n hasBooking = false;\n }\n\n }", "public int editType(BikeType type){\n final int EDITED = 0;\n final int NOT_EDITED = 1;\n final int NOT_FOUND = 2;\n if(!findType(type.getTypeId())){ //No matching type_id registered\n return NOT_FOUND;\n }else{ \n \n try(Connection con = DatabaseConnector.getConnection();\n PreparedStatement ps = con.prepareStatement(UPDATE)){\n \n ps.setString(1, type.getTypeName());\n ps.setDouble(2, type.getRentalPrice());\n ps.setInt(3, type.getTypeId());\n ps.executeUpdate();\n return EDITED;\n }catch(Exception e){\n System.out.println(\"Exception: \" + e);\n }\n }\n return NOT_EDITED;\n }", "public void onSelectionCreate(ActionEvent event) throws SQLException {\n //TODO think about creating league model class to get id easily\n if(chooseAgeGroupCreate.getValue() != null && chooseCityBoxCreate.getValue() != null){\n chooseLeagueBoxCreate.setDisable(false);\n chooseLeagueTeamBoxCreate.getItems().clear();\n chooseLeagueBoxCreate.getItems().clear();\n ObservableList<String> leagueList = DatabaseManager.getLeagues(user, chooseCityBoxCreate.getValue().toString(), chooseAgeGroupCreate.getValue());\n chooseLeagueBoxCreate.getSelectionModel().clearSelection();\n chooseLeagueBoxCreate .setButtonCell(new ListCell<String>() {\n @Override\n protected void updateItem(String item, boolean empty) {\n super.updateItem(item, empty) ;\n if (empty || item == null) {\n setText(\"Choose League\");\n } else {\n setText(item);\n }\n }\n });\n if(leagueList.size() != 0){\n chooseLeagueBoxCreate.getItems().addAll(leagueList);\n }\n }\n }", "@Override\n public void onNothingSelected(AdapterView<?> parent) {\n mSupplier = BookEntry.SUPPLIER_UNKNOWN;\n }", "QtActivitytype selectByPrimaryKey(Integer id);", "int insertSelective(CmsRoomBook record);", "boolean hasHadithBookNo();", "HasSelectionHandlers<ManageUsersSearchModel.Result> getSelectIdForEditTool();", "@Override\n public void onItemSelected(AdapterView<?> parent, View view,\n int position, long id) {\n\n\n try{\n String s = \"\";\n Log.e(\"mytag\",\"(String) parent.getItemAtPosition(position):\"+(String) parent.getItemAtPosition(position).toString().trim());\n if (parent.getItemAtPosition(position).toString().trim().equals(\"בחר\")){\n s = \"-1\";\n }else{\n s = String.valueOf(ctype_map.get(parent.getItemAtPosition(position).toString().trim()).getCtypeID());\n }\n setCcustomerSpinner(s);\n }catch(Exception e){\n helper.LogPrintExStackTrace(e);\n }\n Log.e(\"mytag\", (String) parent.getItemAtPosition(position));\n //statusID = db.getCallStatusByCallStatusName((String) parent.getItemAtPosition(position)).getCallStatusID();\n //statusName = db.getCallStatusByCallStatusName((String) parent.getItemAtPosition(position)).getCallStatusName();\n //Toast.makeText(getApplication(), \"status: \" + s, Toast.LENGTH_LONG).show();\n //Log.v(\"item\", (String) parent.getItemAtPosition(position));\n }", "@Override\n public boolean test() {\n return parentName.equals(themesComboBox.target().getSelectedItem().toString());\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.edit_or_add_book);\n appData.setCurrentSection(2);\n int positionCount=0;\n String mGenrePosition =\"\";\n mRealm = Realm.getDefaultInstance();\n\n if(!appData.getCurrentBookId().isEmpty()){\n mBookInfo = mRealm.where(BookInfo.class).equalTo(\"mBookId\",\n appData.getCurrentBookId()).findFirst();\n ((EditText)findViewById(R.id.bookTitle)).setText(mBookInfo.getBookTitle(),\n TextView.BufferType.EDITABLE);\n ((EditText)findViewById(R.id.bookAuthor)).setText(mBookInfo.getAuthorsNames(),\n TextView.BufferType.EDITABLE);\n mGenrePosition = mBookInfo.getGenre();\n }\n\n Spinner mSpinner;\n mSpinner = (Spinner) findViewById(R.id.bookGenre);\n ArrayAdapter<String> mAdapter;\n ArrayList<String> mHelpArray = new ArrayList<>();\n\n mSelectedGenre = new HashMap<>();\n mCurrentTypes = new ArrayList<>();\n mCurrentTypes.add(new HashMap<String, String>());\n mCurrentTypes.get(0).put(\"position\", \"0\");\n mCurrentTypes.get(0).put(\"genre\",\"choose sub-category\");\n mHelpArray.add(\"̶ choose sub-category ̶\");\n for (Map.Entry<String, String> entry : Constants.genreMap.entrySet()) {\n mCurrentTypes.add(new HashMap<String, String>());\n int count = mCurrentTypes.size() - 1;\n mCurrentTypes.get(count).put(\"position\", entry.getKey());\n if(!mGenrePosition.isEmpty()){\n if(mCurrentTypes.get(count).get(\"position\").equals(mGenrePosition)){\n positionCount =count;\n }\n }\n mCurrentTypes.get(count).put(\"genre\",entry.getValue());\n\n mHelpArray.add(entry.getValue());\n\n }\n\n mAdapter = new ArrayAdapter<>(this,\n R.layout.spinner_text, mHelpArray);\n mAdapter.setDropDownViewResource(R.layout.spinner_inner_text);\n mSpinner.setAdapter(mAdapter);\n\n if(!mGenrePosition.isEmpty()){\n mSpinner.setSelection(positionCount);\n mSelectedGenre = new HashMap<>();\n mSelectedGenre.put(\"position\",mCurrentTypes.get(positionCount).get(\"position\"));\n mSelectedGenre.put(\"genre\", mCurrentTypes.get(positionCount).get(\"genre\"));\n }else {\n mSpinner.setSelection(0, false);\n }\n mSpinner.setOnItemSelectedListener(new Spinner.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id)\n {\n\n mSelectedGenre = new HashMap<>();\n mSelectedGenre.put(\"position\",mCurrentTypes.get(position).get(\"position\"));\n mSelectedGenre.put(\"genre\", mCurrentTypes.get(position).get(\"genre\"));\n\n }\n public void onNothingSelected(AdapterView<?> parent)\n {\n\n mSelectedGenre = new HashMap<>();\n mSelectedGenre.put(\"position\",mCurrentTypes.get(0).get(\"position\"));\n mSelectedGenre.put(\"genre\", mCurrentTypes.get(0).get(\"genre\"));\n }\n });\n\n }", "private void selectBook(Book book){\n\t\tthis.book = book;\n\t\tshowView(\"ModifyBookView\");\n\t\tif(book.isInactive()){\n\t\t\tstateChangeRequest(Key.MESSAGE, new MessageEvent(MessageType.INFO, \"Heads Up! This book is archived. It must be recovered before it can be modified.\"));\n\t\t}else if(book.isLost()){\n\t\t\tstateChangeRequest(Key.MESSAGE, new MessageEvent(MessageType.INFO, \"Heads Up! This book is lost. It must be recovered before it can be modified.\"));\n\t\t}\n\t}", "W_WORKING_TYPES selectByPrimaryKey(Integer id);", "public void carregaCidadeSelecionada(String nome) throws SQLException{\n String sql = \"SELECT nome FROM tb_cidades where uf='\"+cbUfEditar.getSelectedItem()+\"'\"; \n PreparedStatement preparador = Conexao.conectar().prepareStatement(sql);\n ResultSet rs = preparador.executeQuery();\n //passando valores do banco para o objeto result; \n \n try{ \n while(rs.next()){ \n \n String list = rs.getString(\"nome\"); //resgatando estado \n \n //popula combo_estadof com as informações colhidas \n cbCidadeEditar.addItem(list);\n \n \n \n \n } \n } catch (Exception e){ \n JOptionPane.showMessageDialog(null, \"Impossivel carregar Estados!\", \n \"ERROR - \", JOptionPane.ERROR_MESSAGE); \n } \n cbCidadeEditar.setSelectedItem(nome);\n \n \n \n \n }", "public void establishSelectedBook(final long id) {\r\n selectedBook = dataManager.selectBook(id);\r\n }", "public void actionPerformed(ActionEvent e) {\r\n JTextField ownerTf;\r\n String mes;\r\n\r\n String record[] = getRecordOnPan();\r\n\r\n try {\r\n int match[] = data.find(record);\r\n \r\n if (match.length > 1) {\r\n updateStatus(\"More than one match record.\");\r\n return;\r\n } else if (match.length == 0) {\r\n updateStatus(\"Record not found.\");\r\n return;\r\n }\r\n \r\n ownerTf = new JTextField();\r\n ownerTf.setText(record[5]);\r\n mes = \"Enter customer id\";\r\n \r\n int result = JOptionPane.showOptionDialog(\r\n frame, new Object[] {mes, ownerTf},\r\n \"Booking\", JOptionPane.OK_CANCEL_OPTION,\r\n JOptionPane.PLAIN_MESSAGE,\r\n null, null, null);\r\n\r\n if (result == JOptionPane.OK_OPTION) {\r\n record[5] = ownerTf.getText();\r\n bc.handleUpdateGesture(match[0], record);\r\n updateStatus(\"Subcontractor booked.\");\r\n }\r\n } catch (Exception ex) {\r\n updateStatus(ex.getMessage());\r\n }\r\n }", "public void isiPilihanDokter() {\n String[] list = new String[]{\"\"};\n pilihNamaDokter.setModel(new javax.swing.DefaultComboBoxModel(list));\n\n /*Mengambil data pilihan spesialis*/\n String nama = (String) pilihPoliTujuan.getSelectedItem();\n String kodeSpesialis = ss.serviceGetIDSpesialis(nama);\n\n /* Mencari dokter where id_spesialis = pilihSpesialis */\n tmd.setData(ds.serviceGetAllDokterByIdSpesialis(kodeSpesialis));\n int b = tmd.getRowCount();\n\n /* Menampilkan semua nama berdasrkan pilihan sebelumnya */\n pilihNamaDokter.setModel(new javax.swing.DefaultComboBoxModel(ds.serviceTampilNamaDokter(kodeSpesialis, b)));\n }", "public String button1_action() {\n getSessionBean1().setSelected_algos(listbox1.getValueAsStringArray(this.getContext()));\n getSessionBean1().setSelected_tiers(listbox2.getValueAsStringArray(this.getContext()));\n getSessionBean1().setSelected_runs(listbox3.getValueAsStringArray(this.getContext()));\n getSessionBean1().setSelected_storageelems(listbox4.getValueAsStringArray(this.getContext()));\n //getSessionBean1().setSelected_branches(listbox5.getValueAsStringArray(this.getContext()));\n \n //String selected_primary = (String)dropDown1.getSelected().toString();\n //log(\"Selected Primary is\"+selected_primary);\n \n if ( dropDown1.getSelected() != null ||\n getSessionBean1().getSelected_algos().length !=0 || \n getSessionBean1().getSelected_tiers().length !=0 ||\n getSessionBean1().getSelected_runs().length != 0 ||\n getSessionBean1().getSelected_storageelems().length !=0 \n //getSessionBean1().getSelected_branches().length !=0\n ) {\n getSessionBean1().setItems_selected(\"1\");\n }\n return null;\n }", "boolean hasArtilleryFactorySelected();", "public void doButtonEinfuegen() {\n\t\tDialogSelectionDjinn dsd = new DialogSelectionDjinn((Frame) this.owner, \"Auswahl Tabellenspalte\",\n\t\t\t\tnew DefaultListViewComponentFactory((allts ? this.tabelle.getDiagramm().getFieldCache()\n\t\t\t\t\t\t: new Vector<Object>(Arrays.asList(this.tabelle.getColumns())))));\n\t\tif (dsd.isSelected()) {\n\t\t\tVector v = dsd.getSelection();\n\t\t\tVector values = new Vector();\n\t\t\tfor (int i = 0, len = v.size(); i < len; i++) {\n\t\t\t\tif (this.getType() == 0) {\n\t\t\t\t\tvalues.addElement(v.elementAt(i));\n\t\t\t\t} else if ((this.getType() == 1) || (this.getType() == 2)) {\n\t\t\t\t\tvalues.addElement(new ToStringContainer((TabellenspaltenModel) v.elementAt(i), this.tabelle));\n\t\t\t\t} else if (this.getType() == 3) {\n\t\t\t\t\tvalues.addElement(Archimedes.Factory.createOrderMember((TabellenspaltenModel) v.elementAt(i)));\n\t\t\t\t} else if (this.getType() == 4) {\n\t\t\t\t\tvalues.addElement(Archimedes.Factory.createSelectionMember((TabellenspaltenModel) v.elementAt(i)));\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (int i = 0, len = values.size(); i < len; i++) {\n\t\t\t\tboolean found = false;\n\t\t\t\tfor (int j = 0, lenj = this.tabellenspalten.size(); j < lenj; j++) {\n\t\t\t\t\tif (this.getType() == 0) {\n\t\t\t\t\t\tTabellenspaltenModel tsm = (TabellenspaltenModel) this.tabellenspalten.get(j);\n\t\t\t\t\t\tif (values.elementAt(i) == tsm) {\n\t\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if ((this.getType() == 1) || (this.getType() == 2)) {\n\t\t\t\t\t\tToStringContainer tsc = (ToStringContainer) this.tabellenspalten.get(j);\n\t\t\t\t\t\tif (((ToStringContainer) values.elementAt(i)).getTabellenspalte() == tsc) {\n\t\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (this.getType() == 3) {\n\t\t\t\t\t\tOrderMemberModel omm = (OrderMemberModel) this.tabellenspalten.get(j);\n\t\t\t\t\t\tif (((OrderMemberModel) values.elementAt(i)).getOrderColumn() == omm) {\n\t\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (this.getType() == 4) {\n\t\t\t\t\t\tSelectionMemberModel smm = (SelectionMemberModel) this.tabellenspalten.get(j);\n\t\t\t\t\t\tif (((SelectionMemberModel) values.elementAt(i)).getColumn() == smm) {\n\t\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!found) {\n\t\t\t\t\tif (this.anzeige.getSelectedRow() >= 0) {\n\t\t\t\t\t\tthis.tabellenspalten.add(this.anzeige.getSelectedRow(), values.get(i));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.tabellenspalten.add(values.get(i));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.doRepaint();\n\t\t}\n\t}", "@Override\n public void onClick(View v) {\n boolean isFromMain = true;\n\n for (Book book:DatabaseOP.getInstance().selectALLBook()){\n if (!mBook.getISBN().equals(book.getISBN())){\n isFromMain = false;\n }\n }\n if (isFromMain){\n DatabaseOP.getInstance().updateAllBook(mBook);\n MainActivity.bookList = DatabaseOP.getInstance().selectALLBook();\n adapter.setmBookList(MainActivity.bookList);\n adapter.notifyDataSetChanged();\n }else {\n getView(mBook);\n MainActivity.addbook.set(index,mBook);\n adapter.setmBookList(MainActivity.bookList);\n adapter.notifyDataSetChanged();\n }\n finish();/////add\n }", "public void onClick(View v) {\n showSchedule(v);\n league_selected = leagues_sp.getSelectedItemPosition();\n Log.d(\"MainActivity\", \"Selected league is \" +league_selected);\n team_selected = teams_sp.getSelectedItem().toString();\n Log.d(\"MainActivity\", \"Selected team is \" +team_selected);\n }", "private void saveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_saveActionPerformed\n String pln = priceListName.getText();\n if(pln.equals(\"\")){\n JOptionPane.showMessageDialog(this,\"Bitte w\\u00e4hlen sie einen korrekten Namen\");\n return;\n }\n EntityManager em = DBConnection.getEntityManager();\n EntityTransaction et = em.getTransaction();\n PriceList spl;\n try {\n spl = em.createQuery(\"select p from PriceList p where name like '\"+superPriceList.getText()+\"'\",PriceList.class).getSingleResult();\n }catch (NoResultException ignored){\n spl=null;\n }\n PriceList pl = new PriceList();\n pl.setSuperPriceList(spl);\n pl.setName(pln);\n et.begin();\n em.persist(pl);\n em.flush();\n et.commit();\n em.close();\n priceListChooser.setModel(new PriceListTree().getModel());\n }", "public int getBook_id() {\n\treturn book_id;\n}", "@Test\n public void seeingAttributesOfTheSelectedItemTest() {\n field = new Field();\n for (int i = 0; i < 1; i++) {\n for (int j = 0; j < 1; j++) {\n this.field.addCells(false, new Location(i, j));\n }\n }\n DarknessMagicBook dark = new DarknessMagicBook(\"HowToActColdAsSasuke\", 100, 1, 10);\n tactician1 = new Tactician(\"player1\", field, null);\n tactician1.setSelectedItem(dark);\n assertEquals(tactician1.getSelectedItem(),dark);\n assertEquals(tactician1.nameSelectedItem(), \"HowToActColdAsSasuke\");\n assertEquals(tactician1.powerSelectedItem(), 100);\n assertEquals(tactician1.minRangeSelectedItem(), 1);\n assertEquals(tactician1.maxRangeSelectedItem(), 10);\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n final String newBookName = bookEditText.getText().toString();\n final String newAuthorName = authorEditText.getText().toString();\n\n if(!newBookName.isEmpty()) {\n //start realm write transaction\n realm.executeTransactionAsync(new Realm.Transaction() {\n @Override\n public void execute(Realm realm) {\n //create a realm object\n Book newbook = realm.createObject(Book.class, UUID.randomUUID().toString());\n newbook.setBook_name(newBookName);\n newbook.setAuthor_name(newAuthorName);\n }\n });\n }\n }", "@FXML\r\n void PlacementSelect(MouseEvent event) {\r\n \t p=TablePlacement.getSelectionModel().getSelectedItem();\r\n \t\tSelectedPlacement.setText(p.toString());\r\n \t\tNote.setText(p.getNote());\r\n \t\t\r\n }", "@Override\n\t\t\tpublic void onClick(View view) {\n\t\t\t input = spinner1.getSelectedItem().toString();\n\t\t\t //As long as the length is greater > than 0 is entered .As long as nothing is not selected.\n\t\t\t if(input.length() > 0){\n\t\t\t \t//Check if item already exists\n\t\t\t if(!(list.indexOf(input)>-1))\n\t\t\t \tadapter2.add(input);\n\t\t\t }else{\n\t\t\t \tToast.makeText(getActivity(),\"Card has already been created!\", Toast.LENGTH_SHORT).show();\n\t\t\t \n\t\t\t }\n\t\t\t}", "public List<ErpBookInfo> selData();", "public boolean selectExisitingAccount(int choice, String bankAccount);", "public boolean isItemExist(String item)\n {\n boolean uExist = true;\n Connection conn = DatabaseConnection.getConnection();\n PreparedStatement pss;\n ResultSet rss;\n \n try {\n pss = conn.prepareStatement(\"SELECT * FROM items WHERE Item_number = ?\");\n \n pss.setString(1, jTextFieldNumber.getText());\n \n rss = pss.executeQuery();\n \n if(rss.next())\n {\n JOptionPane.showMessageDialog(null, \"Item Already Exists!\");\n return false;\n }\n else\n {\n return true;\n }\n \n } \n catch (SQLException ex) {\n Logger.getLogger(ItemQuery.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n finally\n {\n try {\n conn.close();\n } catch (SQLException ex) {\n Logger.getLogger(AddItem.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n \n return uExist;\n }", "private RoomType RoomTypeComboBoxValue()\r\n\t{\r\n\t\tRoomType o1 = (RoomType) rtComboBox.getSelectedItem();\r\n\t\treturn o1;\r\n\t}", "@Override\n public void onClick(View v) {\n String selectSpinner = objSpinner.getSelectedItem().toString();\n //Validamos la seleccion del spinner\n if (objSpinner.getSelectedItemPosition() != 0) {\n //Almacenamos la seleccion de RadioButton\n int selectRadio = objGroup.getCheckedRadioButtonId();\n int result = objConfigura.creaEntradaSalida(selectSpinner, selectRadio);\n if (result == 1) {\n Toast.makeText(objContext, \"Entrada guardada.\", Toast.LENGTH_SHORT).show();\n } else if (result == 2) {\n Toast.makeText(objContext, \"Salida guardada.\", Toast.LENGTH_SHORT).show();\n }\n objSpinner.setSelection(0);\n }else {\n Toast.makeText(objContext, \"Seleccione una clase de vehiculo.\", Toast.LENGTH_SHORT).show();\n }\n }", "private void btn_cadActionPerformed(java.awt.event.ActionEvent evt) {\n \n CDs_dao c = new CDs_dao();\n TabelaCDsBean p = new TabelaCDsBean();\n \n TabelaGeneroBean ge = (TabelaGeneroBean) g_box.getSelectedItem();\n TabelaArtistaBean au = (TabelaArtistaBean) g_box2.getSelectedItem();\n\n //p.setId(Integer.parseInt(id_txt.getText()));\n p.setTitulo(nm_txt.getText());\n p.setPreco(Double.parseDouble(vr_txt.getText()));\n p.setGenero(ge);\n p.setArtista(au);\n c.create(p);\n\n nm_txt.setText(\"\");\n //isqn_txt.setText(\"\");\n vr_txt.setText(\"\");\n cd_txt.setText(\"\");\n g_box.setSelectedIndex(0);\n g_box2.setSelectedIndex(0);\n \n }", "private void btnTakeBookActionPerformed(java.awt.event.ActionEvent evt) {\n DefaultTableModel model = (DefaultTableModel) tblStudentsBookList.getModel();\n lblTakeBookLimit.setText(new texts().takeBookLimit() + takeBookLimit + \" )\");\n if (model.getRowCount() < takeBookLimit) {\n String BookID = txtID.getText().trim();\n int bookID = Integer.parseInt(BookID);\n String bookName = txtBookName.getText().trim();\n String ISBN_NO = txtISBN_No.getText().trim();\n int ISBN_No = Integer.parseInt(ISBN_NO);\n String BookStatus = txtBookStatus.getText().trim();\n String StudentID = lblStudentID.getText().trim();\n int studentID = sNum.studentID;\n int bookGenreIndex = comboBxBookGenre.getSelectedIndex();\n if (bookGenreIndex <= 0) {\n JOptionPane.showMessageDialog(null, new texts().selectLine());\n return;\n }\n bookGenre bookGenre = bookGenreList.get(bookGenreIndex - 1);\n\n int authorIndex = comboBxAuthor.getSelectedIndex();\n if (authorIndex <= 0) {\n JOptionPane.showMessageDialog(null, new texts().selectLine());\n return;\n }\n DAL.author valueOfAuthor = authorList.get(authorIndex - 1);\n\n int publisherIndex = comboBxPublisher.getSelectedIndex();\n if (publisherIndex <= 0) {\n JOptionPane.showMessageDialog(null, new texts().selectLine());\n return;\n }\n DAL.publisher valueOfPublisher = publisherList.get(publisherIndex - 1);\n\n String takeDate = (bas.format(today));\n String with = new texts().withStudent();\n new servicesBooks().vtUpdateStudent(bookID, with);\n servicesStudentsBook book = new servicesStudentsBook();\n book.vtAdd(studentID, bookID, bookName, bookGenre.getBookGenreID(), valueOfAuthor.getAuthorID(), ISBN_No, BookStatus, valueOfPublisher.getPublisherID(), takeDate);\n new servicesStudentsBook().vtUpdateStudent(bookID, with);\n takeBookLimit -= 1;\n } else {\n lblTakeBookLimit.setText(\"alınabilir kitap limti dolduğu için kitap alamazsınız\");\n }\n List();\n Clean();\n }", "ExamRoom selectByPrimaryKey(Integer pkid);", "TCar selectByPrimaryKey(Integer fitemid);", "public void check_in(String type) {\n int index=searchRoom(type);\n if (index<=0)\n {\n System.out.println(\"There is no available \"+type+\" room!\");\n }else\n {\n int roomNo=roomlist.get(index).getRoomid();\n /*New object is created and this object`s availability wiil be \"not available,statu will be \"check in\"*/\n Room room = new Room(type,roomNo,\"not available\",\"check in\",this,roomlist.get(index).getRoomcharge());\n changeList(room);\n System.out.println(toString());\n System.out.println(\"Checked in of the room \"+roomNo+\" .\");\n }\n }", "public void carregaEstadoSelecionado(String nome) throws SQLException{\n String sql = \"SELECT * FROM tb_estados\"; \n PreparedStatement preparador = Conexao.conectar().prepareStatement(sql);\n ResultSet rs = preparador.executeQuery();\n //passando valores do banco para o objeto result; \n try{ \n while(rs.next()){ \n \n String list = rs.getString(\"uf\"); //resgatando estado \n \n //popula combo_estadof com as informações colhidas \n cbUfEditar.addItem(list);\n \n \n \n } \n } catch (Exception e){ \n JOptionPane.showMessageDialog(null, \"Impossivel carregar Estados!\", \n \"ERROR - \", JOptionPane.ERROR_MESSAGE); \n } \n cbUfEditar.setSelectedItem(nome);\n \n \n \n }", "@FXML\r\n private void cmbPeriodAction(ActionEvent event) throws ListException {\r\n CircularDoublyLinkList s = Util.Utility.getListCourse();\r\n SinglyLinkList sch = Util.Utility.getListSchedule();\r\n Course find=null;\r\n btnValidSave.setText(\"Validate and save\");\r\n if(!s.isEmpty()&&!sch.isEmpty()&&!cmbCourses.getValue().equals(\"Courses\")&&!cmbPeriod.getValue().equals(\"Period\")){\r\n for (int i = 1; i <=s.size() ; i++) {\r\n Course c = (Course)s.getNode(i).data;\r\n if(c.getId().equals(Util.Utility.getIDofString(cmbCourses.getValue()))){ \r\n find=(Course)s.getNode(i).data;;\r\n i= s.size()+1;\r\n \r\n }\r\n }\r\n for (int j = 1; j <= sch.size(); j++) {\r\n TimeTable t = (TimeTable)sch.getNode(j).data;\r\n\r\n if(find.getId().equals(t.getID())&&t.getPeriod().equals(cmbPeriod.getValue())){\r\n\r\n //\"ya tiene horario\"\r\n callAlert(\"alert\", \"¡schedule already exists!\", \"The selected course already has \\n schedule. Continue to update it.\");\r\n btnValidSave.setText(\"Validate and update\");\r\n }\r\n } \r\n \r\n }else{\r\n btnValidSave.setText(\"Validate and save\"); \r\n }\r\n \r\n }", "String insertSelective(BookDO record);", "@Override\n public void onClick(View v) {\n String vehicleNo=et_vehicleNo.getText().toString().trim();\n if(vehicleNo.equals(\"\"))\n {\n Toast.makeText(AdminHomeActivity.this, \"Please Enter a Vehicle No\", Toast.LENGTH_SHORT).show();\n }\n else\n {\n String msg=repo.CheckVehhicleAlreadyExist(vehicleNo);\n if(!msg.equals(\"exist\"))\n {\n repo.addVehicleNo(vehicleNo);\n List<Student> l=repo.getAllVehhicle();\n dialog.dismiss();\n // Student barcode = l.get(0);\n // Toast.makeText(AdminHomeActivity.this, \"\"+barcode.getVehicleNo(), Toast.LENGTH_SHORT).show();\n }\n else\n {\n Toast.makeText(AdminHomeActivity.this, \"Vehicle No Alreay Exist\", Toast.LENGTH_SHORT).show();\n }\n\n }\n\n\n\n }", "@FXML\n void modifyProductSearchOnAction(ActionEvent event) {\n if (modifyProductSearchField.getText().matches(\"[0-9]+\")) {\n modProdAddTable.getSelectionModel().select(Inventory.partIndex(Integer.valueOf(modifyProductSearchField.getText())));\n } else {\n modProdAddTable.getSelectionModel().select(Inventory.partName(modifyProductSearchField.getText()));\n }\n //modProdAddTable.getSelectionModel().select(Inventory.partIndex(Integer.valueOf(modifyProductSearchField.getText())));\n }", "public void actionPerformed(ActionEvent event) {\n String name = signOutField.getText();\r\n try {\r\n int periodNum = Integer.parseInt(signOutNumField.getText());\r\n boolean periodExists = false;\r\n for (int x = 0; x < teachers.get(teacherUser).getPeriodNumbers().size(); x++) {\r\n if (periodNum == teachers.get(teacherUser).getPeriodNumbers().get(x)) {\r\n periodExists = true;\r\n }\r\n } \r\n if (periodExists) { \r\n int index = generalInventoryTable.getSelectedRow();\r\n int teacherIndex = teacherList.getSelectedIndex();\r\n String selectedID = (String)generalInventoryTable.getValueAt(index, 0);\r\n //Setting values for the book\r\n bookInv.getBook(selectedBookset, selectedID).setInStockStatus(false);\r\n bookInv.getBook(selectedBookset, selectedID).setStudentName(name);\r\n bookInv.getBook(selectedBookset, selectedID).setTeacherName(teachers.get(teacherIndex).getName());\r\n bookInv.getBook(selectedBookset, selectedID).setPeriodNum(periodNum);\r\n //Updating the general table\r\n generalInventoryTable.getModel().setValueAt(\"Checked Out\", index, 1);\r\n generalInventoryTable.getModel().setValueAt(name, index, 2);\r\n generalInventoryTable.getModel().setValueAt(teachers.get(teacherIndex).getName(), index, 3);\r\n //Updating the period table\r\n int periodIndex = teachers.get(teacherIndex).getPeriodNumbers().indexOf(periodNum);\r\n DefaultTableModel model = (DefaultTableModel)periodInfoTables[periodIndex].getModel();\r\n model.addRow(new String[]{selectedBookset, selectedID, name});\r\n //Saving inventory\r\n try{\r\n bookInv.saveInv();\r\n }catch(IOException e){}\r\n //Resetting the text fields\r\n signOutField.setText(\"\");\r\n signOutNumField.setText(\"\");\r\n //Resetting the bookset label values\r\n BookSet tempBookSet = bookInv.getBookSet(selectedBookset);\r\n numberOfBooks.setText(\"Number of Books: \" + tempBookSet.getSize());\r\n inStock.setText(\"In Stock: \" + tempBookSet.getNumInStock());\r\n numBooksCheckedOut.setText(\"# of Books Checked Out: \" + (tempBookSet.getSize() - tempBookSet.getNumInStock()));\r\n signOutFrame.setVisible(false); //Removing the frame\r\n } else {\r\n JLabel signOutWarning1 = new JLabel(\"Please enter a valid period!\");\r\n signOutWarning1.setFont(new Font(\"Arial\", Font.PLAIN, 16));\r\n JOptionPane.showMessageDialog(new JFrame(), signOutWarning1, \"Sign Out Error\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n } catch (Exception E) {\r\n JLabel signOutWarning2 = new JLabel(\"Please enter a valid period!\");\r\n signOutWarning2.setFont(new Font(\"Arial\", Font.PLAIN, 16));\r\n JOptionPane.showMessageDialog(new JFrame(), signOutWarning2, \"Sign Out Error\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n try{\n JComboBox jc = (JComboBox)e.getSource();\n \n if(jc.getSelectedItem().equals(\"SELECT\")){\n SCRView.setDepartmentId(0);\n \n }\n else{\n for(Object[] data:SCRModel.getRespectiveDepartment(mainview.getUserId())){\n if(data[1].equals(jc.getSelectedItem())){\n SCRView.setDepartmentId(Integer.parseInt(data[0].toString()));\n// IRView.refreshTableIssueStockReport(IRModel.getSalesList(IRView.getDepartmentId()));\n }\n }\n }\n }\n catch(Exception se){\n JOptionPane.showMessageDialog(SCRView , se+\"from ComboDepartmentListener\"+getClass().getName());\n }\n }", "public abstract void setSelectedPhoneType3(String sValue);", "@FXML\n private void handleBookDeleteOption(ActionEvent event) {\n Book selectedItem = tableViewBook.getSelectionModel().getSelectedItem();\n if (selectedItem == null) {\n AlertMaker.showErrorMessage(\"No book selected\", \"Please select book for deletion.\");\n return;\n }\n if (DatabaseHandler.getInstance().isBookAlreadyIssued(selectedItem)) {\n AlertMaker.showErrorMessage(\"Cant be deleted\", \"This book is already issued and cant be deleted.\");\n return;\n }\n //confirm the opertion\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\n alert.setTitle(\"Deleting Book\");\n Stage stage = (Stage) alert.getDialogPane().getScene().getWindow();\n UtilitiesBookLibrary.setStageIcon(stage);\n alert.setHeaderText(null);\n alert.setContentText(\"Are u sure u want to Delete the book ?\");\n Optional<ButtonType> response = alert.showAndWait();\n if (response.get() == ButtonType.OK) {\n \n boolean result = dbHandler.deleteBook(selectedItem);\n if (result == true) {\n AlertMaker.showSimpleAlert(\"Book delete\", selectedItem.getTitle() + \" was deleted successfully.\");\n observableListBook.remove(selectedItem);\n } else {\n AlertMaker.showSimpleAlert(\"Failed\", selectedItem.getTitle() + \" unable to delete.\");\n\n }\n } else {\n AlertMaker.showSimpleAlert(\"Deletion Canclled\", \"Deletion process canclled.\");\n\n }\n\n }", "public abstract void setSelectedPhoneType2(String sValue);", "IntegralBook selectByPrimaryKey(Long integralBookId);", "@Override\n public void onClick(DialogInterface dialog, int id) {\n String nombreJugador=nomJugador.getText().toString();\n String numeroJugador=numJugador.getText().toString();\n String fechaNacimiento=fechaNJugador.getText().toString();\n\n if (\"\".equals(nombreJugador) || \"\".equals(numeroJugador) || \"\".equals(fechaNacimiento)){\n Toast.makeText(getActivity(),\"No dejes campos vacios\",Toast.LENGTH_LONG).show();\n }else{\n String cadenaEquipo=spinnerJEquipos.getSelectedItem().toString();\n String[] palabras = cadenaEquipo.split(\"-\");\n int idEquipo= Integer.parseInt(palabras[0]);\n registrarJugador(nombreJugador,numeroJugador,fechaNacimiento,idEquipo);\n }\n }", "private boolean CheckParkSelection() {\n\t\tif (Park_ComboBox.getSelectionModel().isEmpty()) {\n\t\t\tif (!Park_ComboBox.getStyleClass().contains(\"error\"))\n\t\t\t\tPark_ComboBox.getStyleClass().add(\"error\");\n\t\t\tParkNote.setText(\"* Select park\");\n\t\t\treturn false;\n\t\t}\n\t\tPark_ComboBox.getStyleClass().remove(\"error\");\n\t\tParkNote.setText(\"*\");\n\t\treturn true;\n\t}", "public String getSelected()\r\n {\r\n if (selectedIndex == -1)\r\n return null;\r\n \r\n return towerTypes[selectedIndex];\r\n }", "@FXML\n\tpublic void buttonCreateProductType(ActionEvent event) {\n\t\tString empty = \"\";\n\t\tString name = txtProductTypeName.getText();\n\t\tif (!name.equals(empty)) {\n\t\t\tProductType obj = new ProductType(txtProductTypeName.getText());\n\t\t\ttry {\n\t\t\t\tboolean found = restaurant.addProductType(obj, empleadoUsername); // Se añade a la lista de tipos de\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// producto DEL RESTAURANTE\n\t\t\t\tif (found == false) {\n\t\t\t\t\ttypeOptions.add(name);// Se añade a la lista de tipos de producto para ser mostrada en los combobox\n\t\t\t\t}\n\t\t\t\ttxtProductTypeName.setText(\"\");\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t} else {\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setContentText(\"El tipo de producto a crear debe tener un nombre \");\n\t\t\tdialog.setTitle(\"Error, Campo sin datos\");\n\t\t\tdialog.show();\n\n\t\t}\n\t}", "@Nullable String pickItem();", "@FXML\n private void btnBookAddAction() throws Exception {\n LocalDate pubDate = txtBookPubDateAdd.getValue();\n\n //If no date send error message.\n if (pubDate == null) {\n lblBookAddIssues.setText(\"Published Date cannot be Null\");\n }\n\n String bookId = txtBookIdAdd.getText();\n String bookTitle = txtBookTitleAdd.getText();\n String bookDescription = txtBookDescriptionAdd.getText();\n String bookPubDate = pubDate.toString();\n String bookEdition = txtBookEditionAdd.getText();\n String bookPrice = txtBookPriceAdd.getText();\n String bookPublisherId = cmbBookPublisherIdAdd.getSelectionModel().getSelectedItem();\n String bookAuthorId = cmbBookAuthorIdAdd.getSelectionModel().getSelectedItem();\n String bookGenreId = cmdBookGenreIdAdd.getSelectionModel().getSelectedItem();\n String bookQty = txtBookQtyAdd.getText();\n\n if ((bookId.length() == 0) || (bookId.length() >= 12)) {\n lblBookAddIssues.setText(\"Book ID must be between 1 and 11 characters\");\n }\n else if (!bookId.matches(\"[0-9]{1,11}\")) {\n lblBookAddIssues.setText(\"Book ID must be numeric..\");\n }\n else if ((bookTitle.length() == 0) || (bookTitle.length() >= 51)) {\n lblBookAddIssues.setText(\"Book Title must be between 1 and 50 characters\");\n }\n else if ((bookDescription.length() == 0) || (bookDescription.length() >= 256)) {\n lblBookAddIssues.setText(\"Book Description must be between 1 and 255 characters\");\n }\n else if (bookPubDate == null) {\n lblBookAddIssues.setText(\"Published Date must not be empty\");\n }\n else if ((bookEdition.length() == 0) || (bookEdition.length() >= 5)) {\n lblBookAddIssues.setText(\"Book Edition must be between 1 and 4 characters\");\n }\n else if (!bookEdition.matches(\"[0-9]{1,4}\")) {\n lblBookAddIssues.setText(\"Book Edition must be numeric..\");\n }\n else if (bookPrice.length() == 0) {\n lblBookAddIssues.setText(\"Book Price must be completed..\");\n }\n else if (!bookPrice.matches(\"[0-9]{1,4}+(\\\\.[0-9]{1,2})\")) {\n lblBookAddIssues.setText(\"Book Price must be in currency format..\");\n }\n else if (bookPublisherId.length() == 0) {\n lblBookAddIssues.setText(\"Publisher ID must not be blank.\");\n }\n else if (bookAuthorId.length() == 0) {\n lblBookAddIssues.setText(\"Author ID must not be blank.\");\n }\n else if (bookGenreId.length() == 0) {\n lblBookAddIssues.setText(\"Genre ID must not be blank.\");\n }\n else if ((bookQty.length() == 0) || (bookQty.length() >= 12)){\n lblBookAddIssues.setText(\"Book Qty must be between 1 and 11 characters.\");\n }\n else if (!bookQty.matches(\"[0-9]{1,11}\")) {\n lblBookAddIssues.setText(\"Book Qty must be a number..\");\n }\n else {\n String result = AddBook.Query(bookId, bookTitle, bookDescription, bookPubDate,\n bookEdition, bookPrice, bookPublisherId,\n bookAuthorId, bookGenreId, bookQty);\n lblBookAddIssues.setText(result);\n }\n }", "boolean insertBook(Book book);", "GirlInfo selectByPrimaryKey(Integer id);", "public abstract void setSelectedPhoneType1(String sValue);", "int insertSelective(BookInfo record);", "protected boolean pickItem(String s) {\n if (\"\".equals(s)) return false;\n Iterator i = getItems().iterator();\n Object item = null;\n Object o;\n while (null==item && i.hasNext()) {\n o = i.next();\n if(idChoosesItem(s, o)) {\n item=o;\n if (removeItemWhenChosen()) i.remove();\n }\n }\n if (null==item) return false;\n getChosenItems().add(item);\n if (Server.debugMode()) {}{} //System.out.println(\"Picked: \" +s);\n return true;\n }" ]
[ "0.60691744", "0.5878058", "0.58186877", "0.5779084", "0.5772576", "0.574381", "0.5694626", "0.5662806", "0.56533855", "0.56485206", "0.5632327", "0.5593978", "0.5591602", "0.5583785", "0.55728316", "0.5543617", "0.55335355", "0.552811", "0.5527125", "0.5522136", "0.5503971", "0.55012417", "0.5500829", "0.5498255", "0.5493975", "0.5465502", "0.54098725", "0.53983504", "0.5383897", "0.53764886", "0.53559756", "0.53464574", "0.5342383", "0.53384465", "0.53115827", "0.5306423", "0.52690655", "0.5241882", "0.5240078", "0.52383804", "0.5232224", "0.5228895", "0.5227708", "0.5224466", "0.5223072", "0.5222653", "0.5220984", "0.5216575", "0.5208556", "0.51939434", "0.517657", "0.5168893", "0.51679546", "0.516451", "0.5155965", "0.5145139", "0.5137761", "0.5130672", "0.5130105", "0.51280785", "0.5123", "0.511575", "0.5113688", "0.51117057", "0.510901", "0.5108507", "0.50996727", "0.5097628", "0.5095903", "0.5095047", "0.5087949", "0.50812423", "0.50686336", "0.50685894", "0.5065261", "0.5062487", "0.5062248", "0.50607765", "0.5052989", "0.5049495", "0.50493115", "0.5043614", "0.5043246", "0.50378704", "0.5027731", "0.50244737", "0.50198185", "0.501504", "0.5013344", "0.5012071", "0.5010414", "0.50099266", "0.5009852", "0.50089914", "0.5000367", "0.4999694", "0.4995949", "0.4993439", "0.49917734", "0.49853864" ]
0.5514024
20
Booking b = booking;
public void updateDisplayFields(Booking b){ Vehicle v = b.getVehicle(); CustomerAccount ca = v.getCustomer(); createCustomerName.setText(ca.getFirstName()); createCustomerSurname.setText(ca.getLastName()); createCustomerNumber.setText(ca.getPhoneNumber()); createCustomerAddress1.setText(ca.getAddressLine1()); createCustomerAddress2.setText(ca.getAddressLine2()); createCustomerCounty.setText(ca.getCounty()); createCustomerPostal.setText(ca.getPostCode()); createCustomerCompany.setText(ca.getCompanyName()); //VEHICLES createVehicleMake.setText(v.getMake()); createVehicleModel.setText(v.getModel()); createVehicleReg.setText(v.getRegistration()); createVehicleMileage.setText(Integer.toString(v.getMileage())); createVehicleEngine.setText(v.getEngineSize()); createVehicleColour.setText(v.getColour()); createVehicleFuel.setText(v.getFuelType()); String MOTexpire = ""; if (v.getMOTExpire() == null) MOTexpire = "N/A"; else MOTexpire = v.getMOTExpire().getTime().toString(); createVehicleMOT.setText(MOTexpire); String ServiceDate = ""; if (v.getLastService() == null) ServiceDate = "N/A"; else ServiceDate = v.getLastService().getTime().toString(); createVehicleService.setText(ServiceDate); createVehicleWarranty.setText(v.getWarrantyCompany()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setBooking(Set<Booking> aBooking) {\n booking = aBooking;\n }", "public static Booking getBooking() {\n return sBooking;\n }", "public void makeBooking (Object booking);", "public Set<Booking> getBooking() {\n return booking;\n }", "@ModelAttribute(value = \"booking\")\n\tpublic Booking getNewBooking() {\n\t\tBooking booking = new Booking();\n\t\t\n\t\tlogger.info(\"getNewBooking() method: Returning a new instance of Booking\");\n\t\t\n\t\treturn booking;\n\t}", "public Booking saveBooking(Booking booking);", "public Book getBook() {\r\n\t\treturn b;\r\n\t}", "public Book getBook() \t\t{ return this.myBook; }", "public Book getBook() {\n return book;\n }", "Booking createBooking(Booking newBooking) throws Exception;", "public void addBooking(Booking b)\r\n {\r\n bookings.add(b);\r\n }", "public Book getBook() {\n\t\treturn book; //changed BoOk to book\r\n\t}", "public int getBookingId() {\n return bookingId;\n }", "public int getBookingId() {\n return bookingId;\n }", "public int getBookingId() {\n return booking_id;\n }", "public void setBook(Book book) {\n this.book = book;\n }", "public void rebook(Booking temp) {\n\t\t\tBookings.add(temp);\r\n\t\t}", "public Bookings saveBookingDetails(Bookings bookings) ;", "public Reservation getTheObject(){\n return this;\n }", "public static void convertBookVOToBook() {\n\n\t}", "public BookingInfo() {\n }", "@Override\n public void toMyBookings() {\n }", "public static void convertBookToBookVO() {\n\t\t// TODDO\n\t}", "public static Note getB() {return (Note)B.clone();}", "public void completeBooking(){\r\n\t\tbookings.putAll(tempBookings);\r\n\t\ttempBookings.clear();\r\n\t}", "public Booking makeBooking(Customer customer, Airline flight, int baggage, String type, Date date);", "public void saveBorrowings() {\n\t}", "Booking getBookingById(BookingKey bookingKey);", "private void assignment() {\n\n\t\t\t}", "public void setBookingId(int booking_id) {\n this.booking_id = booking_id;\n }", "public void setBoard(Board board){this.board = board;}", "public void createBooking(Booking book) {\n\tStudentDAO studentDAO=new StudentDAO();\n\tstudentDAO.createBooking(book);\n}", "public BookingClassAvails getBookingClassAvails() {\n return bookingClassAvails;\n }", "public Board getBoard(){return board;}", "public void registerNewBooking(Booking b) {\n if (!newBooking.contains(b)\n && !modifiedBooking.contains(b)) {\n newBooking.add(b);\n }\n }", "public boolean isBooked(){\n return booked;\n }", "public Address getAddress() { return address; }", "public Booking() {\r\n\t\t/**\r\n\t\t*\tGet the number of milliSeconds from the system time and set it to the java.sql.Date\r\n\t\t*\tobject to create a booking number and also to set the start time.\r\n\t\t*/\r\n\t\tlong dateTimeMillis = System.currentTimeMillis();\r\n\t\t/**\r\n\t\t*\tThis date is for generating String bookingNo using the date and time values\r\n\t\t*/\r\n\t\tjava.util.Date date = new java.util.Date(dateTimeMillis);\r\n\t\t/**\r\n\t\t*\tPass the current date in sql.Timestamp object.\r\n\t\t*/\r\n\t\tstartTime = new java.sql.Timestamp(date.getTime());\r\n\t\t/**\r\n\t\t*\tLet it be 0 initially and then update it at the time of checkout\r\n\t\t*/\r\n\t\tendTime = new java.sql.Timestamp(0);\r\n\t}", "private Shop shallowCopy() {\n BookShop obj = null;\n try {\n obj = (BookShop) super.clone();\n } catch (CloneNotSupportedException exc) {\n exc.printStackTrace();\n }\n return obj;\n }", "public void setBirthday() { this.birthday = birthday; }", "public Ball(Game game) { // constructor that initializes the class Game\r\n this.game = game; // initializes the class Game\r\n }", "private void setHotel(Hotel myHotel) {\n\t\tthis.myHotel = myHotel;\n\t}", "public Swim() {\r\n this.swimStatus = new Status();\r\n this.bookings = new ArrayList<Booking>();\r\n }", "public String getBookingNo() {\r\n\t\treturn bookingNo;\r\n\t}", "public B getSecond() {return second; }", "public t b() {\n return a(this.a);\n }", "protected BusinessObject getNewBusinessObjInstance()\n {\n return BUSINESS_OBJ ;\n }", "public int getBook_id() {\n\treturn book_id;\n}", "private void internalCopy(Board b) {\n for (int i = 0; i < SIDE * SIDE; i += 1) {\n set(i, b.get(i));\n }\n\n _directions = b._directions;\n _whoseMove = b._whoseMove;\n _history = b._history;\n }", "public BookingBean() {\n }", "public Booking getBooking(String name) {\n\t\t\tint i = 0;\r\n\t\t\tBooking buffer;\r\n\t\t\t\r\n\t\t\twhile(i < Bookings.size()) {\r\n\t\t\t\tbuffer = Bookings.get(i);\r\n\t\t\t\tString Name = buffer.getBooker();\r\n\t\t\t\tif (name.contentEquals(Name)) {\r\n\t\t\t\t\treturn buffer;\r\n\t\t\t\t}\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t}", "public Object detachCopy(Object po)\n{\n\treturn po;\n}", "public void addBooking(Bookings b) {\n IController<Bookings> ic = new Controller<>();\n\n // Check whether the booking conflicts with another booking.\n for (Bookings booking : ic.readAll(Bookings.class)) {\n if (b.conflictsWith(booking)) {\n throw new IllegalArgumentException(\"That booking conflicts with another booking.\");\n }\n }\n\n Modules relatedModule = b.getModule();\n\n // Check whether the room is available at the given time.\n if (!b.getRooms().isAvailable(b.getTime(), b.getEnd())) {\n throw new IllegalArgumentException(\"That room is unavailable at this time.\");\n }\n // Check whether the students are available at that time.\n for (Students student : relatedModule.getStudents()) {\n if (!student.isAvailable(b.getTime(), b.getEnd())) {\n throw new IllegalArgumentException(\"A student is unavailable at this time.\");\n }\n }\n // Check whether the staff members are available at that time.\n for (Staff staff : relatedModule.getStaff()) {\n if (!staff.isAvailable(b.getTime(), b.getEnd())) {\n throw new IllegalArgumentException(\"A staff member is unavailable at this time.\");\n }\n }\n\n // Put the booking into the database.\n ic.create(b);\n System.out.println(b.confirmation() + \"\\n\");\n }", "public void setHotel(Hotel hotel) {\n this.hotel = hotel;\n }", "public void setHotel(Hotel hotel) {\n this.hotel = hotel;\n }", "public Book() {\n this.bookName = \"Five Point Someone\";\n this.bookAuthorName = \"Chetan Bhagat\";\n this.bookIsbnNumber = \"9788129104595\";\n\n }", "public Book addBook(Book b){\n list.add(b);\n return b;\n }", "Board(Board b) {\n internalCopy(b);\n }", "public void assignBoat(Boat boat) {\n\t\tboatList.add(boat);\n\t}", "public void cancelBooking(Booking b)\r\n {\r\n b.setCancelled(true);\r\n }", "Restaurant setRestaurant(Restaurant modifiedRest);", "public ArrayList<Bookings> getMyBookings() {\n return myBookings;\n }", "public Person(Person o){\n destinationFloor=o.getDestinationFloor();\n }", "public an b() {\n return a(this.a);\n }", "public static void addBooking(BookingImpl b, String status){\n Firebase bRefChild;\n if(!status.equals(\"new\")){\n //Dispatched Booking\n //Removes from Awaiting_Dispatch and puts in Dispatched\n bRefChild = dRef.child(status);\n bRef.child(b.getBookingNumber()+\"\").removeValue();\n } else {\n bRefChild = bRef.child(b.getBookingNumber() + \"\");\n }\n bRefChild.child(\"pickup\").setValue(b.getPickUpAddress());//\n bRefChild.child(\"dropoff\").setValue(b.getDropOffAddress());//\n bRefChild.child(\"name\").setValue(b.getClientName());//\n bRefChild.child(\"time\").setValue(b.getTime().toString());\n bRefChild.child(\"comment\").setValue(b.getComments());//\n bRefChild.child(\"tel\").setValue(b.getClientTel());//\n bRefChild.child(\"email\").setValue(b.getClientEmail());//\n bRefChild.child(\"booking_number\").setValue(b.getBookingNumber());//\n bRefChild.child(\"account\").setValue(Cash.getInstance().getId());\n bRefChild.child(\"vehicle_type\").setValue(b.getVehicleType());\n bRefChild.child(\"no_passengers\").setValue(b.getNoPassengers());\n bRefChild.child(\"date\").setValue(b.getDate());\n try {\n bRefChild.child(\"time\").setValue(new SimpleDateFormat(\"HH:mm\").format(b.getTime()));\n } catch (IllegalArgumentException e){\n // Always throws this exception - unsure why as it saves correctly.\n // Do nothing as it still writes to database as expected\n // Maybe need to look at different formats for time?\n }\n bRefChild.child(\"price\").setValue(b.getPrice());\n\n }", "@SuppressWarnings({ \"unchecked\" })\n \t/** Clones a reservation and sets new ids for all appointments and the reservation itsel\n \t */\n \tprivate Reservation cloneReservation(Entity<Reservation> obj)\n \t\t\tthrows RaplaException {\n \t\tReservation clone = ((Mementable<Reservation>) obj).deepClone();\n \t\tHashMap<Allocatable, Appointment[]> restrictions = new HashMap<Allocatable, Appointment[]>();\n \t\tAllocatable[] allocatables = clone.getAllocatables();\n \n \t\tfor (Allocatable allocatable:allocatables) {\n \t\t\trestrictions.put(allocatable, clone.getRestriction(allocatable));\n \t\t}\n \n \t\t// then we set new ids for all appointments\n \t\tAppointment[] clonedAppointments = clone.getAppointments();\n \t\tsetNew(Arrays.asList(clonedAppointments),Appointment.TYPE, this.workingUser);\n \t\t\n \t\tfor (Appointment clonedAppointment:clonedAppointments) {\n \t\t\tclone.removeAppointment(clonedAppointment);\n \t\t}\n \n \t\t// and now a new id for the reservation\n \t\tsetNew((RefEntity<Reservation>) clone, this.workingUser);\n \t\tfor (Appointment clonedAppointment:clonedAppointments) {\n \t\t\tclone.addAppointment(clonedAppointment);\n \t\t}\n \n \t\tfor (Allocatable allocatable:allocatables) {\n \t\t\tclone.addAllocatable( allocatable);\n \t\t\tAppointment[] appointments = restrictions.get(allocatable);\n \t\t\tif (appointments != null) {\n \t\t\t\tclone.setRestriction(allocatable, appointments);\n \t\t\t}\n \t\t}\n \n \t\treturn clone;\n \t}", "@RequestMapping(\"/create\")\n\tpublic Booking create(Booking booking) {\n\t\tbooking.setTravelDate(new Date());\n\t\tbooking = bookingRepository.save(booking);\n\t return booking;\n\t}", "public void reAssign(Object o) {\n\t}", "@Test\r\n\tpublic void makeBooking2() {\r\n\t\tnewFlightSearch.setDepartureTime(new Date(2016-1900,7+1,15));\r\n\t\tnewFlightSearch.setDepartureLoc(\"Akureyri\");\r\n\t\tnewFlightSearch.setArrivalLoc(\"Reykjavík\");\r\n\t\tnewFlightSearch.setPriceRange(new int[]{10000,20000});\r\n\t\tnewFlightSearch.setReturnTrip(false);\r\n\t\tnewFlightSearch.setNumSeats(1);\r\n\t\tnewFlightSearch.setSeatClass(\"Economy\");\r\n\t\tList<FlightAbstract> flightResults = SearchEngine.flightSearch(newFlightSearch);\r\n\r\n\t\tFlightBooking testBooking = new FlightBooking(flightResults.get(0),1,\"Gunnar\");\r\n\t\tmockFlightBook bookedFlight = testBooking.bookFlight();\r\n\t\t\r\n\t\tassertEquals(bookedFlight.flight.getCustomer(), \"Gunnar\");\r\n\t}", "public void insert(Booking<?> booking) {\n\t\t\t\n\t\tBookingNode node = new BookingNode(booking);\n\t\tnode.setData(booking);\n\t\tnode.next = null;\n\t\t\t\n\t\tif(head == null) {\n\t\t\t\t\n\t\t\thead = node;\n\t\t}\n\t\telse {\n\t\t\t\t\n\t\t\tBookingNode n = head;\n\t\t\twhile(n.next!=null) {\n\t\t\t\tn = n.next;\n\t\t\t}\n\t\t\tn.next = node;\n\t\t}\n\t}", "public Board getBoard(){\n return m_board;\n }", "public void registerDirtyBooking(Booking b) {\n if (!newBooking.contains(b)\n && !modifiedBooking.contains(b)) {\n modifiedBooking.add(b);\n }\n }", "public SoPickedPoint \ncopy() \n//\n////////////////////////////////////////////////////////////////////////\n{\n SoPickedPoint newCopy = new SoPickedPoint(this);\n return newCopy;\n}", "public void getBookDetails() {\n\t}", "abstract void assignOne();", "public Board getBoard(){\n return board;\n }", "public void setRoof(Building building);", "public Book() {}", "public static void main(String[] args) {\n\t\t\n\t\tCar a=new Car();\n\t\tCar b=new Car();\n\t\tCar c=new Car();\n\t\ta.mod=2015;\n\t\tb.mod=2013;\n\t\tc.mod=2012;\n\t\t\n\t\ta.wheel=\"maruti\";\n\t\tb.wheel=\"BMW\";\n\t\tc.wheel=\"Jeep\";\n\t\t\n System.out.println(a.wheel);\n System.out.println(b.wheel);\n System.out.println(c.wheel);\n System.out.println(a.mod);\n System.out.println(b.mod);\n System.out.println(c.mod);\n System.out.println(\"After assigning\");\n a=b;\n b=c;\n c=a;\n a.mod=10;\n System.out.println(\"Valu of a\" +a.mod);\n c.mod=30;\n System.out.println(\"Valu of a\" +a.mod);\n\n \n}", "public Book() {\n }", "public void setBookingId(int value) {\n this.bookingId = value;\n }", "public void setBookingId(int value) {\n this.bookingId = value;\n }", "public Date getBDate(){\n \treturn bDate;\n }", "public bb b() {\n return a(this.a);\n }", "@SuppressWarnings(\"unused\")\n private Booking() {\n }", "private void setORM_Book(i_book.Book value) {\r\n\t\tthis.book = value;\r\n\t}", "Reservation createReservation();", "public Integer getBooked() {\n return booked;\n }", "public Bill getBill() {\n return bill;\n }", "static void presentBookingHistory(User booker) {\r\n\t\tBooking bookings = new Booking();\r\n\t\tResultSet historyRs = null;\r\n\r\n\t\tSystem.out.printf(\"*%14s%10s%18s%28s%28s%15s%11s\\n\", \"Booking No\", \"Lot No\", \"Car No\", \"Start Time\", \"End Time\", \"Cost\", \"*\");\r\n\t\tSystem.out.println(\"*****************************************************************************************************************************\");\r\n\t\ttry {\r\n\t\t\tDbConnection historyConn = new DbConnection();\r\n\t\t\thistoryRs = historyConn.fetchSelectUserByUNameBookings(booker.getUName());\r\n\t\t\twhile (historyRs.next()) {\r\n\t\t\t\tjava.sql.Timestamp endTime = historyRs.getTimestamp(6);\r\n\t\t\t\t/**\r\n\t\t\t\t*\tTo show only the ones which are not checked out yet\r\n\t\t\t\t*\tIf a record with end time as 0 is found, it will be considered as not booked and shown\r\n\t\t\t\t*/\r\n\t\t\t\tif (endTime.getTime() != 0) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tString bookingNo = historyRs.getString(1);\r\n\t\t\t\tint lotNo = historyRs.getInt(3);\r\n\t\t\t\tString carNo = historyRs.getString(4);\r\n\t\t\t\tjava.sql.Timestamp startTime = historyRs.getTimestamp(5);\r\n\t\t\t\tint cost = historyRs.getInt(7);\r\n\t\t\t\tbookings.setAllValues(bookingNo, lotNo, carNo, startTime, endTime, cost);\r\n\r\n\t\t\t\tbookings.showBookHistory();\r\n\t\t\t}\r\n\t\t} catch(SQLException SqlExcep) {\r\n\t\t\tSystem.out.println(\"No records with the given booking number found\");\r\n\t\t\t//SqlExcep.printStackTrace();\r\n\t\t} catch (ClassNotFoundException cnfExecp) {\r\n\t\t\tcnfExecp.printStackTrace();\r\n\t\t} catch (NullPointerException npExcep) {\r\n\t\t\tnpExcep.printStackTrace();\r\n\t\t} finally {\r\n\t\t\t/*try {\r\n\t\t\t\t//validateConn.closeDbConnection();\r\n\t\t\t} catch(SQLException SqlExcep) {\r\n\t\t\t\tSqlExcep.printStackTrace();\r\n\t\t\t}*/\r\n\t\t}\r\n\t}", "private Shop deepCopy() {\n BookShop obj = null;\n try {\n obj = (BookShop) super.clone();\n List<Book> books = new ArrayList<>();\n Iterator<Book> iterator = this.getBooks().iterator();\n while(iterator.hasNext()){\n\n books.add((Book) iterator.next().clone());\n }\n obj.setBooks(books);\n } catch (CloneNotSupportedException exc) {\n exc.printStackTrace();\n }\n return obj;\n }", "public Long getReservationroomid()\n {\n return reservationroomid; \n }", "private static Book createdChangedBook(Book book, Review review) {\n assert book != null;\n assert review != null;\n Name name = book.getName();\n Isbn isbn = book.getIsbn();\n Email email = book.getEmail();\n Language language = book.getLanguage();\n List<Review> reviews = book.getReviews();\n reviews.add(review);\n Times times = book.getTimes();\n Set<Category> categories = book.getCategories();\n Author author = book.getAuthor();\n Publisher publisher = book.getPublisher();\n Stocking stocking = book.getStocking();\n\n return new Book(name, isbn, email, language, times, categories, stocking, reviews, author, publisher);\n }", "public Book()\n {\n title = null;\n author = null;\n }", "CurrentReservation createCurrentReservation();", "PastReservation createPastReservation();", "Assignment createAssignment();", "Assignment createAssignment();", "void setBookReservationDao(final BookReservationDao bookReservationDao);", "public ArrayList<Booking> viewbookingsadmin() {\n\tStudentDAO studentDAO=new StudentDAO();\n\treturn studentDAO.viewbookingsadmin();\n\t\n\t\n}", "ListOfBooks(){\n \tlist = new LinkedList<Book>();\n }" ]
[ "0.68493384", "0.6736278", "0.6634263", "0.646085", "0.6340368", "0.6190555", "0.6161778", "0.6081426", "0.6030253", "0.5987026", "0.5856122", "0.5855767", "0.5847381", "0.5847381", "0.57898384", "0.5756416", "0.5745987", "0.5743655", "0.563083", "0.56046367", "0.5571557", "0.5507667", "0.54183584", "0.5407688", "0.5393764", "0.5372826", "0.5371092", "0.53265196", "0.53137785", "0.5311566", "0.529951", "0.52644265", "0.5257365", "0.5232993", "0.51867104", "0.51635563", "0.51524127", "0.5145755", "0.51321447", "0.5128031", "0.51253635", "0.51125646", "0.5096996", "0.5093661", "0.50898397", "0.50853455", "0.50850505", "0.5082022", "0.5064561", "0.50597197", "0.50526273", "0.5052463", "0.50489604", "0.5045804", "0.5045804", "0.5043884", "0.5036985", "0.5028544", "0.501527", "0.50122905", "0.5008249", "0.4988413", "0.49828342", "0.4982273", "0.49808055", "0.49804807", "0.49803558", "0.49705157", "0.49659497", "0.49632293", "0.49529856", "0.49510068", "0.49480516", "0.49397635", "0.4939034", "0.49360666", "0.49331552", "0.49280587", "0.49279782", "0.49276632", "0.49267536", "0.49267536", "0.49201536", "0.4917752", "0.49175078", "0.4917078", "0.49120036", "0.49104232", "0.49049982", "0.48977467", "0.48970115", "0.48940435", "0.4893766", "0.4884617", "0.488442", "0.48827302", "0.48799077", "0.48799077", "0.48738554", "0.48707095", "0.4867956" ]
0.0
-1
Add to the end of the list
public void add(E e){ Node newNode = new Node(e); if(tail == null){ this.head = newNode; } else { tail.next = newNode; newNode.prev = tail; } tail = newNode; size++; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addLast(Item x);", "@Override\r\n\tpublic void addLast(E e) {\n\t\t\r\n\t}", "public void addToEnd(String value) {\n ListElement current = new ListElement(value);\n if (count == 0) {\n head = current;\n } else {\n tail.connectNext(current);\n }\n tail = current;\n count++;\n }", "@Override\n\tpublic Position<E> addLast(E e) {\n\t\treturn addBetween(tail.prev, tail, e);\n\t}", "public boolean add (Object o) {return addLast(o);}", "public void addLast(E item);", "public void addLast(T listItem) {\n add(listItem);\n }", "public void addLast(E item){\r\n }", "@Override\n public void addLast(T item) {\n if (size >= array.length) {\n resize(size * 2);\n array[nextLast] = item;\n nextLast = plusOne(nextLast);\n } else {\n array[nextLast] = item;\n nextLast = plusOne(nextLast);\n }\n size += 1;\n }", "public void addToEnd(T obj) {\r\n \t\t// Check obj is not null\r\n \t\tif(obj == null) {\r\n \t\t\treturn;\r\n \t\t}\r\n \t\t// Check if items is full\r\n \t\tif(numItems == items.length) {\r\n \t\t\tdoubleArrayLength();\r\n \t\t}\r\n \t\titems[numItems++] = obj;\r\n \t}", "public void addLast(E e) { // adds element e to the end of the list\n // TODO\n addFirst(e);\n tail = tail.getNext();\n }", "public void addLast(Item item){\r\n\t\tif (item == null) throw new NullPointerException();\r\n\t\tif (n == list.length){resize(2*list.length);}\r\n\t\tif(isEmpty()){prior=list.length-1;first=0;last=0;latter=0;}\r\n\t\tlist[latter++]=item;\r\n\t\t last=latter-1;\r\n\t\t if(latter==list.length){latter=0;}\r\n\t\t n++;}", "@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 addLast(T e) {\n if (_size == 0) {\n _end = new DLLNode<T>(e, null, null);// Same thing as in addFront()\n _front = _end;\n }\n else {\n _end.setNext(new DLLNode<T>(e, _end, null));// add something after the last thing and make that the new end\n _end = _end.getNext();\n }\n _size++;\n }", "public void addLast(T t) {\n if (size == elements.length) // checks potential overflow\n ensureCapacity(); // increase capacity\n elements[size] = t; //store element at last position\n size++; // increment size\n }", "public void addLast(Object item) {\r\n\t\tdata.add(item);\r\n\r\n\t}", "public void addLast(Item x) {\n if (size == items.length) {\n resize(size * 2);\n }\n items[size] = x;\n size += 1;\n }", "public void add(E e) {\n if (n == list.length) { grow(); }\n list[n++] = e;\n }", "public void addLast(T item) {\n if (size == 0) {\n array[rear] = item;\n size++;\n return;\n }\n\n this.checkReSizeUp();\n rear++;\n this.updatePointer();\n array[rear] = item;\n size++;\n }", "@Override\n public void addLast(E e) throws IllegalStateException {\n checkSize();\n data[size] = e;\n size++;\n }", "public void addLast(T element);", "public void addLast(T item) {\n if (isFull()) {\n resize(capacity * 2);\n }\n items[nextLast] = item;\n nextLast = plusOne(nextLast);\n size += 1;\n }", "@Override\n public void addLast(Item i) {\n resize();\n items[nextLast] = i;\n size += 1;\n nextLast = moveForward(nextLast, 1);\n }", "public void addLast(TypeHere x) {\n if (size == items.length) {\n resize(size + 1);\n }\n items[size] = x;\n size += 1;\n }", "public Node<E> addToEnd(Node<E> node){\n Node<E> previous = tail.getPrevious();\n\n previous.setNext(node);\n node.setPrevious(previous);\n tail.setPrevious(node);\n node.setNext(tail);\n size++;\n\n return node;\n }", "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 add(E elem) {\n if (!list.contains(elem))\n list.insertLast(elem);\n }", "public void push(E value) {\n list.addLast(value);\n index++;\n }", "@Override\n public void addLast(E value) {\n if (value == null) {\n throw new NullPointerException(\"Value can not be null\");\n }\n if (isEmpty()) {\n head = tail = 0;\n dequeue[tail] = value;\n size++;\n return;\n }\n tail = ++tail % dequeue.length;\n dequeue[tail] = value;\n size++;\n if (size == dequeue.length) {\n widen();\n }\n }", "public void offer(int num){\n if(tail == fixedSize - 1) {\n List<Object> newList = new ArrayList<>();\n newList.add(num);\n //save next new list at tail\n tailList.add(newList);\n tailList = (List<Object>) tailList.get(tail);\n tail = 0;\n }else{ //not in last index,then directly add it;\n tailList.add(num);\n }\n count++;\n tail++;\n }", "public void add()\n {\n set(++ current);\n }", "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 addLast(E e) {\n addBetween(e, trailer.getPrev(), trailer);\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 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 addLast(Item item) {\n this.doublyLinkedList.addLast(item);\n\n }", "@Override\n public void add(T elem) {\n if(isEmpty()) { //if list is empty\n prepend(elem);//we can reuse prepend() method to add to the front of list\n }\n else {\n \n last.next = new DLNode(elem, last, null); //new element follows the last one, the previous node is the old last one\n last = last.next; //the last node now is the one that follows the old last one\n }\n \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 }", "public void addLast(E item) {\n Node<E> n = new Node<>(item);\n size++;\n if(tail == null) {\n // The list was empty\n head = tail = n;\n } else {\n tail.next = n;\n tail = n;\n }\n }", "private static final <T> List<T> append(List<T> list, T newElement) {\n List<T> newList = Lists.newArrayListWithCapacity(list.size() + 1);\n newList.addAll(list);\n newList.add(newElement);\n return newList;\n }", "@Override\n\tpublic void add(int n) {\n\t\tvalues[size] = n; //add value to the list\n\t\tsize++; //increment size\n\t\tif (size == values.length){ //if the list is full expand it\n\t\t\tresize();\n\t\t}\n\t}", "public void addLast(Item item) {\r\n if (item == null) {\r\n throw new NullPointerException();\r\n }\r\n if (lastCursor == items.length) {\r\n resize(2 * items.length);\r\n }\r\n items[lastCursor++] = item;\r\n }", "protected void addToTail(T val)\n\t{\n\t\tListElement<T> newElm = new ListElement<T>(val, null, tail);\n\t\t\n\t\tif(tail != null)\n\t\t\ttail.setNext(newElm);\n\t\telse\n\t\t\t//If list was empty befor addition\n\t\t\thead = newElm;\n\t\t\t\n\t\ttail = newElm;\n\t}", "void addToEnd(Object[] by);", "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 }", "@Override\n public void addTail (E el){\n if (el == null)\n return;\n\n // it the list is empty\n if (this.size <= 0){\n this.head = new Node2<E>(el);\n this.tail = this.head;\n this.size = 1;\n return;\n }\n\n Node2<E> temp = new Node2<E>(el);\n this.tail.setNext(temp);\n this.tail = temp;\n this.size++;\n }", "public void insertAtEnd(int val)\n {\n List nptr = new List(val, null, null); \n if(start == null)\n {\n start = nptr;\n end = start;\n }\n else\n {\n nptr.setListPrev(end);\n end.setListNext(nptr);\n end = nptr;\n }\n size++;\n }", "public void addLast(E x) {\n\t\t\n\t\tNode p = mTail;\n\t\tp.data = x;\n\n\t\tmTail = new Node(null, null);\n\n\t\tp.next = mTail;\n\n\t\tmSize++;\n\t\tmodCount++;\n\t}", "public void add(T value) {\n extend();\n this.list[size]=value;\n this.size++;\n }", "public void append(Integer data) {\n\t\t// Construct a node tmp and make null as the next pointer:Step1\n\t\tListNode tmp = new ListNode(data, null);\n\n\t\tif (!isEmpty()) {\n\t\t\t// make next pointer of tail as tmp :Step2\n\t\t\t tail.next = tmp;// tmp is new tail\n\t\t\t\n\t\t} else {\n\t\t\t// but if list is empty then the temp is the only element \n\t\t\t//and is new tail as wells as head[see next statement executed]\t\n\t\t\tthis.head = tmp;\n\t\t}\n\t\tthis.tail = tmp; // now make tmp the new tail:Step2\n\t\n\t\tlength++;\n\t}", "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 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\r\n\tpublic int add() {\n\t\treturn 0;\r\n\t}", "@Override\n public void add(Object item)\n {\n if (size == list.length)\n {\n Object [] itemInListCurrently = deepCopy();\n list = new Object[size * 2];\n\n System.arraycopy(itemInListCurrently, 0, list, 0, size);\n }\n\n list[size++] = item;\n }", "public 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 }", "@Override\n public ListNode<T> append(T e) {\n \treturn new ListNode<T>(e,this);\n }", "public void add(E e) {\n resize();\n list[size] = e;\n size++;\n }", "public void add(T item) {\n if (nextindex >= list.length) {\n resize();\n }\n list[nextindex] = item;\n nextindex++;\n }", "Position<T> addLast(T data);", "public void validAdd(String element){\n\t\tlist.addLast(element);\n\t}", "@Override\n\tpublic int add() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int add() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int add() {\n\t\treturn 0;\n\t}", "public void addLast(int key)\r\n {\r\n if(numItems < maxSize)\r\n {\r\n mArray[numItems] = key;\r\n numItems++;\r\n }\r\n\r\n }", "public final void add() {\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 void add(Item nextItemToAdd) {\n items.add(nextItemToAdd);\n Collections.sort(items);\n fireIntervalAdded(nextItemToAdd, indexOf(nextItemToAdd), indexOf(nextItemToAdd));\n }", "@Override\n public boolean add(ListNode e) {\n if (this.size() != 0){\n ListNode last = this.getLast();\n last.setNext(e);\n }\n return super.add(e);\n }", "public void addLast(Item item) {\n Node oldLast = last;\n last = new Node(oldLast, item, null);\n if (oldLast == null)\n first = last;\n else\n oldLast.next = last;\n size++;\n }", "public void addLast(Item item) {\n if(isEmpty()) addFirst(item); // if DList is empty, call addFront(Item item)\n else {\n // create a new Node: it's next pointer points to the last sentinel node\n Node newNode = new Node();\n newNode.data = item;\n newNode.next = last;\n // copy the node that last was pointing to previously\n Node oldLast = last.prev;\n newNode.prev = oldLast;\n oldLast.next = newNode;\n // take care of the last sentinel node (no need to take of first):\n last.prev = newNode; \t\t\t\n // update size:\n size++;\n }\n }", "public @Override boolean add(E element) {\n \tappend(element);\n \treturn true;\n }", "private void addToEmptyList(T data) {\n this.first = this.last = new Node(data);\n this.nrOfElements++;\n }", "public void add(Object o){\n list.add(o);\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 add(int index, E e) {\n resize();\n for(int i = size-1; i >= index; i--) {\n list[i+1] = list[i];\n }\n list[index] = e;\n size++;\n }", "public static void addList() {\n\t}", "public void addLast(Item item) {\n if (item == null) {\n throw new IllegalArgumentException(\"Item must not be null.\");\n }\n\n Node<Item> oldlast = last;\n last = new Node<>();\n last.item = item;\n last.previous = oldlast;\n if (oldlast == null) {\n first = last;\n } else {\n oldlast.next = last;\n }\n size++;\n assert check();\n }", "public void addLast(Item item) {\n deck[bBack--] = item;\n }", "public void addLast(Item item) {\n\n if (item == null) {\n throw new NullPointerException(\"Item Null\");\n } else {\n\n if (isEmpty()) {\n last = new Node<Item>();\n first = last;\n } else {\n Node<Item> oldLast = last;\n last = new Node<Item>();\n last.item = item;\n last.prev = oldLast;\n oldLast.next = last;\n\n }\n N++;\n }\n }", "public void addToEnd(Connector element) {\n\n\t\tConnector<T> newConnector = element;\n\n\t\tif (head != null) {\n\t\t\ttail.setNext(newConnector);\n\t\t\ttail = newConnector;\n\t\t}\n\t\t// if list is empty sets both tail and head to be the given connector\n\t\telse {\n\t\t\thead = tail = newConnector;\n\t\t}\n\t}", "protected void insertEnd(T value) {\r\n\t\tSNode<T> iterator = head;\r\n\t\twhile (iterator.getPrev() != this.tail) {\r\n\t\t\titerator = iterator.getPrev();\r\n\t\t}\r\n\t\titerator.setPrev(new SNode<T>(value, this.tail));\r\n\t\tsize++;\r\n\t}", "@Override\n public void add(T newItem) {\n LinkedElement<T> tmpElement = new LinkedElement<>(newItem);\n\n if (firstElement == null) {\n firstElement = tmpElement;\n size = 1;\n } else {\n LinkedElement<T> currentElement = firstElement;\n while (currentElement.next != null) {\n currentElement = currentElement.next;\n }\n // currentElement is the last element in the list, now. Meaning that currentElement.next is null.\n currentElement.next = tmpElement; // These two are pointing at each other now.\n tmpElement.prev = currentElement;\n size++;\n }\n }", "public void 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 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 appendInPlace (List l) {\n\t\tif (this.isEmpty()) {\n\t\t\tmyHead = l.myHead;\n\t\t\tmySize = l.mySize;\n\t\t\tmyTail = l.myTail;\n\t\t}\n\t\telse if (l.isEmpty()) {\n\t\t\treturn;\n\t\t}\n\t\telse {\n\t\t\tmyTail.myNext = l.myHead;\n\t\t\tmyTail = l.myTail;\n\t\t\tmySize += l.mySize;\n\t\t}\n\t}", "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 addToTail(int i)\r\n\t{\r\n\t\tNode add = new Node(i, null);\r\n\t\t\r\n\t\t// checks if the list is empty then adds value to tail.\r\n\t\tif(start == null)\r\n\t\t{\r\n\t\t\tstart = add;\r\n\t\t}\r\n\t\t\r\n\t\t// checks if the last value is null then adds value to tail.\r\n\t\tif(end == null)\r\n\t\t{\r\n\t\t\tend = add;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t// if there are more values in SLL.\r\n\t\tend.next = add;\r\n\t\tend = add;\r\n\t}", "public void addAtEnd(int item) {\n\t\t// pre: a head node is created; length doesn't matter\n\t\t// post: node added in the end; length increased\n\t\tCLL_LinkNode new_node = new CLL_LinkNode(item);\n\t\tif (this.length == 0) {\n\t\t\tthis.headNode = new_node;\n\t\t\tthis.headNode.setNext(this.headNode);\n\t\t} else {\n\t\t\tCLL_LinkNode temp_node = this.headNode;\n\t\t\twhile (temp_node.getNext() != this.headNode)\n\t\t\t\ttemp_node = temp_node.getNext();\n\t\t\ttemp_node.setNext(new_node);\n\t\t\tnew_node.setNext(headNode);\n\t\t}\n\t\tthis.length++;\n\t}", "public void addLast(Item item) {\n if (item == null) throw new NullPointerException(\"Item is null\");\n if (isEmpty()) {\n first = new Node<Item>(item);\n last = first;\n } else {\n Node<Item> newLast = new Node<Item>(item);\n last.next = newLast;\n newLast.prev = last;\n last = newLast;\n }\n size++;\n }", "public void addLast(Item item) {\n if (item == null)\n throw new IllegalArgumentException();\n \n final Node<Item> l = last;\n final Node<Item> newNode = new Node<>(l, item, null);\n last = newNode;\n if (l == null)\n first = newNode;\n else\n l.next = newNode;\n size++;\n }", "public void addLast(Object o) {\r\n addBefore(o, header);\r\n }", "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 void addItem(Object item) {\n\t\tListItem newEnd = new ListItem(item); // Create a new ListItem\n\t\tif (start == null) { // Is the list empty?\n\t\t\tstart = end = newEnd; // Yes, so new element is start and end\n\t\t\tstart.prev = start; \t\t// Prev start refers to itself\n\t\t} else { // No, so append new element\n\t\t\tend.next = newEnd; // Set next variable for old end\n\t\t\tcurrent = end;\t\t\t\t// To reference previous end object \n\n\t\t\t//Point end to the new ListItem object\n\t\t\tend = newEnd; // Store new item as end\n\t\t\tend.prev = current;\t\t// Set prev item in new end\n\t\t}\n\t}", "public void add(T data) {\n\t\tListNode<T> newTail = new ListNode<T>(data, null);\n\t\tif (empty()) {\n\t\t\tthis.head = newTail;\n\t\t\tthis.size++;\n\t\t} else {\n\t\t\tListNode<T> currentTail = goToIndex(this.size - 1);\n\t\t\tcurrentTail.setNext(newTail);\n\t\t\tthis.size++;\n\t\t}\n\t}", "public void enqueue(E e) {\n\t\tlist.addLast(e);\n\t}", "public void addLast(Item x) {\n StuffNode last = new StuffNode(x, sentinel, null);\n if (this.isEmpty()) {\n last.prev = sentinel;\n sentinel.next = last;\n } else {\n StuffNode oldlast = sentinel.prev;\n last.prev = oldlast;\n oldlast.next = last; // SO MUCH PAIN!!!\n }\n this.sentinel.prev = last;\n size += 1;\n\n }", "public void addLast(Item item) {\n if (item == null) {\n throw new NullPointerException(\"Element cannot be null.\");\n }\n Node node = new Node(item);\n node.next = tail;\n node.prev = tail.prev;\n tail.prev.next = node;\n tail.prev = node;\n size++;\n }", "public void addLast(Item item) {\n if (item == null) {\n throw new IllegalArgumentException();\n }\n Node node = new Node();\n node.item = item;\n node.pre = last;\n if (last == null) {\n last = node;\n first = last;\n }\n else {\n last.next = node;\n last = node;\n }\n len++;\n }", "public void add(E item)\n {\n\n Node<E> node = new Node<E>(item);\n // if it is the first item in the list, it sets the current item to the\n // new item\n if (size == 0)\n {\n current = node;\n current.join(current);\n size++;\n return;\n }\n\n Node<E> previous = current.previous();\n previous.split();\n node.join(current);\n previous.join(node);\n current = node;\n\n size++;\n }", "public void 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 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}", "public void addLast(Item item) {\n if (item == null) {\n throw new IllegalArgumentException();\n }\n\n if (this.size == 0) {\n addFirst(item);\n } else {\n this.last.next = new Node(item, null, this.last);\n this.last = this.last.next;\n this.size++;\n }\n }" ]
[ "0.7275925", "0.7264504", "0.7179358", "0.7053321", "0.70303077", "0.70299214", "0.7015354", "0.6970939", "0.6930469", "0.69165885", "0.69164574", "0.68627197", "0.6848598", "0.6836366", "0.6835886", "0.6833108", "0.68195647", "0.6805765", "0.6790249", "0.67701757", "0.67682296", "0.6765648", "0.67564976", "0.6732328", "0.6720885", "0.66772574", "0.66605526", "0.66257507", "0.66189754", "0.6613973", "0.6598741", "0.6567301", "0.65652794", "0.65513617", "0.6539901", "0.65312904", "0.65269125", "0.6525877", "0.65224695", "0.6519088", "0.65040773", "0.6501608", "0.6494723", "0.6477464", "0.64566684", "0.6453183", "0.6443652", "0.6429865", "0.6429533", "0.64210796", "0.6419812", "0.64134437", "0.6401087", "0.6395966", "0.6369884", "0.6364135", "0.6361023", "0.63602805", "0.63548577", "0.63520324", "0.6345024", "0.6345024", "0.6345024", "0.6341469", "0.6340553", "0.63374144", "0.6333476", "0.6333426", "0.6310026", "0.63057667", "0.63050145", "0.62980115", "0.62940586", "0.62907344", "0.6280514", "0.62763166", "0.6260826", "0.6247951", "0.6244266", "0.6238414", "0.6237116", "0.62316144", "0.6228785", "0.6227774", "0.6221481", "0.6208679", "0.6197759", "0.61898935", "0.61879146", "0.6184302", "0.618323", "0.6172185", "0.6171784", "0.6171604", "0.61715037", "0.6170793", "0.6169736", "0.6168116", "0.61632484", "0.61592215", "0.6159196" ]
0.0
-1
CGet this checked. No
public BasicListIterator<E> basicListIterator(){ return new BasicLinkedListIterator(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int thisC()\r\n\t{\r\n\t return thisc;\r\n\t}", "public Entry method_1584() {\n return this.c();\n }", "public boolean c()\n {\n return false;\n }", "@Override\n public boolean c() {\n return false;\n }", "private final T self() { return (T)this; }", "private final T self() { return (T)this; }", "public CCode getC() {\n \t\treturn c;\n \t}", "public final boolean aCL() {\n return false;\n }", "public boolean cp() {\n return false;\n }", "public a c() {\n return this.f2078c;\n }", "public C c() {\n return this.a;\n }", "public boolean isC() {\n return c;\n }", "@Override\n\tpublic void ccc() {\n\t\t\n\t}", "public Boolean getC1() {\n\t\treturn c1;\n\t}", "public int c()\r\n/* 74: */ {\r\n/* 75:78 */ return this.c;\r\n/* 76: */ }", "public int c() {\n return this.f403c;\n }", "protected T self() {\n return (T) this;\n }", "protected abstract T getThis();", "@Override\r\n\tpublic void get() {\n\t\t\r\n\t}", "public c p() {\r\n return c;\r\n }", "public boolean ci() {\n/* 84 */ return true;\n/* */ }", "public int getC() {\n return c_;\n }", "public boolean hasC() {\n return c_ != null;\n }", "@Override // X.AnonymousClass1QM\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public final java.lang.Boolean get() {\n /*\n r2 = this;\n X.22H r1 = r2.A01\n boolean r0 = r1.A0X\n if (r0 != 0) goto L_0x000f\n java.util.concurrent.atomic.AtomicBoolean r0 = r1.A0V\n boolean r1 = r0.get()\n r0 = 0\n if (r1 == 0) goto L_0x0010\n L_0x000f:\n r0 = 1\n L_0x0010:\n java.lang.Boolean r0 = java.lang.Boolean.valueOf(r0)\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: X.AnonymousClass23I.get():java.lang.Object\");\n }", "private T thisT() {\n @SuppressWarnings(\"unchecked\")\n T thisT = (T) this;\n return thisT;\n }", "public a get() {\n return c();\n }", "public Boolean getC2() {\n\t\treturn c2;\n\t}", "public boolean mo5366c() {\n throw null;\n }", "public int getC() {\n return c_;\n }", "private JCheckBox getCheck() {\r\n\t\tif (check == null)\r\n\t\t\tcheck = new JCheckBox();\r\n\t\treturn check;\r\n\t}", "public Complemento getC() {\n return C;\n }", "@Override\n\tpublic long getCurrentCtc() {\n\t\treturn _candidate.getCurrentCtc();\n\t}", "public Integer getC() {\n return c;\n }", "public static Note getC() { return (Note)C.clone();}", "public boolean getInternal()\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(INTERNAL$4, 0);\n if (target == null)\n {\n return false;\n }\n return target.getBooleanValue();\n }\n }", "public C48833c invoke() {\n return this.f124092a.f124085a.f123814a.mo123594a();\n }", "public void c() {\n if (!this.f53278e) {\n this.f53278e = true;\n }\n }", "public boolean isClcw() {\n return clcw;\n }", "private synchronized boolean getGo(){\n return this.go;\n }", "public com.google.ca h() {\n /*\n r3 = this;\n r0 = new com.google.ca;\n r1 = 0;\n r0.<init>(r3, r1);\n r1 = r3.h;\n r1 = r3.f;\n if (r1 != 0) goto L_0x002a;\n L_0x000c:\n r1 = r3.h;\n r1 = r1 & 1;\n r2 = 1;\n if (r1 != r2) goto L_0x0021;\n L_0x0013:\n r1 = r3.g;\n r1 = java.util.Collections.unmodifiableList(r1);\n r3.g = r1;\n r1 = r3.h;\n r1 = r1 & -2;\n r3.h = r1;\n L_0x0021:\n r1 = r3.g;\n com.google.ca.a(r0, r1);\n r1 = com.google.bA.b;\n if (r1 == 0) goto L_0x0033;\n L_0x002a:\n r1 = r3.f;\n r1 = r1.f();\n com.google.ca.a(r0, r1);\n L_0x0033:\n r3.f();\n return r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.cr.h():com.google.ca\");\n }", "public int c() {\n return this.f12363a;\n }", "public long getcNum() {\n return cNum;\n }", "public Context getThis()\r\n {\r\n return this.context;\r\n }", "public PC getPC() {return _pc;}", "public final void cVE() {\n AppMethodBeat.i(91447);\n d.post(new Runnable() {\n public final void run() {\n AppMethodBeat.i(91444);\n a aVar = a.b.eGM;\n c ll = a.ll(\"100458\");\n if (ll == null) {\n ab.i(\"WidgetSafeModeProxyImpl\", \"ABTEST_LAYERID_SEARCH_WIDGET_SAFE_MODE_SWITCH item is null\");\n AppMethodBeat.o(91444);\n return;\n }\n e eVar = e.this;\n boolean z = ll.isValid() && \"1\".equals(ll.dru().get(\"isOpen\"));\n eVar.RP = z;\n AppMethodBeat.o(91444);\n }\n }, \"WidgetSafeModeProxyImpl\");\n AppMethodBeat.o(91447);\n }", "public VDouble getC() {\r\n return c;\r\n }", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n public Single<Curso> get() {\n return null;\n }", "private void chk() {\n if (clist != null)\n throw new UnsupportedOperationException();\n }", "public List<Currcycnct> getCurrcycnct()\n/* */ {\n/* 68 */ return this.currcycnct;\n/* */ }", "public T casePropertyCallOnSelfExpCS(PropertyCallOnSelfExpCS object) {\r\n return null;\r\n }", "public C48837g invoke() {\n return this.f124094a.f124085a.f123814a.mo123597c();\n }", "public C48835e invoke() {\n return this.f124093a.f124085a.f123814a.mo123598d();\n }", "@SuppressWarnings(\"unchecked\")\n protected B self() {\n return (B) this;\n }", "public au.gov.asic.types.TrueType xgetInternal()\n {\n synchronized (monitor())\n {\n check_orphaned();\n au.gov.asic.types.TrueType target = null;\n target = (au.gov.asic.types.TrueType)get_store().find_element_user(INTERNAL$4, 0);\n return target;\n }\n }", "public /* bridge */ /* synthetic */ void mo55096c() {\n super.mo55096c();\n }", "@Override\n public C get() {\n return content;\n }", "protected abstract T self();", "protected abstract T self();", "protected abstract T self();", "public Class getInstanceClass()\n {\n return _cl;\n }", "public T m16770B() {\n try {\n return super.clone();\n } catch (CloneNotSupportedException e) {\n e.printStackTrace();\n return null;\n }\n }", "public final boolean aCJ() {\n return false;\n }", "public Object get()\n {\n return m_internalValue;\n }", "public Node<T1> getCnode() {\r\n\t\treturn cnode;\r\n\t}", "public boolean c()\r\n/* 36: */ {\r\n/* 37:51 */ return false;\r\n/* 38: */ }", "@Override\n\tpublic Boolean getsecondconveyorfree() {\n\t\treturn null;\n\t}", "public Boolean getC8() {\n\t\treturn c8;\n\t}", "public int getConcealedValue() { return getValue(CONCEALED); }", "public Boolean isTrusted()\n {\n return this.isTrusted;\n }", "CurrentAccess getca(final BwEvent ev) {\n return get(ev.getId());\n }", "public boolean b()\r\n/* 709: */ {\r\n/* 710:702 */ return this.l;\r\n/* 711: */ }", "public String getC() {\n return c;\n }", "@Override\r\n\tpublic String b() {\n\t\treturn null;\r\n\t}", "public C48829a invoke() {\n return this.f124091a.f124085a.f123814a.mo123596b();\n }", "protected BusinessObject getReferencedObject () {\n\t\treturn this;\n\t}", "public String c() {\n return ((b.b) this.b).d();\n }", "@Override\n\tpublic State who() {\n\t\treturn State.CASUAL;\n\t}", "public boolean getWrapped() { return _wrapped; }", "public boolean f()\n/* */ {\n/* 216 */ return (this.c != null) && (this.c.a() != null);\n/* */ }", "public com.google.cM h() {\n /*\n r3 = this;\n r0 = new com.google.cM;\n r1 = 0;\n r0.<init>(r3, r1);\n r1 = r3.f;\n r1 = r3.h;\n if (r1 != 0) goto L_0x002a;\n L_0x000c:\n r1 = r3.f;\n r1 = r1 & 1;\n r2 = 1;\n if (r1 != r2) goto L_0x0021;\n L_0x0013:\n r1 = r3.g;\n r1 = java.util.Collections.unmodifiableList(r1);\n r3.g = r1;\n r1 = r3.f;\n r1 = r1 & -2;\n r3.f = r1;\n L_0x0021:\n r1 = r3.g;\n com.google.cM.a(r0, r1);\n r1 = com.google.bA.b;\n if (r1 == 0) goto L_0x0033;\n L_0x002a:\n r1 = r3.h;\n r1 = r1.f();\n com.google.cM.a(r0, r1);\n L_0x0033:\n r3.f();\n return r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.cX.h():com.google.cM\");\n }", "@Override\n\tpublic int getVarThisFlag() {\n\t\treturn heldObj.getVarThisFlag();\n\t}", "public Call getCall() {\n\treturn call;\n }", "public CuentaContable getCuentaContable()\r\n/* 78: */ {\r\n/* 79: 99 */ return this.cuentaContable;\r\n/* 80: */ }", "protected boolean func_70814_o() { return true; }", "public Boolean getC3() {\n\t\treturn c3;\n\t}", "public Double getCtr() {\r\n return ctr;\r\n }", "public CuentaContable getCuentaContableCierre()\r\n/* 98: */ {\r\n/* 99:115 */ return this.cuentaContableCierre;\r\n/* 100: */ }", "Object mo6080c() {\n return this.f2347q;\n }", "public static void mcdc() {\n\t}", "private Get() {}", "private Get() {}", "int getC();", "private ReferencableComboBox getCbxUsage() {\n\tif (ivjCbxUsage == null) {\n\t\ttry {\n\t\t\tivjCbxUsage = new ch.ehi.umleditor.application.ReferencableComboBox();\n\t\t\tivjCbxUsage.setName(\"CbxUsage\");\n\t\t\tivjCbxUsage.setEnabled(true);\n\t\t\t// user code begin {1}\n\t\t\t// user code end\n\t\t} catch (java.lang.Throwable ivjExc) {\n\t\t\t// user code begin {2}\n\t\t\t// user code end\n\t\t\thandleException(ivjExc);\n\t\t}\n\t}\n\treturn ivjCbxUsage;\n}", "public boolean g()\r\n/* 94: */ {\r\n/* 95:94 */ return this.g;\r\n/* 96: */ }", "public static void c0() {\n\t}", "public final /* bridge */ /* synthetic */ void mo43571c() {\n super.mo43571c();\n }", "@ReflectiveMethod(name = \"c\", types = {})\n public boolean c(){\n return (boolean) NMSWrapper.getInstance().exec(nmsObject);\n }", "public int getCLNO() {\n return clno;\n }", "public Unsafe method_4123() {\n return null;\n }", "public CrossSectionElement getCse() {\r\n\t\treturn crossSectionElement;\r\n\t}" ]
[ "0.69365114", "0.6363812", "0.63399476", "0.6194537", "0.61886597", "0.61886597", "0.6152941", "0.6109381", "0.59810495", "0.5954394", "0.59524065", "0.59278077", "0.59117806", "0.5903954", "0.59013397", "0.58055", "0.57882667", "0.57815343", "0.5776587", "0.5756114", "0.56736964", "0.56667143", "0.5639934", "0.56396306", "0.56171864", "0.5590216", "0.55853355", "0.558112", "0.55737007", "0.55713737", "0.55679417", "0.5566987", "0.5563433", "0.55509484", "0.55441165", "0.55417174", "0.55166346", "0.5494957", "0.54832035", "0.5480389", "0.54614556", "0.5460199", "0.54592794", "0.5440544", "0.54341424", "0.5433592", "0.5432798", "0.5422842", "0.54192203", "0.54169375", "0.5416336", "0.5413281", "0.54074717", "0.54073226", "0.54051644", "0.5404914", "0.5400199", "0.53797", "0.53797", "0.53797", "0.5375042", "0.53740025", "0.5369247", "0.5362475", "0.5360735", "0.5349623", "0.53301287", "0.53296053", "0.53286606", "0.5316536", "0.5314059", "0.53073895", "0.5304639", "0.529998", "0.52858293", "0.52816796", "0.5279164", "0.5278684", "0.5277405", "0.5275447", "0.52742565", "0.525046", "0.52499264", "0.5246877", "0.52433753", "0.5242025", "0.5229072", "0.522822", "0.5225938", "0.5217534", "0.52161705", "0.52161705", "0.5213951", "0.52132905", "0.52131903", "0.52126", "0.5201347", "0.5200091", "0.51981556", "0.5197821", "0.5196311" ]
0.0
-1
clear() //loop through and make all null and head and tail null
public int size() { return this.size; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void clear()\n {\n\thead = null;\n\ttail = null;\n }", "public void clear() {\n\t\thead = tail = null;\n\t}", "public void clear(){\n firstNode = null;\n lastNode = null;\n }", "public void clear()\r\n {\r\n first = null;\r\n last = null;\r\n count = 0;\r\n }", "public void clear() {\n head = null;\n tail = null;\n size = 0;\n\n }", "public void clear() {\n\n\t\thead = null;\n\t\ttail = null;\n\t\telements = 0;\n\t}", "void clear()\n\t{\n\t\tfront = null;\n\t\tback = null;\n\t\tcursor = null;\n\t\tlength = 0;\n\t\tindex = -1;\n\t}", "@Override\n public void clear() {\n size = 0;\n first = null;\n last = null;\n }", "public void clear() {\n head = tail = null;\n size = 0;\n }", "@Override\r\n\tpublic void clear() {\n\t\tnodo<T> tmp;\r\n\t\twhile(sentinel.getNext()!=null) {\r\n\t\t\ttmp=sentinel.getNext();\r\n\t\t\tsentinel.setNext(null);\r\n\t\t\tsentinel=tmp;\r\n\t\t\t\r\n\t\t}\r\n\t\tSystem.gc();\r\n\t\tcount=0;\r\n\t}", "@Override\n public void makeEmpty() {\n this.head = null;\n this.tail = null;\n }", "public void clear() {\n this.first = null;\n this.last = null;\n this.nrOfElements = 0;\n }", "public void clear() {\n \n /**\n * -------------------------------------------\n * TODO: You fully implement this method\n * \n */\n \n headNode = null;\n tailNode = null;\n size=0;\n \n }", "public void clear() {\n first = null;\n n = 0;\n }", "public void clear() {\n\t\thead = null;\n\t}", "public void clear() {\n\t\thead = null;\n\t\tsize = 0;\n\n\t}", "public void removeAll()\n {\n this.front = null;\n this.rear = null;\n }", "@Override\n\tpublic void clear() {\n\t\thead = null;\n\t\tsize = 0;\n\t}", "public void clear()\n {\n\tsize = 0;\n\thead = new SkipListNode<K>();\n }", "public void clear() {\n head = null;\n numElement = 0;\n }", "public void clear ()\n {\n for (int index = 0; index <= lastIndex; index++)\n {\n vertices[index] = null;\n adjacencySequences[index] = null;\n }\n lastIndex = -1;\n }", "public void makeEmpty(){\n front = null;\n numItems =0;\n }", "@Override\n\tpublic void clear() {\n\t\tNode currentNode = firstNode;\n\t\tNode previousNode = firstNode;\n\t\t\n\t\twhile(firstNode.getNextNode() != null){\n\t\t\t\n\t\t\t\tpreviousNode = currentNode;\n\t\t\t\tcurrentNode = currentNode.getNextNode();\n\t\t\t\tpreviousNode.next = currentNode.getNextNode();\n\t\t}\n\t\tfirstNode = null;\n\t\tnumberOfEntries = 0;\n\t}", "@Override\n\tpublic void clear() {\n\t\tthis.first=null;\n\t\tthis.last=null;\n\t\tthis.size=0;\n\t\tthis.modificationCount++;\n\t}", "public void reset(){\r\n \tif (blank != null){\r\n \t\tblank.clear();\r\n \t}\r\n \tif (blankNode != null){\r\n \t\tblankNode.clear();\r\n \t}\r\n }", "@Override\n public void clear() {\n head = null;\n size = 0;\n }", "public void removeAllItems()\r\n {\r\n head = tail = null;\r\n nItems = 0;\r\n }", "public void clearList() {\n\t\tthis.head = null;\n\t\tthis.tail = null;\n\t\tlength = 0;\n\t}", "public void clear() {\n\t\tmSize = 0;\n\t\tmHead = new Node(null, null);\n\t\tmTail = new Node(null, null);\n\t\tmHead.next = mTail;\n\t\tmodCount++;\n\t}", "public void clearList() {\n\t\thead = null;\n\t\tlength = 0;\n\t}", "@Override\n public void clear() {\n for (int i = 0; i < size; i++) {\n data[i] = null;\n }\n size = 0;\n }", "public void clear() {\n used = 0;\n head = -1;\n }", "public void deleteAll(){\r\n\t\thead = null;\r\n\t}", "public void clear()\n\t{\n\t\t// resets the list to empty: O(1).\n\t\thead = null;\n\t\ttail = null;\n\t}", "void clear() {\n\t\t\tfor (int i = 0 ; i < nodes.length; i++) {\n\t\t\t\tnodes[i].clear((byte) 1);\n\t\t\t}\n\t\t\tsize = 0;\n\t\t}", "public void l()\r\n/* 606: */ {\r\n/* 607:650 */ for (int i = 0; i < this.a.length; i++) {\r\n/* 608:651 */ this.a[i] = null;\r\n/* 609: */ }\r\n/* 610:653 */ for (i = 0; i < this.b.length; i++) {\r\n/* 611:654 */ this.b[i] = null;\r\n/* 612: */ }\r\n/* 613: */ }", "public void clear(){\r\n\t\tbeginMarker.next = endMarker;\r\n\t\tendMarker.prev = beginMarker;\r\n\t\tnumAdded=0;\r\n\t\tsize=0;\r\n \tmodCount++;\r\n\t}", "public void makeEmpty() {\r\n\t\theader.next = null;\r\n\t\tlast = null;\r\n\t}", "@Override\n\tpublic void clear() {\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\telements[i] = null;\n\t\t}\n\n\t\tsize = 0;\n\t}", "@Override\n public void clear() {\n this.head.setData(null);\n this.head.next = this.head;\n this.head.prev = this.head;\n this.tail = this.head;\n size = 0;\n }", "@Override\n public void clear() { //I still don't understand the benefits of the way you wrote this method in class\n this.size = 0; //Wouldn't doing it this way be more efficient because it is a constant complexity?\n this.head = null;\n }", "public void clear()\n {\n current = null;\n size = 0;\n }", "public void removeAll() {\n start = null;\n _size = 0;\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 }", "public void clear()\t{nodes.clear(); allLinks.clear();}", "public void clear() {\n\t\tint index = 0;\r\n\t\tsize = 0;\r\n\t\twhile (index < K.length) {\r\n\t\t\tif (K[index] != null) {\r\n\t\t\t\tK[index].clear();\r\n\t\t\t\tV[index].clear();\r\n\t\t\t}\r\n\t\t\tindex++;\r\n\t\t}\r\n\t}", "public void clear(){\n\t\tfor(int i = 0; i < keys.length; i++){\n\t\t\tkeys[i] = null;\n\t\t\telem[i] = null;\n\t\t}\n\t\thowMany = 0;\n\t\tnewestIndex = -1;\n\t}", "public void clear ()\n {\n\n while (head != null) {\n head.data = null;\n head = head.next;\n }\n size = 0;\n }", "@Override\r\n protected final void reset ()\r\n {\r\n super.reset();\r\n\r\n headLocation = null;\r\n tailLocation = null;\r\n startTime = null;\r\n }", "public void clear() {\n for(;topIndex > -1;topIndex--)\n stack[topIndex] = null;\n }", "@Override\n public void clear() {\n for (int i = 0; i < this.size; i++) {\n this.data[i] = null;\n }\n\n this.size = 0;\n }", "public void clear() {\n\t\tif(size == 0) return;\r\n\t\telse {\r\n\t\t\thead.clear();\r\n\t\t\ttail.clear();\r\n\t\t}\r\n\t\tsize = 0;\r\n\t}", "public void makeEmpty() {\n System.out.println(\"List is now empty\");\n head = null;\n tail = null;\n\n }", "void reinitialize() {\n super.reinitialize();\n head = tail = null;\n }", "public void clear() {\n\t\telements = 0;\n\t\tfor (int ix = 0; ix < keys.length; ix++) {\n\t\t\tkeys[ix] = null;\n\t\t\tvalues[ix] = null;\n\t\t}\n\t\tfreecells = values.length;\n\t\tmodCount++;\n\t}", "@Override\n public void clear() {\n for (LinkedList<Entry<K,V>> list : table) {\n list = null;\n }\n }", "public void clear()\n {\n int llSize = ll.getSize();\n for(int i=0; i<llSize; i++){\n ll.remove(0);\n }\n }", "public void clear() {\n\t\thead.setNext(null);\n\t\tmodcount++;\n\t\tnodeCount = 0;\n\t}", "public void clear(){\n root = null;\n count = 0;\n }", "void clear(){\n this.queueArray = (T[]) new Object[0];\n this.tail = 0;\n }", "public void clear()\r\n {\r\n for (int i = 0; i < values.length; i++)\r\n keys[i] = null;\r\n size = 0;\r\n }", "public void clear() {\n size = 0;\n head = new DoublyLinkedNode<E>(null);\n tail = new DoublyLinkedNode<E>(null);\n head.linkWith(tail);\n }", "@Override\n\tpublic void clear() \n\t{\n\t\twhile (size!=0)\n\t\t{\n\t\t\t//to check if need to resize\n\t\t\tif(size==myArray.length/4)\n\t\t\t\tresizeDown();\n\t\t\tmyArray[size-1] = null;\n\t\t\tsize--;\n\t\t}\n\t\tsize=0;\n\t}", "public void clear()\n {\n Node currNode = this.head;\n while(currNode.next != this.tail)\n {\n currNode.next.remove();\n }\n }", "public void removeAll() {\n _hash = new Hashtable();\n _first = null;\n _last = null;\n }", "public void clear(){\n\t\tclear(0);\n\t}", "public void clear() {\n\t\t\tsuper.clear();\n\t\t\tjgraph.getGraphLayoutCache().remove(nullnodes.toArray());\n\t\t\tnullnodes = new LinkedList<DefaultGraphCell>();\n\t\t}", "public void clear() {\n root = null;\n size = 0;\n }", "public void clear() {\n root = null;\n size = 0;\n }", "public void clearLinkedList()\r\n {\r\n \tfirstNode = null;\r\n \tlength = 0;\r\n }", "public void clear ()\n {\n headNode.next = null;\n currentNode = headNode;\n size = 0;\n }", "public void setNull(){\n for (int i = 0; i < Nodes.size(); i++){\n this.References.add(null);\n }\n }", "public void clear() {\n lists = new TernarySearchTree<>();\n }", "public void clear() {\n this.top = null;\n }", "public void makeEmpty(){\n deleteAll(root);\n root = null;\n numItems = 0;\n }", "@Override\n\tpublic void clear() {\n\t\tsize = 0;\n\t\troot = null;\n\t}", "private void clean() {\n //use iterator\n Iterator<Long> it = nodes.keySet().iterator();\n while (it.hasNext()) {\n Long node = it.next();\n if (nodes.get(node).adjs.isEmpty()) {\n it.remove();\n }\n }\n }", "public void clear() {\n\t\troot = null;\n\t\tcount = 0;\n\t}", "private void clear() {\n }", "public void linkedListQueue(){\r\n\t\tfirst = null;\r\n\t\tlast = null;\r\n\t\tN = 0;\r\n\t}", "@Override\n public void clear() {\n root = null;\n size = 0;\n }", "@Override\n public void clear() {\n root = null;\n size = 0;\n }", "@Override\n public void clear() {\n root = null;\n size = 0;\n }", "public void clear() {\r\n\t\troot = null;\r\n\t\tsize = 0;\r\n\t}", "@Override\n public void clear() {\n size = 0;\n root = null;\n }", "public void clear() {\n count = 0;\n root = null;\n }", "public void clear() {\n\t\tn1 = n0 = 0L;\n\t}", "public void clear() {\r\n\t\t\r\n\t\ttopNode = null; // Sets topNode pointer to null.\r\n\t\t\r\n\t}", "public void clear()\r\n\t{\r\n\t\tdata = new IterativeBinarySearchTree<Entry>();\r\n\t}", "public void clear()\n {\n this.mi_Size = 0;\n this.m_RootNode = null;\n this.m_FirstNode = null;\n this.m_LastNode = null;\n }", "public final void clear() {\r\n\t\t// Let gc do its work\r\n\t\tfor (int i = this.size - 1; i >= 0; --i) {\r\n\t\t\tthis.elementData[i] = null;\r\n\t\t}\r\n\t\tthis.size = 0;\r\n\t}", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();" ]
[ "0.7909612", "0.79006463", "0.77461827", "0.77433795", "0.7701679", "0.7679903", "0.7583403", "0.7568815", "0.7563668", "0.75017774", "0.747098", "0.7439493", "0.7405202", "0.7390088", "0.7282936", "0.7247694", "0.722119", "0.7178262", "0.71466506", "0.7118645", "0.7081254", "0.70778924", "0.7069499", "0.7057936", "0.7054091", "0.70403194", "0.7015796", "0.7011212", "0.6991092", "0.6955286", "0.6953249", "0.6948977", "0.6948772", "0.6942396", "0.69342196", "0.69233453", "0.6914716", "0.6911427", "0.6900927", "0.68896276", "0.68866944", "0.688305", "0.68698", "0.6866737", "0.685328", "0.6842105", "0.6840677", "0.68148816", "0.68013144", "0.67974484", "0.67943233", "0.6781089", "0.6775273", "0.67711204", "0.67660224", "0.6764757", "0.6764616", "0.6754748", "0.67430466", "0.6736009", "0.67278427", "0.67278033", "0.6726949", "0.6707407", "0.66973895", "0.66903853", "0.66836673", "0.6677784", "0.6677784", "0.6674096", "0.66645116", "0.66528994", "0.66527414", "0.6652354", "0.664602", "0.66446525", "0.6634536", "0.6624082", "0.66190255", "0.6615732", "0.6615373", "0.6615373", "0.6615373", "0.66150546", "0.6606343", "0.66003364", "0.65960103", "0.65934455", "0.65922695", "0.6586308", "0.65825355", "0.6575982", "0.6575982", "0.6575982", "0.6575982", "0.6575982", "0.6575982", "0.6575982", "0.6575982", "0.6575982", "0.6575982" ]
0.0
-1
T peekFirst(); // getting value of 1st node. T removeFirst();
private T remove(Node<T> rm_node) { //if(node.previous == null) return removeFirst(); //If its a first node to remove. //if(node.next == null) return removeLast(); //If it's last node to remove. rm_node.next.previous = rm_node.previous; //pointing deleting nodes next element to deleting nodes prev. 3 <--- 4 ---> 5 rm_node.previous.next = rm_node.next; //pointing deleting nodes prev element to deleting nodes next. deleting 4 T data = rm_node.data; //to return deleted node data. rm_node.data = null; rm_node = rm_node.previous = rm_node.next = null; //Clearing node --size; return data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public T removeFirst(){\n\tT ret = _front.getCargo();\n\t_front = _front.getPrev();\n\t_front.setNext(null);\n\t_size--;\n\treturn ret;\n }", "private E removeFirst ()\n {\n Node<E> temp = head;\n if (head != null) {\n head = head.next;\n size--;\n return temp.data;\n }\n else\n return null;\n }", "public T removeFirst() \r\n {\r\n if (isEmpty()) throw new NoSuchElementException();\r\n Node<T> currFirst = sentinel.next;\r\n Node<T> toBeFirst = currFirst.next;\r\n T currFirstVal = currFirst.getValue();\r\n toBeFirst.prev = sentinel;\r\n sentinel.next = toBeFirst;\r\n currFirst = null;\r\n size--;\r\n return currFirstVal;\r\n }", "public Object removeFirst(){\n if (first == null)\n throw new NoSuchElementException();\n Object element = first.data;\n first = first.next;\n return element ;\n }", "public T removeFirst()\r\n {\r\n T removedData; // holds data from removed node\r\n\r\n if (numElements == 0)\r\n throw new NoSuchElementException(\r\n \"Remove attempted on empty list\\n\");\r\n removedData = front.data;\r\n front = front.next;\r\n if (numElements == 1)\r\n rear = null;\r\n \r\n numElements--;\r\n return removedData;\r\n }", "public T removeFirst();", "Node removeFirst() {\n\t\tNode tmp = head;\n\t\thead = head.next;\n\t\treturn tmp;\n\t}", "Object removeFirst();", "public E removeFirst();", "public E removeFirst() { // removes and returns the first element\n // TODO\n if (isEmpty( )) return null;\n Node<E> head = tail.getNext();\n if (head == tail) tail = null;\n else tail.setNext(head.getNext( ));\n size--;\n return head.getElement( );\n }", "public T removeFirst() {\r\n \r\n if (size == 0) {\r\n return null;\r\n }\r\n \r\n T deleted = front.element;\r\n front = front.next;\r\n size--;\r\n \r\n return deleted;\r\n }", "public final void removeFirst() {\n this.size--;\n setFirst((Node) ((Node) get()).get());\n }", "public T removeFront() {\n\t\tT found = start.value;\n\t\tstart = start.next;\n\t\treturn found;\n\t}", "public Node removeFirst() {\r\n\t\treturn removeNode(0);\r\n\t}", "public Object removeFirst() {\n if(head == null) return null;\n if(head.getNext() == null) {\n Object temp = head.getElement();\n head = tail = null;\n return temp;\n }\n\n Object temp = head.getElement();\n Node n = head.getNext();\n n.setPrevious(null);\n head = n;\n\n return temp;\n }", "public T removeFirst( ){\r\n\t\t//calls remove onfirst\r\n\t\tT toRemove = getFirst();\r\n\t\treturn remove(toRemove);\r\n\t}", "public int removeFirstNode() {\n\t\tint tmp = getFirstElement();\n\t\thead = head.next;\n\t\treturn tmp;\n\t}", "public Object removeFirst()\n {\n return ((Node)nodes.remove(0)).data;\n }", "public E removeFirst(){\r\n return null;\r\n }", "public E peekFirst();", "public E removeFirst() {\n return pop();\n }", "protected T removeBeginning() {\r\n\t\tif (!this.isEmpty()) {\r\n\t\t\tSNode<T> startNode = this.getHead().getPrev();\r\n\t\t\tthis.getHead().setPrev(startNode.getPrev());\r\n\t\t\tsize--;\r\n\t\t\treturn startNode.getValue();\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public Item removeFirst() {\n if (isEmpty()) throw new NoSuchElementException(\"Removing from an empty deque\");\n Node<Item> tmpFirst = first;\n Item firstItem = tmpFirst.item;\n first = tmpFirst.next;\n size--;\n if (isEmpty()) last = null;\n else first.prev = null;\n return firstItem;\n }", "public T peek()\n\t{\n\t\tT ret = list.removeFirst();\n\t\tlist.addFirst(ret);\n\t\treturn ret;\n\t}", "public Item removeFirst() throws NoSuchElementException {\n if (isEmpty()) {\n throw new NoSuchElementException(\"Cannot remove first item from empty deque\");\n }\n if (size == 1) { //remove last item in deque of size 1\n Item item = head.getItem(); //item = item to be removed\n head = null;\n tail = null;\n return item;\n }\n Node n = head; //n = temporary Node\n head = head.getNext(); //assign 2nd node as new head, \"removing\" previous head from deque\n size--;\n return n.getItem();\n }", "public Item removeFirst(){\n\t\tif(isEmpty()){\n\t\t\tthrow new NoSuchElementException(\"Queue underflow\");\n\t\t}else{\n\t\t\t//save item to return\n\t\t\tItem returnItem = first.item;\n\t\t\t//delete first node\n\t\t\tfirst = first.next;\n\t\t\tn--;\n\t\t\tif(isEmpty()){\n\t\t\t\tlast = null; // to avoid loitering\n\t\t\t}else{\n\t\t\t\tfirst.prev = null;\n\t\t\t}\n\t\t\treturn returnItem;\n\t\t}\n\t}", "public Item removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n\n Node oldFirst = this.first;\n this.first = oldFirst.next;\n this.size--;\n\n if (this.size != 0) {\n this.first.prev = null;\n } else {\n this.last = null;\n }\n\n return oldFirst.item;\n }", "public Item removeFirst() {\n\t\tif (isEmpty()) {\n\t\t\tthrow new NoSuchElementException();\n\t\t}\n\t\tNode<Item> tmp = head;\n\t\thead = head.next;\n\t\tif (head == null) {\n\t\t\ttail = null;\n\t\t} else {\n\t\t\thead.prev = null;\n\t\t}\n\t\tN--;\n\t\ttmp.next = null;\n\t\treturn tmp.item;\n\t}", "public Item getFirst() {\n Node removed = head.next;\n head.next = removed.next;\n removed.next = null;\n size--;\n return removed.item;\n }", "@Override\n public E removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"No elements in dequeue\");\n }\n E value = dequeue[head];\n dequeue[head] = null;\n head = ++head % dequeue.length;\n size--;\n if (size < dequeue.length / 2) {\n reduce();\n }\n return value;\n }", "public E removeFront() throws NoSuchElementException {\r\n\t\tif(isEmpty())\r\n\t\t\tthrow new NoSuchElementException(name + \" is Empty.\");\r\n\t\t\r\n\t\tE removedItem = first.data;//var to hold the first node's data\r\n\t\tif(first == last)\r\n\t\t\tfirst = last = null;//set to null if first and last are the same - one item in list\r\n\t\telse {\r\n\t\t\tfirst = first.next;//the new first node will be the old first's next node\r\n\t\t}\r\n\t\treturn removedItem;//return the data that was removed\r\n\t}", "public T removeFirst() throws EmptyCollectionException\n //PRE: list is not empty\n //POS: first node is removed / list has one less node\n //TAS: remove first element and return it\n \n //if (count == 1)\n //{\n // T result = head.getElement();\n // head = null;\n // tail = null;\n // return result;\n //}\n //else {\n // T result = head.getElement();\n // head = head.getNext();\n // count--;\n // return result;\n // }\n \n }\n {\n T result = null;\n\n if(isEmpty()){\n throw new EmptyCollectionException(\"list\");\n }\n\n result = front.getElement();\n front = front.getNext();\n count--;\n\n if(isEmpty()){\n // reset rear after removing the last node\n rear = null;\n }\n\n return result;\n }", "public E removeFirst() {\n\t\t// Bitte fertig ausprogrammieren:\n\t\treturn null;\n\t}", "public Node<T> getFirst() \r\n {\r\n if (isEmpty()) return sentinel;\r\n return sentinel.next;\r\n }", "public Item removeFirst() {\n //check if the DList is empty or not:\n if(isEmpty()) throw new NoSuchElementException(\"Failed to perform removeFirst() bacause the DList instance is empty!\");\n Node oldFirst = first.next;\n Item item = oldFirst.data; \n\n // pointer re-wiring:\n Node newFirst = oldFirst.next; \n first.next = newFirst;\n newFirst.prev = first;\n oldFirst.next = null;\n oldFirst.prev = null;\n\n // check if last pointer has to be updated or not (paying the peiper):\n if(isEmpty()) {\n last.prev = first; // update the last sentinel node to point to the first sentinel node\n }\n\n // update the size: \n size--;\n\n return item;\n }", "public T removeFirst() {\n return remove(sentinel.next);\n }", "@Override\r\n\tpublic E peekFirst() {\n\t\treturn null;\r\n\t}", "public E removeFirst() {\n if(isEmpty()){\n return null;\n }else{\n return remove(header.getNext());\n }\n }", "public Key removeFirst(){\n\t\tKey key = firstNode.key;\n\t\tfirstNode = firstNode.next;\n\t\treturn key;\n\t}", "public T removeFirst() {\n if (size == 0) {\n return null;\n }\n nextFirst = plusOne(nextFirst);\n size -= 1;\n T toRemove = items[nextFirst];\n items[nextFirst] = null;\n if (isSparse()) {\n resize(capacity / 2);\n }\n return toRemove;\n }", "public Item removeFirst() {\n if (isEmpty()) throw new NoSuchElementException();\n\n // Set the item to be returned to the item field of the first node\n Item item = headOfDeque.item;\n\n // If this is the last node - reset deque.\n if (lastNode()) {\n resetDeque();\n }\n else { // reassign head\n headOfDeque = headOfDeque.next;\n headOfDeque.previous = null;\n }\n\n dequeSize--;\n\n return item;\n }", "public Node<E> remove_first_node(){\r\n if (theData.size() <= 0) return null;\r\n\r\n Node<E> item = new Node<E>(theData.get(0).getData());\r\n item.data = theData.get(0).getData();\r\n item.count = theData.get(0).getCount();\r\n\r\n if (theData.get(0).count == 1 ){\r\n\r\n if(0 != theData.size()-1){\r\n theData.set(0, theData.remove(theData.size() - 1));\r\n fixHeap(0);\r\n }else {\r\n theData.remove(theData.size() - 1);\r\n }\r\n\r\n\r\n }else{\r\n theData.get(0).count-=1;\r\n remove_first_node();\r\n }\r\n\r\n return item;\r\n }", "public E removeFront() {\n\t\tif (count == 0) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\tE temp = head.value;\n\t\t\thead = head.next;\n\t\t\tcount--;\n\t\t\treturn temp;\n\t\t}\n\t}", "public Node<T> getFirst() {\r\n\t\treturn first;\r\n\t}", "public Item removeFirst() {\n if (first == null)\n throw new NoSuchElementException();\n \n final Item element = first.item;\n final Node<Item> next = first.next;\n first.item = null;\n first.next = null; // help GC\n first = next;\n if (next == null)\n last = null;\n else\n next.prev = null;\n size--;\n \n return element;\n }", "public T removeFromFront() {\n DoublyLinkedListNode<T> temp = head;\n if (size == 0) {\n throw new NoSuchElementException(\"The list is empty, so there\"\n + \" is nothing to get.\");\n } else {\n if (head == tail) {\n head = tail;\n tail = null;\n return temp.getData();\n } else {\n head = head.getNext();\n head.setPrevious(null);\n size -= 1;\n return temp.getData();\n }\n }\n\n\n }", "public Node getFirst() {\r\n\t\treturn getNode(1);\r\n\t}", "@Override\r\n\tpublic E removeFirst() {\n\t\treturn null;\r\n\t}", "public Item removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n Item item = first.item;\n first = first.next;\n if (first == null) {\n last = null;\n }\n else {\n first.pre = null;\n }\n len--;\n return item;\n }", "@Override\n public T peekFront() {\n if (isEmpty()) {\n return null;\n }\n return head.peekFront();\n }", "public E first() {\n if (this.isEmpty()) return null;\r\n return this.head.getElement();\r\n }", "public Item removeFirst() {\n if (!isEmpty()) {\n Item item = first.item;\n first = first.back;\n size--;\n if (size != 0)\n first.front = null;\n return item;\n } else throw new NoSuchElementException(\"?\");\n }", "public E first() { // returns (but does not remove) the first element\n // TODO\n if (isEmpty()) return null;\n return tail.getNext().getElement();\n }", "public E removeFirst() throws NoSuchElementException{\n if(size == 0)\n throw new NoSuchElementException();\n else{\n E removedElement = head.getNext().getElement();\n head.setNext(head.getNext().getNext());\n head.getNext().setPrevious(head);\n size--;\n return removedElement;\n }\n }", "public synchronized DoubleLinkedListNodeInt removeFirst() {\n\t\tDoubleLinkedListNodeInt node = getFirst();\n\t\tif(node != null){\n\t\t\tnode.remove();\n\t\t}\n\t\treturn node;\n\t}", "public Node<E> getFirst(){\n Node<E> toReturn = head.getNext();\n return toReturn == tail ? null: toReturn;\n }", "public Item removeFirst() {\n\t\tif (count == 0) throw new NoSuchElementException();\n\t\tcount--;\n\t\tItem target = first.item;\n\t\tNode nextNode = first.next;\n\t\tfirst = null;\n\t\tif (count > 0) {\n\t\t\tfirst = nextNode;\n\t\t} \n\t\treturn target;\n\t}", "public E getFirst(){\n return head.getNext().getElement();\n }", "public Item removeFirst() throws NoSuchElementException {\n checkDequeIsNotEmpty();\n\n Item item = first.item;\n first = first.next;\n size--;\n\n if (isEmpty()) {\n // to avoid loitering; first already points to null\n last = null;\n } else {\n first.prev = null;\n }\n return item;\n }", "public Item removeFirst(){\n return this.doublyLinkedList.removeFirst();\n }", "public Object pop(){\n if(first == null){\n throw new NoSuchElementException();\n }\n else\n {\n Object element = first.data;\n first = first.next;\n return element;\n }\n }", "@Override\r\n\tpublic E peekFirst() {\n\t\treturn peek();\r\n\t}", "public Item removeFirst() {\n\t\tif (first == null) {\n\t\t\tthrow new java.util.NoSuchElementException();\n\t\t}\n\t\tItem temp = first.item;\n\t\tif (first == last) {\n\t\t\tlast = null;\n\t\t\tfirst = null;\n\t\t} else {\n\t\t\tfirst = first.next;\n\t\t\tfirst.previous = null;\n\t\t}\n\t\tsize--;\n\t\treturn temp;\n\t}", "public Item removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"Trying to remove an item from an empty deque.\");\n }\n\n Item item = first.item; // save item to return\n first = first.next; // delete first node\n if (first == null) {\n last = null;\n } else {\n first.previous = null;\n }\n size--;\n if (isEmpty()) {\n last = null;\n }\n assert check();\n return item; // return the saved item\n }", "public Item removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n Item item = head.item;\n if (size == 1) {\n tail = null;\n head = null;\n } else {\n Node<Item> nextHead = head.next;\n nextHead.prev = null;\n head = nextHead;\n }\n\n size--;\n return item;\n }", "public L removeFromFront(){\n\t\tif(isEmpty())//throw exception if List is empty\n\t\tthrow new IllegalStateException(\"List \" + name + \" is empty\");\n\n\t\tL removedItem = (L) firstNode.data; //retrieve data being removed\n\n\t\t//update references firstNode and lastNode\n\t\tif(firstNode == lastNode)\n\t\tfirstNode = lastNode = null;\n\t\telse\n\t\tfirstNode = firstNode.getNext();\n\n\t\treturn removedItem; //return removed node data\n\t}", "public Item removeFirst() {\n if (size == 0) {\n return null;\n } else if (size == 1) {\n StuffNode i = sentinel.next;\n sentinel.next = sentinel;\n sentinel.prev = sentinel;\n size -= 1;\n return i.item;\n } else {\n StuffNode i = sentinel.next;\n sentinel.next = i.next;\n i.next.prev = sentinel;\n size -= 1;\n return i.item;\n }\n }", "public Item removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"Can not call removeFirst() on an empty deque\");\n }\n\n Item item = first.item;\n first = first.next;\n n--;\n if (isEmpty()) {\n last = null;\n }\n else {\n first.prev = null;\n }\n return item;\n\n }", "@Override\n public Item removeFirst() {\n nextFirst = moveForward(nextFirst, 1);\n Item output = items[nextFirst];\n items[nextFirst] = null;\n size -= 1;\n return output;\n }", "@Override\n public T remove() {\n //make sure there is something in the set\n if (first == null)\n return null;\n //make a reference to the data in the first node, then\n //update the reference to the second node\n T val = first.value;\n first = first.next;\n //return the data\n numItems--;\n return val;\n }", "public T removeFirst() {\n if (size == 0) {\n return null;\n }\n if (size == 1) {\n size--;\n return array[front];\n }\n this.checkReSizeDown();\n size--;\n front++;\n this.updatePointer();\n return array[Math.floorMod(front - 1, array.length)];\n }", "public E peekFront();", "public Item removeFirst(){\r\n\t\tif (isEmpty()) throw new NoSuchElementException(\"Queue underflow\");\r\n\t\tItem tmp = list[first];\r\n\t\tlist[first++] = null;\r\n\t\tn--;\r\n\t\tprior=first-1;\r\n\t\tif(first==list.length){first=0;}\r\n\t\tif (n > 0 && n == list.length/4) resize(list.length/2); \r\n\t\treturn tmp;}", "public Item removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"queue is empty\");\n }\n Item a;\n a = first.item;\n first = first.next;\n if (first == null) {\n last = null;\n }\n else first.prev = null;\n size--;\n return a;\n }", "public T removeFromFront() throws EmptyListException \n\t{\n\t\tif (isEmpty()) // throw exception if List is empty\n\t\t\tthrow new EmptyListException(name);\n\n\t\tT removedItem = firstNode.data; // retrieve data being removed\n\n\t\t// update references firstNode and lastNode\n\t\tif (firstNode == lastNode)\n\t\t\tfirstNode = lastNode = null;\n\t\telse\n\t\t\tfirstNode = firstNode.nextNode;\n\t\tsize--;\n\t\treturn removedItem; // return removed node data\n\t}", "public E removeFirst() {\n\n\t\tif (mSize == 0)\n\t\t\tthrow new NoSuchElementException();\n\n\t\tE retVal = remove(mHead.next);\n\n\t\tmSize--;\n\t\tmodCount++;\n\n\t\treturn retVal;\n\t}", "public T removeFromFront() throws EmptyListException {\n if(isEmpty())\n throw new EmptyListException(name);\n\n // retrieve data being removed\n T removedItem = firstNode.data;\n\n // update references to firstNode and lastNode\n if(firstNode == lastNode)\n firstNode = lastNode = null;\n else\n firstNode = firstNode.nextNode;\n\n return removedItem;\n }", "@Override\r\n\tpublic Object first(){\r\n\t\tcheck();\r\n\t\treturn head.value;\r\n\t}", "public E getFirst() {\n return peek();\n }", "public E peekFirst() {\n\t\tif (mSize == 0)\n\t\t\treturn null;\n\t\treturn mHead.next.data;\n\t}", "public Object removeFirst(){\n //Check if there is data to be removed, if not return null\n if(size == 0){\t//size 0 indicates no data in the linkedlist\n return null;\n }\n MovieNode removed = head.next;\n head.next = head.next.next;\n size--;\n return removed.data;\n }", "public Node peek() {\n \t\t// TODO Complete this method!\n \t\treturn getNode(1);\n \t}", "public T removeFromFront() throws EmptyListException {\n if (isEmpty()) {\n throw new EmptyListException(nameList);\n }\n\n //get a generic data from first node\n T removedItem = firstNode.getData();\n \n //if first and last nodes are one node we make them null beacuse the last node of list is deleted\n if (firstNode == lastNode) {\n firstNode = lastNode = null; \n } \n \n //if not empty end not last, get the next node and assign it to first\n else {\n firstNode = firstNode.getNext();\n }\n \n //give generic data back\n return removedItem;\n }", "public Object removeFirst() {\r\n Object first = header.next.element;\r\n remove(header.next);\r\n return first;\r\n }", "public int peekFront();", "public Node getFirst()\n {\n return this.first;\n }", "public Item removeFirst() {\n if (this.isEmpty())\n throw new java.util.NoSuchElementException();\n\n Item ret = this.first.item;\n\n this.first = this.first.next;\n if (this.first != null)\n this.first.prev = null;\n else\n this.last = null;\n --this.n;\n\n return ret;\n }", "public E removeFront() {\r\n if (elem[front] == null) {\r\n throw new NoSuchElementException();\r\n } else {\r\n E temp = elem[front];\r\n elem[front] = null;\r\n front++;\r\n return temp;\r\n }\r\n }", "public T removeHead()\n\t{\n\t\tif(size == 0)\n\t\t{\n\t\t\tSystem.out.println(\"list is empty\");\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t//advance head reference\n\t\tT value = head.value;\n\t\thead = head.next;\n\t\t\n\t\tsize--;\n\t\treturn value;\n\t\t\n\t}", "public Item removeFirst() {\n Item val = deck[fFront];\n deck[fFront++] = null;\n return val;\n }", "public T pop(){\n\t\tif(start == null)\r\n\t\t\treturn null;\r\n\t\telse{\r\n\t\t\tT toReturn = start.elem;\r\n\t\t\tstart = start.next;\r\n\t\t\treturn toReturn;\r\n\t\t}\t\r\n\t}", "public PersistentLinkedList<T> removeFirst() {\n return remove(0);\n }", "public T pop() \n\t//POST: First element of list removed and FCTVAL == first element in list\n\t{\n\t\tT tmp = start.value;\n\t\tremove(start.value);\n\t\treturn tmp;\n\t}", "protected T removeFromHead()\n\t{\n\t\tif(head == null)\n\t\t\treturn null;\n\t\t\n\t\tT ret = head.getVal();\n\t\thead = head.getNext();\n\t\t\n\t\tif(head == null)\n\t\t\ttail = head;\n\t\telse\n\t\t\thead.setPrev(null);\n\t\t\n\t\treturn ret;\n\t}", "public Item removeFirst() {\n if (isEmpty())\n throw new NoSuchElementException();\n Item item = first.item;\n first = first.next;\n if (first != null)\n first.prev = null;\n else\n last = first;\n size--;\n return item;\n }", "public Item removeFirst() {\r\n if (isEmpty()) {\r\n throw new NoSuchElementException();\r\n }\r\n Item result = items[++firstCursor];\r\n items[firstCursor] = null;\r\n return result;\r\n }", "public T getFirst()\n\t{\n\t\treturn getFirstNode().getData();\n\t}", "public Node deleteFirst() {\n\n\t\tif (first == null) { // means LinkedList in empty, throw exception.\n\t\t\tthrow new LinkedListEmptyException(\n\t\t\t\t\t\"LinkedList doesn't contain any Nodes.\");\n\t\t}\n\n\t\tNode tempNode = first;\n\t\tif (first.next == null) // if only one item\n\t\t\tlast = null; // null <-- last\n\t\telse\n\t\t\tfirst.next.previous = null; // null <-- old next\n\t\tfirst = first.next; // first --> old next\n\t\treturn tempNode;\n\t}", "public T peek()\n {\n if (isEmpty())\n return null;\n \n return first.getData();\n }", "public O popFront()\r\n {\r\n if (!isEmpty())\r\n {\r\n VectorItem<O> l = first;\r\n first = first.getNext();\r\n \r\n count--;\r\n if (isEmpty()) last = null;\r\n else first.setPrevious(null);\r\n \r\n return l.getObject();\r\n } else\r\n return null;\r\n }", "public E peek(){\r\n Node<E> curr = top;\r\n return (E)curr.getData();\r\n \r\n }" ]
[ "0.7797311", "0.7792998", "0.7791522", "0.76997244", "0.7686222", "0.7631596", "0.75527567", "0.7548503", "0.754525", "0.7538472", "0.75328535", "0.7517918", "0.75123805", "0.74867976", "0.74798304", "0.74411917", "0.743609", "0.74030715", "0.7375839", "0.7360807", "0.733987", "0.73239726", "0.7286743", "0.7274536", "0.7246349", "0.72433704", "0.72408587", "0.7225876", "0.7215026", "0.7214344", "0.7206195", "0.7204273", "0.71970445", "0.7192225", "0.7189242", "0.7187501", "0.7186949", "0.71845615", "0.71590066", "0.7149945", "0.7147245", "0.71438247", "0.71364915", "0.71358824", "0.7126147", "0.7121427", "0.71165216", "0.71071863", "0.7098205", "0.7097551", "0.70958096", "0.70935124", "0.7091801", "0.7085692", "0.70824784", "0.70814234", "0.70776737", "0.70730025", "0.706335", "0.70550114", "0.705382", "0.7047107", "0.70465535", "0.7042063", "0.70419234", "0.70402783", "0.7038842", "0.70353", "0.70117795", "0.70062745", "0.699366", "0.6986855", "0.6984385", "0.69600964", "0.69584715", "0.6956121", "0.6953545", "0.69487315", "0.6947139", "0.69432956", "0.693629", "0.6926474", "0.6920466", "0.69202983", "0.6910779", "0.6908562", "0.68988264", "0.68937796", "0.6882501", "0.6880949", "0.68695474", "0.68649834", "0.6853263", "0.6843211", "0.68327886", "0.6831983", "0.68254226", "0.681078", "0.6808686", "0.6797198", "0.6790303" ]
0.0
-1
/ This method adds entity to Candidate table
public CandidateEntity addCandidate(CandidateEntity entity){ PartyEntity party =new PartyEntity("BJP", "PM", "Lotus"); entity.setParty(party); entityManager.getTransaction().begin(); entityManager.merge(entity); entityManager.getTransaction().commit(); logger.info("Candidate with Id" + entity.getCandidate_id()+ "is added"); return entity; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@RequestMapping(method = RequestMethod.POST)\r\n public ResponseObject insert(@Validated @RequestBody Candidate candidate) {\r\n return candidateService.insert(candidate);\r\n }", "public static void candidate_add()\n {\n Alert a;\n //run sql query\n try\n {\n ResultSet r = con.createStatement().executeQuery(\"select * from candidates\");\n while (r.next())\n {\n //create objects and put in hashmap\n Candidate can=new Candidate(r.getString(\"candidate_id\"),r.getString(\"candidate_name\"),r.getString(\"nic\"),r.getString(\"party_id\"),r.getString(\"party_name\"),r.getString(\"address\"),r.getString(\"tel_no\"),r.getInt(\"age\"));\n allCandidates.put(r.getString(\"candidate_id\"),can);\n }\n }\n catch(Exception ex)\n {\n a = new Alert(AlertType.ERROR);\n a.setContentText(ex.getMessage());\n a.show();\n }\n }", "@Override\n\tpublic void Insert(PersonelContract entity) {\n\n\t}", "public void addEntity(AnnexDetail entity) throws Exception {\n\t\t\n\t}", "@Override\n public void add(Curso entity) {\n Connection c = null;\n PreparedStatement pstmt = null;\n\n try {\n c = DBUtils.getConnection();\n pstmt = c.prepareStatement(\"INSERT INTO curso (nombrecurso, idprofesor, claveprofesor, clavealumno) values (?, ?, ?, ?)\");\n\n pstmt.setString(1, entity.getNombre());\n pstmt.setInt(2, (entity.getIdProfesor() == 0)?4:entity.getIdProfesor() ); //creo que es sin profesor confirmado o algo por el estilo\n pstmt.setString(3, entity.getClaveProfesor());\n pstmt.setString(4, entity.getClaveAlumno());\n \n pstmt.execute();\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n try {\n if (pstmt != null) {\n pstmt.close();\n }\n DBUtils.closeConnection(c);\n } catch (SQLException ex) {\n Logger.getLogger(JdbcCursoRepository.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }", "public void insert(EmployeeEntity entity){\n EmployeeDB.getInstance().insertOrUpdate(entity);\n }", "void addEntity(IViewEntity entity);", "@Test\r\n\tpublic void addToDb() {\r\n\t\tservice.save(opinion);\r\n\t\tassertNotEquals(opinion.getId(), 0);\r\n\t\tassertTrue(service.exists(opinion.getId()));\r\n\t}", "@PostConstruct\n protected void initNewEntity() {\n setNewEntity(getService().create());\n }", "void addConstraintEntity(IViewEntity entity);", "public void insertOffer(Offer o);", "int insert(PrefecturesMt record);", "public void insert() {\n\t\tSession session = DBManager.getSession();\n\t\tsession.beginTransaction();\n\t\tsession.save(this);\n\t\tsession.getTransaction().commit();\n\t}", "@Override\n\tpublic Candidate create(long candidateId) {\n\t\tCandidate candidate = new CandidateImpl();\n\n\t\tcandidate.setNew(true);\n\t\tcandidate.setPrimaryKey(candidateId);\n\n\t\treturn candidate;\n\t}", "@Override\n\tpublic int insert(ElectricalCheck entity) throws Exception {\n\t\treturn electricalCheckMapper.insert(entity);\n\t}", "AdPartner insertAdPartner(AdPartner adPartner);", "@Override\n\tpublic int addBookshelfinfo(BookshelfinfoEntity bookshelfinfoEntity) {\n\t\treturn this.sqlSessionTemplate.insert(\"bookshelfinfo.add\", bookshelfinfoEntity);\n\t}", "public void addBestelling(Bestelling bestelling) {\n\r\n DatabaseConnection connection = new DatabaseConnection();\r\n if(connection.openConnection())\r\n {\r\n // If a connection was successfully setup, execute the INSERT statement\r\n\r\n connection.executeSQLInsertStatement(\"INSERT INTO bestelling (`bestelId`, `tafelId`) VALUES(\" + bestelling.getId() + \",\" + bestelling.getTafelId() + \");\");\r\n\r\n for(Drank d : bestelling.getDranken()) {\r\n connection.executeSQLInsertStatement(\"INSERT INTO drank_bestelling (`DrankID`, `BestelId`, `hoeveelheid`) VALUES (\" + d.getDrankId() + \",\" + bestelling.getId() + \", `1`\");\r\n }\r\n\r\n for(Gerecht g : bestelling.getGerechten()) {\r\n connection.executeSQLInsertStatement(\"INSERT INTO gerecht_bestelling (`GerechtID`, `BestelId`, `hoeveelheid`) VALUES (\" + g.getGerechtId() + \",\" + bestelling.getId() + \", `1`\");\r\n }\r\n\r\n\r\n //Close DB connection\r\n connection.closeConnection();\r\n }\r\n\r\n }", "@Override\n\tpublic void addEntity( final Entity _entity )\n\t{\n\t\tif( _entity == null )\n\t\t{\n\t\t\tLogger.println( \"Attempting to add null entity.\", Logger.Verbosity.MAJOR ) ;\n\t\t\treturn ;\n\t\t}\n\n\t\tentitiesToAdd.add( _entity ) ;\n\t}", "@Override\n\tpublic Result add(CurriculumVitae entity) {\n\t\treturn null;\n\t}", "int insertSelective(PrefecturesMt record);", "@Override\r\n\tpublic void add() {\n\t\tif(alreadyAdded()) {\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Member is already added\");\r\n\t\t}else {\r\n\t\t\t\r\n\t\t\t\ttry(Connection connection= db.getConnection();) {\r\n\t \t\r\n\t\t\t\t\r\n\t\t\t\tString addString=\"INSERT INTO members VALUES(?,?,?,?)\";\r\n\t\t\t\tpreparedStatement=connection.prepareStatement(addString);\r\n\t\t\t\tpreparedStatement.setString(1, super.getIdString());\r\n\t\t\t\tpreparedStatement.setString(2, super.getNameString());\r\n\t\t\t\tpreparedStatement.setString(3, super.getSurnameString());\r\n\t\t\t\tpreparedStatement.setString(4, super.getEmailString());\r\n\t\t\t\t\r\n\t\t\t\tpreparedStatement.executeUpdate();\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Something went wrong\");\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\t \r\n\t\t\r\n\t}", "@Override\r\n public void createNewEntity(String entityName) {\n\r\n }", "public void add(E entity);", "public EspecieEntity inserta(EspecieEntity entity){\r\n em.persist(entity);\r\n return entity;\r\n }", "@Override\n\tpublic void entityAdded(Entity entity)\n\t{\n\t\t\n\t}", "public void addNewLegalEntity(String string) {\n\t\t\r\n\t}", "public void addVehicle() {\n\t\tcurrentInstance = FacesContext.getCurrentInstance();\n\t\tFacesMessage message = null;\n\t\ttry {\n\t\t\tvehicleService.insert(vehic);\n\t\t\tmessage = new FacesMessage(FacesMessage.SEVERITY_INFO,\"Saved\",\"Vehicle Saved\");\n\t\t} catch (Exception e) {\n\t\t\tmessage = new FacesMessage(FacesMessage.SEVERITY_ERROR,\"Failed\",\"Vehicle Failed to be Saved: \" + e.getMessage());\n\t\t}\n\t\tcurrentInstance.addMessage(null, message);\n\t}", "private void insert() {\n\t\tConfiguration conf = new Configuration();\n\t\tconf.configure(\"hibernate.cfg.xml\");\n\t\tSessionFactory sf = conf.buildSessionFactory();\n\t\tSession s = sf.openSession();\n\t\ts.beginTransaction();\n\n\t\tQuery query = s.createQuery(\"insert into OldStudent(id,name,grade) select s.id,s.name,s.grade from Student s\");\n\t\tint count = query.executeUpdate();\n\t\tSystem.out.println(\"Number of Rows inserted in the oldstudent table=\" + count);\n\n\t\ts.getTransaction().commit();\n\t\ts.clear();// s.evict() on all student objects in session\n\t\tsf.close();\n\t}", "public boolean insert(T entity) {\r\n // code to save entity details to database\r\n Session session = HibernateUtil.getInstance().getFactory().openSession();\r\n try {\r\n System.out.println(\"\" + entity.toString());\r\n\r\n Transaction transaction = session.getTransaction();\r\n transaction.begin();\r\n// Approval app=(Approval) entity;\r\n session.persist(entity);\r\n transaction.commit();\r\n session.close();\r\n return true;\r\n } catch (HibernateException ex) {\r\n ex.printStackTrace();\r\n System.out.println(\"\" + ex.getMessage());\r\n session.close();\r\n return false;\r\n }\r\n\r\n }", "protected void onAdd( E entity, int index )\r\n\t{\r\n\t\t\r\n\t}", "int insert(InspectionAgency record);", "@PostMapping(\"/savecandidate\")\r\n\tpublic String saveCandidate(@ModelAttribute(\"candidate\") Candidate candidate, ModelMap modelMap) {\n\t\tSystem.out.println(\"candidate:\"+candidate);\r\n\t\tif(candidate.validateCandidate()) {\r\n\t\t\tcandidate = candidateService.saveCandidate(candidate);\r\n\t\t\tSystem.out.println(\"candidate.getId():\"+candidate.getId());\r\n\t\t\tmodelMap.addAttribute(\"candidate\",candidate);\r\n\t\t\t\r\n\t\t\tDocument document = documentService.getDocumentByCandidateId(candidate.getId()+\"\");\r\n\t\t\tif(document!=null && document.getUuid()!=null && document.getUuid()!=\"\") {\r\n\t\t\t\tmodelMap.addAttribute(\"document\",document);\r\n\t\t\t}else {\r\n\t\t\t\tmodelMap.addAttribute(\"document\",new Document());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn \"updatecandidate\";\r\n\t\t}else {\r\n\t\t\tmodelMap.addAttribute(\"errorMsg\", \"Please fill all details.\");\r\n\t\t}\r\n\t\tmodelMap.addAttribute(\"candidate\", candidate);\r\n\t\treturn \"addcandidate\";\r\n\t}", "@Override\n\tpublic void add(Entity entity) throws Exception {\n\t\tsuper.add(entity);\n\t\tProduct prod = (Product) entity;\n\n\t\tSQLiteStatement st = db\n\t\t\t\t.prepare(\"INSERT INTO products(sessionID, name, priceMin, priceMax, quantity, category)\"\n\t\t\t\t\t\t+\"VALUES (?, ?, ?, ?, ?, ?)\");\n\t\tst.bind(1, sessionId).bind(2, prod.getName()).bind(3, prod.getPriceMin())\n\t\t\t\t.bind(4, prod.getPriceMin()).bind(5, prod.getQuantity())\n\t\t\t\t.bind(6, prod.getCategory());\n\t\tst.step();\n\t\ttotalQuantity += prod.quantity;\n\t\tif (!categoryList.containsKey(prod.getCategory())) {\n\t\t\tcategoryList.put(prod.getCategory(), new ArrayList<Product>());\n\t\t}\n\t\tcategoryList.get(prod.getCategory()).add(prod);\n\t\tif (availableProducts.get(entity.getName())==null) {\n\t\t\tavailableProducts.put(entity.getName(), \" \");\n\t\t}\n\t}", "public void add(IApsEntity entity) throws ApsSystemException;", "public static void Inpinsert(int id,String FQN,String name, String container,String participant,int inheritanceRelationship_id,String table)\n\t\t\t { \n\t\t\t \n\t\t\t \ttry \n\t\t\t { \n\t\t\t Statement stmt=null; \n\t\t\t ResultSet res=null; \n\t\t\t Class.forName(\"com.mysql.jdbc.Driver\"); \n\t\t\t Connection conn = DriverManager.getConnection(sqldatabase,mysqluser,mysqlpassword); \n\t\t\t stmt = (Statement)conn.createStatement(); \n\t\t\t res= stmt.executeQuery(\"SELECT * from inheritanceparticipation \"); \n\n\n\t\t\t // 增加数据\n\t\t\t Statement stm = (Statement) conn.createStatement();// 提交查巡\n\t\t\t String sql = \"select * from inheritanceparticipation\";\n\t\t\t ResultSet rs = stm.executeQuery(sql);// 取得查巡結果\n//\t\t\t sql = \"insert into entity (id,name,FQN,container) values ('6','AccountType','Example2.O2.AccountType','Example2.O10')\";\n\t\t\t \n\t\t\t int n = stm.executeUpdate(\"insert into \"+table+\"(id,FQN,name, container,participant,inheritanceRelationship_id) values (\"+\"'\"+id+\"'\"+\",\"+\"'\"+FQN+\"'\"+\",\"+\"'\"+name+\"'\"+\",\"+\"'\"+container+\"'\"\n\t\t\t +\",\"+\"'\"+participant+\"'\"+\",\"+\"'\"+inheritanceRelationship_id+\"'\"+\")\"); // 增加数据 \n\t\t\t if (n > 0) {\n//\t\t\t JOptionPane.showMessageDialog(null, \"成功\");\n\t\t\t \n\t\t\t \n\t\t\t } else {\n//\t\t\t JOptionPane.showMessageDialog(null, \"失败\");\n\t\t\t }\n\t\t\t //增加数据结束\n\n\t\t\t while (res.next()) \n\t\t\t { \n\t\t\t \n\t\t\t } \n\t\t\t } \n\t\t\t \n\t\t\t catch(Exception ex) \n\t\t\t { \n\t\t\t ex.printStackTrace(); \n\t\t\t } \n\t\t\t}", "public void addEntity(Entity entity)\n {\n if (this.withinBounds(entity.getPosition()))\n {\n this.setOccupancyCell(entity.getPosition(), entity);\n this.entities.add(entity);\n }\n }", "private void insertData() {\n\n cliente = factory.manufacturePojo(ClienteEntity.class);\n em.persist(cliente);\n for (int i = 0; i < 3; i++) {\n FormaPagoEntity formaPagoEntity = factory.manufacturePojo(FormaPagoEntity.class);\n formaPagoEntity.setCliente(cliente);\n em.persist(formaPagoEntity);\n data.add(formaPagoEntity);\n }\n }", "@Override\n\tpublic EmploieType creer(EmploieType entity) throws InvalideTogetException {\n\t\treturn emploieTypeRepository.save(entity);\n\t}", "int insert(StudentEntity record);", "public static void Inrinsert(int id,String FQN,String name, String container,String disjoint,String complete,String table)\n\t\t\t { \n\t\t\t \n\t\t\t \ttry \n\t\t\t { \n\t\t\t Statement stmt=null; \n\t\t\t ResultSet res=null; \n\t\t\t Class.forName(\"com.mysql.jdbc.Driver\"); \n\t\t\t Connection conn = DriverManager.getConnection(sqldatabase,mysqluser,mysqlpassword); \n\t\t\t stmt = (Statement)conn.createStatement(); \n\t\t\t res= stmt.executeQuery(\"SELECT * from inheritancerelationship\"); \n\n\n\t\t\t // 增加数据\n\t\t\t Statement stm = (Statement) conn.createStatement();// 提交查巡\n\t\t\t String sql = \"select * from inheritancerelationship\";\n\t\t\t ResultSet rs = stm.executeQuery(sql);// 取得查巡結果\n//\t\t\t sql = \"insert into entity (id,name,FQN,container) values ('6','AccountType','Example2.O2.AccountType','Example2.O10')\";\n\t\t\t \n\t\t\t int n = stm.executeUpdate(\"insert into \"+table+\"(id,FQN,name,container,disjoint,complete) values (\"+\"'\"+id+\"'\"+\",\"+\"'\"+FQN+\"'\"+\",\"+\"'\"+name+\"'\"+\",\"+\"'\"+container+\"'\"+\",\"+\"'\"+disjoint+\"'\"+\",\"+\"'\"+complete+\"'\"+\")\"); // 增加数据 \n\t\t\t if (n > 0) {\n//\t\t\t JOptionPane.showMessageDialog(null, \"成功\");\n\t\t\t \n\t\t\t \n\t\t\t } else {\n//\t\t\t JOptionPane.showMessageDialog(null, \"失败\");\n\t\t\t }\n\t\t\t //增加数据结束\n\n\t\t\t while (res.next()) \n\t\t\t { \n\t\t\t \n\t\t\t } \n\t\t\t } \n\t\t\t \n\t\t\t catch(Exception ex) \n\t\t\t { \n\t\t\t ex.printStackTrace(); \n\t\t\t } \n\t\t\t}", "CounselorBiographyTemp save(CounselorBiographyTemp entity);", "public int insert(IEntity entity) throws SQLException;", "void add(E entity) throws ValidationException, RepositoryException;", "public void add() {\n preAdd();\n EntitySelect<T> entitySelect = getEntitySelect();\n entitySelect.setMultiSelect(true);\n getEntitySelect().open();\n }", "@Transactional\n\t@Override\n\tpublic Passenger addPassenger(Passenger p) {\tint bId = p.getBooking().getBookingId();\n//\t\tString query = \"Select b from Booking b where b.bookingId =:bId \";\n//\t\tTypedQuery<Booking> tq = em.createQuery(query, Booking.class);\n//\t\ttq.setParameter(\"bId\", bId);\n//\t\tBooking b = tq.getSingleResult();\n//\t\tSystem.out.println(\"feffefefeff\" + p);\n//\t\tp.setBooking(b);\n//\t\n\tList<Integer> seatNos = new ArrayList();\n\t\t\n\t\tfor(int i =1; i<61; i++)\n\t\t{\t\n\t\t\tseatNos.add(i);\n\t}\n\t\t\t\n\tp.setSeatNo(seatNos.get(count));\n\tcount+=1;\n\t\t\n\t\t\n\n\t\t\n\t\t\n\t\tSystem.out.println(p);\n\t\tem.persist(p);\n\t\tSystem.out.println(\"persisted\" + p);\n\t\treturn p;\n\t}", "@Override\n\tpublic int insert(TestPoEntity entity) {\n\t\treturn 0;\n\t}", "int insert(WizardValuationHistoryEntity record);", "public void addEntity(Entity e)\r\n\t{\r\n\t\tentities.add(e);\r\n\t}", "public void insertCourse(){\n \n }", "void createOrUpdate(T entity);", "@Override\n\tpublic void insert(Category entitiy) {\n\n\t}", "@Override\n\tpublic void insert(UploadDF entity) {\n\t\tSession session = factory.openSession();\n\t\ttry{\n\t\t\tsession.beginTransaction();\n\t\t\tsession.save(entity);\n\t\t\tsession.getTransaction().commit();\n\t\t}catch(HibernateException exception){\n\t\t\tsession.getTransaction().rollback();\n\t\t\tthrow exception;\n\t\t}finally{\n\t\t\tsession.close();\n\t\t}\n\t}", "public void insertEmp(Emp emp) {\n\t\t\n\t}", "public Participacao createParticipacao(Participacao model) {\n return participacaoRepository.save(model);\n}", "public void save(HrJBorrowcontract entity);", "int insertSelective(InspectionAgency record);", "@Override\r\n\tpublic void insertOne(GuestUserVo bean) throws SQLException {\n\t\t\r\n\t}", "int insert(TblMotherSon record);", "public static void Enitityinsert (int id,String name,String FQN, String container,int potincy,String directtype,String table )\n { \n \n \ttry \n { \n Statement stmt=null; \n ResultSet res=null; \n Class.forName(\"com.mysql.jdbc.Driver\"); \n Connection conn = DriverManager.getConnection(sqldatabase,mysqluser,mysqlpassword); \n stmt = (Statement)conn.createStatement(); \n res= stmt.executeQuery(\"SELECT * from entity \"); \n\n\n // 增加数据\n Statement stm = (Statement) conn.createStatement();// 提交查巡\n String sql = \"select * from entity\";\n ResultSet rs = stm.executeQuery(sql);// 取得查巡結果\n// sql = \"insert into entity (id,name,FQN,container) values ('6','AccountType','Example2.O2.AccountType','Example2.O10')\";\n \n int n = stm.executeUpdate(\"insert into \"+table+\"(id,FQN,name,container,potincy,direct_type) values (\"+\"'\"+id+\"'\"+\",\"+\"'\"+FQN+\"'\"+\",\"+\"'\"+name+\"'\"+\",\"+\"'\"+container+\"'\"+\",\"+\"'\"+potincy+\"'\"+\",\"+\"'\"+directtype+\"'\"+\")\"); // 增加数据 \n if (n > 0) {\n// JOptionPane.showMessageDialog(null, \"成功\");\n \n \n } else {\n// JOptionPane.showMessageDialog(null, \"失败\");\n }\n //增加数据结束\n\n while (res.next()) \n { \n\n } \n } \n \n catch(Exception ex) \n { \n ex.printStackTrace(); \n } \n}", "void lookupAndSaveNewPerson();", "public TIdAddPotentialServicesEntity() {\n\t\tsuper();\n }", "@Transactional void add(E entity);", "@Override\n public E insert(E entity) {\n LOG.info(\"[insert] Start: entity = \" + entity.getClass().getSimpleName());\n entityManager.persist(entity);\n LOG.info(\"[insert] End\");\n return entity;\n }", "public void insertGestionStock(Map criteria);", "public void addEntity(Entity entity)\n {\n if (withinBounds(entity.getPosition()))\n {\n setOccupancyCell(entity.getPosition(), entity);\n this.entities.add(entity);\n }\n }", "@Override\n public void create(T entity) throws SQLException {\n\n this.dao.create(entity);\n\n }", "private void attachEntity(Usuario entity) {\n }", "@Override\n public void createRecipe(RecipeEntity recipeEntity)\n {\n this.save(recipeEntity);\n }", "CounselorBiographyTemp create(CounselorBiographyTemp entity);", "public static void Participationinsert( int id,String name,String FQN,String container,int participant_id,String lower,String upper,\n\t\t String row_name,String whole,String generalConnection,String table)\n\t { \n\t \n\t \ttry \n\t { \n\t Statement stmt=null; \n\t ResultSet res=null; \n\t Class.forName(\"com.mysql.jdbc.Driver\"); \n\t Connection conn = DriverManager.getConnection(sqldatabase,mysqluser,mysqlpassword); \n\t stmt = (Statement)conn.createStatement(); \n\t res= stmt.executeQuery(\"SELECT * from participation \"); \n\n\n\t // 增加数据\n\t Statement stm = (Statement) conn.createStatement();// 提交查巡\n\t String sql = \"select * from participation\";\n\t ResultSet rs = stm.executeQuery(sql);// 取得查巡結果\n//\t sql = \"insert into entity (id,name,FQN,container) values ('6','AccountType','Example2.O2.AccountType','Example2.O10')\";\n\t \n\t int n = stm.executeUpdate(\"insert into \"+table+\"( id,name,FQN,container,participant_id,lower,upper,row_name,whole,generalConnection) values (\"+\"'\"+id+\"'\"+\",\"+\"'\"+name+\"'\"+\",\"+\"'\"+FQN+\"'\"+\",\"+\"'\"+container+\"'\"\n\t +\",\"+\"'\"+participant_id+\"'\"+\",\"+\"'\"+lower+\"'\"+\",\"+\"'\"+upper+\"'\"+\",\"+\"'\"+row_name+\"'\"+\",\"+\"'\"+whole+\"'\"+\",\"+\"'\"+generalConnection+\"'\"+\")\"); // 增加数据 \n\t if (n > 0) {\n//\t JOptionPane.showMessageDialog(null, \"成功\");\n\t \n\t \n\t } else {\n//\t JOptionPane.showMessageDialog(null, \"失败\");\n\t }\n\t //增加数据结束\n\n\t while (res.next()) \n\t { \n\t \n\t } \n\t } \n\t \n\t catch(Exception ex) \n\t { \n\t ex.printStackTrace(); \n\t } \n\t}", "Integer addNew(InviteEntity builder) throws IOException;", "public void insertIntoLegalTable(JSONCard incomingCard) {\r\n for (JSONLegality legal : incomingCard.getLegalities()) {\r\n try (PreparedStatement st = parentController.getStatement(LEGAL_TABLE_INSERT);) {\r\n st.setString(1, MTGHelper.generateCardKey(incomingCard));\r\n st.setString(2, legal.getFormat().toUpperCase());\r\n st.setString(3, legal.getLegality().toUpperCase());\r\n st.execute();\r\n } catch (SQLException e) {\r\n }\r\n }\r\n }", "@Override\r\n\tpublic void save(HotelVendorEntity entity) {\n\t\tSystem.out.println(\"invoked save\"+entity);\r\n\t\tSystem.out.println(\"saved in database\");\r\n\t\t\r\n\t\tConfiguration cfg=new Configuration();\r\n\t\tcfg.configure();\r\n\t\tSessionFactory factory=cfg.buildSessionFactory();\r\n\t\tSession session=factory.openSession();\r\n\t\tsession.beginTransaction();\r\n\t\tsession.save(entity);\r\n\t\tsession.getTransaction().commit();\r\n\t\tsession.close();\r\n\t\tfactory.close();\r\n\t\t\r\n\t}", "int insert(DebtsRecordEntity record);", "public abstract boolean create(T entity) throws SQLException;", "public void addHospital(Hospital hospital) {\n\t\tlistOfHospitals.add(hospital); // Adds the object of the model \"hospital\" to the list created above\n\t\tString hospitalName = hospital.getHospitalName();\t// Gets the String name from the hospital model\n\t\tLong regionId = hospital.getRegionId(); // Gets the integer value of the region id\n System.out.println(\"regionId from GUI hospital object: \"+regionId);\n\t\t\n\t\tSession session = HibernateUtil.getSessionFactory().openSession();\n\t\t \n session.beginTransaction();\n \n Query regquery = session.createQuery(\"from Region where id= :id\");\n regquery.setLong(\"id\", regionId);\n Region region = (Region) regquery.uniqueResult();\n session.save(new Hospital(hospital.getHospitalName(), region));\n //session.save(hospital);\n session.getTransaction().commit();\n session.close();\n \n\t\t//Connection connection = null;\t// Instantiation of the connection to the database\n\t\t\n\t\t/**\n\t\t * The following contains a set of prepared statements to be prepared to be synchronized to the MySql database.\n\t\t * The prepared statements pull information that was saved to the model via the form submission.\n\t\t */\n /*\n\t\ttry {\n\t\t\tconnection = dataSource.getConnection(); // Connection of the dataSource with the MySql sever\n\t\t\t\n\t\t\tString sql = \"Insert into hospital (id, name, region_id) values(?, ?, ?)\"; // First sql statement that contains the information to query into hospital\n\t\t\tPreparedStatement ps = connection.prepareStatement(sql); // Instantiation of the class \"PreparedStatement\" of how the query statements are prepared to be added to the database and establishment of the sql query\n\t\t\t\n\t\t\tps.setInt(1, this.getMaxHospitalID()+1);\n\t\t\tps.setString(2, hospitalName);\n\t\t\tps.setInt(3, regionId);\n\t\t\t\n\t\t\tps.executeUpdate();\n\t\t\tps.close();\n\t\t} catch (SQLException e) { // Catches SQL exception errors\n\t\t\tthrow new RuntimeException(e);\n\t\t} finally {\n\t\t\tif (connection != null) { // Closes SQL connection \n\t\t\t\ttry {\n\t\t\t\t\tconnection.close();\n\t\t\t\t} catch (SQLException e) {}\n\t\t\t}\n\t\t}\n\t\t*/\n\t\treturn;\n\t}", "public void save(PtJJdwcy entity);", "private void addOrUpdateAssessment() {\n if (thisAssessmentId < 0) {\n addNewAssessment();\n } else {\n updateAssessment();\n }\n }", "void insert(Providers record);", "public void createNewObject(Representation entity) throws ResourceException {\r\n\t\tT entry = createObjectFromHeaders(null, entity);\r\n\t\texecuteUpdate(entity, entry, createUpdateObject(entry));\r\n\r\n\t}", "private void insertData() {\n compra = factory.manufacturePojo(CompraVentaEntity.class);\n compra.setId(1L);\n compra.setQuejasReclamos(new ArrayList<>());\n em.persist(compra);\n\n for (int i = 0; i < 3; i++) {\n QuejasReclamosEntity entity = factory.manufacturePojo(QuejasReclamosEntity.class);\n entity.setCompraVenta(compra);\n em.persist(entity);\n data.add(entity);\n compra.getQuejasReclamos().add(entity);\n }\n }", "int insertSelective(StudentEntity record);", "void create(Student entity);", "public int insert(IsEntityInDB obj) throws SQLException {\n if (!obj.getEntityName().equals(entityName)) {\n throw new IllegalArgumentException(\"Entity name and entity no match\");\n }\n HashMap<String, String> fields = obj.getNotNullFields();\n return execUpdate(new SqlBuilder(entityName)\n .insert(fields.keySet().toArray(new String[0]),\n fields.values().toArray(new String[0]))\n .toString());\n }", "int insert(CmsRoomBook record);", "private void insertEntry() {\n String desiredId = idField.getText();\n String desiredName = nameField.getText();\n String desiredMajor = majorField.getText();\n\n if (studentHashMap.containsKey(desiredId)) {\n this.displayStatusPanel(\n \"Error: A student with this information already exists.\",\n \"Error\",\n JOptionPane.WARNING_MESSAGE\n );\n } else {\n studentHashMap.put(desiredId, new Student(desiredName, desiredMajor));\n\n this.displayStatusPanel(\n \"Success: \" + desiredName + \" has been added.\",\n \"Success\",\n JOptionPane.INFORMATION_MESSAGE\n );\n }\n }", "public void insert(List<T> entity) throws NoSQLException;", "int insert(EcsSupplierRebate record);", "@Override\n\tpublic int insert(Entrust entrust) {\n\t\treturn entrustServiceImpl.insert(entrust);\n\t}", "public void addTrainingInitial(TrainingInitial ti) {\n\n //the new User's id\n Integer id = null;\n\n Session session = ConnectionFactory.getInstance().getSession();\n\n Transaction tx = null;\n\n try {\n\n tx = session.beginTransaction();\n\n session.saveOrUpdate(ti);\n tx.commit();\n\n\n } catch (HibernateException e) {\n try {\n tx.rollback(); //error\n } catch (HibernateException he) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n\n }", "org.hl7.fhir.ObservationRelated addNewRelated();", "WriteRequest insert(PiEntity entity);", "@Override\n\tpublic void saveOrUpdate(EmpType entity) {\n\n\t}", "@Override\n public final void makeFirstPrepareForSave(final Map<String, Object> pAddParam,\n final GoodsLoss pEntity) throws Exception {\n //nothing\n }", "com.microsoft.schemas.crm._2011.contracts.ArrayOfObjectiveRelation addNewObjectives();", "public void commitEntity();", "private void insertData() {\n PodamFactory factory = new PodamFactoryImpl();\n for (int i = 0; i < 3; i++) {\n VueltasConDemoraEnOficinaEntity entity = factory.manufacturePojo(VueltasConDemoraEnOficinaEntity.class);\n \n em.persist(entity);\n data.add(entity);\n }\n }", "int insertSelective(ResPartnerBankEntityWithBLOBs record);", "@Override\n\tpublic int create(Subordination entity) throws DBOperationException {\n\t\tPreparedStatement statement = null;\n\t\tint update = 0;\n\t\ttry {\n\t\t\tstatement = connection.prepareStatement(SUBORDINATION_ADD);\n\t\t\tstatement.setInt(1, entity.getSender().getEmployeeID());\n\t\t\tstatement.setInt(2, entity.getDocType().getDocTypeID());\n\t\t\tstatement.setInt(3, entity.getReceiver().getEmployeeID());\n\t\t\tupdate = statement.executeUpdate();\n\t\t\tstatement.close();\n\t\t} catch (SQLException e) {\n\t\t\tthrow new DBOperationException(\"Subordination not created. DB error.\", e);\n\t\t} \n\t\treturn update;\n\t}" ]
[ "0.6678828", "0.64346886", "0.61913985", "0.60263973", "0.5864533", "0.58428335", "0.58111495", "0.5802706", "0.5798042", "0.5792071", "0.57322174", "0.57156104", "0.5710477", "0.569226", "0.568267", "0.5641047", "0.562151", "0.5614802", "0.5590993", "0.5565882", "0.5553683", "0.55396307", "0.553821", "0.55324256", "0.55168486", "0.5512907", "0.5475951", "0.54703957", "0.5462107", "0.54565257", "0.5453123", "0.5443701", "0.5441889", "0.5438693", "0.5436449", "0.54162025", "0.54065883", "0.53951246", "0.53928006", "0.5392408", "0.5383868", "0.5381886", "0.53817886", "0.5375872", "0.53665304", "0.53609073", "0.5349424", "0.53449327", "0.5344896", "0.5343277", "0.53370464", "0.5336738", "0.5334778", "0.53199637", "0.53187263", "0.53171986", "0.5316934", "0.53007156", "0.5295515", "0.52857447", "0.52854705", "0.5284111", "0.52807164", "0.52607954", "0.52603126", "0.5256281", "0.5255128", "0.5254789", "0.5250132", "0.52413636", "0.52398056", "0.52349097", "0.5232314", "0.52299225", "0.52223593", "0.5219892", "0.52183306", "0.52164644", "0.52163875", "0.52152085", "0.5214207", "0.5210472", "0.52008194", "0.51973486", "0.51949203", "0.519362", "0.51908976", "0.5180621", "0.5176172", "0.5173902", "0.5173302", "0.5171186", "0.51688325", "0.51670957", "0.5166347", "0.5164523", "0.51607114", "0.5159155", "0.51581836", "0.5156736" ]
0.784052
0
/ This method check Id of entity is not null in Candidate table
public CandidateEntity checkId(Integer candidateId) throws NullValueFoundException { CandidateEntity candidateEntity = entityManager.find(CandidateEntity.class, candidateId); logger.info("Checking candidate with id: " + candidateEntity); if(candidateEntity==null) throw new NullValueFoundException("CandidateId: " + candidateId); return candidateEntity; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n\tpublic void testfindByIdCandidateOK() {\r\n\t\tassertTrue(evaluationService.findByIdCandidate(1).size() > 0); // Necessite au moins une evaluation associée au candidat de id=1\r\n\t}", "@Test\r\n\tpublic void testfindByIdCandidateKO() {\r\n\t\tassertTrue(evaluationService.findByIdCandidate(Integer.MAX_VALUE).isEmpty());\r\n\t}", "@Override\n public boolean equals(Object o) {\n if (this == o) {\n return true;\n }\n if (!(o instanceof Candidate)) {\n return false;\n }\n return id != null && id.equals(((Candidate) o).id);\n }", "public CandidateEntity checkName(String candidateName) throws NullValueFoundException {\n\t\tString jpql = \"SELECT candidate FROM CandidateEntity candidate where candidate.candidate_name=:pname\";\n\t\tTypedQuery<CandidateEntity> query = entityManager.createQuery(jpql, CandidateEntity.class);\n\t\tquery.setParameter(\"pname\", candidateName);\n\t\tquery.setMaxResults(1);\n\t\tCandidateEntity entity = query.getSingleResult();\n\t\tif (entity == null) {\n\t\t\tthrow new NullValueFoundException(\"faculty not found\");\n\t\t}\n\t\treturn entity;\n\t}", "@Override\n public boolean isValidEntity(Entity entity, IGame game, \n boolean useValidNonInfantryCheck) {\n return super.isValidEntity(entity, game, useValidNonInfantryCheck)\n && (entity.getId() == entityId);\n }", "boolean hasFromId();", "@Test(expected=IllegalArgumentException.class)\r\n\tpublic void testfindByIdCandidate() {\r\n\t\tevaluationService.findByIdCandidate(-1);\r\n\t}", "@Override\n public boolean isValid(int playerId, IGame game) {\n boolean retVal = false;\n for (int index = 0; (index < entityIds.length) && !retVal; index++) {\n if ((game.getEntity(entityIds[index]) != null)\n && (playerId == game.getEntity(entityIds[index])\n .getOwnerId())) {\n retVal = true;\n }\n }\n return retVal;\n }", "@Override\n public void validateEntity() {\n if ((Strings.isNullOrEmpty(this.getIdentity()) &&\n Strings.isNullOrEmpty(this.getFileSystemPath())) ||\n Strings.isNullOrEmpty(this.getSourceId())) {\n throw new IllegalArgumentException(\n \"Either the Entity Id or file system path used\" +\n \" to generate the id must be present along with the source id\");\n }\n }", "public boolean isSetEntityId() {\n return this.entityId != null;\n }", "@Override\n public boolean isValid(int playerId, Entity entity, IGame game) {\n return ((null != entity) && (entity.getOwnerId() == playerId) && isValidEntity(\n entity, game));\n }", "@Override\r\n\tpublic User check(Integer id) {\n\t\treturn null;\r\n\t}", "public boolean isSetEntityId() {\n return this.entityId != null;\n }", "public boolean isSetEntityId() {\n return this.entityId != null;\n }", "boolean existeId(Long id);", "@Override\n public boolean containsId(int Id) {\n try {\n Entity retValue = null; \n Connection c = null;\n PreparedStatement pstmt = null;\n ResultSet rs = null;\n c = DBUtils.getConnection();\n pstmt = c.prepareStatement(\"SELECT * FROM curso where idcurso = ?\");\n\n pstmt.setInt(1, Id);\n\n rs = pstmt.executeQuery();\n\n if (rs.next()) {\n return true; \n } \n \n } catch (SQLException ex) {\n Logger.getLogger(JdbcCursoRepository.class.getName()).log(Level.SEVERE, null, ex);\n }\n return false;\n }", "public UserEntity containsUserAndValid(long id) {\n Query query = manager.createQuery(\"select e from UserEntity e where e.id=:id\");\n List<UserEntity> list = query.setParameter(\"id\", id).getResultList();\n if (list.size() > 0) {\n UserEntity entity = list.get(0);\n FindIterable<Document> users = database.getCollection(\"users\").find(Filters.and(\n Filters.eq(UserMongo.objectId, new ObjectId(entity.getMongoId())),\n Filters.eq(UserMongo.isAccept, true),\n Filters.eq(UserMongo.isActive, true),\n Filters.or(\n Filters.eq(UserMongo.role, Role.manager),\n Filters.eq(UserMongo.role, Role.teacher)\n )\n ));\n if (users.iterator().hasNext()) {\n return entity;\n }\n }\n return null;\n }", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "@Override\n\tpublic Boolean exists(Integer id) {\n\t\treturn null;\n\t}", "@Override\n public boolean isValid(Long id, ConstraintValidatorContext constraintValidatorContext) {\n try {\n flightService.getFlight(id.intValue());\n } catch (NotFoundException e) {\n return true;\n }\n return false;\n }", "void checkNotFound(Integer id);", "boolean hasCandidate();", "boolean hasSuccessorId();", "public boolean isEveryIdValid()\n {\n return(idValidation.size()==0);\n }", "@Override\n public boolean exists(Long id) {\n return false;\n }", "@Override\n public boolean exists(Long id) {\n return false;\n }", "boolean existePorId(Long id);", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof VentaCombustible)) {\r\n return false;\r\n }\r\n VentaCombustible other = (VentaCombustible) object;\r\n if ((this.ventaCombustibleId == null && other.ventaCombustibleId != null) || (this.ventaCombustibleId != null && !this.ventaCombustibleId.equals(other.ventaCombustibleId))) {\r\n return false;\r\n }\r\n return true;\r\n }", "@Test\n @Transactional\n public void testEntityFromId() {\n assertThat(teamMapper.fromId(42L).getId()).isEqualTo(42);\n assertThat(teamMapper.fromId(null)).isNull();\n }", "public CandidateEntity viewCandidate(int candidate_id) throws RecordNotFoundException {\n\t\tCandidateEntity entity = entityManager.find(CandidateEntity.class, candidate_id);\n\t\tQuery query = entityManager.createQuery(\"SELECT c from CandidateEntity c\");\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<CandidateEntity> list = (List<CandidateEntity>)query.getResultList();\n\t logger.info(\"Candidate List\");\n\t\tfor(CandidateEntity c: list) {\n\t\t\tSystem.out.println(c);\n\t\t}\n\t\tif(entity==null)\n\t\t{\n\t\t\tthrow new RecordNotFoundException(\"CandidateId\"+candidate_id);\n\t\t}\n\t\treturn entity;\n\t}", "@Override\r\n\t\t\tpublic boolean isVisible() {\n\t\t\t\treturn (candidateId != 0);\r\n\t\t\t}", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof TblApplicantVacancy)) {\n return false;\n }\n TblApplicantVacancy other = (TblApplicantVacancy) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }", "private void verificaIdade() {\r\n\t\thasErroIdade(idade.getText());\r\n\t\tisCanSave();\r\n\t}", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof PersonEntity)) {\n return false;\n }\n PersonEntity other = (PersonEntity) object;\n if ((this.personId == null && other.personId != null) || (this.personId != null && !this.personId.equals(other.personId))) {\n return false;\n }\n return true;\n }", "@Override\r\n\tpublic void validateIntegrityConstraint() {\n\t\tvalidatorEngine.validate(entity);\r\n\t}", "boolean isValid(String candidateOid);", "@Override\n @Transactional(readOnly = true)\n public boolean checkExistenceById(String branchId) throws BranchServiceException, SQLException {\n checker.rejectIfNullOrEmpty(branchId, new BranchServiceException(EMPTY_BRANCH_ID));\n long branchIdLong = checker.parseUnsignedLong(branchId, new BranchServiceException(INVALID_BRANCH_ID));\n\n return branchRepo.isCached(branchIdLong) || branchDao.checkExistenceById(branchIdLong);\n }", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Opportunity)) {\r\n return false;\r\n }\r\n Opportunity other = (Opportunity) object;\r\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\r\n return false;\r\n }\r\n return true;\r\n }", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof AnnouncementEntity)) {\r\n return false;\r\n }\r\n AnnouncementEntity other = (AnnouncementEntity) object;\r\n if ((this.announcementId == null && other.announcementId != null) || (this.announcementId != null && !this.announcementId.equals(other.announcementId))) {\r\n return false;\r\n }\r\n return true;\r\n }", "public boolean exists( Integer idConge ) ;", "@Override\n\tpublic void setCandidateId(long candidateId) {\n\t\t_candidate.setCandidateId(candidateId);\n\t}", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof ConvenioVO)) {\n return false;\n }\n ConvenioVO other = (ConvenioVO) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }", "@Test\n void testErrorValidation() {\n jdbcTemplate.execute(\"update obligor set name = null where id = '25410'\");\n assertThatThrownBy(() -> obligorJpaService.findObligorById(25410)).isInstanceOf(ConstraintViolationException.class)\n .hasMessageContaining(\"findObligorById.<return value>.name:\");\n }", "@Test\n public void checkValidEntity() {\n cleanEntity0();\n entity0 = EntityUtil.getSampleRole();\n final Set<ConstraintViolation<Object>> cv = PersistenceValidation.validate(entity0);\n assertTrue(cv.isEmpty());\n }", "@Override\n public boolean compruebaPorId(Integer id) {\n return usuarioRepository.existsById(id);\n }", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof CiudadanoEntity)) {\r\n return false;\r\n }\r\n CiudadanoEntity other = (CiudadanoEntity) object;\r\n if ((this.idCiudadano == null && other.idCiudadano != null) || (this.idCiudadano != null && !this.idCiudadano.equals(other.idCiudadano))) {\r\n return false;\r\n }\r\n return true;\r\n }", "@Override\n public boolean isValid(String potentialId, ConstraintValidatorContext context) {\n // Detecting nulls, empties and whitespace is the responsibility of other validations.\n // Responding true here indicates that this validator does not have an opinion about empty values.\n if (StringUtils.isBlank(potentialId)) { return true; }\n\n boolean pass = true;\n if (Character.isDigit(potentialId.charAt(0))) {\n context.buildConstraintViolationWithTemplate(\"An id cannot start with a digit.\").addConstraintViolation();\n pass = false;\n }\n if (potentialId.contains(\" \") || potentialId.contains(\"\\n\")) {\n context.buildConstraintViolationWithTemplate(\"An id should not contain whitespace.\").addConstraintViolation();\n pass = false;\n }\n\n if (!pass) {\n context.disableDefaultConstraintViolation();\n }\n\n return pass;\n }", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Infoentity)) {\r\n return false;\r\n }\r\n Infoentity other = (Infoentity) object;\r\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\r\n return false;\r\n }\r\n return true;\r\n }", "public Boolean isValid(IMDBBaseEntity entity) {\n return entity !=null;\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Contrato)) {\n return false;\n }\n Contrato other = (Contrato) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }", "public abstract boolean isValidID(long ID);", "private Optional<Entry> checkId(final Long eid) {\n Optional<Entry> result = Optional.empty();\n if (eid != null) {\n final Entry existing = this.dao.findOne(eid);\n if (existing != null\n && Objects.equals(\n existing.getUser().getId(),\n SecurityUtils.actualUser().getId()\n )\n ) {\n result = Optional.of(existing);\n }\n if (!result.isPresent()) {\n AbstractException.throwEntryIdNotFound(eid);\n }\n }\n return result;\n }", "boolean hasEntity();", "boolean hasEntity();", "@Override\n\tpublic boolean existe(Long id) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean existe(Long id) {\n\t\treturn false;\n\t}", "@NotNull\n String getId();", "@Override\n @Transient\n public boolean isIdSet() {\n return getId() != null && getId().areFieldsSet();\n }", "@Override\n\tpublic Result<VoteCandidate> update(@PathVariable(\"id\") long id, VoteCandidate newEntity) {\n\t\treturn null;\n\t}", "public void testNonExistanceID() throws Exception {\n\n // check that resolvement fails\n super.checkResolveNonExistanceID();\n\n // occurrence should be null\n assertNull(tag.getOccurrence());\n\n }", "boolean hasID();", "boolean hasID();", "boolean hasID();", "boolean hasID();", "boolean hasID();", "boolean hasID();", "boolean hasID();", "boolean hasID();", "boolean hasID();", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Tmproyecto)) {\n return false;\n }\n Tmproyecto other = (Tmproyecto) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }", "boolean getOrderPersonIdNull();", "boolean checkVoterId(int VoterId) throws NoVoterIdException {\n\n\t\ttry {\n\t\t\tif (1000 <= VoterId && VoterId <= 9000) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthrow new NoVoterIdException(\"Incorrect ID -- Not Eligible\");\n\t\t\t}\n\t\t} catch (NoVoterIdException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\treturn false;\n\t}" ]
[ "0.62791544", "0.61823803", "0.6080729", "0.59592766", "0.58797365", "0.58426064", "0.57497835", "0.5715547", "0.5685179", "0.5677098", "0.56510824", "0.5589191", "0.55818874", "0.55818874", "0.55803835", "0.5575379", "0.55508286", "0.5518748", "0.5518748", "0.5518748", "0.5518748", "0.5518748", "0.5518748", "0.5518748", "0.5518748", "0.5518748", "0.5518748", "0.5518748", "0.5518748", "0.5518748", "0.5518748", "0.5518748", "0.5518748", "0.5518748", "0.5518748", "0.5518748", "0.5518748", "0.5518748", "0.5518748", "0.5518748", "0.5518748", "0.5518748", "0.5518748", "0.5518748", "0.5518748", "0.5518748", "0.55093944", "0.54862", "0.54624295", "0.54390705", "0.5433145", "0.54218554", "0.53928727", "0.53928727", "0.53851426", "0.53762436", "0.53727806", "0.5372694", "0.53640664", "0.5348314", "0.53452027", "0.533511", "0.53257984", "0.5292045", "0.528696", "0.528647", "0.52836156", "0.5279047", "0.52780384", "0.5276482", "0.5264562", "0.52445847", "0.5223333", "0.5222626", "0.52220315", "0.5214665", "0.5213288", "0.52124864", "0.52109694", "0.5203851", "0.51990205", "0.51990205", "0.51981777", "0.51981777", "0.51899683", "0.51886064", "0.51723003", "0.5171812", "0.5170643", "0.5170643", "0.5170643", "0.5170643", "0.5170643", "0.5170643", "0.5170643", "0.5170643", "0.5170643", "0.5162787", "0.5151303", "0.5151089" ]
0.74837106
0
/ This method check name of entity is not null in Candidate table
public CandidateEntity checkName(String candidateName) throws NullValueFoundException { String jpql = "SELECT candidate FROM CandidateEntity candidate where candidate.candidate_name=:pname"; TypedQuery<CandidateEntity> query = entityManager.createQuery(jpql, CandidateEntity.class); query.setParameter("pname", candidateName); query.setMaxResults(1); CandidateEntity entity = query.getSingleResult(); if (entity == null) { throw new NullValueFoundException("faculty not found"); } return entity; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public CandidateEntity checkId(Integer candidateId) throws NullValueFoundException {\n\t\tCandidateEntity candidateEntity = entityManager.find(CandidateEntity.class, candidateId);\n\t\tlogger.info(\"Checking candidate with id: \" + candidateEntity);\n\t\tif(candidateEntity==null)\n\t\t\tthrow new NullValueFoundException(\"CandidateId: \" + candidateId);\n\t\treturn candidateEntity;\n\t}", "@Override\n public boolean containsNameProfesor(String Name) {\n try {\n Entity retValue = null; \n Connection c = null;\n PreparedStatement pstmt = null;\n ResultSet rs = null;\n c = DBUtils.getConnection();\n pstmt = c.prepareStatement(\"SELECT * FROM persona where nombre = ?\");\n\n pstmt.setString(1, Name);\n\n rs = pstmt.executeQuery();\n\n if (rs.next()) {\n return true; \n } \n \n } catch (SQLException ex) {\n Logger.getLogger(JdbcCursoRepository.class.getName()).log(Level.SEVERE, null, ex);\n }\n return false;\n }", "private boolean checkName(String name) {\n if (!name.equals(\"\")) {\n //Check si le nom est déjà utilisé\n return myDbA.checkName(name);\n }\n return false;\n }", "@Test\n public void testIsNullValidName() {\n FieldVerifier service = new FieldVerifier();\n String name = null;\n boolean result = service.isValidName(name);\n assertEquals(false, result);\n }", "public boolean verificaUnicidadeNome() {\n\t\tif(!EntidadesDAO.existeNome(entidades.getNome())) {\n\t\t\treturn true;\n\t\t}else {\n\t\t\treturn false;\n\t\t}\n\t}", "private boolean validEntry() {\n EditText locationName = (EditText) findViewById(R.id.nameInput);\n\n // Validate required null fields\n if (locationName.getText().toString().trim().equals(\"\"))\n {\n return false;\n }\n\n // Query database to determine if name already exists in database\n String placeName = locationName.getText().toString();\n if (!placeName.equals(currentPlace.name)) {\n try {\n PlacesDB db = new PlacesDB((Context) this);\n SQLiteDatabase pDB = db.openDB();\n Cursor cur = pDB.rawQuery(\"select name from places where name=? ;\", new String[]{placeName});\n if (cur.getCount() > 0) {\n return false;\n }\n } catch (Exception ex) {\n android.util.Log.w(this.getClass().getSimpleName(), \"Unable to load places from database.\");\n }\n }\n return true;\n }", "@Override\r\n public boolean checkNull() {\r\n // Check if the two textfields are null or default \r\n return newIng_ingName.getText().equals(\"\") || newIng_ingCal.getText().equals(\"\");\r\n }", "public void firstNameCheck() {\n\t\t\tif (getNameOfTheCard().equalsIgnoreCase(getCustomerFullName())) {\n\t\t\t\tsetColAuthorizedby(null);\n\t\t\t\tsetColpassword(null);\n\t\t\t\tsetBooAuthozed(false);\n\t\t\t} else {\n\n\n\t\t\t\tList<DebitAutendicationView> localEmpllist = iPersonalRemittanceService.getdebitAutendicationList();\n\t\t\t\tsetEmpllist(localEmpllist);\n\n\t\t\t\tsetColAuthorizedby(null);\n\t\t\t\tsetColpassword(null);\n\t\t\t\tsetBooAuthozed(true);\n\t\t\t\t// populate alert msg if customer name not match\n\t\t\t\tsetExceptionMessage(Constants.NameCheckAlertMsg);\n\t\t\t\tRequestContext.getCurrentInstance().execute(\"alertmsg.show();\");\n\t\t\t}\n\t\t}", "private boolean validateObjectForDB() {\n\t\tboolean l_ret = true;\n\t\tif (m_country_name.equals(\"\")) {\n\t\t\tm_error_string = \"Unable to add the country. Country name is required.\";\n\t\t\tl_ret = false;\n\t\t}\n\t\treturn (l_ret);\n\t}", "@Override\n\tpublic boolean isExists(AbilityFlavorText entity) {\n\t\treturn false;\n\t}", "@Test\n\tpublic void IscaseNameNotExist(){\n\t\tString caseName = \"Real 3D Cases\";\n\t\tboolean isExist;\n\t\ttry {\n\t\t\tisExist = CaseManagerValidator.isCaseNameExist(caseName);\n\t\t\tassertFalse(isExist);\n\t\t} catch (Exception e) {\n\t\t\tfail();\n\t\t}\n\t\t\n\t}", "boolean isNameRequired();", "private void checkNameValidation(String name) throws noStudentNameException{\n\t\tif (name.isEmpty()){\n\t\t\tthrow new noStudentNameException(\"Student Name Cannot be Empty!\");\n\t\t}\n\t}", "private boolean isNillable(String name) {\r\n if (schema == null) {\r\n return true;\r\n }\r\n PropertyDescriptor descriptor = schema.getDescriptor(name);\r\n return descriptor == null || descriptor.isNillable();\r\n }", "boolean hasEntity();", "boolean hasEntity();", "@Test\n public void checkValidEntity() {\n cleanEntity0();\n entity0 = EntityUtil.getSampleRole();\n final Set<ConstraintViolation<Object>> cv = PersistenceValidation.validate(entity0);\n assertTrue(cv.isEmpty());\n }", "private static <T extends HmBo> boolean checkBONameExists(Class<T> boClass, String name, Object value) {\r\n List<?> boIds = QueryUtil.executeQuery(boClass, null,\r\n new FilterParams(name, value),\r\n AhRestoreNewMapTools.getonlyDomain().getId());\r\n\t return !boIds.isEmpty();\r\n\t}", "@Override\n public void validateEntity() {\n if ((Strings.isNullOrEmpty(this.getIdentity()) &&\n Strings.isNullOrEmpty(this.getFileSystemPath())) ||\n Strings.isNullOrEmpty(this.getSourceId())) {\n throw new IllegalArgumentException(\n \"Either the Entity Id or file system path used\" +\n \" to generate the id must be present along with the source id\");\n }\n }", "public boolean isNotNullFKColumn() {\n for (Entry<ColumnInfo, ColumnInfo> entry : getLocalForeignColumnInfoMap().entrySet()) {\n final ColumnInfo localColumnInfo = entry.getKey();\n if (!localColumnInfo.isNotNull()) {\n return false;\n }\n }\n return true;\n }", "@Test(expected = IllegalArgumentException.class)\n public void testAddExpenseWithNullName() {\n\tDefaultTableModel model = new DefaultTableModel();\n\tExpense e = new Expense(\"\", 8, LocalDate.of(2015, 10, 22), ExpenseType.DAILY);\n\texpenseManager.addExpense(e, model);\n }", "boolean hasCandidate();", "public static void checkObjectNotNull(Object obj, String name) {\n if (obj == null) {\n throw new IllegalArgumentException(name + \" is null.\");\n }\n }", "public boolean isNotNullAccountName() {\n return genClient.cacheValueIsNotNull(CacheKey.accountName);\n }", "protected void validateEntity() {\n super.validateEntity();\n }", "public Boolean isValid(IMDBBaseEntity entity) {\n return entity !=null;\n }", "@Test\n void testErrorValidation() {\n jdbcTemplate.execute(\"update obligor set name = null where id = '25410'\");\n assertThatThrownBy(() -> obligorJpaService.findObligorById(25410)).isInstanceOf(ConstraintViolationException.class)\n .hasMessageContaining(\"findObligorById.<return value>.name:\");\n }", "public void setName(String value)\n {\n // Since this value is marked as \"mandatory,\" the BC4J Framework will take\n // care of ensuring that it's a non-null value. However, if it is null, we\n // don't want to proceed with any validation that could result in a NPE.\n \n if ((value != null) || (!(\"\".equals(value.trim()))))\n {\n // Verify that the name is unique. To do this, we must check both the entity\n // cache and the database. We begin with the entity cache.\n\n com.sun.java.util.collections.Iterator supplierIterator = \n getEntityDef().getAllEntityInstancesIterator(getDBTransaction());\n \n Number currentId = getSupplierId();\n \n while ( supplierIterator.hasNext() )\n {\n SupplierEOImpl cachedSupplier = (SupplierEOImpl)supplierIterator.next();\n\n String cachedName = cachedSupplier.getName();\n Number cachedId = cachedSupplier.getSupplierId();\n\n // We found a match for the name we're trying to set, so throw an\n // exception. Note that we need to exclude this EO from our test.\n \n if (cachedName != null && value.equalsIgnoreCase(cachedName) && \n cachedId.compareTo(currentId) != 0 )\n {\n throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT,\n getEntityDef().getFullName(), // EO name\n getPrimaryKey(), // EO PK\n \"Name\", // Attribute Name\n value, // Attribute value\n \"AK\", // Message product short name\n \"FWK_TBX_T_SUP_DUP_NAME\"); // Message name \n }\n } \n\n // Now we want to check the database for any occurences of the supplier\n // name. The most efficient way to check this is with a validation view\n // object to which we add to a special \"Validation\" application module.\n // We then added a \"supplierExists\" method to this entity's expert. This\n // method leverages the VAM and the VVO.\n\n OADBTransaction transaction = getOADBTransaction();\n SupplierEntityExpert expert = getSupplierEntityExpert(transaction);\n\n if (expert.supplierExists(value))\n {\n throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT,\n getEntityDef().getFullName(), // EO name\n getPrimaryKey(), // EO PK\n \"Name\", // Attribute Name\n value, // Attribute value\n \"AK\", // Message product short name\n \"FWK_TBX_T_SUP_DUP_NAME\"); // Message name\n }\n }\n \n setAttributeInternal(NAME, value);\n \n }", "@Override\n\tpublic boolean isValid(String value, ConstraintValidatorContext context) {\n\t\treturn value != null && employeeDetailsService.retrieveEmployeeByEmail(value) == null;\n\t}", "public boolean accept(Thing candidate){\n // If the field is not empty perform collision\n if(thing != null)\n candidate.collideWith(thing);\n\n // If the field is empty after the collision the new one can step on it\n if(thing == null) {\n thing = candidate;\n candidate.setField(this);\n return true;\n }else {\n return false;\n }\n }", "@Test\n\tpublic void IscaseNameExist(){\n\t\tString caseName = \"leather case\";\n\t\tboolean isExist;\n\t\ttry {\n\t\t\tisExist = CaseManagerValidator.isCaseNameExist(caseName);\n\t\t\tassertTrue(isExist);\n\t\t} catch (Exception e) {\n\t\t\tfail();\n\t\t}\n\t\t\n\t}", "public boolean nameRequired(){\n return hasBeenSaved() && users != null && users.size() > 1;\n }", "boolean getCampaignNameNull();", "private boolean haveEmptyField() {\n return getTextID(FIRST_NAME).isEmpty() ||\n getTextID(LAST_NAME).isEmpty() ||\n getTextID(ADDRESS).isEmpty();\n }", "@Override\n public boolean isValidEntity(Entity entity, IGame game, \n boolean useValidNonInfantryCheck) {\n return super.isValidEntity(entity, game, useValidNonInfantryCheck)\n && (entity.getId() == entityId);\n }", "public boolean isSetPk_name() {\n return this.pk_name != null;\n }", "private static void checkNull(Object value, String name) throws LateDeliverablesProcessingException {\r\n if (value == null) {\r\n throw new LateDeliverablesProcessingException(\"The \" + name + \" should not be null.\");\r\n }\r\n }", "public boolean isSetFk_name() {\n return this.fk_name != null;\n }", "@Test\n public void labelIsNotNull() {\n propertyIsNot(null, null, CodeI18N.FIELD_NOT_NULL, \"name property must not be null\");\n }", "public static void checkNull(Object value, String name) {\r\n if (value == null) {\r\n throw new IllegalArgumentException(\"The \" + name + \" is null.\");\r\n }\r\n }", "@Test(expected = DataIntegrityViolationException.class)\n public void testInsertNullDepartmentName() throws Exception {\n Department insertDepartment = new Department(null);\n departmentDao.addDepartment(insertDepartment);\n\n }", "public void NoGodHasSuchName() {\n notifyGodNotCorrect(this.getCurrentTurn().getCurrentPlayer().getNickname(), availableGods, chosenGodList);\n }", "@SuppressWarnings(\"rawtypes\")\n\tpublic boolean isNameInUse(String name,String idOwner)\n\t{\n\t\topen();\n\t\ttry\n\t\t{\n\t\t\tSystem.out.println(name);\n\t\t\tQuery query=DB.query();\n\t\t\tquery.constrain(Census.class);\n\t\t\tquery.descend(\"idOwner\").constrain(idOwner);\n\t\t\tquery.descend(\"censusName\").constrain(name).endsWith(false);\n\t\t\t\n\t\n\t\t\t\n\t\t\tObjectSet result=query.execute();\n\t\t\t\n\t\t\tif(result.hasNext())\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tclose();\n\t\t}\n\t\t\n\t\treturn false;\n\t\t\n\t}", "private boolean isValid() {\n\t\treturn proposalTable != null && !proposalTable.isDisposed();\n\t}", "@Test\r\n\tpublic void testfindByIdCandidateKO() {\r\n\t\tassertTrue(evaluationService.findByIdCandidate(Integer.MAX_VALUE).isEmpty());\r\n\t}", "public void validate() throws org.apache.thrift.TException {\n if (entity != null) {\r\n entity.validate();\r\n }\r\n }", "public void checkUsernameExist() {\n\n try {\n BLUser bluser = new BLUser();\n User user = new User();\n\n ResultSet rs = bluser.selectUserIdFromUsername(txt_username.getText());\n\n user.setUsername(txt_username.getText());\n bluser.setUser(user);\n\n if (bluser.checkUsernameExist()) {\n \n populateDataOnTable();\n }// end if\n else {\n JOptionPane.showMessageDialog(rootPane, \"Invalid username!\");\n }// end else \n\n }// end try\n catch (Exception ex) {\n JOptionPane.showMessageDialog(null, ex.getMessage(), \"Exception\", JOptionPane.INFORMATION_MESSAGE);\n }//end catch\n }", "protected void checkIfOrdersEntityIsNullAndCreateOrders() {\n if (ordersEntity == null) {\n log.info(\"OrdersBean : Aucun Orders n'est trouvé\");\n createOrders();\n }\n }", "private void init(){\r\n\t\tString fullName = this.person_.getFirstName()+\" \"+this.person_.getLastName();\r\n\t\tboolean alreadyExists = PersonModel.exists(fullName);\r\n\t\t\r\n\t\tif(alreadyExists == true){\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\t//need to create person\r\n\t\t\tPersonModel pm = new PersonModel(fullName);\r\n\t\t\tpm.save();\r\n\t\t}\r\n\r\n\t}", "@Override\r\n\tpublic void validateIntegrityConstraint() {\n\t\tvalidatorEngine.validate(entity);\r\n\t}", "void checkRep() {\n\t\tassert this.clauses != null : \"SATProblem, Rep invariant: clauses non-null\";\n\t}", "@SuppressWarnings(\"ConstantConditions\")\n @Override\n public Boolean isNameAlreadyExist(Dress dress) {\n LOGGER.debug(\"is name exists - {}\", dress);\n MapSqlParameterSource parameterSource = new MapSqlParameterSource();\n if (dress.getDressId() == null) {\n parameterSource.addValue(DRESS_ID, 0);\n } else {\n parameterSource.addValue(DRESS_ID, dress.getDressId());\n }\n parameterSource.addValue(DRESS_NAME, dress.getDressName());\n return jdbcTemplate.queryForObject(uniqueNameSql, parameterSource,\n Integer.class) != 0;\n }", "private boolean validateMandatoryParameters(QuotationDetailsDTO detail) {\t\n\n\t\tif(detail.getArticleName() == null || detail.getArticleName().equals(EMPTYSTRING)){\t\t\t\n\t\t\tAdminComposite.display(\"Please Enter Article Name\", STATUS_SUCCESS, SUCCESS_FONT_COLOR);\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "@Override\n\tprotected boolean isValidaInserir(ContatoTipo entity) {\n\t\treturn false;\n\t}", "private static Person findPersonByNameThatMayNotHaveDogs(EntityManager em, String name) {\n\t\tQuery query = em.createQuery(\"select p from Person p left join fetch p.dogs where p.name = :name\", Person.class);\n\t\tquery.setParameter(\"name\", name);\n\t\treturn (Person) query.getSingleResult();\n\t}", "private boolean moreProfileExists(String name) {\n \tdb = dbHelper.getReadableDatabase();\n\t Cursor cursor = db.query(DbContract.MoreEntry.TN, DbContract.MoreEntry.allColumns, DbContract.MoreEntry.CN_NAME + \" = '\" + name + \"'\", null, null, null, null);\n cursor.moveToFirst();\n if (cursor.getCount() == 0 || cursor.getString(1) == null){\n \tcursor.close();\n \treturn false;\n } \n cursor.close();\n return true;\n\t}", "private static boolean checkCwpNameExists(String name, Object value) {\r\n\t\tList<?> boIds = QueryUtil.executeQuery(\r\n\t\t\t\t\"select bo.id from \" + Cwp.class.getSimpleName() + \" bo\", null, new FilterParams(\r\n\t\t\t\t\t\tname, value), AhRestoreNewMapTools.getonlyDomain().getId());\r\n\t\treturn !boIds.isEmpty();\r\n\t}", "@Test\r\n\tpublic void testfindByIdCandidateOK() {\r\n\t\tassertTrue(evaluationService.findByIdCandidate(1).size() > 0); // Necessite au moins une evaluation associée au candidat de id=1\r\n\t}", "@Override\n\tprotected void check() throws SiDCException, Exception {\n\t\tif (entity == null) {\n\t\t\tthrow new SiDCException(APIStatus.ILLEGAL_ARGUMENT, \"illegal of request.\");\n\t\t}\n\t\tif (StringUtils.isBlank(entity.getStatus())) {\n\t\t\tthrow new SiDCException(APIStatus.ILLEGAL_ARGUMENT, \"illegal of status.\");\n\t\t}\n\t\tif (StringUtils.isBlank(entity.getLangcode())) {\n\t\t\tthrow new SiDCException(APIStatus.ILLEGAL_ARGUMENT, \"illegal of lang code.\");\n\t\t}\n\t}", "public void checkValid(ObjectEntity object) {\n if (object == null) {\n throw new SgtBackendRequirementException(\"No se ha especificado un tipo de objeto\");\n }\n\n if (object.getRepository() == null) {\n throw new SgtBackendRequirementException(\"No hay ninguna entidad asociada\");\n }\n\n if (!objectEntityRepository.existsById(object.getCode())) {\n throw new SgtBackendRequirementException(\"La entidad objeto \" + object.getCode() + \" no existe\");\n }\n }", "public final void testNoName() {\n testTransaction1.setName(\"\");\n assertFalse(testTransaction1.isValidTransaction());\n }", "public boolean isNameSet( ) {\n \t\t\treturn id == null;\n \t\t}", "@Test\n @Transactional\n public void checkNameIsRequired() throws Exception {\n assertThat(unitRepository.findAll()).hasSize(0);\n // set the field null\n unit.setName(null);\n\n // Create the Unit, which fails.\n restUnitMockMvc.perform(post(\"/api/units\")\n .contentType(TestUtil.APPLICATION_JSON_UTF8)\n .content(TestUtil.convertObjectToJsonBytes(unit)))\n .andExpect(status().isBadRequest());\n\n // Validate the database is still empty\n List<Unit> units = unitRepository.findAll();\n assertThat(units).hasSize(0);\n }", "private boolean testNulls(Fact req, ArrayList<Fact> facts) {\n boolean isNull = req.valueIsNotNull();\n for (Fact fact: facts) if (fact.getName().equals(req.getName())) {\n return isNull;\n }\n return !isNull;\n }", "boolean checkNull();", "@Override\n\tpublic boolean isExist(String name) {\n\t\treturn false;\n\t}", "@Nullable boolean hasBlockEntity();", "public boolean hasVName() {\n return vNameBuilder_ != null || vName_ != null;\n }", "boolean isIsNotNull();", "@XmlTransient\n\tpublic boolean isCandidateContactsEmpty() {\n\t\treturn (candidateContacts.isEmpty());\n\t}", "@Test\n public void testIsEmptyValidName() {\n FieldVerifier service = new FieldVerifier();\n String name = \"\";\n boolean result = service.isValidName(name);\n assertEquals(false, result);\n }", "boolean checkNoDuplicateFields() {\n\t if (duplicateNames == null | duplicateNames.isEmpty())\n\t return true;\n\t Iterator iter = duplicateNames.iterator();\n\t String names = \"\";\n\t while (iter.hasNext()) {\n\t names = names + iter.next(); \n\t }\n\t cat.error(loc,DUPLICATE_COLUMN_NAMES,new Object[] {names});\n\t return false;\n\t }", "@Override\n\tpublic boolean isNameField(String field, String associatedEntity) {\n\t\treturn false;\n\t}", "public boolean checkIfExist(Coupon coupon) throws DbException;", "public void isPlannable() {\n\t\tsession.flush();\n\t\tLong count = (Long) session.createQuery(\"select count(*) from PlanningCard c where c.card.name = :name\")\n\t\t\t.setParameter(\"name\", name).uniqueResult();\n\n\t\tassertThat(count, is(1l));\n\t}", "@Override\n protected void preconditions(Object entity) throws Exception {\n }", "public boolean isValid() {\n return _id != null && !_id.isEmpty() &&\n _name != null && !_name.isEmpty() &&\n _created != null && !_created.isEmpty();\n }", "String getObjectCheckSql(String name);", "public boolean isNull(){\n return false;\n }", "public boolean isInsert(String name){\n Cursor a = db.query(TABLE_NAME,new String[]{NAME}, NAME + \" LIKE \\\"\" + name + \"\\\"\",null,null,null, null);\n\n if (a.getCount() == 0){\n return false;\n }else{\n return true;\n }\n }", "@Test\n public void testFindProviderEntryByName() throws ConnectionException {\n ProviderEntry result = MariaDbConnectorTest.instance.findProviderEntryByName(\"Waze\");\n assertTrue((result != null)&& (result.getName() != null) && !(result.getName().equals(\"\")) && (result.getName().length() != 0));\n }", "@PrePersist()\r\n\tpublic void initEntity(){\r\n\t\tthis.name = WordUtils.capitalizeFully(this.name);\r\n\t}", "public static boolean isNameValid(Context context, String name) {\n if (name.isEmpty()) {\n Toast.makeText(context, \"Name field cannot be empty\", Toast.LENGTH_LONG);\n return false;\n }\n return true;\n }", "private void checkIfIsAValidClass(IDatabaseClass annotationClass){\n if (annotationClass == null || annotationClass.tableName() == \"\") {\n throw new CustomException(\"No table name found in your class declaration!\");\n }\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Bd)) {\n return false;\n }\n Bd other = (Bd) object;\n if ((this.name == null && other.name != null) || (this.name != null && !this.name.equals(other.name))) {\n return false;\n }\n return true;\n }", "private void validateCanDeleteName(long truthSetId) throws NameSystemException {\n DbTruthSet dbTruthSet = getTruthSetDAO().get(truthSetId);\n if (dbTruthSet == null) {\n throw new NameDataException(getMessage(\"name.05.not_found\", truthSetId));\n }\n\n List<DbTruth> dbAttrs = getTruthDAO().getByNameId(truthSetId);\n if (dbAttrs != null && dbAttrs.size() > 0) {\n //TODO: Need log entry to bring up to current logging standard\n throw new NameDataException(getMessage(\"name.06.has_attr\", truthSetId));\n }\n }", "public void testGetCreationUserMatchCriteriaNullUser() {\r\n try {\r\n FieldMatchCriteria.getCreationUserMatchCriteria(null);\r\n fail(\"testGetCreationUserMatchCriteriaNullUser is failure.\");\r\n } catch (IllegalArgumentException iae) {\r\n // pass\r\n } catch (Exception e) {\r\n fail(\"testGetCreationUserMatchCriteriaNullUser is failure.\");\r\n }\r\n }", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Counsillor)) {\r\n return false;\r\n }\r\n Counsillor other = (Counsillor) object;\r\n if ((this.eName == null && other.eName != null) || (this.eName != null && !this.eName.equals(other.eName))) {\r\n return false;\r\n }\r\n return true;\r\n }", "public void findByName() {\n String name = view.input(message_get_name);\n if (name != null){\n try{\n List<Customer> list = model.findByName(name);\n if(list!=null)\n if(list.isEmpty())\n view.showMessage(not_found_name);\n else\n view.showTable(list);\n else\n view.showMessage(not_found_error);\n }catch(Exception e){\n view.showMessage(incorrect_data_error);\n }\n } \n }", "@Override\n\tpublic boolean isEmpty() {\n\t\tif (entityType2tableName.isEmpty())\n\t\t\treturn true;\n\t\t\n\t\t// the hard way \n\t\ttry {\n\t\t\tStatement st = connection.createStatement(\n\t\t\t\t\tResultSet.TYPE_SCROLL_INSENSITIVE,\n\t\t ResultSet.CONCUR_READ_ONLY);\n\t\t\t\n\t\t\tfor (String tableName: entityType2tableName.values()) {\n\t\t\t\t//ResultSet set = st.executeQuery(\"SELECT * FROM \"+tableName+\";\");\n\t\t\t\t\n\t\t\t\tResultSet set = st.executeQuery(\"SELECT * FROM \"+tableName+\" LIMIT 1\");\n\t\t\t\t\n\t\t\t\tif (!set.next())\n\t\t\t\t\treturn true;\n\t\t\t\t\n\t\t\t}\n\t\t} catch (SQLException e1) {\n\t\t\te1.printStackTrace();\n\t\t\tthrow new RuntimeException(\"Error while checking if the table is empty\",e1);\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "public boolean isSameCandidate(Candidate otherCandidate) {\n if (otherCandidate == this) {\n return true;\n }\n\n return otherCandidate != null\n && otherCandidate.getName().equals(getName())\n && otherCandidate.getGender().equals(getGender())\n && (otherCandidate.getPhone().equals(getPhone()) || otherCandidate.getEmail().equals(getEmail()));\n }", "@Test(timeout = 4000)\n public void test097() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n String[] stringArray0 = new String[3];\n DBUniqueConstraint dBUniqueConstraint0 = new DBUniqueConstraint(defaultDBTable0, (String) null, false, stringArray0);\n String string0 = SQLUtil.ownerDotComponent(dBUniqueConstraint0);\n assertEquals(\"null.null\", string0);\n }", "@Override\n\tprotected List<Message> validateInsert(SecUser entity) {\n\t\treturn null;\n\t}", "public boolean checkBatchName(String batchName) {\n int total = 0;\n Query q = em.createNamedQuery(\"TbBatch.findByBatchName\");\n q.setParameter(\"batchName\", batchName);\n total = q.getResultList().size();\n if (total > 0) {\n return false;\n } else {\n return true;\n }\n\n }", "private boolean findExist(UsersRobots usersRobots){\n List<UsersRobots> result = (List<UsersRobots>) entityManager.createQuery(\"SELECT ur FROM UsersRobots ur where ur.idUser = :idUser and ur.idRobot = :idRobot\")\n .setParameter(\"idUser\",usersRobots.getIdUser())\n .setParameter(\"idRobot\",usersRobots.getIdRobot())\n .getResultList();\n if(result.size() > 0){\n return true;\n }\n return false;\n }", "@Override\n public boolean isValid(String nickname, ConstraintValidatorContext constraintValidatorContext) {\n String violationMessage = \"\";\n\n if (nickname.isEmpty()) {\n violationMessage = \"Nickname must not be empty!\";\n } else if (nickname.length() < 4 || nickname.length() > 20) {\n violationMessage = \"Nickname's length must be between 4-20 characters!\";\n } else if (this.accountService.findByNickname(nickname) != null) {\n violationMessage = \"Nickname has been already taken!\";\n }\n\n if (!(violationMessage.equals(\"\"))) {\n constraintValidatorContext.buildConstraintViolationWithTemplate(violationMessage)\n .addConstraintViolation().disableDefaultConstraintViolation();\n return false;\n } else {\n return true;\n }\n }", "public void isPrioritizable() {\n\t\tsession.flush();\n\t\tLong count = (Long) session.createQuery(\"select count(*) from PrioritizableCard c where c.card.name = :name\")\n\t\t\t.setParameter(\"name\", name).uniqueResult();\n\n\t\tassertThat(count, is(1l));\n\n\t}", "@Test\n public void testFindProviderEntryByID() throws ConnectionException {\n ProviderEntry result = MariaDbConnectorTest.instance.findProviderEntryByID(1);\n assertTrue((result != null)&& (result.getName() != null) && !(result.getName().equals(\"\")) && (result.getName().length() != 0));\n }", "private boolean checkInputTableName(AccessInputMeta meta){\n if (meta.getTableName()==null || meta.getTableName().length()<1)\n {\n MessageBox mb = new MessageBox(shell, SWT.OK | SWT.ICON_ERROR );\n mb.setMessage(BaseMessages.getString(PKG, \"AccessInputDialog.TableMissing.DialogMessage\"));\n mb.setText(BaseMessages.getString(PKG, \"System.Dialog.Error.Title\"));\n mb.open(); \n\n return false;\n }\n else\n {\n \treturn true;\n }\n\t}", "private boolean isContactExist(String name) {\n boolean existance;\n existance = contactList.stream()\n .anyMatch(personElement ->\n personElement.getFirstName().equals(name) ||\n personElement.getLastName().equals(name));\n return existance;\n }" ]
[ "0.5869747", "0.57564133", "0.5514408", "0.548119", "0.54287016", "0.54277855", "0.5403526", "0.5374674", "0.5341657", "0.53044355", "0.52520704", "0.5235009", "0.5233684", "0.5224092", "0.52074236", "0.52074236", "0.5190189", "0.5171811", "0.51651764", "0.51439583", "0.51411825", "0.51360875", "0.51288766", "0.51243067", "0.51206", "0.5097296", "0.5062621", "0.5039869", "0.50389624", "0.5031103", "0.502368", "0.5019698", "0.5011663", "0.50069946", "0.49898192", "0.4981033", "0.49740633", "0.49707958", "0.49705508", "0.49607587", "0.49597722", "0.495515", "0.4954547", "0.49517894", "0.49494773", "0.49466664", "0.49369085", "0.4894813", "0.4891651", "0.48914486", "0.48903444", "0.48856038", "0.48852533", "0.4885236", "0.48821", "0.48797488", "0.48758733", "0.48697567", "0.4866287", "0.48580593", "0.48533908", "0.4849852", "0.4847756", "0.48473808", "0.48428297", "0.4834657", "0.48343605", "0.48332196", "0.48312008", "0.48281425", "0.4825963", "0.4817258", "0.48113635", "0.48063543", "0.48060724", "0.48002732", "0.47932774", "0.47913834", "0.4787774", "0.47872755", "0.4784685", "0.4783078", "0.4780802", "0.4780721", "0.47802716", "0.47794634", "0.47734743", "0.47730806", "0.47718295", "0.4769429", "0.47687492", "0.47520256", "0.47465226", "0.47400302", "0.4737962", "0.4737149", "0.47361806", "0.47271073", "0.47236902", "0.4719498" ]
0.7359875
0
/ This method display all entity from candidate table
public CandidateEntity viewCandidate(int candidate_id) throws RecordNotFoundException { CandidateEntity entity = entityManager.find(CandidateEntity.class, candidate_id); Query query = entityManager.createQuery("SELECT c from CandidateEntity c"); @SuppressWarnings("unchecked") List<CandidateEntity> list = (List<CandidateEntity>)query.getResultList(); logger.info("Candidate List"); for(CandidateEntity c: list) { System.out.println(c); } if(entity==null) { throw new RecordNotFoundException("CandidateId"+candidate_id); } return entity; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void displayAllPatients() {\r\n\t\ttry {\r\n\t\t\tString query= \"SELECT * FROM patients\";\r\n\t\t\tStatement stm= super.getConnection().createStatement();\r\n\t\t\tResultSet results= stm.executeQuery(query);\r\n\t\t\twhile(results.next()) {\r\n\t\t\t\tString[] row= new String[7];\r\n\t\t\t\trow[0]= results.getInt(1)+\"\";\r\n\t\t\t\trow[1]= results.getString(2);\r\n\t\t\t\trow[2]= results.getString(3);\r\n\t\t\t\trow[3]= results.getString(4);\r\n\t\t\t\trow[4]= results.getString(5);\r\n\t\t\t\trow[5]= results.getInt(6)+\"\";\r\n\t\t\t\tmodelHostory.addRow(row);\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\t}", "public static void showAllHouse(){\n ArrayList<House> houseList = getListFromCSV(FuncGeneric.EntityType.HOUSE);\n displayList(houseList);\n showServices();\n }", "public List<CarsEntity> displayCars() {\n List<CarsEntity> carsEntities =\n em.createQuery(\n \"select c from CarsEntity c\").getResultList();\n\n return carsEntities;\n }", "private void displayEntity(ArrayList<Entity> entities){\n for(Entity entity : entities)\n entity.printImage();\n }", "@Override\n public List<DetalleVenta> all() {\n return detalleVentaJpaRepository.findAll();\n }", "List<IViewEntity> getEntities();", "void showAll();", "@Override\r\n\tpublic List<Product> showAll() throws Exception {\n\t\treturn this.dao.showAll();\r\n\t}", "public static void showAllRoom(){\n ArrayList<Room> roomList = getListFromCSV(FuncGeneric.EntityType.ROOM);\n displayList(roomList);\n showServices();\n }", "private void showAll() {\n getAll();\n //show persons\n MainActivity.instance().displayPersonsRunnable = new DisplayPersonsRunnable(MainActivity.instance());\n this.thread = new Thread(MainActivity.instance().displayPersonsRunnable);\n this.thread.start();\n }", "@Override\n\tpublic List<Employee> viewAllEmployees() {\n\t\t CriteriaBuilder cb = em.getCriteriaBuilder();\n\t\t CriteriaQuery<Employee> cq = cb.createQuery(Employee.class);\n\t\t Root<Employee> rootEntry = cq.from(Employee.class);\n\t\t CriteriaQuery<Employee> all = cq.select(rootEntry);\n\t \n\t\t TypedQuery<Employee> allQuery = em.createQuery(all);\n\t\t return allQuery.getResultList();\n\t}", "@Override\n public List<R> getAll() {\n return onFindForList(getSession().createCriteria(entityClass).list());\n }", "public List<CompradorEntity> findAll() {\r\n TypedQuery<CompradorEntity> query = em.createQuery(\"select u from CompradorEntity u\", CompradorEntity.class);\r\n return query.getResultList();\r\n }", "@Override\n\tpublic String showAll() {\n\t\treturn null;\n\t}", "public void show() {\r\n List<Benefit> listBeneficio = service.findAll();\r\n if(listBeneficio!=null && !listBeneficio.isEmpty()){\r\n for(Benefit c: listBeneficio){\r\n LOGGER.info(c.toString());\r\n }\r\n }\r\n }", "public static void showAllVilla(){\n ArrayList<Villa> villaList = getListFromCSV(FuncGeneric.EntityType.VILLA);\n displayList(villaList);\n showServices();\n }", "public void getAll() {\n try {\n\n String sql = \"select * from project_zero.carlot where owner = 'DEALERSHIP';\";\n Statement st = ConnectionUtil.getInstance().getConnection().createStatement();\n ResultSet rs = st.executeQuery(sql);\n\n while(rs.next()) {\n Car c = new Car(rs.getInt(1), rs.getString(2), rs.getString(3),\n rs.getInt(4), rs.getString(5), rs.getString(6), rs.getInt(7));\n System.out.println(c.toString());\n\n }\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public static void showAllHouseNotDuplicate(){\n showAllNameNotDuplicate(FuncGeneric.EntityType.HOUSE);\n }", "private void viewAllStudents() {\n Iterable<Student> students = ctrl.getStudentRepo().findAll();\n students.forEach(System.out::println);\n }", "public List<SeatEntity> getAll();", "@Override\n\tpublic List<Dispositivo> getAll() {\n\t\treturn (List<Dispositivo>) dispositivoDao.findAll();\n\t}", "public void listar()\n\t{\n\t\tdatabase.list().forEach(\n\t\t\t(entidade) -> { IO.println(entidade.print() + \"\\n\"); }\n\t\t);\n\t}", "@RequestMapping(value = \"/listallentities\", method = RequestMethod.GET)\n\tpublic @ResponseBody String listAllEntities() {\n\t\ttry {\n\t\t\t// System.out.println(\"USER ID FROM SESSION : \" +\n\t\t\t// session.getAttribute(\"userId\"));\n\t\t\tString requestURI = request.getRequestURI();\n\n\t\t\tSystem.out.println(\"Called list entity : \" + requestURI);\n\n\t\t\tString requestFromMethod = \"listAllEntities\";\n\t\t\treturn entityService.listEntities(null, requestFromMethod);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\n\t}", "public void listAllCustomers() {\n List<Customer> list = model.findAllCustomers();\n if(list != null){\n if(list.isEmpty())\n view.showMessage(not_found_error);\n else\n view.showTable(list);\n }\n else\n view.showMessage(retrieving_data_error); \n }", "public void viewAll() {\n\t\ttry {\n\t\t\tString method = \"{call CAFDB.dbo.View_All_Pilot}\"; \n\t\t\tcallable = connection.prepareCall(method); \n\t\t\t\n\t\t\t//execute the query\n\t\t\tResultSet rs = callable.executeQuery(); \n\t\t\t\n\t\t\t/**\n\t\t\t * Output from View_All_Pilot:\n\t\t\t * 1 = PilotID - int\n\t\t\t * 2 = FirstName - varchar (string)\n\t\t\t * 3 = LastName - varchar (string)\n\t\t\t * 4 = DateOfBirth - date\n\t\t\t * 5 = EmployeeNumber - varchar (string)\n\t\t\t * 6 = DateOfHire - date \n\t\t\t * 7 = DateLeftCAF - date\n\t\t\t */\n\t\t\twhile(rs.next()) {\n\t\t\t\t//append to arraylists\n\t\t\t\tpilotID.add(rs.getInt(1)); \n\t\t\t\tfirstName.add(rs.getString(2)); \n\t\t\t\tlastName.add(rs.getString(3)); \n\t\t\t\tdob.add(rs.getDate(4));\n\t\t\t\temployeeNumber.add(rs.getString(5)); \n\t\t\t\tdateOfHire.add(rs.getDate(6)); \n\t\t\t\tdateLeftCAF.add(rs.getDate(7)); \t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}catch (SQLException ex) {\n\t\t\tLogger.getLogger(DBViewAllClient.class.getName()).log(Level.SEVERE, null, ex);\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"view all clients could not be completed\"); \n\t\t}\n\t\t\n\t\t\n\t}", "public void listNens() {\n\t\t\tEntityManager em = emf.createEntityManager();\n\t\t\tem.getTransaction().begin();\n\t\t\tList<Nen> result = em.createQuery(\"from nen\", Nen.class)\n\t\t\t\t\t.getResultList();\n\t\t\tfor (Nen a : result) {\n\t\t\t\tSystem.out.println(a.toString());\n\t\t\t}\n\t\t\tem.getTransaction().commit();\n\t\t\tem.close();\t\n\t\t}", "@Override\r\n public List<Professor> findAll() {\r\n return getEntityManager().createNamedQuery(\"Professor.findAll\",Professor.class).getResultList();\r\n }", "private void showRelatedFields( Long selectedEntityId ) {\n final BBDEntityFieldBroker<EntityFieldBean, BBDBeanArrayList<EntityFieldBean>> jpaFieldBroker = new BBDEntityFieldBroker<>();\n jpaFieldBroker.setPrincipal( getRootUser(), getRootPW() );\n\n EntityFieldBean efb = new EntityFieldBean();\n efb.setBbdjpaobjectId( selectedEntityId );\n BBDBeanArrayList<EntityFieldBean> selectedRows = jpaFieldBroker.select( efb );\n \n @SuppressWarnings( \"unchecked\" )\n final BBDBeanJTable<EntityFieldBean, BBDBeanArrayList<EntityFieldBean>> fieldListTable\n = new BBDBeanJTable<>( selectedRows );\n \n fieldListTable.setAutoResizeMode( JTable.AUTO_RESIZE_LAST_COLUMN );\n for( int i = 0; i < 3; i++ ) {\n fieldListTable.getColumnModel().getColumn( i ).setPreferredWidth( 85 );\n fieldListTable.getColumnModel().getColumn( i ).setMaxWidth( 85 );\n }\n\n entityFieldsScrollPane.setViewportView( fieldListTable );\n\n }", "public void displayAll() {\n\t\t\n\t\tbankop.display();\n\t\n\t}", "@Override\n\tpublic List<T> getAllEntry() {\n\t\treturn this.hibernateTemplate.find(\"from \"+this.classt.getName());\n\t}", "@Override\r\n\tpublic List<Mobile> showAllProduct() {\n\t\tQuery query=entitymanager.createQuery(\"FROM Mobile\");\r\n\t\tList<Mobile> myProd=query.getResultList();\r\n\t\treturn myProd;\r\n\t}", "public void showData()\n\t\t{\n\t\t\ttry {\n\t\t\t\tcon=DriverManager.getConnection(\"jdbc:mysql://localhost:3306/MundheElectronics1\",\"root\",\"vishakha\");\n\t\t\t\tString sql=\"select *from ComplaintsData\";\n\t\t\t\tps=con.prepareStatement(sql);\n\t\t\t\trs=ps.executeQuery();\n\t\t\t\ttable.setModel(DbUtils.resultSetToTableModel(rs));\n\t\t\t\t\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}", "public void showHouses() {\n System.out.println(\"-----Houses List-----\");\n System.out.println(\"No\\tOwner\\tPhone\\t\\tAddress\\t\\t\\t\\tRent\\tState\");\n houseService.listHouse();\n System.out.println(\"------List Done------\");\n }", "public static void display(){\n\n try {\n Connection myConnection = ConnectionFactory.getConnection();\n Statement stat = myConnection.createStatement();\n ResultSet rs = stat.executeQuery(\"SELECT * from product\");\n\n System.out.println(\"PRODUCT\");\n while(rs.next()){\n\n System.out.println(rs.getInt(\"id\") + \", \" + rs.getString(\"quantity\") + \", \" + rs.getString(\"productName\") + \", \" + rs.getDouble(\"price\")+ \", \" + rs.getString(\"deleted\"));\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n System.out.println();\n\n }", "public void show() {\r\n\t\tSystem.out.println(\"Id \\t Name \\t Address\");\r\n\t\t\r\n\t\tfor (int index = 0; index < emp.size(); index++) {\r\n\t\t\tSystem.out.println(emp.get(index).empId + \"\\t\" + emp.get(index).name +\"\\t\" + emp.get(index).adress);\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic List<SbiBank> DisplayingRecord() {\n\t\tTransaction tx=null;\r\n\t\tSession ses=HBNutility.getSession();\r\n\t\ttx=ses.beginTransaction();\r\n\t\tCriteria ct=ses.createCriteria(SbiBank.class);\r\n\t\tList<SbiBank> sb=ct.list();\r\n\t\treturn sb;\r\n\t}", "@Override\n\tpublic List<Product> getAll() {\n\t\tQuery query = session.createQuery(\"from Product \");\n\t\t\n\t\treturn query.getResultList();\n\t}", "public static List<Enseignant> getAll() {\n\n // Creation de l'entity manager\n EntityManager em = GestionFactory.factory.createEntityManager();\n\n // Recherche\n @SuppressWarnings(\"unchecked\")\n List<Enseignant> list = em.createQuery(\"SELECT e FROM Enseignant e\").getResultList();\n\n return list;\n }", "public List<Employee> listAll(){\n return employeeRepository.findAll();\n }", "public List<Embarcation> getAllDisponible(){\n\t\tSQLiteDatabase mDb = open();\n\t\tCursor cursor = mDb.rawQuery(\"SELECT * FROM \" + TABLE_NAME +\" WHERE \"+DISPONIBLE+\" = 1\", null);\n\t\t\n\t\tList<Embarcation> resultList = cursorToEmbarcationList(cursor);\n\t\t\n\t\tmDb.close();\n\t\t\n\t\treturn resultList;\n\t}", "public List<LugarEntity> findall(){\n Query q = em.createQuery(\"SELECT p FROM LugarEntity p\");\n return q.getResultList();\n }", "private void displayAllTable() {\n\n nhacungcap = new NhaCungCap();\n nhacungcap.setVisible(true);\n jDestopTable.add(nhacungcap);\n\n thuoc = new SanPham();\n thuoc.setVisible(true);\n jDestopTable.add(thuoc);\n\n khachHang = new KhachHang();\n khachHang.setVisible(true);\n jDestopTable.add(khachHang);\n\n hoaDon = new HoaDon();\n hoaDon.setVisible(true);\n jDestopTable.add(hoaDon);\n\n }", "@Override\n\tpublic ArrayList<Carpo> showAllCars() {\n\t\treturn inList.showAll();\n\t}", "private void renderEntities() {\n\t\trenderEntityList(layerNegOneEntities);\n\t\trenderEntityList(layerZeroEntities);\n\t\trenderEntityList(layerOneEntities);\n\t}", "List<ObjectExpenseEntity> getAllObjectExpenses();", "@Override\n\tpublic Iterable<Customer> displayCust() {\n\t\treturn customerRepository.findAll();\n\t}", "public List<Entity> getAll() {\n return entities;\n }", "public void displayAll() \n\t{\n\t\tSystem.out.printf(\"%n--[ My Contact List ]--%n\");\n\t\tSystem.out.printf(\"%n%-20s%-15s%-20s%-15s%n\", \"Name\", \"Phone\", \"Email\",\n\t\t\t\t\"Company\");\n\t\tSystem.out.printf(\"%n%-20s%-15s%-20s%-15s%n\", \"----\", \"-----\", \"-----\",\n\t\t\t\t\"-------\");\n\t\tfor (BusinessContact b : this.contacts) \n\t\t{\n\t\t\tSystem.out.printf(\"%n%-20s%-15s%-20s%-15s%n\", b.getLastName()\n\t\t\t\t\t+ \", \" + b.getFirstName(), b.getPhoneNumber(),\n\t\t\t\t\tb.getEmailAddress(), b.getCompany());\n\t\t}\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic List<DbLotniskoEntity> getAll() {\n \tList<DbLotniskoEntity> airports = (List<DbLotniskoEntity>)getSession().createQuery(\"from kiwi.models.DbLotniskoEntity\").list();\n\n \treturn airports;\n }", "public static void showCompanies(){\n\t\tCompanyDao.getAllCompanies();\n\t}", "public void listAll() {\n\t\tfor (Cineplex m: records) {\n\t\t\tSystem.out.printf(\"(ID: %s) %s\\n\", m.getId(), m.getName());\n\t\t}\n\t}", "public void listArticles() {\n\t\tSystem.out.println(\"\\nArticles llegits desde la base de dades\");\n\n\t\tObjectSet<Article> articles = db.query(Article.class);\n\t\tarticles.stream()\n\t\t\t.forEach(System.out::println);\n\t}", "public List<Employee> listAllCrud(){\n return employeeCrudRepository.findAll();\n }", "public static Iterable<Entity> getAllEntities() {\n\t\treturn Util.listEntities(\"RecetteId\", null, null);\n\t}", "public static void showAllVillaNotDuplicate(){\n showAllNameNotDuplicate(FuncGeneric.EntityType.VILLA);\n }", "public void listarEquipamentos() {\n \n \n List<Equipamento> formandos =new EquipamentoJpaController().findEquipamentoEntities();\n \n DefaultTableModel tbm=(DefaultTableModel) listadeEquipamento.getModel();\n \n for (int i = tbm.getRowCount()-1; i >= 0; i--) {\n tbm.removeRow(i);\n }\n int i=0;\n for (Equipamento f : formandos) {\n tbm.addRow(new String[1]);\n \n listadeEquipamento.setValueAt(f.getIdequipamento(), i, 0);\n listadeEquipamento.setValueAt(f.getEquipamento(), i, 1);\n \n i++;\n }\n \n \n \n }", "@Override\n public List<ReporteAccidente> getAll() {\n return (List<ReporteAccidente>) repr.findAll();\n }", "@Override\n\tpublic void getAll() {\n\t\tArrayList<Post> list = new ArrayList<Post>();\n\t\tlist = dao.selectAll();\n\t\t\n\t\tfor (Post p : list) {\n\t\t\tSystem.out.println(p.getPostId() + \".\" + p.getPostName() + \" 작성자:\" + p.getMemberId());\n\t\t}\n\t}", "private void printAll() {\n int numberToPrint = searchResultsTable.getItems().size();\n\n FXMLCustomerController printController = new FXMLCustomerController();\n printController = (FXMLCustomerController) printController.load();\n printController.setUpPrint(numberToPrint);\n\n if (printController.okToPrint()) {\n System.out.println(\"Printing\");\n printController.getStage().show();\n for (SearchRowItem eachItem : searchResultsTable.getItems()) {\n printController.setCustomerDetails(eachItem);\n printController.print();\n System.out.println(\"Printed : \" + eachItem.toString());\n }\n printController.endPrint();\n //printController.getStage().hide();\n }\n }", "public List<Tblproductos> getAll(){\n String hql = \"Select tp from Tblproductos tp\";\n try{\n em = getEntityManager();\n Query q = em.createQuery(hql);\n List<Tblproductos> listProductos = q.getResultList();\n return listProductos; \n }catch(Exception e){\n e.printStackTrace();\n }\n return null;\n }", "@Override\r\n\tpublic void viewAllUsers() {\n\t\tList<User> allUsers = new ArrayList<User>();\r\n\t\tallUsers = udao.getAllUsers();\r\n\t\t\r\n\t\tSystem.out.println(\"ALL USERS:\");\r\n\t\tSystem.out.println(\"ID\\tUsername\\tName\");\r\n\t\t\r\n\t\tfor(int i = 0; i < allUsers.size(); i++) {\r\n\t\t\tUser tempUser = allUsers.get(i);\r\n\t\t\tSystem.out.println(tempUser.getUserID() + \"\\t\" + tempUser.getUsername() + \"\\t\"\r\n\t\t\t\t\t+ tempUser.getFirstName() + \" \" + tempUser.getLastName());\r\n\t\t}\r\n\r\n\t}", "public List<ConsejoEntity> findAll() {\r\n Query q = em.createQuery(\"select u from ConsejoEntity u\");\r\n return q.getResultList();\r\n }", "private void viewTeachers() {\n Iterable<Teacher> teachers = ctrl.getTeacherRepo().findAll();\n teachers.forEach(System.out::println);\n }", "@Override\r\n\t\r\n\tpublic List<Employee> getAllDetails()\r\n\t{\r\n\t\t\r\n\t\tList<Employee> empList =hibernateTemplate.loadAll(Employee.class);\r\n\t\t\r\n\t\treturn empList;\r\n\t}", "public void consultarEditorialesDAO() {\n Collection<Editorial> editoriales = em.createQuery(\"SELECT e\"\n + \" FROM Editorial e\").getResultList();\n\n //Iteramos entre autores\n for (Editorial e : editoriales) {\n\n System.out.println(e.getNombre());\n\n }\n\n }", "private void showContentAccountTable() throws SQLException {\r\n\t\tConnection connection = dbAdministration.getConnection();\r\n\t\tStatement statement = connection.createStatement();\r\n\t\tString sql = \"SELECT * FROM account\";\r\n\t\tResultSet resultSet = statement.executeQuery(sql);\r\n\t\tlogger.info(\"SQL-Statement ausgeführt: \" + sql);\r\n\t\tSystem.out.println(\"Table account:\");\r\n\t\twhile (resultSet.next()) {\r\n\t\t\tint id = resultSet.getInt(1);\r\n\t\t\tString owner = resultSet.getString(2);\r\n\t\t\tString number = resultSet.getString(3);\r\n\r\n\t\t\tSystem.out.println(id + \" | \" + owner + \" | \" + number);\r\n\t\t}\r\n\t\tresultSet.close();\r\n\t\tstatement.close();\r\n\t\tconnection.close();\r\n\t}", "private void displayAll() {\n\t\tif(inventoryObject.totalNumCards() == 0) { // checks to see if there are 0 StockIndexCards\n\t\t\tSystem.out.println(\"The Inventory is empty\\n\");\n\t\t\tgetUserInfo();\n\t\t}\n\t\telse {\n\t\tSystem.out.println(inventoryObject.displayAll());\n\t\tgetUserInfo();\n\t\t}\n\t}", "@RequestMapping(value = { \"/\", \"/list\" }, method = RequestMethod.GET)\n\tpublic String listEntities(ModelMap model) {\n\n\t\tList<ENTITY> entities = abm.listar();\n\n\t\tlogger.info(\"Tengo {} usuarios registrados\", entities.size());\n\n\t\tmodel.addAttribute(\"entities\", entities);\n\t\tmodel.addAttribute(\"loggedinuser\", getPrincipal());\n\t\treturn viewBaseLocation + \"/list\";\n\t}", "@Transactional\n\t@Override\n\tpublic List<Detail> findAll() {\n\t\treturn null;\n\t}", "@Override\n\tpublic List<Provincia> fiindAll() {\n\t\treturn provincieRepository.findAllByOrderByNameAsc();\n\t}", "public void showAllProducts() {\n try {\n System.out.println(Constants.DECOR+\"ALL PRODUCTS IN STORE\"+Constants.DECOR_END);\n List<Product> products = productService.getProducts();\n System.out.println(Constants.PRODUCT_HEADER);\n for (Product product : products) { \n System.out.println((product.getName()).concat(\"\\t\\t\").concat(product.getDescription()).concat(\"\\t\\t\")\n .concat(String.valueOf(product.getId()))\n .concat(\"\\t\\t\").concat(product.getSKU()).concat(\"\\t\").concat(String.valueOf(product.getPrice()))\n .concat(\"\\t\").concat(String.valueOf(product.getMaxPrice())).concat(\"\\t\")\n .concat(String.valueOf(product.getStatus()))\n .concat(\"\\t\").concat(product.getCreated()).concat(\"\\t\\t\").concat(product.getModified())\n .concat(\"\\t\\t\").concat(String.valueOf(product.getUser().getUserId())));\n }\n } catch (ProductException ex) {\n System.out.println(ex);\n }\n }", "@GetMapping(path=\"/showData\")\n public List<Person> showData() {\n Iterable<Person> myPerson = personRepository.findAll();\n List<Person> listOfPersons = new ArrayList<>();\n myPerson.forEach((Person person) -> {\n listOfPersons.add(person);\n });\n return listOfPersons;\n }", "public void ViewAllData(View v){\n Cursor res = myDB.viewAllData();\n // if there are no data\n if (res.getCount() == 0) {\n // show an error message\n showMessage(\"Error\", \"Nothing found\");\n return;\n }\n\n StringBuffer buffer = new StringBuffer();\n while(res.moveToNext()){\n buffer.append(\"Id :\" + res.getString(0) + \"\\n\");\n buffer.append(\"Name :\" + res.getString(1) + \"\\n\");\n buffer.append(\"Surname :\" + res.getString(2) + \"\\n\");\n buffer.append(\"Marks :\" + res.getString(3) + \"\\n\\n\");\n }\n\n // then show all the data inside the buffer\n showMessage(\"Data\", buffer.toString());\n }", "public void showCustomerInvoices()\n\t{\n\t\ttry {\n\t\t\tcon=DriverManager.getConnection(\"jdbc:mysql://localhost:3306/MundheElectronics1\",\"root\",\"vishakha\");\n\t\t\tString sql=\"select * from CustomerData order by Customer_Name asc\";\n\t\t\tps=con.prepareStatement(sql);\n\t\t\trs=ps.executeQuery();\n\t\t\ttblCustomer.setModel(DbUtils.resultSetToTableModel(rs));\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}", "@Override\n\tpublic List<Computer> getAll() {\n\t\t\n\t\tConnection connection = null;\n\t\tPreparedStatement preparedStatement = null;\n\t\tResultSet resultSet = null;\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tString sql = \"SELECT computer.id, computer.name, computer.introduced, computer.discontinued, computer.company_id, company.name FROM computer INNER JOIN company ON computer.company_id = company.id;\";\n\t\t\tconnection = DriverManager.getConnection(URL, USER, PASSWORD);\n\t\t\tpreparedStatement = connection.prepareStatement(sql);\n\t\t\tresultSet = preparedStatement.executeQuery();\n\t\t\tList<Computer> computerList = new ArrayList<Computer>();\n\t\t\twhile(resultSet.next()) {\n\t\t\t\n\t\t\t\tCompany company = Company.builder()\n\t\t\t\t\t\t.setId(resultSet.getLong(\"computer.company_id\"))\n\t\t\t\t\t\t.setName(resultSet.getString(\"company.name\"))\n\t\t\t\t\t\t.build();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\tComputer computer = Computer.builder()\n\t\t\t\t\t\t.setId(resultSet.getLong(\"computer.id\"))\n\t\t\t\t\t\t.setName(resultSet.getString(\"computer.name\"))\n\t\t\t\t\t\t.setIntroduced(resultSet.getTimestamp(\"computer.introduced\"))\n\t\t\t\t\t\t.setDiscontinued(resultSet.getTimestamp(\"computer.discontinued\"))\n\t\t\t\t\t\t.setCompany_id(resultSet.getLong(\"computer.company_id\"))\n\t\t\t\t\t\t.setCompany(company)\n\t\t\t\t\t\t.build();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tcomputer.toString();\n\t\t\t\tcomputerList.add(computer);\n\t\t\t}\n\t\t\t\n\t\t\treturn computerList;\n\t\t\t\n\t\t} catch(SQLException e) {\n\t\t\t\n\t\t\tthrow new DAOException(\"Impossible de récupérer la liste des ordinateurs\", e);\n\t\t}finally {\n\t\t\tDaoUtils.closeAll(resultSet, preparedStatement, connection);\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}", "public static void showAllRoomNotDuplicate(){\n showAllNameNotDuplicate(FuncGeneric.EntityType.ROOM);\n }", "@Override\n\tpublic DataResult<List<CurriculumVitae>> getAll() {\n\t\treturn null;\n\t}", "private void listarEntidades() {\r\n\t\tsetListEntidades(new ArrayList<EntidadDTO>());\r\n\t\tgetListEntidades().addAll(entidadController.encontrarTodos());\r\n\t\tif (!getListEntidades().isEmpty()) {\r\n\t\t\tfor (EntidadDTO entidadDTO : getListEntidades()) {\r\n\t\t\t\t// Conversión de decimales.\r\n\t\t\t\tDouble porcentaje = entidadDTO.getPorcentajeValorAsegurable() * 100;\r\n\t\t\t\tdouble por = Math.round(porcentaje * Math.pow(10, 2)) / Math.pow(10, 2);\r\n\t\t\t\tentidadDTO.setPorcentajeValorAsegurable(por);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void list()\n {\n for(Personality objectHolder : pList)\n {\n String toPrint = objectHolder.getDetails();\n System.out.println(toPrint);\n }\n }", "@Override\r\n\tpublic Iterable<Candidat> findAll() {\n\t\treturn null;\r\n\t}", "@Override\n public List<Item> viewAllItems() {\n // calls List<Item> itemRepo.findCatalog();\n return itemRepo.findCatalog();\n }", "@Override\n\tpublic List<Empresa> getAll() {\n\t\treturn empresaJpaRepository.findAll();\n\t}", "List<Horario_Disponible> findAll();", "private void viewCourses() {\n Iterable<Course> courses = ctrl.getCourseRepo().findAll();\n courses.forEach(System.out::println);\n }", "private void listAll() throws SQLException { \n\t\t List<SearchList> bookList = searchListDao.listAll();\n\t\t System.out.printf(\"%-5s %-35s %-30s %-30s \\n\",\"Id#\", \"Title\", \"Author\", \"Series\"); \n\t\t for (SearchList book : bookList) { \n\t\t\t System.out.printf(\"%-5s %-35s %-30s %-30s \\n\", book.getBookIdNum(), book.getTitle(), book.getAuthor(), book.getSeries());\n\t\t }\n\t }", "@Override\n\tpublic List<BookshelfinfoEntity> queryAllBookshelfinfo() {\n\t\treturn this.sqlSessionTemplate.selectList(\"bookshelfinfo.select\");\n\t}", "public List<Ejemplar> getAll();", "@Override\n\tpublic List reterive() {\n\t\tString str=\"SELECT allusers FROM User allusers\";\n\t\tTypedQuery<User> query=em.createQuery(str,User.class);\n\t\treturn query.getResultList();\n\t\t\n\t}", "public void displayAll(){\n System.out.println(\"guestCounter: \" + guestCounter);\n for(int i=0;i<guestCounter;i++){\n guest[i].dispGuest();\n }\n }", "public List showAll() {\n\t\tSession session = null;\n\t\tList temp = new ArrayList();\n\t\ttry {\n\n\t\t\tsession = MyUtility.getSession();// Static Method which makes only\n\t\t\t\t\t\t\t\t\t\t\t\t// one object as method is\n\t\t\t\t\t\t\t\t\t\t\t\t// static\n\n\t\t\tQuery q = session.createQuery(\"FROM AuctionVO \");\n\n\t\t\ttemp = q.list();\n\n\t\t} catch (Exception e) {\n\t\t\t//System.out.println(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\t//session.close();\n\t\t}\n\t\treturn temp;\n\t}", "public List<T> findAll() {\n\t Query q = getEntityManager().createQuery(\"select u from \" + getEntityClass().getSimpleName() + \" u\");\n\t return q.getResultList();\n\t }", "public void showCatalogue() {\n for (Record r : cataloue) {\n System.out.println(r);\n }\n }", "public void show() {\r\n\t\ttry {\r\n\t\t\tdisplayTable();\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"Show Table SQL Exception: \" + e.getMessage());\r\n\t\t}\r\n\t}", "static void checkObjects() {\n String[] names = new String[]{\"Person\", \"Address\", \"CreditCard\", \"Pincode\", \"Bank\"};\n EntityManager em = factory.createEntityManager();\n\n System.out.println(\"-----------------------------------\");\n for (String name : names) {\n Query q = em.createQuery(String.format(\"select x from %s x\", name));\n\n List resultList = q.getResultList();\n for (Object x : resultList) {\n System.out.println(x);\n }\n System.out.println(\"-----------------------------------\");\n }\n em.close();\n }", "@Override\r\n\tpublic List<FicheColisageValue> getAll(){\n\t\t\r\n\t\treturn ficheColisagePersistance.getAll();\r\n\t}", "public DBViewAllPilot() {\n\t\ttry {\n\t\tstatement = connection.createStatement(); \n\t\tviewAll(); //call the viewAll function; \n\t\t\n\t}catch(SQLException ex) {\n\t\tSystem.out.println(\"Database connection failed DBViewAllAircraft\"); \n\t}\n}", "public List<Factura> getAllFacturas(){\n return facturaFacade.findAll();\n }", "public List<Empleado> getAll();", "public List<FacturaCabecera> list(){ \n\t\t\treturn em.createQuery(\"SELECT c from FacturaCabecera c\", FacturaCabecera.class).getResultList();\n\t\t}", "@Override\n public List<T> findAll() {\n String getAllQuery = \"SELECT * FROM \" + getTableName();\n return getJdbcTemplate().query(getAllQuery,\n BeanPropertyRowMapper.newInstance(getEntityClass()));\n }" ]
[ "0.6510984", "0.6483715", "0.64328796", "0.63101494", "0.62229973", "0.61544645", "0.6147698", "0.61137176", "0.6094256", "0.60695887", "0.6065819", "0.60332876", "0.6022988", "0.60140777", "0.59880954", "0.59868693", "0.59667414", "0.593872", "0.5936536", "0.59347326", "0.5921109", "0.5920723", "0.58938706", "0.58934045", "0.58929324", "0.5883875", "0.5880945", "0.588041", "0.5863181", "0.58625674", "0.5845514", "0.5840478", "0.58258563", "0.5824641", "0.58242565", "0.58216333", "0.5793675", "0.5787035", "0.57830644", "0.5782505", "0.5777406", "0.57650185", "0.57626164", "0.57587594", "0.57540447", "0.5752016", "0.5746365", "0.57404906", "0.5735158", "0.57350546", "0.5728921", "0.5722792", "0.57207423", "0.57147276", "0.5713887", "0.57119924", "0.5705061", "0.57047075", "0.5703666", "0.5700371", "0.56897277", "0.5685676", "0.5681015", "0.56784314", "0.5668341", "0.5668319", "0.5657611", "0.56482196", "0.5644206", "0.56332844", "0.5627281", "0.56256026", "0.5622213", "0.5622126", "0.56199366", "0.5616116", "0.56148744", "0.5607999", "0.5606101", "0.56014013", "0.55986387", "0.5592523", "0.5589386", "0.5587171", "0.55809253", "0.5579168", "0.55749613", "0.5573007", "0.55719936", "0.55702305", "0.55657536", "0.55601895", "0.5555706", "0.5554913", "0.55516577", "0.55514085", "0.5549935", "0.554985", "0.55464536", "0.5538159" ]
0.61131924
8
two points Manhattan distance.
private int distance(int[] a, int[] b) { return Math.abs(a[0] - b[0]) + Math.abs(a[1] - b[1]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getManhattanDistance(Point p2) {\n return Math.abs(t_location.x-p2.x) + Math.abs(t_location.y-p2.y);\n }", "public final static float manhattanDistance(float[] a, float[] b) {\n\t\tint n = Math.min(a.length, b.length);\n\t\t\n\t\tfloat dis = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tif ( Util.isUsed(a[i]) && Util.isUsed(b[i]) ) \n\t\t\t\tdis += Math.abs(a[i] - b[i]);\t\n\t\t}\n\t\t\n\t\treturn dis;\n\t}", "public int manhattanDistance(int x1, int y1, int x2, int y2, int z1, int z2) {\n return Math.abs(x2 - x1) + Math.abs(y2 - y1) + Math.abs(z1 - z2);\n }", "public int manhattan(GameObject o1, GameObject o2){\n return Math.abs(o1.getX()-o2.getX()) + Math.abs(o1.getY()-o2.getY());\n }", "public static double mahnattan(InputSpacePoint a , InputSpacePoint b) {\n double sum = 0.0;\n for(String s : a.getKeysAsCollection()) {\n sum += Math.abs(a.getValue(s) - b.getValue(s));\n }\n return sum;\n }", "private static int calculateManhattanDistance(Node actualNode, Node targetNode) \n\t{\n\t\tint distance = 1;\n\t\t\n\t\tint dx = Math.abs(actualNode.getRow() - targetNode.getRow());\n\t\tint dy = Math.abs(actualNode.getColumn() - targetNode.getColumn());\n\t\t\n\t\treturn distance * (dx+dy);\n\t}", "@Override\r\n protected Double h(Point from, Point to) {\r\n /* Use the Manhattan distance heuristic. */\r\n return (double) Math.abs(finish.x - to.x) + Math.abs(finish.y - to.y);\r\n }", "public int manhattan() {\n int dist = 0;\n for(int x = 0; x < n; x++) {\n for(int y = 0; y < n; y++) {\n if(tiles[x][y] != goal[x][y] && tiles[x][y] != 0) {\n int target = tiles[x][y] -1;\n int dest_row = target/n;\n int dest_col = target%n;\n dist += Math.abs((x-dest_col)) + Math.abs(y-dest_row);\n }\n }\n }\n return dist;\n }", "public int manhattan() {\n int distance = 0;\n for (int i = 0; i < _N; i++) {\n for (int j = 0; j < _N; j++) {\n int value = _tiles[i][j];\n if (value != 0) {\n int yDim = (value - 1) % _N;\n int xDim = (value - 1) / _N;\n distance = distance + Math.abs(xDim - i) + Math.abs(yDim - j);\n }\n }\n }\n return distance;\n }", "private int manhattanDistance(int i, int j) {\n int index = tiles[i][j] - 1;\n int row = Math.abs(index / dimension - i);\n int col = Math.abs(index % dimension - j);\n return row + col;\n }", "private void calculateManhattanDistance(Vertex source, Vertex target) {\n\t\tQueue<Vertex> fifo = new ArrayDeque<Vertex>();\n\t\ttarget.setNbr(1);\n\t\tfifo.add(target);\n\t\twhile(!fifo.isEmpty()) {\n\t\t\tVertex actual = fifo.remove();\n\t\t\tfor (direction dir : direction.values()) {\n\t\t\t\tif (!this.g.edgeDoesntExist(actual, dir)) {\n\t\t\t\t\tVertex next = g.getEqualVertex(g.vertexByDir(actual, dir));\n\t\t\t\t\tif (next.getNbr() == 0) {\n\t\t\t\t\t\tnext.setNbr(actual.getNbr()+1);\n\t\t\t\t\t\tif (next != source) {\n\t\t\t\t\t\t\tfifo.add(next);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public int manhattanDistance(String current, String goal) \r\n\t{\r\n int cost = 0;\r\n \r\n for (int i = 0; i < current.length(); i ++)\r\n {\r\n \tfor (int j = 0; j < goal.length(); j ++)\r\n \t{\r\n \t\t if (current.charAt(i) == goal.charAt(j) && current.charAt(i) != 0)\r\n {\r\n cost = cost + ((Math.abs(i % 3 - j % 3)) + Math.abs(i / 3 + j / 3));\r\n }\r\n \t}\r\n }\r\n \r\n return cost;\r\n }", "private double Distance(Point first, Point second){ // distance between two points \n\t\treturn Math.sqrt(Math.pow(second.getY()-first.getY(),2) + Math.pow(second.getX()-first.getX(),2));\n\t}", "private void manhattan(Node node){\n int row1 = this.row;\n int col1 = this.col;\n int row2 = node.getRow();\n int col2 = node.getCol();\n\n int x = Math.abs(row1-row2);\n int y = Math.abs(col1-col2);\n\n this.hVal = x+y;\n }", "public int manhattan() {\n if (manh != -1) return manh;\n int dist = 0;\n for (int row = 0; row < N; ++row) {\n for (int col = 0; col < N; ++col) {\n final int num = tiles[row][col];\n if (num != 0) {\n int xGoal = (num - 1) / N;\n int yGoal = (num - 1) % N;\n dist += Math.abs(xGoal - row) + Math.abs(yGoal - col);\n }\n }\n }\n manh = dist;\n return dist;\n }", "public int distance(Coord coord1, Coord coord2);", "public static double absoluteDistance(Prototype one, Prototype two)\r\n {\r\n double[] oneInputs = one.getInputs();\r\n double[] twoInputs = two.getInputs();\r\n //int _size = one.numberOfInputs();\r\n double acc = 0.0;\r\n for (int i = 0; i < numberOfInputs; ++i)\r\n {\r\n acc += Math.abs(oneInputs[i] - twoInputs[i]);\r\n }\r\n\r\n return acc;\r\n }", "public int manhattan() {\n int sum = 0;\n int index = 0;\n\n for (int row = 0; row < N; row++)\n for (int col = 0; col < N; col++) {\n int correctIdx = tiles[row][col] - 1;\n\n if (correctIdx != -1 && correctIdx != index) {\n sum += Math.abs((correctIdx / N) - row);\n sum += Math.abs((correctIdx % N) - col);\n }\n index++;\n }\n return sum;\n }", "public int calculateManhattanDistance(List<Integer> currentState, List<Integer> goalState) {\n\t\tint edgeCost = 0;\n\t\tfor (int index = 0; index < currentState.size(); index++) {\n\t\t\tint manhattanDistance = 0;\n\t\t\tInteger currentStateElement = currentState.get(index);\n\t\t\tInteger goalStateElement = goalState.get(index);\n\t\t\tif (currentStateElement.equals(0)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (!currentStateElement.equals(goalStateElement)) {\n\t\t\t\tint goalStateElementIndex = Utility.findIndex(goalState, currentStateElement);\n\t\t\t\tint currentStatexCo = index / (EightPuzzle.columnCount);\n\t\t\t\tint currentStateyCo = index % EightPuzzle.columnCount;\n\t\t\t\tint goalStatexCo = goalStateElementIndex / (EightPuzzle.columnCount);\n\t\t\t\tint goalStateyCo = goalStateElementIndex % EightPuzzle.columnCount;\n\n\t\t\t\tmanhattanDistance = Math.abs((goalStatexCo - currentStatexCo))\n\t\t\t\t\t\t+ Math.abs(goalStateyCo - currentStateyCo);\n\t\t\t\tedgeCost = edgeCost + manhattanDistance;\n\t\t\t}\n\t\t}\n\t\treturn edgeCost;\n\t}", "public int manhattan() {\n int manhattan = 0;\n for (int i = 0; i < dimension; i++)\n for (int j = 0; j < dimension; j++)\n if (isWrongPosition(i, j))\n manhattan += manhattanDistance(i, j);\n\n return manhattan;\n }", "public int manhattan() {\n int s = 0;\n for (int i = 0; i < n; i++) {\n for (int j = 0; j < n; j++) {\n int x = tiles[i][j];\n if (x == 0) continue;\n x--;\n if (x != i*n + j) {\n s = s + Math.abs(i - x / n) + Math.abs(j - x % n);\n }\n }\n }\n return s;\n }", "@Override\n public int estimatedDistanceToGoal() {\n return manhattan();\n }", "@Override\n public float distanceAdjacent(int x1, int y1, int x2, int y2) {\n float duration = 0;\n\n if (x1 == x2 || y1 == y2) {\n MapTile.Instance fromTile = getTileData(x1, y1);\n MapTile.Instance toTile = getTileData(x2, y2);\n assert fromTile != null && toTile != null;\n\n Direction move = Direction.get(x2 - x1, y2 - y1);\n\n int fromHeight = fromTile.heightOf(move);\n int toHeight = toTile.heightOf(move.inverse());\n\n // steepness\n float t1inc = (fromHeight - fromTile.getHeight()) / (TILE_SIZE / 2);\n float t2inc = (toHeight - toTile.getHeight()) / (TILE_SIZE / 2);\n\n // actual duration of walking\n float walkSpeedT1 = (1f / hypoLength(t1inc)) * walkSpeed;\n float walkSpeedT2 = (1f / hypoLength(t2inc)) * walkSpeed;\n\n // duration += walkspeed(steepness_1) * dist + walkspeed(steepness_2) * dist\n duration += (walkSpeedT1 + walkSpeedT2) * TILE_SIZE;\n\n // height difference on the sides of the tiles\n float cliffHeight = (toHeight - fromHeight) * TILE_SIZE_Z;\n\n // climbing if more than 'an acceptable height'\n if (cliffHeight > 0) {\n duration += (cliffHeight / climbSpeed);\n }\n\n } else {\n // TODO allow diagonal tracing\n Logger.WARN.print(String.format(\n \"Pathfinding (%s) asked for non-adjacent tiles (%d, %d) (%d, %d)\",\n getClass(), x1, y1, x2, y2\n ));\n\n return Float.POSITIVE_INFINITY;\n }\n\n return duration;\n }", "public double distance(double[] vector1, double[] vector2) throws MetricException;", "double distance(double x1, double y1, double x2, double y2) {\r\n return Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\r\n }", "public double distance(double x, double y);", "public double distance(Customer i, Customer j);", "public int manhattan() {\r\n\t\tint manhattan = 0;\r\n\t\tint n = dimension();\r\n\t\tfor (int i = 0; i < n; i++) {\r\n\t\t\tfor (int j = 0; j < n; j++) {\r\n\t\t\t\tint val = this.blocks[i][j];\r\n\t\t\t\tif (val != 0) {\r\n\t\t\t\t\tboolean exact = val % n == 0;\r\n\t\t\t\t\tfloat a = (val / n) + (exact ? 0 : 1);\r\n\t\t\t\t\tint rx = (int) Math.round(a);\r\n\t\t\t\t\tint ry = val - n * (rx - 1);\r\n\t\t\t\t\tint dx = rx - (i + 1);\r\n\t\t\t\t\tint dy = ry - (j + 1);\r\n\t\t\t\t\tint dist = (dx < 0 ? dx * (-1) : dx) + (dy < 0 ? dy * (-1) : dy);\r\n\t\t\t\t\t// System.out.println(\" val= \" + val + \" dist = \" + dist);\r\n\t\t\t\t\tmanhattan += dist < 0 ? dist * (-1) : dist;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn manhattan;\r\n\t}", "public static double distanceBetween(Pair<Double, Double> p1, Pair<Double, Double> p2) {\n float[] result = new float[1];\n android.location.Location.distanceBetween(p1.first, p1.second, p2.first, p2.second, result);\n return result[0];\n }", "public double distance(DoubleMatrix1D vector1, DoubleMatrix1D vector2) throws MetricException;", "private static double get_distance ( String one, String two){\n String temp[] = one.split(\" \");\n double lat1 = Double.parseDouble(temp[0]);\n double long1 = Double.parseDouble(temp[1]);\n\n String temp2[] = two.split(\" \");\n double lat2 = Double.parseDouble(temp2[0]);\n double long2 = Double.parseDouble(temp2[1]);\n\n// Get distance between two lats and two lans\n double latDistance = Math.toRadians(lat1 - lat2);\n double lngDistance = Math.toRadians(long1 - long2);\n\n// Step 1\n double a = (Math.sin ( latDistance / 2 ) * Math.sin (latDistance / 2)) +\n (Math.cos ( Math.toRadians(lat1)) * Math.cos(Math.toRadians(lat2)) )\n * ( Math.sin (lngDistance /2 ) * Math.sin(lngDistance / 2) );\n// Step 2\n double c = ( 2 * (Math.atan2( Math.sqrt(a), Math.sqrt(1-a))));\n// Step 3\n double d = ( EARTH_RADIUS * c );\n return d;\n }", "public static double distance(int first, int second){\n\t\treturn first-second;\n\t\t\n\t}", "private double findDistance(int[] pos1, int[] pos2) {\n return sqrt((pos1[0]-pos2[0])*(pos1[0]-pos2[0])+\n (pos1[1]-pos2[1])*(pos1[1]-pos2[1]));\n }", "private static int dist(int x1, int y1, int x2, int y2) {\n\t\treturn (int) Math.sqrt(Math.abs(((x2-x1) * (x2-x1)) + ((y2-y1) * (y2-y1))));\n\t}", "public double distance(InputDatum datum, InputDatum datum2) throws MetricException;", "private int dist(int city1, int city2){\n\t\treturn this.getGraph().getWeight(city1, city2);\n\t}", "public int calculateDistance(GraphNodeAL<MapPoint> l1, GraphNodeAL<MapPoint> l2){\n double x1 = l1.data.getxCo();\n double y1 = l1.data.getyCo();\n double x2 = l2.data.getxCo();\n double y2 = l2.data.getyCo();\n double dist = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n return (int) dist;\n }", "public int manhattan() {\n int manhattanDis = 0;\n for (int i = 0; i < N; i++) {\n for (int j = 0; j < N; j++) {\n if (matrix[i][j] == 0) continue;\n int x, y;\n if (matrix[i][j] % N == 0) {\n x = matrix[i][j] / N - 1;\n y = N - 1;\n } else {\n x = matrix[i][j] / N;\n y = matrix[i][j] % N - 1;\n }\n manhattanDis += Math.abs(i-x) + Math.abs(j-y);\n }\n }\n return manhattanDis;\n }", "private double dist(Point a,Point b)//to find distance between the new entry to predict and the male or female cluster mean positions.\n { double d;\n d=Math.sqrt( Math.pow((a.ht-b.ht),2) + Math.pow((a.wt-b.wt),2));\n return d;\n }", "public abstract double calculateDistance(double[] x1, double[] x2);", "public int manhattan() {\n int md = 0;\n int counter = 1;\n for (int i = 0; i < this.tiles.length; i++) {\n int n = this.tiles[i];\n if (n != counter && n > 0)\n md += findMD(i, n);\n counter++;\n }\n return md;\n }", "static double distance(double x1, double y1, double x2, double y2)\n {\n double x_dist = x2 - x1;\n double y_dist = y2 - y1;\n double dist = Math.sqrt(Math.pow(x_dist, 2) + Math.pow(y_dist, 2));\n return dist;\n }", "public int manhattan() {\n int manhattan = 0; \n for (int row = 0; row < dimension(); row++) {\n for (int column = 0; column < dimension(); column++) { \n int currentValue = blocks[row][column]; \n if (currentValue == 0) continue; // Skip the blank \n int expectedRow = (currentValue - 1) / dimension();\n int expectedColumn = (currentValue - 1) % dimension(); \n int distance = Math.abs(row - expectedRow) + Math.abs(column - expectedColumn);\n manhattan += distance;\n }\n } \n return manhattan;\n }", "public final double calcDistance( Point a, Point b )\r\n {\r\n return( Math.sqrt( (Math.pow(a.y - b.y, 2)) +\r\n (Math.pow(a.x - b.x, 2)) ) );\r\n }", "double getDistance();", "public static double getDistance(GPSCoordinates point1, GPSCoordinates point2) {\r\n\t\t\r\n\t\treturn EARTH_RADIUS * 2 * Math.atan2( Math.sqrt( getHaversinePart(point1, point2)), Math.sqrt( getHaversinePart(point1, point2) ) );\r\n\t}", "public double getDistanceTo(CoordPair dest)\r\n\t{\n\t\tif(isAdjacent(dest))\r\n\t\t\treturn 1;\r\n\t\tint rowDiff = this.row - dest.getRow();\r\n\t\tint colDiff = this.col - dest.getCol();\r\n\t\tint sumSquares = (int) (Math.pow(rowDiff,2) + Math.pow(colDiff, 2));\r\n\t\tdouble distance = Math.sqrt(sumSquares);\r\n\t\t\r\n\t\treturn distance;\r\n\t}", "public double distance(double x1, double y1, double x2, double y2)\n {\n return Math.sqrt(Math.pow((x2 - x1), 2) + Math.pow(y2 - y1, 2));\n }", "private double calculateDistance(Example first, Example second) {\n\t\tdouble distance = 0;\n\t\tfor (Attribute attribute : first.getAttributes()) {\n\t\t\tdouble diff = first.getValue(attribute) - second.getValue(attribute);\n\t\t\tdistance += diff * diff;\n\t\t}\n\t\treturn Math.sqrt(distance);\n\t}", "public double distanceBetween2Points(double x1,double y1,double x2, double y2){\n\t\treturn Math.sqrt((x2-x1)*(x2-x1) + (y2-y1)*(y2-y1));\n\t}", "public double distance(double[] vector1, DoubleMatrix1D vector2) throws MetricException;", "private static double distance(double x, double y, double x1, double x2,\n\t\t\tdouble y1, double y2) {\n\t\tPoint p = new Point(x, y);\n\t\tPoint p1 = new Point(x1, y1);\n\t\tPoint p2 = new Point(x2, y2);\n\t\treturn p.distance(p1, p2);\n\t}", "@Override\n\tpublic float getDistance(float[] fv1, float[] fv2) {\n\t\tif(settings.getMetric() == 1){\n\t\t\treturn getL1Distance(fv1, fv2);\n\t\t} else { //metric == 2\n\t\t\treturn getL2Distance(fv1, fv2);\n\t\t}\n\t\t\n\t\t\n\t}", "private double getWeight(LatLng point1, LatLng point2) {\n\t\tdouble distance = (point1.latitude - point2.latitude) * (point1.latitude - point2.latitude )\n\t\t\t\t+ (point1.longitude - point2.longitude) * (point1.longitude - point2.longitude);\n\t\tSystem.out.print(String.valueOf(distance));\n\t\treturn distance;\n\t}", "public int distanceApart(int[] move1, int[] move2) {\r\n\t\treturn 1;\r\n\t}", "double distance (double px, double py);", "private static int MHDistance(int NODE1, int NODE2) {\n return Math.abs((NODE1 >> 16) - (NODE2 >> 16)) + Math.abs((NODE1 & 0x00FF) - (NODE2 & 0x00FF));\n }", "public abstract double getDistance(T o1, T o2) throws Exception;", "public double distance(DoubleMatrix1D vector1, double[] vector2) throws MetricException;", "public static double distance(Prototype one, Prototype two)\r\n {\r\n return d(one, two);\r\n }", "private static int diagonalDistance(int NODE1, int NODE2) {\n int dx = Math.abs((NODE1 >> 16) - (NODE2 >> 16));\n int dy = Math.abs((NODE1 & 0x00FF) - (NODE2 & 0x00FF));\n if (dx > dy)\n return 2 * (dx - dy) + 2 * dy;\n else\n return 2 * (dy - dx) + 2 * dx;\n }", "public static double getDistance( GameObject one, GameObject two )\n {\n double deltaX = getDeltaX( one, two );\n double deltaY = getDeltaY( one, two );\n return Math.sqrt( deltaX * deltaX + deltaY * deltaY );\n }", "public void launchManhattan(Vertex source, Vertex target) {\n\t\tfor (Object vertex : g.vertexSet()) {\n\t\t\t((Vertex) vertex).setNbr(0);\n\t\t}\n\t\tcalculateManhattanDistance(source, target);\n\t}", "private double distance(Point a, Point b) {\n\t\tDouble xdist = new Double( a.x - b.x );\n\t\tDouble ydist = new Double( a.y - b.y );\n\t\treturn Math.sqrt( Math.pow(xdist, 2.0) + Math.pow(ydist, 2.0) );\n\t}", "public double distance(DataInstance d1, DataInstance d2, List<Attribute> attributeList);", "public int distance(int n1, int n2) {\n if (invalid[n1]) {\n for (int i = 0; i < nodeCount; i++) {\n distances[n1][i] = 0;\n distances[i][n1] = 0;\n }\n invalid[n1] = false;\n }\n if (invalid[n2]) {\n for (int i = 0; i < nodeCount; i++) {\n distances[n2][i] = 0;\n distances[i][n2] = 0;\n }\n invalid[n2] = false;\n }\n if (distances[n1][n2] == 0) {\n long x = xs[n1] - xs[n2];\n long y = ys[n1] - ys[n2];\n distances[n1][n2] = (int) Math.sqrt(x * x + y * y);\n distances[n2][n1] = distances[n1][n2];\n }\n return distances[n1][n2];\n }", "double dist(pair p1){\n\t\tdouble dx=(p1.x-centre.x);\n\t\tdouble dy=(p1.y-centre.y);\n\t\tcount++;\n\t\treturn java.lang.Math.sqrt((dx*dx)+(dy*dy));\n\t}", "void calculate_distance()\n {\n \t\n \tfor(int i = 0; i<V ; i++)\n \t{\n \t\tfor(int j = 0; j<E ; j++)\n \t\t{\n \t\t\trelax(edge[j].src, edge[j].destination, edge[j].weight);\n \t\t}\n \t\tsp[i] = dist[i];\n \t\tx[i] = dist[i];\n \t}\n \tSystem.out.println();\n }", "public abstract double distanceFrom(double x, double y);", "private int distance(Point p1, Point p2) {\n return (int) Math.sqrt(Math.pow(p1.getCenterX() - p2.getCenterX(), 2) + Math.pow(p1.getCenterY() - p2.getCenterY(), 2));\n }", "public double calculateDistance(LatLng other) {\n return Math.sqrt( (this.x - other.x) * (this.x - other.x) + (this.y - other.y) * (this.y - other.y) );\n }", "static double distance(Point p1, Point p2) {\n\t\treturn Math.sqrt((p2.x - p1.x)*(p2.x - p1.x) + (p2.y - p1.y)*(p2.y - p1.y));\n\t}", "private void updateManhattanScore(int i, int j) {\n int value = blocks[i][j];\n if (value == 0) {\n // save MatrixIndex of free square\n free = new MatrixIndex(i, j);\n } else {\n // calculate goal position for this value\n int goal_i = (value - 1) / dimension();\n int goal_j = (value - 1) % dimension();\n\n // calculate vertical and horizontal distances\n int distance = Math.abs(i - goal_i) + Math.abs(j - goal_j);\n\n // update manhattan_score\n manhattan_score += distance;\n\n if (verbose) {\n // System.out.println(value + \" from \" + i + \",\" + j + \" to \" + goal_i + \",\" + goal_j + \" = \" + distance);\n }\n }\n }", "protected double getDistance(Point p1, Point p2) {\n\t\treturn Math.sqrt((p1.getX()-p2.getX())*(p1.getX()-p2.getX()) + (p1.getY()-p2.getY())*(p1.getY()-p2.getY())); \n\t}", "Integer distance(PathFindingNode a, PathFindingNode b);", "static Number160 distance(final Number160 id1, final Number160 id2) {\n return id1.xor(id2);\n }", "double distance(Point p1,Point p2){\n\t\tdouble dx = p1.x - p2.x;\n\t\tdouble dy = p1.y - p2.y;\n\t\treturn Math.sqrt(dx*dx+dy*dy);\n\t}", "public static double getDist(int id1, int id2) {\n\t\tArrayList<Double> gA1 = geneAttributes.get(id1);\n\t\tArrayList<Double> gA2 = geneAttributes.get(id2);\n\t\tdouble dist = 0;\n\t\tfor(int i=0;i<gA1.size();i++) {\n\t\t\tdist += ( (gA1.get(i) - gA2.get(i)) * (gA1.get(i) - gA2.get(i)) );\n\t\t}\n\t\tdist = Math.sqrt(dist);\n\t\treturn dist;\n\t}", "private double DistancePoint(Point a, Point b) {\n\t\tdouble ab = Math.sqrt( \n\t\t\t\tMath.pow( (b.getX() - a.getX()) , 2) +\n\t\t\t\tMath.pow( (b.getY() - a.getY()) , 2)\n\t\t);\n\t\treturn ab;\n\t}", "public int manhattan() {\n int sum = 0;\n for (int i = 0; i < blocks.length; i++){\n for (int j = 0; j < blocks.length; j++){\n int value = blocks[i][j];\n if (value == 0)\n continue;\n\n sum += Math.abs((value-1) / dimension() - i);\n sum += Math.abs((value-1) % dimension() - j);\n }\n }\n return sum;\n }", "public static int dist(Location loc1, Location loc2)\n\t{\n\t\treturn Math.abs(loc1.x - loc2.x) + Math.abs(loc1.y - loc2.y);\n\t}", "private int calculateDistance(Location location1, Location location2) {\n\t\treturn Math.abs(location1.getX() - location2.getX()) + Math.abs(location1.getY() - location2.getY());\n\t}", "public int manhattan() {\n int total = 0;\n if (!isValid()) return 0;\n for (int n = 0; n < state.length; n++)\n total = total + Board.manhattanTable[state[n]][n];\n return total; \n }", "private double dist(double [] v1, double [] v2){\n \t\tdouble sum=0;\n \t\tfor (int i=0; i<nDimensions; i++){\n \t\t\tdouble d = v1[i]-v2[i];\n \t\t\tsum += d*d;\n \t\t}\n \t\treturn Math.sqrt(sum);\n \t}", "public static void main(String[] args) {\n\t\tPoint p1 = new Point(new double[] {1.0,2.0,3.0});\n\t\tPoint p2 = new Point(new double[] {4.0,5.0,6.0});\n\t\tSystem.out.println(\"Euclidean Distance: \" + EuclideanDistance.getDist(p1, p2));\n\t\tSystem.out.println(\"Manhattan Distance: \" + ManhattanDistance.getDist(p1, p2));\n\t\tPoint p3 = new Point(new double[] {1.0,2.0,3.0});\n\t\tPoint p4 = new Point(new double[] {4.0,5.0});\n\t\tSystem.out.println(\"Euclidean Distance: \" + EuclideanDistance.getDist(p3, p4));\n\t\tSystem.out.println(\"Manhattan Distance: \" + ManhattanDistance.getDist(p3, p4));\n\t}", "static private double dist(double[] a, double[] b) {\n\t\treturn new gov.pnnl.jac.geom.distance.Euclidean().distanceBetween(a, b);\n }", "private Integer getDistance(double lat1, double lon1, double lat2, double lon2) {\n Location locationA = new Location(\"Source\");\n locationA.setLatitude(lat1);\n locationA.setLongitude(lon1);\n Location locationB = new Location(\"Destination\");\n locationB.setLatitude(lat2);\n locationB.setLongitude(lon2);\n distance = Math.round(locationA.distanceTo(locationB));\n return distance;\n }", "@Override\n\tpublic double distance(Instance first, Instance second) {\n\t\treturn 0;\n\t}", "@Override\n\tpublic double distance(Instance first, Instance second,\n\t\t\tPerformanceStats stats) throws Exception {\n\t\treturn 0;\n\t}", "private double calculateDistance(int sourceX, int sourceY, int targetX, int targetY){\n int xLength = targetX - sourceX;\n int yLength = targetY - sourceY;\n return Math.sqrt((xLength*xLength)+(yLength*yLength)); \n }", "public static double getDistance(int x1, int y1, int x2, int y2)\n {\n double dx = x2 - x1;\n double dy = y2 - y1;\n\n // return Math.hypot(x2 - x1, y2 - y1); // Extremely slow\n // return Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2)); // 20 times faster than hypot\n return Math.sqrt(dx * dx + dy * dy); // 10 times faster then previous line\n }", "public int manhattan() {\n \tint manhattanScore = 0;\n \t\n \tfor (int row = 0; row < this.dimension(); row++) {\n \t\tfor (int column = 0; column < this.dimension(); column++) {\n \t\t\tif (blocks[row][column] != 0) {\n\t \t\t\tint compareValue = blocks[row][column];\n\t \t\t\t\n\t \t\t\tint expectedRow = (compareValue - 1 ) / this.dimension();\n\t \t\t\tint expectedColumn = (compareValue - 1) - (expectedRow * this.dimension());\n\t \t\t\t\n\t \t\t\tmanhattanScore += (Math.abs(expectedRow - row) + Math.abs(expectedColumn - column));\n \t\t\t}\n \t\t}\n \t}\n \t\n \treturn manhattanScore;\n }", "public int absoluteDistance(DataValue<T>value1, DataValue<T>value2)\r\n\t{\n\t\treturn value1.difference(value2);\r\n\t}", "public int hamming() {\n int distance = 0;\n for (int i = 0; i < _N; i++) {\n for (int j = 0; j < _N; j++) {\n if (_tiles[i][j] != _goal[i][j]) {\n distance++;\n }\n }\n }\n return distance;\n }", "public double calculateDistance(MapLocation a, MapLocation b) {\r\n\t\treturn Math.sqrt((double) ( Math.pow((b.x - a.x),2) + Math.pow((b.y - a.y),2) ));\r\n\t}", "public double distance() {\n \tif (dist == -1) {\n \t\tdist = distance(vertex1, vertex2);\n \t}\n \n \treturn dist;\n }", "public int manhattan() {\n int count = 0;\n for (int i = 0; i < N; i++) {\n for (int j = 0; j < N; j++) {\n if (blocks[i][j] != 0) {\n int row = (blocks[i][j] - 1) / N;\n int col = (blocks[i][j] - 1) % N;\n count += (Math.abs(row - i) + Math.abs(col - j));\n }\n }\n }\n return count;\n }", "static double distance(Point a, Point b) {\n\t\tint xDiff = a.x - b.x;\n\t\tint yDiff = a.y - b.y;\n\t\treturn Math.sqrt((xDiff * xDiff) + (yDiff * yDiff));\n\t}", "private float distancePixels(int nX1, int nY1, int nX2, int nY2)\n {\n\t return FloatMath.sqrt((nX2-nX1)^2 + (nY2-nY1)^2);\n }", "public static double distance(double x1, double y1, double x2, double y2) {\n\t\tdouble r1 = x2 - x1;\n\t\tdouble r2 = y2 - y1;\n\t\treturn Math.sqrt(r1 * r1 + r2 * r2);\n\t}" ]
[ "0.75610715", "0.7506692", "0.74406147", "0.73226887", "0.7240132", "0.7063452", "0.7019003", "0.7014599", "0.68556833", "0.6804095", "0.6741246", "0.6597794", "0.6582796", "0.6569254", "0.6294346", "0.6247622", "0.6103048", "0.609408", "0.6050724", "0.6044578", "0.60310507", "0.60172176", "0.6007654", "0.59808695", "0.59719014", "0.59608746", "0.59584105", "0.59447116", "0.59158266", "0.5879308", "0.58615464", "0.58551276", "0.58458275", "0.58419675", "0.58407897", "0.58323795", "0.5830664", "0.5822174", "0.5820719", "0.57940316", "0.57870996", "0.57525384", "0.5748815", "0.57454205", "0.57373065", "0.5727263", "0.57267565", "0.57226586", "0.57149607", "0.57082486", "0.5693495", "0.56849295", "0.568315", "0.5660622", "0.5658722", "0.5636666", "0.5634035", "0.5629591", "0.5627853", "0.56225866", "0.56218046", "0.5607965", "0.5606353", "0.55982226", "0.5596371", "0.55931604", "0.5581992", "0.55771405", "0.5573101", "0.5572537", "0.5567969", "0.5544261", "0.5542488", "0.5539235", "0.55355847", "0.5528962", "0.5525281", "0.55227643", "0.5521003", "0.55136925", "0.55124617", "0.5508799", "0.5497062", "0.5487719", "0.5482383", "0.54772645", "0.54758537", "0.5470644", "0.5468181", "0.5460442", "0.5447971", "0.54440236", "0.54411054", "0.54409", "0.5434195", "0.54341596", "0.54339606", "0.5432595", "0.5431176", "0.5429858" ]
0.57806194
41
Convert the given object to string with each line indented by 4 spaces (except the first line).
private String toIndentedString(Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String toIndentedString(Object object) {\n if (object == null) {\n return EndpointCentralConstants.NULL_STRING;\n }\n return object.toString().replace(EndpointCentralConstants.LINE_BREAK,\n EndpointCentralConstants.LINE_BREAK + EndpointCentralConstants.TAB_SPACES);\n }", "private String toIndentedString(Object o)\n/* */ {\n/* 128 */ if (o == null) {\n/* 129 */ return \"null\";\n/* */ }\n/* 131 */ return o.toString().replace(\"\\n\", \"\\n \");\n/* */ }", "private String toIndentedString( Object o )\n {\n if ( o == null )\n {\n return \"null\";\n }\n return o.toString().replace( \"\\n\", \"\\n \" );\n }" ]
[ "0.78847593", "0.75493765", "0.74971926" ]
0.0
-1
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.main, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_actions, menu);\r\n\t\treturn true;\r\n //return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.adventure_archive, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.archive_menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.action_menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.menu, menu);\n\t\t\treturn true; \n\t\t\t\t\t\n\t\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_item, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \t// We must call through to the base implementation.\r\n \tsuper.onCreateOptionsMenu(menu);\r\n \t\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_menu, menu);\r\n\r\n return true;\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\n\t}", "public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.item, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.resource, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.template, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(\"onCreateOptionsMenu\", \"create menu\");\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.socket_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actionbar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t// \n\t\tMenuInflater mi = getMenuInflater();\n\t\tmi.inflate(R.menu.thumb_actv_menu, menu);\n\t\t\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.swag_list_activity_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\n\t\treturn true;\n\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.jarvi, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add__listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actmain, menu);\r\n return true;\r\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.buat_menu, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.layout.menu, menu);\n\t\treturn true;\n\t}", "@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ichat, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ui_main, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return true;\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }" ]
[ "0.7246102", "0.7201358", "0.7194834", "0.7176498", "0.71066517", "0.7039537", "0.7037961", "0.70112145", "0.70094734", "0.69807225", "0.6944953", "0.69389373", "0.6933199", "0.6916928", "0.6916928", "0.6891486", "0.68831646", "0.68754137", "0.68745375", "0.68621665", "0.68621665", "0.68621665", "0.68621665", "0.68515885", "0.68467957", "0.68194443", "0.6817494", "0.6813087", "0.6813087", "0.6812847", "0.6805774", "0.6801204", "0.6797914", "0.6791314", "0.6789091", "0.67883503", "0.6783642", "0.6759701", "0.6757412", "0.67478645", "0.6744127", "0.6744127", "0.67411774", "0.6740183", "0.6726017", "0.6723245", "0.67226785", "0.67226785", "0.67208904", "0.67113477", "0.67079866", "0.6704564", "0.6699229", "0.66989094", "0.6696622", "0.66952467", "0.66865396", "0.6683476", "0.6683476", "0.6682188", "0.6681209", "0.6678941", "0.66772443", "0.6667702", "0.66673946", "0.666246", "0.6657578", "0.6657578", "0.6657578", "0.6656586", "0.66544783", "0.66544783", "0.66544783", "0.66524047", "0.6651954", "0.6650132", "0.66487855", "0.6647077", "0.66467404", "0.6646615", "0.66464466", "0.66449624", "0.6644209", "0.6643461", "0.6643005", "0.66421187", "0.6638628", "0.6634786", "0.6633529", "0.6632049", "0.6632049", "0.6632049", "0.66315657", "0.6628954", "0.66281766", "0.6627182", "0.6626297", "0.6624309", "0.6619582", "0.6618876", "0.6618876" ]
0.0
-1
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml.
@Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n //\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // Back button clicked\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // app icon in action bar clicked; goto parent activity.\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n switch (id) {\r\n case android.R.id.home:\r\n // app icon in action bar clicked; go home\r\n this.finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // app icon in action bar clicked; go home\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n Log.e(\"clik\", \"action bar clicked\");\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\t public boolean onOptionsItemSelected(MenuItem item) {\n\t int id = item.getItemId();\n\t \n\t\t\tif (id == android.R.id.home) {\n\t\t\t\t// Respond to the action bar's Up/Home button\n\t\t\t\t// NavUtils.navigateUpFromSameTask(this);\n\t\t\t\tonBackPressed();\n\t\t\t\treturn true;\n\t\t\t}\n\t \n\t \n\t return super.onOptionsItemSelected(item);\n\t }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n // Respond to the action bar's Up/Home button\r\n case android.R.id.home:\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle presses on the action bar items\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n case R.id.action_clear:\n return true;\n case R.id.action_done:\n\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onActionHomePressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId())\n {\n case android.R.id.home :\n super.onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId ()) {\n case android.R.id.home:\n onBackPressed ();\n return true;\n\n default:\n break;\n }\n return super.onOptionsItemSelected ( item );\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\t// app icon in action bar clicked; go home \n\t\t\tIntent intent = new Intent(this, Kelutral.class); \n\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); \n\t\t\tstartActivity(intent); \n\t\t\treturn true;\t\t\n\t case R.id.Search:\n\t \treturn onSearchRequested();\n\t\tcase R.id.AppInfo:\n\t\t\t// Place holder menu item\n\t\t\tIntent newIntent = new Intent(Intent.ACTION_VIEW,\n\t\t\t\t\tUri.parse(\"http://forum.learnnavi.org/mobile-apps/\"));\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\n\t\tcase R.id.Preferences:\n\t\t\tnewIntent = new Intent(getBaseContext(), Preferences.class);\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\t\n\t }\n\t return false;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n onBackPressed();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // Intent homeIntent = new Intent(this, MainActivity.class);\n // homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // startActivity(homeIntent);\n finish();\n return true;\n default:\n return (super.onOptionsItemSelected(item));\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // setResult and close the activity when Action Bar Up Button clicked.\n if (item.getItemId() == android.R.id.home) {\n setResult(RESULT_CANCELED);\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // This ID represents the Home or Up button. In the case of this\n // activity, the Up button is shown. Use NavUtils to allow users\n // to navigate up one level in the application structure. For\n // more details, see the Navigation pattern on Android Design:\n //\n // http://developer.android.com/design/patterns/navigation.html#up-vs-back\n //\n \tgetActionBar().setDisplayHomeAsUpEnabled(false);\n \tgetFragmentManager().popBackStack();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if(id == android.R.id.home){\n onBackPressed();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@RequiresApi(api = Build.VERSION_CODES.M)\n @Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif(item.getItemId()==android.R.id.home)\r\n\t\t{\r\n\t\t\tgetActivity().onBackPressed();\r\n\t\t}\r\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if(item.getItemId()==android.R.id.home){\n super.onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n return false;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n //Back arrow\n case android.R.id.home:\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // android.R.id.home是Android内置home按钮的id\n finish();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n this.onBackPressed();\n return false;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n\r\n case android.R.id.home:\r\n /*Intent i= new Intent(getApplication(), MainActivity.class);\r\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n startActivity(i);*/\r\n onBackPressed();\r\n finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case android.R.id.home:\n this.finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Pass the event to ActionBarDrawerToggle, if it returns\n // true, then it has handled the app icon touch event\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n\n // Handle your other action bar items...\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n NavUtils.navigateUpFromSameTask(getActivity());\n return true;\n case R.id.action_settings:\n Intent i = new Intent(getActivity(), SettingsActivity.class);\n startActivity(i);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n //Fixes the Up Button\n if(id == android.R.id.home) {\n BuildRoute.this.finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()){\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if (id == android.R.id.home) {\n NavUtils.navigateUpFromSameTask(this);\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n break;\r\n }\r\n return true;\r\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif (item.getItemId() == android.R.id.home) {\n\t\t\tfinish();\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n onBackPressed();\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if ( id == android.R.id.home ) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.home) {\r\n NavUtils.navigateUpFromSameTask(this);\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_about) {\r\n AboutDialog();\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_exit) {\r\n finish();\r\n return true;\r\n }\r\n\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n//noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n// finish the activity\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item)\n {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if( id == android.R.id.home ) // Back button of the actionbar\n {\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\t\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\t\tswitch (item.getItemId()) {\r\n\t\t\tcase android.R.id.home:\r\n\t\t\t\tfinish();\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\treturn super.onOptionsItemSelected(item);\r\n\t\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n return true;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if(id == android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\r\n\t\tcase android.R.id.home:\r\n\t\t\tsetResult(RESULT_OK, getIntent());\r\n\t\t\tfinish();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n if (item.getItemId() == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n\n case android.R.id.home:\n this.finish();\n return true;\n }\n return true;\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tif (id == android.R.id.home) {\n\t\t\tfinish();\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if (id == android.R.id.home) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n //NavUtils.navigateUpFromSameTask(this);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // todo: goto back activity from here\n finish();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n // Handle item selection\r\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n return true;\r\n\r\n case me.cchiang.lookforthings.R.id.action_sample:\r\n// Snackbar.make(parent_view, item.getTitle() + \" Clicked \", Snackbar.LENGTH_SHORT).show();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tcase R.id.scan_menu:\n\t\t\tonScan();\n\t\t\tbreak;\n\t\tcase R.id.opt_about:\n\t\t\t//onAbout();\n\t\t\tbreak;\n\t\tcase R.id.opt_exit:\n\t\t\tfinish();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t\treturn true;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n super.onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n finish();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if(id==android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\r\n\t switch (item.getItemId()) {\r\n\t \t// back to previous page\r\n\t case android.R.id.home:\r\n\t finish();\r\n\t return true;\r\n\t }\r\n\t return super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId())\n {\n case android.R.id.home:\n this.finish();\n return (true);\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case R.id.home:{\n NavUtils.navigateUpFromSameTask(this);\n return true;\n }\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n switch(item.getItemId())\n {\n case android.R.id.home:\n super.onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\treturn true;\n\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n\r\n int id = item.getItemId();\r\n if(id==android.R.id.home){\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }" ]
[ "0.790348", "0.7805071", "0.7765095", "0.77266747", "0.76311177", "0.76214445", "0.75832206", "0.75293607", "0.7486633", "0.74573547", "0.74573547", "0.7437626", "0.74210477", "0.7402851", "0.73908484", "0.7386029", "0.7378385", "0.7369379", "0.7362063", "0.7355019", "0.7344681", "0.73410106", "0.7329469", "0.7327145", "0.73252165", "0.7318238", "0.7315663", "0.7312702", "0.7303102", "0.7303102", "0.7300814", "0.729724", "0.7292649", "0.7285916", "0.728242", "0.72800887", "0.7277624", "0.7259297", "0.7258896", "0.7258896", "0.7258896", "0.72584754", "0.7249053", "0.72239465", "0.72185713", "0.7216558", "0.72038543", "0.7200575", "0.71982896", "0.71918976", "0.7184396", "0.71761155", "0.7167713", "0.7166835", "0.71528476", "0.71528435", "0.71348727", "0.7134378", "0.7134378", "0.7129003", "0.71281284", "0.7123457", "0.71227026", "0.71222824", "0.71215355", "0.71167135", "0.71164757", "0.71163297", "0.71163297", "0.71163297", "0.71163297", "0.7115998", "0.7114215", "0.71118426", "0.7109061", "0.71080273", "0.71048915", "0.7098376", "0.709735", "0.7095236", "0.7092981", "0.7092981", "0.7085711", "0.708227", "0.7080156", "0.70796543", "0.70729", "0.70675105", "0.7061017", "0.70595324", "0.70587844", "0.70506877", "0.7036977", "0.7036977", "0.7035262", "0.7034643", "0.7034643", "0.703104", "0.70300376", "0.7028845", "0.70185524" ]
0.0
-1
Test of setZoomToMouse method, of class DraggingCamera.
@Test public void testSetZoomToMouse() { final DraggingCamera camera = newValueObject(); testBoundField(camera, DraggingCamera.ZOOM_TO_MOUSE, false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testSetZoomMin() {\n final DraggingCamera camera = newValueObject();\n testBoundField(camera, DraggingCamera.ZOOM_MIN, 1.1f);\n }", "@Test\n public void testSetZoomMultiplier() {\n final DraggingCamera camera = newValueObject();\n testBoundField(camera, DraggingCamera.ZOOM_MULTIPLIER, 1.678f);\n }", "public void setZoom(){\n\t\tactive.setZoom();\n\t}", "@Test\n public void testSetZoomMax() {\n final DraggingCamera camera = newValueObject();\n testBoundField(camera, DraggingCamera.ZOOM_MAX, 10.0f);\n }", "@Override\n public void Zoom(double zoomNo, boolean setZoom) {\n\t \n }", "protected abstract void handleZoom();", "boolean allowZoom();", "protected void primSetZoom(double zoom) {\n\tPoint p1 = getViewport().getClientArea().getCenter();\n\tPoint p2 = p1.getCopy();\n\tPoint p = getViewport().getViewLocation();\n\tdouble prevZoom = this.zoom;\n\tthis.zoom = zoom;\n\tpane.setScale(zoom);\n\tfireZoomChanged();\n\tgetViewport().validate();\n\t\n\tp2.scale(zoom / prevZoom);\n\tDimension dif = p2.getDifference(p1);\n\tp.x += dif.width;\n\tp.y += dif.height;\n\tsetViewLocation(p);\t\n}", "void multitouchZoom(int new_zoom);", "public void zoomCam(float zoom){\n\t\tthis.camera.setZoom(zoom);\n\t}", "public void zoom(double factor, Point mouseLocation) {\n Point2D.Double viewOffset = viewCoords_.getViewOffset();\n Point2D.Double sourceDataSize = viewCoords_.getFullResSourceDataSize();\n Point2D.Double zoomCenter;\n //compute centroid of the zoom in full res coordinates\n if (mouseLocation == null) {\n //if mouse not over image zoom to center\n zoomCenter = new Point2D.Double(viewOffset.x + sourceDataSize.y / 2,\n viewOffset.y + sourceDataSize.y / 2);\n } else {\n zoomCenter = new Point2D.Double(\n (long) viewOffset.x + mouseLocation.x\n / viewCoords_.getMagnificationFromResLevel()\n * viewCoords_.getDownsampleFactor(),\n (long) viewOffset.y + mouseLocation.y\n / viewCoords_.getMagnificationFromResLevel()\n * viewCoords_.getDownsampleFactor());\n }\n\n //Do zooming--update size of source data\n double newSourceDataWidth = sourceDataSize.x * factor;\n double newSourceDataHeight = sourceDataSize.y * factor;\n if (newSourceDataWidth < 5 || newSourceDataHeight < 5) {\n return; //constrain maximum zoom\n }\n if (data_.getBounds() != null) {\n //don't let either of these go bigger than the actual data\n double overzoomXFactor = newSourceDataWidth / (viewCoords_.xMax_ - viewCoords_.xMin_);\n double overzoomYFactor = newSourceDataHeight / (viewCoords_.yMax_ - viewCoords_.yMin_);\n if (overzoomXFactor > 1 || overzoomYFactor > 1) {\n newSourceDataWidth = newSourceDataWidth / Math.max(overzoomXFactor, overzoomYFactor);\n newSourceDataHeight = newSourceDataHeight / Math.max(overzoomXFactor, overzoomYFactor);\n }\n }\n viewCoords_.setFullResSourceDataSize(newSourceDataWidth, newSourceDataHeight);\n\n double xOffset = (zoomCenter.x - (zoomCenter.x - viewOffset.x)\n * newSourceDataWidth / sourceDataSize.x);\n double yOffset = (zoomCenter.y - (zoomCenter.y - viewOffset.y)\n * newSourceDataHeight / sourceDataSize.y);\n //make sure view doesn't go outside image bounds\n if (data_.getBounds() != null) {\n viewCoords_.setViewOffset(\n Math.max(viewCoords_.xMin_, Math.min(xOffset,\n viewCoords_.xMax_ - viewCoords_.getFullResSourceDataSize().x)),\n Math.max(viewCoords_.yMin_, Math.min(yOffset,\n viewCoords_.yMax_ - viewCoords_.getFullResSourceDataSize().y)));\n } else {\n viewCoords_.setViewOffset(xOffset, yOffset);\n }\n }", "@Override\n\tpublic void setZoom(int zoom) {\n\t\t\n\t}", "public void setZoom( double zoom ) {\n\t\tthis.zoom = zoom;\n\t}", "public void updateZoom() {\n camera.zoom = zoomLevel;\n }", "public void setZoom(float zoom) {\n this.zoom = zoom;\n }", "public void handleZoom(MouseEvent event){\n ImageView imageView = (ImageView) event.getSource();\n Image imageToShow = imageView.getImage();\n zoomImage.setImage(imageToShow);\n zoomPane.setVisible(true);\n }", "@Override\n public void Zoom(double zoomNo) {\n\t \n }", "@Override\n public void setZoom(double zoom)\n {\n super.setZoom(zoom);\n delayedRepainting.requestRepaint(ZOOM_REPAINT);\n }", "public void setZoom(double zoom) {\n if(zoom != mZoom) {\n mZoom = zoom;\n setChanged();\n }\n }", "public void setZoom(Integer zoom) {\n this.zoom = zoom;\n }", "public void setZoom(Integer zoom) {\n this.zoom = zoom;\n }", "public void wheelZoom(MouseWheelEvent e) {\n try {\n int wheelRotation = e.getWheelRotation();\n Insets x = getInsets(); //Top bar space of the application\n Point p = e.getPoint();\n p.setLocation(p.getX() , p.getY()-x.top + x.bottom);\n if (wheelRotation > 0 && zoomLevel != 0) {\n //point2d before zoom\n Point2D p1 = transformPoint(p);\n transform.scale(1 / 1.2, 1 / 1.2);\n //point after zoom\n Point2D p2 = transformPoint(p);\n transform.translate(p2.getX() - p1.getX(), p2.getY() - p1.getY()); //Pan towards mouse\n checkForZoomOut();\n repaint();\n\n } else if (wheelRotation < 0 && zoomLevel != 20) {\n Point2D p1 = transformPoint(p);\n transform.scale(1.2, 1.2);\n Point2D p2 = transformPoint(p);\n transform.translate(p2.getX() - p1.getX(), p2.getY() - p1.getY()); //Pan towards mouse\n checkForZoomIn();\n repaint();\n }\n } catch (NoninvertibleTransformException ex) {\n ex.printStackTrace();\n }\n\n }", "private void dragZoom() {\n\n\t\tint width = this.getWidth();\n\n\t\tint start = cont.getStart();\n\t\tdouble amount = cont.getLength();\n\n\t\tint newStart = (int) DrawingTools.calculatePixelPosition(x ,width,amount,start);\n\t\tint newStop = (int) DrawingTools.calculatePixelPosition(x2,width,amount,start);\n\t\tx = x2 = 0;\n\n\t\tint temp;\n\t\tif (newStop < newStart){\n\t\t\ttemp = newStart;\n\t\t\tnewStart = newStop;\n\t\t\tnewStop = temp;\n\t\t}\n\n\t\tcont.changeSize(newStart,newStop);\n\n\t}", "private void setMousePossition() {\n mouseX = Mouse.getMouseX() / Display.SCALE;\n mouseY = Mouse.getMouseY() / Display.SCALE;\n }", "public synchronized void setZoom(float zoom)\r\n {\r\n this.zoom = Utils.clampFloat(zoom, .4f, 1.5f);\r\n }", "public void setZoomInFilter(MouseFilter f) {\r\n _zoomInFilter = f;\r\n }", "public void setZoom(double zoom) {\n\tzoom = Math.min(getMaxZoom(), zoom);\n\tzoom = Math.max(getMinZoom(), zoom);\n\tif (this.zoom != zoom)\n\t\tprimSetZoom(zoom);\n}", "public void setZoom(double zoom) {\n if (zoom > 0) {\n this.zoom = zoom;\n this.rescale();\n }\n }", "public void setZoom(float zoom) {\r\n\t\tif (zoom < 0.1f)\r\n\t\t\treturn;\r\n\t\tthis.zoomFactor = zoom;\r\n\t}", "protected void configureZoomAccordingTo2DView(View view, BoundingBox3d bounds,\n MouseSelection mouseSelection) {\n if (view.is2D_XY()) {\n bounds.setXmin(mouseSelection.min3DX());\n bounds.setXmax(mouseSelection.max3DX());\n bounds.setYmin(mouseSelection.min3DY());\n bounds.setYmax(mouseSelection.max3DY());\n } else if (view.is2D_XZ()) {\n bounds.setXmin(mouseSelection.min3DX());\n bounds.setXmax(mouseSelection.max3DX());\n bounds.setZmin(mouseSelection.min3DZ());\n bounds.setZmax(mouseSelection.max3DZ());\n } else if (view.is2D_YZ()) {\n bounds.setYmin(mouseSelection.min3DY());\n bounds.setYmax(mouseSelection.max3DY());\n bounds.setZmin(mouseSelection.min3DZ());\n bounds.setZmax(mouseSelection.max3DZ());\n } else {\n throw new RuntimeException(\"Unexpected 2D view\");\n }\n\n // System.out.println(\"Mouse.Bounds : \" + bounds);\n }", "public void setleZoom( double valeur) {\n\t\tzoomMonde = valeur;\n\t}", "public double getCameraZoom() {\n\t\treturn cameraZoom;\n\t}", "public static void changeCameraZoom(boolean zoomIn){\r\n\t\tif(zoomIn && zoomLevel > 0){\r\n\t\t\tzoomLevel -= 2;\r\n\t\t}else if(!zoomIn){\r\n\t\t\tzoomLevel += 2;\r\n\t\t}\r\n\t}", "@Override\n public void onPinchZoomStarted(PinchZoomDetector pPinchZoomDetector,\n TouchEvent pSceneTouchEvent) {\n\n // On first detection of pinch zooming, obtain the initial zoom factor\n mInitialTouchZoomFactor = mCamera.getZoomFactor();\n }", "public void zoom(float zoom) { \n if (zoom <=0) {\n throw new IllegalArgumentException();\n }\n\n workTransform.setTransform(null);\n workTransform.mScale(zoom);\n workTransform.mMultiply(userTransform);\n doc.setTransform(workTransform);\n swapTransforms();\n }", "@Override\n public boolean handleMouseClick(Rectangle mouseRectangle, Rectangle camera, int zoomX, int zoomY) {\n if (mouseRectangle.intersects(rectangle)) {\n activate();\n return false;\n }\n return false;\n }", "@SuppressWarnings(\"unused\")\n private void setZoom(JSONArray args, CallbackContext callbackContext) throws JSONException {\n Long zoom;\n zoom = args.getLong(1);\n\n this.myMoveCamera(CameraUpdateFactory.zoomTo(zoom), callbackContext);\n }", "public double getZoom() {\n return this.zoom;\n }", "public void setZoom(float zoom){\r\n zoom = zoom * 100;\r\n zoom = Math.round(zoom);\r\n this.zoom = Math.max(zoom / 100, 0.01f);\r\n }", "public void zoomIn() {\n if (scale < 0.8) {\n double scaleFactor = (scale + 0.03) / scale;\n currentXOffset = scaleFactor * (currentXOffset - viewPortWidth / 2) + viewPortWidth / 2;\n currentYOffset = scaleFactor * (currentYOffset - viewPortHeight / 2) + viewPortHeight / 2;\n scale += 0.03;\n\n selectionChanged = true;\n gameChanged = true;\n }\n\n }", "void onZoom() {\n\t\tmZoomPending=true;\n\t}", "int getMinZoom();", "private void actionZoomIn ()\r\n\t{\r\n\t\tint tableSize = DataController.getTable().getTableSize();\r\n\r\n\t\t//---- Check if the project is empty or not\r\n\t\tif (tableSize != 0)\r\n\t\t{\r\n\t\t\t//---- Calculate zoom scale factor\r\n\t\t\tdouble zoom = mainFormLink.getComponentPanelCenter().getComponentPanelImageView().transformZoom(+FormMainMouse.DEFAULT_ZOOM_DELTA); \r\n\t\t\tmainFormLink.getComponentPanelCenter().getComponentPanelImageView().repaint();\r\n\r\n\t\t\t//---- Set the current zoom, display the zoom scale factor in the GUI\r\n\t\t\tFormMainMouse.imageViewZoomScale = zoom;\r\n\t\t\tmainFormLink.getComponentPanelDown().getComponentLabelZoom().setText(String.valueOf(zoom));\r\n\t\t}\r\n\t}", "public void setZoom(float zoom) {\n\t\tthis.zoom = zoom;\n\t\trevalidate();\n\t\trepaint();\n\t}", "public MouseFilter getZoomInFilter () {\r\n return _zoomInFilter;\r\n }", "@Override\n public void mouseWheelMoved(MouseWheelEvent e) {\n\n zoomer = true;\n\n //Zoom in\n if (e.getWheelRotation() < 0) {\n zoomFactor *= 1.1;\n repaint();\n }\n //Zoom out\n if (e.getWheelRotation() > 0) {\n zoomFactor /= 1.1;\n repaint();\n }\n }", "public double getZoom() {\n return mZoom;\n }", "protected void applyMouse2DSelection(View view) {\n\n boolean allowCrop = true;\n\n if (!mouseSelection.complete()) {\n return;\n }\n\n\n // Reset selection to UNZOOM\n if (!mouseSelection.growing()) {\n // getChart().getScene().getGraph().setClipBox(null);\n\n if (allowCrop)\n getChart().getScene().getGraph().setClipBox(null);\n\n view.setBoundMode(ViewBoundMode.AUTO_FIT);\n\n }\n // Or apply selection to ZOOM\n else {\n BoundingBox3d bounds = view.getBounds().clone();\n\n configureZoomAccordingTo2DView(view, bounds, mouseSelection);\n\n // Reset mouse selection now so that next rendering will hide it from screen\n mouseSelection = new MouseSelection();\n\n // Won't do anything for irrelevant bounds leading to a flat graph\n if (bounds.getXRange().getRange() <= 0 \n || bounds.getYRange().getRange() <= 0\n || bounds.getZRange().getRange() <= 0)\n return;\n\n //System.out.println(\"Will zoom to \" + bounds);\n\n // Crop and zoom\n if (allowCrop) {\n boolean includeLimits = false; // to avoid inacurrate box scale\n getChart().getScene().getGraph().setClipBox(bounds, includeLimits, false);\n }\n view.setBoundsManual(bounds);\n\n\n }\n\n }", "public final void setZoom(final int zoom) {\r\n\r\n if (logger.isDebugEnabled()) {\r\n logger.debug(\"new zoom: \" + zoom + \" (old zoom: \" + this.zoom + \")\");\r\n }\r\n\r\n //\r\n // size and visible rectangle before zooming\r\n\r\n final Dimension oldImageCanvasContainerSize = imageCanvas.getSize();\r\n final Rectangle oldImageCanvasContainerVisibleRect = imageCanvas.getVisibleRect();\r\n\r\n //\r\n // calculate the center of the visible rectangle\r\n\r\n final int oldImageCanvasContainerVisibleRectCenterX = oldImageCanvasContainerVisibleRect.x + oldImageCanvasContainerVisibleRect.width / 2;\r\n final int oldImageCanvasContainerVisibleRectCenterY = oldImageCanvasContainerVisibleRect.y + oldImageCanvasContainerVisibleRect.height / 2;\r\n\r\n //\r\n // zoom ( set the new zoom value and update image )\r\n\r\n this.zoom = zoom;\r\n updateImage();\r\n\r\n //\r\n // zoomed size\r\n\r\n final Dimension zoomedImageCanvasContainerSize = imageCanvas.getSize();\r\n\r\n //\r\n // now we can calculate the ratio (new size vs old size)\r\n\r\n final double xRatio = zoomedImageCanvasContainerSize.getWidth() / oldImageCanvasContainerSize.getWidth();\r\n final double yRatio = zoomedImageCanvasContainerSize.getHeight() / oldImageCanvasContainerSize.getHeight();\r\n\r\n //\r\n // apply the ratio to the old center\r\n\r\n int newImageCanvasContainerVisibleRectCenterX = (int) (oldImageCanvasContainerVisibleRectCenterX * xRatio);\r\n int newImageCanvasContainerVisibleRectCenterY = (int) (oldImageCanvasContainerVisibleRectCenterY * yRatio);\r\n\r\n //\r\n // calculate the new visible rectangle (using the translated center)\r\n\r\n Rectangle newImageCanvasContainerVisibleRect = new Rectangle(oldImageCanvasContainerVisibleRect.getSize());\r\n newImageCanvasContainerVisibleRect.x = newImageCanvasContainerVisibleRectCenterX - oldImageCanvasContainerVisibleRect.width / 2;\r\n newImageCanvasContainerVisibleRect.y = newImageCanvasContainerVisibleRectCenterY - oldImageCanvasContainerVisibleRect.height / 2;\r\n\r\n //\r\n // scroll to make visible the new rectangle\r\n\r\n imageCanvas.scrollRectToVisible(newImageCanvasContainerVisibleRect);\r\n }", "@Override\n public boolean touchDown(float x, float y, int pointer, int button) {\n prevZoomFactor = getZoomFactor();\n return false;\n }", "public void zoom() {\n\t\tdisp.zoom();\n\t\texactZoom.setText(disp.getScale() + \"\");\n\t\tresize();\n\t\trepaint();\n\t}", "private void userInput(){\n if(mousePressed){\n rX -= (mouseY - pmouseY) * 0.002f;//map(mouseY,0,height,-PI,PI);\n rY -= (mouseX - pmouseX) * 0.002f;// map(mouseX,0,width,PI,-PI);\n }\n rotateX(rX);\n rotateY(rY);\n\n if(keyPressed){\n if(keyCode == UP){\n zoom += 0.01f;\n }\n if(keyCode == DOWN){\n zoom -= 0.01f;\n }\n }\n }", "private void setZoomLevel() {\n final float oldMaxScale = photoView.getMaximumScale();\n photoView.setMaximumScale(oldMaxScale *2);\n photoView.setMediumScale(oldMaxScale);\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"Zoom less\");\r\n\t\t\t}", "public double getZoom() {\n return curZoom;\n }", "private void onScroll(double wheelDelta, Point2D mousePoint) {\n double zoomFactor = Math.exp(wheelDelta * zoomIntensity);\n\n Bounds innerBounds = zoomNode.getLayoutBounds();\n Bounds viewportBounds = getViewportBounds();\n\n // calculate pixel offsets from [0, 1] range\n double valX = this.getHvalue() * (innerBounds.getWidth() - viewportBounds.getWidth());\n double valY = this.getVvalue() * (innerBounds.getHeight() - viewportBounds.getHeight());\n scaleValue = scaleValue * zoomFactor;\n \n // calculate minimum zoom\n if(Math.max(target.getLayoutBounds().getWidth()*scaleValue, target.getLayoutBounds().getHeight()*scaleValue) < minViewPortSize) {\n\n \tscaleValue = minViewPortSize / Math.max(target.getLayoutBounds().getWidth(), target.getLayoutBounds().getHeight());\n updateScale();\n this.layout();\n \n } else if(scaleValue > zoom_max) {\n \tscaleValue = zoom_max;\n \tupdateScale();\n this.layout();\n }else {\n \tupdateScale();\n this.layout();\n\n // convert target coordinates to zoomTarget coordinates\n Point2D posInZoomTarget = target.parentToLocal(zoomNode.parentToLocal(mousePoint));\n\n // calculate adjustment of scroll position\n Point2D adjustment = target.getLocalToParentTransform().deltaTransform(posInZoomTarget.multiply(zoomFactor - 1));\n\n // convert back to [0, 1] range\n Bounds updatedInnerBounds = zoomNode.getBoundsInLocal();\n this.setHvalue((valX + adjustment.getX()) / (updatedInnerBounds.getWidth() - viewportBounds.getWidth()));\n this.setVvalue((valY + adjustment.getY()) / (updatedInnerBounds.getHeight() - viewportBounds.getHeight()));\n }\n }", "void startZoom() {\n\t\t// this boolean tells the system that it needs to \n\t\t// initialize itself before trying to zoom\n\t\t// This is cleaner than duplicating code\n\t\t// see processZoom\n\t\tmZoomEstablished=false;\n\t}", "public void pointToMouse() {\n pointToXY(p.mouseX,p.mouseY);\n }", "@Test\n public void testSetDragMultiplier() {\n final DraggingCamera camera = newValueObject();\n testBoundField(camera, DraggingCamera.DRAG_MULTIPLIER, 1.678f);\n }", "protected void zoomBetweenCursors(){\n ixDataCursor1 = ixDataShown[xpCursor1];\n ixDataCursor2 = ixDataShown[xpCursor2];\n ixDataShowRight = ixDataCursor2 + (((ixDataCursor2 - ixDataCursor1) / 10) & widgg.mIxData);\n int ixiData1 = (ixDataShown[xpCursor1] >> widgg.shIxiData) & widgg.mIxiData;\n int ixiData2 = (ixDataShown[xpCursor2] >> widgg.shIxiData) & widgg.mIxiData;\n int time1 = widgg.tracksValue.getTimeShort(ixiData1);\n int time2 = widgg.tracksValue.getTimeShort(ixiData2);\n if((time2 - time1)>0){\n widgg.timeorg.timeSpread = (time2 - time1) * 10/8;\n assert(widgg.timeorg.timeSpread >0);\n } else {\n widgg.stop();\n }\n xpCursor1New = xpCursor2New = cmdSetCursor; \n widgg.redraw(100, 200);\n \n }", "public double getZoom() {\n\treturn zoom;\n}", "public void mouseReleased() {\nif (released == true && draggingZoomSlider == true){\n alt = (map(zoom,texture.height-texture.height,texture.height,radians(-90),radians(90)));\n // GHA = (map(tzoom, texture.width - texture.width, texture.width, radians(-180),radians(180)));\n GHA = (map(tzoom,texture.width - texture.width,texture.width, radians(-180),radians(180)));\n initStars();\n initializeSphere(sDetail);\n thread( \"getPoints\");\n renderGlobe();\n}\ndraggingZoomSlider = false;\n}", "private void toggleZoom(float x, float y) {\n if (getZoomFactor() == MAX_ZOOM_FACTOR) {\n setZoomFactor(MIN_ZOOM_FACTOR);\n }\n else {\n setZoomFactor(MAX_ZOOM_FACTOR);\n }\n moveCameraToPosWithinBoardBounds(x, y);\n }", "public void zoomIn() { zoomIn(1); }", "@Override\n public void setCameraZoom(int zoomLevel) {\n mMap.moveCamera(CameraUpdateFactory.zoomTo(zoomLevel));\n }", "@Test\n\tpublic void testMouseMoved() {\n\t}", "public void zoomIn() {\n\tsetZoom(getNextZoomLevel());\n}", "private void ZoomCircle(double zoom, double circle_speed){\n final double COEFFICIENT=490;\n circle.setRadius(COEFFICIENT / (zoom + circle_speed));\n }", "@Override\n public boolean zoom(float initialDistance, float distance) {\n cameraDistance += (initialDistance - distance) * zoomSpeed;\n\n //Makes sure the user can't zoom too far or too close\n if(cameraDistance < minCameraDistance)\n cameraDistance = minCameraDistance;\n else if(cameraDistance > maxCameraDistance)\n cameraDistance = maxCameraDistance;\n\n //camera needs to be set again\n resize(800, 480);\n return false;\n }", "public long getZoomLevel()\r\n {\r\n return myZoomLevel;\r\n }", "public double getZoomFactor()\r\n {\r\n return zoomFactor;\r\n }", "public void setFacteurZoom(double fac)\n\t{\n \tthis.facteurZoom = this.facteurZoom * fac ;\n \tif (this.facteurZoom == 0)\n \t{\n \t\tthis.facteurZoom = 0.01;\n \t}\n }", "public void mousePressed(MouseEvent e) {\n\n if(Objects.equals(ToolSelect.GetTool(), \"zoom/pan\")){\n released = false;\n sPoint = MouseInfo.getPointerInfo().getLocation();\n }else {\n\n startPoint = e.getPoint();\n shape = new ColoredRectangle(ToolSelect.GetBorderColor(), ToolSelect.GetFillColor(), new Rectangle(), ToolSelect.GetTool(), null);\n if (Objects.equals(ToolSelect.GetTool(), \"plot\") || Objects.equals(ToolSelect.GetTool(), \"line\")) {\n shape.shape.setBounds(e.getX(), e.getY(), 1, 1);\n }\n }\n\n }", "public void setMousePosition(double mouseX, double mouseY) {\n this.mouseX = (int) mouseX;\n this.mouseY = (int) mouseY;\n }", "@JavascriptInterface\n public void setZoom(final int zoom) {\n getHandler().post(new Runnable() {\n @Override\n public void run() {\n if (mWebViewFragment.getMapSettings()\n .getZoom() != zoom) {\n if (BuildConfig.DEBUG) {\n Log.d(TAG,\n \"setZoom \" + zoom);\n }\n\n final MapSettings mapSettings = mWebViewFragment.getMapSettings();\n mapSettings.setZoom(zoom);\n mWebViewFragment.setMapSettings(mapSettings);\n }\n }\n });\n }", "public float getZoom() {\n return zoom;\n }", "public MouseWheelListener getZoomListener() {\r\n\t\treturn new MouseWheelListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseWheelMoved(MouseWheelEvent e) {\r\n\t\t\t\tif(e.getWheelRotation() < 0){\r\n\t\t\t\t\tit.increaseZoomX();\r\n\t\t it.increaseZoomY();\r\n\t\t\t\t}else if(e.getWheelRotation() > 0){\r\n\t\t\t\t\tit.decreaseZoomX();\r\n\t\t\t\t\tit.decreaseZoomY();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t}", "public synchronized float getZoom()\r\n {\r\n return zoom;\r\n }", "@Override\n\t\t\tpublic void mouseWheelMoved(MouseWheelEvent e) {\n\t\t\t\tif(enabled){\n\t\t\t\tImageIcon tap = null;\n\t\t\t\tif (e.getWheelRotation() < 0) {\n\t\t\t\t\t// zoom in - increase size\n\n\t\t\t\t\tif (zoom_count < 0) {\n\t\t\t\t\t\tzoom_count = 0;\n\t\t\t\t\t}\n\t\t\t\t\tzoom_count++;\n\t\t\t\t\t// fetch key frame number and get x, y of that frame in new\n\t\t\t\t\t// tapestry then crop image to that frame\n\t\t\t\t\tHashtable<Integer, ArrayList<ArrayList<Integer>>> xy = indexMap.getIndexTable();\n\t\t\t\t\ttapestry.removeAll();\n\t\t\t\t\tBufferedImage i = null;\n\t\t\t\t\tif (zoom_count == 1) {\n\t\t\t\t\t\tint pix = indexImage.getRGB(e.getX(), e.getY());\n\t\t\t\t\t\tint frameNum = (pix >> 16) & 0x000000FF;\n\t\t\t\t\t\tint keyFrameIndex = sceneIndex.get(frameNum);\n\t\t\t\t\t\tint frame = keyFrameIndex / (352 * 288 * 3);\n\n\t\t\t\t\t\t// find x,y of new tapestry\n\t\t\t\t\t\tSystem.out.println(\"x point in new tapestry: \" + xy.get(frame).get(1).get(0));\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\ti = ImageIO.read(new File(nameOfTapestry + \"_\" + method + \"_\" + threshold_zoom1 + \".png\"));\n\t\t\t\t\t\t} catch (IOException 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}\n\t\t\t\t\t\tint zoom_image_width = i.getWidth();\n\t\t\t\t\t\tint middle = zoom_image_width - original_tapestry_size_width;\n\n\t\t\t\t\t\tint T = 5;\n\n\t\t\t\t\t\tif (xy.get(frame).get(1).get(0) - T < 0) {\n\t\t\t\t\t\t\tstart_x = 0;\n\t\t\t\t\t\t\tend_x = original_tapestry_size_width;\n\t\t\t\t\t\t} else if ((xy.get(frame).get(1).get(0) - T + original_tapestry_size_width) > zoom_image_width) {\n\t\t\t\t\t\t\tstart_x = zoom_image_width - original_tapestry_size_width;\n\t\t\t\t\t\t\tend_x = zoom_image_width;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tstart_x = xy.get(frame).get(1).get(0) - T;\n\t\t\t\t\t\t\tend_x = xy.get(frame).get(1).get(0) - T + original_tapestry_size_width;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tSystem.out.println(\"x_start point : \" + start_x);\n\t\t\t\t\t\tSystem.out.println(\"x_endt point : \" + end_x);\n\n\t\t\t\t\t\ti = i.getSubimage(start_x, 0, (end_x - start_x), original_tapestry_size_height);\n\t\t\t\t\t\ttap = new ImageIcon(i);\n\t\t\t\t\t\tzoom_count=1;\n\n\t\t\t\t\t} else if (zoom_count >= 2) {\n\n\t\t\t\t\t\tint pix = zoom1IndexImage.getRGB(e.getX(), e.getY());\n\t\t\t\t\t\tint frameNum = (pix >> 16) & 0x000000FF;\n\t\t\t\t\t\tint keyFrameIndex = zoom1SceneIndex.get(frameNum);\n\t\t\t\t\t\tint frame = keyFrameIndex / (352 * 288 * 3);\n\n\t\t\t\t\t\t// find x,y of new tapestry\n\t\t\t\t\t\tSystem.out.println(\"x point in new tapestry: \" + xy.get(frame).get(2).get(0));\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\ti = ImageIO.read(new File(nameOfTapestry + \"_\" + method + \"_\" + threshold_zoom2 + \".png\"));\n\t\t\t\t\t\t} catch (IOException 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}\n\t\t\t\t\t\tint zoom_image_width = i.getWidth();\n\t\t\t\t\t\tint middle = zoom_image_width - original_tapestry_size_width;\n\n\t\t\t\t\t\tint T = 20;\n\n\t\t\t\t\t\tif (xy.get(frame).get(2).get(0) - T < 0) {\n\t\t\t\t\t\t\tstart_x = 0;\n\t\t\t\t\t\t\tend_x = original_tapestry_size_width;\n\t\t\t\t\t\t} else if ((xy.get(frame).get(2).get(0) - T + original_tapestry_size_width) > zoom_image_width) {\n\t\t\t\t\t\t\tstart_x = zoom_image_width - original_tapestry_size_width;\n\t\t\t\t\t\t\tend_x = zoom_image_width;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tstart_x = xy.get(frame).get(2).get(0) - T;\n\t\t\t\t\t\t\tend_x = xy.get(frame).get(2).get(0) - T + original_tapestry_size_width;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tSystem.out.println(\"x_start point : \" + start_x);\n\t\t\t\t\t\tSystem.out.println(\"x_endt point : \" + end_x);\n\n\t\t\t\t\t\ti = i.getSubimage(start_x, 0, (end_x - start_x), original_tapestry_size_height);\n\t\t\t\t\t\ttap = new ImageIcon(i);\n\t\t\t\t\t\tzoom_count=2;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tJLabel label = new JLabel(\"\", tap, JLabel.CENTER);\n\n\t\t\t\t\ttapestry.add(label, BorderLayout.CENTER);\n\n\t\t\t\t\ttapestry.revalidate();\n\t\t\t\t\ttapestry.repaint();\n\n\t\t\t\t} else {\n\t\t\t\t\t// zoom out - decrease size\n\t\t\t\t\tif (zoom_count > 2) {\n\t\t\t\t\t\tzoom_count = 2;\n\t\t\t\t\t}\n\t\t\t\t\tHashtable<Integer, ArrayList<ArrayList<Integer>>> xy = indexMap.getIndexTable();\n\t\t\t\t\ttapestry.removeAll();\n\t\t\t\t\tif (zoom_count >= 2) {\n\t\t\t\t\t\tint pix = zoom2IndexImage.getRGB(e.getX(), e.getY());\n\t\t\t\t\t\tint frameNum = (pix >> 16) & 0x000000FF;\n\t\t\t\t\t\tint keyFrameIndex = zoom2SceneIndex.get(frameNum);\n\t\t\t\t\t\tint frame = keyFrameIndex / (352 * 288 * 3);\n\n\t\t\t\t\t\t// find x,y of new tapestry\n\t\t\t\t\t\tSystem.out.println(\"x point in new tapestry: \" + xy.get(frame).get(1).get(0));\n\t\t\t\t\t\tBufferedImage i = null;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\ti = ImageIO.read(new File(nameOfTapestry + \"_\" + method + \"_\" + threshold_zoom1 + \".png\"));\n\t\t\t\t\t\t} catch (IOException 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}\n\t\t\t\t\t\tint zoom_image_width = i.getWidth();\n\t\t\t\t\t\tint middle = zoom_image_width - original_tapestry_size_width;\n\n\t\t\t\t\t\tint T = 20;\n\n\t\t\t\t\t\tif (xy.get(frame).get(1).get(0) - T < 0) {\n\t\t\t\t\t\t\tstart_x = 0;\n\t\t\t\t\t\t\tend_x = original_tapestry_size_width;\n\t\t\t\t\t\t} else if ((xy.get(frame).get(1).get(0) - T + original_tapestry_size_width) > zoom_image_width) {\n\t\t\t\t\t\t\tstart_x = zoom_image_width - original_tapestry_size_width;\n\t\t\t\t\t\t\tend_x = zoom_image_width;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tstart_x = xy.get(frame).get(1).get(0) - T;\n\t\t\t\t\t\t\tend_x = xy.get(frame).get(1).get(0) - T + original_tapestry_size_width;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tSystem.out.println(\"x_start point : \" + start_x);\n\t\t\t\t\t\tSystem.out.println(\"x_endt point : \" + end_x);\n\n\t\t\t\t\t\ti = i.getSubimage(start_x, 0, (end_x - start_x), original_tapestry_size_height);\n\t\t\t\t\t\ttap = new ImageIcon(i);\n\t\t\t\t\t\tzoom_count = 1;\n\n\t\t\t\t\t} else if (zoom_count <= 1) {\n\t\t\t\t\t\ttap = new ImageIcon(nameOfTapestry + \"_\" + method + \"_\" + threshold + \".png\");\n\t\t\t\t\t\tzoom_count = 0;\n\t\t\t\t\t}\n\t\t\t\t\tJLabel label = new JLabel(\"\", tap, JLabel.CENTER);\n\n\t\t\t\t\ttapestry.add(label, BorderLayout.CENTER);\n\n\t\t\t\t\ttapestry.revalidate();\n\t\t\t\t\ttapestry.repaint();\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t}", "public float getZoom() {\n return zoom;\n }", "@Override\n public void mousePressed(MouseEvent e) {\n\n prevMouse.x = x(e);\n prevMouse.y = y(e);\n\n // 3D mode\n if (getChart().getView().is3D()) {\n if (handleSlaveThread(e)) {\n return;\n }\n }\n\n // 2D mode\n else {\n\n Coord2d startMouse = prevMouse.clone();\n\n if (maintainInAxis)\n maintainInAxis(startMouse);\n\n\n\n // stop displaying mouse position on roll over\n mousePosition = new MousePosition();\n\n // start creating a selection\n mouseSelection.start2D = startMouse;\n mouseSelection.start3D = screenToModel(startMouse.x, startMouse.y);\n\n if (mouseSelection.start3D == null)\n System.err.println(\"Mouse.onMousePressed projection is null \");\n\n\n // screenToModel(bounds3d.getCorners())\n\n }\n }", "public synchronized void addZoom(float zoom)\r\n {\r\n this.setZoom(zoom + this.getZoom());\r\n }", "public void zoomInto(Location loc, double zoom) {\n setZoom(zoom);\n setDisplayedLocation(loc);\n }", "public ProductGalleryPage zoomIn() {\n SpriiTestFramework.getInstance().waitForElement(By.xpath(zoomInElement), 2000);\n driver.findElement(By.xpath(zoomInElement)).click();\n return this;\n }", "private void checkForZoomIn(){\n if(checkIn == 1){\n zoomLevel++;\n adjustZoomFactor();\n checkOut = 1;\n checkIn = 0;\n } else{\n checkOut = 0;\n checkIn = 1;\n }\n\n }", "public void verifyZoom(int zoomLevel) {\r\n\r\n\t\tif (zoomLevel >= 20) {\r\n\r\n\t\t\tshowOrHideMarkets(true);\r\n\r\n\t\t} else {\r\n\r\n\t\t\tshowOrHideMarkets(false);\r\n\r\n\t\t}\r\n\r\n\t}", "public void mousePressed(MouseEvent evt) {\n if (dragging)\n return; // don't start a new drag while one is already in progress\n\torigy = evt.getY();\n\torigx = evt.getX();\n\tboolean shifted = (evt.getModifiers() & InputEvent.SHIFT_MASK) > 0;\n\trotate = shifted;\n\tzoom = ! shifted;\n }", "public void zoom(double amplifier) {\n\t\tint width = mapContainer.getWidth()-60;\n\t\tint height = mapContainer.getHeight()-60;\n\t\tdouble nXF = (double)(MouseInfo.getPointerInfo().getLocation().x - (getLocation().x + mapContainer.getLocation().x + 30))/width;\n\t\tdouble nYF = (double)(MouseInfo.getPointerInfo().getLocation().y - (getLocation().y + mapContainer.getLocation().y + 30))/height;\n\t\tzoom *= amplifier;\n\t\txF = xF - 1/(zoom*2) + 1/zoom*nXF;\n\t\tyF = yF - 1/(zoom*2) + 1/zoom*nYF;\n\t}", "private void unsafeSetInitialZoom() {\n if (hic.isInPearsonsMode()) {\n initialZoom = hic.getMatrix().getFirstPearsonZoomData(HiC.Unit.BP).getZoom();\n } else if (HiCFileTools.isAllChromosome(hic.getXContext().getChromosome())) {\n mainViewPanel.getResolutionSlider().setEnabled(false);\n initialZoom = hic.getMatrix().getFirstZoomData(HiC.Unit.BP).getZoom();\n } else {\n mainViewPanel.getResolutionSlider().setEnabled(true);\n\n HiC.Unit currentUnit = hic.getZoom().getUnit();\n\n List<HiCZoom> zooms = (currentUnit == HiC.Unit.BP ? hic.getDataset().getBpZooms() :\n hic.getDataset().getFragZooms());\n\n\n// Find right zoom level\n\n int pixels = mainViewPanel.getHeatmapPanel().getMinimumDimension();\n int len;\n if (currentUnit == HiC.Unit.BP) {\n len = (Math.max(hic.getXContext().getChrLength(), hic.getYContext().getChrLength()));\n } else {\n len = Math.max(hic.getDataset().getFragmentCounts().get(hic.getXContext().getChromosome().getName()),\n hic.getDataset().getFragmentCounts().get(hic.getYContext().getChromosome().getName()));\n }\n\n int maxNBins = pixels / HiCGlobals.BIN_PIXEL_WIDTH;\n int bp_bin = len / maxNBins;\n initialZoom = zooms.get(zooms.size() - 1);\n for (int z = 1; z < zooms.size(); z++) {\n if (zooms.get(z).getBinSize() < bp_bin) {\n initialZoom = zooms.get(z - 1);\n break;\n }\n }\n\n }\n hic.unsafeActuallySetZoomAndLocation(\"\", \"\", initialZoom, 0, 0, -1, true, HiC.ZoomCallType.INITIAL, true);\n }", "public double getFacteurZoom()\n\t{\n \treturn facteurZoom;\n }", "@Override\n public void onPinchZoom(PinchZoomDetector pPinchZoomDetector,\n TouchEvent pTouchEvent, float pZoomFactor) {\n\n\t\t/* On every sub-sequent touch event (after the initial touch) we offset\n\t\t * the initial camera zoom factor by the zoom factor calculated by\n\t\t * pinch-zooming */\n final float newZoomFactor = mInitialTouchZoomFactor * pZoomFactor;\n\n // If the camera is within zooming bounds\n if (newZoomFactor < MAX_ZOOM_FACTOR && newZoomFactor > MIN_ZOOM_FACTOR) {\n // Set the new zoom factor\n mCamera.setZoomFactor(newZoomFactor);\n }\n }", "public boolean onTouch(android.view.View r4, android.view.MotionEvent r5) {\r\n /*\r\n r3 = this;\r\n boolean r4 = r3.mAnimatingZoomEnding\r\n r0 = 1\r\n if (r4 != 0) goto L_0x008f\r\n int r4 = r5.getPointerCount()\r\n r1 = 2\r\n if (r4 <= r1) goto L_0x000e\r\n goto L_0x008f\r\n L_0x000e:\r\n android.view.ScaleGestureDetector r4 = r3.mScaleGestureDetector\r\n r4.onTouchEvent(r5)\r\n android.view.GestureDetector r4 = r3.mGestureDetector\r\n r4.onTouchEvent(r5)\r\n int r4 = r5.getAction()\r\n r4 = r4 & 255(0xff, float:3.57E-43)\r\n if (r4 == 0) goto L_0x0079\r\n if (r4 == r0) goto L_0x006a\r\n if (r4 == r1) goto L_0x002e\r\n r2 = 3\r\n if (r4 == r2) goto L_0x006a\r\n r2 = 5\r\n if (r4 == r2) goto L_0x0079\r\n r5 = 6\r\n if (r4 == r5) goto L_0x006a\r\n goto L_0x008f\r\n L_0x002e:\r\n int r4 = r3.mState\r\n if (r4 != r1) goto L_0x008f\r\n android.graphics.PointF r4 = r3.mCurrentMovementMidPoint\r\n com.ablanco.zoomy.MotionUtils.midPointOfEvent(r4, r5)\r\n android.graphics.PointF r4 = r3.mCurrentMovementMidPoint\r\n float r5 = r4.x\r\n android.graphics.PointF r1 = r3.mInitialPinchMidPoint\r\n float r2 = r1.x\r\n float r5 = r5 - r2\r\n r4.x = r5\r\n float r5 = r4.y\r\n float r1 = r1.y\r\n float r5 = r5 - r1\r\n r4.y = r5\r\n float r5 = r4.x\r\n android.graphics.Point r1 = r3.mTargetViewCords\r\n int r2 = r1.x\r\n float r2 = (float) r2\r\n float r5 = r5 + r2\r\n r4.x = r5\r\n float r5 = r4.y\r\n int r1 = r1.y\r\n float r1 = (float) r1\r\n float r5 = r5 + r1\r\n r4.y = r5\r\n float r5 = r4.x\r\n float r4 = r4.y\r\n android.widget.ImageView r1 = r3.mZoomableView\r\n r1.setX(r5)\r\n android.widget.ImageView r5 = r3.mZoomableView\r\n r5.setY(r4)\r\n goto L_0x008f\r\n L_0x006a:\r\n int r4 = r3.mState\r\n if (r4 == r0) goto L_0x0075\r\n if (r4 == r1) goto L_0x0071\r\n goto L_0x008f\r\n L_0x0071:\r\n r3.endZoomingView()\r\n goto L_0x008f\r\n L_0x0075:\r\n r4 = 0\r\n r3.mState = r4\r\n goto L_0x008f\r\n L_0x0079:\r\n int r4 = r3.mState\r\n if (r4 == 0) goto L_0x008d\r\n if (r4 == r0) goto L_0x0080\r\n goto L_0x008f\r\n L_0x0080:\r\n r3.mState = r1\r\n android.graphics.PointF r4 = r3.mInitialPinchMidPoint\r\n com.ablanco.zoomy.MotionUtils.midPointOfEvent(r4, r5)\r\n android.view.View r4 = r3.mTarget\r\n r3.startZoomingView(r4)\r\n goto L_0x008f\r\n L_0x008d:\r\n r3.mState = r0\r\n L_0x008f:\r\n return r0\r\n */\r\n throw new UnsupportedOperationException(\"Method not decompiled: com.ablanco.zoomy.ZoomableTouchListener.onTouch(android.view.View, android.view.MotionEvent):boolean\");\r\n }", "public void setMouseLocation(int mapX, int mapY) {\n\n if (!map.canSelectPoint(mapX, mapY)) {\n return;\n }\n\n if (hoverX == mapX && hoverY == mapY) {\n return;\n }\n\n hoverX = mapX;\n hoverY = mapY;\n\n selectionChanged = true;\n }", "public void panOrZoom(ME_ENUM me_enum, MouseEvent me) {\n if (me.getButton() != MouseEvent.BUTTON2 && ui_inter != UI_INTERACTION.PANNING && pan_mode == false) return;\n switch (me_enum) {\n case PRESSED: initializeDragVars(me); ui_inter = UI_INTERACTION.PANNING; repaint(); break;\n case DRAGGED: updateDragVars(me,true); repaint(); break;\n case RELEASED: updateDragVars(me,true); ui_inter = UI_INTERACTION.NONE; \n double dx = m_wx1 - m_wx0, dy = m_wy1 - m_wy0;\n if (dx != 0.0 || dy != 0.0) {\n Rectangle2D r = getExtents();\n setExtents(new Rectangle2D.Double(r.getX() - dx, r.getY() - dy, r.getWidth(), r.getHeight()));\n }\n break;\n case CLICKED: zoomToFit(); break;\n\tcase MOVED:\n\t\tbreak;\n\tcase WHEEL:\n\t\tbreak;\n\tdefault:\n\t\tbreak;\n }\n }", "public void zoomCheck(float x, float y) {\n if (y<=470 && y>=430) {\n if (x<=720 && x>=680) {\n game.changeZoom(1);\n } else if (x<=780 && x>=740) {\n game.changeZoom(0);\n }\n }\n }", "private void initializeZoom() {\n\n String zoomAppToken = getString(R.string.zoom_key);\n ZoomSDK.setFacemapEncryptionKey(ZoomConnectedConfig.PublicKey);\n ZoomSDK.initialize(\n this,\n ZoomConnectedConfig.AppToken,\n mInitializeCallback\n );\n\n // preload sdk resources so the UI is snappy (optional)\n ZoomSDK.preload(this);\n\n // Signal to the ZoOm SDK that audit trail should be captured\n ZoomSDK.setAuditTrailType(ZoomAuditTrailType.HEIGHT_640);\n\n // Signal to ZoOm to also capture time-based session images which can be used in addition to ZoOm Audit Trail per our documentation.\n ZoomSDK.setTimeBasedSessionImagesEnabled(true);\n\n ZoomCustomization currentCustomization = new ZoomCustomization();\n ZoomConnectedConfig.currentCustomization = ZoomConnectedConfig.ZoomConnectedCustomization();\n ZoomSDK.setCustomization(currentCustomization);\n }", "public boolean canZoomIn() {\n\treturn getZoom() < getMaxZoom();\n}", "public final int getZoom() {\r\n return zoom;\r\n }", "public Integer getZoom() {\n return zoom;\n }", "public Integer getZoom() {\n return zoom;\n }" ]
[ "0.69961494", "0.6903942", "0.6561085", "0.6527653", "0.6521561", "0.6505554", "0.63993037", "0.63804847", "0.6376801", "0.6354767", "0.63412446", "0.6212748", "0.62056106", "0.61792207", "0.61461663", "0.61159515", "0.6063516", "0.6053372", "0.60498375", "0.6021897", "0.6021897", "0.60206866", "0.5975508", "0.5940685", "0.59360194", "0.58918405", "0.58894753", "0.5881095", "0.5864196", "0.58041644", "0.58033556", "0.5801249", "0.5784169", "0.5778022", "0.5746805", "0.5738957", "0.5726432", "0.5706261", "0.5688778", "0.5685615", "0.5651677", "0.5647307", "0.56471425", "0.56344295", "0.5627693", "0.5627017", "0.5608777", "0.5607814", "0.560049", "0.5592541", "0.55884886", "0.5587775", "0.5555566", "0.5554333", "0.5543449", "0.5527227", "0.55113226", "0.5511218", "0.5508042", "0.5503709", "0.5499578", "0.5494727", "0.5455885", "0.54519004", "0.544669", "0.5438774", "0.54157263", "0.5395691", "0.5393647", "0.53922266", "0.538959", "0.53691036", "0.53579134", "0.5354577", "0.53360903", "0.5330902", "0.53269", "0.5322447", "0.5309573", "0.53069293", "0.53004944", "0.5264491", "0.52536315", "0.52519625", "0.5248936", "0.52328277", "0.5228042", "0.5226789", "0.52266484", "0.5221067", "0.5210418", "0.5203086", "0.5194069", "0.518869", "0.51881963", "0.5182627", "0.5177072", "0.5176831", "0.51726943", "0.51726943" ]
0.8706289
0
Test of setDragMultiplier method, of class DraggingCamera.
@Test public void testSetDragMultiplier() { final DraggingCamera camera = newValueObject(); testBoundField(camera, DraggingCamera.DRAG_MULTIPLIER, 1.678f); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testSetZoomMultiplier() {\n final DraggingCamera camera = newValueObject();\n testBoundField(camera, DraggingCamera.ZOOM_MULTIPLIER, 1.678f);\n }", "public void setMultiplier(int newValue) {\n multiplier = newValue;\n }", "private void setMultipliers(double healthMultiplier, double dmgMultiplier, double speedMultiplier, double jmpHeightMultiplier) {\n\n // Health multiplier : set to 1 if input is below 1.\n if (healthMultiplier < 1) {\n this.healthMultiplier = 1;\n } else {\n this.healthMultiplier = healthMultiplier;\n }\n\n // Attack damage multiplier : set to 1 if input is below 1.\n if (dmgMultiplier < 1) {\n this.dmgMultiplier = 1;\n } else {\n this.dmgMultiplier = dmgMultiplier;\n }\n\n // Move speed multiplier : set to 1 if input is below 1.\n if (speedMultiplier < 1) {\n this.speedMultiplier = 1;\n } else {\n this.speedMultiplier = speedMultiplier;\n }\n\n // Jump height multiplier : set to 1 if input is below 1.\n if (jmpHeightMultiplier < 1) {\n this.jmpHeightMultiplier = 1;\n } else {\n this.jmpHeightMultiplier = jmpHeightMultiplier;\n }\n }", "public void setSpeed(double multiplier);", "@Override\n\tprotected void setMultiplier(DynamicMultiplier multiplier) {\n\t\tif (\"supportVectors\".equals(multiplier.getName())) {\n\t\t\tmultiplier.setFactor(numberOfSupportVectors);\n\t\t} else if (\"supportVectorsMinusOne\".equals(multiplier.getName())) {\n\t\t\tmultiplier.setFactor(numberOfSupportVectors - 1);\n\t\t} else if (\"supportVectorMachines\".equals(multiplier.getName())) {\n\t\t\tmultiplier.setFactor((numberOfClasses * (numberOfClasses - 1)) / 2);\n\t\t} else if (\"squareAndMultiplyDegree\".equals(multiplier.getName())) {\n\t\t\tmultiplier.setFactor((int) (2.0 * FastMath.floor(FastMath.log(2.0, ((Integer) kernelDegree.getValue())))));\n\t\t}\n\t}", "public void setMotors(double leftSpeed, double rightSpeed, double multiplier){\n double z = 0.1;\n if(multiplier<0){\n z = (1-Math.abs(multiplier))*0.5+0.25;\n }\n else{\n z = multiplier*0.25+0.75;\n }\n m_leftMotor.set(leftSpeed*z); \n m_rightMotor.set(rightSpeed*z);\n}", "@Test\n public void testSetZoomMin() {\n final DraggingCamera camera = newValueObject();\n testBoundField(camera, DraggingCamera.ZOOM_MIN, 1.1f);\n }", "@Test\n public void testGetMoveSpeedMultiplier() {\n assertEquals(1, proj.getMoveSpeedMultiplier(), 0.001);\n }", "public void setThresholdMultiplier(double multiplier) {\n\t\tm_thresholdMultiplier = (multiplier > 0) ? multiplier : 1.0;\n\t}", "Double getMultiplier();", "@Test\n public void testSetZoomMax() {\n final DraggingCamera camera = newValueObject();\n testBoundField(camera, DraggingCamera.ZOOM_MAX, 10.0f);\n }", "@Test\n public void testSetZoomToMouse() {\n final DraggingCamera camera = newValueObject();\n testBoundField(camera, DraggingCamera.ZOOM_TO_MOUSE, false);\n }", "public void setSpeed(int newTicksMultiplier) {\r\n this.ticksMultiplier = newTicksMultiplier;\r\n }", "public double getMultiplier() {\r\n return multiplier;\r\n }", "@Test\n public void testGetProjectileSpeedMultiplier() {\n assertEquals(1.3, proj.getProjectileSpeedMultiplier(), 0.001);\n }", "public void setSMultiplier(float SMultiplier){\n\t\tthis.SMultiplier = SMultiplier;\n\t}", "public int getMultiplier() {\n return multiplier;\n }", "public void multiplyCoords(double multiplier) {\n\t\tposition.setX(position.getX() * multiplier);\n\t\tposition.setY(position.getY() * multiplier);\n\t\tsetX(getX() * multiplier);\n\t\tsetY(getY() * multiplier);\n\t}", "public void changeSpeed(double multiplier, String theBase) {\r\n\t\tif (theBase.equals(\"zombie\")) {\r\n\t\t\tgetEnemyAnimation().getTranslation().setRate(multiplier);\r\n\t\t\tgetEnemyAnimation().getAnimation().setRate(multiplier);\r\n\t\t}else if (theBase.equals(\"tower\")) {\r\n\t\t\tgetAnimation().getAnimation().setRate(multiplier);\r\n\t\t\tProjectile pjtile = getAnimation().getProjectile();\r\n\t\t\tif (pjtile != null) {\r\n\t\t\t\tList<Projectile> listOfPjtile = getAnimation().getPjList();\r\n\t\t\t\tfor (Projectile pjt: listOfPjtile) {\r\n\t\t\t\t\tpjt.getAnimation().setRate(multiplier);\r\n\t\t\t\t\tpjt.getTranslation().setRate(multiplier);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public abstract void setMovementPerTick(float step);", "@Override\n public void onCardDragging(Direction direction, float ratio) {\n Log.d(TAG, \"onCardDragging: d=\" + direction.name() + \" ratio=\" + ratio);\n }", "public static void updateMultiplier(Person person, int multiplier) {\n updatePerson(person, \"usermultiplier\", multiplier);\n }", "public void setDamping(float ratio) { \n \tmouseJointDef.dampingRatio = ratio; \n }", "public void setXmultiplier(double setx)\n {\n xmultiplier = setx;\n }", "@Test\r\n\tpublic void setDampingRatio() {\r\n\t\tWeldJoint<Body> wj = new WeldJoint<Body>(b1, b2, new Vector2());\r\n\t\t\r\n\t\twj.setDampingRatio(0.0);\r\n\t\tTestCase.assertEquals(0.0, wj.getDampingRatio());\r\n\t\t\r\n\t\twj.setDampingRatio(1.0);\r\n\t\tTestCase.assertEquals(1.0, wj.getDampingRatio());\r\n\t\t\r\n\t\twj.setDampingRatio(0.2);\r\n\t\tTestCase.assertEquals(0.2, wj.getDampingRatio());\r\n\t}", "private void setDrag(){\n\t\tBankControllerReader bank = myView.getBankControllerReader();\n\t\tString methodName = \"addToGrid\";\n\t\tmyRoot.setOnMouseMoved(e -> myHover.displayLocation(e));\n\t\t\n\t\tmyRoot.setOnDragOver(e -> e.acceptTransferModes(TransferMode.ANY));\n\t\tmyRoot.setOnDragDropped(e -> {\n\t\t\tString presetName = e.getDragboard().getString();\n\t\t\tAttributeOwnerReader presetAO = bank.getPreset(presetName);\n\t\t\tPoint2D pos = new Point2D(e.getX(), e.getY());\n\t\t\tfor(Class<?> inter : presetAO.getClass().getInterfaces()){\n\t\t\t\ttry {\n\t\t\t\t\tMethod toCall = myAdder.getClass().getDeclaredMethod(methodName, inter, Point2D.class);\n\t\t\t\t\ttoCall.invoke(myAdder, presetAO, pos);\n\t\t\t\t\tbreak;\n\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "public void setFactor(Double factor);", "private void calculateBasicRatio() {\n if (mLastZoomRatio == DEFAULT_VALUE) {\n if(isAngleCamera()){\n mBasicZoomRatio = 1.6f;\n }else{\n mBasicZoomRatio = ZOOM_UNSUPPORTED_DEFAULT_VALUE;\n }\n } else {\n mBasicZoomRatio = mLastZoomRatio;\n }\n //modify by bv liangchangwei for fixbug 3518\n }", "private void gunModifier()\n\t{\t\t\n\t\tif (_gunModifier == 0)\n\t\t{\n\t\t\t_gunModifier = (_gunModifierSwivel * GameState._density);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (_gunModifier == _gunModifierSwivel * GameState._density)\n\t\t\t{\n\t\t\t\t_gunModifier = -1 * (_gunModifierSwivel* GameState._density);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (_gunModifier == -1 * (_gunModifierSwivel* GameState._density))\n\t\t\t\t{\n\t\t\t\t\t_gunModifier = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private double genMultiplier() {\n return (random.nextInt(81) + 60)/100.0;\n }", "private void initializeDragVars(MouseEvent me) { m_wx0 = m_wx1 = sxToWx(m_x0 = m_x1 = me.getX()); m_wy0 = m_wy1 = syToWy(m_y0 = m_y1 = me.getY()); }", "void onDrag(float elasticOffset,\n float elasticOffsetPixels,\n float rawOffset,\n float rawOffsetPixels);", "public void setScaleFactor(float scaleFactor) {\n\t\ttrueCoreRadius *= scaleFactor;\n\t\ttruePetalRadius *= scaleFactor;\n\t\tcoreRadius = (int) trueCoreRadius;\n\t\tpetalRadius = (int) truePetalRadius;\n\t\tthis.scaleFactor *= scaleFactor;\n\t}", "public void func_180430_e(float distance, float damageMultiplier) {}", "public void multiply(CubieCube multiplier) {\n multiplyTheCorners(multiplier);\n multiplyTheEdges(multiplier);\n }", "public void setATKMultiplier(float aTKMultiplier) {\n\t\tATKMultiplier = aTKMultiplier;\n\t}", "private void adjustZoomFactor(){\n switch(zoomLevel){\n case 0:zoomFactor = 39; break;\n case 1:zoomFactor = 37; break;\n case 2:zoomFactor = 35; break;\n case 3:zoomFactor = 33; break;\n case 4:zoomFactor = 31; break;\n case 5:zoomFactor = 29; break;\n case 6:zoomFactor = 27; break;\n case 7:zoomFactor = 25; break;\n case 8:zoomFactor = 23; break;\n case 9:zoomFactor = 21; break;\n case 10:zoomFactor = 20; break;\n case 11:zoomFactor = 18; break;\n case 12:zoomFactor = 16; break;\n case 13:zoomFactor = 14; break;\n case 14:zoomFactor = 12; break;\n case 15:zoomFactor = 10; break;\n case 16:zoomFactor = 8; break;\n case 17:zoomFactor = 6; break;\n case 18:zoomFactor = 4; break;\n case 19:zoomFactor = 2; break;\n case 20:zoomFactor = 0; break;\n }\n }", "@Test(timeout=300000)\n public void test02() throws Throwable {\n ControllerTransferListener controllerTransferListener0 = new ControllerTransferListener((CjdbcGui) null);\n controllerTransferListener0.mouseDragged((MouseEvent) null);\n }", "@Override\n public void fakeDragBy(float offset) {\n if (isFakeDragging() || beginFakeDrag()) {\n super.fakeDragBy(offset);\n }\n }", "public double getMultiplier() {\n return genericModifier.getMultiplier();\n }", "public void setDependentSizeParameters ( double new_ratio, double new_mag, int new_radius ) {\r\n\t\tradius_mag_dependent = true;\r\n\t\tplot_ratio = new_ratio;\r\n\t\tlimiting_mag = new_mag;\r\n\t\tplot_radius = new_radius;\r\n\t}", "public void setMovementGranularities(int granularities) {\n/* 544 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public void setUniformMutationRatio(double delta){\n this.delta = delta;\n }", "public void multiply(double multiplier) {\n x *= multiplier;\n y *= multiplier;\n }", "public void setMagicalProtectScaling(double magicalProtectScaling)\r\n {\r\n this.mMagicalProtectScaling = magicalProtectScaling;\r\n }", "boolean isSetValueRatio();", "public void onTargetRadiusChanged(float targetRadius) {\n }", "public void setDitherBits(float ditherBits) {\n\t\tif (ditherBits <= 0) {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"DitherBits must be greater than 0\");\n\t\t}\n\t\tthis.ditherBits = ditherBits;\n\t}", "public abstract void setDecimation(float decimation);", "@Test\n public void testSetRating() {\n final double delta = 0.0;\n final double expectedRating1 = 70.0;\n final double expectedRating2 = 65.0;\n final double expectedRating3 = 85.5;\n movie1.setRating(expectedRating1);\n movie2.setRating(expectedRating2);\n movie3.setRating(expectedRating1);\n movie4.setRating(expectedRating3);\n movie1.setRating(expectedRating2);\n assertEquals(expectedRating2, movie1.getRating(), delta);\n assertEquals(expectedRating2, movie2.getRating(), delta);\n assertEquals(expectedRating1, movie3.getRating(), delta);\n assertEquals(expectedRating3, movie4.getRating(), delta);\n }", "void captureDrag(float[] startingPoint, float[] endingPoint, int sequenceNumber);", "public float getPowerMultiplier() { return 0.5F; }", "public void setMyIncomeMultiplier(float factor) throws CallbackAIException;", "private void enableDrag() {\n final Delta dragDelta = new Delta();\n setOnMousePressed((MouseEvent mouseEvent) -> {\n // record a delta distance for the drag and drop operation.\n if(isDragEnabled) {\n dragDelta.x = getCenterX() - mouseEvent.getX();\n dragDelta.y = getCenterY() - mouseEvent.getY();\n }\n });\n setOnMouseDragged((MouseEvent mouseEvent) -> {\n if(isDragEnabled) {\n double newX = mouseEvent.getX() + dragDelta.x;\n if (newX > 0 && newX < getScene().getWidth()) {\n setCenterX(newX);\n if(this == base)\n startX = getCenterX();\n }\n double newY = mouseEvent.getY() + dragDelta.y;\n if (newY > 0 && newY < getScene().getHeight()) {\n setCenterY(newY);\n if(this == base)\n startY = getCenterY();\n }\n }\n });\n }", "Condition(double multiplier) {\r\n this.multiplier = multiplier;\r\n }", "@Test\n public void testSetLimite() {\n \n assertEquals(0.0,soin3.getLimite(),0.01);\n soin3.setLimite(56.0);\n assertEquals(56.0,soin3.getLimite(),0.01);\n }", "public static void setSpeedScalingFactor(double speedFactor)\n\t{\n\t\tspeedScalingFactor = speedFactor;\n\t//\telse speedScalingFactor = SpeedBasedDetection.DEF_SCALING_FACTOR;\n\t\t//\t\tSystem.out.println(\"speedScalingFactor: \"+speedScalingFactor);\n\t\t//Prefs.speedScalingFactor = speedScalingFactor;\n\t}", "void drive(double x_stick, double y_stick, double x_right_stick, double multiplier) {\n if (Math.abs(x_stick) >= (2 * Math.abs(y_stick)) + .1) {\n flMotor.setPower(x_stick * multiplier);\n frMotor.setPower(-x_stick * multiplier);\n blMotor.setPower(-x_stick * multiplier);\n brMotor.setPower(x_stick * multiplier);\n } else {\n flMotor.setPower((y_stick + x_right_stick) * multiplier);\n frMotor.setPower((y_stick - x_right_stick) * multiplier);\n blMotor.setPower((y_stick + x_right_stick) * multiplier);\n brMotor.setPower((y_stick - x_right_stick) * multiplier);\n }\n }", "@Override\n public void setDistancePerRevolution(double dpr, int upr) {\n this._distPerRevolution = dpr;\n }", "public abstract double getFractionMultiplier();", "@Test(timeout = 4000)\n public void test05() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"RATIO_16_9\", (Content) null, 980.8247F, (-943.0F));\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(0, homeTexture0, 0, homeTexture0, 0, 980.8247F);\n HomeEnvironment homeEnvironment1 = homeEnvironment0.clone();\n HomeEnvironment homeEnvironment2 = homeEnvironment0.clone();\n homeEnvironment2.getPhotoHeight();\n HomeEnvironment.Property homeEnvironment_Property0 = HomeEnvironment.Property.PHOTO_HEIGHT;\n PropertyChangeListener propertyChangeListener0 = mock(PropertyChangeListener.class, new ViolatedAssumptionAnswer());\n homeEnvironment1.setSkyTexture(homeTexture0);\n PropertyChangeListenerProxy propertyChangeListenerProxy0 = new PropertyChangeListenerProxy(\"com.eteks.sweethome3d.model.HomeEnvironment$Property\", propertyChangeListener0);\n homeEnvironment2.removePropertyChangeListener(homeEnvironment_Property0, propertyChangeListenerProxy0);\n homeEnvironment1.getVideoFrameRate();\n homeEnvironment1.getSkyTexture();\n homeEnvironment1.setAllLevelsVisible(false);\n homeEnvironment2.getVideoHeight();\n homeEnvironment2.setVideoFrameRate(300);\n assertEquals(300, homeEnvironment2.getVideoFrameRate());\n }", "@Before\r\n\tpublic void setUp() throws Exception {\n\t\tthis.borderRepulsion = new BorderRepulsionForce(new Bounds(0, 0, 100,\r\n\t\t\t\t100));\r\n\t\tthis.borderRepulsion.setPrefferedDistance(10);\r\n\t}", "public void setDragged(double x, double y) {\n if (Math.abs(draggedX - x) >= 0.00001d || Math.abs(draggedY - y) >= 0.00001d) {\n draggedX = x < 0 ? 0 : x;\n draggedY = y < 0 ? 0 : y;\n xOffset = draggedX - pressedX;\n yOffset = draggedY - pressedY;\n\n gameChanged = true;\n }\n }", "public float sizeMultiplier();", "public ScoreMultiplier(float x, float y, float multiplier){\r\n\t\tposition.x = x;\r\n\t\tposition.y = y;\r\n\t\tthis.multiplier = multiplier;\r\n\t}", "@Test(timeout=300000)\n public void test15() throws Throwable {\n ControllerTransferListener controllerTransferListener0 = new ControllerTransferListener((CjdbcGui) null);\n controllerTransferListener0.dragEnter((DropTargetDragEvent) null);\n }", "public void victorTest(){\n\n victorTestController.set(0.5);\n }", "void setupDragLines() {\n\t\tmouseLockedToLine = true;\n\t\tbeginOffsetP.set(P); // lock the beginning position of the offset vector\n\t\tfor (int i = 0; i < amount; i++)\n\t\t\tline[i].resetLockPoints(P); // check\n\t}", "public void setDiameter(int newDiameter)\n {\n diameter = (newDiameter >= 0 ? newDiameter : 10);\n repaint(); // repaint panel\n }", "@Test(timeout=300000)\n public void test14() throws Throwable {\n BackendTransferListener backendTransferListener0 = new BackendTransferListener((CjdbcGui) null);\n backendTransferListener0.dropActionChanged((DragSourceDragEvent) null);\n }", "public void setSpeed() {\n //assigns the speed based on the shuffleboard with a default value of zero\n double tempSpeed = setpoint.getDouble(0.0);\n\n //runs the proportional control system based on the aquired speed\n controlRotator.proportionalSpeedSetter(tempSpeed);\n }", "public boolean mustChangeDirection(double changeDirectionModifier) {\r\n return (_directionsPicked.size() > 0) || (changeDirectionModifier > _random.nextDouble());\r\n }", "public void setPanning(float value) {\r\n\t\tleft.lvl.set(0.50f - value / 2);\r\n\t\tright.lvl.set(0.50f + value / 2);\r\n\t}", "private void computeRatio() {\n int i;\n int i2;\n int i3;\n boolean z = false;\n if (CameraSettings.getStrictAspectRatio(this.mRenderWidth, this.mRenderHeight) > -1 || !CameraSettings.isNearAspectRatio(this.mCameraWidth, this.mCameraHeight, this.mRenderWidth, this.mRenderHeight)) {\n int i4 = this.mCameraWidth;\n int i5 = this.mCameraHeight;\n switch (this.mTargetRatio) {\n case 0:\n this.mIsFullScreen = false;\n this.mIsRatio16_9 = false;\n if (!CameraSettings.isAspectRatio4_3(i4, i5)) {\n this.mNeedCropped = true;\n if (i4 * 4 > i5 * 3) {\n int i6 = (int) (((float) i5) * 0.75f);\n this.mScaleX = ((float) i6) / ((float) i4);\n i4 = i6;\n } else {\n int i7 = (int) ((((float) i4) * 4.0f) / 3.0f);\n this.mScaleY = ((float) i7) / ((float) i5);\n i5 = i7;\n }\n } else {\n this.mNeedCropped = false;\n this.mScaleX = 1.0f;\n this.mScaleY = 1.0f;\n }\n if (CameraSettings.sCroppedIfNeeded) {\n this.mIsFullScreen = true;\n this.mNeedCropped = true;\n this.mIsRatio16_9 = true;\n i = (int) ((((float) i4) * 16.0f) / 9.0f);\n this.mScaleX *= 0.75f;\n } else {\n i = i5;\n }\n if (b.isPad()) {\n this.mIsFullScreen = true;\n break;\n }\n break;\n case 1:\n this.mIsRatio16_9 = true;\n this.mIsFullScreen = true;\n if (!CameraSettings.isAspectRatio16_9(i4, i5)) {\n this.mNeedCropped = true;\n if (i4 * 16 <= i5 * 9) {\n int i8 = (int) ((((float) i4) * 16.0f) / 9.0f);\n this.mScaleY = ((float) i8) / ((float) i5);\n int i9 = i8;\n i2 = i4;\n i3 = i9;\n if (b.isPad()) {\n this.mIsRatio16_9 = false;\n this.mNeedCropped = true;\n i3 = (int) (((float) i3) * 0.75f);\n this.mScaleY *= 0.75f;\n }\n i = i3;\n i4 = i2;\n break;\n } else {\n i2 = (int) ((((float) i5) * 9.0f) / 16.0f);\n this.mScaleX = ((float) i2) / ((float) i4);\n }\n } else {\n this.mNeedCropped = false;\n this.mScaleX = 1.0f;\n this.mScaleY = 1.0f;\n i2 = i4;\n }\n i3 = i5;\n if (b.isPad()) {\n }\n i = i3;\n i4 = i2;\n case 2:\n this.mIsFullScreen = false;\n this.mIsRatio16_9 = false;\n this.mNeedCropped = true;\n if (i4 != i5) {\n this.mScaleX = 1.0f;\n this.mScaleY = ((float) i4) / ((float) i5);\n i = i4;\n break;\n }\n default:\n i = i5;\n break;\n }\n this.mWidth = i4;\n this.mHeight = i;\n } else if (!(this.mCameraWidth == 0 || this.mCameraHeight == 0)) {\n if (this.mRenderWidth == 0 || this.mRenderHeight == 0 || this.mRenderWidth * this.mCameraHeight == this.mRenderHeight * this.mCameraWidth) {\n this.mNeedCropped = false;\n this.mScaleX = 1.0f;\n this.mScaleY = 1.0f;\n this.mWidth = this.mCameraWidth;\n this.mHeight = this.mCameraHeight;\n } else {\n this.mNeedCropped = true;\n if (this.mCameraWidth * this.mRenderHeight > this.mCameraHeight * this.mRenderWidth) {\n this.mHeight = this.mCameraHeight;\n this.mWidth = (this.mCameraHeight * this.mRenderWidth) / this.mRenderHeight;\n this.mScaleX = ((float) this.mWidth) / ((float) this.mCameraWidth);\n this.mScaleY = 1.0f;\n } else {\n this.mWidth = this.mCameraWidth;\n this.mHeight = (this.mCameraWidth * this.mRenderHeight) / this.mRenderWidth;\n this.mScaleX = 1.0f;\n this.mScaleY = ((float) this.mHeight) / ((float) this.mCameraHeight);\n }\n }\n if ((((float) this.mRenderHeight) / ((float) this.mRenderWidth)) - (((float) Util.sWindowHeight) / ((float) Util.sWindowWidth)) < 0.1f) {\n z = true;\n }\n this.mIsFullScreen = z;\n }\n updateRenderSize();\n updateRenderRect();\n }", "void setNormalSpeed () {\n if (stepDelay == normalSpeed)\n return;\n stepDelay = normalSpeed;\n resetLoop();\n }", "public int calculateAmount(int multiplier){\n return (int) Math.round((0.75 + ThreadLocalRandom.current().nextDouble(2)) * multiplier);\n }", "@Test\n public void testRecomputeStretch(){\n //Recalculate stretch\n imageData.recomputeStretch(frArray, 0, rangeValues, true);\n BufferedImage stretchImage =imageData.getImage(frArray);\n Assert.assertNotEquals(expectedImage, stretchImage);\n }", "Sum getMultiplier();", "private void updateDragVars (MouseEvent me) { updateDragVars(me,false); }", "public synchronized void adjustHitPoints(int modifier) {\r\n\t\tif (hitPoints <= 0)\r\n\t\t\treturn;\r\n\r\n\t\thitPoints += modifier;\r\n\r\n\t\tif (hitPoints > maxHitPoints)\r\n\t\t\thitPoints = maxHitPoints;\r\n\r\n\t\tif (hitPoints <= 0)\r\n\t\t\tremoveUnit(x, y);\r\n\t}", "void setSampleGain(float gain) {\n if (debugFlag)\n debugPrint(\"JSChannel: setSampleGain must be overridden\");\n }", "public void setMinTransfer(double minTransfer) {\n\t\tthis.minTransfer = minTransfer;\n\t}", "@Before\n public void setUp(){\n choose = new ChooseDieModifier(new DieReducer());\n }", "private void updateDragVars (MouseEvent me, boolean ui_constrain) {\n if (ui_constrain && last_shft_down) {\n m_wx1 = sxToWx( m_x1 = me.getX()); \n m_wy1 = m_wy0;\n m_y1 = m_y0;\n } else if (ui_constrain && last_ctrl_down) {\n m_wx1 = m_wx0;\n m_x1 = m_x0;\n m_wy1 = syToWy( m_y1 = me.getY()); \n } else {\n m_wx1 = sxToWx( m_x1 = me.getX()); \n m_wy1 = syToWy( m_y1 = me.getY()); \n }\n }", "public void changeSpeedD() {\n speedX *= -1;\n }", "@Test(timeout = 4000)\n public void test15() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n homeEnvironment0.setVideoWidth(11053224);\n homeEnvironment0.setSkyColor(11053224);\n List<Camera> list0 = homeEnvironment0.getVideoCameraPath();\n homeEnvironment0.setVideoCameraPath(list0);\n HomeEnvironment.DrawingMode[] homeEnvironment_DrawingModeArray0 = HomeEnvironment.DrawingMode.values();\n homeEnvironment0.getPhotoQuality();\n List<Camera> list1 = homeEnvironment0.getVideoCameraPath();\n homeEnvironment0.setVideoCameraPath(list1);\n HomeEnvironment.Property.values();\n homeEnvironment0.setPhotoHeight(0);\n HomeEnvironment.Property homeEnvironment_Property0 = HomeEnvironment.Property.PHOTO_HEIGHT;\n PropertyChangeListener propertyChangeListener0 = mock(PropertyChangeListener.class, new ViolatedAssumptionAnswer());\n PropertyChangeListenerProxy propertyChangeListenerProxy0 = new PropertyChangeListenerProxy(\"\", propertyChangeListener0);\n homeEnvironment0.addPropertyChangeListener(homeEnvironment_Property0, propertyChangeListenerProxy0);\n homeEnvironment0.setVideoCameraPath(list1);\n homeEnvironment0.setWallsAlpha(0.0F);\n HomeEnvironment.DrawingMode[] homeEnvironment_DrawingModeArray1 = HomeEnvironment.DrawingMode.values();\n assertNotSame(homeEnvironment_DrawingModeArray1, homeEnvironment_DrawingModeArray0);\n }", "public void zoomToFactor(double d) {\n\t\t\n\t}", "@Test\n public void testSetM_rpmLow() {\n System.out.println(\"setM_rpmLow\");\n double rpmLow = 1200;\n Regime instance = r1;\n instance.setM_rpmLow(rpmLow);\n double result=instance.getRPMLow();\n double expResult=1200;\n assertEquals(expResult, result, 0.0);\n }", "private void setUpDragDrop() {\n\t\tsetUpDrop();\n\n\t\t// set up drag stuff\n\t\tdragSource = DragSource.getDefaultDragSource();\n\t\tdragGestureAdapter = new DragGestureAdapter(this);\n\t\tdragSourceAdapter = new DragSrcAdapter(this);\n\t\tdragSource.createDefaultDragGestureRecognizer(listingPanel.getFieldPanel(), dragAction,\n\t\t\tdragGestureAdapter);\n\t}", "public void set_Reflect(double d){\n reflection.setFraction(d);\r\n\t\treflect_value = d;\r\n\t\treflection.setInput(colorAdjust);\r\n\t\trefreshImageView();\r\n\t}", "public void setRectDifferences(float difference) {\n/* 632 */ setRectDifferences(difference, difference, difference, difference);\n/* */ }", "private int m15059a(RecyclerView recyclerView) {\n if (this.f13703a == -1) {\n this.f13703a = recyclerView.getResources().getDimensionPixelSize(R.dimen.item_touch_helper_max_drag_scroll_per_frame);\n }\n return this.f13703a;\n }", "public void test1_4DiffusionAndDensity() throws Exception {\n getReverb(0);\n try {\n short ratio = mReverb.getDiffusion();\n ratio = (short)((ratio == 500) ? 1000 : 500);\n mReverb.setDiffusion(ratio);\n short ratio2 = mReverb.getDiffusion();\n assertTrue(\"got incorrect diffusion\",\n ((float)ratio2 > (float)(ratio / RATIO_TOLERANCE)) &&\n ((float)ratio2 < (float)(ratio * RATIO_TOLERANCE)));\n\n ratio = mReverb.getDensity();\n ratio = (short)((ratio == 500) ? 1000 : 500);\n mReverb.setDensity(ratio);\n ratio2 = mReverb.getDensity();\n assertTrue(\"got incorrect density\",\n ((float)ratio2 > (float)(ratio / RATIO_TOLERANCE)) &&\n ((float)ratio2 < (float)(ratio * RATIO_TOLERANCE)));\n\n } catch (IllegalArgumentException e) {\n fail(\"Bad parameter value\");\n } catch (UnsupportedOperationException e) {\n fail(\"get parameter() rejected\");\n } catch (IllegalStateException e) {\n fail(\"get parameter() called in wrong state\");\n } finally {\n releaseReverb();\n }\n }", "void max_speed (double min_lift, double max_drag, boolean update_info) {\n velocity = kts_to_speed(20);\n find_aoa_of_min_drag();\n double pitch_of_min_drag = craft_pitch;\n trace(\"pitch_of_min_drag: \" + pitch_of_min_drag);\n\n // step 2. with current (lowest drag) pitch, iterate speed up\n // until drag exceeds max_drag.\n double speed = (total_drag() > max_drag) || foil_lift() > min_lift\n ? kts_to_speed(5) // pretty arbitrary...\n : velocity;\n\n for (; speed < v_max; speed += 1) { \n velocity = speed;\n //computeFlowAndRegenPlotAndAdjust();\n recomp_all_parts();\n if (total_drag() > max_drag) \n break;\n }\n\n trace(\"velocity after step2: \" + velocity);\n\n // // at min drag angle can not produce enough lift? unsolvable.\n // if (foil_lift() < min_lift) {\n // trace(\"can not solve 'fild max speed' task for given inputs.\\nincrease drag input or decrease lift input\");\n // return;\n // }\n\n // step 3. pitch_of_min_drag correction for too much lift...\n if (foil_lift() > min_lift) {\n // unsustainable, needs less pitch & speed...\n // reduce min_pitch until lift is OK\n while(pitch_of_min_drag > aoa_min) {\n pitch_of_min_drag -= 0.05;\n craft_pitch = pitch_of_min_drag;\n //computeFlowAndRegenPlotAndAdjust();\n recomp_all_parts();\n if (foil_lift() <= min_lift)\n break;\n }\n trace(\"corrected pitch_of_min_drag: \" + pitch_of_min_drag);\n }\n\n // step 4. from this speed, iterate speed down\n for (speed = velocity; speed >= 0; speed -= 1) {\n trace(\"speed: \" + speed);\n double lift = 0;\n double drag = 0;\n double pitch = pitch_of_min_drag;\n velocity = speed;\n set_mast_aoa_for_given_drag(max_drag);\n for (; pitch < aoa_max; pitch += 0.1) {\n craft_pitch = pitch;\n //computeFlowAndRegenPlotAndAdjust();\n recomp_all_parts();\n lift = foil_lift();\n drag = total_drag();\n if (drag >= max_drag) {\n // stop increasing pitch, won't work. \n //likely need less speed\n trace(\"too much drag, break. speed: \" + speed + \" pitch: \" + pitch);\n break;\n }\n if (lift >= min_lift) {\n trace(\"done \");\n if (update_info) {\n make_max_speed_info(min_lift, max_drag, velocity);\n System.out.println(\"\\nDone!\\n----------------\\n\" + max_speed_info);\n }\n return;\n } \n }\n // here pitch is at max. what about lift?\n if (pitch >= aoa_max && lift < min_lift) {\n trace(\"oops, can not be solved.\\nincrease drag limit or decrease lift threshold!\");\n return;\n }\n }\n }", "@Test(timeout = 4000)\n public void test21() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n homeEnvironment0.setGroundColor((-733));\n homeEnvironment0.setPhotoHeight(0);\n homeEnvironment0.setVideoFrameRate(0);\n PropertyChangeListener propertyChangeListener0 = mock(PropertyChangeListener.class, new ViolatedAssumptionAnswer());\n PropertyChangeListenerProxy propertyChangeListenerProxy0 = new PropertyChangeListenerProxy(\"Content isn't a JAR entry\", propertyChangeListener0);\n PropertyChangeListenerProxy propertyChangeListenerProxy1 = new PropertyChangeListenerProxy(\"Content isn't a JAR entry\", propertyChangeListenerProxy0);\n homeEnvironment0.setPhotoHeight(0);\n assertEquals(0, homeEnvironment0.getVideoFrameRate());\n }", "void setDeviation(double deviation);", "@Test\n\tpublic void TestSetSpeed() {\n\t\tassertTrue(v1.setSpeed(70));\n\t\tassertEquals(\"Speed of car is not set to 70.\",v1.getSpeed(),70.0, 0);\n\t\tassertFalse(v2.setSpeed(150));\n\t\tassertEquals(\"Speed of truck is changed from 0.\",v2.getSpeed(), 0, 0);\n\t}", "@Test\n public void testSetTorque() {\n System.out.println(\"setTorque\");\n double torque = 95.0;\n Regime instance = r1;\n instance.setTorque(torque);\n double result=instance.getTorque();\n double expResult=95.0;\n assertEquals(expResult, result, 0.0);\n }", "public ClockMultiplier(int multiplier, Updateable[] objects)\n\t\tthrows IllegalArgumentException\n\t{\n\t\tthis.multiplier = multiplier;\n\t\tthis.objects = objects.clone();\n\t}", "public void gearBoxTest(){\n\t\tif (counter < 6) {\n\t\t\ttimerTest.start();\n\t\t\tif (480 >= timerTest.get()) {\n\t\t\t\tmotorRB.set(1);\n\t\t\t\tmotorRF.set(1);\n\t\t\t\tmotorLB.set(1);\n\t\t\t\tmotorLF.set(1);\n\t\t\t}\n\t\t\telse if (timerTest.get() > 480 && 600 >= timerTest.get()) {\n\t\t\t\tmotorRB.set(0);\n\t\t\t\tmotorRF.set(0);\n\t\t\t\tmotorLB.set(0);\n\t\t\t\tmotorLF.set(0);\n\t\t\t}\n\t\t\telse if (timerTest.get() > 600) {\n\t\t\t\ttimerTest.reset();\n\t\t\t\tcounter++;\n\t\t\t}\n\t\t}\n\t}" ]
[ "0.7193057", "0.6107795", "0.6034968", "0.5939385", "0.5930206", "0.5858554", "0.57648885", "0.5737624", "0.56823355", "0.5531747", "0.54996383", "0.5463972", "0.53905165", "0.5250684", "0.5220026", "0.5219407", "0.5214541", "0.51670307", "0.51525384", "0.51204294", "0.50446653", "0.50421566", "0.4986846", "0.49831384", "0.49823532", "0.49472088", "0.4934235", "0.48646137", "0.4839443", "0.48284417", "0.48269737", "0.48267204", "0.48060527", "0.48031685", "0.48012862", "0.4789393", "0.4785219", "0.47585925", "0.475854", "0.47465014", "0.4722495", "0.47199398", "0.47134802", "0.47098807", "0.47019908", "0.4701876", "0.4692812", "0.46912518", "0.4681574", "0.4673189", "0.46674258", "0.46642768", "0.46592432", "0.46355486", "0.4632175", "0.4629671", "0.46137467", "0.46123627", "0.46084148", "0.4604728", "0.45935696", "0.45912072", "0.45846963", "0.45724776", "0.45714664", "0.4569303", "0.45610812", "0.45609742", "0.4556832", "0.455449", "0.4552474", "0.45467162", "0.4544384", "0.45325178", "0.45303276", "0.45260665", "0.45219925", "0.45181474", "0.4502448", "0.4500243", "0.44995582", "0.44991788", "0.449838", "0.44975728", "0.4497323", "0.44952118", "0.4494256", "0.4488433", "0.44871217", "0.4485435", "0.44840887", "0.448032", "0.44777954", "0.44651756", "0.44647625", "0.44644672", "0.44640425", "0.44615656", "0.44593138", "0.4458246" ]
0.83192354
0
Test of setZoomMultiplier method, of class DraggingCamera.
@Test public void testSetZoomMultiplier() { final DraggingCamera camera = newValueObject(); testBoundField(camera, DraggingCamera.ZOOM_MULTIPLIER, 1.678f); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testSetZoomMin() {\n final DraggingCamera camera = newValueObject();\n testBoundField(camera, DraggingCamera.ZOOM_MIN, 1.1f);\n }", "@Test\n public void testSetDragMultiplier() {\n final DraggingCamera camera = newValueObject();\n testBoundField(camera, DraggingCamera.DRAG_MULTIPLIER, 1.678f);\n }", "@Test\n public void testSetZoomMax() {\n final DraggingCamera camera = newValueObject();\n testBoundField(camera, DraggingCamera.ZOOM_MAX, 10.0f);\n }", "private void adjustZoomFactor(){\n switch(zoomLevel){\n case 0:zoomFactor = 39; break;\n case 1:zoomFactor = 37; break;\n case 2:zoomFactor = 35; break;\n case 3:zoomFactor = 33; break;\n case 4:zoomFactor = 31; break;\n case 5:zoomFactor = 29; break;\n case 6:zoomFactor = 27; break;\n case 7:zoomFactor = 25; break;\n case 8:zoomFactor = 23; break;\n case 9:zoomFactor = 21; break;\n case 10:zoomFactor = 20; break;\n case 11:zoomFactor = 18; break;\n case 12:zoomFactor = 16; break;\n case 13:zoomFactor = 14; break;\n case 14:zoomFactor = 12; break;\n case 15:zoomFactor = 10; break;\n case 16:zoomFactor = 8; break;\n case 17:zoomFactor = 6; break;\n case 18:zoomFactor = 4; break;\n case 19:zoomFactor = 2; break;\n case 20:zoomFactor = 0; break;\n }\n }", "public void updateZoom() {\n camera.zoom = zoomLevel;\n }", "void multitouchZoom(int new_zoom);", "public void setZoom(float zoom) {\n this.zoom = zoom;\n }", "@Test\n public void testSetZoomToMouse() {\n final DraggingCamera camera = newValueObject();\n testBoundField(camera, DraggingCamera.ZOOM_TO_MOUSE, false);\n }", "public synchronized void setZoom(float zoom)\r\n {\r\n this.zoom = Utils.clampFloat(zoom, .4f, 1.5f);\r\n }", "@Override\n public void setZoom(double zoom)\n {\n super.setZoom(zoom);\n delayedRepainting.requestRepaint(ZOOM_REPAINT);\n }", "@Override\n\tpublic void setZoom(int zoom) {\n\t\t\n\t}", "public void setZoom(float zoom) {\r\n\t\tif (zoom < 0.1f)\r\n\t\t\treturn;\r\n\t\tthis.zoomFactor = zoom;\r\n\t}", "public void zoomCam(float zoom){\n\t\tthis.camera.setZoom(zoom);\n\t}", "public void setZoom(Integer zoom) {\n this.zoom = zoom;\n }", "public void setZoom(Integer zoom) {\n this.zoom = zoom;\n }", "public double getZoomFactor()\r\n {\r\n return zoomFactor;\r\n }", "public void setZoom(float zoom){\r\n zoom = zoom * 100;\r\n zoom = Math.round(zoom);\r\n this.zoom = Math.max(zoom / 100, 0.01f);\r\n }", "private void setZoomLevel() {\n final float oldMaxScale = photoView.getMaximumScale();\n photoView.setMaximumScale(oldMaxScale *2);\n photoView.setMediumScale(oldMaxScale);\n }", "public void setZoom(){\n\t\tactive.setZoom();\n\t}", "private void setMultipliers(double healthMultiplier, double dmgMultiplier, double speedMultiplier, double jmpHeightMultiplier) {\n\n // Health multiplier : set to 1 if input is below 1.\n if (healthMultiplier < 1) {\n this.healthMultiplier = 1;\n } else {\n this.healthMultiplier = healthMultiplier;\n }\n\n // Attack damage multiplier : set to 1 if input is below 1.\n if (dmgMultiplier < 1) {\n this.dmgMultiplier = 1;\n } else {\n this.dmgMultiplier = dmgMultiplier;\n }\n\n // Move speed multiplier : set to 1 if input is below 1.\n if (speedMultiplier < 1) {\n this.speedMultiplier = 1;\n } else {\n this.speedMultiplier = speedMultiplier;\n }\n\n // Jump height multiplier : set to 1 if input is below 1.\n if (jmpHeightMultiplier < 1) {\n this.jmpHeightMultiplier = 1;\n } else {\n this.jmpHeightMultiplier = jmpHeightMultiplier;\n }\n }", "public void setleZoom( double valeur) {\n\t\tzoomMonde = valeur;\n\t}", "public void setZoom( double zoom ) {\n\t\tthis.zoom = zoom;\n\t}", "public void setScaleFactor(float scaleFactor) {\n\t\ttrueCoreRadius *= scaleFactor;\n\t\ttruePetalRadius *= scaleFactor;\n\t\tcoreRadius = (int) trueCoreRadius;\n\t\tpetalRadius = (int) truePetalRadius;\n\t\tthis.scaleFactor *= scaleFactor;\n\t}", "public void setZoom(int ps) {\n P_SCALE = ps;\n //EMBOSS = P_SCALE*8;\n }", "public void setThresholdMultiplier(double multiplier) {\n\t\tm_thresholdMultiplier = (multiplier > 0) ? multiplier : 1.0;\n\t}", "@Override\n public void Zoom(double zoomNo, boolean setZoom) {\n\t \n }", "private void applyZoomRatio(float ratio) {\n\t\tzoom = zoom * ratio;\n\t}", "public void setFacteurZoom(double fac)\n\t{\n \tthis.facteurZoom = this.facteurZoom * fac ;\n \tif (this.facteurZoom == 0)\n \t{\n \t\tthis.facteurZoom = 0.01;\n \t}\n }", "public void setZoom(double zoom) {\n if(zoom != mZoom) {\n mZoom = zoom;\n setChanged();\n }\n }", "public static void changeCameraZoom(boolean zoomIn){\r\n\t\tif(zoomIn && zoomLevel > 0){\r\n\t\t\tzoomLevel -= 2;\r\n\t\t}else if(!zoomIn){\r\n\t\t\tzoomLevel += 2;\r\n\t\t}\r\n\t}", "public void zoomToFactor(double d) {\n\t\t\n\t}", "protected void primSetZoom(double zoom) {\n\tPoint p1 = getViewport().getClientArea().getCenter();\n\tPoint p2 = p1.getCopy();\n\tPoint p = getViewport().getViewLocation();\n\tdouble prevZoom = this.zoom;\n\tthis.zoom = zoom;\n\tpane.setScale(zoom);\n\tfireZoomChanged();\n\tgetViewport().validate();\n\t\n\tp2.scale(zoom / prevZoom);\n\tDimension dif = p2.getDifference(p1);\n\tp.x += dif.width;\n\tp.y += dif.height;\n\tsetViewLocation(p);\t\n}", "public void setMultiplier(int newValue) {\n multiplier = newValue;\n }", "public void setZoom(double zoom) {\n if (zoom > 0) {\n this.zoom = zoom;\n this.rescale();\n }\n }", "public void zoomIn() {\n if (scale < 0.8) {\n double scaleFactor = (scale + 0.03) / scale;\n currentXOffset = scaleFactor * (currentXOffset - viewPortWidth / 2) + viewPortWidth / 2;\n currentYOffset = scaleFactor * (currentYOffset - viewPortHeight / 2) + viewPortHeight / 2;\n scale += 0.03;\n\n selectionChanged = true;\n gameChanged = true;\n }\n\n }", "public void setZoom(float zoom) {\n\t\tthis.zoom = zoom;\n\t\trevalidate();\n\t\trepaint();\n\t}", "private static void initZoomOptions() {\n\t\tfloat zoom = 0;\n\t\twhile (zoom < DiagramaFigura.MAX_ZOOM) {\n\t\t\tzoom += DiagramaFigura.DELTA_ZOOM;\n\t\t\tif (zoom >= DiagramaFigura.MIN_ZOOM) {\n\t\t\t\tString key = Integer.toString((int) (zoom * 100));\n\t\t\t\tzoomOptions.put(key + \"%\", zoom);\n\t\t\t}\n\t\t}\n\t}", "public void setZoomFactor( double inZoomFactor )\r\n {\r\n if( inZoomFactor <= 0 )\r\n throw new RuntimeException( \"Zoom factor \" + inZoomFactor + \" is not > 0\" );\r\n \r\n \r\n // Set zoom factor and update view bounds \r\n zoomFactor = inZoomFactor;\r\n updateViewBounds();\r\n \r\n // Propagate the fact that the size has changed up the container hierarchy\r\n revalidate();\r\n \r\n // Repaint the visualisation now that the size and zoom factor have changed\r\n repaint();\r\n }", "public void zoom() {\n\t\tdisp.zoom();\n\t\texactZoom.setText(disp.getScale() + \"\");\n\t\tresize();\n\t\trepaint();\n\t}", "public void setZoom(double zoom) {\n\tzoom = Math.min(getMaxZoom(), zoom);\n\tzoom = Math.max(getMinZoom(), zoom);\n\tif (this.zoom != zoom)\n\t\tprimSetZoom(zoom);\n}", "public void setScaleFactor(float scale){\n scaleFactor = scale;\n }", "@Override\n\tprotected void setMultiplier(DynamicMultiplier multiplier) {\n\t\tif (\"supportVectors\".equals(multiplier.getName())) {\n\t\t\tmultiplier.setFactor(numberOfSupportVectors);\n\t\t} else if (\"supportVectorsMinusOne\".equals(multiplier.getName())) {\n\t\t\tmultiplier.setFactor(numberOfSupportVectors - 1);\n\t\t} else if (\"supportVectorMachines\".equals(multiplier.getName())) {\n\t\t\tmultiplier.setFactor((numberOfClasses * (numberOfClasses - 1)) / 2);\n\t\t} else if (\"squareAndMultiplyDegree\".equals(multiplier.getName())) {\n\t\t\tmultiplier.setFactor((int) (2.0 * FastMath.floor(FastMath.log(2.0, ((Integer) kernelDegree.getValue())))));\n\t\t}\n\t}", "int getMinZoom();", "@Override\n public void Zoom(double zoomNo) {\n\t \n }", "private void calculateBasicRatio() {\n if (mLastZoomRatio == DEFAULT_VALUE) {\n if(isAngleCamera()){\n mBasicZoomRatio = 1.6f;\n }else{\n mBasicZoomRatio = ZOOM_UNSUPPORTED_DEFAULT_VALUE;\n }\n } else {\n mBasicZoomRatio = mLastZoomRatio;\n }\n //modify by bv liangchangwei for fixbug 3518\n }", "protected abstract void handleZoom();", "private void unsafeSetInitialZoom() {\n if (hic.isInPearsonsMode()) {\n initialZoom = hic.getMatrix().getFirstPearsonZoomData(HiC.Unit.BP).getZoom();\n } else if (HiCFileTools.isAllChromosome(hic.getXContext().getChromosome())) {\n mainViewPanel.getResolutionSlider().setEnabled(false);\n initialZoom = hic.getMatrix().getFirstZoomData(HiC.Unit.BP).getZoom();\n } else {\n mainViewPanel.getResolutionSlider().setEnabled(true);\n\n HiC.Unit currentUnit = hic.getZoom().getUnit();\n\n List<HiCZoom> zooms = (currentUnit == HiC.Unit.BP ? hic.getDataset().getBpZooms() :\n hic.getDataset().getFragZooms());\n\n\n// Find right zoom level\n\n int pixels = mainViewPanel.getHeatmapPanel().getMinimumDimension();\n int len;\n if (currentUnit == HiC.Unit.BP) {\n len = (Math.max(hic.getXContext().getChrLength(), hic.getYContext().getChrLength()));\n } else {\n len = Math.max(hic.getDataset().getFragmentCounts().get(hic.getXContext().getChromosome().getName()),\n hic.getDataset().getFragmentCounts().get(hic.getYContext().getChromosome().getName()));\n }\n\n int maxNBins = pixels / HiCGlobals.BIN_PIXEL_WIDTH;\n int bp_bin = len / maxNBins;\n initialZoom = zooms.get(zooms.size() - 1);\n for (int z = 1; z < zooms.size(); z++) {\n if (zooms.get(z).getBinSize() < bp_bin) {\n initialZoom = zooms.get(z - 1);\n break;\n }\n }\n\n }\n hic.unsafeActuallySetZoomAndLocation(\"\", \"\", initialZoom, 0, 0, -1, true, HiC.ZoomCallType.INITIAL, true);\n }", "@Override\n public void onPinchZoom(PinchZoomDetector pPinchZoomDetector,\n TouchEvent pTouchEvent, float pZoomFactor) {\n\n\t\t/* On every sub-sequent touch event (after the initial touch) we offset\n\t\t * the initial camera zoom factor by the zoom factor calculated by\n\t\t * pinch-zooming */\n final float newZoomFactor = mInitialTouchZoomFactor * pZoomFactor;\n\n // If the camera is within zooming bounds\n if (newZoomFactor < MAX_ZOOM_FACTOR && newZoomFactor > MIN_ZOOM_FACTOR) {\n // Set the new zoom factor\n mCamera.setZoomFactor(newZoomFactor);\n }\n }", "public void zoom(double factor) {\n //Check whether we zooming in or out for adjusting the zoomLvl field\n //Scale the graphic and pan accordingly\n if(factor>1 && zoomLevel!=20) {\n transform.preConcatenate(AffineTransform.getScaleInstance(factor, factor));\n pan(getWidth() * (1 - factor) / 2, getHeight() * (1 - factor) / 2);\n checkForZoomIn();\n }else if(zoomLevel!=0 && factor<1){\n transform.preConcatenate(AffineTransform.getScaleInstance(factor, factor));\n pan(getWidth() * (1 - factor) / 2, getHeight() * (1 - factor) / 2);\n checkForZoomOut();\n }\n }", "public int getZoom() {\n return P_SCALE;\n }", "private void clampZoom()\n\t{\n\t\tif (zoom < ZOOM_MINIMUM)\n\t\t{\n\t\t\tzoom = ZOOM_MINIMUM;\n\t\t}\n\t\telse if (zoom > ZOOM_MAXIMUM)\n\t\t{\n\t\t\tzoom = ZOOM_MAXIMUM;\n\t\t}\n\t}", "protected abstract void onScalePercentChange(int zoom);", "public final void setZoom(final int zoom) {\r\n\r\n if (logger.isDebugEnabled()) {\r\n logger.debug(\"new zoom: \" + zoom + \" (old zoom: \" + this.zoom + \")\");\r\n }\r\n\r\n //\r\n // size and visible rectangle before zooming\r\n\r\n final Dimension oldImageCanvasContainerSize = imageCanvas.getSize();\r\n final Rectangle oldImageCanvasContainerVisibleRect = imageCanvas.getVisibleRect();\r\n\r\n //\r\n // calculate the center of the visible rectangle\r\n\r\n final int oldImageCanvasContainerVisibleRectCenterX = oldImageCanvasContainerVisibleRect.x + oldImageCanvasContainerVisibleRect.width / 2;\r\n final int oldImageCanvasContainerVisibleRectCenterY = oldImageCanvasContainerVisibleRect.y + oldImageCanvasContainerVisibleRect.height / 2;\r\n\r\n //\r\n // zoom ( set the new zoom value and update image )\r\n\r\n this.zoom = zoom;\r\n updateImage();\r\n\r\n //\r\n // zoomed size\r\n\r\n final Dimension zoomedImageCanvasContainerSize = imageCanvas.getSize();\r\n\r\n //\r\n // now we can calculate the ratio (new size vs old size)\r\n\r\n final double xRatio = zoomedImageCanvasContainerSize.getWidth() / oldImageCanvasContainerSize.getWidth();\r\n final double yRatio = zoomedImageCanvasContainerSize.getHeight() / oldImageCanvasContainerSize.getHeight();\r\n\r\n //\r\n // apply the ratio to the old center\r\n\r\n int newImageCanvasContainerVisibleRectCenterX = (int) (oldImageCanvasContainerVisibleRectCenterX * xRatio);\r\n int newImageCanvasContainerVisibleRectCenterY = (int) (oldImageCanvasContainerVisibleRectCenterY * yRatio);\r\n\r\n //\r\n // calculate the new visible rectangle (using the translated center)\r\n\r\n Rectangle newImageCanvasContainerVisibleRect = new Rectangle(oldImageCanvasContainerVisibleRect.getSize());\r\n newImageCanvasContainerVisibleRect.x = newImageCanvasContainerVisibleRectCenterX - oldImageCanvasContainerVisibleRect.width / 2;\r\n newImageCanvasContainerVisibleRect.y = newImageCanvasContainerVisibleRectCenterY - oldImageCanvasContainerVisibleRect.height / 2;\r\n\r\n //\r\n // scroll to make visible the new rectangle\r\n\r\n imageCanvas.scrollRectToVisible(newImageCanvasContainerVisibleRect);\r\n }", "public void zoom(int s) {\r\n\t\tzoom += s * ZOOM_FACTOR;\r\n\t}", "public void zoomScale(double scaleDelta) {\n \t\tzoomToScale((float) (mapDisplay.sc * scaleDelta));\n \t}", "public void zoom(double amplifier) {\n\t\tint width = mapContainer.getWidth()-60;\n\t\tint height = mapContainer.getHeight()-60;\n\t\tdouble nXF = (double)(MouseInfo.getPointerInfo().getLocation().x - (getLocation().x + mapContainer.getLocation().x + 30))/width;\n\t\tdouble nYF = (double)(MouseInfo.getPointerInfo().getLocation().y - (getLocation().y + mapContainer.getLocation().y + 30))/height;\n\t\tzoom *= amplifier;\n\t\txF = xF - 1/(zoom*2) + 1/zoom*nXF;\n\t\tyF = yF - 1/(zoom*2) + 1/zoom*nYF;\n\t}", "public float getCurZoomRatio(){\n if(mCurZoomRatio<1.0f){\n mCurZoomRatio = ZOOM_UNSUPPORTED_DEFAULT_VALUE;\n }\n return mCurZoomRatio;\n }", "public void zoom(double factor, Point mouseLocation) {\n Point2D.Double viewOffset = viewCoords_.getViewOffset();\n Point2D.Double sourceDataSize = viewCoords_.getFullResSourceDataSize();\n Point2D.Double zoomCenter;\n //compute centroid of the zoom in full res coordinates\n if (mouseLocation == null) {\n //if mouse not over image zoom to center\n zoomCenter = new Point2D.Double(viewOffset.x + sourceDataSize.y / 2,\n viewOffset.y + sourceDataSize.y / 2);\n } else {\n zoomCenter = new Point2D.Double(\n (long) viewOffset.x + mouseLocation.x\n / viewCoords_.getMagnificationFromResLevel()\n * viewCoords_.getDownsampleFactor(),\n (long) viewOffset.y + mouseLocation.y\n / viewCoords_.getMagnificationFromResLevel()\n * viewCoords_.getDownsampleFactor());\n }\n\n //Do zooming--update size of source data\n double newSourceDataWidth = sourceDataSize.x * factor;\n double newSourceDataHeight = sourceDataSize.y * factor;\n if (newSourceDataWidth < 5 || newSourceDataHeight < 5) {\n return; //constrain maximum zoom\n }\n if (data_.getBounds() != null) {\n //don't let either of these go bigger than the actual data\n double overzoomXFactor = newSourceDataWidth / (viewCoords_.xMax_ - viewCoords_.xMin_);\n double overzoomYFactor = newSourceDataHeight / (viewCoords_.yMax_ - viewCoords_.yMin_);\n if (overzoomXFactor > 1 || overzoomYFactor > 1) {\n newSourceDataWidth = newSourceDataWidth / Math.max(overzoomXFactor, overzoomYFactor);\n newSourceDataHeight = newSourceDataHeight / Math.max(overzoomXFactor, overzoomYFactor);\n }\n }\n viewCoords_.setFullResSourceDataSize(newSourceDataWidth, newSourceDataHeight);\n\n double xOffset = (zoomCenter.x - (zoomCenter.x - viewOffset.x)\n * newSourceDataWidth / sourceDataSize.x);\n double yOffset = (zoomCenter.y - (zoomCenter.y - viewOffset.y)\n * newSourceDataHeight / sourceDataSize.y);\n //make sure view doesn't go outside image bounds\n if (data_.getBounds() != null) {\n viewCoords_.setViewOffset(\n Math.max(viewCoords_.xMin_, Math.min(xOffset,\n viewCoords_.xMax_ - viewCoords_.getFullResSourceDataSize().x)),\n Math.max(viewCoords_.yMin_, Math.min(yOffset,\n viewCoords_.yMax_ - viewCoords_.getFullResSourceDataSize().y)));\n } else {\n viewCoords_.setViewOffset(xOffset, yOffset);\n }\n }", "public synchronized void addZoom(float zoom)\r\n {\r\n this.setZoom(zoom + this.getZoom());\r\n }", "private double resolution(int zoom) {\n\t\treturn this.initialResolution / (Math.pow(2, zoom));\r\n\t}", "public double getCameraZoom() {\n\t\treturn cameraZoom;\n\t}", "@Override\n public boolean zoom(float initialDistance, float distance) {\n cameraDistance += (initialDistance - distance) * zoomSpeed;\n\n //Makes sure the user can't zoom too far or too close\n if(cameraDistance < minCameraDistance)\n cameraDistance = minCameraDistance;\n else if(cameraDistance > maxCameraDistance)\n cameraDistance = maxCameraDistance;\n\n //camera needs to be set again\n resize(800, 480);\n return false;\n }", "boolean allowZoom();", "@SuppressWarnings(\"unused\")\n private void setZoom(JSONArray args, CallbackContext callbackContext) throws JSONException {\n Long zoom;\n zoom = args.getLong(1);\n\n this.myMoveCamera(CameraUpdateFactory.zoomTo(zoom), callbackContext);\n }", "public int zoom() {\n double sizex = scale * getWidth();\n double sizey = scale * getHeight();\n for (int zoom = 0; zoom <= 32; zoom++, sizex *= 2, sizey *= 2)\n if (sizex > world.east() || sizey > world.north())\n return zoom;\n return 32;\n }", "public void zoomScaleIn() {\n \t\tzoomScale(SCALE_DELTA_IN);\n \t}", "public void zoom(float zoom) { \n if (zoom <=0) {\n throw new IllegalArgumentException();\n }\n\n workTransform.setTransform(null);\n workTransform.mScale(zoom);\n workTransform.mMultiply(userTransform);\n doc.setTransform(workTransform);\n swapTransforms();\n }", "public void setZoom(float zoomValue) {\n pos.zoom = zoomValue;\n invalidate();\n }", "@Override\n public void setCameraZoom(int zoomLevel) {\n mMap.moveCamera(CameraUpdateFactory.zoomTo(zoomLevel));\n }", "public double getZoom() {\n return this.zoom;\n }", "private void ZoomCircle(double zoom, double circle_speed){\n final double COEFFICIENT=490;\n circle.setRadius(COEFFICIENT / (zoom + circle_speed));\n }", "public native final void setMaxZoom(double maxZoom)/*-{\n this.maxZoom = maxZoom;\n }-*/;", "public float getZoom() {\n return zoom;\n }", "public double getZoom() {\n return mZoom;\n }", "public float getZoom() {\n return zoom;\n }", "@JavascriptInterface\n public void setZoom(final int zoom) {\n getHandler().post(new Runnable() {\n @Override\n public void run() {\n if (mWebViewFragment.getMapSettings()\n .getZoom() != zoom) {\n if (BuildConfig.DEBUG) {\n Log.d(TAG,\n \"setZoom \" + zoom);\n }\n\n final MapSettings mapSettings = mWebViewFragment.getMapSettings();\n mapSettings.setZoom(zoom);\n mWebViewFragment.setMapSettings(mapSettings);\n }\n }\n });\n }", "public synchronized float getZoom()\r\n {\r\n return zoom;\r\n }", "int getZoomPref();", "public void setMaxzoom(Integer maxzoom) {\n this.maxzoom = maxzoom;\n }", "public void setScale(float scale);", "public final int getZoom() {\r\n return zoom;\r\n }", "@JSProperty(\"maxZoom\")\n void setMaxZoom(double value);", "public void zoom(final double factor) {\n\t\tdouble oldScale = scene.getScalingFactor();\n\t\tdouble newScale = oldScale * (1 + factor);\n\t\tscene.setScalingFactor(newScale);\n\t\tif (orientation == Orientation.VERTICAL) {\n\t\t\tdouble before = -offset.getY() / oldScale + getSize().getHeight() / 2 / oldScale;\n\t\t\tdouble after = -offset.getY() / newScale + getSize().getHeight() / 2 / newScale;\n\t\t\toffset.translate(0, (int) Math.round((after - before) * newScale));\n\t\t} else {\n\t\t\tdouble before = -offset.getX() / oldScale + getSize().getWidth() / 2 / oldScale;\n\t\t\tdouble after = -offset.getX() / newScale + getSize().getWidth() / 2 / newScale;\n\t\t\toffset.translate((int) Math.round((after - before) * newScale), 0);\n\t\t}\n\t\trepaint();\n\t}", "public void setScale(double d) {\n\t\tdisp.setScale(d);\n\t\texactZoom.setText(disp.getScale() + \"\");\n\t\tresize();\n\t\trepaint();\n\t}", "public void adjustZoomLvl(double scale){\n zoomLevel = ZoomCalculator.calculateZoom(scale);\n scale = ZoomCalculator.setScale(zoomLevel);\n transform.setToScale(scale, -scale);\n }", "public double getZoom() {\n\treturn zoom;\n}", "@Override\n public void onPinchZoomStarted(PinchZoomDetector pPinchZoomDetector,\n TouchEvent pSceneTouchEvent) {\n\n // On first detection of pinch zooming, obtain the initial zoom factor\n mInitialTouchZoomFactor = mCamera.getZoomFactor();\n }", "public void zoomIn() {\n\tsetZoom(getNextZoomLevel());\n}", "public double getZoom() {\n return curZoom;\n }", "public Integer getZoom() {\n return zoom;\n }", "public Integer getZoom() {\n return zoom;\n }", "@Override\n public void onPinchZoomFinished(PinchZoomDetector pPinchZoomDetector,\n TouchEvent pTouchEvent, float pZoomFactor) {\n\n // Set the zoom factor one last time upon ending the pinch-to-zoom functionality\n final float newZoomFactor = mInitialTouchZoomFactor * pZoomFactor;\n\n // If the camera is within zooming bounds\n if (newZoomFactor < MAX_ZOOM_FACTOR && newZoomFactor > MIN_ZOOM_FACTOR) {\n // Set the new zoom factor\n mCamera.setZoomFactor(newZoomFactor);\n }\n }", "public void zoomIn() { zoomIn(1); }", "@Override\n public void onMapZoomChanged(float zoom) {\n presenter.onMapZoomChanged(zoom);\n }", "public void setSpeed(double multiplier);", "protected void zoomToScale(float scale) {\n \t\tif (tweening) {\n \t\t\tscaleIntegrator.target(scale);\n \t\t} else {\n \t\t\tmapDisplay.sc = scale;\n \t\t\t// Also update Integrator to support correct tweening after switch\n \t\t\tscaleIntegrator.target(scale);\n \t\t\tscaleIntegrator.set(scale);\n \t\t}\n \t}", "public void verifyZoom(int zoomLevel) {\r\n\r\n\t\tif (zoomLevel >= 20) {\r\n\r\n\t\t\tshowOrHideMarkets(true);\r\n\r\n\t\t} else {\r\n\r\n\t\t\tshowOrHideMarkets(false);\r\n\r\n\t\t}\r\n\r\n\t}", "@Override\n public boolean onScale(ScaleGestureDetector scaleGestureDetector) {\n zoom *= scaleGestureDetector.getScaleFactor();\n recalculateView();\n return true;\n }", "void onScaleChange(float scaleFactor, float focusX, float focusY);", "public long getZoomLevel()\r\n {\r\n return myZoomLevel;\r\n }" ]
[ "0.72142136", "0.7092877", "0.7019479", "0.6916088", "0.67795104", "0.668469", "0.66811603", "0.66648465", "0.6583749", "0.65249467", "0.64755005", "0.64669365", "0.6444177", "0.64225465", "0.64225465", "0.6421", "0.64064085", "0.6404073", "0.63984203", "0.6370809", "0.6354501", "0.6348685", "0.6321744", "0.6305535", "0.62944865", "0.625999", "0.6254399", "0.6244979", "0.623923", "0.6235883", "0.620987", "0.6202376", "0.61587614", "0.61551785", "0.61514854", "0.61266243", "0.6123351", "0.6115937", "0.6108267", "0.6087334", "0.6067119", "0.6061178", "0.60561234", "0.6043148", "0.60384303", "0.6025681", "0.5995405", "0.59906214", "0.5988227", "0.596353", "0.59552103", "0.59537596", "0.59528595", "0.5951796", "0.5914639", "0.59127533", "0.5890251", "0.5869741", "0.5863201", "0.58496666", "0.58456206", "0.5845257", "0.58448434", "0.58176744", "0.58010405", "0.5793816", "0.5778934", "0.5774366", "0.5756979", "0.57431316", "0.5735749", "0.57307667", "0.5724078", "0.57204825", "0.56934285", "0.56911135", "0.56910765", "0.56898516", "0.5671183", "0.56454724", "0.5637105", "0.56282467", "0.56255347", "0.56102186", "0.5603164", "0.55917454", "0.5588958", "0.5580791", "0.5554636", "0.55469334", "0.55469334", "0.5546859", "0.5536991", "0.5527328", "0.5514048", "0.5511794", "0.55115056", "0.5509322", "0.54980683", "0.54857635" ]
0.8589385
0
Test of setZoomMax method, of class DraggingCamera.
@Test public void testSetZoomMax() { final DraggingCamera camera = newValueObject(); testBoundField(camera, DraggingCamera.ZOOM_MAX, 10.0f); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public native final void setMaxZoom(double maxZoom)/*-{\n this.maxZoom = maxZoom;\n }-*/;", "public void setMaxzoom(Integer maxzoom) {\n this.maxzoom = maxzoom;\n }", "@Test\n public void testSetZoomMin() {\n final DraggingCamera camera = newValueObject();\n testBoundField(camera, DraggingCamera.ZOOM_MIN, 1.1f);\n }", "@Test\n public void testSetZoomMultiplier() {\n final DraggingCamera camera = newValueObject();\n testBoundField(camera, DraggingCamera.ZOOM_MULTIPLIER, 1.678f);\n }", "@JSProperty(\"maxZoom\")\n void setMaxZoom(double value);", "@Test\n public void testSetZoomToMouse() {\n final DraggingCamera camera = newValueObject();\n testBoundField(camera, DraggingCamera.ZOOM_TO_MOUSE, false);\n }", "int getMaximumZoomlevel();", "public void updateZoom() {\n camera.zoom = zoomLevel;\n }", "public Integer getMaxzoom() {\n return maxzoom;\n }", "private void setZoomLevel() {\n final float oldMaxScale = photoView.getMaximumScale();\n photoView.setMaximumScale(oldMaxScale *2);\n photoView.setMediumScale(oldMaxScale);\n }", "public void setleZoom( double valeur) {\n\t\tzoomMonde = valeur;\n\t}", "public synchronized void setZoom(float zoom)\r\n {\r\n this.zoom = Utils.clampFloat(zoom, .4f, 1.5f);\r\n }", "public void setZoom(){\n\t\tactive.setZoom();\n\t}", "@JSProperty(\"maxZoom\")\n double getMaxZoom();", "public void zoomCam(float zoom){\n\t\tthis.camera.setZoom(zoom);\n\t}", "@Override\n public void Zoom(double zoomNo, boolean setZoom) {\n\t \n }", "public void setZoom(float zoom) {\n this.zoom = zoom;\n }", "public void setZoom(float zoom){\r\n zoom = zoom * 100;\r\n zoom = Math.round(zoom);\r\n this.zoom = Math.max(zoom / 100, 0.01f);\r\n }", "@Override\n\tpublic void setZoom(int zoom) {\n\t\t\n\t}", "public double getCameraZoom() {\n\t\treturn cameraZoom;\n\t}", "private void clampZoom()\n\t{\n\t\tif (zoom < ZOOM_MINIMUM)\n\t\t{\n\t\t\tzoom = ZOOM_MINIMUM;\n\t\t}\n\t\telse if (zoom > ZOOM_MAXIMUM)\n\t\t{\n\t\t\tzoom = ZOOM_MAXIMUM;\n\t\t}\n\t}", "public int getMaxZoom() {\n if(internalNative == null) {\n if(internalLightweightCmp != null) {\n return internalLightweightCmp.getMaxZoomLevel();\n } else {\n // TODO: Browser component\n return 20;\n }\n }\n return internalNative.getMaxZoom();\n }", "public void setZoom(float zoom) {\r\n\t\tif (zoom < 0.1f)\r\n\t\t\treturn;\r\n\t\tthis.zoomFactor = zoom;\r\n\t}", "int getMinZoom();", "public void setZoom(double zoom) {\n if(zoom != mZoom) {\n mZoom = zoom;\n setChanged();\n }\n }", "public void setMaxVal(double maxVal) {\n this.maxVal = maxVal;\n }", "public void setZoom(double zoom) {\n if (zoom > 0) {\n this.zoom = zoom;\n this.rescale();\n }\n }", "public void setZoom( double zoom ) {\n\t\tthis.zoom = zoom;\n\t}", "public static void changeCameraZoom(boolean zoomIn){\r\n\t\tif(zoomIn && zoomLevel > 0){\r\n\t\t\tzoomLevel -= 2;\r\n\t\t}else if(!zoomIn){\r\n\t\t\tzoomLevel += 2;\r\n\t\t}\r\n\t}", "boolean allowZoom();", "public void setZoom(Integer zoom) {\n this.zoom = zoom;\n }", "public void setZoom(Integer zoom) {\n this.zoom = zoom;\n }", "public void setFacteurZoom(double fac)\n\t{\n \tthis.facteurZoom = this.facteurZoom * fac ;\n \tif (this.facteurZoom == 0)\n \t{\n \t\tthis.facteurZoom = 0.01;\n \t}\n }", "void multitouchZoom(int new_zoom);", "@Override\n public void setZoom(double zoom)\n {\n super.setZoom(zoom);\n delayedRepainting.requestRepaint(ZOOM_REPAINT);\n }", "public void setZoom(double zoom) {\n\tzoom = Math.min(getMaxZoom(), zoom);\n\tzoom = Math.max(getMinZoom(), zoom);\n\tif (this.zoom != zoom)\n\t\tprimSetZoom(zoom);\n}", "public void zoom() {\n\t\tdisp.zoom();\n\t\texactZoom.setText(disp.getScale() + \"\");\n\t\tresize();\n\t\trepaint();\n\t}", "public void setMaxRange(double maxRange) {\n this.maxRange = maxRange;\n }", "public void setMaximumValue (double max) {\r\n\t\tmaxValue = new Double(max);\r\n\t}", "@Override\n public boolean zoom(float initialDistance, float distance) {\n cameraDistance += (initialDistance - distance) * zoomSpeed;\n\n //Makes sure the user can't zoom too far or too close\n if(cameraDistance < minCameraDistance)\n cameraDistance = minCameraDistance;\n else if(cameraDistance > maxCameraDistance)\n cameraDistance = maxCameraDistance;\n\n //camera needs to be set again\n resize(800, 480);\n return false;\n }", "public double getZoom() {\n return mZoom;\n }", "public void setZoom(float zoomValue) {\n pos.zoom = zoomValue;\n invalidate();\n }", "public void setMaximumValue (Double max) {\r\n\t\tmaxValue = max;\r\n\t}", "public void setMaximum( final double max )\n\t{\n\t\tthis.max = max;\n\t\tthis.oneOverMax = 1d / this.max;\n\t}", "protected void primSetZoom(double zoom) {\n\tPoint p1 = getViewport().getClientArea().getCenter();\n\tPoint p2 = p1.getCopy();\n\tPoint p = getViewport().getViewLocation();\n\tdouble prevZoom = this.zoom;\n\tthis.zoom = zoom;\n\tpane.setScale(zoom);\n\tfireZoomChanged();\n\tgetViewport().validate();\n\t\n\tp2.scale(zoom / prevZoom);\n\tDimension dif = p2.getDifference(p1);\n\tp.x += dif.width;\n\tp.y += dif.height;\n\tsetViewLocation(p);\t\n}", "public double getZoom() {\n return this.zoom;\n }", "@Override\n public void Zoom(double zoomNo) {\n\t \n }", "public void setMax ( Point max ) {\r\n\r\n\tsetB ( max );\r\n }", "void setMaxScale(int value);", "public boolean canZoomOut() {\n\treturn getZoom() > getMinZoom();\n}", "public void setMagThreshold(double magThreshold) {\n this.maxThreshold = magThreshold;\n }", "@JavascriptInterface\n public void setZoom(final int zoom) {\n getHandler().post(new Runnable() {\n @Override\n public void run() {\n if (mWebViewFragment.getMapSettings()\n .getZoom() != zoom) {\n if (BuildConfig.DEBUG) {\n Log.d(TAG,\n \"setZoom \" + zoom);\n }\n\n final MapSettings mapSettings = mWebViewFragment.getMapSettings();\n mapSettings.setZoom(zoom);\n mWebViewFragment.setMapSettings(mapSettings);\n }\n }\n });\n }", "public double getZoomFactor()\r\n {\r\n return zoomFactor;\r\n }", "public boolean canZoomIn() {\n\treturn getZoom() < getMaxZoom();\n}", "@SuppressWarnings(\"unused\")\n private void setZoom(JSONArray args, CallbackContext callbackContext) throws JSONException {\n Long zoom;\n zoom = args.getLong(1);\n\n this.myMoveCamera(CameraUpdateFactory.zoomTo(zoom), callbackContext);\n }", "protected abstract void handleZoom();", "public void zoomOut() {\n if (scale > 0.05) {\n double scaleFactor = (scale - 0.03) / scale;\n currentXOffset = scaleFactor * (currentXOffset - viewPortWidth / 2) + viewPortWidth / 2;\n currentYOffset = scaleFactor * (currentYOffset - viewPortHeight / 2) + viewPortHeight / 2;\n scale -= 0.03;\n\n selectionChanged = true;\n gameChanged = true;\n }\n }", "public void setMaxTranslationVel(float maxVel) {\n\t\tm_xforms[NvCameraXformType.MAIN].m_maxTranslationVel = maxVel;\n\t}", "protected void setMaxManaPerLevel(double maxManaPerLevel) \r\n\t{\tthis.maxManaPerLevel = maxManaPerLevel;\t}", "public final void setZoom(final int zoom) {\r\n\r\n if (logger.isDebugEnabled()) {\r\n logger.debug(\"new zoom: \" + zoom + \" (old zoom: \" + this.zoom + \")\");\r\n }\r\n\r\n //\r\n // size and visible rectangle before zooming\r\n\r\n final Dimension oldImageCanvasContainerSize = imageCanvas.getSize();\r\n final Rectangle oldImageCanvasContainerVisibleRect = imageCanvas.getVisibleRect();\r\n\r\n //\r\n // calculate the center of the visible rectangle\r\n\r\n final int oldImageCanvasContainerVisibleRectCenterX = oldImageCanvasContainerVisibleRect.x + oldImageCanvasContainerVisibleRect.width / 2;\r\n final int oldImageCanvasContainerVisibleRectCenterY = oldImageCanvasContainerVisibleRect.y + oldImageCanvasContainerVisibleRect.height / 2;\r\n\r\n //\r\n // zoom ( set the new zoom value and update image )\r\n\r\n this.zoom = zoom;\r\n updateImage();\r\n\r\n //\r\n // zoomed size\r\n\r\n final Dimension zoomedImageCanvasContainerSize = imageCanvas.getSize();\r\n\r\n //\r\n // now we can calculate the ratio (new size vs old size)\r\n\r\n final double xRatio = zoomedImageCanvasContainerSize.getWidth() / oldImageCanvasContainerSize.getWidth();\r\n final double yRatio = zoomedImageCanvasContainerSize.getHeight() / oldImageCanvasContainerSize.getHeight();\r\n\r\n //\r\n // apply the ratio to the old center\r\n\r\n int newImageCanvasContainerVisibleRectCenterX = (int) (oldImageCanvasContainerVisibleRectCenterX * xRatio);\r\n int newImageCanvasContainerVisibleRectCenterY = (int) (oldImageCanvasContainerVisibleRectCenterY * yRatio);\r\n\r\n //\r\n // calculate the new visible rectangle (using the translated center)\r\n\r\n Rectangle newImageCanvasContainerVisibleRect = new Rectangle(oldImageCanvasContainerVisibleRect.getSize());\r\n newImageCanvasContainerVisibleRect.x = newImageCanvasContainerVisibleRectCenterX - oldImageCanvasContainerVisibleRect.width / 2;\r\n newImageCanvasContainerVisibleRect.y = newImageCanvasContainerVisibleRectCenterY - oldImageCanvasContainerVisibleRect.height / 2;\r\n\r\n //\r\n // scroll to make visible the new rectangle\r\n\r\n imageCanvas.scrollRectToVisible(newImageCanvasContainerVisibleRect);\r\n }", "private void unsafeSetInitialZoom() {\n if (hic.isInPearsonsMode()) {\n initialZoom = hic.getMatrix().getFirstPearsonZoomData(HiC.Unit.BP).getZoom();\n } else if (HiCFileTools.isAllChromosome(hic.getXContext().getChromosome())) {\n mainViewPanel.getResolutionSlider().setEnabled(false);\n initialZoom = hic.getMatrix().getFirstZoomData(HiC.Unit.BP).getZoom();\n } else {\n mainViewPanel.getResolutionSlider().setEnabled(true);\n\n HiC.Unit currentUnit = hic.getZoom().getUnit();\n\n List<HiCZoom> zooms = (currentUnit == HiC.Unit.BP ? hic.getDataset().getBpZooms() :\n hic.getDataset().getFragZooms());\n\n\n// Find right zoom level\n\n int pixels = mainViewPanel.getHeatmapPanel().getMinimumDimension();\n int len;\n if (currentUnit == HiC.Unit.BP) {\n len = (Math.max(hic.getXContext().getChrLength(), hic.getYContext().getChrLength()));\n } else {\n len = Math.max(hic.getDataset().getFragmentCounts().get(hic.getXContext().getChromosome().getName()),\n hic.getDataset().getFragmentCounts().get(hic.getYContext().getChromosome().getName()));\n }\n\n int maxNBins = pixels / HiCGlobals.BIN_PIXEL_WIDTH;\n int bp_bin = len / maxNBins;\n initialZoom = zooms.get(zooms.size() - 1);\n for (int z = 1; z < zooms.size(); z++) {\n if (zooms.get(z).getBinSize() < bp_bin) {\n initialZoom = zooms.get(z - 1);\n break;\n }\n }\n\n }\n hic.unsafeActuallySetZoomAndLocation(\"\", \"\", initialZoom, 0, 0, -1, true, HiC.ZoomCallType.INITIAL, true);\n }", "public int getZoom() {\n return P_SCALE;\n }", "@Test\n public void testSetDragMultiplier() {\n final DraggingCamera camera = newValueObject();\n testBoundField(camera, DraggingCamera.DRAG_MULTIPLIER, 1.678f);\n }", "public void _setMax(float max)\r\n {\r\n if (valueClass.equals(Float.class))\r\n {\r\n setMaximum((int) (max * 100));\r\n } else\r\n {\r\n setMaximum((int) max);\r\n }\r\n }", "public void setMaximumPoints(int maximum);", "public void setZoom(int ps) {\n P_SCALE = ps;\n //EMBOSS = P_SCALE*8;\n }", "public void setZoom(float zoom) {\n\t\tthis.zoom = zoom;\n\t\trevalidate();\n\t\trepaint();\n\t}", "public double getZoom() {\n return curZoom;\n }", "public final int getZoom() {\r\n return zoom;\r\n }", "void onZoom() {\n\t\tmZoomPending=true;\n\t}", "public void zoomCheck(float x, float y) {\n if (y<=470 && y>=430) {\n if (x<=720 && x>=680) {\n game.changeZoom(1);\n } else if (x<=780 && x>=740) {\n game.changeZoom(0);\n }\n }\n }", "public float getZoom() {\n return zoom;\n }", "public void zoom(float zoom) { \n if (zoom <=0) {\n throw new IllegalArgumentException();\n }\n\n workTransform.setTransform(null);\n workTransform.mScale(zoom);\n workTransform.mMultiply(userTransform);\n doc.setTransform(workTransform);\n swapTransforms();\n }", "private void setMaxThreshold() {\n maxThreshold = value - value * postBoundChange / 100;\n }", "private void toggleZoom(float x, float y) {\n if (getZoomFactor() == MAX_ZOOM_FACTOR) {\n setZoomFactor(MIN_ZOOM_FACTOR);\n }\n else {\n setZoomFactor(MAX_ZOOM_FACTOR);\n }\n moveCameraToPosWithinBoardBounds(x, y);\n }", "public synchronized float getZoom()\r\n {\r\n return zoom;\r\n }", "public float getZoom() {\n return zoom;\n }", "@Override\n public void setCameraZoom(int zoomLevel) {\n mMap.moveCamera(CameraUpdateFactory.zoomTo(zoomLevel));\n }", "public void setMaxOutput(double maxOutput) {\r\n\t\tm_maxOutput = maxOutput;\r\n\t}", "int getZoomPref();", "public void setMaxRotationVel(float maxVel, int xform) {\n\t\tm_xforms[xform].m_maxRotationVel = maxVel;\n\t}", "public void SetMaxVal(int max_val);", "public void setMaxY(double maxY) {\r\n this.maxY = maxY;\r\n this.bottomLeftLat = maxY;\r\n this.lowerLeftY = maxY;\r\n }", "public int zoom() {\n double sizex = scale * getWidth();\n double sizey = scale * getHeight();\n for (int zoom = 0; zoom <= 32; zoom++, sizex *= 2, sizey *= 2)\n if (sizex > world.east() || sizey > world.north())\n return zoom;\n return 32;\n }", "public final void setRealSize() {\r\n setZoom(ZOOM_REAL_SIZE);\r\n }", "public void setMax( float max )\n { \n this.max = max;\n show_text();\n }", "public void setMaximumValue(double maximumValue)\n {\n this.maximumValue = maximumValue;\n }", "public Integer getZoom() {\n return zoom;\n }", "public Integer getZoom() {\n return zoom;\n }", "public void setMaximum(Number max) {\n this.max = max;\n }", "public void setMaxTransfer(double maxTransfer) {\n\t\tthis.maxTransfer = maxTransfer;\n\t}", "public double getZoom() {\n\treturn zoom;\n}", "public void setMax(int max) {\n this.max = max;\n }", "public void setMax(int max) {\n this.max = max;\n }", "private void adjustZoomFactor(){\n switch(zoomLevel){\n case 0:zoomFactor = 39; break;\n case 1:zoomFactor = 37; break;\n case 2:zoomFactor = 35; break;\n case 3:zoomFactor = 33; break;\n case 4:zoomFactor = 31; break;\n case 5:zoomFactor = 29; break;\n case 6:zoomFactor = 27; break;\n case 7:zoomFactor = 25; break;\n case 8:zoomFactor = 23; break;\n case 9:zoomFactor = 21; break;\n case 10:zoomFactor = 20; break;\n case 11:zoomFactor = 18; break;\n case 12:zoomFactor = 16; break;\n case 13:zoomFactor = 14; break;\n case 14:zoomFactor = 12; break;\n case 15:zoomFactor = 10; break;\n case 16:zoomFactor = 8; break;\n case 17:zoomFactor = 6; break;\n case 18:zoomFactor = 4; break;\n case 19:zoomFactor = 2; break;\n case 20:zoomFactor = 0; break;\n }\n }", "public void zoomToBounds(double ulLon, double ulLat, double lrLon, double lrLat)\n/* 116: */ {\n/* 117:182 */ int x_min = 2147483647;\n/* 118:183 */ int y_min = 2147483647;\n/* 119:184 */ int x_max = -2147483648;\n/* 120:185 */ int y_max = -2147483648;\n/* 121:186 */ int mapZoomMax = 20;\n/* 122: */\n/* 123:188 */ x_max = Math.max(x_max, MercatorProj.LonToX(lrLon, mapZoomMax));\n/* 124:189 */ x_max = Math.max(x_max, MercatorProj.LonToX(ulLon, mapZoomMax));\n/* 125:190 */ y_max = Math.max(y_max, MercatorProj.LatToY(ulLat, mapZoomMax));\n/* 126:191 */ y_max = Math.max(y_max, MercatorProj.LatToY(lrLat, mapZoomMax));\n/* 127:192 */ x_min = Math.min(x_min, MercatorProj.LonToX(ulLon, mapZoomMax));\n/* 128:193 */ x_min = Math.min(x_min, MercatorProj.LonToX(lrLon, mapZoomMax));\n/* 129:194 */ y_min = Math.min(y_min, MercatorProj.LatToY(ulLat, mapZoomMax));\n/* 130:195 */ y_min = Math.min(y_min, MercatorProj.LatToY(lrLat, mapZoomMax));\n/* 131: */\n/* 132: */\n/* 133: */\n/* 134:199 */ int height = Math.max(0, this.mapPanel.getHeight());\n/* 135:200 */ int width = Math.max(0, this.mapPanel.getWidth());\n/* 136:201 */ int newZoom = mapZoomMax;\n/* 137:202 */ int x = x_max - x_min;\n/* 138:203 */ int y = y_max - y_min;\n/* 139:204 */ while ((x > width) || (y > height))\n/* 140: */ {\n/* 141:205 */ newZoom--;\n/* 142:206 */ x >>= 1;\n/* 143:207 */ y >>= 1;\n/* 144: */ }\n/* 145:209 */ x = x_min + (x_max - x_min) / 2;\n/* 146:210 */ y = y_min + (y_max - y_min) / 2;\n/* 147:211 */ int z = 1 << mapZoomMax - newZoom;\n/* 148:212 */ x /= z;\n/* 149:213 */ y /= z;\n/* 150:214 */ this.mapPanel.setZoom(new Point(x, y), newZoom);\n/* 151: */ }", "public void unzoom() {\n\t\tdisp.unzoom();\n\t\texactZoom.setText(disp.getScale() + \"\");\n\t\tresize();\n\t\trepaint();\n\t}", "void setMaximum(int max);", "private double resolution(int zoom) {\n\t\treturn this.initialResolution / (Math.pow(2, zoom));\r\n\t}", "public void setMaximum() {\n getReel().setMaxValue(getVerticalScrollBar().getMaximum());\n }" ]
[ "0.79049593", "0.77893555", "0.7545496", "0.74282956", "0.7299718", "0.6924519", "0.66942775", "0.66342986", "0.6633169", "0.6586325", "0.652405", "0.64738303", "0.6472699", "0.6469223", "0.6320974", "0.6310906", "0.62836957", "0.62049156", "0.61658126", "0.6164435", "0.6163989", "0.6158512", "0.6156572", "0.6139718", "0.6139335", "0.6137723", "0.61367255", "0.60927707", "0.6069727", "0.60683143", "0.60653234", "0.60653234", "0.6057412", "0.6029161", "0.6009272", "0.6005317", "0.594877", "0.5945149", "0.5928985", "0.5925659", "0.5921962", "0.59040207", "0.58957344", "0.5859635", "0.584814", "0.58367693", "0.58355296", "0.5829065", "0.58219117", "0.58114064", "0.58095765", "0.57988626", "0.57975096", "0.5792548", "0.57709104", "0.5770439", "0.57474977", "0.5747164", "0.57437706", "0.57421017", "0.5725883", "0.5705803", "0.5690887", "0.56905395", "0.5689751", "0.5674014", "0.56701124", "0.5650969", "0.5639665", "0.5626255", "0.56245196", "0.5619549", "0.5613239", "0.56101096", "0.5605923", "0.56007946", "0.55873543", "0.55745065", "0.55493283", "0.55452305", "0.554197", "0.5538405", "0.552838", "0.5527002", "0.55229616", "0.55083317", "0.550744", "0.5506128", "0.5506128", "0.5505982", "0.5505641", "0.54981464", "0.54820764", "0.54820764", "0.5480899", "0.547744", "0.547035", "0.5468259", "0.5464348", "0.5464056" ]
0.8777246
0
Test of setZoomMin method, of class DraggingCamera.
@Test public void testSetZoomMin() { final DraggingCamera camera = newValueObject(); testBoundField(camera, DraggingCamera.ZOOM_MIN, 1.1f); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getMinZoom();", "@Test\n public void testSetZoomMultiplier() {\n final DraggingCamera camera = newValueObject();\n testBoundField(camera, DraggingCamera.ZOOM_MULTIPLIER, 1.678f);\n }", "@Test\n public void testSetZoomMax() {\n final DraggingCamera camera = newValueObject();\n testBoundField(camera, DraggingCamera.ZOOM_MAX, 10.0f);\n }", "@Test\n public void testSetZoomToMouse() {\n final DraggingCamera camera = newValueObject();\n testBoundField(camera, DraggingCamera.ZOOM_TO_MOUSE, false);\n }", "private void clampZoom()\n\t{\n\t\tif (zoom < ZOOM_MINIMUM)\n\t\t{\n\t\t\tzoom = ZOOM_MINIMUM;\n\t\t}\n\t\telse if (zoom > ZOOM_MAXIMUM)\n\t\t{\n\t\t\tzoom = ZOOM_MAXIMUM;\n\t\t}\n\t}", "public synchronized void setZoom(float zoom)\r\n {\r\n this.zoom = Utils.clampFloat(zoom, .4f, 1.5f);\r\n }", "public void updateZoom() {\n camera.zoom = zoomLevel;\n }", "public void setleZoom( double valeur) {\n\t\tzoomMonde = valeur;\n\t}", "public void setMinThreshold(double minThreshold) {\n this.minThreshold = minThreshold;\n }", "public void setMin ( Point min ) {\r\n\r\n\tsetA ( min );\r\n }", "private void unsafeSetInitialZoom() {\n if (hic.isInPearsonsMode()) {\n initialZoom = hic.getMatrix().getFirstPearsonZoomData(HiC.Unit.BP).getZoom();\n } else if (HiCFileTools.isAllChromosome(hic.getXContext().getChromosome())) {\n mainViewPanel.getResolutionSlider().setEnabled(false);\n initialZoom = hic.getMatrix().getFirstZoomData(HiC.Unit.BP).getZoom();\n } else {\n mainViewPanel.getResolutionSlider().setEnabled(true);\n\n HiC.Unit currentUnit = hic.getZoom().getUnit();\n\n List<HiCZoom> zooms = (currentUnit == HiC.Unit.BP ? hic.getDataset().getBpZooms() :\n hic.getDataset().getFragZooms());\n\n\n// Find right zoom level\n\n int pixels = mainViewPanel.getHeatmapPanel().getMinimumDimension();\n int len;\n if (currentUnit == HiC.Unit.BP) {\n len = (Math.max(hic.getXContext().getChrLength(), hic.getYContext().getChrLength()));\n } else {\n len = Math.max(hic.getDataset().getFragmentCounts().get(hic.getXContext().getChromosome().getName()),\n hic.getDataset().getFragmentCounts().get(hic.getYContext().getChromosome().getName()));\n }\n\n int maxNBins = pixels / HiCGlobals.BIN_PIXEL_WIDTH;\n int bp_bin = len / maxNBins;\n initialZoom = zooms.get(zooms.size() - 1);\n for (int z = 1; z < zooms.size(); z++) {\n if (zooms.get(z).getBinSize() < bp_bin) {\n initialZoom = zooms.get(z - 1);\n break;\n }\n }\n\n }\n hic.unsafeActuallySetZoomAndLocation(\"\", \"\", initialZoom, 0, 0, -1, true, HiC.ZoomCallType.INITIAL, true);\n }", "public void setMinimumValue (double min) {\r\n\t\tminValue = new Double(min);\r\n\t\tvalidateMin = (minValue.compareTo(DOUBLE_ZERO) != 1);\r\n\t}", "@Override\n public void Zoom(double zoomNo, boolean setZoom) {\n\t \n }", "public void zoomCam(float zoom){\n\t\tthis.camera.setZoom(zoom);\n\t}", "protected void primSetZoom(double zoom) {\n\tPoint p1 = getViewport().getClientArea().getCenter();\n\tPoint p2 = p1.getCopy();\n\tPoint p = getViewport().getViewLocation();\n\tdouble prevZoom = this.zoom;\n\tthis.zoom = zoom;\n\tpane.setScale(zoom);\n\tfireZoomChanged();\n\tgetViewport().validate();\n\t\n\tp2.scale(zoom / prevZoom);\n\tDimension dif = p2.getDifference(p1);\n\tp.x += dif.width;\n\tp.y += dif.height;\n\tsetViewLocation(p);\t\n}", "@Override\n public void onPinchZoomStarted(PinchZoomDetector pPinchZoomDetector,\n TouchEvent pSceneTouchEvent) {\n\n // On first detection of pinch zooming, obtain the initial zoom factor\n mInitialTouchZoomFactor = mCamera.getZoomFactor();\n }", "public void setMin(Vect3d min) {\r\n this.min = min;\r\n }", "public void setMinimumValue (Double min) {\r\n\t\tminValue = min;\r\n\t\tvalidateMin = (minValue.compareTo(DOUBLE_ZERO) != 1);\r\n\t}", "public void setZoom(float zoom) {\n this.zoom = zoom;\n }", "public void setZoom(){\n\t\tactive.setZoom();\n\t}", "boolean allowZoom();", "public int getMinZoom() {\n if(internalNative == null) {\n if(internalLightweightCmp != null) {\n return internalLightweightCmp.getMinZoomLevel();\n } else {\n // TODO: Browser component\n return 1;\n }\n }\n return internalNative.getMinZoom();\n }", "public void setMinRange(double minRange) {\n this.minRange = minRange;\n }", "private void setZoomLevel() {\n final float oldMaxScale = photoView.getMaximumScale();\n photoView.setMaximumScale(oldMaxScale *2);\n photoView.setMediumScale(oldMaxScale);\n }", "public void setZoom(float zoom) {\r\n\t\tif (zoom < 0.1f)\r\n\t\t\treturn;\r\n\t\tthis.zoomFactor = zoom;\r\n\t}", "public void setZoom(double zoom) {\n if(zoom != mZoom) {\n mZoom = zoom;\n setChanged();\n }\n }", "public void _setMin(float min)\r\n {\r\n if (valueClass.equals(Float.class))\r\n {\r\n setMinimum((int) (min * 100));\r\n } else\r\n {\r\n setMinimum((int) min);\r\n }\r\n }", "@Override\n public boolean zoom(float initialDistance, float distance) {\n cameraDistance += (initialDistance - distance) * zoomSpeed;\n\n //Makes sure the user can't zoom too far or too close\n if(cameraDistance < minCameraDistance)\n cameraDistance = minCameraDistance;\n else if(cameraDistance > maxCameraDistance)\n cameraDistance = maxCameraDistance;\n\n //camera needs to be set again\n resize(800, 480);\n return false;\n }", "public void setMinTransfer(double minTransfer) {\n\t\tthis.minTransfer = minTransfer;\n\t}", "public void setZoom(double zoom) {\n\tzoom = Math.min(getMaxZoom(), zoom);\n\tzoom = Math.max(getMinZoom(), zoom);\n\tif (this.zoom != zoom)\n\t\tprimSetZoom(zoom);\n}", "private void dragZoom() {\n\n\t\tint width = this.getWidth();\n\n\t\tint start = cont.getStart();\n\t\tdouble amount = cont.getLength();\n\n\t\tint newStart = (int) DrawingTools.calculatePixelPosition(x ,width,amount,start);\n\t\tint newStop = (int) DrawingTools.calculatePixelPosition(x2,width,amount,start);\n\t\tx = x2 = 0;\n\n\t\tint temp;\n\t\tif (newStop < newStart){\n\t\t\ttemp = newStart;\n\t\t\tnewStart = newStop;\n\t\t\tnewStop = temp;\n\t\t}\n\n\t\tcont.changeSize(newStart,newStop);\n\n\t}", "private void setMinThreshold() {\n minThreshold = value + value * postBoundChange / 100;\n }", "public void zoomIn() {\n if (scale < 0.8) {\n double scaleFactor = (scale + 0.03) / scale;\n currentXOffset = scaleFactor * (currentXOffset - viewPortWidth / 2) + viewPortWidth / 2;\n currentYOffset = scaleFactor * (currentYOffset - viewPortHeight / 2) + viewPortHeight / 2;\n scale += 0.03;\n\n selectionChanged = true;\n gameChanged = true;\n }\n\n }", "@Override\n public void setZoom(double zoom)\n {\n super.setZoom(zoom);\n delayedRepainting.requestRepaint(ZOOM_REPAINT);\n }", "@Override\n\tpublic void setZoom(int zoom) {\n\t\t\n\t}", "public void setZoom(Integer zoom) {\n this.zoom = zoom;\n }", "public void setZoom(Integer zoom) {\n this.zoom = zoom;\n }", "public void setMin( float min )\n {\n this.min = min;\n show_text();\n }", "public void setMin(int min) {\n this.min = min;\n }", "public void setMin(int min) {\n this.min = min;\n }", "public void setZoom(double zoom) {\n if (zoom > 0) {\n this.zoom = zoom;\n this.rescale();\n }\n }", "public void setZoom( double zoom ) {\n\t\tthis.zoom = zoom;\n\t}", "@Test\n public void testSetDragMultiplier() {\n final DraggingCamera camera = newValueObject();\n testBoundField(camera, DraggingCamera.DRAG_MULTIPLIER, 1.678f);\n }", "public void setZoom(float zoom){\r\n zoom = zoom * 100;\r\n zoom = Math.round(zoom);\r\n this.zoom = Math.max(zoom / 100, 0.01f);\r\n }", "public void setMinimum(Number min) {\n this.min = min;\n }", "public void zoomIn() {\n\t\tif (this.zoom + DELTA_ZOOM <= MAX_ZOOM)\n\t\t\tthis.setZoom(this.zoom + DELTA_ZOOM);\n\t}", "void multitouchZoom(int new_zoom);", "public void setFacteurZoom(double fac)\n\t{\n \tthis.facteurZoom = this.facteurZoom * fac ;\n \tif (this.facteurZoom == 0)\n \t{\n \t\tthis.facteurZoom = 0.01;\n \t}\n }", "public void SetMinVal(int min_val);", "public void setMin(int min)\n\t{\n\t\tif (min < 0)\n\t\t\tthrow new IllegalArgumentException(\"min < 0\");\n\t\tthis.min = min;\n\t}", "public boolean canZoomIn() {\n\treturn getZoom() < getMaxZoom();\n}", "@Override\n public void onPinchZoom(PinchZoomDetector pPinchZoomDetector,\n TouchEvent pTouchEvent, float pZoomFactor) {\n\n\t\t/* On every sub-sequent touch event (after the initial touch) we offset\n\t\t * the initial camera zoom factor by the zoom factor calculated by\n\t\t * pinch-zooming */\n final float newZoomFactor = mInitialTouchZoomFactor * pZoomFactor;\n\n // If the camera is within zooming bounds\n if (newZoomFactor < MAX_ZOOM_FACTOR && newZoomFactor > MIN_ZOOM_FACTOR) {\n // Set the new zoom factor\n mCamera.setZoomFactor(newZoomFactor);\n }\n }", "protected abstract void handleZoom();", "public static void changeCameraZoom(boolean zoomIn){\r\n\t\tif(zoomIn && zoomLevel > 0){\r\n\t\t\tzoomLevel -= 2;\r\n\t\t}else if(!zoomIn){\r\n\t\t\tzoomLevel += 2;\r\n\t\t}\r\n\t}", "@Override\n public void Zoom(double zoomNo) {\n\t \n }", "public double getZoom() {\n return mZoom;\n }", "public void setMinSize(double aWidth, double aHeight) { setMinWidth(aWidth); setMinHeight(aHeight); }", "public double getCameraZoom() {\n\t\treturn cameraZoom;\n\t}", "void onZoom() {\n\t\tmZoomPending=true;\n\t}", "public final void setZoom(final int zoom) {\r\n\r\n if (logger.isDebugEnabled()) {\r\n logger.debug(\"new zoom: \" + zoom + \" (old zoom: \" + this.zoom + \")\");\r\n }\r\n\r\n //\r\n // size and visible rectangle before zooming\r\n\r\n final Dimension oldImageCanvasContainerSize = imageCanvas.getSize();\r\n final Rectangle oldImageCanvasContainerVisibleRect = imageCanvas.getVisibleRect();\r\n\r\n //\r\n // calculate the center of the visible rectangle\r\n\r\n final int oldImageCanvasContainerVisibleRectCenterX = oldImageCanvasContainerVisibleRect.x + oldImageCanvasContainerVisibleRect.width / 2;\r\n final int oldImageCanvasContainerVisibleRectCenterY = oldImageCanvasContainerVisibleRect.y + oldImageCanvasContainerVisibleRect.height / 2;\r\n\r\n //\r\n // zoom ( set the new zoom value and update image )\r\n\r\n this.zoom = zoom;\r\n updateImage();\r\n\r\n //\r\n // zoomed size\r\n\r\n final Dimension zoomedImageCanvasContainerSize = imageCanvas.getSize();\r\n\r\n //\r\n // now we can calculate the ratio (new size vs old size)\r\n\r\n final double xRatio = zoomedImageCanvasContainerSize.getWidth() / oldImageCanvasContainerSize.getWidth();\r\n final double yRatio = zoomedImageCanvasContainerSize.getHeight() / oldImageCanvasContainerSize.getHeight();\r\n\r\n //\r\n // apply the ratio to the old center\r\n\r\n int newImageCanvasContainerVisibleRectCenterX = (int) (oldImageCanvasContainerVisibleRectCenterX * xRatio);\r\n int newImageCanvasContainerVisibleRectCenterY = (int) (oldImageCanvasContainerVisibleRectCenterY * yRatio);\r\n\r\n //\r\n // calculate the new visible rectangle (using the translated center)\r\n\r\n Rectangle newImageCanvasContainerVisibleRect = new Rectangle(oldImageCanvasContainerVisibleRect.getSize());\r\n newImageCanvasContainerVisibleRect.x = newImageCanvasContainerVisibleRectCenterX - oldImageCanvasContainerVisibleRect.width / 2;\r\n newImageCanvasContainerVisibleRect.y = newImageCanvasContainerVisibleRectCenterY - oldImageCanvasContainerVisibleRect.height / 2;\r\n\r\n //\r\n // scroll to make visible the new rectangle\r\n\r\n imageCanvas.scrollRectToVisible(newImageCanvasContainerVisibleRect);\r\n }", "@Override\r\n\tpublic void setMinCoordinates() {\n\t\t\r\n\t}", "public void setMinimum(Number min) {\n ((ADocument) getDocument()).setMinimum(min);\n }", "public void setMinValue(int minValue) {\n this.minValue = minValue;\n }", "public double getZoom() {\n return this.zoom;\n }", "private void setMin(int min) { this.min = new SimplePosition(false,false,min); }", "public void zoom(double factor, Point mouseLocation) {\n Point2D.Double viewOffset = viewCoords_.getViewOffset();\n Point2D.Double sourceDataSize = viewCoords_.getFullResSourceDataSize();\n Point2D.Double zoomCenter;\n //compute centroid of the zoom in full res coordinates\n if (mouseLocation == null) {\n //if mouse not over image zoom to center\n zoomCenter = new Point2D.Double(viewOffset.x + sourceDataSize.y / 2,\n viewOffset.y + sourceDataSize.y / 2);\n } else {\n zoomCenter = new Point2D.Double(\n (long) viewOffset.x + mouseLocation.x\n / viewCoords_.getMagnificationFromResLevel()\n * viewCoords_.getDownsampleFactor(),\n (long) viewOffset.y + mouseLocation.y\n / viewCoords_.getMagnificationFromResLevel()\n * viewCoords_.getDownsampleFactor());\n }\n\n //Do zooming--update size of source data\n double newSourceDataWidth = sourceDataSize.x * factor;\n double newSourceDataHeight = sourceDataSize.y * factor;\n if (newSourceDataWidth < 5 || newSourceDataHeight < 5) {\n return; //constrain maximum zoom\n }\n if (data_.getBounds() != null) {\n //don't let either of these go bigger than the actual data\n double overzoomXFactor = newSourceDataWidth / (viewCoords_.xMax_ - viewCoords_.xMin_);\n double overzoomYFactor = newSourceDataHeight / (viewCoords_.yMax_ - viewCoords_.yMin_);\n if (overzoomXFactor > 1 || overzoomYFactor > 1) {\n newSourceDataWidth = newSourceDataWidth / Math.max(overzoomXFactor, overzoomYFactor);\n newSourceDataHeight = newSourceDataHeight / Math.max(overzoomXFactor, overzoomYFactor);\n }\n }\n viewCoords_.setFullResSourceDataSize(newSourceDataWidth, newSourceDataHeight);\n\n double xOffset = (zoomCenter.x - (zoomCenter.x - viewOffset.x)\n * newSourceDataWidth / sourceDataSize.x);\n double yOffset = (zoomCenter.y - (zoomCenter.y - viewOffset.y)\n * newSourceDataHeight / sourceDataSize.y);\n //make sure view doesn't go outside image bounds\n if (data_.getBounds() != null) {\n viewCoords_.setViewOffset(\n Math.max(viewCoords_.xMin_, Math.min(xOffset,\n viewCoords_.xMax_ - viewCoords_.getFullResSourceDataSize().x)),\n Math.max(viewCoords_.yMin_, Math.min(yOffset,\n viewCoords_.yMax_ - viewCoords_.getFullResSourceDataSize().y)));\n } else {\n viewCoords_.setViewOffset(xOffset, yOffset);\n }\n }", "void startZoom() {\n\t\t// this boolean tells the system that it needs to \n\t\t// initialize itself before trying to zoom\n\t\t// This is cleaner than duplicating code\n\t\t// see processZoom\n\t\tmZoomEstablished=false;\n\t}", "public void zoom() {\n\t\tdisp.zoom();\n\t\texactZoom.setText(disp.getScale() + \"\");\n\t\tresize();\n\t\trepaint();\n\t}", "public void zoomIn() {\n\tsetZoom(getNextZoomLevel());\n}", "public void setMinimumValue(double minimumValue)\n {\n this.minimumValue = minimumValue;\n }", "public void setMinOffset(float minOffset) {\n this.mMinOffset = minOffset;\n }", "public void setMinMagnitude(double magnitude);", "public void setMinAge(int minAge)\r\n {\r\n this.minAge = minAge;\r\n }", "public final void setMinPointPixelDistance(final int minPixelDistance) {\n minPointPixelDistanceProperty().setValue(minPixelDistance);\n }", "public void setMinValue(double x) {\r\n\t\tminValue = x;\r\n\t}", "public double getZoomFactor()\r\n {\r\n return zoomFactor;\r\n }", "public double getMinScale() {\n return minScale;\n }", "public void setZoom(float zoomValue) {\n pos.zoom = zoomValue;\n invalidate();\n }", "@Override\n public void setMinRange(int minRange) {\n this.minRange = minRange;\n }", "@Generated\n @Selector(\"setMinimumRadius:\")\n public native void setMinimumRadius(@NFloat double value);", "public void zoomCheck(float x, float y) {\n if (y<=470 && y>=430) {\n if (x<=720 && x>=680) {\n game.changeZoom(1);\n } else if (x<=780 && x>=740) {\n game.changeZoom(0);\n }\n }\n }", "public void setXRangeMin(double xRangeMin) {\n this.xRangeMin = xRangeMin;\n }", "public void setZoom(float zoom) {\n\t\tthis.zoom = zoom;\n\t\trevalidate();\n\t\trepaint();\n\t}", "public int getZoom() {\n return P_SCALE;\n }", "public void setMinimalRadius(double minimalRadius) {\n\t\tminimalRadiusProperty().setValue(minimalRadius);\n\t}", "private void actionZoomIn ()\r\n\t{\r\n\t\tint tableSize = DataController.getTable().getTableSize();\r\n\r\n\t\t//---- Check if the project is empty or not\r\n\t\tif (tableSize != 0)\r\n\t\t{\r\n\t\t\t//---- Calculate zoom scale factor\r\n\t\t\tdouble zoom = mainFormLink.getComponentPanelCenter().getComponentPanelImageView().transformZoom(+FormMainMouse.DEFAULT_ZOOM_DELTA); \r\n\t\t\tmainFormLink.getComponentPanelCenter().getComponentPanelImageView().repaint();\r\n\r\n\t\t\t//---- Set the current zoom, display the zoom scale factor in the GUI\r\n\t\t\tFormMainMouse.imageViewZoomScale = zoom;\r\n\t\t\tmainFormLink.getComponentPanelDown().getComponentLabelZoom().setText(String.valueOf(zoom));\r\n\t\t}\r\n\t}", "private void checkForZoomIn(){\n if(checkIn == 1){\n zoomLevel++;\n adjustZoomFactor();\n checkOut = 1;\n checkIn = 0;\n } else{\n checkOut = 0;\n checkIn = 1;\n }\n\n }", "public double getZoom() {\n return curZoom;\n }", "@JavascriptInterface\n public void setZoom(final int zoom) {\n getHandler().post(new Runnable() {\n @Override\n public void run() {\n if (mWebViewFragment.getMapSettings()\n .getZoom() != zoom) {\n if (BuildConfig.DEBUG) {\n Log.d(TAG,\n \"setZoom \" + zoom);\n }\n\n final MapSettings mapSettings = mWebViewFragment.getMapSettings();\n mapSettings.setZoom(zoom);\n mWebViewFragment.setMapSettings(mapSettings);\n }\n }\n });\n }", "public int setSalinityMin(Float salinityMin) {\n try {\n setSalinityMin(salinityMin.floatValue());\n } catch (Exception e) {\n setSalinityMinError(FLOATNULL, e, ERROR_SYSTEM);\n } // try\n return salinityMinError;\n }", "public void setMinRating(int minRating) {\n this.minRating = minRating;\n }", "public final void zoomIn(final int zoomStep) {\r\n\r\n final BufferedImage image = imageCanvas.getImage();\r\n\r\n //\r\n // no image, no zoom\r\n\r\n if (image == null) {\r\n return;\r\n }\r\n\r\n int zoomTmp = this.zoom;\r\n\r\n //\r\n // if zoom is best fit\r\n // calculate the zoom based on container size\r\n\r\n if (zoomTmp == ZOOM_BEST_FIT) {\r\n zoomTmp = ImageUtils.calculateSizeToFit(image, imageCanvas.getSize()).width * ZOOM_REAL_SIZE / image.getWidth();\r\n }\r\n\r\n //\r\n // calculate new zoom based on the step parameter\r\n\r\n int newZoom = (int) (Math.floor(((double) zoomTmp) / ((double) zoomStep)) + 1) * zoomStep;\r\n\r\n// if (newZoom == zoomTmp) {\r\n newZoom = newZoom + zoomStep;\r\n// }\r\n\r\n setZoom(newZoom);\r\n }", "@JSProperty(\"minRange\")\n void setMinRange(double value);", "public void zoom(float zoom) { \n if (zoom <=0) {\n throw new IllegalArgumentException();\n }\n\n workTransform.setTransform(null);\n workTransform.mScale(zoom);\n workTransform.mMultiply(userTransform);\n doc.setTransform(workTransform);\n swapTransforms();\n }", "private void setMinWin(float minwin) \n\t{\n\t\tif (Math.abs(minwin) < 1.0f)\n\t\t{\n\t\t\tif (minwin < _maxwin)\n\t\t\t{\n\t\t\t\t_minwin = Math.abs(minwin);\t\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void setCameraZoom(int zoomLevel) {\n mMap.moveCamera(CameraUpdateFactory.zoomTo(zoomLevel));\n }", "public void zoomIn() { zoomIn(1); }", "private void adjustZoomFactor(){\n switch(zoomLevel){\n case 0:zoomFactor = 39; break;\n case 1:zoomFactor = 37; break;\n case 2:zoomFactor = 35; break;\n case 3:zoomFactor = 33; break;\n case 4:zoomFactor = 31; break;\n case 5:zoomFactor = 29; break;\n case 6:zoomFactor = 27; break;\n case 7:zoomFactor = 25; break;\n case 8:zoomFactor = 23; break;\n case 9:zoomFactor = 21; break;\n case 10:zoomFactor = 20; break;\n case 11:zoomFactor = 18; break;\n case 12:zoomFactor = 16; break;\n case 13:zoomFactor = 14; break;\n case 14:zoomFactor = 12; break;\n case 15:zoomFactor = 10; break;\n case 16:zoomFactor = 8; break;\n case 17:zoomFactor = 6; break;\n case 18:zoomFactor = 4; break;\n case 19:zoomFactor = 2; break;\n case 20:zoomFactor = 0; break;\n }\n }", "public void setarXmin(double xmin) {\n\t\tthis.xmin = xmin;\n\t}", "public int setTemperatureMin(Float temperatureMin) {\n try {\n setTemperatureMin(temperatureMin.floatValue());\n } catch (Exception e) {\n setTemperatureMinError(FLOATNULL, e, ERROR_SYSTEM);\n } // try\n return temperatureMinError;\n }" ]
[ "0.73179424", "0.7288741", "0.72348666", "0.70066893", "0.63970613", "0.6344076", "0.6292152", "0.6272265", "0.6247594", "0.62348676", "0.62229073", "0.6205616", "0.6198897", "0.6192944", "0.6181044", "0.6174026", "0.61654234", "0.6144082", "0.6142262", "0.61372745", "0.6127884", "0.6094898", "0.6064105", "0.60261804", "0.60228735", "0.6015024", "0.60119087", "0.59880966", "0.59840834", "0.59798115", "0.5978785", "0.59731746", "0.59688103", "0.59378827", "0.5937611", "0.5934238", "0.5934238", "0.59332633", "0.5920897", "0.5920897", "0.5909885", "0.59096134", "0.59084356", "0.59005", "0.5868451", "0.58659923", "0.58593744", "0.5819991", "0.57824105", "0.5768762", "0.57463604", "0.5735136", "0.5735127", "0.57288414", "0.5727087", "0.57240796", "0.5708867", "0.5697616", "0.569317", "0.568667", "0.56859595", "0.5669112", "0.5663027", "0.56555027", "0.56471616", "0.56388324", "0.56352675", "0.5631802", "0.5620749", "0.5615068", "0.5609497", "0.5603004", "0.55595833", "0.55571467", "0.55522376", "0.5551139", "0.5538761", "0.55385345", "0.5532556", "0.5529501", "0.55273193", "0.55267125", "0.55152535", "0.5490414", "0.5482329", "0.54705954", "0.54677606", "0.5463125", "0.54611903", "0.54592556", "0.5452765", "0.54504925", "0.5445266", "0.5445048", "0.5444321", "0.54433674", "0.5441536", "0.54405504", "0.543317", "0.54229015" ]
0.8742926
0
/ maybe make this into an loop, using sine so it loops back and forth a few times
private void run() { while(fraction<=1){ UI.clearGraphics(); redraw(); UI.sleep(rate); this.fraction += step; UI.repaintGraphics(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void run() {\n\t\tdouble x = 0.1;\n\t\tTime.start(\"a\");\n\t\tdouble y = 0;\n\t\tint n = 10000000;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\t//x = x * 0.00000000001 + x + 0.001 + Math.sin(x); // 450 ms /10 000 000 = 45 ns\n\t\t\t//x = x * 0.00000000001 + x + 0.001 + Math.sin((x - 0.1) / x); // 526\n\t\t\t//x = x * 0.00000000001 + x + 0.001 + (x - 0.1) / x; // 68\n\t\t\t//x = x * 0.00000000001 + x + 0.001 + Math.sqrt((x - 0.1) / x); // 130\n\t\t\t//x = x * 0.00000000001 + x + 0.001 + Math.acos((x - 0.1) / x); // 4747\n\t\t\t//x = x * 0.00000000001 + x + 0.001; // 35\n\t\t\t\n\t\t\t// superposer: 13760 ms / 49995000 = 2752 ms / 10 000 000\n\t\t\t// 5 sin??? wtf \n\t\t\t// TRY using the RMSD value\n\t\t\t// do it here, iterativelly? feed points?>\n//euclid 83\n//table 428\n//qcp 14344 49995000\n// can sin/cos be avoided, just multiplication of quaternions? does the equation looks like it takes stuff from quat?\n// arc algebra?\n// draw both arcs on equator and move one by x-rotation\n// what is that rotation?\n// can it be done with primal a,b,c,d rotations?\n\t\t}\n\t\tTime.stop(\"a\");\n\t\tSystem.out.println(Time.get(\"a\").getMiliseconds());\n\t\tSystem.out.println(x);\n\t}", "static double sineWave(double timeInSeconds, double frequency) {\r\n\t\tdouble result= Math.sin(timeInSeconds);\r\n\t\t\t\r\n\t\treturn result; // hint: use Math.sin(...)\r\n\t}", "public final void sin() {\n\t\tif (size > 0) {\n\n\t\t\tdouble topMostValue = pop();\n\t\t\tpush(Math.sin(topMostValue));\n\n\t\t}\n\t}", "public double sin(double number);", "static double squareWave(double timeInSeconds, double frequency) {\r\n\t\treturn 0;\r\n\t}", "@Override\n\tpublic void step() {\n\t\ty += speed;\n\t}", "static double sawtoothWave(double timeInSeconds, double frequency) {\r\n\t\treturn 0;\t\t\r\n\t}", "public static double mySin(double x) {\n int n = 0;\n int N = 20;\n double y = 0;\n for (; n <= N; n++) {\n double p1 = 1;\n for (int i = 1; i <= n; i++) {\n p1 *= (-1);\n }\n double p2 = 1;\n for (int i = 1; i <= (2 * n + 1); i++){\n p2*=i;\n }\n double p3 = 1;\n for (int i = 1; i <= (2 * n + 1); i++){\n p3*=x;\n }\n y = y + (p1/p2)*p3;\n }\n return y;\n }", "private double sinc(double x) {\n return Math.sin(Math.PI * x) / (Math.PI * x);\n }", "E sin(final E n);", "public void go()\n {\n for( int i = 0; i<3; i++)m[i].setSpeed(720);\n step();\n for( int i = 0; i<3; i++)m[i].regulateSpeed(false);\n step();\n }", "void calcWave() {\n yoff += 0.01f;\n \n //For every x value, calculate a y value based on sine or cosine\n float x = yoff; //**OPTION #1****/\n //float x = 0.0f; //**OPTION #2****/\n for (int i = 0; i < yvalues.length; i++) {\n float n = 2*noise(x)-1.0f; //**OPTION #1****/ //scale noise to be between 1 and -1\n //float n = 2*noise(x,yoff)-1.0f; //**OPTION #2****/ //scale noise to be between 1 and -1\n yvalues[i] = n*amplitude;\n x+=dx;\n }\n }", "void tick();", "void tick();", "public void timer()\n {\n timer += .1; \n }", "@Override\n\tpublic void step() {\n\t\tthis.y-= speed;\t\n\t}", "public void timer()\n{\n textSize(13);\n controlP5.getController(\"time\").setValue(runtimes);\n line(400, 748, 1192, 748);\n fill(255,0,0);\n for (int i =0; i<25; i++)\n {\n line(400+i*33, 743, 400+i*33, 753);\n text(i, 395 +i*33, 768);\n }\n if ((runtimes < 1 || runtimes > 28800) && s == true)\n {\n //origint = 0;\n runtimes = 1;\n //pausets = 0;\n runtimep = 0;\n } else if (runtimes > 0 && runtimes < 28800 && s == true)\n {\n runtimep = runtimes;\n runtimes = runtimes + speed;\n }\n timeh= runtimes/1200;\n timem= (runtimes%1200)/20;\n}", "public void sunRise()\n {\n sun.slowMoveHorizontal(180);\n sun.slowMoveVertical(-200);\n sunset1.makeVisible();\n sun.makeVisible();\n fruitRegrow();\n }", "@Override\n public void periodic()\n {\n if(AutoIntake)\n intake(-0.2f, -0.5f);\n }", "public void tick() {\n\t\ttick(1);\n\t}", "public void tick() {\r\n tick++;\r\n }", "public void step()\n {\n LCD.clear();\n sw.reset();\n for( int i = 0; i<3; i++)m[i].resetTachoCount();\n for( int i = 0; i<3; i++)m[i].forward();\n for(int r = 0 ; r<8; r++)\n {\n while(sw.elapsed() < 200* r)Thread.yield();\n for( int i = 0; i<3; i++)\n LCD.drawInt(m[i].getTachoCount(),5*i,r);\n }\n for( int i = 0; i<3; i++)m[i].stop();\n Button.waitForPress();\n }", "public void frameForward()\n{\n stop();\n setTime(getTime() + getInterval());\n}", "public abstract void animation(double seconds);", "public void tick(){\r\n if(timer != 0)\r\n timer++;\r\n }", "public void slideSnowman(double getSeconds) {\n\n //Ensures snowman doesnt move off screen\n if (pos >= 4 || pos <=-4) {\n turn180 = true;\n move = false;\n }\n\n //turn 45 degree so snowman faces direction of motion\n if (turn45) {\n turn180 = false;\n move = false;\n /*\n * Deals with the reset button ie if reset button is pressed it remembers which\n * way it was currently moving and then turns back to that position accordinly.\n */\n if (backwards) {\n i += -1;\n //If backwards snowman needs to rotate 135 degrees to be facing right direction\n // this ensures that and will make the difference = 45 for later conditional\n difference = -i -90;\n } else{\n i += 1;\n difference = i;\n\n }\n snowmanMoveZTranslate.setTransform(Mat4Transform.rotateAroundY(i));\n snowmanMoveZTranslate.update();\n //if turned 45 degree then continue can continue sliding\n if (difference == 45) {\n turn45 = false;\n move = true;\n }\n }\n\n //turn snowman around to face opposite direction\n if(turn180) {\n i += 1;\n snowmanMoveZTranslate.setTransform(Mat4Transform.rotateAroundY(i));\n snowmanMoveZTranslate.update();\n difference = i-oldI;\n if (difference == 180){\n turn180 = false;\n increment = -increment;\n move = true;\n backwards = !backwards;\n }\n }\n\n //move in a diagonal line\n if (move) {\n pos += increment;\n snowmanMoveXTranslate.setTransform(Mat4Transform.translate(pos,0,pos));\n snowmanMoveXTranslate.update();\n oldI = i;\n }\n }", "public void step () {\r\n mySimulation.update((double) FRAMES_PER_SECOND / ONE_SECOND);\r\n // indirectly causes paint to be called\r\n repaint();\r\n }", "public void loop() {\n\t\tloop(1.0f, 1.0f);\n\t}", "public void run ()\n{\n for (int i = 3; i < 100000; i += 2)\n {\n if (negative)\n pi -= (1.0 / i);\n else\n pi += (1.0 / i);\n negative = !negative;\n }\n pi += 1.0;\n pi *= 4.0;\n System.out.println (\"Finished calculating PI\");\n}", "private static double getSinSquare(Double value){\r\n\t\treturn Math.pow(Math.sin(value/2), 2);\r\n\r\n }", "public void frame()\n{\n for(int cc=1;cc<8;cc++)\n {if (cc==7)\n {\n line(w1+cos(cc*TWO_PI/7)*radiu*1/3, h1+sin(cc*TWO_PI/7)*radiu*1/3, w1+cos(TWO_PI/7)*radiu*1/3, h1+sin(TWO_PI/7)*radiu*1/3);\n line(w1+cos(cc*TWO_PI/7)*radiu*2/3, h1+sin(cc*TWO_PI/7)*radiu*2/3, w1+cos(TWO_PI/7)*radiu*2/3, h1+sin(TWO_PI/7)*radiu*2/3); \n line(w1+cos(cc*TWO_PI/7)*radiu*1, h1+sin(cc*TWO_PI/7)*radiu*1, w1+cos(TWO_PI/7)*radiu*1, h1+sin(TWO_PI/7)*radiu*1);\n}\n else{\n line(w1+cos(cc*TWO_PI/7)*radiu*1/3, h1+sin(cc*TWO_PI/7)*radiu*1/3, w1+cos((cc+1)*TWO_PI/7)*radiu*1/3, h1+sin((cc+1)*TWO_PI/7)*radiu*1/3);\n line(w1+cos(cc*TWO_PI/7)*radiu*2/3, h1+sin(cc*TWO_PI/7)*radiu*2/3, w1+cos((cc+1)*TWO_PI/7)*radiu*2/3, h1+sin((cc+1)*TWO_PI/7)*radiu*2/3);\n line(w1+cos(cc*TWO_PI/7)*radiu*1, h1+sin(cc*TWO_PI/7)*radiu*1, w1+cos((cc+1)*TWO_PI/7)*radiu*1, h1+sin((cc+1)*TWO_PI/7)*radiu*1);\n \n}\n }\n for(int dd=1;dd<8;dd++)\n {if (dd==7)\n {\n line(w2+cos(dd*TWO_PI/7)*radiu*1/3, h2+sin(dd*TWO_PI/7)*radiu*1/3, w2+cos(TWO_PI/7)*radiu*1/3, h2+sin(TWO_PI/7)*radiu*1/3);\n line(w2+cos(dd*TWO_PI/7)*radiu*2/3, h2+sin(dd*TWO_PI/7)*radiu*2/3, w2+cos(TWO_PI/7)*radiu*2/3, h2+sin(TWO_PI/7)*radiu*2/3);\n line(w2+cos(dd*TWO_PI/7)*radiu*1, h2+sin(dd*TWO_PI/7)*radiu*1, w2+cos(TWO_PI/7)*radiu*1, h2+sin(TWO_PI/7)*radiu*1);\n \n}\n else{\n line(w2+cos(dd*TWO_PI/7)*radiu*1/3, h2+sin(dd*TWO_PI/7)*radiu*1/3, w2+cos((dd+1)*TWO_PI/7)*radiu*1/3, h2+sin((dd+1)*TWO_PI/7)*radiu*1/3);\n line(w2+cos(dd*TWO_PI/7)*radiu*2/3, h2+sin(dd*TWO_PI/7)*radiu*2/3, w2+cos((dd+1)*TWO_PI/7)*radiu*2/3, h2+sin((dd+1)*TWO_PI/7)*radiu*2/3);\n line(w2+cos(dd*TWO_PI/7)*radiu*1, h2+sin(dd*TWO_PI/7)*radiu*1, w2+cos((dd+1)*TWO_PI/7)*radiu*1, h2+sin((dd+1)*TWO_PI/7)*radiu*1);\n }\n }\n pushMatrix();\n translate(w1, h1);\n stroke(0);\n strokeWeight(1);\n star(0, 0, 0, 70, 7);\n popMatrix();\n pushMatrix();\n translate(w2, h2);\n stroke(0);\n strokeWeight(1);\n star(0, 0, 0, 70, 7);\n popMatrix();\n fill(255);\n ellipse(w3, h3, 140, 140);\n stroke(0);\n strokeWeight(1);\n textSize(20);\n fill(50);\n //label the weekends7\n text(\"bike\", w1+cos(TWO_PI/7)*(radiu+10), h1+sin(TWO_PI/7)*(radiu+10)); \n text(\"bus\", w1+cos(2*TWO_PI/7)*(radiu+55), h1+sin(2*TWO_PI/7)*(radiu+15)); \n text(\"car\", w1+cos(3*TWO_PI/7)*(radiu+40), h1+sin(3*TWO_PI/7)*(radiu+10)); \n text(\"subway\", w1+cos(4*TWO_PI/7)*(radiu+85), h1+sin(4*TWO_PI/7)*(radiu+10)); \n text(\"taxi\", w1+cos(5*TWO_PI/7)*(radiu+10), h1+sin(5*TWO_PI/7)*(radiu+10)); \n text(\"train\", w1+cos(6*TWO_PI/7)*(radiu+10), h1+sin(6*TWO_PI/7)*(radiu+10)); \n text(\"walk\", w1+cos(7*TWO_PI/7)*(radiu+10), h1+sin(7*TWO_PI/7)*(radiu+10)); \n //label the weekdays\n text(\"bike\", w2+cos(TWO_PI/7)*(radiu+10), h2+sin(TWO_PI/7)*(radiu+10)); \n text(\"bus\", w2+cos(2*TWO_PI/7)*(radiu+55), h2+sin(2*TWO_PI/7)*(radiu+15)); \n text(\"car\", w2+cos(3*TWO_PI/7)*(radiu+40), h2+sin(3*TWO_PI/7)*(radiu+10)); \n text(\"subway\", w2+cos(4*TWO_PI/7)*(radiu+85), h2+sin(4*TWO_PI/7)*(radiu+10)); \n text(\"taxi\", w2+cos(5*TWO_PI/7)*(radiu+10), h2+sin(5*TWO_PI/7)*(radiu+10)); \n text(\"train\", w2+cos(6*TWO_PI/7)*(radiu+10), h2+sin(6*TWO_PI/7)*(radiu+10)); \n text(\"walk\", w2+cos(7*TWO_PI/7)*(radiu+10), h2+sin(7*TWO_PI/7)*(radiu+10));\n}", "public void clock(double period);", "void toggleLoop();", "public void tick();", "public void tick();", "public void tick();", "private void setSteine() {\n\t\tfor(int i = 0; i<mulden.length; i++) {\n\t\t\tmulden[i] = 5;\n\t\t}\n\t}", "void incrementTick();", "public void accelerate(){\n speed += 5;\n }", "public void starteSpiel(ActionEvent actionEvent) {\n System.out.println(\"Started\");\n //https://www.programcreek.com/java-api-examples/?api=javafx.animation.AnimationTimer\n //60 fps\n new AnimationTimer() {\n public void handle(long currentNanoTime) {\n // calculate time since last update.\n moveBall();\n }\n }.start(); // Was diese?\n\n\n }", "static double triangleWave(double timeInSeconds, double frequency) {\r\n\t\treturn 0;\r\n\t}", "public void timer() \r\n\t{\r\n\t\tSeconds.tick();\r\n\t \r\n\t if (Seconds.getValue() == 0) \r\n\t {\r\n\t \tMinutes.tick();\r\n\t \r\n\t \tif (Minutes.getValue() == 0)\r\n\t \t{\r\n\t \t\tHours.tick();\r\n\t \t\t\r\n\t \t\tif(Hours.getValue() == 0)\r\n\t \t\t{\r\n\t \t\t\tHours.tick();\r\n\t \t\t}\r\n\t \t}\r\n\t }\t\t\r\n\t \r\n\t updateTime();\r\n\t }", "private void loop() {\r\n\t\tfloat elapsed;\r\n\t\tfloat accumulated = 0f;\r\n\t\tfloat interval = 1f / TARGET_UPS;\r\n\t\tdouble time;\r\n\t\tdouble lastCall = System.nanoTime();\r\n\t\t\r\n\t\trunning = true;\r\n\t\t//loop while running and the window hasn't received a close command\r\n\t\twhile (running) {\r\n\t\t\ttime = System.nanoTime();\r\n\t\t\t\r\n\t\t\telapsed = (float) ((time-lastCall) / 1e9);\r\n\t\t\tlastCall = time;\r\n\t\t\t\r\n\t\t\taccumulated += elapsed;\r\n\t\t\t\r\n\t\t\twhile (accumulated >= interval) {\r\n\t\t\t\tupdate();\r\n\t\t\t\taccumulated -= interval;\r\n\t\t\t}\r\n\t\t\t//render once per loop, then wait until the render time slot is over before restarting\r\n\t\t\tgame.render();\r\n\t\t\tsync(lastCall/1e9);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "public static void speedup(){\n\t\tif(bossair.periodairinit > Framework.nanosecond){\n\t\t\t\tbossair.periodair-=Framework.nanosecond/18; \n\t\t\t\tbossair.xmoving-=0.03; \n\t\t}\n\t\t\t\n\t}", "void oscillate( float redColor, float greenColor, float blueColor ) {\n\t\t\tr = redColor;\n\t\t\tg = greenColor;\n\t\t\tb = blueColor;\n\t\t}", "private void loopButton(ActionEvent e) {\n if (loop) {\n if (drawPanel.animationDone()) {\n this.tick = 0;\n atTick(this.tick);\n timer.restart();\n }\n }\n }", "void turnTick(Unit unit);", "protected abstract void nextWave();", "void draw(Graphics g, float interp) {\n float x = (float)(Math.sin(angle.x) * amplitude.x);\n //Oscillating on the y-axis\n float y = (float) (Math.sin(angle.y) * amplitude.y);\n \n // Translate (x + width/2)\n x += 250; \n y += 250;\n \n //Drawing the Oscillator as a line connecting a circle \n// g.setColor(Color.BLACK);\n// g.drawLine(250,250, (int)x + 8,(int) y + 8);\n g.setColor(bobColor);\n g.fillOval((int)x,(int) y, 20, 20);\n g.setColor(Color.black);\n g.drawOval((int)x,(int) y, 20, 20);\n }", "void beat();", "public void start() throws InterruptedException {\n for (int i = 0; i < seconds; i--) {\n\t System.out.println(\"\" +seconds ); \n\t \n }\n\t/*\n\t * 3. When the timer is finished, use the playSound method to play a moo\n\t * sound. You can download one from freesound.org, then drag it into\n\t * your default package. Tell the students (by speaking) it's time to walk.\n\t */\n\n}", "public static final float sinh(float x) {\n \t\treturn (MoreMath.pow(MoreMath.E, x) - MoreMath.pow(MoreMath.E, -x)) / 2.0f;\n \t}", "public static float sin(float x) {\n float upper = (PI - x) * 16f * x;\n float lower = 5 * PI * PI - 4f * x * (PI - x);\n return upper / lower;\n\n }", "public void tick() {\r\n\t\thunger += (10 + generateRandom());\r\n\t\tthirst += (10 + generateRandom());\r\n\t\ttemp -= (1 + generateRandom());\r\n\t\tboredom += (1 + generateRandom());\r\n\t\tcageMessiness += (1 + generateRandom());\r\n\t}", "public void tick(){\n\t\ttimer += System.currentTimeMillis() - lastTime;\n\t\tif(timer > speed){\n\t\t\tcurrent = image.next();\n\t\t\ttimer = 0;\n\t\t}\n\t\tlastTime = System.currentTimeMillis();\n\t}", "static double f(double x){\n \treturn Math.sin(x);\r\n }", "private float m87322b(float f) {\n return (float) Math.sin((double) ((float) (((double) (f - 0.5f)) * 0.4712389167638204d)));\n }", "private static float sinLookup(int a) {\r\n return a >= 0 ? sin[a % (modulus)] : -sin[-a % (modulus)];\r\n }", "public void calculateSpeedFunction(double t)\r\n {\n \r\n if(speedChoice == 0) // Constant, positive F\r\n {\r\n Fc = 1.0;\r\n } else if (speedChoice == 1) {\r\n Fc = Math.sin(t/10);\r\n } else if (speedChoice == 2) {\r\n Fc = -1.0; \r\n } else {\r\n for(int i=0; i<pixelsWide; i++) {\r\n for(int j=0; j<pixelsHigh; j++) {\r\n F[i][j] = 1.0;\r\n }\r\n }\r\n }\r\n \r\n }", "private short[] generateSineInTimeDomain(float frequency) {\n short sample[] = new short[sample_size];\n for(int i = 0; i < sample.length; ++i) {\n float currentTime = (float)(i) / samplingRate;\n sample[i] = (short) (Short.MAX_VALUE * sin(Math.PI * 2 * frequency * currentTime));\n }\n return sample;\n }", "public void tick() {\n\t\tmFrameCount++;\n\t\t\n\t\tif (mStopwatch.getElapsedTime() > 1000) {\n\t\t\tmFramesPerSecond = mFrameCount;\n\t\t\tmFrameCount = 0;\n\t\t\t\n\t\t\tmStopwatch.restart();\n\t\t}\n\t}", "public double calculateSine(double angle);", "public static void periodic() {\n a2 = limelightTable.getEntry(\"ty\").getDouble(0); //Sets a2, the y position of the target\n d = Math.round((h2-h1) / Math.tan(Math.toRadians(a1+a2))); //Calculates distance using a tangent\n\n if(m_gamepad.getStartButtonReleased()) { //Reset errorSum to 0 when start is released\n errorSum = 0;\n }\n\n shooting(); //Determine when we should be shooting\n reportStatistics(); //Report telemetry to the Driver Station\n }", "public void tick() {\r\n\t\tif (currentRound != null) {\r\n\r\n\t\t}\r\n\r\n\t\t// if (!currentRound.isRoundCompleted()) {\r\n\t\tif (currentRound != null) {\r\n\t\t\tif (currentRound.isRoundCompleted() && timeBetweenRounds <= 0) {\r\n\t\t\t\tnewRound();\r\n\t\t\t} else {\r\n\t\t\t\tcurrentRound.tick();\r\n\t\t\t}\r\n\t\t}\r\n\t\t// else {\r\n\t\t// newRound(); // Right when the last wave ends the new wave is created\r\n\t\t// }\r\n\r\n\t}", "void tick(long tickSinceStart);", "private double function1(double x) {\n return Math.sin(x)*10;\n }", "protected void smooth() {\n if (!timer.isRunning() || sequence == null) {\n return;\n }\n if (spline == null) {\n spline = Functions.getSpline(sequence, numSplinePoints, 4);\n error = Double.MAX_VALUE;\n establishPairings();\n } else if (error < ERROR_TOLERANCE) {\n if (numSplinePoints <= 4) {\n\tspline = null;\n\terror = Double.MAX_VALUE;\n\ttimer.stop();\n\treturn;\n }\n \n numSplinePoints = Math.min(numSplinePoints - 4, 4);\n error = Double.MAX_VALUE;\n\n spline = Functions.getSpline(sequence, numSplinePoints, 4);\n establishPairings();\n }\n\n error = 0.0;\n int ptCnt = 0;\n for (Pt pt : sequence) {\n Pt destination = (Pt) pt.getAttribute(\"tween\");\n\n if (pt.distance(destination) < 1.0) {\n\tpt.setLocation(destination.getX(), destination.getY());\n } else {\n\tdouble dx = (destination.getX() - pt.getX()) / C;\n\tdouble dy = (destination.getY() - pt.getY()) / C;\n\tpt.setLocation(pt.getX() + dx , pt.getY() + dy);\n\terror += Math.hypot(dx, dy);\n }\n ptCnt++;\n }\n \n }", "public void tick() {\r\n }", "public void circle(int time){\n int[][] ordinance = {{0,-1},{1,0},{0,1},{-1,0}}; \n tMovement = new Timer(time,new ActionListener(){\n private int ordinanceInd = 0;\n private int distance = 1;\n private int[][] moveOrdinance = ordinance; \n\n @Override \n public void actionPerformed(ActionEvent e){\n //update velocity values\n xVel = distance*moveOrdinance[ordinanceInd][0];\n yVel = distance*moveOrdinance[ordinanceInd][1]; \n\n //update image display fields\n if (ordinanceInd == 2){\n direction = Player.SOUTH;\n } else if (ordinanceInd == 1){\n direction = Player.WEST; \n } else if (ordinanceInd == 3){\n direction = Player.EAST; \n } else{\n direction = Player.NORTH; \n }\n displayVal = direction;\n\n //change direction\n ordinanceInd = (ordinanceInd+1)%4;\n }\n\n });\n \n tMovement.setInitialDelay(1);\n tMovement.start();\n tState.start();\n }", "private void pulse()\n {\n }", "public abstract void shake(long ms);", "public void run() {\n\t\tif(y<22)\n\t\t\tgetSoulEater().y+=1;\n\t\telse\n\t\t\tgetSoulEater().y=18;\n\t}", "static void afinar(Instrument1 i) { i.play(Note.MIDDLE_C); }", "public void step(long now) {\n\t}", "private void startClock() {\r\n\t\tTimer timer = new Timer(500, new ActionListener() {\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent theEvent) {\r\n\t\t\t\tadvanceTime();\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n timer.setRepeats(true);\r\n timer.setCoalesce(true);\r\n timer.setInitialDelay(0);\r\n timer.start();\r\n\t}", "public void wave() {\n leanRight = !leanRight;\n }", "@Override\n public void runEffect(double[] fft) {\n\n\n for(int i = fft.length - 1; i - pitchMove >= 0; i--)\n {\n fft[i] = fft[i - pitchMove];\n }\n for(int i = 0; i < pitchMove; i++)\n fft[i] = fft[i]*0.5;\n// for(int i = 0, k = 0; i < fft.length; i+=2)\n// {\n// if(i < fft.length/2) {\n// fft2[fft.length / 2 + k - 1] = (fft[fft.length / 2 + i] + fft[fft.length / 2 + i]) / 2;\n// fft2[fft.length / 2 - k - 1] = (fft[fft.length / 2 - i] + fft[fft.length / 2 - i]) / 2;\n// }\n// //fft2[k] = 0;\n// //fft2[fft2.length - k -1] = 0;\n// k++;\n// }\n /*for(int i = 0; i < fft.length; i++)\n {\n fft[i] = Math.abs(fft[i]);\n if(fft[i] < 2){\n fft[i] = 0;\n }\n //Log.d(\"Log\", fft[i] + \" \");\n }*/\n }", "public void frameBackward()\n{\n stop();\n setTime(getTime() - getInterval());\n}", "public void tick() {\n\t}", "public void tick() {\n\t}", "public abstract void steer(double angle);", "public void tick() \n {\n //Einfache Bildschirmausgabe. Kann spaeter in Subklasse beliebig ueberschreiben werden.\n zaehler++;\n zaehler = zaehler % 2;\n if ( zaehler == 1 ) \n {\n System.out.println( \"Tick!\" );\n }\n else \n {\n System.out.println( \"Tack!\" );\n }\n }", "public void onTick(long i) {\n life--;\n y++;\n }", "public void doubleSpeed()\r\n {\r\n \tthis.speed= speed-125;\r\n \tgrafico.setVelocidad(speed);\r\n }", "public void setFrameRate(float aValue) { setInterval(Math.round(1000/aValue)); }", "@Override\n public void run() {\n ElapsedTime time = new ElapsedTime();\n time.reset();\n sleep(3000);\n sh.hitRing();\n sleep(600);\n sh.hitRing();\n sleep(600);\n sh.hitRing();\n sleep(600);\n //sh.pivotStop.setPosition(.55);\n sh.hitRing();\n sleep(500);\n //sh.pivotDown();\n sh.hitRing();\n sleep(500);\n sh.withdraw();\n sh.lift.setPower(0);\n sh.lift.setPower(0);\n wobble.wobbleUp();\n sh.pivotStop.setPosition(1);\n loop.end();\n\n\n }", "@Override\n public void run()\n {\n while(bomb[0][0].getyAxis()<1000)\n {\n for(int i=0; i<bomb.length; i++)\n {\n for(int j=0; j<bomb[i].length; j++)\n {\n bomb[i][j].setyAxis(bomb[i][j].getyAxis()+10);\n }\n }\n try \n {\n Thread.sleep(1000);\n } \n catch (InterruptedException ex) \n {\n ex.printStackTrace();\n }\n fl.repaint();\n }\n }", "public void cycle(){\r\n \r\n \r\n if(collision()){\r\n endtime = 1;\r\n animator.stop();\r\n }else{\r\n if(max_h == false)\r\n ch.v--;\r\n if(ch.v == 150)\r\n max_h = true;\r\n\r\n if(max_h == true & ch.v <= 330){\r\n ch.v++;\r\n if(ch.v == 330){\r\n done = true;\r\n \r\n }\r\n }\r\n }\r\n }", "public static void move()\n\t{\n\t\tswitch(step)\n\t\t{\n\t\t\tcase 0:\n\t\t\t\ttimer.start();\n\t\t\t\tstep = 1;\n\t\t\tbreak;\n\t\t\t// 1. Right wheels forward\n\t\t\tcase 1:\n\t\t\t\tif(timer.get() < time)\n\t\t\t\t{\n\t\t\t\t\tsetSpeed(0, .5);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttimer.reset();\n\t\t\t\t\tstep = 2;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\ttimer.start();\n\t\t\t\tstep = 3;\n\t\t\tbreak;\n\t\t\t// 2. Right wheels back\n\t\t\tcase 3:\n\t\t\t\tif(timer.get() < time)\n\t\t\t\t{\n\t\t\t\t\tsetSpeed(0, -.5);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttimer.reset();\n\t\t\t\t\tstep = 4;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\ttimer.start();\n\t\t\t\tstep = 5;\n\t\t\tbreak;\n\t\t\t// 3. Left wheels forward\n\t\t\tcase 5:\n\t\t\t\tif(timer.get() < time)\n\t\t\t\t{\n\t\t\t\t\tsetSpeed(.5, 0);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttimer.reset();\n\t\t\t\t\tstep = 6;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\ttimer.start();\n\t\t\t\tstep = 7;\n\t\t\tbreak;\n\t\t\t// 4. Left wheels back\n\t\t\tcase 7:\n\t\t\t\tif(timer.get() < time)\n\t\t\t\t{\n\t\t\t\t\tsetSpeed(-.5, 0);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttimer.reset();\n\t\t\t\t\tstep = 8;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 8:\n\t\t\t\ttimer.start();\n\t\t\t\tstep = 9;\n\t\t\tbreak;\n\t\t\t// 5. Intake pick up\n\t\t\tcase 9:\n\t\t\t\tif(timer.get() < time)\n\t\t\t\t{\n\t\t\t\t\tsetSpeed(0, 0);\n\t\t\t\t\tshoot(.5);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttimer.reset();\n\t\t\t\t\tstep = 10;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 10:\n\t\t\t\ttimer.start();\n\t\t\t\tstep = 11;\n\t\t\tbreak;\n\t\t\t// 6. Intake shoot\n\t\t\tcase 11:\n\t\t\t\tif(timer.get() < time)\n\t\t\t\t{\n\t\t\t\t\tsetSpeed(0, 0);\n\t\t\t\t\tpickUp(.5);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttimer.reset();\n\t\t\t\t\tstep = 12;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\t// Stop and reset everything\n\t\t\tcase 12:\n\t\t\t\tsetSpeed(0, 0);\n\t\t\t\tpickUp(0);\n\t\t\t\tshoot(0);\n\t\t\t\ttimer.reset();\n\t\t\tbreak;\n\t\t}\n\t}", "@Override\r\n\tpublic void tick() {\r\n\t\tx+=speed;\r\n\t}", "public void tick()\r\n\t{\r\n\t\tduration = (int) (((Sys.getTime() - lastCall) * resolution) / Sys\r\n\t\t\t\t.getTimerResolution());\r\n\t\tlastCall = Sys.getTime();\r\n\t}", "public void flash(){\n //stop movement\n tState.stop();\n tMovement.stop();\n\n //store final image\n BufferedImage finalState = display; \n\n //update position for \"flash\" animation\n int xFin = x - 9;\n int yFin = y - 9; \n\n tEnd = new Timer(40,new ActionListener(){\n\n private int i = 0;\n\n @Override\n public void actionPerformed(ActionEvent e){\n x = xFin;\n y = yFin;\n \n BufferedImage b = new BufferedImage(50,50,BufferedImage.TYPE_INT_ARGB);\n Graphics g = b.getGraphics();\n if (i < 10){ \n BufferedImage img = flash[i];\n g.drawImage(img,25-img.getWidth()/2,25-img.getHeight()/2,null); \n g.drawImage(finalState,9,9,null);\n } else if (i == 20){\n tEnd.stop();\n caught = true;\n System.out.println(\"You caught \"+pok.getName().toUpperCase()+\"!\");\n } else {\n BufferedImage img = flash[19-i];\n g.drawImage(img,25-img.getWidth()/2,25-img.getHeight()/2,null); \n }\n g.dispose(); \n display = b;\n i++;\n } \n });\n tEnd.start();\n }", "private double[] generateSinusoidalTone(int sinusoidCount, double frequency, double sampleRate) {\n int size = (int) Math.round(sinusoidCount * sampleRate / frequency);\n double twoPi = 2 * Math.PI;\n double[] audio = new double[size]; \n for(int i = 0; i < audio.length; i++) {\n double time = i / sampleRate;\n audio[i] = Math.sin(twoPi * frequency * time);\n }\n return audio;\n }", "public static double sin(double a) {\r\n if (a == Double.NEGATIVE_INFINITY || !(a < Double.POSITIVE_INFINITY)) {\r\n return Double.NaN;\r\n }\r\n\r\n final double PI = (22/7);\r\n\r\n a %= 2 * PI;\r\n\r\n /* The following if statement checks whether a is a negative angle\r\n * Converts it to positive angle if true\r\n */\r\n if (a < 0) {\r\n a = 2 * PI - a;\r\n }\r\n\r\n /* The following if statement checks whether sine term is an odd function\r\n * Changes the sign to -ve if true\r\n */\r\n int sign = 1;\r\n if (a > PI) {\r\n a -= PI;\r\n sign = -1;\r\n }\r\n\r\n final int PRECISION = 50;\r\n double temp = 0;\r\n\r\n /* The following for statement calculates the sum of the terms\r\n * Until the set precision is reached\r\n */\r\n for (int i = 0; i <= PRECISION; i++) {\r\n temp += Math.pow(-1, i) * (Math.pow(a, 2 * i + 1) / factorial(2 * i + 1));\r\n }\r\n\r\n return sign * temp;\r\n\r\n }", "public void tick(double dt) {\n }", "protected abstract void tick();", "public static double \t\tsinc(double _x) {\n\t\treturn (Math.abs(_x) < 1e-40) ? 1.0D : Math.sin(_x) / _x;\n\t}", "public static double \t\tsinh(double _x) {\n\t\treturn 0.5D * (Math.exp(_x) - Math.exp(- _x));\n\t}", "public static double sin(double x) // Using a Chebyshev-Pade approximation\n {\n int n=(int)(x/PI2)+1; // reduce to the 4th and 1st quadrants\n if(n<1)n=n-1;\n if ((n&2)==0) x=x-(n&0xFFFFFFFE)*PI2; // if it from the 2nd or the 3rd quadrants\n else x=-(x-(n&0xFFFFFFFE)*PI2);\n\n double x2=x*x;\n return (0.9238318854f-0.9595498071e-1f*x2)*x/(0.9238400690f+(0.5797298195e-1f+0.2031791179e-2f*x2)*x2);\n }", "public void gameLoop() {\r\n if (up) {\r\n ear1Y--;\r\n ear2Y--;\r\n if (ear1Y == 190) {\r\n down = true;\r\n up = false;\r\n }\r\n }\r\n\r\n if (down) {\r\n ear1Y++;\r\n ear2Y++;\r\n if (ear1Y == 250) {\r\n down = false;\r\n up = true;\r\n\r\n }\r\n }\r\n }", "void simulationSpeedChange(int value);" ]
[ "0.7229713", "0.6593823", "0.64583266", "0.6256121", "0.61167103", "0.60864854", "0.600943", "0.59797937", "0.5962182", "0.59136385", "0.5897111", "0.5852728", "0.58383286", "0.58383286", "0.57960033", "0.57659966", "0.57515186", "0.57378846", "0.57243776", "0.5713051", "0.5704899", "0.5703116", "0.56834155", "0.5675016", "0.56729835", "0.5670513", "0.5669813", "0.5668194", "0.56663805", "0.56619334", "0.5640035", "0.5627669", "0.5625496", "0.5615352", "0.5615352", "0.5615352", "0.56122774", "0.5606133", "0.560571", "0.5595711", "0.55880487", "0.5579212", "0.5578117", "0.5569575", "0.556711", "0.55660075", "0.5564132", "0.55587554", "0.55386627", "0.5527963", "0.5525247", "0.5515207", "0.5514698", "0.55102", "0.5509768", "0.5483271", "0.5482183", "0.54815805", "0.5474181", "0.5472292", "0.54649025", "0.5463831", "0.5463629", "0.5461394", "0.54538924", "0.5438114", "0.54331493", "0.54214144", "0.54207546", "0.5420268", "0.54119176", "0.54075027", "0.5397604", "0.53892624", "0.53803104", "0.53802407", "0.5375554", "0.5373967", "0.53717923", "0.53717923", "0.5369766", "0.5366928", "0.5362713", "0.53587127", "0.5358501", "0.53582793", "0.5332603", "0.5332204", "0.5331584", "0.53189605", "0.5312051", "0.5311906", "0.53104264", "0.53057057", "0.5284198", "0.5282782", "0.5274259", "0.52735907", "0.52666175", "0.526543", "0.5264587" ]
0.0
-1
Movement for the asteroid. Will only fall straight down at constant speed.
private void fall() { if (handler.getWorld().AsteroidCount < 200) { deltaX = 0; deltaY = speed; } else { if (x < player.getX()) { deltaX = speed; deltaY = speed; } if (x > player.getX()+player.getWidth()) { deltaX = -speed; deltaY = speed; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void move()\n {\n move(WALKING_SPEED);\n }", "public void moveAsteroidUpandDown() {\t\t\t\r\n\t\tsetX(this.getX()+1);\r\n\t}", "public void move() {\n\t\tsuper.move();\n\t\t\n\t\t// if the slime hit the ground\n\t\tif (y >= 64*2) {\n\t\t\t// begin sliding (only needed for the first time he falls)\n\t\t\tif (accel_x != .25 && accel_x != duck_accel_x) accel_x = .25;\n\t\t\t\n\t\t\t// allow player to jump, since vel_y = 0 stops the jump\n\t\t\tif (jumping)\n\t\t\t\tjumping = false;\n\t\t\telse\n\t\t\t\tvel_y = 0;\n\t\t\t\n\t\t\t// slime is slightly lower while ducking\n\t\t\tif (ducking)\n\t\t\t\ty = 64*2+20;\n\t\t\telse\n\t\t\t\ty = 64*2;\n\t\t}\n\t\t\n\t\t// bounce if the slime hit the top\n\t\tif (y < 0) vel_y *= -1;\n\t}", "public void move() { \n\t\tSystem.out.println(\"MOVING\");\n\t\tswitch(direction) {\n\t\t\tcase NORTH: {\n\t\t\t\tyloc -= ySpeed;\n\t\t\t}\n\t\t\tcase SOUTH: {\n\t\t\t\tyloc+= xSpeed;\n\t\t\t}\n\t\t\tcase EAST: {\n\t\t\t\txloc+= xSpeed;\n\t\t\t}\n\t\t\tcase WEST: {\n\t\t\t\txloc-= xSpeed;\n\t\t\t}\n\t\t\tcase NORTHEAST: {\n\t\t\t\txloc+=xSpeed;\n\t\t\t\tyloc-=ySpeed;\n\t\t\t}\n\t\t\tcase NORTHWEST: {\n\t\t\t\txloc-=xSpeed;\n\t\t\t\tyloc-=ySpeed;\n\t\t\t}\n\t\t\tcase SOUTHEAST: {\n\t\t\t\txloc+=xSpeed;\n\t\t\t\tyloc+=ySpeed;\n\t\t\t}\n\t\t\tcase SOUTHWEST: {\n\t\t\t\txloc-=xSpeed;\n\t\t\t\tyloc+= ySpeed;\n\t\t\t}\n\t\t}\n\t}", "public void move() {\n\t\tthis.position.stepForwad();\n\t\tthis.position.spin();\n\t}", "@Override\n public void move() {\n switch (direction){\n case SOUTH:\n position.setY(position.getY() + currentSpeed);\n break;\n case NORTH:\n position.setY(position.getY() - currentSpeed);\n break;\n case WEST:\n position.setX(position.getX() - currentSpeed);\n break;\n case EAST:\n position.setX(position.getX() + currentSpeed);\n }\n }", "@Override\n\tpublic void move() {\n\t\theading = Heading.randHeading();\n\t\tif (heading == Heading.NORTH) {\n\t\t\tthis.location.y -= Utilities.rng.nextInt(Simulation.WORLD_SIZE/10);\n\t\t} else if (heading == Heading.EAST) {\n\t\t\tthis.location.x += Utilities.rng.nextInt(Simulation.WORLD_SIZE/10);\n\t\t} else if (heading == Heading.SOUTH) {\n\t\t\tthis.location.y += Utilities.rng.nextInt(Simulation.WORLD_SIZE/10);\n\t\t} else if (heading == Heading.WEST) {\n\t\t\tthis.location.x -= Utilities.rng.nextInt(Simulation.WORLD_SIZE/10);\n\t\t}\n\t\tadjustPos();\n\t\tinfect();\n\t}", "public void move()\n {\n double angle = Math.toRadians( getRotation() );\n int x = (int) Math.round(getX() + Math.cos(angle) * WALKING_SPEED);\n int y = (int) Math.round(getY() + Math.sin(angle) * WALKING_SPEED);\n setLocation(x, y);\n }", "public void move() {\r\n if (y > HEIGHT)\r\n y = initialY;\r\n y = y + speed;\r\n }", "public void move() {\n\t\tdouble xv = 0;\r\n\t\tdouble yv = 0;\r\n\t\t//this method allows the entity to hold both up and down (or left and right) and not move. gives for smooth direction change and movement\r\n\t\tif (moveRight) {\r\n\t\t\txv+=getSpeed();\r\n\t\t\torientation = Orientation.EAST;\r\n\t\t}\r\n\t\tif (moveLeft) {\r\n\t\t\txv-=getSpeed();\r\n\t\t\torientation = Orientation.WEST;\r\n\t\t}\r\n\t\tif (moveUp)\r\n\t\t\tyv-=getSpeed();\r\n\t\tif (moveDown)\r\n\t\t\tyv+=getSpeed();\r\n\t\tif (!doubleEquals(xv,0) || !doubleEquals(yv,0)) {\r\n\t\t\t((Player)this).useMana(0.1);\r\n\t\t\tImageIcon img = new ImageIcon(\"lib/assets/images/fireball.png\");\r\n\t\t\tBufferedImage image = new BufferedImage(32,32,BufferedImage.TYPE_INT_ARGB);\r\n\t\t\tGraphics g = image.getGraphics();\r\n\t\t\tg.drawImage(img.getImage(), 0, 0, image.getWidth(), image.getHeight(), null);\r\n\t\t\tColor n = loop[ind%loop.length];\r\n\t\t\tind++;\r\n\t\t\timage = ImageProcessor.scaleToColor(image, n);\r\n\t\t\t//PopMessage.addPopMessage(new PopMessage(image,getX(),getY()));\r\n\t\t}\r\n\t\telse\r\n\t\t\t((Player)this).useMana(-0.1);\r\n\t\tmove(xv,yv);\r\n\t}", "@Override\n\tpublic void movment() {\n\t\tif(ghost.shot && fired) {\n\t\t\tif(direction == RIGHT)\n\t\t\t\tmove(RIGHT);\n\t\t\telse if(direction == LEFT)\n\t\t\t\tmove(LEFT);\n\t\t\telse if(direction == UP)\n\t\t\t\tmove(UP);\n\t\t\telse if(direction == DOWN)\n\t\t\t\tmove(DOWN);\n\t\t}\n\t}", "public abstract void move(int direction, double speed);", "public void move() {\n spriteBase.move();\n\n Double newX = spriteBase.getXCoordinate() + spriteBase.getDxCoordinate();\n Double newY = spriteBase.getYCoordinate() + spriteBase.getDyCoordinate();\n\n if (!newX.equals(spriteBase.getXCoordinate())\n || !newY.equals(spriteBase.getYCoordinate())) {\n Logger.log(String.format(\"Monster moved from (%f, %f) to (%f, %f)\",\n spriteBase.getXCoordinate(), spriteBase.getYCoordinate(), newX, newY));\n }\n }", "@Override\n\tpublic void update() {\n\t\tkeyFrame++;\n\t\tif(keyFrame > 60)\n\t\t\tsetDead(true);\n\t\tif(move)\n\t\t\tif(!isDead())\n\t\t\t\tpositionY += getSpeed();\n\t}", "private void move(){\n \n currentAnimation = idleDown;\n \n if(playerKeyInput.allKeys[VK_W]){\n int ty = (int) (objectCoordinateY - speed + bounds.y) / 16;\n \n if(!collisionDetection((int) (objectCoordinateX + bounds.x)/16, ty)){\n objectCoordinateY -= speed;\n currentAnimation = upWalk;\n }\n } \n \n if(playerKeyInput.allKeys[VK_S]){\n int ty = (int) (objectCoordinateY + speed + bounds.y + bounds.height) / 16;\n if(!collisionDetection((int) (objectCoordinateX + bounds.x)/16, ty)){\n objectCoordinateY += speed;\n currentAnimation = downWalk;\n }\n } \n \n if(playerKeyInput.allKeys[VK_A]){\n int tx = (int) (objectCoordinateX - speed + bounds.x) / 16;\n if(!collisionDetection(tx, (int) (objectCoordinateY + bounds.y)/16)){\n objectCoordinateX -= speed;\n currentAnimation = sideWalkLeft;\n }\n } \n \n if(playerKeyInput.allKeys[VK_D]){\n int tx = (int) (objectCoordinateX + speed + bounds.x + bounds.width) / 16;\n if(!collisionDetection(tx, (int) (objectCoordinateY + bounds.y)/16)){\n objectCoordinateX += speed;\n currentAnimation = sideWalkRight;\n }\n } \n \n if(playerKeyInput.allKeys[VK_E]){\n currentAnimation = pickUp;\n } \n }", "private void move() {\n acceleration.accelerate(velocity, position);\r\n }", "public void move() {\n\t\tdy += acceleration;\n\t\tupdateTail();\n\t\ty += dy;\n\t}", "@Override\n public void move() {\n int speed = this.getSpeed();\n this.setSpeed(speed - 1);\n\n if (this.getSpeed() == 0) {\n super.move();\n this.setSpeed(1);\n }\n }", "@Override\n\tpublic void moveCharacter(){\n\t\tif (leftBlocked || rightBlocked) {\n\t\t\txSpeed = 0;\n\t\t}\n\t\t\n\t\t/* Applies gravity if falling */\n\t\tif ( isFalling() && this.getCurrentAnimation().isLastFrame() ) {\n\t\t\tfallingSpeed = fallingSpeed + gravity;\n\t\t\tint newySpeed = fallSpeed + fallingSpeed;\n\t\t\t\n//\t\t\tSystem.out.println(\"newySpeed: \" + newySpeed);\n\t\t\t\n\t\t\tif (newySpeed > maxySpeed) {\n\t\t\t\tnewySpeed = maxySpeed;\n\t\t\t}\n\t\t\tySpeed = newySpeed;\n\t\t\t\n\t\t\t// Applies horizontal speed to the fall\n\t\t\tif ( !isStraightFall() && (!isFallCollided() && !isDeadlyFall()) ) {\n\t\t\t\t\n\t\t\t\tif ( isSafeFall() ) {\n\t\t\t\t\t\n\t\t\t\t\tif (this.getOrientation().equals(\"left\")) {\n\t\t\t\t\t\txFrameOffset = -fallxSpeed;\n\t\t\t\t\t}\n\t\t\t\t\telse if (this.getOrientation().equals(\"right\")) {\n\t\t\t\t\t\txFrameOffset = fallxSpeed;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if ( isRiskyFall() ) {\n\t\t\t\t\t\n\t\t\t\t\tif (this.getOrientation().equals(\"left\")) {\n\t\t\t\t\t\txFrameOffset = -fallxSpeed/2;\n\t\t\t\t\t}\n\t\t\t\t\telse if (this.getOrientation().equals(\"right\")) {\n\t\t\t\t\t\txFrameOffset = fallxSpeed/2;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if ( isFallCollided() ) {\n\t\t\t\txFrameOffset = 0;\n\t\t\t}\n\t\t}\n\t\telse if ( isGrounded() && !this.getCurrentAnimation().getId().equals(\"stairs\")) {\n\n\t\t\t/* Character is on the ground */\n\t\t\tySpeed = 0;\n\t\t\tyFrameOffset = 0;\n\t\t\tfallingSpeed = 0;\n\t\t}\n\t\t\n\t\t/* Moves the character and its bounding box if he is not at the edge*/\n\t\tif (!this.isBlocked()) {\n\t\t\tsetX(x + xSpeed + xFrameOffset);\n\t\t\tsetY(y + ySpeed + yFrameOffset);\n\t\t\tboundingBox.translate(xSpeed + xFrameOffset, ySpeed + yFrameOffset);\n\t\t}\n\t\t\n\t\t/* Play music */\n\t\tif(!sound.equals(\"\")){\n\t\t\tloader.getSound(sound).play();;\n\t\t}\n\t}", "public void move()\n {\n x = x + unitVector.getValue(1)*speed;\n y = y + unitVector.getValue(2)*speed;\n }", "public void up() {dy = -SPEED;}", "public void move() {\n\t\tthis.move(velocity.x, velocity.y);\n\t}", "@Override\n public void movement() {\n if (isAlive()) {\n //Prüfung ob A oder die linke Pfeiltaste gedrückt ist\n if (Keyboard.isKeyDown(KeyEvent.VK_LEFT) || Keyboard.isKeyDown(KeyEvent.VK_A)) {\n //Änder die X Position um den speed wert nach link (verkleinert sie)\n setPosX(getPosX() - getSpeed());\n //Prüft ob der Spieler den linken Rand des Fensters erreicht hat\n if (getPosX() <= 0) {\n //Setzt die X Position des Spielers an den Rand des Fensters zurück\n setPosX(0);\n }\n }\n //Prüfung ob D oder die rechte Pfeiltaste gedrückt ist\n if (Keyboard.isKeyDown(KeyEvent.VK_RIGHT) || Keyboard.isKeyDown(KeyEvent.VK_D)) {\n //Änder die X Position um den speed wert nach rechts (vergrößert sie)\n setPosX(getPosX() + getSpeed());\n //Prüft ob der Spieler den rechten Rand des Fensters erreicht hat\n if (getPosX() >= Renderer.getWindowSizeX() - getWight() - 7) {\n //Setzt die X Position des Spielers an den Rand des Fensters zurück\n setPosX(Renderer.getWindowSizeX() - getWight() - 7);\n }\n }\n //Aktualsiert die Hitbox\n setBounds();\n }\n }", "@Override\n public void move() {\n if (movementCooldown > 0) {\n movementCooldown --;\n } else {\n super.move();\n movementCooldown = MAX_MOVEMENT_COOLDOWN;\n }\n }", "private void move()\n\t{\n\t\tif(moveRight)\n\t\t{\n\t\t\tif(position.getX() + speedMovement <= width)\n\t\t\t{\n\t\t\t\tposition.setX(position.getX() +speedMovement+speedBoost);\n\t\t\t\tmoveRight = false;\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\t\n\t\tif(moveLeft)\n\t\t{\n\t\t\tif(position.getX() - speedMovement > 0)\n\t\t\t{\n\t\t\t\tposition.setX(position.getX() -speedMovement - speedBoost + gravitationalMovement);\n\t\t\t\tmoveLeft = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t/*\n\t\t * If a gravitational field is pushing the ship, set the movement accordingly\n\t\t */\n\t\tif(gravitationalMovement>0)\n\t\t{\n\t\t\tif(position.getX()+gravitationalMovement <= width)\n\t\t\t\tposition.setX(position.getX() + gravitationalMovement);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(position.getX() + gravitationalMovement > 0)\n\t\t\t\tposition.setX(position.getX() + gravitationalMovement);\n\t\t}\n\t}", "public void move() {\n\t\tif (type.equals(\"Fast\")) {\n\t\t\tspeed = 2;\n\t\t}else if (type.equals(\"Slow\")){\n\t\t\tspeed = 4;\n\t\t}\n\t\t\n\t\tif (rand.nextInt(speed) == 1){\n\t\t\tif (currentLocation.x - ChristopherColumbusLocation.x < 0) {\n\t\t\t\tif (currentLocation.x + 1 < oceanMap.getDimensions()) {\n\t\t\t\t\tcurrentLocation.x++;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (currentLocation.x != 0) {\t\t\t\t\n\t\t\t\t\tcurrentLocation.x--;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (currentLocation.y - ChristopherColumbusLocation.y < 0) {\n\t\t\t\tif (currentLocation.y + 1 < oceanMap.getDimensions()) {\n\t\t\t\t\tcurrentLocation.y++;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (currentLocation.y != 0) {\n\t\t\t\t\tcurrentLocation.y--;\n\t\t\t\t}\n\t\t\t} \n\t\t}\n\t}", "public abstract void moveDown(int speed);", "public void move() {\r\n\t\tx = x + speed;\r\n\t}", "private void movement()\n {\n if(gameOverBool==false)\n {\n if(Greenfoot.isKeyDown(\"up\"))\n {\n setLocation(getX(), getY()-6);\n setRotation(2);\n } else if (Greenfoot.isKeyDown(\"down\")){\n setLocation(getX(), getY()+6); \n setRotation(8);\n } else{\n setRotation(5);\n } \n }\n }", "public void move()\n {\n if (!alive) {\n return;\n }\n\n if (speedTimer > 0) {\n speedTimer --;\n } else if (speedTimer == 0 && speed != DEFAULT_SPEED) {\n speed = DEFAULT_SPEED;\n }\n\n Location last = playerLocations.get(playerLocations.size()-1);\n Location next = null;\n\n // For the speed, iterate x blocks between last and next\n\n if (direction == UPKEY)\n {\n next = getLocation(last.getX(), (int)(last.getY() - speed * getPixelSize()));\n } else if (direction == DOWNKEY)\n {\n next = getLocation(last.getX(), (int)(last.getY() + speed * getPixelSize()));\n } else if (direction == LEFTKEY)\n {\n next = getLocation((int)(last.getX() - speed * getPixelSize()), last.getY());\n } else if (direction == RIGHTKEY)\n {\n next = getLocation((int)(last.getX() + speed * getPixelSize()), last.getY());\n }\n\n ArrayList<Location> line = getLine(last, next);\n\n if (line.size() == 0) {\n gameOver();\n return;\n }\n\n for (Location loc : line) {\n if (checkCrash (loc)) {\n gameOver();\n return;\n } else {\n // Former bug: For some reason when a player eats a powerup a hole appears in the line where the powerup was.\n Location l2 = getLocation(loc.getX(), loc.getY());\n l2.setType(LocationType.PLAYER);\n l2.setColor(this.col);\n\n playerLocations.add(l2);\n getGridCache().add(l2);\n }\n }\n }", "void startMovement();", "public void move ()\n\t{\n\t\t//Let's try this...\n\t\tchangeFallSpeed (turnInt);\n\t\t\n\t\t\n\t\tsetX_Pos (getX_Pos () + getHSpeed ());\t//hSpeed is added onto x_pos\n\t\t//The xDimensions are updated by having hSpeed added onto them.\n\t\txDimension1 += getHSpeed ();\n\t\txDimension2 += getHSpeed ();\n\t\txDimension3 += getHSpeed ();\n\t\t\n\t\t//The if statement below ensures that the PaperAirplane does not move\n\t\t//after reaching the 300 y point. The walls around the PaperAirplane,\n\t\t//however, start to move up, creating the illusion that the\n\t\t//PaperAirplane is still falling.\n\t\tif (getY_Pos () < 300)\n\t\t{\n\t\t\tsetY_Pos (getY_Pos () + getVSpeed ());//vSpeed is added onto y_pos\n\t\t\t//The yDimensions are updated by having vSpeed added onto them.\n\t\t\tyDimension1 += getVSpeed ();\n\t\t\tyDimension2 += getVSpeed ();\n\t\t\tyDimension3 += getVSpeed ();\n\t\t}\n\t}", "@Override\n public void move(){\n setDirectionSpeed(180, 7);\n this.moveTowardsAPoint(target.getCenterX(), target.getCenterY());\n }", "public void moving()\n {\n if(onPlatform()&&endPlatform()){\n direction();\n }\n if(onPlatform()&&!endPlatform()){\n changeDirection();\n direction();\n }\n collideMoveLocation(horzVelocity,1);\n //sharaz\n if(isTouching(PushObject.class)){\n changeDirection();\n direction();\n }\n \n \n }", "@Override\n\tpublic void step() {\n\t\tthis.y-= speed;\t\n\t}", "public Asteroid(){\n\t\t\n\t\t//call Sprite constructor\n\t\tsuper();\n for(int i =0;i<arrowAmount;i++)\n {\n arrows.add(new Arrow(Game.R.nextInt(4),Game.R.nextBoolean()));\n }\n\t\tinitialize();\n\t\tint nDY = Game.R.nextInt(speedLevel);\n\t\tsetDeltaY((double)nDY*0.03*CommandCenter.getLevel()+1);\n\n\n\t\t\n\n\t}", "public void move() {\r\n posX += movementX;\r\n posY += movementY;\r\n anchorX += movementX;\r\n anchorY += movementY;\r\n }", "public void move() {\n super.move(DIRECTION.getRandom());\n }", "public void move() {\n float xpos = thing.getX(), ypos = thing.getY();\n int xdir = 0, ydir = 0;\n if (left) xdir -= SPEED; if (right) xdir += SPEED;\n if (up) ydir -= SPEED; if (down) ydir += SPEED;\n xpos += xdir; ypos += ydir;\n\n VeggieCopter game = thing.getGame();\n int w = game.getWindowWidth(), h = game.getWindowHeight();\n int width = thing.getWidth(), height = thing.getHeight();\n if (xpos < 1) xpos = 1; if (xpos + width >= w) xpos = w - width - 1;\n if (ypos < 1) ypos = 1; if (ypos + height >= h) ypos = h - height - 1;\n thing.setPos(xpos, ypos);\n }", "public void move() {\n energy -= 0.03;\n if (energy < 0) {\n energy = 0;\n }\n }", "public void move() {\n // Check for collisions and reverse deltas accordingly\n if (collisionWithHorizontalWall()) {\n isFacingRight = !isFacingRight;\n dx *= -1;\n }\n if (collisionWithVerticalWall()) {\n dy *= -1;\n }\n \n // Handle actual movement by updating positional values\n if (dx == 0 || dy == 0) {\n xPos += dx;\n yPos += dy;\n } else {\n // Turn diagonal delta movement into 1 instead of sqrt(2)\n xPos += DIAGONAL_DIVISOR * dx;\n yPos += DIAGONAL_DIVISOR * dy;\n }\n }", "@Override\n\tpublic void update() {\n\t\tposX -= ninja.getSpeedX();\n\t\t\n\t}", "public void basicMotion() {\r\n\t\tPVector v = behavior.behavior(obj.getMotion());\r\n\t\tobj.getMotion().setVelocity(v);\r\n\t\t\r\n\t\tobj.getMotion().kinematicUpdate();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tfloat x = obj.getMotion().getPosition().x;\r\n\t\tfloat y = obj.getMotion().getPosition().y;\r\n\t\tif(y <= turnCornerMin ) {\r\n\t\t\tbehavior.setDest(turnCornerMax,turnCornerMin);\r\n\t\t\t\t\r\n\t\t}\r\n\t\tif(x >= turnCornerMax) {\r\n\t\t\tbehavior.setDest(turnCornerMax, turnCornerMax);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif(y >= turnCornerMax) {\r\n\t\t\tbehavior.setDest(turnCornerMin, turnCornerMax);\r\n\t\t}\r\n\t\t\r\n\t\tif(x < turnCornerMin) {\r\n\t\t\treturn;\r\n\t\t\t\r\n\t\t}\r\n\t\t\t\r\n\t\tobj.updateObjKinematics(x, y, obj.getMotion().getOrientation());\r\n\t}", "public void move() {\n health -= 2; //health decrement\n age++; //age increment\n if (yPos > 300) {\n speed += 3;\n }\n boolean canMove = false;\n int distancex = (int) (Math.random() * speed);\n int distancey = (int) (Math.random() * speed);\n int counterx = r.nextInt(2);\n int countery = r.nextInt(2);\n while (!canMove) {\n distancex = (int) (Math.random() * speed);\n distancey = (int) (Math.random() * speed);\n counterx = r.nextInt(2);\n countery = r.nextInt(2);\n if (counterx == 0 && this.xPos - distancex > 0\n && countery == 0 && this.yPos - distancey > 0) {\n canMove = true;\n } else if (counterx == 1 && this.xPos + distancex < 510\n && countery == 1 && this.yPos + distancey < 530) {\n canMove = true;\n }\n }\n if (counterx == 0 && countery == 0) {\n xPos -= distancex;\n yPos -= distancey;\n } else if (counterx == 0 && countery == 1) {\n xPos -= distancex;\n yPos += distancey;\n } else if (counterx == 1 && countery == 0) {\n xPos += distancex;\n yPos -= distancey;\n } else if (counterx == 1 && countery == 1) {\n xPos += distancex;\n yPos += distancey;\n }\n }", "public void move()\n {\n xPosition = xPosition + xSpeed;\n yPosition = yPosition + ySpeed;\n draw();\n if (xPosition >= rightBound - diameter)\n {\n xSpeed = -(xSpeed);\n\n }\n else\n {\n }\n if (xPosition <= leftBound)\n {\n xSpeed = -(xSpeed);\n\n }\n else\n {\n }\n if (yPosition <= upBound)\n {\n ySpeed = -(ySpeed);\n\n }\n else\n {\n }\n if (yPosition >= lowBound - diameter)\n {\n ySpeed = -(ySpeed);\n\n }\n else \n {\n }\n\n }", "public void move() {\n\t\tif ( board.getLevel() == 5 )\n\t\t\tmovementIndex = ( movementIndex + 1 ) % movement.length;\n\t}", "public void moveAsteroidLeftToRight() {\t\r\n\t\tsetY(this.getY()+1);\r\n\t}", "public void onLivingUpdate()\n {\n super.onLivingUpdate();\n double moveSpeed = this.getAttributeMap().getAttributeInstance(SharedMonsterAttributes.MOVEMENT_SPEED).getAttributeValue();\n if (timetopee-- < 0 && !bumgave)\n {\n isJumping = false;\n\n if (bumrotation == 999F)\n {\n bumrotation = rotationYaw;\n }\n\n rotationYaw = bumrotation;\n moveSpeed = 0.0F;\n\n if (!onGround)\n {\n motionY -= 0.5D;\n }\n \n /* TODO\n if(worldObj.isRemote)\n {\n \tMCW.proxy.pee(worldObj, posX, posY, posZ, rotationYaw, modelsize);\n } */\n\n if (timetopee < -200)\n {\n timetopee = rand.nextInt(600) + 600;\n bumrotation = 999F;\n int j = MathHelper.floor_double(posX);\n int k = MathHelper.floor_double(posY);\n int l = MathHelper.floor_double(posZ);\n\n for (int i1 = -1; i1 < 2; i1++)\n {\n for (int j1 = -1; j1 < 2; j1++)\n {\n if (rand.nextInt(3) != 0)\n {\n continue;\n }\n\n Block k1 = worldObj.getBlockState(new BlockPos(j + j1, k - 1, l - i1)).getBlock();\n Block l1 = worldObj.getBlockState(new BlockPos(j + j1, k, l - i1)).getBlock();\n\n if (rand.nextInt(2) == 0)\n {\n if ((k1 == Blocks.GRASS || k1 == Blocks.DIRT) && l1 == Blocks.AIR)\n {\n worldObj.setBlockState(new BlockPos(j + j1, k, l - i1), Blocks.YELLOW_FLOWER.getDefaultState());\n }\n\n continue;\n }\n\n if ((k1 == Blocks.GRASS || k1 == Blocks.DIRT) && l1 == Blocks.AIR)\n {\n \tworldObj.setBlockState(new BlockPos(j + j1, k, l - i1), Blocks.RED_FLOWER.getDefaultState());\n }\n }\n }\n }\n }\n }", "@Override\n\tpublic void step() {\n\t\ty += speed;\n\t}", "public void move() {\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t}", "public void move()\n {\n universe.erase(this);\n \n // compute new position\n \n yPosition += ySpeed;\n xPosition += xSpeed;\n\n // check if it has hit the ground\n if(yPosition >= (groundPosition - diameter) && ySpeed > 0) {\n yPosition = groundPosition - diameter;\n ySpeed = -ySpeed; \n }\n // check if top\n if(yPosition <= 0 && ySpeed < 0){\n ySpeed = -ySpeed; \n }\n //check right\n if(xPosition >= (universe.getLength() - diameter) && xSpeed >0){\n xSpeed = -xSpeed;\n }\n //check left\n if(xPosition <= 0 && xSpeed < 0){\n xSpeed = -xSpeed;\n }\n \n // draw again at new position\n universe.draw(this);\n }", "public void update(float dt){\n // Set all the commands to false\n this.clearCommand();\n\n // stateMachine decides what flags to set\n stateMachine.update();\n\n // Update wolf\n if(left) radians += rotationSpeed * dt;\n if(right) radians -= rotationSpeed * dt;\n if(this.radians > PI_2) radians = radians % PI_2;\n if(this.radians < 0) radians += PI_2;\n\n // Accelerate\n if(up){\n direction.x += MathUtils.cos(radians) * acceleration * dt;\n direction.y += MathUtils.sin(radians) * acceleration * dt;\n }\n\n // Friction\n float vec = (float) Math.sqrt(direction.x * direction.x + direction.y * direction.y);\n // use friction on wolf\n if(vec > 0){\n direction.x -= (direction.x / vec) * friction * dt;\n direction.y -= (direction.y / vec) * friction * dt;\n }\n // Cap the player's speed\n if(vec > maxSpeed){\n direction.x = (direction.x / vec) * maxSpeed;\n direction.y = (direction.y / vec) * maxSpeed;\n }\n\n // Set position\n pos.x += direction.x * dt;\n pos.y += direction.y * dt;\n\n // Set shape\n setShape();\n\n // Set image position\n sprite.setOrigin(pos.x, pos.y);\n sprite.setOriginCenter();\n sprite.setRotation(180 * (radians / PI));\n sprite.setPosition(pos.x - sprite.getWidth() / 2, pos.y - sprite.getHeight() / 2);\n\n\n // Prevent Wolf moving out of bounds\n boundary();\n }", "public void updatemove() {\n\t\tmove = new Movement(getX(), getY(),dungeon,this);\n\t\t//System.out.println(\"Updated\");\n\t\tnotifys();\n\t\tif(this.getInvincible()) {\n\t\t\tsteptracer++;\n\t\t}\n\t\tdungeon.checkGoal();\n\t}", "public void move() {\n if(Objects.nonNull(this.position)) {\n Position position = this.getPosition();\n Function<Position, Position> move = moveRobotInDirectionMap.get(position.getDirection());\n this.position = move.apply(position);\n }\n }", "@Override\n\tpublic void update(double dt) {\n\t\tprocessLaserCollisions();\n\n\t\t// Then we spawn a new asteroid if we need to.\n\t\ttimeToNextAsteroid -= dt;\n\t\tif (timeToNextAsteroid <= 0) {\n\t\t\ttimeToNextAsteroid += asteroidDelay;\n\t\t\tspawnRandomAsteroid();\n\t\t}\n\n\t\t// If the player is dead, we just process the time left. If they need to respawn, we call\n\t\t// that.\n\t\tif (playerDead) {\n\t\t\tplayerDeadTimeLeft -= dt;\n\t\t\tif (playerDeadTimeLeft < 0) {\n\t\t\t\t// TODO: This might be a problem if an asteroid is on top of the player when they spawn.\n\t\t\t\tspawnPlayer();\n\t\t\t}\n\t\t} else {\n\t\t\t// Otherwise, they need to collide with things.\n\t\t\tprocessPlayerCollision();\n\t\t}\n\t}", "void move() {\n\t\tif (reachedEdge()) {\n\t\t\tvelocityX = velocityX * -1;\n\t\t\ty = y + 50;\n\t\t}\n\t\tif (reachedLeft()) {\n\t\t\tvelocityX = velocityX * -1;\n\t\t\ty = y + 50;\n\t\t}\n\n\t\tx = x + velocityX;\n\t}", "private void moveNinja (float delta) {\n\t\tfloat dx = (player.x + player.width / 2) - (x + width / 2);\n\t\tfloat dy = (player.y + player.height / 2) - (y + height / 2);\n\t\tdx = abs(dx) >= 2 ? sgn(dx) : 0.0f;\n\t\tdy = abs(dy) >= 2 ? sgn(dy) : 0.0f;\n\t\tfloat ax = 0.0f;\n\t\tfloat ay = 0.0f;\n\t\tif (!wouldHitWall(dx, dy)) {\n\t\t\tax = dx;\n\t\t\tay = dy;\n\t\t} else if (dx != 0 && !wouldHitWall(dx, 0)) {\n\t\t\tax = dx;\n\t\t} else if (dy != 0 && !wouldHitWall(0, dy)) {\n\t\t\tay = dy;\n\t\t}\n\t\tdx = ax * WALKING_SPEED;\n\t\tdy = ay * WALKING_SPEED;\n\t\tx += dx * delta;\n\t\ty += dy * delta;\n\n\t\tint newState = getMovementState(dx, dy);\n\t\tif (newState != state) {\n\t\t\tsetState(newState);\n\t\t}\n\t}", "public void move() {\n\tupdateSwapTime();\n\tupdateAttackTime();\n\n\tif (enemyNear) {\n\t if (moved) {\n\t\tstopMove();\n\t\tmoved = false;\n\t }\n\t} else {\n\t if (!moved) {\n\t\tcontinueMove();\n\t\tmoved = true;\n\t }\n\n\t x += dx;\n\t y += dy;\n\n\t if (x < speed) {\n\t\tx = speed;\n\t\tdx = (-1) * dx;\n\t }\n\n\t if (y < speed) {\n\t\ty = speed;\n\t\tdy = (-1) * dy;\n\t }\n\n\t if (x > MapSize.getSIZE().getWidth() - 40) {\n\t\tx = MapSize.getSIZE().getWidth() - 40;\n\t\tdx = (-1) * dx;\n\t }\n\n\t if (y > MapSize.getSIZE().getHeight() - 40) {\n\t\ty = MapSize.getSIZE().getHeight() - 40;\n\t\tdy = (-1) * dy;\n\t }\n\t}\n }", "public void moveDown() {\n\t\tposY -= speed;\n\t}", "private void move() {\n\t\t\tangle += Math.PI/24;\n\t\n\t\t\tcow.locX = Math.sin(angle) * 2.5 + player.getLocation().getX();\n\t\t\tcow.locZ = Math.cos(angle) * 2.5 + player.getLocation().getZ();\n\t\t\t\n\t\t\tLocation loc = new Location(player.getWorld(), cow.locX, player.getLocation().getY() + 1.5, cow.locZ);\n\t\t\tloc.setDirection(player.getLocation().subtract(loc).toVector()); //Look at the player\n\t\t\t\n\t\t\tPacketHandler.teleportFakeEntity(player, cow.getId(), loc);\n\t\t}", "public void moveOneStep(double dt) {\r\n this.checkLeftAndRightXs();\r\n if (this.leftX <= 20) {\r\n for (Enemy e : enemies) {\r\n e.moveDown();\r\n e.setSpeed(-(e.getSpeed().getDx() * 1.1));\r\n }\r\n\r\n }\r\n if (this.rightX >= 780) {\r\n for (Enemy e : enemies) {\r\n e.moveDown();\r\n\r\n e.setSpeed(-(e.getSpeed().getDx() * 1.1));\r\n\r\n }\r\n\r\n }\r\n for (Enemy e : enemies) {\r\n e.moveOneStep(dt);\r\n }\r\n }", "public void advanceCycle() {\n if (DEBUG) {\n System.out.println(\"velX before advanceCycle: \" + velX);\n }\n if (!isDying) {\n if (collBottom) {\n if (collLeftRight) {\n this.velX = -velX;\n if (velX > 0) {\n this.direction = LEFT;\n } else {\n this.direction = RIGHT;\n } // Make sure we're facing the direction we're walking.\n if (!onGroundPrevCycle) {\n if (this.direction == LEFT) {\n this.velX = monsterSpeed;\n } else {\n this.velX = -monsterSpeed;\n }\n }\n } else {\n if (DEBUG) {\n System.out.println(\"newX=\" + newX);\n }\n if (!onGroundPrevCycle) {\n if (this.direction == LEFT) {\n this.velX = monsterSpeed;\n } else {\n this.velX = -monsterSpeed;\n }\n }\n }\n onGroundPrevCycle = true;\n } else {\n if (collLeftRight) {\n // The monster is not standing on the ground, but it has\n // collided with a wall. Make it turn around:\n this.velX = -velX;\n if (velX > 0) {\n this.direction = LEFT;\n } else {\n this.direction = RIGHT;\n } // Make sure we're facing the direction we're walking.\n\n if (!onGroundPrevCycle) {\n if (this.direction == LEFT) {\n this.velX = monsterSpeed;\n } else {\n this.velX = -monsterSpeed;\n }\n }\n } else {\n // The monster is about to fall, or falling.\n if (onGroundPrevCycle) {\n this.velX = -velX;\n } else {\n // The monster is falling..\n\n\t\t\t\t\t\t/* Should be taken care of in public void collide(StaticCollEvent sce)\n this.action = FALLING;\n\t\t\t\t\t\t*/\n }\n }\n onGroundPrevCycle = false;\n }\n this.setPosition(newX, newY);\n\n if (velX > 0) {\n this.direction = LEFT;\n } else {\n this.direction = RIGHT;\n }\n\n if (DEBUG) {\n if (this == this.getReferrer().getObjects()[9]) {\n System.out.println(\"Monster Action=\" + action);\n System.out.println(\"Monster velX=\" + velX);\n }\n }\n } else {\n // Dying monster..\n this.setPosition(newX, newY);\n this.deadCycleCount++;\n if (this.deadCycleCount > 20) {\n super.terminate();\n }\n }\n }", "@Override\n\tpublic void move() {\n\t\ttry {\n\t\t\tTimeUnit.SECONDS.sleep(new Random().nextInt(5));\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tSystem.out.println(\"Tank moving...\");\n\t}", "public void move(){\n x+=xDirection;\n y+=yDirection;\n }", "public void move() {\r\n\r\n\t\tif(x < 0) {\r\n\t\t\tx = 400;\r\n\t\t}\r\n\r\n\t\t// factor for speed increase\r\n\t\tx -= 1 * factor;\r\n\t}", "public void move(){\n \n currentFloor = currentFloor + ( 1 * this.direction);\n //if we're at the bottom or top after move, flip the bit\n if(Elevator.MIN_FLOOR == currentFloor \n || currentFloor == Elevator.MAX_FLOOR)\n this.direction *= -1;\n \n if(destinedPassengers[ currentFloor ] > 0)\n elevatorStop( currentFloor, true );\n \n if(building.floor(currentFloor).passengersWaiting() > 0)\n elevatorStop(currentFloor, false);\n \n }", "public void update() {\n this.move(this.getDX(), this.getDY());\n }", "private void move() {\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 int newX = -1;\n int newY = -1;\n switch (direction) {\n case EAST:\n newX = currentPosition.getX() + 1;\n newY = currentPosition.getY();\n break;\n case WEST:\n newX = currentPosition.getX() - 1;\n newY = currentPosition.getY();\n break;\n case NORTH:\n newX = currentPosition.getX();\n newY = currentPosition.getY() + 1;\n break;\n case SOUTH:\n newX = currentPosition.getX();\n newY = currentPosition.getY() - 1;\n break;\n }\n\n if(newX < lowerBound.getX() || newY < lowerBound.getY()\n || newX > upperBound.getX() || newY > upperBound.getY()) {\n System.out.println(\"Cannot move to \" + direction);\n return;\n }\n\n currentPosition.setX(newX);\n currentPosition.setY(newY);\n }", "public void update() {\n if (!outOfBounds()) {\n super.move(dirVec.mul(ShadowDefend.getTimescale() * speed));\n }\n super.update();\n }", "private void moveClawUp() {\n\t\tMotor.A.setSpeed(45);\n\t\tMotor.A.rotate(90);\n\t\t\n\t}", "public void moveOneStep() {\n if (velocity.getDx() < 0 && this.center.getX() - this.radius < bottomLeftBound) {\n this.setVelocity(-velocity.getDx(), velocity.getDy());\n } else if (velocity.getDx() > 0 && this.center.getX() + this.radius > bottomRightBound) {\n this.setVelocity(-velocity.getDx(), velocity.getDy());\n }\n if (velocity.getDy() < 0 && this.center.getY() - this.radius < topLeftBound) {\n this.setVelocity(velocity.getDx(), -velocity.getDy());\n } else if (velocity.getDy() > 0 && this.center.getY() + this.radius > topRightBound) {\n this.setVelocity(velocity.getDx(), -velocity.getDy());\n }\n this.center = this.getVelocity().applyToPoint(this.center);\n }", "public void move()\r\n\t{\r\n\t\tmoveHor(xVel);\r\n\t\tmoveVert(yVel);\r\n\t}", "public void moveUp() {\n\t\tposY += speed;\n\t}", "@Override\n public void move()\n {\n System.out.println(\"tightrope walking\");\n }", "public void move(int moveDirection) {\n //if same or opposite direction, check if movable\n if ((direction - moveDirection) % 6 == 0) {\n this.direction = moveDirection;\n if (moveable()) {\n if (direction == 12) {\n this.setLocation(new Point(this.getX(),\n this.getY() - speed));\n }\n //move right\n if (direction == 3) {\n this.setLocation(new Point(this.getX() + speed,\n this.getY()));\n\n }\n //move down\n if (direction == 6) {\n this.setLocation(new Point(this.getX(),\n this.getY() + speed));\n }\n //move left\n if (direction == 9) {\n this.setLocation(new Point(this.getX() - speed,\n this.getY()));\n }\n\n }\n } // if it is turning, check if can turn or not. If can turn then turn and move according to the direction before turn, otherwise, just leave the monster there\n else {\n Point snapToGridPoint = GameUtility.GameUtility.snapToGrid(\n this.getLocation());\n Point gridPoint = GameUtility.GameUtility.toGridCordinate(\n this.getLocation());\n Point nextPoint = new Point(gridPoint.x, gridPoint.y);\n //if the distance is acceptable\n if (GameUtility.GameUtility.distance(snapToGridPoint,\n this.getLocation()) < GameUtility.GameUtility.TILE_SIZE / 2.5) {\n\n if (moveDirection == 3) {\n int x = Math.max(0, gridPoint.x + 1);\n nextPoint = new Point(x, gridPoint.y);\n } else if (moveDirection == 6) {\n int y = Math.max(0, gridPoint.y + 1);\n nextPoint = new Point(gridPoint.x, y);\n } else if (moveDirection == 9) {\n int x = Math.min(19, gridPoint.x - 1);\n nextPoint = new Point(x, gridPoint.y);\n } else if (moveDirection == 12) {\n int y = Math.min(19, gridPoint.y - 1);\n nextPoint = new Point(gridPoint.x, y);\n }\n // if the turn is empty, then snap the monster to the grid location\n if (!(GameManager.getGameMap().getFromMap(nextPoint) instanceof Wall) && !(GameManager.getGameMap().getFromMap(\n nextPoint) instanceof Bomb)) {\n if (GameUtility.GameUtility.distance(snapToGridPoint,\n this.getLocation()) < GameUtility.GameUtility.TILE_SIZE / 10) {\n this.setLocation(snapToGridPoint);\n this.direction = moveDirection;\n } else {\n if (direction == 9 || direction == 3) {\n int directionOfMovement = (snapToGridPoint.x - getX());\n directionOfMovement = directionOfMovement / Math.abs(\n directionOfMovement);\n this.setLocation(new Point(\n this.getX() + directionOfMovement * speed,\n this.getY()));\n } else if (direction == 12 || direction == 6) {\n int directionOfMovement = (snapToGridPoint.y - getY());\n directionOfMovement = directionOfMovement / Math.abs(\n directionOfMovement);\n this.setLocation(new Point(\n this.getX(),\n this.getY() + directionOfMovement * speed));\n }\n }\n }\n }\n }\n }", "public void act(){\n // Removing object, if out of the simulated zone\n if (atWorldEdge()){\n getWorld().removeObject(this);\n return;\n }\n\n //Move Thanos up\n setLocation (getX(), getY() - speed);\n }", "public void movement()\n\t{\n\t\tballoonY = balloonY + speedBalloonY1;\n\t\tif(balloonY > 700)\n\t\t{\n\t\t\tballoonY = -50;\n\t\t\tballoonX = (gen.nextInt(900)-75);\n\t\t}\n\t\tballoon2Y = balloon2Y + speedBalloonY2;\n\t\tif(balloon2Y > 700)\n\t\t{\n\t\t\tballoon2Y = -50;\n\t\t\tballoon2X = (gen.nextInt(900)-75);\n\t\t}\n\t\tballoon3Y = balloon3Y + speedBalloonY3;\n\t\tif(balloon3Y > 700)\n\t\t{\n\t\t\tballoon3Y = -50;\n\t\t\tballoon3X = (gen.nextInt(900)-75);\n\t\t}\n\t\tballoon4Y = balloon4Y + speedBalloonY4;\n\t\tif(balloon4Y > 700)\n\t\t{\n\t\t\tballoon4Y = -50;\n\t\t\tballoon4X = (gen.nextInt(900)-75);\n\t\t}\n\t\t\n\t\tballoon5Y = balloon5Y + speedBalloonY5;\n\t\tif(balloon5Y > 700)\n\t\t{\n\t\t\tballoon5Y = -50;\n\t\t\tballoon5X = (gen.nextInt(900)-75);\n\t\t}\n\t}", "public void move() {\n track += speed;\n speed += acceleration;\n if (speed <= 0) {\n speed =0;\n }\n if (speed >= MAX_SPEED) {\n speed = MAX_SPEED;\n }\n y -= dy;\n if (y <=MAX_TOP) {\n y = MAX_TOP;\n }\n if (y >=MAX_BOTTOM){\n y = MAX_BOTTOM;\n }\n if (layer2 - speed <= 0) {\n layer1 = 0;\n layer2 = 2400;\n } else {\n\n layer1 -= speed;\n layer2 -= speed;\n }\n }", "P applyMovement(M move);", "public void move()\n {\n erase();\n \n\n yPosition += ySpeed;\n xPosition += xSpeed;\n\n if(yPosition >= (groundPositionY1 - diameter)){ //450\n yPosition = (int)(groundPositionY1 - diameter);\n ySpeed = -ySpeed;\n }\n\n if(yPosition <= groundPositionY2){ //40\n yPosition = (int)(groundPositionY2);\n ySpeed = -ySpeed;\n } \n\n if(xPosition <= groundPositionX2){ //50\n xPosition = (int)(groundPositionX2);\n xSpeed = -xSpeed;\n }\n\n // check if it has hit the ground\n if(xPosition >= (groundPositionX1 - diameter)) { //550\n xPosition = (int)(groundPositionX1 - diameter);\n xSpeed = -xSpeed; \n }\n\n // draw again at new position\n draw();\n }", "private void moveClawDown() {\n\t\tMotor.A.setSpeed(45);\n\t\tMotor.A.rotate(-90);\n\t}", "public void update(){\n if (bossMoveTime > 10){\n if(random(0,16) <= 8){\n dir = 1;\n }else{\n dir = -1;\n }\n velX *= dir;\n bossMoveTime = 0;\n }\n posY *= 0.8f;\n posX += velX;\n posY += velY;\n angle += 0.04f;\n bossMoveTime++;\n }", "void move(double dx, double dy);", "private void checkMovement() {\n\n if (getYVelocity() < 0) state = PlayerState.JUMPING;\n if (getYVelocity() == 0) /*|| getXVelocity() == 0)*/ state = PlayerState.STANDING;\n if (Keyboard.isKeyDown(Keyboard.KEY_W)) {\n\n if (!falling && !floating()) {\n\n if (getYVelocity() >= 0) {\n this.addY(-72);\n }\n\n }\n }\n\n if (Keyboard.isKeyDown(Keyboard.KEY_A)) {\n this.addX((float) -5);\n state = PlayerState.WALKLEFT;\n }\n if (Keyboard.isKeyDown(Keyboard.KEY_D)) {\n this.addX((float) 5);\n state = PlayerState.WALKRIGHT;\n }\n if (getYVelocity() > 0) state = PlayerState.FALLING;\n }", "public void move(int tick) {\n moveMade = true;\n Location newTail;\n if (grow) {\n\n switch (body.getLast().direction) {\n case RIGHT:\n newTail = new Location(body.getLast().locX - GraphicsBounds.spriteSize,\n body.getLast().locY, body.getLast().direction);\n break;\n case LEFT:\n newTail = new Location(body.getLast().locX + GraphicsBounds.spriteSize,\n body.getLast().locY, body.getLast().direction);\n break;\n case UP:\n newTail = new Location(body.getLast().locX, body.getLast().locY\n + GraphicsBounds.spriteSize, body.getLast().direction);\n break;\n case DOWN:\n newTail = new Location(body.getLast().locX, body.getLast().locY\n - GraphicsBounds.spriteSize, body.getLast().direction);\n break;\n default:\n newTail = new Location(0,0);\n break;\n\n }\n\n\n body.addLast(newTail);\n }\n\n for (int i = body.size() - 1; i > 0; i--) {\n body.get(i).direction = body.get(i - 1).direction;\n }\n\n switch (direction) {\n case RIGHT:\n body.getFirst().direction = Direction.RIGHT;\n break;\n case LEFT:\n body.getFirst().direction = Direction.LEFT;\n break;\n case UP:\n body.getFirst().direction = Direction.UP;\n break;\n case DOWN:\n body.getFirst().direction = Direction.DOWN;\n break;\n default:\n break;\n }\n\n\n\n for (int i = body.size() - 1; i >= 0; i--) {\n Direction dir = body.get(i).direction;\n Location segment = body.get(i);\n switch (dir) {\n case RIGHT:\n segment.locX += snakeSpeed;\n break;\n case LEFT:\n segment.locX -= snakeSpeed;\n break;\n case UP:\n segment.locY -= snakeSpeed;\n break;\n case DOWN:\n segment.locY += snakeSpeed;\n break;\n default:\n break;\n }\n }\n\n\n\n grow = false;\n }", "void move() {\n x -= speed;\n }", "public void move() {\n if (!canMove) {\n return;\n }\n int moveX = currDirection == EAST ? PACE : currDirection == WEST ? -PACE : 0;\n int moveY = currDirection == NORTH ? PACE : currDirection == SOUTH ? -PACE : 0;\n if (grid == null || grid.isOutside(currX + moveX, currY + moveY)) {\n return;\n }\n currX += moveX;\n currY += moveY;\n }", "void move( float deltaTime, Body body );", "public void update() {\n\t\t// shooting and moving! This results in a slower movement, and unit self-targeting.\n\t\tif (action == 3 && !(this instanceof Grenadier) && !(this instanceof Sniper)) { // can't be a tank\n\t\t\tif (stop()) { // the method stop detects if we have arrived at correct position or reached max distance\n\t\t\t\txa = 0;\n\t\t\t\tya = 0;\n\t\t\t} else move(xa - xa / 8 * 5, ya - ya / 8 * 5); // SLOWS DOWN MOVEMENT\n\n\t\t\tUnit u = target(); // this is the enemy unit it is targeting.\n\t\t\tif (u != null) {\n\t\t\t\tdir = Math.atan2(u.getY() - y, u.getX() - x);\n\t\t\t\tupdateShooting();\n\t\t\t}\n\t\t}\n\n\t\t// shooting only\n\t\telse if (action == 2) {\n\t\t\tupdateShooting();\n\t\t}\n\t\t\n\t\t// moving only\n\t\telse if (action == 1) {\n\t\t\tif (unitType.equals(\"Assassin\") || unitType.equals(\"Zombie\")) { // these are units that deal with collisions!\n\t\t\t\tunitCollision(); // these three units have methods that specialize in collision\n\t\t\t}\n\n\t\t\tif (stop()) { // the method stop detects if we have arrived at correct position!\n\t\t\t\txa = 0;\n\t\t\t\tya = 0;\n\t\t\t\taction = 0;\n\t\t\t} else move(xa, ya); // YOU MUST ROUND TO A CERTAIN NUMBER OF DECIMAL PLACES IN ORDER TO REDUCE CHOPPINESS OF MOVEMENT\n\t\t}\n\t\tupdateAnimation();\n\n\t}", "public void move()\n {\n daysSurvived+=1;\n\n energy -= energyLostPerDay;\n\n Random generator = new Random();\n\n //losowo okreslony ruch na podstawie genomu\n int turnIndex = generator.nextInt((int)Math.ceil(Genome.numberOfGenes));\n int turn = genome.getGenome().get(turnIndex);\n\n //wywolujemy metode obrotu - dodaje odpowiednio liczbe do aktualnego kierunku\n direction.turn(turn);\n\n //zmieniamy pozycje zwierzaka przez dodanie odpowiedniego wektora\n position = position.add(direction.move());\n //walidacja pozycji tak, by wychodzac za mape byc na mapie z drugiej strony\n position.validatePosition(map.getWidth(),map.getHeight());\n\n moveOnSimulation();\n\n //jesli po ruchu zwierzaczek nie ma juz energii na kolejny ruch\n if(energy < energyLostPerDay )\n {\n this.animalHungry = true;\n }\n }", "public void updateMovement() {\n //if the x speed hasn't reached its max, increase the velocity\n if (Math.abs(this.xVel) < this.xTargetSpeed) {\n this.xVel += this.acceleration*this.dir;\n }\n\n //falling because of gravity -> freefall acceleration\n this.yVel += World.GRAVITY;\n\n //cling onto wall\n if (this.state.equals(\"onLeftWall\")\n || this.state.equals(\"onRightWall\")) {\n this.yVel -= World.GRAVITY/1.2;\n }\n\n this.x += this.xVel;\n \n if (!this.gravityCancel) {\n this.y += this.yVel;\n }\n }", "public void walkDownWall() {\r\n\t\tthis.move();\r\n\t\tthis.turnRight();\r\n\t\tthis.move();\r\n\t\tthis.move();\r\n\t\tthis.move();\r\n\t\tthis.turnLeft();\r\n\t}", "public void move()\n\t{\n\t\tx = x + frogVelocityX;\n\t}", "@Override\n\tprotected void onJump() {\n\t\tvelocity.setPolar(moveSpeed, GMath.random.nextInt(8) * GMath.QUARTER_PI);\n\n\t\t// Occasionally jump toward the player.\n\t\tif (GMath.random.nextInt(10) == 0) {\n\t\t\tsuper.onJump();\n\t\t\tvelocity.scale(1.7);\n\t\t\tzVelocity *= 1.3;\n\t\t}\n\t}", "public Asteroid(int x, int y) {\r\n super(x, y);\r\n speed = 1;\r\n initialY = y;\r\n initAsteroid();\r\n }", "@Override\n public void tick() { mob.fallDistance = 0.0F; }", "public void update(){\n // random move\n if(alive){\n posX += velX * cos(angle);\n posY += velY * sin(PI/4);\n angle += 0.04f*dir;\n if(random(0, 16) < 8){\n dir *= -1;\n }\n }\n }", "@Override\r\n\tpublic void move()\r\n\t{\r\n\t\t//Updates the X and Y position by using dx and dy\r\n float x = location.getX() + dx;\r\n float y = location.getY() + dy;\r\n \r\n //Updates the particle emitter's position to the missiles current position\r\n emitter.setPosition(this.getPositionX(), this.getPositionY(),false);\r\n \r\n //Updates the location of the missile\n setLocation(x, y);\n\t}", "@Override\n\tpublic Direction getMove() {\n if (ticks < MAX_TICKS_PER_ROUND - 100) {\n Direction[] dirs = Direction.values();\n return dirs[random.nextInt(dirs.length)];\n } else {\n // Move towards boat\n int deltaX = 0;\n int deltaY = 0;\n if (currentLocation.getX() < 0)\n deltaX = 1;\n else if (currentLocation.getX() > 0)\n deltaX = -1;\n\n if (currentLocation.getY() < 0)\n deltaY = 1;\n else if (currentLocation.getY() > 0)\n deltaY = -1;\n\n if (deltaX > 0 && deltaY == 0) {\n return Direction.E;\n } else if (deltaX > 0 && deltaY > 0) {\n return Direction.NE;\n } else if (deltaX > 0 && deltaY < 0) {\n return Direction.SE;\n } else if (deltaX == 0 && deltaY == 0) {\n return Direction.STAYPUT;\n } else if (deltaX == 0 && deltaY < 0) {\n return Direction.N;\n } else if (deltaX == 0 && deltaY > 0) {\n return Direction.S;\n } else if (deltaX < 0 && deltaY == 0) {\n return Direction.W;\n } else if (deltaX < 0 && deltaY > 0) {\n return Direction.NW;\n } else if (deltaX < 0 && deltaY < 0) {\n return Direction.NE;\n } else {\n throw new RuntimeException(\"I HAVE NO IDEA\");\n }\n }\n\t}", "public void move() {\n\t\tmoveX();\n\t\tmoveY();\n\t}" ]
[ "0.7143158", "0.68082327", "0.67068714", "0.66522557", "0.652748", "0.6476294", "0.647062", "0.6462389", "0.6455823", "0.644376", "0.644076", "0.6423931", "0.6412564", "0.6360439", "0.6358197", "0.6351381", "0.6331206", "0.6310448", "0.6299282", "0.6299032", "0.62982494", "0.6296472", "0.62667114", "0.62380624", "0.6215011", "0.62136805", "0.62127405", "0.6207572", "0.6173903", "0.61729896", "0.61728776", "0.6167017", "0.6158287", "0.61497843", "0.6147878", "0.61346436", "0.6133192", "0.61204505", "0.61049", "0.6103711", "0.60965663", "0.60951406", "0.60926485", "0.60867023", "0.6084212", "0.608286", "0.6068231", "0.6064309", "0.60613686", "0.6058891", "0.6053841", "0.60138285", "0.6009386", "0.59856457", "0.59854263", "0.5980922", "0.59752023", "0.5973097", "0.59717864", "0.5963833", "0.5960247", "0.59523714", "0.5949851", "0.5939158", "0.59292907", "0.5924484", "0.59231144", "0.59139735", "0.5910944", "0.5902014", "0.588169", "0.5879047", "0.587265", "0.587226", "0.58701015", "0.58686996", "0.5861482", "0.58613724", "0.58581036", "0.58546", "0.58407634", "0.58297485", "0.58252984", "0.5821561", "0.5812088", "0.5811711", "0.58111584", "0.57975566", "0.57961667", "0.57905823", "0.57901496", "0.5788531", "0.578333", "0.57828814", "0.5781446", "0.57798916", "0.57781506", "0.5770713", "0.5763105", "0.5761383" ]
0.57707226
97
Boolean for detecting collisions takes in Player object so we can have access to position.
public boolean containsPoint(Player player) { //Initially calculate the squared values of the distance between the player and the object float xSquared = (player.getX() - x)*(player.getX() - x); float ySquared = (player.getY() - y)*(player.getY() - y); float radiusSquared = radius*radius; //While our asteroid is within the x bounds of our player. while (x > player.getX() && x < player.getX()+player.getWidth()) { xSquared = 0; //Set to zero so we can calculate distance from the top //of the square rather than the top left x value //If statement for if the asteroid is below the player if (y > player.getY()+player.getHeight()) { ySquared = ((player.getY()+player.getHeight())-y)*((player.getY()+player.getHeight())-y); if (xSquared + ySquared - radiusSquared <= 0) return true; else return false; } //For if the asteroid is above the player do nothing but compare if (xSquared + ySquared - radiusSquared <= 0) return true; else return false; } //While our asteroid is within the y bounds of our player while (y > player.getY() && y < player.getY()+player.getHeight()) { ySquared = 0; //Similar to pervious while statement. We only care about //the x-component this time rather than the y-component. //If the asteroid is to the right of the player if (x > player.getX()+player.getWidth()) { xSquared = ((player.getX()+player.getWidth())-x)*((player.getX()+player.getWidth())-x); if (xSquared + ySquared - radiusSquared <= 0) return true; else return false; } //Asteroid is to the left so compare if (xSquared + ySquared - radiusSquared <= 0) return true; else return false; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean collides(Rectangle player) {\r\n return player.overlaps(boundsTop) || player.overlaps(boundsBot);\r\n }", "private boolean playerDetection() {\n\t\tAxisAlignedBB axisalignedbb = new AxisAlignedBB(posX, posY, posZ, posX + 1, posY + 1, posZ + 1).grow(DETECTION_RANGE);\n\t\tList<EntityPlayer> list = world.getEntitiesWithinAABB(EntityPlayer.class, axisalignedbb);\n\n\t\treturn !list.isEmpty();\n\t}", "public static boolean getCollision()\r\n\t{\r\n\t\treturn collision;\r\n\t}", "public abstract boolean collisionWith(CollisionObject obj);", "public boolean playerCollide(Player player) {\n return RectF.intersects(new RectF(this.rect), player.getRect());\n }", "void checkHandleContactWithPlayer() {\n Player curPlayer = this.mainSketch.getCurrentActivePlayer();\n\n if (this.doesAffectPlayer) {\n // boundary collision for player\n if (contactWithCharacter(curPlayer)) { // this has contact with non-player\n if (!this.charactersTouchingThis.contains(curPlayer)) { // new collision detected\n curPlayer.changeNumberOfVerticalBoundaryContacts(1);\n this.charactersTouchingThis.add(curPlayer);\n }\n curPlayer.handleContactWithVerticalBoundary(this.startPoint.x);\n\n } else { // this DOES NOT have contact with player\n if (this.charactersTouchingThis.contains(curPlayer)) {\n curPlayer.setAbleToMoveRight(true);\n curPlayer.setAbleToMoveLeft(true);\n curPlayer.changeNumberOfVerticalBoundaryContacts(-1);\n this.charactersTouchingThis.remove(curPlayer);\n }\n }\n }\n }", "public boolean willBoxesCollide(Unit player, float deltaX, float deltaY) {\n\tScene currentScene = WorldMap.getInstance().getCurrentScene();\n\tfor (Obstacle obstacle : currentScene.getObstacleList()) {\n\t if (player.collisionBetweenBoxes(deltaX, deltaY, obstacle) && player.getPosZ() < obstacle.getProtrusionHeight())\n\t\treturn true;\n\t}\n\t \n\treturn false;\n }", "@Override\n public boolean isCollided(gameObject obj){\n return Rect.intersects(obj.getastRect(), getRectplayer1())||\n Rect.intersects(obj.getastRect(), getRectplayer2()) ||\n Rect.intersects(obj.getastRect(), getRectplayer3()) ||\n Rect.intersects(obj.getastRect(), getRectplayer4());\n }", "public boolean collision(Objet o) {\r\n\t\treturn false;\r\n\t}", "void collisionHappened(int position);", "public void collisionDetection(){\r\n\t\tif( this.isActiv() ){\r\n\t\t\tif( this.isCollided() ){\r\n\t\t\t\tthis.onCollision();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n\tpublic boolean checkCollision() {\n\t\treturn true;\n\t}", "public boolean isColliding(){\n for(int i = 0; i < eng.getIDManager().getObjectsWithID(\"GameObject\").size(); i++){\n GameObject temp = eng.getIDManager().getObjectsWithID(\"GameObject\").get(i);\n \n if(temp.getHitBox().getBounds().intersects(rect.getBounds()) &&\n temp.getHitBox() != this){\n currentCollidingObject = temp;\n return true;\n }\n }\n \n return false;\n }", "public boolean isCollision(double x, double y) {\n return false;\n }", "public boolean collides(Player p) {\n\t\treturn (first.collides(p) || this.rest.collides(p));\n\t}", "private void processPlayerCollision() {\n\t\t// This starts by converting the player vertices to global positions.\n\t\tVector3 playerGlobalPosition = player.getGlobalPositionVector();\n\t\tVector3 playerGlobalRotation = player.getGlobalRotationVector();\n\n\t\tVector3 playerVertex1 = new Vector3(player.hitboxPoints[0], player.hitboxPoints[1]);\n\t\tVector3 playerVertex2 = new Vector3(player.hitboxPoints[2], player.hitboxPoints[3]);\n\t\tVector3 playerVertex3 = new Vector3(player.hitboxPoints[4], player.hitboxPoints[5]);\n\t\t// TODO: Confirm this is correct.\n\t\tVector3 playerVertex1Global = new Vector3(playerVertex1.x * -Math.sin(Math.toRadians(playerGlobalRotation.z)), playerVertex1.y * Math.cos(Math.toRadians(playerGlobalRotation.z))).add(playerGlobalPosition);\n\t\tVector3 playerVertex2Global = new Vector3(playerVertex2.x * -Math.sin(Math.toRadians(playerGlobalRotation.z)), playerVertex2.y * Math.cos(Math.toRadians(playerGlobalRotation.z))).add(playerGlobalPosition);\n\t\tVector3 playerVertex3Global = new Vector3(playerVertex3.x * -Math.sin(Math.toRadians(playerGlobalRotation.z)), playerVertex3.y * Math.cos(Math.toRadians(playerGlobalRotation.z))).add(playerGlobalPosition);\n\n\t\tfor (AsteroidsAsteroid a : asteroids) {\n\t\t\t// If any of the vertices collide and the player is alive, lose a life.\n\t\t\tif ((a.collides(playerVertex1Global) || a.collides(playerVertex2Global) || a.collides(playerVertex3Global)) && player.isShowing()) {\n\t\t\t\tloseLife();\n\t\t\t}\n\t\t}\n\t}", "public boolean isCollision(Ball ob) { // Kollisionsabfrage\r\n\t\t\r\n\t\tdX = posX - ob.getPosX();\r\n\t\tdY = posY - ob.getPosY();\r\n\t\tfloat vector = dX * dX + dY * dY;\r\n\t\tfloat hypo = radius * radius * 4;\r\n\t\tif (hypo >= vector) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "private void checkPlayerCollisions() {\r\n\t\tGObject left = getElementAt(player.getX() - 1, player.getY() + player.getHeight() / 2.0);\r\n\t\tGObject right = getElementAt(player.getX() + player.getWidth() + 1, player.getY() + player.getHeight() / 2.0);\r\n\t\tif(dragon1 != null && (left == dragon1 || right == dragon1)) {\r\n\t\t\tremove(lifeBar);\r\n\t\t\tlifeBar = null;\r\n\t\t}\r\n\t\tif(dragon2 != null && (left == dragon2 || right == dragon2)) {\r\n\t\t\tremove(lifeBar);\r\n\t\t\tlifeBar = null;\r\n\t\t}\r\n\t}", "@Override\n\tpublic boolean hasCollide(Entity e) {\n\t\treturn rect.intersects(e.getRectangle());\n\t}", "public boolean playerCollideTest(PlayerObject player)\n {\n if (this.isTouchable)\n {\n return true;\n\n }\n else return false;\n }", "public boolean collides (){\n if(shipX<=astX && shipY>=astY){\n if(Math.abs(shipX-astX)<=40 && Math.abs(shipY-astY)<=65){\n return true;\n }\n }\n else if(shipX>=astX && shipY>=astY){\n if(Math.abs(shipX-astX)<=75 && Math.abs(shipY-astY)<=65){\n return true;\n }\n }\n else if(shipX>=astX && shipY<=astY){\n if(Math.abs(shipX-astX)<=75 && Math.abs(shipY-astY)<=55){\n return true;\n }\n }\n else if(shipX<=astX && shipY<=astY){\n if(Math.abs(shipX-astX)<=60 && Math.abs(shipY-astY)<=55){\n return true;\n }\n }\n return false;\n }", "public boolean collisionDetected() {\r\n\t\tfor (GameElement target : getTargets()) {\r\n\t\t\tif (myInitiator.intersects(target) && checkTargetMatch(target)) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public abstract boolean collide(int x, int y, int z, int dim, Entity entity);", "public boolean collidepoint(float mX, float mY){\n return super.shape.contains(mX, mY);\n //return isPressed;\n }", "public void checkCollision() {}", "public boolean isCollisionDisabled() { return mover.isCollisionDisabled(); }", "public boolean collidePoint(float mX, float mY){\n return super.shape.contains(mX,mY);\n }", "public boolean colidesWith(Entity e, boolean player){\n\t\tthis.setBounds((int) x, (int)y, Tile.size, Tile.size);\n\t\tif(player)\n\t\t\te.setBounds((int) (main.getCamOfSetX() + e.getPx()), (int) (main.getCamOfSetY() + e.getPy()), (int)e.getWidth(), (int)e.getHeight());\n\t\telse\n\t\t\te.setBounds((int)e.getX(), (int)e.getY(), (int)e.getWidth(), (int)e.getHeight());\n\t\treturn this.intersects(e);\n\t}", "public synchronized boolean isInPosition(){\r\n\t\tSystem.out.println(\"wheel: \" + flywheel.isFlywheelAtSpeed() + \r\n\t\t\t\t\" hood: \" + hood.isInPosition() + \r\n\t\t\t\t\" turret: \" + turret.isInPosition() + \r\n\t\t\t\t\" kicker: \" + kicker.isInPosition());\r\n\t\treturn flywheel.isFlywheelAtSpeed() && \r\n\t\t\t\thood.isInPosition() && \r\n\t\t\t\tturret.isInPosition() && \r\n\t\t\t\tkicker.isInPosition();\r\n\t}", "private boolean checkCollision(int x, int y){\n\t\t\n\t\tboolean b = false;\n\t\tif(Math.abs((this.particles.get(x).getPosition().distance(this.particles.get(y).getPosition()))) < 0.5*Renderer.SCALE*(this.particles.get(x).getRadius() + this.particles.get(y).getRadius()))\n\t\t{\n\t\t\tb = true;\n\t\t}\n\t\treturn b;\n\t}", "public boolean hasCollidedWith(InteractiveObject obj){\n\t\tif (obj == null) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn (leftCollision(obj) || rightCollision(obj));\n\t\t}\n\t}", "boolean playerExists() {\n return this.game.h != null;\n }", "private boolean checkCollisions(int keycode) {\n \t\t\n \t\tint sX = super.getX()/Main.gridSize;\n \t\tint sY = super.getY()/Main.gridSize;\n \t\t\n \t\tif (World.currentMap().solidAtPoint(sX-1, sY) && keycode == Keyboard.KEY_A) {\n \t\t\treturn false;\n \t\t} else if (World.currentMap().solidAtPoint(sX+1, sY) && keycode == Keyboard.KEY_D) {\n \t\t\treturn false;\n \t\t} else if (World.currentMap().solidAtPoint(sX, sY-1) && keycode == Keyboard.KEY_W) {\n \t\t\treturn false;\n \t\t} else if (World.currentMap().solidAtPoint(sX, sY+1) && keycode == Keyboard.KEY_S) {\n \t\t\treturn false;\n \t\t}\n \t\treturn true;\n \t}", "public boolean isHit() { return hit; }", "private boolean detectCollisions(GameState mGaemState,ArrayList<GameObject> objects,SoundEngine se,ParticleSystem ps){\n boolean playerHit = false;\n for (GameObject go1:objects){\n if (go1.checkActive()){\n //the 1st object is active\n //so worth checking\n\n for (GameObject go2:objects){\n if (go2.checkActive()){\n //the 2nd object is active\n //so worth checking\n if (RectF.intersects(go1.getTransform().getCollider(),go2.getTransform().getCollider())){\n\n //switch goes here\n //there has been a collision\n //but does it matter?\n switch (go1.getTag() + \" with \" + go2.getTag()){\n case \"Player with Alien Laser\":\n playerHit = true;\n mGaemState.lostLife(se);\n\n break;\n\n case \"Player with Alien\":\n playerHit =true;\n mGaemState.lostLife(se);\n\n break;\n\n case \"Player Laser with Alien\":\n mGaemState.increaseScore();\n //respawn the alien\n ps.emitParticles(new PointF(go2.getTransform().getLocation().x,go2.getTransform().getLocation().y));\n go2.setInactive();\n go2.spawn(objects.get(Level.PLAYER_INDEX).getTransform());\n go1.setInactive();\n se.playAlienExplode();\n\n break;\n\n default:\n break;\n }\n\n }\n }\n }\n }\n }\n return playerHit;\n }", "public String playerCollide(PlayerObject player)\n {\n String collision;\n\n Rect oldPos = player.getRectangle();\n\n\n if (Rect.intersects(rectangle, player.getRectangle()))\n {\n if (isTouchable && isMovable )\n {\n if (Constants.xVelocity > 0) {\n return \"right\";\n }\n\n if (Constants.xVelocity < 0) {\n return \"left\";\n }\n\n if (Constants.yVelocity > 0) {\n return \"bottom\";\n }\n\n if (Constants.yVelocity < 0) {\n return \"top\";\n }\n }\n\n if (isTouchable & !isMovable)\n {\n return \"0\";\n }\n\n }\n\n return \"null\";\n }", "public boolean isPlayerAlive() {\r\n\t\treturn !(this.getRobotsAlive().isEmpty());\r\n\t}", "@Override\n\tpublic boolean collides(Vector3 v) {\n\t\treturn false;\n\t}", "public boolean isPlayer() {\n return player != null;\n }", "private boolean leftCollision(InteractiveObject obj){\n\t\treturn leftUpCollision(obj) || leftDownCollision(obj);\n\t}", "boolean collideWithVehicles(Vehicle v);", "private boolean isInDoor(Entity player){\n Sprite playerSprite= (Sprite) player.getComponent(Sprite.class);\n for(int i = 0; i<Main.colliderWallMap.size(); i++){\n if(Main.colliderWallMap.get(i).intersects(playerSprite.getValue().getX(), playerSprite.getValue().getY(),playerSprite.getValue().getWidth(), playerSprite.getValue().getHeight())){\n return false;\n }\n }\n\n return true;\n }", "public boolean collisionDetection(Body body) {\n boolean collision = false; // default: no collision\n if (body.name != this.name) {\n double r = Math.sqrt(Math.pow((this.x - body.x),2) + Math.pow((this.y - body.y),2));\n if (r <= 1*(body.radius + this.radius)) {\n collision = true; // collision detected\n }\n\n }\n return collision;\n }", "void checkCollision(Entity other);", "private boolean collides(GameObject gameObject1) {\n return collides(gameObject1, 0.5);\n }", "public boolean checkCollisions(Tuple camera) {\n\n\t\t// already exploded\n\t\tif(disabled > 0) {\n\t\t\treturn false;\n\t\t} // if\n\t\t\n\t\t// collision detected\n\t\tif(location.distance(camera) - size < SHIP_SIZE) {\n\t\t\tdisabled = 1;\n\t\t\treturn true;\n\t\t} // if\n\t\treturn false;\n\t}", "public boolean collision(Object a, Object b) {\n if (Rect.intersects(a.getRect(), b.getRect())) { //if the two objects hitboxes colide\n return true;\n }\n return false;\n }", "public boolean moveable() {\n //check reach border\n if (reachBorder()) {\n return false;\n }\n //get the location of the next spot to move to\n //move up\n Point nextLocation = this.getCenterLocation();\n if (direction == 12) {\n nextLocation = new Point(this.getCenterX(),\n this.getCenterY() - speed);\n }\n //move right\n if (direction == 3) {\n nextLocation = new Point(this.getCenterX() + speed,\n this.getCenterY());\n\n }\n //move down\n if (direction == 6) {\n nextLocation = new Point(this.getCenterX(),\n this.getCenterY() + speed);\n\n }\n //move left\n if (direction == 9) {\n nextLocation = new Point(this.getCenterX() - speed,\n this.getCenterY());\n }\n\n // get all objects in a circle of radius tileSize * 2 around the players\n //these objects are those which can possibly colide with the players\n int checkRadius = GameUtility.GameUtility.TILE_SIZE * 2;\n for (GameObject gameObject : GameManager.getGameObjectList()) {\n if (GameUtility.GameUtility.distance(gameObject.getCenterLocation(),\n this.getCenterLocation()) < checkRadius) {\n if ((GameUtility.GameUtility.dectectCollision(\n gameObject.getCenterLocation(),\n nextLocation)) && !(GameUtility.GameUtility.dectectCollision(\n gameObject.getCenterLocation(),\n this.getCenterLocation())) && gameObject.getType() != GameObjectType.POWER_UP && gameObject.getType() != GameObjectType.MONSTER && gameObject.getType() != GameObjectType.PLAYER) {\n return false;\n }\n }\n }\n return true;\n\n }", "@Override\r\n\t\tpublic boolean isPlayer() {\n\t\t\treturn state.isPlayer();\r\n\t\t}", "@java.lang.Override\n public boolean hasPlayer() {\n return player_ != null;\n }", "public boolean isPositionValid(){\n\t\t//check overlapping with walls\n\t\tfor(Wall wall : Game.gameField.getWalls()){\n\t\t\tif(wall.overlaps(center))\n\t\t\t\treturn false;\n\t\t}\n\t\t//check overlapping with other balls\n\t\tfor(Ball ball : Game.gameField.getBalls()){\n\t\t\tif(ball == this)\n\t\t\t\tcontinue;\n\t\t\tif(ball.getCenterPoint().distance(center) < RADIUS * 2)\n\t\t\t\treturn false;\n\t\t}\n\t\treturn GameField.FIELD.contains(center);\n\t}", "private boolean collision1() {\n return game.racket1.getBounds1().intersects(getBounds()); // returns true if the two rectangles intersect\r\n }", "@Override\r\n\tpublic boolean collides (Entity other)\r\n\t{\r\n\t\tif (other == owner || other instanceof Missile)\r\n\t\t\treturn false;\r\n\t\telse\r\n\t\t\treturn super.collides(other);\r\n\t}", "private boolean shouldAttackPlayer(EntityPlayer player) {\n ItemStack itemStack = player.inventory.armorInventory[3];\n if (itemStack != null && itemStack.getItem() == Item.getItemFromBlock(Blocks.pumpkin))\n return false;\n Vec3 lookVec = player.getLook(1.0F).normalize();\n Vec3 posVec = Vec3.createVectorHelper(this.posX - player.posX, this.boundingBox.minY + this.height / 2.0 - player.posY - player.getEyeHeight(), this.posZ - player.posZ);\n double distance = posVec.lengthVector();\n posVec = posVec.normalize();\n double dotProduct = lookVec.dotProduct(posVec);\n return dotProduct > 1.0 - 0.025 / distance ? player.canEntityBeSeen(this) : false;\n }", "void checkHandleContactWithNonPlayerCharacters() {\n if (this.doesAffectNonPlayers) {\n // boundary collision for non-player characters\n for (ACharacter curCharacter : this.mainSketch.getCurrentActiveLevelDrawableCollection().getCharactersList()) {\n if (this.contactWithCharacter(curCharacter)) {\n curCharacter.handleContactWithVerticalBoundary(this.startPoint.x);\n\n } else if (curCharacter instanceof ControllableEnemy) { // this DOES NOT have contact with character AND character is controllable\n ((ControllableEnemy) curCharacter).setAbleToMoveLeft(true);\n ((ControllableEnemy) curCharacter).setAbleToMoveRight(true);\n }\n }\n }\n }", "public boolean collidesWith(ICollider other);", "protected boolean isColliding() {\n\t\treturn phxService.isColliding(this);\n\t}", "@Override\n\tpublic void collide(Entity e) {\n\n\t}", "public boolean hasCollision(final Entity entity) throws Exception\r\n {\r\n return (getCharacter(entity) != null);\r\n }", "public void collision(Collidable collider);", "final public boolean isColliding(Vector2 p)\n\t{\n\t\tif (p.getX() >= center.getX() - (width / 2.0) && p.getX() <= center.getX() + (width / 2.0))\n\t\t{\n\t\t\tif (p.getY() <= center.getY() + (height / 2.0) && p.getY() >= center.getY() - (height / 2.0))\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "private boolean collides(Cell player_cell, Point vector, Set<Cell> nearby_cells, Set<Pherome> nearby_pheromes) {\n Iterator<Cell> cell_it = nearby_cells.iterator();\n Point destination = player_cell.getPosition().move(vector);\n while (cell_it.hasNext()) {\n Cell other = cell_it.next();\n if ( destination.distance(other.getPosition()) < 0.5*player_cell.getDiameter() + 0.5*other.getDiameter() + 0.00011) \n return true;\n }\n Iterator<Pherome> pherome_it = nearby_pheromes.iterator();\n while (pherome_it.hasNext()) {\n Pherome other = pherome_it.next();\n if (other.player != player_cell.player && destination.distance(other.getPosition()) < 0.5*player_cell.getDiameter() + 0.0001) \n return true;\n }\n return false;\n }", "public void collision(){\r\n\t\tif(currX < 0 || currX > 1000-width || currY < 0 || currY > 700-height){\r\n\t\t\tinGame=false;\r\n\t\t}\r\n\t\t/*\r\n\t\tI start at 1 because tail[0] will constantly be taking the position\r\n\t\tof the snake's head, so if i start at 0, the game would end immediately.\r\n\t\t*/\r\n\t\tfor(int i=1; i < numOranges; i++){\r\n\t\t\tRectangle currOrangeRect = new Rectangle(tail[i].getXcoords(), tail[i].getYcoords(), OrangeModel.getWidth(), OrangeModel.getHeight());\r\n\t\t\tif(new Rectangle(currX, currY, width, height).intersects(currOrangeRect)){\r\n\t\t\t\tinGame=false;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public boolean isHit(Collideable otherCol){\n return this.collideable.getHitX() - otherCol.getHitX() < 50\n && this.collideable.getHitX() - otherCol.getHitX() > -50\n && this.collideable.getHitY() - otherCol.getHitY() > -30\n && this.collideable.getHitY() - otherCol.getHitY() < 30;\n }", "public boolean isVisionary(EntityPlayer player);", "@Override\n\tpublic boolean movable(Entity obj) {\n\t\tif (!(obj instanceof Player)) return false;\n\t\tPlayer player = (Player) obj;\n\t\t\n\t\tint futureX = this.getX();\n\t\tint futureY = this.getY();\n\t\t\n\t\t\n\t\tint playerX = player.getX();\n\t\tint playerY = player.getY();\n\t\t\n\t\tif (playerX == this.getX()) {\n\t\t\t// player moving either up or down\n\t\t\tif (playerY > this.getY()) {\n\t\t\t\t// player moving up so check what's up of boulder\n\t\t\t\tfutureY = this.getY() - 1;\n\t\t\t} else {\n\t\t\t\t// player moving down ''\n\t\t\t\tfutureY = this.getY() + 1;\n\t\t\t}\n\t\t} else if (playerY == this.getY()) {\n\t\t\t// player moving either left or right\n\t\t\tif (playerX > this.getX()) {\n\t\t\t\t// player moving left ''\n\t\t\t\tfutureX = this.getX() - 1;\n\t\t\t} else {\n\t\t\t\t// player moving right ''\n\t\t\t\tfutureX = this.getX() + 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\tboolean result = checkMoveable(futureX, futureY);\n\t\treturn result;\n\t}", "boolean hasPosition();", "boolean hasPosition();", "boolean hasPosition();", "boolean hasPosition();", "public void checkPlayerCollisions() {\n\t\t//Iterate over the players\n\t\tfor (PlayerFish player : getPlayers()) {\n\t\t\t//Get collidables parallel.\n\t\t\tcollidables.parallelStream()\n\t\t\t\n\t\t\t//We only want the collidables we actually collide with\n\t\t\t.filter(collidable -> player != collidable && player.doesCollides(collidable))\n\t\t\t\n\t\t\t//We want to do the for each sequentially, otherwise we get parallelism issues\n\t\t\t.sequential()\n\t\t\t\n\t\t\t//Iterate over the elements\n\t\t\t.forEach(collidable -> {\n\t\t\t\tplayer.onCollide(collidable);\n\t\t\t\tcollidable.onCollide(player);\n\t\t\t});\n\t\t}\n\t}", "boolean wasHit();", "@Override\n public boolean checkCollideSingle(GameObject gameObject, int x, int y) {\n if (!(gameObject instanceof Player) || !isAlive())\n return false;\n\n boolean result = super.withinRange(x, y);\n\n if (result) {\n if (prev + (hitInterval * 10) < System.currentTimeMillis()) {\n prev = System.currentTimeMillis();\n startHitTime = prev + 300;\n startHit = true;\n }\n }\n\n if (result) {\n if (startHitTime < System.currentTimeMillis() && startHit) {\n HUD.getInstance().removeHealth(getDamage());\n setStatus(PlayerStatus.FIGHTING);\n startHit = false;\n }\n }\n\n return result;\n }", "private boolean hasMovements(Color playerColor){\r\n for(Point pos : getPieces(playerColor)){\r\n if(canMove(pos) || canEats(pos)) return true;\r\n }\r\n return false;\r\n }", "public boolean getCollideInternal() {\r\n\t\treturn _collideInternal;\r\n\t}", "@Override\n public boolean isPlayer() {\n return super.isPlayer();\n }", "public void checkCollision()\r\n\t{\r\n\t\t//for Bullets against Avatar and Enemy\r\n\t\tfor(int bulletIndex = 0; bulletIndex < bullets.size(); bulletIndex++)\r\n\t\t{\r\n\t\t\tBullet b = bullets.get(bulletIndex);\r\n\t\t\tif (b instanceof AvatarBullet)\r\n\t\t\t{\r\n\t\t\t\t@SuppressWarnings(\"unused\")\r\n\t\t\t\tboolean collided = false;\r\n\t\t\t\tfor (int enemyIndex = 0; enemyIndex < enemy.size(); enemyIndex++)\r\n\t\t\t\t{\r\n\t\t\t\t\tEnemy e = enemy.get(enemyIndex);\r\n\t\t\t\t\tif(((AvatarBullet) b).collidedWith(e))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tbullets.remove(bulletIndex);\r\n\t\t\t\t\t\tbulletIndex--;\r\n\t\t\t\t\t\tenemy.remove(enemyIndex);\r\n\t\t\t\t\t\tenemyIndex --;\r\n\t\t\t\t\t\tcollided = true;\r\n\t\t\t\t\t\tint score = getScore()+1;\r\n\t\t\t\t\t\tsetScore(score);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if (b instanceof EnemyBullet)\r\n\t\t\t{\r\n\t\t\t\tif (((EnemyBullet) b).collidedWith(avatar))\r\n\t\t\t\t{\r\n\t\t\t\t\tbullets.remove(bulletIndex);\r\n\t\t\t\t\tbulletIndex--;\r\n\t\t\t\t\tint health = Avatar.getLives()-1;\r\n\t\t\t\t\tavatar.setLives(health);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int platformIndex = 0; platformIndex < platforms.size(); platformIndex++)\r\n\t\t{\r\n\t\t\tPlatforms p = platforms.get(platformIndex);\r\n\t\t\tif (p instanceof Platforms)\r\n\t\t\t{\r\n\t\t\t\t//boolean collided = false;\r\n\t\t\t\t//Avatar a = avatar.get(enemyIndex);\r\n\t\t\t\tif(((Platforms) p).collidedWith(avatar))\r\n\t\t\t\t{\r\n\t\t\t\t\tsetAlive(true);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tsetAlive(false);\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}", "public boolean isCollidable() {\n return collidable;\n }", "@Override\n\tpublic void onCollision(Entity collidedEntity)\n\t{\n\t\t\n\t}", "private void checkCollisions() {\n float x = pacman.getPos().x;\n float y = pacman.getPos().y;\n\n GameEntity e;\n for (Iterator<GameEntity> i = entities.iterator(); i.hasNext(); ) {\n e = i.next();\n // auf kollision mit spielfigur pruefen\n if (Math.sqrt((x - e.getPos().x) * (x - e.getPos().x) + (y - e.getPos().y) * (y - e.getPos().y)) < 0.5f)\n if (e.collide(this, pacman))\n i.remove();\n }\n }", "@Override\n public void checkCollision( Sprite obj )\n {\n \n }", "public abstract boolean isHit(int x, int y);", "@Override\r\n\tpublic void Collision(Entity e)\r\n\t{\r\n\t\tthis.isAlive = false;\r\n\t}", "public boolean collisionCheck() {\n for (Alien al : aliens) {\n if (you.collide(al)) {\n al.collide(you);\n return true;\n }\n }\n boolean tf = false;\n int index = 0, size = lazers.size();\n while (index < size) {\n if (you.collide(lazers.get(index))) {\n lazers.remove(index);\n size--;\n index--;\n tf = true;\n }\n index++;\n }\n return tf;\n }", "public abstract boolean isPlayer();", "@Override\n\tpublic boolean isCollided(SpaceShip invader, Rocket rocket) {\n\t\t//(posX + width) /2 , (posY + height) /2\n\t\tint spaceshipCenterX = (int)(invader.getPosition().getX() + invader.getSize().getWidth()) / 2;\n\t\tint spaceshipCenterY = (int)(invader.getPosition().getY() + invader.getSize().getHeight()) / 2;\n\t\tPoint spaceshipCenter = new Point(spaceshipCenterX, spaceshipCenterY);\n\t\tif (spaceshipCenter == rocket.getPosition())\n\t\t\treturn true;\n\t\treturn false;\n\t}", "private boolean isOver() {\r\n return players.size() == 1;\r\n }", "protected boolean IsPlayerStaringAtMe( EntityPlayer player )\r\n {\r\n ItemStack headStack = player.inventory.armorInventory[3];\r\n\r\n if ( headStack == null || headStack.itemID != \r\n \tFCBetterThanWolves.fcItemEnderSpectacles.itemID )\r\n {\r\n Vec3 vLook = player.getLook( 1F ).normalize();\r\n \r\n Vec3 vDelta = worldObj.getWorldVec3Pool().getVecFromPool( posX - player.posX, \r\n \tboundingBox.minY + ( height / 2F ) - ( player.posY + player.getEyeHeight() ), \r\n \tposZ - player.posZ );\r\n \r\n double dDist = vDelta.lengthVector();\r\n \r\n vDelta = vDelta.normalize();\r\n \r\n double dotDelta = vLook.dotProduct( vDelta );\r\n \r\n if ( dotDelta > 1D - 0.025D / dDist )\r\n {\r\n \treturn player.canEntityBeSeen( this );\r\n }\r\n }\r\n \r\n return false;\r\n }", "public boolean isInPlay() {\n\t\tif (getX() < LEFT_FIELD_LIMIT || getX() > RIGHT_FIELD_LIMIT || \n\t\t\t\t getY() <= MINIMUM_FOOTBALL_Y) {\n\t\t\tinPlay_ = false;\n\t\t\treturn inPlay_;\n\t\t} \n\t\treturn inPlay_;\n\t}", "@Override\r\n public boolean collision(org.dyn4j.dynamics.Body body1, BodyFixture fixture1, org.dyn4j.dynamics.Body body2, BodyFixture fixture2, Manifold manifold) {\r\n\r\n EntityId one = (EntityId) body1.getUserData();\r\n EntityId two = (EntityId) body2.getUserData();\r\n\r\n if (gravityState.isWormholeFixture(fixture1) || gravityState.isWormholeFixture(fixture2)) {\r\n return gravityState.collide(body1, fixture1, body2, fixture2, manifold, time.getTpf());\r\n }\r\n\r\n if (flagState.isFlag(one) || flagState.isFlag(two)) {\r\n return flagState.collide(body1, fixture1, body2, fixture2, manifold, time.getTpf());\r\n }\r\n\r\n return true; //Default, keep processing this event\r\n }", "public boolean collision() {\n for (int i = 0; i < coins.length; i++) {\n // This checks to see if the coin in the coins\n // array is alive. If it isn't then we shouldn't\n // waste time detecting if it's colliding with\n // anything!\n if (coins[i].alive) {\n\n // Gets our players \"box\" coordinates. Using very simple\n // collision detection here.\n float playerX = player1.position.x + Player.radius;\n float playerY = player1.position.y + Player.radius;\n float playerW = player1.position.x + 1.2f;\n float playerH = player1.position.y + 1.2f;\n\n // Gets our coins box coordinates\n // we'll be comparing these 2 boxes\n // against each other every frame\n // to see if there is a collision or not\n float coinX = coins[i].position.x;\n float coinY = coins[i].position.y;\n float coinW = coins[i].position.x + 2.5f;\n float coinH = coins[i].position.y + 2.5f;\n\n // These are the checks to see if any parts\n // of our 2 collision boxes are touching each other\n // if they are then we print out that we've collided\n // and we set this coins alive variable to false.\n // We then return true that there has been a collision\n if (playerX < coinW &&\n playerW > coinX &&\n playerY < coinH &&\n playerH > coinY\n ) {\n// if (coinCounter != 1)\n// System.out.println(\"Player1 has \" + coinCounter + \" coins\");\n// else\n// System.out.println(\"Player1 has 1 coin\");\n coinCounter++;\n coins[i].alive = false;\n return true;\n }\n }\n\n }\n // if there hasn't been a collision then we return false\n // and the game carries on as normal.\n return false;\n }", "public boolean isUseableByPlayer(EntityPlayer entityPlayer)\n {\n return this.worldObj.getTileEntity(this.xCoord, this.yCoord, this.zCoord) == this &&\n entityPlayer.getDistanceSq((double) this.xCoord + 0.5D, (double) this.yCoord + 0.5D,\n (double) this.zCoord + 0.5D) <= 64.0D;\n }", "public abstract void onCollision();", "@Override\n\tpublic boolean equals(Object obj) {\n if (obj == this) { \n return true; \n } \n // Check if obj is an instance of Position or not \n if (!(obj instanceof Player)) { \n return false; \n } \n // Type cast obj to \"Player\" so that we can compare the name & side attributes \n Player p = (Player) obj; \n return ( this.name == p.getName() && this.side == p.getSide() ); \n }", "private boolean rightCollision(InteractiveObject obj){\n\t\treturn rightUpCollision(obj) || rightDownCollision(obj);\n\t}", "public boolean detectBound(){\n if(posX < 10){\n posX = 10;\n velX = 0;\n accX = 0;\n return true;\n }\n else if(posX > width - 10){\n posX = width - 10;\n velX = 0;\n accX = 0;\n return true;\n }\n if(posY < 10){\n posY = 10;\n velY = 0;\n accY = 0;\n return true;\n }\n else if(posY > height - 10){\n posY = height - 10;\n velY = 0;\n accY = 0;\n return true;\n }\n return false;\n }", "public boolean isCenteringOverCoords()\n\t{\n\t\treturn centerOverCoords;\n\t}", "public Point collisionPoint() {\r\n return collisionPoint;\r\n\r\n }", "@Override\n\tpublic boolean collidesWithCircle(Circle circle) {\n\t\treturn false;\n\t}", "public boolean collision(int a){\n\t\tfor(int i= 0; i<walls.size();i++){\n\t\t\twall k= walls.get(i);\n\t\t\tif(a==1){\t\t\t\n\t\t\t\tif(h.getX()-20==k.getX()&&h.getY()==k.getY())\n\t\t\t\t\treturn true;\t\t\t\t\t\n\t\t\t}\n\t\t\tif(a==2){\n\t\t\t\tif(h.getX()+20==k.getX()&&h.getY()==k.getY())\n\t\t\t\t\treturn true;\t\t\n\t\t\t}\n\t\t\tif(a==3){\n\t\t\t\tif(h.getX()==k.getX()&&h.getY()-20==k.getY())\n\t\t\t\t\treturn true;\t\t\t\t\t\n\t\t\t}\n\t\t\tif(a==4){\n\t\t\t\tif(h.getX()==k.getX()&&h.getY()+20==k.getY())\n\t\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}" ]
[ "0.7444263", "0.73351103", "0.7327561", "0.6941159", "0.6920152", "0.6875629", "0.68298894", "0.6820606", "0.6811058", "0.67993426", "0.6772854", "0.6750337", "0.67155904", "0.6642771", "0.6606975", "0.6591389", "0.6588562", "0.6524448", "0.6522061", "0.6516465", "0.6514774", "0.64241767", "0.64224774", "0.6414745", "0.6409475", "0.63955504", "0.6385636", "0.6378247", "0.63744104", "0.6373243", "0.6318279", "0.6315442", "0.63099", "0.6282569", "0.6276168", "0.6268721", "0.6251655", "0.6244219", "0.6234572", "0.62203604", "0.6217791", "0.620905", "0.6203952", "0.6192334", "0.6176947", "0.61706334", "0.61695206", "0.61692315", "0.61488956", "0.6128299", "0.61193115", "0.6118971", "0.61184084", "0.6112798", "0.6110511", "0.60975873", "0.6091261", "0.60882753", "0.6084765", "0.60573244", "0.6042961", "0.60402083", "0.6036226", "0.6035106", "0.60336494", "0.6033407", "0.6025033", "0.6025033", "0.6025033", "0.6025033", "0.60238", "0.60208493", "0.6002165", "0.5991836", "0.59896636", "0.59866476", "0.59829503", "0.5982676", "0.59804344", "0.5971936", "0.59686106", "0.5956632", "0.59504026", "0.5947009", "0.5943904", "0.59332544", "0.5930867", "0.5917599", "0.5915177", "0.5914856", "0.5913115", "0.59093195", "0.59072924", "0.5906845", "0.59062594", "0.59058434", "0.5903973", "0.5903631", "0.5903488", "0.5898606" ]
0.60923153
56
Boolean method to determine if the asteroid has reached the end of the screen or not
public boolean hasPassed() { if (y<=450.0f) return false; else return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected boolean isFinished() {\n\tif(this.motionMagicEndPoint >0) {\n \tif(Math.abs(RobotMap.motorLeftTwo.get() )< 0.09 && Math.abs(RobotMap.motorRightTwo.get() )> -0.09&& Timer.getFPGATimestamp()-starttime > 10) {\n \t\treturn true;\n \t}\n\t}\n\t\n return false;\n }", "public boolean roundEnd()\r\n {\r\n line = gameBoard.findLine();\r\n \r\n return line[0] != -1 || gameBoard.isFull();\r\n }", "@Override\n\tprotected boolean isFinished() {\n\t\treturn Math.abs(Robot.lidar.getRange() - range) < 2.0f;\n\t}", "boolean hasEndPosition();", "boolean hasEndPosition();", "@Override\n protected boolean isFinished() {\n return (Math.abs(hpIntake.getWristPosition()) - HatchPanelIntake.positions[position.ordinal()] < Math.PI/12);\n }", "protected boolean isFinished() {\n return (timeRunning>timeStarted+5 || RobotMap.inPosition.get()!=OI.shooterArmed);\n }", "public boolean endOfBoard() {\n\t return (y == 0 || y == Board.SIZE - 1);\n\t}", "private boolean isNearToEndPosition() {\n switch (direction) {\n case UP:\n return posY <= endPosition;\n case DOWN:\n return posY >= endPosition;\n case LEFT:\n return posX <= endPosition;\n case RIGHT:\n return posX >= endPosition;\n }\n throw new RuntimeException(\"Unknown position\");\n }", "public boolean gameEnd(){\r\n return !hasMovements(model.getCurrentPlayer().getColor());\r\n }", "protected boolean isFinished() {\n \treturn Robot.lift.isMotionMagicNearTarget() || totalTimer.get() > 5.0;\n }", "private boolean hasReachedBottom() {\n\t\tfor (Segment s:this.getHorizontalProjection().getShapeSegments()){\n\t\t\t\n\t\t\tHeightProfile hs = this.grid.heightAt(s);\n\t\t\t\n\t\t\tfor (int h : hs){\n\t\t\t\t\n\t\t\t\tif (this.bottomLeft.getY() <= h){\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "protected boolean isFinished() {\n \tif(timer.get()>.7)\n \t\treturn true;\n \tif(Robot.gearX==0)\n \t\treturn true;\n return (Math.abs(173 - Robot.gearX) <= 5);\n }", "protected boolean isFinished() {\n\t\treturn Robot.elevator.isInPosition(newPosition, direction);\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\tif (!stoppable) {\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\t// return Robot.elevator.getLevel() == Level.Bottom;\n\t\t\treturn (Robot.elevator.getLevel() == Level.Bottom && v < 0.0) || (Robot.elevator.getLevel() == Level.Top && v > 0.0);\n\t\t}\n\t}", "protected boolean isFinished() {\r\n\t \treturn (timeSinceInitialized() > .25) && (Math.abs(RobotMap.armarm_talon.getClosedLoopError()) < ARM_END_COMMAND_DIFFERENCE_VALUE); //TODO:\r\n\t }", "public boolean onGround() {\n return getLocation().getY() <= 0 || (interactingWithY != null && interactingWithY.getLocation().getY() + interactingWithY.size.height <= getLocation().getY());\n }", "protected boolean isFinished() {\n \tif (moving) return Robot.armPiston.getMajor() != PistonPositions.Moving; /* && Robot.armPiston.getMinor() != PistonPositions.Moving; */\n \treturn true;\n }", "@Override\r\n\tprotected boolean isFinished() {\n\t\treturn Math.abs(elevator.getWristPosition() - elevator.getWristStages()[elevator.getWristStage()]) < Math.PI/18 && !elevator.isRunning(ElevatorSubsystem.Follower.ELEVATOR);\r\n\t}", "public boolean isFinished(){\n return (this.radius >= this.maxHeight/2);\n }", "protected boolean isFinished() {\n\t\tboolean beyondTarget = Robot.wrist.getCurrentPosition() > safePosition;\n\t\treturn isSafe || beyondTarget;\n\t}", "public boolean isFull() {\n return moveRight(tail)==head;\n }", "protected boolean isFinished() {\n if (waitForMovement) return (timeSinceInitialized() > Robot.intake.HOPPER_DELAY);\n return true;\n }", "public boolean isFull(){\n return this.top==this.maxLength-1;\n }", "@Override\n public boolean isFinished() {\n if (numBalls == -1) {\n return false;\n } else {\n return ballsShot >= numBalls;\n }\n }", "boolean isFinished() {\n\t\tif (this.currentRoom.isExit() && this.currentRoom.getMonsters().isEmpty()) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "boolean end() {\r\n\t\tif (this.gameOver == true)\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}", "protected boolean isFinished() {\n logger.info(\"Ending left drive\");\n \treturn timer.get()>howLongWeWantToMove;\n }", "public boolean isFull() {\n if(this.top==(size - 1)) {\n return true;\n }\n return false;\n }", "public boolean isGoal() {\n if (blocks[dimension()-1][dimension()-1] != 0) return false;\n return hamming() == 0;\n }", "protected boolean isFinished() {\n \n \tif(Math.abs(RobotMap.navx.getAngle() - this.desiredAngle) <=2) {\n \n \t\treturn true;\n \t}\n return false;\n }", "private boolean birdIsOffscreen() {\r\n return (bird.getYpos() + bird.getRadius() < 0) ||\r\n (bird.getXpos() + bird.getRadius() < 0) ||\r\n (bird.getXpos() - bird.getRadius() > width);\r\n }", "protected boolean isFinished() {\r\n \tif (manipulator.isHighSwitchPressed() && speed > 0 ||\r\n \t\tmanipulator.isLowSwitchPressed() && speed < 0)\r\n \t\treturn true;\r\n \t\r\n \treturn isTimedOut();\r\n \t\r\n// \tif (targetHeight > startHeight) {\r\n// \t\treturn manipulator.getAverageElevatorHeight() >= targetHeight;\r\n// \t} else {\r\n// \t\treturn manipulator.getAverageElevatorHeight() <= targetHeight;\r\n// \t}\r\n }", "private boolean GameEnds(){\n \tif(endGameCounter!=0) {\n \t\treturn false;\n \t\t\n \t}\n \t\n \treturn true;\n }", "public boolean inGoalRegion() {\n return position >= GOAL_POSITION;\n }", "protected boolean isFinished() {\n \tif (Robot.clawElevator.getContainerHeight() == 0) {\n \t\treturn Robot.clawElevator.getLowerSwitch();\n \t} else {\n \t\treturn Robot.clawElevator.getLowerSwitch() || Robot.clawElevator.isAtIntemediateStop(Math.abs(Robot.clawElevator.getContainerHeight() - 3), false);\n \t}\n }", "public boolean isFull() {\r\n return placeCounter == dimension * dimension;\r\n }", "public boolean gameEnd(){\n\t\treturn(\tturn >= 50 || evaluateState()==true );\r\n\t}", "boolean endOfGame() {\n return false;\n }", "protected boolean isFinished() {\n\t\treturn (distanceToCenter >= -3 && distanceToCenter <= 3);\n\t}", "public boolean isBelowRail() {\r\n return this.offset < 0;\r\n }", "protected boolean isFinished() {\n\t\t// get the current angle from the gyro\n\t\tdouble currentAngle = Robot.gyroSubsystem.GyroPosition();\n\n\t\t// see if we are within 2 degrees of the target angle (90 degrees)\n\t\tif (Math.abs(currentAngle - 90) <= 2) {\n\t\t\t// we have hit our goal of 90, end auto program\n\t\t\treturn true;\n\t\t} else {\n\t\t\t// we are not quite there yet, keep going\n\t\t\treturn false;\n\t\t}\n\n\t}", "public boolean isFull() {\n return (this.top == this.stack.length);\n }", "boolean finished() {\n\t\treturn y > (parent.height);//in this case it will be the bottom corner of the canvas\n\t}", "public boolean checkForEndgame() {\n\t\tCalculatePossibleMoves(true);\n\t\tint blackMoves = getNumberOfPossibleMoves();\n\t\tCalculatePossibleMoves(false);\n\t\tint redMoves = getNumberOfPossibleMoves();\n\t\t\n\t\tif (blackMoves == 0 && redMoves == 0)\n\t\t\treturn true;\n\t\treturn false;\n\t}", "protected boolean isFinished() {\n \tdouble changeInX = targetX - Robot.sensors.getXCoordinate();\n \tdouble changeInY = targetY - Robot.sensors.getYCoordinate();\n \tdouble distance = Math.sqrt(Math.pow(changeInX, 2) + Math.pow(changeInY, 2));\n return distance < 8 || System.currentTimeMillis() >= stopTime;\n }", "public boolean isFinished() {\n\t\t\n\t\treturn drivetrain.angleReachedTarget();\n\n\t}", "private boolean hitSides() {\n if (b.numY + 60 >= BOX_HEIGHT || (b.numY - 60 <= 0)) {\n return true;\n } else {\n return false;\n }\n }", "@Override\n protected boolean isFinished() {\n return timeSinceInitialized() > 0.5 && Robot.toteLifterSubsystem.isEjectorExtended();\n }", "protected boolean isFinished() {\n \tif (Math.abs(_finalTickTargetLeft - Robot.driveTrain.getEncoderLeft()) <= 0 &&\n \t\t\tMath.abs(_finalTickTargetRight - Robot.driveTrain.getEncoderRight()) <= 0)\n \t{\n \t\treturn true;\n \t}\n return false;\n }", "private boolean nextIsWall()\n {\n return this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].isHasWall();\n }", "@Override\r\n\tboolean isFinished() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tif(checkForWin() != -1)\r\n\t\t\treturn true;\r\n\t\telse if(!(hasValidMove(0) || hasValidMove(1)))\r\n\t\t\treturn true; //game draw both are stuck\r\n\t\telse return false;\r\n\t}", "protected boolean isFinished() {\n \treturn (Robot.sonar.getDistance() <= distance);\n }", "@Override\n\tpublic boolean isComplete() {\n\t\tif (this.defeated == this.totalEnemies)\n\t\t\treturn true;\n\t\treturn false;\n\t}", "@Override\n public boolean isFinished() {\n return !(System.currentTimeMillis() - currentMs < timeMs) &&\n // Then check to see if the lift is in the correct position and for the minimum number of ticks\n Math.abs(Robot.lift.getPID().getSetpoint() - Robot.lift.getEncoderHeight()) < error\n && ++currentCycles >= minDoneCycles;\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 isFinished() {\n return (Math.abs(RobotContainer.drive.getAngle() - this.angle) <= 1);\n }", "protected boolean isFinished() {\n //\tif(OI.joystickOne.getPOV() == 180){\n \t\t//return true;\n \t//\n \t\t\t\n return false;\n }", "public boolean reachedEnd() {\n return reachedEnd;\n }", "public boolean isDead() {\n\t\tint boxX = parentBox.x;\n\t\tint boxY = parentBox.y;\n\t\tint boxLength = parentBox.LENGTH;\n\t\n\t\tif (boxX == x && boxY < y + length && boxY > y) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "protected boolean isFinished() {\n long tEnd = System.currentTimeMillis();\n long tDelta = tEnd - tStart;\n double elapsedSeconds = tDelta / 1000.0;\n if (elapsedSeconds > 0.2) {\n \t System.out.println(\"End Fire\");\n \t return true;\n }\n else if(elapsedSeconds > 0.15) {\n \t System.out.println(\"end Fire\");\n Robot.m_Cannon.set(-1);\n }\n else if(elapsedSeconds > 0.05) {\n \t System.out.println(\"mid Fire\");\n Robot.m_Cannon.stop();\n }\n return false;\n }", "public Boolean isEnd() {\n\t\t// keep running\n\t\tif (currentNo == -1) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// car production for this production line is done\n\t\telse if (currentNo >= expectedNo) {\n//\t\t\tSystem.out.println(\"isEnd of car Production line is \");\n//\t\t\tSystem.out.print(currentNo >= expectedNo);\n\n\t\t\treturn true;\n\t\t} else {\n//\t\t\tSystem.out.println(\"isEnd of car Production line is \");\n//\t\t\tSystem.out.print(currentNo >= expectedNo);\n\t\t\treturn false;\n\t\t}\n\n\t}", "public boolean outOfBounds()\n {\n if((lastpowerUp.equals(\"BLUE\") || lastpowerUp.equals(\"RAINBOW\")) && powerupTimer > 0)\n {\n return false;\n }\n \n if(head.getA() < 150 || head.getA() >= 1260)\n return true;\n else if(head.getB() <150 || head.getB() >=630)\n return true;\n else \n return false;\n \n \n }", "@Override\r\n\tpublic boolean isFull() {\r\n\t\tif(topIndex == stack.length -1) {\r\n\t\t\treturn true;\r\n\t\t}else {\r\n\t\t\treturn false;\r\n\t\t}\t\r\n\t}", "@Override\n protected boolean isFinished() {\n //stop once the left side is high enough\n return Robot.myLifter.getLeftEncoder() < pos;\n }", "private boolean isGameOver() {\n return Snake().isTouching(Wall()) || Snake().isTouching(Snake());\n }", "public boolean isFinished() {\n\t\t// the word is guessed out only when the unrevealedSlots is 0\n\t\tif (this.unrevealedSlots == 0) {\n\t\t\treturn true;\n\t\t}else {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean foundGoal() \r\n\t{\r\n\t\t// Write the method that determines if the walker has found a way out of the maze.\r\n\t\treturn ( currentCol < 0 || currentRow < 0 || \r\n\t\t\t\t currentCol >= size || currentRow >= size );\r\n\t}", "public boolean canSpawnMore() {\n for(int e: enemiesLeft) {\n if(e > 0) {\n return true;\n }\n }\n\n return false;\n }", "public boolean isFull() {\n\t\treturn end != null;\n\t}", "protected boolean isFinished() {\r\n if (Math.abs(motorWithEncoder.getSetpoint() - motorWithEncoder.getPosition()) < 0.5) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "public boolean isFull() {\n\t\treturn (rear+1)%total_size == front;\r\n\t}", "private boolean hasHitBoundry() {\r\n if (snake[HEAD].row < 0 || \r\n snake[HEAD].row >= maxRows ||\r\n snake[HEAD].column < 0 ||\r\n snake[HEAD].column >= maxColumns) {\r\n gameOver();\r\n return true;\r\n }\r\n return false;\r\n }", "public boolean isHangmanDead()\n {\n return hangmanIndex >= hangmanShapes.length;\n }", "@Override\n protected boolean isFinished() {\n return (System.currentTimeMillis() >= thresholdTime || (currentAngle > (totalAngleTurn - 2) && currentAngle < (totalAngleTurn + 2)));\n }", "private boolean rightBoundsReached(float delta) {\n return (textureRegionBounds2.x - (delta * speed)) > Constants.APP_WIDTH;\n }", "public boolean isOnGround() {\n return this.sim_pos.getY() <= 2;\n }", "public boolean wonGame() {\n for (int x = 0; x < maxX; x++) {\n for (int y = 0; y < maxY; y++) {\n if (snakeSquares[x][y] == NOT_A_SEGMENT) {\n //there is still empty space on the screen, so haven't won\n return false;\n }\n }\n }\n //But if we get here, the snake has filled the screen. win!\n SnakeGame.setGameStage(SnakeGame.GAME_WON);\n\n return true;\n }", "public boolean isGoal() {\r\n\t\tint n = this.dimension();\r\n\t\tint k = 1;\r\n\t\tfor (int i = 0; i < n; i++) {\r\n\t\t\tfor (int j = 0; j < n; j++) {\r\n\t\t\t\tif (this.blocks[i][j] != k) {\r\n\t\t\t\t\tif (!(i == n - 1 && j == n - 1 && this.blocks[i][j] == 0)) {\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tk++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "protected boolean isFinished() {\n \tif(Math.abs(Robot.driveTrain.getHeading() - targetDirection) < 2) {\n \t\treturn true;\n \t} else {\n \t\treturn false;\n \t}\n }", "public boolean isFull() {\n return numMoves == MAX_MOVES;\n }", "protected boolean isFinished() {\n\t\tif (_timesRumbled == 40) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean canEndTurn() {\n\t\tif (hasMoved || hasCaptured) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean isFullEvening() {\n return eveningRoster.size() == MAXROSTER;\n }", "@Override\n public boolean isFinished() \n {\n int curCount = mPath.kNumPoints - mCount;\n if(curCount<1)\n {\n System.out.println(mPath.kNumPoints);\n }\n \n return curCount<1;\n }", "protected boolean isFinished ()\n\t{\n\n\t\tif (Subsystems.goalVision.getProportionalGoalX() >= X_OFFSET\n\t\t - DEADBAND\n\t\t && Subsystems.goalVision\n\t\t .getProportionalGoalX() <= X_OFFSET + DEADBAND)\n\t\t//The goal is centered.\n\t\t{\n\t\t\t//We are aligned.\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public boolean isCycleOver(){\n if(playersTurns.isEmpty()) {\n eventListener.addEventObject(new RoundEvent(EventNamesConstants.RoundEnded));\n return true;\n }\n return false;\n }", "public boolean isBoardFull() {\n\t\t// REPLACE NEXT LINE WITH YOUR IMPLEMENTATION\n\t\tint boardSize = getBoardSize();\n\t\t\n\t\tfor (int i = 0; i < boardSize; i++) {\n\t\t\t\n\t\t\tfor (int j = 0; j < boardSize; j++) {\n\t\t\t\t\n\t\t\t\tif (isSpotBlank(i,j)) {\n\t\t\t\t\t\n\t\t\t\t\treturn false;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn true;\n\t\t\n\t}", "protected boolean isFinished() {\n \t\n \tif(current_time >= goal) {\n \t\t\n \t\treturn true;\n \t}else {\n \t\t\n \t\treturn false;\n \t}\n }", "protected boolean isFinished() {\n return Robot.m_elevator.onTarget();\n }", "private boolean isLastMoveRochade()\r\n\t{\r\n\t\tMove lastMove = getLastMove();\r\n\t\tif (lastMove == null) return false;\r\n\t\tPiece king = lastMove.to.piece;\r\n\t\tif (!(king instanceof King)) return false;\r\n\t\t\r\n\t\tint y = king.getColor().equals(Color.WHITE) ? 0 : 7;\r\n\t\tif (lastMove.to.coordinate.y != y) return false;\r\n\t\t\r\n\t\tint xDiffAbs = Math.abs(lastMove.to.coordinate.x - lastMove.from.coordinate.x); \r\n\t\treturn xDiffAbs == 2;\r\n\t}", "protected boolean isFinished() {\n //boolean onTarget = Math.abs(\n //encoderValue - Math.abs(Robot.arm.getArmEncoderValue())) <= RobotMap.ArmConstants.ARM_ENCODER_BUFFER;\n boolean hasBeenZeroed = Robot.arm.hasButtonBeenPressed();\n boolean onTarget = false;\n if(initialPos < setpoint) {\n onTarget = Math.abs(Robot.arm.getArmEncoderValue()) >= setpoint;\n }else if(initialPos >= setpoint) {\n onTarget = Math.abs(Robot.arm.getArmEncoderValue()) <= setpoint;\n }\n return this.isTimedOut() || !hasBeenZeroed || onTarget;\n }", "public synchronized boolean isFull() {\r\n\t\treturn (this.players.size() == 6);\r\n\t}", "public boolean isGameFinished() {\n if (listaJogadores.size() - listaJogadoresFalidos.size() == 1) {\n return true;\n } else {\n return false;\n }\n\n }", "@Override\r\n\tpublic boolean isFull() {\r\n\t\tif (this.front == 0 && this.rear == this.size - 1) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif (this.front == this.rear + 1) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "private void checkEndGame() {\n if (field.getStackSize() == (field.getPegCount() - 1)) {\n endGame = true;\n }\n }", "public boolean endOfGame() {\n\t\tfor (int i = 0; i < getNumOfPlayers(); i++) {\n\t\t\tif (this.getPlayerList().get(i).getCardsInHand().isEmpty()) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "@Override\n public boolean isInScreen(){\n return this.getX() > App.START_COORDINATE_X - this.getSpriteImage().getWidth() / 2\n && this.getX() < App.SCREEN_WIDTH + this.getSpriteImage().getWidth() / 2;\n }", "public boolean isEndState()\n {\n return !this.safe || (this.e.size() == 0) || (this.d.size() == 0);\n }", "public boolean isFull(){\r\n\t\tfor(int i = 0; i < boardSize; i++){\r\n\t\t\tif(board[i] == Box.EMPTY){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "private boolean hitMyPaddle() {\n if (b.numX - 60 <= 0) {\n if ((b.numY <= (this.touchedY + 260)) && (b.numY >= (this.touchedY - 260))) {\n } else {\n this.wentOffWall();\n }\n return true;\n } else {\n return false;\n }\n }" ]
[ "0.7211265", "0.718884", "0.7182846", "0.7093286", "0.7093286", "0.70893896", "0.70680904", "0.70591664", "0.70245564", "0.7008884", "0.69994056", "0.6942839", "0.6930611", "0.69204366", "0.69071716", "0.69052815", "0.68658996", "0.68305105", "0.68205833", "0.6811493", "0.6808315", "0.67924744", "0.67876977", "0.6784341", "0.67818534", "0.676961", "0.67631656", "0.6752696", "0.6742286", "0.67115694", "0.67099977", "0.67098445", "0.66994476", "0.66854745", "0.6675752", "0.66737765", "0.6673583", "0.66488886", "0.66435236", "0.66313666", "0.662867", "0.6610048", "0.6608104", "0.65916514", "0.658899", "0.65867287", "0.65797603", "0.6575965", "0.6572852", "0.656869", "0.65678793", "0.65654755", "0.6548053", "0.6543395", "0.6520365", "0.65020293", "0.64972454", "0.6494446", "0.64921206", "0.64919853", "0.64893436", "0.6489207", "0.64778507", "0.6475984", "0.6472252", "0.64675415", "0.64654356", "0.6464483", "0.6463072", "0.6442025", "0.6438231", "0.6435251", "0.642913", "0.6422457", "0.6420606", "0.6419724", "0.641463", "0.64069515", "0.6402061", "0.63979864", "0.6396985", "0.63945866", "0.6391238", "0.6386709", "0.6382131", "0.6379115", "0.63732964", "0.63668853", "0.6364998", "0.63608444", "0.63398725", "0.63312703", "0.63266486", "0.6324686", "0.63243496", "0.63240814", "0.6323533", "0.63220114", "0.6310048", "0.6307709", "0.63070905" ]
0.0
-1
Tick and Render methods
public void tick() { //We have to respawn the circles if they reach the bottom of the screen if (hasPassed()) { //Randomly reset the x coordinates. this.x = minRandom + new Random().nextFloat()*(maxRandom-minRandom); //Fixed Y spawn this.y = spawnY; //Randomly reset the width,height, and radius of the new asteroid int newHeight, newWidth; newHeight = 32 + (int) (new Random().nextFloat()*(64.0f-32.0f)); newWidth = newHeight; setWidth(newWidth); setHeight(newHeight); this.radius = width*0.5f; //Create a new Random color Random gen = new Random(); int red, green, blue = 50; do { red = 40 + (int) (gen.nextFloat()*(255.0f-40.0f)); green = 40 + (int) (gen.nextFloat()*(255.0f-40.0f)); blue = 40 + (int) (gen.nextFloat()*(255.0f-40.0f)); } while (red != green && red != blue); this.color = new Color(red,green,blue); } else { fall(); move(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void tick() {\n\t\trenderer.render(this);\n\t}", "public void onRenderTick() {\n updateLang();\n updateRenderEngine();\n }", "void drawCurrentTick();", "@Override\r\n\tpublic void tick() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void tick() {\n\t\t\r\n\t}", "public void tick() {\r\n }", "protected abstract void tick();", "@Override\n\tpublic void tick() {\n\n\t}", "@Override\n\tpublic void tick() {\n\t\t\n\t}", "@Override\n\tpublic void tick() {\n\t\t\n\t}", "@Override\n\tpublic void tick() {\n\t\t\n\t}", "@Override\n\tpublic void tick() {\n\t\t\n\t}", "@Override\n\tpublic void tick() {\n\t\t\n\t}", "@Override\n\tpublic void tick() {\n\t\t\n\t}", "@Override\n\tpublic void tick() {\n\t\t\n\t}", "@Override\r\n\t\tprotected void onTick() {\n\r\n\t\t}", "public void tick() {\n\t}", "public void tick() {\n\t}", "public void tick();", "public void tick();", "public void tick();", "@Override\n public void tick() {\n super.tick();\n }", "@Override\n public void onTick() {\n \n }", "public abstract void tick();", "void tick();", "void tick();", "@Override\n public void onTick(long arg0) {\n }", "@Override\n\t\tpublic void onTick(long arg0) {\n\t\t\t\n\t\t}", "@Override\n\tpublic void render(float deltaTime) {\n\t\t\n\t}", "void incrementTick();", "private void emitTicks() {\n if (gameModel == null || lastTickTime == 0) return; // the game is paused\n\n while (lastTickTime < System.currentTimeMillis()) {\n lastTickTime += 1000f / gameModel.ticksPerSecond();\n ;\n for (Entity go : gameModel.entities) go.tick();\n }\n }", "public void display()\r\n\t{\r\n\t\t//System.out.println(\"Call to display\");\r\n\t\tif (this.isRunning) {\r\n\t\t\tfor (int i=0;i<Actions.size();i++) {\r\n\t\t\t\t((Action)Actions.elementAt(i)).tick(currTime++);\r\n\t\t\t}\r\n\t\t}\r\n\t\trender(true);\r\n\t}", "@Override\n public void livingTick() {\n super.livingTick();\n }", "public void onTick()\n\t{\n\t\tsuper.onTick();\n\t\ttime++;\n\t\tif(time>=40)\n\t\t{\n\t\t\tif(direction == 0)\n\t\t\t{\n\t\t\t\tdirection = 1;\n\t\t\t\ttime = 0;\n\t\t\t}\n\t\t\telse if(direction == 1)\n\t\t\t{\n\t\t\t\tdirection = 0;\n\t\t\t\ttime = 0;\n\t\t\t}\n\t\t}\n\t\tif(direction == 0)\n\t\t{\n\t\t\tleft();\n\t\t\tif(hitcher!= null)\n\t\t\t{\n\t\t\t\thitcher.left(speed);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse if(direction == 1)\n\t\t{\n\t\t\tright();\n\t\t\tif(hitcher!=null)\n\t\t\t{\n\t\t\t\thitcher.right(speed);\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "public abstract void update(int tick);", "public void timeTick()\r\n\t{\r\n\t\tnumberDisplay1.increment();\r\n\t}", "@Override\n\tpublic void render(float delta) {\n\t\tupdate(delta);\n\t\tdraw(delta);\n\t}", "public void render() {\r\n\r\n }", "public void tick() {\r\n tick++;\r\n }", "public void render()\r\n\t{\n\t}", "@Override\n\tpublic void render(float delta) {\n\t}", "public void render() {\n\t\tBufferStrategy bs = getBufferStrategy();\n\t\tif (bs == null) {\n\t\t\tcreateBufferStrategy(3);\n\t\t\treturn;\n\t\t}\n\t\t// get graphics object for drawing on canvas\n\t\tGraphics g = bs.getDrawGraphics();\n\t\t// clear screen before drawing new objects to it\n\t\tg.setColor(style.getBackCol());\n\t\tg.fillRect(0, 0, getWidth(), getHeight());\n\t\t// use style from server to draw time information, only if we have\n\t\t// synced the time with the server.\n\t\tg.setColor(style.getTimeCol());\n\t\tif (tim.TIME_SYNCED) {\n\t\t\t// set font and font size, perhaps font can also be customizable in\n\t\t\t// the future?\n\t\t\tg.setFont(new Font(\"TimesRoman\", Font.PLAIN, style.getTimePoint()));\n\t\t\tFontMetrics metrics = g.getFontMetrics(new Font(\"TimesRoman\", Font.PLAIN, style.getTimePoint()));\n\t\t\t// get height to offset text by when drawing.\n\t\t\tint hgt = metrics.getHeight();\n\t\t\t// System.out.println(\"\" +style.getLeft() * WIDTH);\n\t\t\tg.drawString(tim.getTime(), (int) (style.getLeft() * WIDTH), (int) (style.getTop() * HEIGHT + hgt));\n\t\t}\n\t\t// clear graphics from memory and draw screen buffer\n\t\tg.dispose();\n\t\tbs.show();\n\t}", "public void tick() {\n\t\ttick(1);\n\t}", "@Override\n\tpublic void render(float delta) {\n\n\t}", "public void tick() {\n if (this.overlayMessageTime > 0) {\n --this.overlayMessageTime;\n }\n\n if (this.titlesTimer > 0) {\n --this.titlesTimer;\n if (this.titlesTimer <= 0) {\n this.displayedTitle = null;\n this.displayedSubTitle = null;\n }\n }\n\n ++this.ticks;\n Entity entity = this.mc.getRenderViewEntity();\n if (entity != null) {\n this.updateVignetteBrightness(entity);\n }\n\n if (this.mc.player != null) {\n ItemStack itemstack = this.mc.player.inventory.getCurrentItem();\n if (itemstack.isEmpty()) {\n this.remainingHighlightTicks = 0;\n } else if (!this.highlightingItemStack.isEmpty() && itemstack.getItem() == this.highlightingItemStack.getItem() && (itemstack.getDisplayName().equals(this.highlightingItemStack.getDisplayName()) && itemstack.getHighlightTip(itemstack.getDisplayName()).equals(highlightingItemStack.getHighlightTip(highlightingItemStack.getDisplayName())))) {\n if (this.remainingHighlightTicks > 0) {\n --this.remainingHighlightTicks;\n }\n } else {\n this.remainingHighlightTicks = 40;\n }\n\n this.highlightingItemStack = itemstack;\n }\n\n }", "public void render() {\n }", "public Tick() {\n\t\tthis.start = System.currentTimeMillis();\n\t\tthis.last = start;\n\t}", "@Override\r\n\tpublic void render() {\n\t\t\r\n\t}", "void setTick(int tick);", "public void render(float partialTicks){\r\n\t\tif(blocks.size() > 0 && enabled){\r\n\t\t\tfor(int i = 0; i < blocks.size();i++){\r\n\t\t\t\tblocks.get(i).draw(partialTicks);\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}", "public void tick(double dt) {\n }", "public void tick() {\r\n if (this.ticking == true) {\r\n \t this.ticks++;\r\n //Every 100 ticks is 10 seconds.\r\n //Reset the display.\r\n if (this.ticks == 100) {\r\n if (this.isLocked == false) {\r\n this.lockGui.setDisplay(\"Open\");\r\n }\r\n\r\n else {\r\n this.lockGui.setDisplay(\"Locked\");\r\n }\r\n\r\n this.ticking = false;\r\n this.entered = \"\";\r\n }\r\n }\r\n }", "@Override\n\tpublic void render() {\n\t\t\n\t}", "public boolean onTick();", "public void update(){\n\t\tsetChanged();\n\t\trender();\n\t\tprintTimer();\n\t}", "private String tick() {\r\n\t\tString out=\"Tick: \"+tile.getTick();\r\n\t\treturn out;\r\n\t}", "@Override\r\n\tpublic void beforeRender(float dt) {\n\r\n\t}", "protected void render(){}", "public void render(float dt) {\n SystemManager.find(RenderAction.class).forEach(ra -> ((RenderAction) ra).render(dt));\n }", "public void render();", "@Override\r\n\tpublic void render() {\n\r\n\t}", "private void render() {\n\n if (state == STATE.PAUSE) {\n\n return;\n }\n\n\n if (state == STATE.MENU) {\n\n menu.draw();\n arrow.render();\n return;\n\n }\n\n if (state == STATE.INSTRUCTIONS) {\n instructions.draw();\n return;\n }\n\n for (int i = 0; i < spaceShips.size(); i++) {\n spaceShips.get(i).render();\n }\n\n\n for (Enemy enemy : enemies) {\n enemy.render();\n }\n\n for (int i = 0; i < powerUps.size(); i++) {\n\n powerUps.get(i).render();\n }\n\n for (int i = 0; i < enemyBullets.size(); i++) {\n\n enemyBullets.get(i).render();\n }\n\n for (int i = 0; i < friendlyBullets.size(); i++) {\n\n friendlyBullets.get(i).render();\n }\n\n topBar.render();\n bottomBar.render();\n fps.render();\n score.render();\n\n\n }", "public void render() {\n GameApp.getSpritebatch().draw(sprite, position.x, position.y, GridSquare.SIZE, GridSquare.SIZE);\n if (active) {\n if (currTime + attack.getAttackDelay() < System.currentTimeMillis() && attackTargets()) {\n\n currTime = System.currentTimeMillis();\n }\n attack.render();\n }\n }", "void tick(long tickSinceStart);", "void tick(long ticksSinceStart);", "void tick(H host, int systemTick);", "@Override\n\tpublic void render () {\n\n\t}", "public void tick()\r\n\t{\r\n\t\tduration = (int) (((Sys.getTime() - lastCall) * resolution) / Sys\r\n\t\t\t\t.getTimerResolution());\r\n\t\tlastCall = Sys.getTime();\r\n\t}", "@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}", "@Override\n public void render(float delta) {\n if(counter>1000) counter = 1;\n super.render(delta);\n myCamera.update();\n myCamera.setCamera(renderer, batch);\n batch.begin();\n backgroundSprite.draw(batch, calculateAlpha()/2);\n batch.end();\n drawCurve();\n drawFlights();\n drawFavouritesAndLegend();\n ab.render();\n clicked = false;\n counter++;\n }", "public final void onWorldTick() {\n onTick();\n }", "public void tick(){\r\n if(timer != 0)\r\n timer++;\r\n }", "public void render () \n\t{ \n\t\trenderWorld(batch);\n\t\trenderGui(batch);\n\t}", "@Override\n\tpublic void Draw(float delta) {\n\t\t\n\t}", "private void render()\n\t{\n\t\ttheta = (float) (velocity.heading() + Math.toRadians(90.0));\n\n\t\t// se baser sur le temps écoulé depuis le lancement\n\t\tf = parent.frameCount / 4;\n\t\tint fi = f + 1;\n\t\tfloat x = fi % DIM * W;\n\t\tfloat y = fi / DIM % DIM * H;\n\n\t\tparent.pushMatrix();\n\t\tparent.translate(location.x, location.y);\n\t\tparent.rotate(theta);\n\t\tparent.beginShape();\n\t\tparent.texture(spritesheet);\n\t\tparent.vertex(0, 0, x, y);\n\t\tparent.vertex(100, 0, x + W, y);\n\t\tparent.vertex(100, 100, x + W, y + H);\n\t\tparent.vertex(0, 100, x, y + H);\n\t\tparent.endShape();\n\t\tparent.popMatrix();\n\t}", "public void cycleOutput(long tick)\n {\n }", "private void render() {\n\n StateManager.getState().render();\n }", "public void onTick() {\r\n if (this.worklist.size() > 0) {\r\n ArrayList<ACell> tempWorklist = new ArrayList<ACell>();\r\n for (ACell c : this.worklist) {\r\n tempWorklist.add(c);\r\n }\r\n this.worklist = new ArrayList<ACell>();\r\n this.collector(tempWorklist);\r\n }\r\n else if (this.allCellsFlooded()) {\r\n if (this.worklist.size() > 0) {\r\n this.worklist = new ArrayList<ACell>();\r\n }\r\n this.drawWin();\r\n }\r\n else if (this.currTurn >= this.maxTurn) {\r\n if (this.worklist.size() > 0) {\r\n this.worklist = new ArrayList<ACell>();\r\n }\r\n this.drawLose();\r\n }\r\n }", "@Override\r\n public void draw() {\n }", "public static void tick() {\n control.tick();\n drive.tick();\n shoot.tick();\n shittake.tick();\n }", "public void render() {\n this.canvas.repaint();\n }", "public static void run()\r\n\t{\r\n\t\tlong lastTime = System.nanoTime();\r\n\t\tdouble nsPerTick = 1000000000D / 30D;\r\n\t\t\r\n\t\tlong lastTimer = System.currentTimeMillis();\r\n\t\tdouble delta = 0; \r\n\r\n\t\twhile(isRunning)\r\n\t\t{\r\n\t\t\tlong now = System.nanoTime();\r\n\t\t\tdelta += (now - lastTime) / nsPerTick;\r\n\t\t\tlastTime = now;\r\n\t\t\t\r\n\t\t\twhile(delta >= 1)\r\n\t\t\t{\r\n\t\t\t\tdisplay.update();\r\n\t\t\t\tdisplay.render();\r\n\t\t\t\tdelta -= 1;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(System.currentTimeMillis() - lastTimer > 1000)\r\n\t\t\t{\r\n\t\t\t\tlastTimer += 1000;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic void paint(float deltaTime) {\n\t\t\r\n\t}", "@Override\n\tpublic void render(SpriteBatch batch) {\n\t}", "protected void customCustomRendering(T entity, double x, double y, double z, float entityYaw, float partialTicks) {}", "@SideOnly(Side.CLIENT)\n private void channelTickClient()\n {\n }", "void onRenderTick() {\n \t\tif (zCalc == null || !zCalc.isAlive()) {\n \t\t\tzCalc = new Thread(this);\n \t\t\tzCalc.start();\n \t\t}\n \t\tif (Minecraft.theMinecraft != null && Minecraft.theMinecraft.theWorld != null) {\n \t\t\tif (!Minecraft.theMinecraft.theWorld.isRemote){\n \t\t\t\ttryARender();\n \t\t\t}\n \n \t\t}\n \t}", "public void run() {\r\n\t\tint frames = 0;\r\n\t\tdouble unprocessedSeconds = 0;\r\n\t\tlong previousTime = System.nanoTime();\r\n\t\tdouble secondsPerTick = 1 / 60.0;\r\n\t\tint tickCount = 0;\r\n\t\tboolean ticked = false;\r\n\t\t\r\n\t\twhile (running) {\r\n\t\t\tlong currentTime = System.nanoTime();\r\n\t\t\tlong passedTime = currentTime - previousTime;\r\n\t\t\tpreviousTime = currentTime;\r\n\t\t\tunprocessedSeconds += passedTime / 1000000000.0;\r\n\t\t\trequestFocus();//has the window selected when program is lanched\r\n\r\n\t\t\twhile (unprocessedSeconds > secondsPerTick) {\r\n\t\t\t\tunprocessedSeconds -= secondsPerTick;\r\n\t\t\t\tticked = true;\r\n\t\t\t\ttickCount++;\r\n\t\t\t\tif (tickCount % 3 == 0) {//calls on tick 20x/second\r\n\t\t\t\t\ttick();\r\n\t\t\t\t\tnumberOfTicks++;\r\n\t\t\t\t}\r\n\t\t\t\tif (tickCount % 60 == 0) {\r\n\t\t\t\t\t//System.out.println(frames + \"fps\");\r\n\t\t\t\t\tfps = frames;\r\n\t\t\t\t\tpreviousTime += 1000;\r\n\t\t\t\t\tframes = 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\trender();\r\n\t\t\tframes++;\r\n\t\t}\r\n\t}", "public void run(){\n\t\tdouble target = 60.0;\n double nsPerTick = 1000000000.0 / target;\n long lastTime = System.nanoTime();\n long timer = System.currentTimeMillis();\n double unprocessed = 0.0;\n int fps = 0;\n int tps = 0;\n boolean canRender = false;\n \n while (running) {\n long now = System.nanoTime();\n unprocessed += (now - lastTime) / nsPerTick;\n lastTime = now;\n \n if(unprocessed >= 1.0){\n tick();\n unprocessed--;\n tps++;\n canRender = true;\n }else canRender = false;\n \n try {\n Thread.sleep(1);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n \n if(canRender){\n //render\n \trender();\n fps++;\n }\n \n if(System.currentTimeMillis() - 1000 > timer){\n timer += 1000;\n System.out.printf(\"FPS: %d | TPS: %d\\n\", fps, tps);\n fps = 0;\n tps = 0;\n }\n \n }\n \n System.exit(0);\n\t}", "private void render() {\n if (game.isEnded()) {\n if (endGui == null) {\n drawEndScreen();\n }\n\n return;\n }\n\n drawScore();\n drawSnake();\n drawFood();\n }", "@Override\n public void render() {\n super.render();\n }", "@Override\n public void render() {\n super.render();\n }", "private void render() {\n\t\tBufferStrategy bs = this.getBufferStrategy();\r\n\t\tif (bs == null) {\r\n\t\t\tcreateBufferStrategy(3);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t//Initiates Graphics class using bufferStrategy\r\n\t\tGraphics g = bs.getDrawGraphics();\r\n\t\t\r\n\t\t//displays img on screen\r\n\t\tg.drawImage(img, 0, 0, null);\r\n\t\t\r\n\t\tg.setColor(Color.CYAN);\r\n\t\tg.drawString(fps + \" FPS\", 10, 10);\r\n\t\tg.setFont(new Font(\"Arial\", 0, 45));\r\n\r\n\t\tg.dispose();//clears graphics\r\n\t\tbs.show();//shows graphics\r\n\t}", "@Override\r\n\tpublic void draw(Batch batch)\r\n\t{\n\t\t\r\n\t\tif(m_texRegion.isFlipX() && m_rightDirection)\r\n\t\t\tm_texRegion.flip(true, false);\r\n\t\telse if(!m_texRegion.isFlipX() && !m_rightDirection)\r\n\t\t\tm_texRegion.flip(true, false);\r\n\r\n\t\tif(this.m_isInvulnerable)\r\n\t\t\tbatch.setColor(1,1,1,0.5f);\r\n\t\telse\r\n\t\t\tbatch.setColor(new Color(Color.WHITE));\r\n\r\n\t\tthis.updateTransform();\r\n\t\tbatch.draw(m_texRegion, this.getDimension().x, this.getDimension().y, this.getTransform());\r\n\r\n\t\tbatch.setColor(new Color(Color.WHITE));\r\n\r\n\r\n\t\tm_lifeBar.setLife((int) this.m_life);\r\n\t\tm_lifeBar.setPosition(this.getPosition().add(0, 64));\r\n\t\tm_lifeBar.draw(batch);\r\n\t\t\r\n\t}", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "@Override\n\tpublic void render () {\n super.render();\n\t}", "@Override\n\tpublic void draw() {\n\n\t}", "@Override\n\tpublic void draw() {\n\n\t}", "public void tick() {\n if (showTutorial) {\n if (backButton.isPressed()) {\n showTutorial = false;\n }\n } else {\n if (tutorialButton.isPressed()) {\n showTutorial = true;\n }\n titleAnimation.tick();\n }\n startButton.tick();\n highscoreButton.tick();\n tutorialButton.tick();\n backButton.tick();\n }" ]
[ "0.81497926", "0.77320844", "0.75920326", "0.74602896", "0.74602896", "0.7427159", "0.74162394", "0.73340166", "0.7300047", "0.7300047", "0.7300047", "0.7300047", "0.7300047", "0.7300047", "0.7300047", "0.72798574", "0.7254559", "0.7254559", "0.72328573", "0.72328573", "0.72328573", "0.7202281", "0.7191949", "0.71531314", "0.70320606", "0.70320606", "0.7008165", "0.699835", "0.68886447", "0.6883418", "0.6877429", "0.68675125", "0.6829542", "0.6814195", "0.68062085", "0.6798831", "0.6787773", "0.67559624", "0.6754003", "0.6731351", "0.6710216", "0.67078686", "0.67037576", "0.6681352", "0.66748613", "0.66743165", "0.6666903", "0.6665617", "0.6641011", "0.6637703", "0.66200554", "0.66086036", "0.6598507", "0.65920323", "0.65821385", "0.6580006", "0.65685385", "0.65618175", "0.6542882", "0.6497955", "0.6495993", "0.64956236", "0.6493114", "0.6491036", "0.64902514", "0.6487947", "0.6436853", "0.64348936", "0.64341146", "0.64341146", "0.64332116", "0.6423434", "0.64009327", "0.6399658", "0.6351779", "0.63501644", "0.634543", "0.6331635", "0.6318146", "0.62980276", "0.6297435", "0.62951154", "0.628518", "0.62780195", "0.62691706", "0.6264824", "0.62609494", "0.62600374", "0.6259269", "0.6248142", "0.62463695", "0.6239847", "0.6239847", "0.6235767", "0.62262577", "0.6226011", "0.6226011", "0.6223362", "0.62218463", "0.62218463", "0.621876" ]
0.0
-1
Construct a list iterator for the specified array.
public ArrayListIterator(E... array) { this(array, 0, array.length); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ArrayListIterator(E[] array, int start, int length) {\r\n\t\tsuper(array, start, length);\r\n\t\tthis.minIndex = start;\r\n\t}", "public ArrayIntListIterator iterator() {\n\t return new ArrayIntListIterator(this);\n\t }", "public static Iterator buildIterator(Object[] paramArrayOfObject)\n/* */ {\n/* 122 */ if ((paramArrayOfObject == null) || (paramArrayOfObject.length == 0)) {\n/* 123 */ return ArrayRangeIterator.EMPTY_ITERATOR;\n/* */ }\n/* 125 */ return new SparseArrayIterator(paramArrayOfObject);\n/* */ }", "public ObjectArrayIterator(final E array[], final int start) {\n this(array, start, array.length);\n }", "public JaggedArrayIterator(int[][] array) {\n this.array = array;\n }", "public static ListUtilities arrayToList(int[] array){\n\t\tListUtilities startNode = new ListUtilities();\n\t\tif (array.length != 0){\n\t\t\tstartNode.setInt(array[0]);\n\t\t\tfor (int i = 1; i < array.length; i++){\n\t\t\t\tstartNode.addNum(array[i]);\n\t\t\t}\n\t\t}\n\t\treturn startNode;\n\t}", "@SafeVarargs\n public ObjectArrayIterator(final E... array) {\n this(array, 0, array.length);\n }", "public ArraySpliterator(Object[] param1ArrayOfObject, int param1Int1, int param1Int2, int param1Int3) {\n/* 926 */ this.array = param1ArrayOfObject;\n/* 927 */ this.index = param1Int1;\n/* 928 */ this.fence = param1Int2;\n/* 929 */ this.characteristics = param1Int3 | 0x40 | 0x4000;\n/* */ }", "private ArrayRangeIterator(Object[] paramArrayOfObject, int paramInt1, int paramInt2)\n/* */ {\n/* 60 */ this.m_array = paramArrayOfObject;\n/* 61 */ this.m_offset = paramInt1;\n/* 62 */ this.m_limit = paramInt2;\n/* */ }", "public static Iterator buildIterator(Object[] paramArrayOfObject, int paramInt1, int paramInt2)\n/* */ {\n/* 113 */ if ((paramArrayOfObject == null) || (paramInt1 >= paramInt2)) {\n/* 114 */ return EMPTY_ITERATOR;\n/* */ }\n/* 116 */ return new ArrayRangeIterator(paramArrayOfObject, paramInt1, paramInt2);\n/* */ }", "public ReverseArrayIntIterator(int[] array) {\n this(array, 0, array.length);\n }", "public Iterator<Item> iterator(){\n return new ArrayIterator();\n }", "@Override\n public Iterator<E> iterator() {\n return new ArrayIterator(); // create a new instance of the inner class\n }", "public Iterator<T> iterator() {\r\n return new ArrayIterator(elements, size);\r\n }", "public Iterator<T> iterator(){\r\n\t\treturn new ChainedArraysIterator();\r\n\t}", "public IntArraySpliterator(int[] param1ArrayOfint, int param1Int1, int param1Int2, int param1Int3) {\n/* 1011 */ this.array = param1ArrayOfint;\n/* 1012 */ this.index = param1Int1;\n/* 1013 */ this.fence = param1Int2;\n/* 1014 */ this.characteristics = param1Int3 | 0x40 | 0x4000;\n/* */ }", "public Iterator<Item> iterator() {\n Item[] temp = (Item[]) new Object[size];\n System.arraycopy(array, 0, temp, 0, size);\n return (new RandomIterator(temp));\n }", "public Iterator<Item> iterator() {\n return new ArrayIterator();\n }", "public Iterator<Item> iterator() {\n return new ArrayIterator();\n }", "public Iterator<Item> iterator() {\n return new ArrayIterator();\n }", "public Iterator<Item> iterator() {\n return new ArrayIterator();\n }", "public LongArraySpliterator(long[] param1ArrayOflong, int param1Int1, int param1Int2, int param1Int3) {\n/* 1094 */ this.array = param1ArrayOflong;\n/* 1095 */ this.index = param1Int1;\n/* 1096 */ this.fence = param1Int2;\n/* 1097 */ this.characteristics = param1Int3 | 0x40 | 0x4000;\n/* */ }", "@Override\n\tpublic Iterator<NumberInterface> createIterator() {\n\t\treturn numbers.iterator();\n\t}", "public SimpleArrayList(E[] array) {\n this.values = Arrays.copyOf(array, array.length);\n this.index = this.values.length;\n }", "static List<Integer> arrayToList(int[] array) {\r\n List<Integer> list = new ArrayList<Integer>();\r\n for(int i : array)\r\n list.add(i);\r\n return list;\r\n }", "@Override\n public Iterator<T> iterator() {\n return new Iterator<T>() {\n int index = 0;\n\n @Override\n public boolean hasNext() {\n return index < size;\n }\n\n @Override\n public T next() {\n return genericArrayList[index++];\n }\n\n @Override\n public void remove() {\n throw new UnsupportedOperationException();\n }\n };\n }", "public abstract Iterator<E> createIterator();", "private List<Integer> toList(int[] array) {\n List<Integer> list = new LinkedList<Integer>();\n for (int item : array) {\n list.add(item);\n }\n return list;\n }", "Iteration(T[] array, int amount) { \r\n items = array;\r\n count = amount;\r\n now = 0;\r\n }", "public Iterator<Entry> iterator() {\n return new ArrayIterator<Entry>(fEntries);\n }", "IArray getArrayNext() throws InvalidRangeException;", "public ChainedArraysIterator(){\r\n\t\t\tcurrentNode = beginMarker.next;\r\n\t\t\tcurrent = currentNode.getFirst();\r\n\t\t\tidx = 0;\r\n\t\t\texpectedModCount=modCount;\r\n\t\t}", "public ReverseArrayIntIterator(int[] array, int from, int to) {\n if (to < from) {\n throw new IllegalArgumentException();\n }\n if (from < 0) {\n throw new IllegalArgumentException();\n }\n if (to > array.length) {\n throw new IllegalArgumentException();\n }\n this.array = Check.notNull(array);\n this.index = to;\n this.from = from;\n }", "public ObjectArrayIterator(final E array[], final int start, final int end) {\n if (start < 0) {\n throw new ArrayIndexOutOfBoundsException(\"Start index must not be less than zero\");\n }\n if (end > array.length) {\n throw new ArrayIndexOutOfBoundsException(\"End index must not be greater than the array length\");\n }\n if (start > array.length) {\n throw new ArrayIndexOutOfBoundsException(\"Start index must not be greater than the array length\");\n }\n if (end < start) {\n throw new IllegalArgumentException(\"End index must not be less than start index\");\n }\n this.array = array;\n this.startIndex = start;\n this.endIndex = end;\n this.index = start;\n }", "@Override\n\tpublic Iterator<T> iterator() {\n\t\treturn new CircularArrayIterator<T>(this);\n\t}", "public ArrayIterator() {\n next = first;\n }", "public ArrayListOfIntsWritable(int[] arr)\n {\n super(arr);\n }", "@Override\n public Iterator<T> iterator() {\n return new Iterator<T>(){\n private int ci = 0;\n \n /**\n * Checks if ArrayList has next element \n * @return \n */\n public boolean hasNext(){\n return ci < size;\n }\n \n /**\n * Returns next element and moves iterator forward\n * @return \n */\n public T next(){\n return (T)data[ci++];\n }\n \n /**\n * Does nothing\n */\n public void remove(){\n \n }\n };\n }", "@Override\n public Iterator<E> iterator() {\n return new SimpleArrayListIterator<E>();\n }", "public ImmutableList(T[] array) {\r\n this(array,0,array.length);\r\n }", "@Override\n\tpublic Iterator<T> iterator() {\n\t\treturn new CircularArrayIterator<T>(items);\n\t}", "public Iterator<Coord> iterator() {\n\t\treturn new CoordListIterator(array, index);\n\t}", "public static Spliterator.OfLong spliterator(long[] paramArrayOflong, int paramInt) {\n/* 268 */ return new LongArraySpliterator(Objects.<long[]>requireNonNull(paramArrayOflong), paramInt);\n/* */ }", "@SuppressWarnings(\"unchecked\")\n private <X> Iterator<X> itx(Iterator<X>[] ita) {\n if (ita == null || ita.length == 0) \n return (Iterator<X>)Arrays.stream(ofDim(Iterator.class,0)).iterator();\n return new Iterator<X>() {\n private int i = 0;\n public boolean hasNext() {\n while ( i < ita.length && !ita[i].hasNext()) i++;\n return i < ita.length;\n }\n public X next() {\n while ( i < ita.length && !ita[i].hasNext()) i++;\n return ita[i].next();\n }\n };\n }", "public static Spliterator.OfInt spliterator(int[] paramArrayOfint, int paramInt) {\n/* 206 */ return new IntArraySpliterator(Objects.<int[]>requireNonNull(paramArrayOfint), paramInt);\n/* */ }", "public RubyArray(Ruby ruby) {\n \t\tthis(ruby, new ArrayList());\n \t}", "public static List<Integer> asList(int[] array) {\n\t\treturn new IntList(array);\n\t}", "OrderedIntList ()\r\n\t{\r\n\t\tarray = new int[10];\r\n\t}", "public static ListNode arrayToList(int[] array) {\n if (array == null || array.length == 0) {\n return null;\n }\n ListNode head = new ListNode(array[0]);\n ListNode current = head;\n for (int index = 1; index < array.length; index++) {\n current.next = new ListNode(array[index]);\n current = current.next;\n }\n return head;\n}", "private RubyArray(Ruby runtime, IRubyObject[] vals, int begin) {\n super(runtime, runtime.getArray());\n this.values = vals;\n this.begin = begin;\n this.realLength = vals.length - begin;\n this.isShared = true;\n }", "public T[] next();", "IteratorExp createIteratorExp();", "@Override\n public Iterator<T> iterator() {\n return new MyArrayList.MyIterator();\n }", "public DoubleArraySpliterator(double[] param1ArrayOfdouble, int param1Int1, int param1Int2, int param1Int3) {\n/* 1177 */ this.array = param1ArrayOfdouble;\n/* 1178 */ this.index = param1Int1;\n/* 1179 */ this.fence = param1Int2;\n/* 1180 */ this.characteristics = param1Int3 | 0x40 | 0x4000;\n/* */ }", "public AntiClockwiseSpiralIterator(E[][] array){\n list = new ArrayList<E>();\n row = array.length;\n column = array[0].length;\n\n int total = row * column;\n int counter = 0;\n\n while(x < row && y < column){\n if(counter == total)\n break;\n\n for(int i = x; i < row; ++i){\n list.add(array[i][y]);\n counter++;\n }\n y++;\n\n if(counter == total)\n break;\n\n for(int i = y; i < column; ++i){\n list.add(array[row-1][i]);\n counter++;\n }\n row--;\n\n if(counter == total)\n break;\n\n if(x < row){\n for(int i = row-1; i >= x; --i){\n list.add(array[i][column-1]);\n counter++;\n }\n column--;\n }\n\n if(counter == total)\n break;\n\n if(y < column){\n for(int i = column-1; i >= y; --i){\n list.add(array[x][i]);\n counter++;\n }\n x++;\n }\n }\n\n iterator = list.iterator();\n }", "Array createArray();", "public MyArrayList(int i) {\n if(i <= 0) {\n System.out.println(\"Negative number given please try again\");\n return;\n }\n\n this.arrayList = new Object[i];\n this.elementsInArray = 0;\n this.size = i;\n }", "public static <T> Spliterator<T> spliterator(Object[] paramArrayOfObject, int paramInt) {\n/* 142 */ return new ArraySpliterator<>(Objects.<Object[]>requireNonNull(paramArrayOfObject), paramInt);\n/* */ }", "Array(int[] n) {\n\t\tarray = n;\n\t}", "public CollectionPermutationIter(List<E> objectsArray)\r\n/* */ {\r\n/* 96 */ this(objectsArray, new IntegerPermutationIter(objectsArray.size()));\r\n/* */ }", "public IntArrayProcessor(int[] array)\n {\n integers = array;\n }", "public ArgList(Object[] argList, int offset) {\n super(argList == null ? 0 : argList.length - offset);\n if (argList != null) {\n for (int i = offset; i < argList.length; i++)\n addElement(argList[i]);\n }\n }", "@Override\n public Iterator<Integer> iterator() {\n return new Iterator<>() {\n int i = 0;\n\n @Override\n public boolean hasNext() {\n return i < Set.this.count;\n }\n\n @Override\n public Integer next() {\n return Set.this.arr[i++];\n }\n };\n }", "public Iterator<Object[]> getIterator()\n\t{\n\t\tinit();\n\t\t\n\t\treturn new SimpleIterator();\n\t}", "public static Spliterator.OfLong spliterator(long[] paramArrayOflong, int paramInt1, int paramInt2, int paramInt3) {\n/* 305 */ checkFromToBounds(((long[])Objects.requireNonNull((T)paramArrayOflong)).length, paramInt1, paramInt2);\n/* 306 */ return new LongArraySpliterator(paramArrayOflong, paramInt1, paramInt2, paramInt3);\n/* */ }", "void mo9148a(int i, ArrayList<C0889x> arrayList);", "public singlyListNode constructFromArray(int[] a){\n this.head = new singlyListNode(a[0], null);\n singlyListNode ptr = this.head;\n this.listSize = 1;\n for (int i = 1; i < a.length; i ++){\n ptr.setNextNode(a[i]);\n ptr = ptr.getNextNode();\n this.listSize ++;\n }\n this.tail = ptr;\n return this.head;\n }", "public MyArrayList()\n\t{\n\t\tmyArray = new Object[StartSize];\n\t}", "public ListNode(int[] arr){\n if (arr == null || arr.length == 0){\n throw new IllegalArgumentException(\"arr can not be empty\");\n }\n\n this.val = arr[0];\n ListNode cur = this;\n for(int i = 1;i < arr.length;i++){\n cur.next = new ListNode(arr[i]);\n cur = cur.next;\n }\n }", "@Override\n public Iterator<E> iterator() {\n return new Iterator<E>() {\n private int nextIndex = 0;\n private int lastNextIndex = -1;\n private int rest = size();\n\n @Override\n public boolean hasNext() {\n return rest > 0;\n }\n\n @Override\n public E next() {\n if(!hasNext()){\n throw new NoSuchElementException();\n }\n rest--;\n lastNextIndex = nextIndex++;\n siftDown(nextIndex);\n\n return (E) array[lastNextIndex];\n }\n\n @Override\n public void remove() {\n if (lastNextIndex == -1) {\n throw new IllegalStateException();\n }\n removeElement(lastNextIndex);\n nextIndex--;\n lastNextIndex = -1;\n }\n };\n }", "public static Spliterator.OfInt spliterator(int[] paramArrayOfint, int paramInt1, int paramInt2, int paramInt3) {\n/* 239 */ checkFromToBounds(((int[])Objects.requireNonNull((T)paramArrayOfint)).length, paramInt1, paramInt2);\n/* 240 */ return new IntArraySpliterator(paramArrayOfint, paramInt1, paramInt2, paramInt3);\n/* */ }", "public Iterator<Item> iterator() { return new ListIterator(); }", "@Override\n\t\t\tpublic Iterator<Integer> iterator() {\n\t\t\t\treturn new Iterator<Integer>() {\n\n\t\t\t\t\tint index = -1;\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void remove() {\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic Integer next() {\n\t\t\t\t\t\tif (index >= length)\n\t\t\t\t\t\t\tthrow new RuntimeException();\n\t\t\t\t\t\treturn offset + index * delta;\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic boolean hasNext() {\n\t\t\t\t\t\treturn ++index < length;\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}", "@Override\n\tpublic Iterator createIterator() {\n\t\treturn new WeaponListIterator(weaponList);\n\t}", "public Stmt\ninitiateArray(\n Exp pArray, Exp pInitExp,\n Exp pFrom, Exp pTo, Subp pSubp );", "public abstract void startArray();", "public T[] next(){\n\n if(hasNext()){\n int numElements = Math.min(window,lst.length - currentIndex);\n ArrayList<T> returnElements = new ArrayList<T>(numElements);\n for(int i = currentIndex; i < currentIndex + window && i < lst.length; i++ ){\n returnElements.add(lst[i]);\n if(i == lst.length-1){\n hasMore = Boolean.FALSE;\n }\n }\n currentIndex += step;\n return returnElements.toArray((T[]) Array.newInstance(returnElements.get(0).getClass(),0));\n }else{\n throw new NoSuchElementException(\"no elements to iterate \");\n }\n\n }", "public ArrayAccessor() {\r\n super(\"<array>\");\r\n }", "public static Node arrayToLinkedList(int[] array) {\n Node prev = null;\n for (int i=array.length-1; i>=0; i--) {\n Node temp = new Node(array[i]);\n temp.next = prev;\n prev = temp;\n }\n return prev;\n }", "public ArrayList(Object[] e){\n this();\n for(Object i : e){\n this.add((T)i);\n }\n }", "Iterable<T> list();", "public Iterator<Item> iterator() {\n return new RandomizedArrayIterator();\n }", "public static <T> Spliterator<T> spliterator(Object[] paramArrayOfObject, int paramInt1, int paramInt2, int paramInt3) {\n/* 177 */ checkFromToBounds(((Object[])Objects.requireNonNull((T)paramArrayOfObject)).length, paramInt1, paramInt2);\n/* 178 */ return new ArraySpliterator<>(paramArrayOfObject, paramInt1, paramInt2, paramInt3);\n/* */ }", "@SafeVarargs\n public Array(T... items)\n {\n this.array = items;\n this.next = items.length;\n }", "public LexicalIterator(String pname,TraceLexicon lex, FileLocator loc, boolean rando, Expression[] e){\n super(e);\n parameterName=\"modelInput\";\n list=lex;\n isRandomized=rando;\n if(null == list)\n numIncrements=-1; \n else\n numIncrements=list.size();\n currentIncrement=0;\n expressions=e;\n locator=loc;\n if(null == list) hasNext=false; \n else if(currentIncrement<list.size()) hasNext=true;\n else hasNext=false;\n }", "public static <T> Iterable<T> iter(final Iterator<T> i) {\n\t\treturn new Iterable<T>() {\n\n\t\t\t@Override\n\t\t\tpublic Iterator<T> iterator() {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t};\n\t}", "public FlightIterator createIterator() {\r\n\t\treturn new FlightIterator(flights);\r\n\t}", "public Iterator <item_t> iterator () {\n return new itor ();\n }", "public Iterator<E> iterator()\n {\n return new MyListIterator();\n }", "@Override\r\n public Iterator iterator(){\n return new MyIterator(this);\r\n }", "public Iterator<T> iterator() {\n return new ListIterator<T>(this);\n }", "public Iterator<T> iterator() {\n return new ListIterator<T>(this);\n }", "@Override\n public Iterator<E> iterator() {\n\n Iterator<E> myIt = new Iterator<E>() {\n\n private int currIndex = head;\n\n @Override\n public boolean hasNext() {\n if (currIndex < ringArray.length && ringArray[currIndex] != null) { //Checking if we got to the end and if there are no null elements\n return false;\n }\n return true;\n }\n\n @Override\n public E next() {\n if (!hasNext()) //If there isnt another element then throw an exception\n throw new NoSuchElementException(\"No element\");\n Object nextElement = ringArray[currIndex]; //Getting the next element\n currIndex--; //Decrease the current index by one\n if (currIndex < 0) //If we get to the beginning of the\n currIndex = ringArray.length - 1;\n return (E) nextElement;\n }\n\n @Override\n public void remove() throws UnsupportedOperationException {\n throw new UnsupportedOperationException(\"Remove is not supported\");\n }\n };\n return myIt;\n }", "public static void convertIntArrayToList() {\n\t\tint[] inputArray = { 0, 3, 7, 1, 7, 9, 11, 6, 3, 5, 2, 13, 14 };\n\n\t\t// ********** 1 *************\n\t\tList<Integer> list = Arrays.stream(inputArray) // IntStream\n\t\t\t\t.boxed() // Stream<Integer>\n\t\t\t\t.collect(Collectors.toList());\n\t\tSystem.out.println(list);\n\n\t\t// ********** 2 *************\n\t\tList<Integer> list_2 = IntStream.of(inputArray) // returns IntStream\n\t\t\t\t.boxed().collect(Collectors.toList());\n\t\tSystem.out.println(list_2);\n\t}", "public abstract ucar.array.RangeIterator getRangeIterator();", "public FancyArray(Object[] arr) {\r\n\t\t/*\r\n\t\t * Statt eines Konstruktors der Oberklasse kann ich auch\r\n\t\t * einen anderen Konstruktor der Klasse selbst aufrufen!\r\n\t\t * \r\n\t\t * Auch dazu benutzen wir das Schlüsselwort this,\r\n\t\t * so rufen wir den parameterlosen Konstruktor auf -\r\n\t\t * so kann ich auch Konstruktoren der gleichen Klasse verketten\r\n\t\t */\r\n\t\tthis();\r\n\t\t//nach dem Aufruf wird dieser Konstruktor weiter ausgeführt:\r\n\t\taddAll(arr);\r\n\t}", "testarray() {\r\n \tarrayList = new Arraylist();\t\r\n\t}", "ArrayValue createArrayValue();", "public Iterator<Item> iterator() {\n return new RandomArrayIterator();\n }", "private static Object[] m59444a(Iterable<?> iterable, Object[] objArr) {\n int i = 0;\n for (Object obj : iterable) {\n int i2 = i + 1;\n objArr[i] = obj;\n i = i2;\n }\n return objArr;\n }" ]
[ "0.6574298", "0.6380649", "0.62966055", "0.6234194", "0.6154118", "0.60932124", "0.6065959", "0.59865", "0.5949874", "0.59498256", "0.59154034", "0.59137034", "0.5822169", "0.5785476", "0.5734677", "0.572265", "0.5584229", "0.55368793", "0.55368793", "0.55368793", "0.55368793", "0.55314493", "0.55175734", "0.5491384", "0.5451748", "0.5448792", "0.5448171", "0.5433894", "0.5409604", "0.53952646", "0.5393576", "0.53880215", "0.53764117", "0.53714573", "0.53607166", "0.5356825", "0.53161305", "0.52834475", "0.52792156", "0.52736485", "0.52577305", "0.5233613", "0.5225991", "0.52204883", "0.52187", "0.521619", "0.5206553", "0.5203888", "0.51964813", "0.5191869", "0.5183269", "0.518264", "0.5173135", "0.5154907", "0.5120692", "0.5087965", "0.50636154", "0.5054476", "0.50501657", "0.50383234", "0.5034685", "0.50334966", "0.49917278", "0.49670812", "0.49660972", "0.4954124", "0.4942899", "0.49423134", "0.4940463", "0.49348438", "0.49300638", "0.49275467", "0.4922738", "0.49159124", "0.49057436", "0.48964217", "0.4886252", "0.4870342", "0.486852", "0.48590344", "0.48584753", "0.48429823", "0.4842439", "0.4839146", "0.483839", "0.483317", "0.48324046", "0.48322186", "0.48283732", "0.48108894", "0.48074532", "0.48074532", "0.48063892", "0.48027956", "0.4796425", "0.47908804", "0.4783931", "0.47803777", "0.4779656", "0.4777259" ]
0.6882212
0
Construct a list iterator for the specified array, starting at the specified start index and continuing for the specified length.
public ArrayListIterator(E[] array, int start, int length) { super(array, start, length); this.minIndex = start; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ObjectArrayIterator(final E array[], final int start) {\n this(array, start, array.length);\n }", "private ArrayRangeIterator(Object[] paramArrayOfObject, int paramInt1, int paramInt2)\n/* */ {\n/* 60 */ this.m_array = paramArrayOfObject;\n/* 61 */ this.m_offset = paramInt1;\n/* 62 */ this.m_limit = paramInt2;\n/* */ }", "public ArrayIntListIterator iterator() {\n\t return new ArrayIntListIterator(this);\n\t }", "public static Iterator buildIterator(Object[] paramArrayOfObject, int paramInt1, int paramInt2)\n/* */ {\n/* 113 */ if ((paramArrayOfObject == null) || (paramInt1 >= paramInt2)) {\n/* 114 */ return EMPTY_ITERATOR;\n/* */ }\n/* 116 */ return new ArrayRangeIterator(paramArrayOfObject, paramInt1, paramInt2);\n/* */ }", "public ObjectArrayIterator(final E array[], final int start, final int end) {\n if (start < 0) {\n throw new ArrayIndexOutOfBoundsException(\"Start index must not be less than zero\");\n }\n if (end > array.length) {\n throw new ArrayIndexOutOfBoundsException(\"End index must not be greater than the array length\");\n }\n if (start > array.length) {\n throw new ArrayIndexOutOfBoundsException(\"Start index must not be greater than the array length\");\n }\n if (end < start) {\n throw new IllegalArgumentException(\"End index must not be less than start index\");\n }\n this.array = array;\n this.startIndex = start;\n this.endIndex = end;\n this.index = start;\n }", "Iterator<T> iterator(int start, int limit);", "public abstract void startArray();", "public IRubyObject subseq(long beg, long len) {\n if (beg < 0 || beg > getSize() || len < 0) {\n getRuntime().getNil();\n }\n \n if (beg + len > getSize()) {\n len = getSize() - beg;\n }\n if (len < 0) {\n len = 0;\n }\n if (len == 0) {\n return getRuntime().newArray();\n }\n \n RubyArray arr = getRuntime().newArray(0);\n for (long i = beg; i < beg + len; i++) {\n arr.append(group(i));\n }\n return arr;\n }", "public static Iterator buildIterator(Object[] paramArrayOfObject)\n/* */ {\n/* 122 */ if ((paramArrayOfObject == null) || (paramArrayOfObject.length == 0)) {\n/* 123 */ return ArrayRangeIterator.EMPTY_ITERATOR;\n/* */ }\n/* 125 */ return new SparseArrayIterator(paramArrayOfObject);\n/* */ }", "@Test\n public void testListIterator_valid_index_From_Start() {\n int index = 0;\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator(index);\n assertTrue(isEqual(instance, baseList));\n\n }", "public Iterator<T> iterator() {\r\n return new ArrayIterator(elements, size);\r\n }", "ListIter (int index){\n int blockNum=0;\n int aggSize=0;\n while (aggSize+dataBlocks[blockNum].getSize() <= index){\n aggSize+=dataBlocks[blockNum].getSize();\n blockNum++;\n }\n cursorBlock = blockNum;\n cursorElement = index-aggSize;\n cursor = index;\n }", "public IntegerIterator(final Dataset index, final int length, final int isize) {\n\t\tindices = (IntegerDataset) (index instanceof IntegerDataset ? index : DatasetUtils.convertToDataset(index).cast(Dataset.INT32));\n\t\titer = index.getIterator();\n\t\tistep = isize;\n\t\timax = length*istep;\n\t}", "IArray getArrayNext() throws InvalidRangeException;", "public ReverseArrayIntIterator(int[] array, int from, int to) {\n if (to < from) {\n throw new IllegalArgumentException();\n }\n if (from < 0) {\n throw new IllegalArgumentException();\n }\n if (to > array.length) {\n throw new IllegalArgumentException();\n }\n this.array = Check.notNull(array);\n this.index = to;\n this.from = from;\n }", "public ChainedArraysIterator(){\r\n\t\t\tcurrentNode = beginMarker.next;\r\n\t\t\tcurrent = currentNode.getFirst();\r\n\t\t\tidx = 0;\r\n\t\t\texpectedModCount=modCount;\r\n\t\t}", "public ArrayListIterator(E... array) {\r\n\t\tthis(array, 0, array.length);\r\n\t}", "@Test\n public void testNextIndex_Start() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 3, 4, 5));\n\n ListIterator<Integer> instance = baseList.listIterator();\n int expResult = 0;\n int result = instance.nextIndex();\n\n assertEquals(expResult, result);\n }", "@Override\n\t\t\tpublic Iterator<Integer> iterator() {\n\t\t\t\treturn new Iterator<Integer>() {\n\n\t\t\t\t\tint index = -1;\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void remove() {\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic Integer next() {\n\t\t\t\t\t\tif (index >= length)\n\t\t\t\t\t\t\tthrow new RuntimeException();\n\t\t\t\t\t\treturn offset + index * delta;\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic boolean hasNext() {\n\t\t\t\t\t\treturn ++index < length;\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}", "public ArraySpliterator(Object[] param1ArrayOfObject, int param1Int1, int param1Int2, int param1Int3) {\n/* 926 */ this.array = param1ArrayOfObject;\n/* 927 */ this.index = param1Int1;\n/* 928 */ this.fence = param1Int2;\n/* 929 */ this.characteristics = param1Int3 | 0x40 | 0x4000;\n/* */ }", "public LongArraySpliterator(long[] param1ArrayOflong, int param1Int1, int param1Int2, int param1Int3) {\n/* 1094 */ this.array = param1ArrayOflong;\n/* 1095 */ this.index = param1Int1;\n/* 1096 */ this.fence = param1Int2;\n/* 1097 */ this.characteristics = param1Int3 | 0x40 | 0x4000;\n/* */ }", "public abstract int getStartIndex();", "private RubyArray(Ruby runtime, IRubyObject[] vals, int begin) {\n super(runtime, runtime.getArray());\n this.values = vals;\n this.begin = begin;\n this.realLength = vals.length - begin;\n this.isShared = true;\n }", "public abstract int start(int i);", "public IntegerIterator(final Dataset index, final int length) {\n\t\tthis(index, length, 1);\n\t}", "public Iterator<Item> iterator(){\n return new ArrayIterator();\n }", "public Iterator<Item> iterator() {\n Item[] temp = (Item[]) new Object[size];\n System.arraycopy(array, 0, temp, 0, size);\n return (new RandomIterator(temp));\n }", "@Test\n public void test9() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1355,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test9\");\n LinkedList<String>[] linkedListArray0 = (LinkedList<String>[]) Array.newInstance(LinkedList.class, 8);\n // Undeclared exception!\n try {\n IteratorUtils.arrayListIterator(linkedListArray0, 536);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // Start index must not be greater than the array length\n //\n }\n }", "@Override\n public Iterator<T> iterator() {\n return new Iterator<T>() {\n int index = 0;\n\n @Override\n public boolean hasNext() {\n return index < size;\n }\n\n @Override\n public T next() {\n return genericArrayList[index++];\n }\n\n @Override\n public void remove() {\n throw new UnsupportedOperationException();\n }\n };\n }", "public ImmutableList(T[] array, int from, int size) {\r\n if (from < 0 || size < 0 || from+size > array.length) {\r\n throw new IndexOutOfBoundsException(\"ImmutableList called with bad bounds\");\r\n }\r\n ConsCell<T> t = null;\r\n while (size-- > 0) {\r\n t = new ConsCell<T>(array[from+size],t);\r\n }\r\n head = t;\r\n }", "BooleanIterator iterator(int startIndex);", "public Stmt\ninitiateArray(\n Exp pArray, Exp pInitExp,\n Exp pFrom, Exp pTo, Subp pSubp );", "public abstract ucar.array.RangeIterator getRangeIterator();", "@SuppressWarnings(\"rawtypes\")\r\n public ListIterator listIterator(int index) {\r\n return new ListItr(index);\r\n }", "ILinkedList sublist(int fromIndex, int toIndex);", "public T[] next(){\n\n if(hasNext()){\n int numElements = Math.min(window,lst.length - currentIndex);\n ArrayList<T> returnElements = new ArrayList<T>(numElements);\n for(int i = currentIndex; i < currentIndex + window && i < lst.length; i++ ){\n returnElements.add(lst[i]);\n if(i == lst.length-1){\n hasMore = Boolean.FALSE;\n }\n }\n currentIndex += step;\n return returnElements.toArray((T[]) Array.newInstance(returnElements.get(0).getClass(),0));\n }else{\n throw new NoSuchElementException(\"no elements to iterate \");\n }\n\n }", "public interface ISliceIterator extends IModelObject {\r\n\r\n\t/**\r\n\t * Check if there is next slice.\r\n\t * \r\n\t * @return Boolean type Created on 10/11/2008\r\n\t */\r\n\tboolean hasNext();\r\n\r\n\t/**\r\n\t * Jump to the next slice.\r\n\t * \r\n\t * Created on 10/11/2008\r\n\t */\r\n\tvoid next();\r\n\r\n\t/**\r\n\t * Get the next slice of Array.\r\n\t * \r\n\t * @return GDM Array\r\n\t * @throws InvalidRangeException\r\n\t * Created on 10/11/2008\r\n\t */\r\n\tIArray getArrayNext() throws InvalidRangeException;\r\n\r\n\t/**\r\n\t * Get the current slice of Array.\r\n\t * \r\n\t * @return GDM Array\r\n\t * @throws InvalidRangeException\r\n\t * Created on 10/11/2008\r\n\t */\r\n\tIArray getArrayCurrent() throws InvalidRangeException;\r\n\r\n\t/**\r\n\t * Get the shape of any slice that is returned. This could be used when a\r\n\t * temporary array of the right shape needs to be created.\r\n\t * \r\n\t * @return dimensions of a single slice from the iterator\r\n\t * @throws InvalidRangeException\r\n\t * invalid range\r\n\t */\r\n\tint[] getSliceShape() throws InvalidRangeException;\r\n\t\r\n\t/**\r\n\t * Get the slice position in the whole array from which this slice iterator\r\n\t * was created.\r\n\t * @return <code>int</code> array of the current position of the slice\r\n\t * @note rank of the returned position is the same as the IArray shape we are slicing \r\n\t */\r\n\tpublic int[] getSlicePosition();\r\n}", "public IntArraySpliterator(int[] param1ArrayOfint, int param1Int1, int param1Int2, int param1Int3) {\n/* 1011 */ this.array = param1ArrayOfint;\n/* 1012 */ this.index = param1Int1;\n/* 1013 */ this.fence = param1Int2;\n/* 1014 */ this.characteristics = param1Int3 | 0x40 | 0x4000;\n/* */ }", "public ListIterator<E> listIterator(int index) {\n\t\treturn new LinkedListItr(index);\r\n\t}", "public static ListUtilities arrayToList(int[] array){\n\t\tListUtilities startNode = new ListUtilities();\n\t\tif (array.length != 0){\n\t\t\tstartNode.setInt(array[0]);\n\t\t\tfor (int i = 1; i < array.length; i++){\n\t\t\t\tstartNode.addNum(array[i]);\n\t\t\t}\n\t\t}\n\t\treturn startNode;\n\t}", "public Iterator<Item> iterator() {\n return new ArrayIterator();\n }", "public Iterator<Item> iterator() {\n return new ArrayIterator();\n }", "public Iterator<Item> iterator() {\n return new ArrayIterator();\n }", "public Iterator<Item> iterator() {\n return new ArrayIterator();\n }", "@Test(expected = IndexOutOfBoundsException.class)\n public void testListIterator_Invalid_Index_Size() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n baseList.listIterator(baseList.size());\n }", "Iteration(T[] array, int amount) { \r\n items = array;\r\n count = amount;\r\n now = 0;\r\n }", "public BoundedIterator(List<? extends T> list, int start, int end)\n {\n iter_ = new listIterator<T>(list, start, end);\n }", "@Test\n public void testIterator_Forward() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n\n int i = 0;\n while (instance.hasNext()) {\n assertEquals(baseList.get(i++), instance.next());\n }\n\n }", "@Test(expected = IndexOutOfBoundsException.class)\n public void testListIterator_Invalid_Index_Above_Size() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n baseList.listIterator(baseList.size() + 1);\n }", "public SequenceIterator(NumberGenerator generator, int size) {\n this.generator = generator;\n this.size = size;\n // Since the sequence starts from index 0, we initialize it to 0\n this.index = 0;\n \n }", "public IteratorInterface<T> iterator(int index)\r\n {\r\n return new IteratorInterface<T>()\r\n {\r\n private Node<T> prev; // node before cursor position\r\n private Node<T> next; // node after cursor position\r\n \r\n // Use an instance initialization block because\r\n // anonymous classes don't support constructors.\r\n \r\n {\r\n Node<T> walker; // needed for traversing the list\r\n \r\n if ((index < 0) || (index > numElements))\r\n throw new IndexOutOfBoundsException(\r\n \"Illegal index \" + index +\r\n \" passed to iterator initialization block.\\n\");\r\n\r\n if (index == 0)\r\n {\r\n prev = null;\r\n next = front;\r\n }\r\n else if (index == numElements)\r\n {\r\n prev = rear;\r\n next = null;\r\n }\r\n else\r\n {\r\n walker = front; \r\n for (int i=1; i<index; i++)\r\n {\r\n walker = walker.next;\r\n }\r\n prev = walker;\r\n next = walker.next;\r\n }\r\n } // end instance initialization block\r\n \r\n //*****************************************\r\n\r\n // Return true if not at the end of the list.\r\n \r\n public boolean hasNext()\r\n {\r\n return (next != null);\r\n }\r\n \r\n //*****************************************\r\n\r\n // Return the next node's value and move\r\n // cursor position forward.\r\n\r\n public T next()\r\n { \r\n if (next == null)\r\n throw new NoSuchElementException(\"Attempt to\" +\r\n \" call next when there's no next element.\");\r\n\r\n prev = next;\r\n next = next.next;\r\n return prev.data;\r\n } // end next\r\n\r\n //*****************************************\r\n\r\n // Instantiate a node and insert it before the\r\n // node that next points to. Afterward, the\r\n // cursor position is after the new node.\r\n \r\n public void add(T element)\r\n {\r\n Node<T> newNode = new Node<T>(element);\r\n Node<T> origPrev = prev; // remember original prev\r\n \r\n // these are needed for all 4 scenarios:\r\n newNode.next = next;\r\n prev = newNode;\r\n \r\n if (isEmpty())\r\n {\r\n front = rear = newNode;\r\n }\r\n \r\n // cursor position at front:\r\n else if (prev == null)\r\n {\r\n front = newNode;\r\n }\r\n\r\n // cursor position at rear:\r\n else if (next == null)\r\n {\r\n rear = newNode;\r\n origPrev.next = newNode;\r\n }\r\n\r\n else // cursor position in the interior:\r\n {\r\n origPrev.next = newNode;\r\n }\r\n \r\n numElements++;\r\n } // end add\r\n }; // end anonymous inner class\r\n }", "public static InputFactory createSequentialFactory( final DataSource datsrc,\n final long offset,\n final long leng ) {\n return new AbstractInputFactory( false ) {\n public BasicInput createInput( boolean isSeq )\n throws IOException {\n InputStream baseIn = datsrc.getInputStream();\n IOUtils.skip( baseIn, offset );\n DataInputStream dataIn =\n new DataInputStream(\n new BufferedInputStream( baseIn ) );\n return createSequentialInput( dataIn );\n }\n };\n }", "public SequenceIterator(NumberGenerator generator, int size) {\n index = 0;\n this.size = size;\n this.generator = generator;\n }", "public Iterator<Coord> iterator() {\n\t\treturn new CoordListIterator(array, index);\n\t}", "public Iterator<T> iterator(){\r\n\t\treturn new ChainedArraysIterator();\r\n\t}", "public static Spliterator.OfLong spliterator(long[] paramArrayOflong, int paramInt1, int paramInt2, int paramInt3) {\n/* 305 */ checkFromToBounds(((long[])Objects.requireNonNull((T)paramArrayOflong)).length, paramInt1, paramInt2);\n/* 306 */ return new LongArraySpliterator(paramArrayOflong, paramInt1, paramInt2, paramInt3);\n/* */ }", "public ReverseArrayIntIterator(int[] array) {\n this(array, 0, array.length);\n }", "public ArgList(Object[] argList, int offset) {\n super(argList == null ? 0 : argList.length - offset);\n if (argList != null) {\n for (int i = offset; i < argList.length; i++)\n addElement(argList[i]);\n }\n }", "@Override\n public Iterator<T> iterator() {\n return new Iterator<T>(){\n private int ci = 0;\n \n /**\n * Checks if ArrayList has next element \n * @return \n */\n public boolean hasNext(){\n return ci < size;\n }\n \n /**\n * Returns next element and moves iterator forward\n * @return \n */\n public T next(){\n return (T)data[ci++];\n }\n \n /**\n * Does nothing\n */\n public void remove(){\n \n }\n };\n }", "public void setArrayAt(int indexStart, int len, double[] srcValue, int srcOffset) {\n final int indexEnd = indexStart + len;\n int srcIndex = srcOffset;\n for (int i = indexStart; i < indexEnd; i++,srcIndex++) {\n setAt(i, srcValue[srcIndex]);\n }\n }", "public CS228ListIterator(int startIndex) {\r\n\t\t\t// TODO ...test\r\n\t\t\tcaret = new Caret();\r\n\t\t\tint idxCount = 0;\r\n\t\t\tfor (Node n = head.next; n != tail; n = n.next) {\r\n\t\t\t\tfor (int i = 0; i < n.data.length; i++) {\r\n\t\t\t\t\tif (n.data[i] != null)\r\n\t\t\t\t\t\tidxCount++;\r\n\t\t\t\t\tif (idxCount == startIndex) {\r\n\t\t\t\t\t\tcaret.n = n;\r\n\t\t\t\t\t\tcaret.idx = i;\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "public ArrayIterator() {\n next = first;\n }", "public void add(int[] elements, int start, int length) {\n assert length >= 0 : \"Length must be >= 0\";\n\n ensureBufferSpace(length);\n System.arraycopy(elements, start, buffer, elementsCount, length);\n elementsCount += length;\n }", "private RubyArray(Ruby runtime, long length) {\n super(runtime, runtime.getArray());\n checkLength(length);\n values = new IRubyObject[(int)length];\n }", "public abstract Iterator<E> createIterator();", "@Test\n public void testNext_Start() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 3, 4, 5));\n\n ListIterator<Integer> instance = baseList.listIterator();\n Integer expResult = 1;\n Integer result = instance.next();\n assertEquals(expResult, result);\n }", "@SafeVarargs\n public ObjectArrayIterator(final E... array) {\n this(array, 0, array.length);\n }", "public static ByteIterator ofBytes(final byte[] bytes, final int offs, final int len) {\n Assert.checkNotNullParam(\"bytes\", bytes);\n if (len <= 0) {\n return EMPTY;\n }\n return new ByteArrayIterator(len, bytes, offs);\n }", "Buffer slice(int start, int length);", "@Override\n\tpublic Iterator createIterator() {\n\t\treturn new WeaponListIterator(weaponList);\n\t}", "public static Spliterator.OfLong spliterator(long[] paramArrayOflong, int paramInt) {\n/* 268 */ return new LongArraySpliterator(Objects.<long[]>requireNonNull(paramArrayOflong), paramInt);\n/* */ }", "@Override\n\tpublic Iterator<T> iterator() {\n\t\treturn new CircularArrayIterator<T>(items);\n\t}", "public MyArrayList()\n\t{\n\t\tmyArray = new Object[StartSize];\n\t}", "public abstract void insertRange(int start, AttributeStreamBase src,\r\n int srcStart, int count, boolean bForward, int stride, int validSize);", "public final native void setStartIndex(double startIndex) /*-{\n this.setStartIndex(startIndex);\n }-*/;", "@Test\n public void testNextIndex_End() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 3));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n\n int expResult = 2;\n int result = instance.nextIndex();\n\n assertEquals(\"Calling nextIndex at the end of the iterator should return size of the associated list\",\n expResult, result);\n }", "public abstract void addRange(AttributeStreamBase src, int srcStart,\r\n int count, boolean bForward, int stride);", "@Override\n\tpublic Iterator<T> iterator() {\n\t\treturn new CircularArrayIterator<T>(this);\n\t}", "public GLListIterator(int val, GenericList<T> list) {\n\t\t// TODO Auto-generated constructor stub\n\t\tindex = val;\n\t\tpos = list.getHead();\n\t\tlength = list.getLength();\n\n\t}", "iterator(){current = start;}", "private ArrayIntList buildList(int size) {\n\t\tArrayIntList list = new ArrayIntList();\n\t\tfor (int i=1;i<=size;i++)\n\t\t\tlist.add(i);\n\t\treturn list; \n\t}", "public ListIterator listIterator(int arg0) {\n\t\treturn null;\n\t}", "public MyArrayList(int length) {\n data = new Object[length];\n }", "public static List<int[]> getArrays( int start, int end )\n {\n ArrayList<int[]> arrays = new ArrayList<int[]>( );\n for (int i = start; i <= end; i++ )\n {\n int[] arr = new int[1];\n arr[0] = i;\n arrays.add( arr );\n }\n \n return arrays;\n }", "void startIndexing();", "public RecordIterator<K, V> build(int begin, int size) {\n List<Pair<byte[], byte[]>> pairList = client.nextBlock(begin, size);\n list = new ArrayList<Pair<K, V>>(pairList.size());\n //convert Key -> K , serialize byte[] to V\n for (Pair<byte[], byte[]> each : pairList) {\n list.add(new Pair<K, V>((K) toKey(each.getFirst()), (V) serializer.toObject(each.getSecond())));\n }\n //reset record counter\n record = 0;\n return this;\n }", "SubList(final E[] array, final int lower, final int size) {\n super(array);\n this.lower = lower;\n this.size = size;\n }", "public KListIterator(KNode<E> start){\r\n node = start;\r\n }", "public Iterator<Item> iterator() { return new ListIterator(); }", "IteratorExp createIteratorExp();", "@Override\n public Iterator<E> iterator() {\n return new Iterator<E>() {\n private int nextIndex = 0;\n private int lastNextIndex = -1;\n private int rest = size();\n\n @Override\n public boolean hasNext() {\n return rest > 0;\n }\n\n @Override\n public E next() {\n if(!hasNext()){\n throw new NoSuchElementException();\n }\n rest--;\n lastNextIndex = nextIndex++;\n siftDown(nextIndex);\n\n return (E) array[lastNextIndex];\n }\n\n @Override\n public void remove() {\n if (lastNextIndex == -1) {\n throw new IllegalStateException();\n }\n removeElement(lastNextIndex);\n nextIndex--;\n lastNextIndex = -1;\n }\n };\n }", "public LinkedIndexedList(int size, T defaultValue) throws LengthException {\n if (size <= 0) {\n throw new LengthException();\n }\n\n length = size;\n\n // Unlike in ArrayIndexedList we cannot avoid the initialization even\n // if defaultValue == null since the nodes still have to be created.\n for (int i = 0; i < length; i++) {\n prepend(defaultValue);\n }\n }", "public abstract void onLoadMore(int skipStart);", "public MyListIter(int index) {\n super();\n //iter.current = index;\n current = index;\n }", "public ArrayList<String> start(String source, String target);", "public ZYArraySet(int initLength){\n if(initLength<0)\n throw new IllegalArgumentException(\"The length cannot be nagative\");\n elements = (ElementType[])new Object[initLength];\n }", "@Override\n public Iterator<E> iterator() {\n return new ArrayIterator(); // create a new instance of the inner class\n }", "public elfish(char[] srcArray, int startIndex, int endIndex)\r\n {\r\n charArray = srcArray;\r\n this.startIndex = startIndex;\r\n this.endIndex = endIndex;\r\n }", "public DataIterator getCompositeData(Address start, boolean forward);", "public DoubleArraySpliterator(double[] param1ArrayOfdouble, int param1Int1, int param1Int2, int param1Int3) {\n/* 1177 */ this.array = param1ArrayOfdouble;\n/* 1178 */ this.index = param1Int1;\n/* 1179 */ this.fence = param1Int2;\n/* 1180 */ this.characteristics = param1Int3 | 0x40 | 0x4000;\n/* */ }" ]
[ "0.6127978", "0.5661055", "0.56307244", "0.5626456", "0.5620885", "0.55196685", "0.5427968", "0.5427838", "0.5426494", "0.5288555", "0.5278391", "0.52491885", "0.5224874", "0.5196635", "0.5162181", "0.5152567", "0.513328", "0.5120027", "0.51200247", "0.50406826", "0.50047195", "0.5003115", "0.49999785", "0.49979836", "0.49917418", "0.49717632", "0.49673513", "0.49561742", "0.49098897", "0.49072075", "0.48845452", "0.48774", "0.48535556", "0.4852437", "0.48517033", "0.48481125", "0.48173285", "0.48057744", "0.47731537", "0.47695377", "0.47275087", "0.47275087", "0.47275087", "0.47275087", "0.47235954", "0.47161454", "0.47134453", "0.47088835", "0.4707831", "0.47016448", "0.47016373", "0.46849322", "0.46710798", "0.46613497", "0.46562847", "0.4644323", "0.4637446", "0.46262848", "0.4611142", "0.46027017", "0.4591932", "0.458532", "0.4561528", "0.45555812", "0.45496854", "0.45482248", "0.4544845", "0.45377603", "0.45337677", "0.45271078", "0.45215857", "0.4510651", "0.4507234", "0.45066482", "0.44867116", "0.4485923", "0.4477401", "0.44706264", "0.44695377", "0.44690925", "0.44662598", "0.44644612", "0.44619733", "0.4456063", "0.44532737", "0.4445138", "0.443998", "0.44318336", "0.44272518", "0.44045225", "0.44029897", "0.44011337", "0.43978253", "0.43976423", "0.43962014", "0.4388672", "0.43851745", "0.43832344", "0.43825394", "0.4379731" ]
0.7407942
0
====================================== = Getters & Setters = ====================================== returns the username of the user who flagged the recipe
public Users getFlagger() { return flagger; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic String getUserName() {\n\t\treturn _changesetEntry.getUserName();\n\t}", "public String getName(){\n return username;\n\t}", "java.lang.String getUsername();", "java.lang.String getUsername();", "java.lang.String getUsername();", "java.lang.String getUsername();", "java.lang.String getUsername();", "java.lang.String getUsername();", "java.lang.String getUsername();", "java.lang.String getUsername();", "java.lang.String getUsername();", "public String getName() {\r\n\t\treturn username;\r\n\t}", "@Override\n\tpublic String getUsername() {\n\t\treturn user.getUserName();\n\t}", "@Override\n\tpublic String getUsername() {\n\t\treturn username;\n\t}", "@Override\n\tpublic String getUsername() {\n\t\treturn username;\n\t}", "@Override\r\n\tpublic String getUsername() {\n\t\treturn username;\r\n\t}", "@Override public String getUsername()\r\n {\r\n return username;\r\n }", "public String getUsername()\r\n\t{\r\n\t\treturn username;\r\n\t}", "public String getUsername() {\n \t\treturn username;\n \t}", "public boolean hasUsername() {\n return fieldSetFlags()[1];\n }", "@Override\n\tpublic String getUsername() {\n\t\treturn user.getUsername();\n\t}", "public String getUsername(){\r\n\t\treturn username;\r\n\t}", "public Object username() {\n return this.username;\n }", "public String getUsername()\n\t{\n\t\treturn username;\n\t}", "String getUsername();", "String getUsername();", "String getUsername();", "String getUsername();", "String getUsername();", "String getUsername();", "public String getName() {\n return user.getName();\n }", "public String getUsername() {return username;}", "@Override\n public String getUsername() {\n return username;\n }", "public String getUsername() {\n return username;\r\n }", "public static String getBiblioUser() {\n\t\treturn \"user\";\n\t}", "String getUserName() {\r\n\t\t\treturn username;\r\n\t\t}", "public String getUsername() {\r\n return username;\r\n }", "public String getUsername() {\r\n return username;\r\n }", "public boolean gotUserName(){return gotUserName;}", "@Override\r\n\t\t\tpublic String getUsername() {\n\t\t\t\treturn \"User1\";\r\n\t\t\t}", "public String getUsername() {\n return username;\n }", "public String getUsername() {\r\n return username;\r\n }", "public String getUsername() {\r\n return username;\r\n }", "public String getUsername() {\r\n return username;\r\n }", "public String getUsername() {\r\n return username;\r\n }", "public String getUsername() {\r\n return username;\r\n }", "public String getUsername() {\r\n return username;\r\n }", "public String getUsername() {\r\n return username;\r\n }", "public String getUsername() {\r\n return username;\r\n }", "public String getUsername() {\r\n return username;\r\n }", "public String getUsername() {\r\n return username;\r\n }", "public String getUsername() {\r\n return username;\r\n }", "public String getName() {\n\t\treturn this.username;\n\t}", "@DISPID(8)\r\n\t// = 0x8. The runtime will prefer the VTID if present\r\n\t@VTID(14)\r\n\tjava.lang.String username();", "public String getUsername()\r\n {\r\n return username;\r\n }", "public String getUsername() {\n\treturn username;\n}", "public String getUsername()\n {\n return username;\n }", "public String getUsername()\n {\n return username;\n }", "public String getUsername() {\r\n\t\treturn username;\r\n\t}", "public String getUsername() {\r\n\t\treturn username;\r\n\t}", "public String getUsername() {\r\n\t\treturn username;\r\n\t}", "public String getUsername() {\r\n\t\treturn username;\r\n\t}", "public String getUsername() {\r\n\t\treturn username;\r\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn username;\n\t}", "@Override\n\tpublic String getGivenName() {\n\t\treturn user.getUserInfo().getGivenName();\n\t}", "@Override\n\tpublic java.lang.String getUserName() {\n\t\treturn _paper.getUserName();\n\t}", "public java.lang.CharSequence getUsername() {\n return username;\n }", "public String getUsername() {\n return username.get();\n }", "@Override\n public String toString() {\n return username;\n }", "@Override\n\tpublic String getUsername() {\n\t\treturn this.username;\n\t}", "public String getUsername() {\n\t\treturn username;\n\t}", "public String getUsername() {\n\t\treturn username;\n\t}", "public String getUsername() {\n\t\treturn username;\n\t}", "public String getUsername() {\n\t\treturn username;\n\t}", "public String getUsername() {\n\t\treturn username;\n\t}", "public String getUsername() {\n\t\treturn username;\n\t}", "public String getUsername() {\n\t\treturn username;\n\t}", "public String getUsername() {\n\t\treturn username;\n\t}", "public String getUsername() {\n return username;\n }", "public String getUsername() {\n return username;\n }", "public String getUsername() {\n return username;\n }", "public String getUsername() {\n return username;\n }", "public String getUsername() {\n return username;\n }", "public String getUsername() {\n return username;\n }", "public String getUsername() {\n return username;\n }", "public String getUsername() {\n return username;\n }", "public String getUsername() {\n return username;\n }", "public String getUsername() {\n return username;\n }", "public String getUsername() {\n return username;\n }", "public String getUsername() {\n return username;\n }", "public String getUsername() {\n return username;\n }", "public String getUsername() {\n return username;\n }", "public String getUsername() {\n return username;\n }", "public String getUsername() {\n return username;\n }", "public String getUsername() {\n return username;\n }", "public String getUsername() {\n return username;\n }", "public String getUsername() {\n return username;\n }", "public String getUsername() {\n return username;\n }", "public String getUsername() {\n return username;\n }", "public String getUsername() {\n return username;\n }", "public String getUsername() {\n return username;\n }" ]
[ "0.61843145", "0.6071997", "0.60111594", "0.60111594", "0.60111594", "0.60111594", "0.60111594", "0.60111594", "0.60111594", "0.60111594", "0.60111594", "0.6010095", "0.5987621", "0.59487206", "0.59487206", "0.59480447", "0.59463406", "0.5936957", "0.5936795", "0.5926579", "0.5917903", "0.591679", "0.59028566", "0.589843", "0.58878106", "0.58878106", "0.58878106", "0.58878106", "0.58878106", "0.58878106", "0.5883621", "0.5882965", "0.5882468", "0.5880408", "0.5868215", "0.5866563", "0.58651185", "0.58651185", "0.5861726", "0.58557284", "0.5853847", "0.584633", "0.584633", "0.584633", "0.584633", "0.584633", "0.584633", "0.584633", "0.584633", "0.584633", "0.584633", "0.584633", "0.58362067", "0.5834385", "0.58236253", "0.5822788", "0.58151346", "0.58151346", "0.581417", "0.581417", "0.581417", "0.581417", "0.581417", "0.58138657", "0.5806499", "0.5794842", "0.57942283", "0.5792804", "0.5790876", "0.57900286", "0.57887584", "0.57887584", "0.57887584", "0.57887584", "0.57887584", "0.57887584", "0.57887584", "0.57887584", "0.57848746", "0.57848746", "0.57848746", "0.57848746", "0.57848746", "0.57848746", "0.57848746", "0.57848746", "0.57848746", "0.57848746", "0.57848746", "0.57848746", "0.57848746", "0.57848746", "0.57848746", "0.57848746", "0.57848746", "0.57848746", "0.57848746", "0.57848746", "0.57848746", "0.57848746", "0.57848746" ]
0.0
-1
sets flagger to the username of the user who flagge the recipe
public void setFlagger(Users flagger) { this.flagger = flagger; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void flagUser() {\n\t\tsuper.flagUser();\n\t}", "void setUserUsername(String username);", "public Users getFlagger() {\n return flagger;\n }", "protected static void setUsername(String username) {\n Program.username = username;\n }", "public void setUser_name(String user_name);", "public void setName(String name){\r\n gotUserName = true;\r\n this.name = name;\r\n }", "public static void setUsername(String username)\n {\n username_ = username;\n }", "void setUsername(String username);", "public void setUsername(String username) {this.username = username;}", "@Override\n\tpublic void setUserName(String userName) {\n\t\t_changesetEntry.setUserName(userName);\n\t}", "public void setRequested(User requested) {\n this.requested = requested;\n }", "public void setUsername(String username)\n {\n _username = username;\n }", "public void setUserFlags(Integer userFlags) {\r\n this.userFlags = userFlags;\r\n }", "public void setRequester(User requester) {\n this.requester = requester;\n }", "public void setUsername(String username) {\n SharedPreferences settings = context.getSharedPreferences(PREFS, 0);\n SharedPreferences.Editor editor = settings.edit();\n editor.putString(\"username\", username);\n editor.commit(); \t\n }", "public void setUser(String user)\n {\n _user = user;\n }", "public void setUsername(final String username){\n mUsername = username;\n }", "public void setUsername(String TakenUsername) {\n username = TakenUsername;\n }", "public void setUsername(String username) {\n \tthis.username = username;\n }", "public void setUser(String user) {\r\n this.user = user;\r\n }", "public void setID(String username){\n this.clientID = username+\": \"+clientID;\n \n }", "public void setUserName(String username){\n this.userName = username;\n }", "public void setUser(String user) \r\n\t{\n\t\tthis.user = user;\r\n\t}", "public void setUsername(String username)\r\n/* 16: */ {\r\n/* 17:34 */ this.username = username;\r\n/* 18: */ }", "public void setUser_name(String user_name) {\n this.user_name = user_name;\n }", "public void setUser(java.lang.String param){\r\n localUserTracker = true;\r\n \r\n this.localUser=param;\r\n \r\n\r\n }", "public void setUser(java.lang.String param){\r\n localUserTracker = true;\r\n \r\n this.localUser=param;\r\n \r\n\r\n }", "public void setUser(java.lang.String param){\r\n localUserTracker = true;\r\n \r\n this.localUser=param;\r\n \r\n\r\n }", "public void setUsername(String username) {\n this.username = username;\r\n }", "public void setUsername(String username) {\r\n this.username = username;\r\n }", "public void setUsername(String username) {\r\n this.username = username;\r\n }", "public void setUsername(String username) {\n\tthis.username = username;\n}", "public void setUser(String user) {\n this.user = user;\n }", "public void setUser(String user) {\n this.user = user;\n }", "public void setUser(String user) {\n this.user = user;\n }", "public void setUser(String user) {\n this.user = user;\n }", "public void setUsername( String username ) {\n this.username = username;\n }", "public void setUsername(String username) {\n this.username = username;\n }", "public void setCicerone(String username) {\n this.itineraryCicerone.setText(username);\n }", "public void setUserId(){\n AdGyde.setClientUserId(\"ADG1045984\");\n Toast.makeText(this, \"UserId = ADG1045984\", Toast.LENGTH_SHORT).show();\n }", "void setName( String username, String name ) throws UserNotFoundException;", "public void setUsername(String aUsername) {\n username = aUsername;\n }", "public void setUsername(String username) {\r\n this.username = username;\r\n }", "public void setUsername(String username) {\r\n this.username = username;\r\n }", "public void setUsername(String username) {\r\n this.username = username;\r\n }", "public void setUsername(String username)\n {\n this.username = username;\n }", "public void pickUpFlag(IRobot robot) {\n String objectName = getObjectNameOnPos(tiledMap, robot.getPos());\n if(objectName != null && objectName.contains(\"Flag\")){\n robot.addFlag(objectName);\n }\n }", "public void setUsername(String username) {\n this.username.set(username);\n }", "public void setUsername(String username) {\n this.username = username;\n saveProperties();\n }", "public void set_username(String username)\r\n\t{\r\n\t\tthis.username = username;\r\n\t}", "public void setName(String username) {\n setObject(\"username\", (username != null) ? username : \"\");\n }", "@Override\n public boolean onPreferenceChange(Preference preference, Object newValue) {\n String difficultySummary = \"Username: \" + newValue;\n usernamePref.setSummary(difficultySummary);\n // Since we are handling the pref, we must save it\n SharedPreferences.Editor ed = sharedPrefs.edit();\n name = newValue.toString();\n ed.putString(\"user_id\", newValue.toString());\n ed.apply();\n return true;\n }", "public void setUsername(String username) {\n this.username = username.toLowerCase(Locale.ENGLISH);\n }", "public void setUsername(String username) {\n this.username = username;\n }", "public void setUsername(String username) {\n this.username = username;\n }", "public void setUsername(String username) {\n this.username = username;\n }", "public void setUsername(String username) {\n this.username = username;\n }", "public void setUsername(String username) {\n this.username = username;\n }", "public void setUsername(String username) {\n this.username = username;\n }", "public void setUsername(String username) {\n this.username = username;\n }", "public void setUsername(String username) {\n this.username = username;\n }", "public void setUsername(String username) {\n this.username = username;\n }", "public void setUsername(String username) {\n this.username = username;\n }", "public void setUsername(String username) {\n this.username = username;\n }", "public void setUsername(String username) {\n this.username = username;\n }", "public void setUsername(String username) {\n this.username = username;\n }", "public void setUsername(String username) {\n this.username = username;\n }", "public void setUsername(String username) {\n this.username = username;\n }", "public void setUsername(String username) {\n this.username = username;\n }", "public void setUsername(String username) {\n this.username = username;\n }", "public void setUsername(String username) {\n this.username = username;\n }", "public void setUsername(String username) {\n this.username = username;\n }", "public void setUsername(String username) {\r\n\t\tthis.username = username;\r\n\t}", "public void setUsername(String username) {\r\n\t\tthis.username = username;\r\n\t}", "public void setUsername(String username) {\r\n\t\tthis.username = username;\r\n\t}", "public void setUsername(final String username) {\n this.username = username;\n }", "public void setCurrentUser(String username) {\n currentUser = username;\n }", "@Override\n public void setUserName(java.lang.String userName) {\n _partido.setUserName(userName);\n }", "public void setUsername(String un)\r\n\t{\r\n\t\tusername = un;\r\n\t}", "public void setName(String name) {\n\t\tSharedPreferences settings = parentContext.getSharedPreferences(PREFERENCE_FILE, 0);\n\t\tSharedPreferences.Editor editor = settings.edit();\n\t\teditor.putString(USERNAME_KEY, name);\n\t\teditor.commit();\n\t}", "public void setUserName(String username) {\n\t\tsharedPreferences = context.getSharedPreferences(\"Login\",\n\t\t\t\tcontext.MODE_PRIVATE);\n\t\tSharedPreferences.Editor editor = sharedPreferences.edit();\n\t\teditor.putString(\"USERNAME\", username);\n\t\teditor.commit();\n\t}", "@Override\n\tpublic void setUserName(String userName) {\n\n\t}", "protected void setFlag() {\n flag = flagVal;\n }", "protected void setFlag() {\n flag = flagVal;\n }", "void setUserName(String newName) {\r\n\t\t\tusername = newName;\r\n\t\t}", "public void setUserName(String name) throws RemoteException, InterruptedException {\n\t\tSystem.out.println(\"Server: Message > \" + \"setUserName() invoked\");\n\t\tlock.lock();\n\t\ttry {\n\t\t\twhile (sentinel != -1)\n\t\t\t\thasNotChanged.await();\n\t\t\t// System.out.println(\"....Enter setUserName critical section....\");\n\t\t\tuserName = name;\n\t\t\tif (!loggedIn.contains(name))\n\t\t\t\tloggedIn.add(name);\n\n\t\t\t++sentinel;\n\n\t\t\t//System.out.println(\"....Exit setUserName critical section....\");\n\t\t\thasChanged.signal();\n\t\t} finally {\n\t\t\tlock.unlock();\n\t\t}\n\t}", "@Override\n\tpublic String getUsername() {\n\t\treturn \"ajay\";\n\t}", "public void setUserName(String Strusername) {\n\t\tstepstatus = basepage.setText(Username, Strusername);\n\t\treportEvent(stepstatus, \"Able to enter username\", \"Unable to enter username\", driver, true);\n\t}", "protected void setUsername(final String user) {\n this.user = user;\n }", "public void setUsername(String name)\r\n {\r\n int index = -1;\r\n //Check if the new username is not already taken before setting the new username\r\n if(usernamesTaken.indexOf(name) == -1)\r\n {\r\n index = usernamesTaken.indexOf(this.username);\r\n usernamesTaken.set(index, name);\r\n this.username = name;\r\n }\r\n else\r\n {\r\n //Outouts a warning message\r\n System.out.println(\"WARNING: This username is already taken\");\r\n }//end if \r\n }", "public void setUser(java.lang.String user) {\n this.user = user;\n }", "public void setFlag(Boolean flag) {\n this.flag = flag;\n }", "public void setUsername(String username) {\n\t\tthis.username = username;\n\t}", "public void setUsername(String username) {\n\t\tthis.username = username;\n\t}", "public void setUsername(String username) {\n\t\tthis.username = username;\n\t}", "public void setUsername(String username) {\n\t\tthis.username = username;\n\t}", "public void setUsername(String username) {\n\t\tthis.username = username;\n\t}", "public void setUsername(String username) {\n\t\tthis.username = username;\n\t}", "public void makeCurrentUser() {\n // Remove the Add Friend ImageView\n mFriendIv.setVisibility(View.GONE);\n\n // Show the \"You\" TextView\n mYouTv.setVisibility(View.VISIBLE);\n }", "public void setUsername(String un)\n {\n this.username = un;\n }" ]
[ "0.68172073", "0.6004775", "0.5890581", "0.5858809", "0.56555617", "0.5598545", "0.55815196", "0.5566798", "0.55180967", "0.5490564", "0.5432646", "0.54295516", "0.54171073", "0.5413298", "0.53911835", "0.5383764", "0.5379532", "0.53741324", "0.53674245", "0.5351033", "0.53377837", "0.53371525", "0.5335568", "0.53208023", "0.52919793", "0.5269618", "0.5269618", "0.5269618", "0.52686334", "0.52553", "0.52553", "0.5242626", "0.524047", "0.524047", "0.524047", "0.524047", "0.52398723", "0.5238971", "0.5236174", "0.5234176", "0.5222395", "0.52130455", "0.52122796", "0.52122796", "0.52122796", "0.52087134", "0.51831937", "0.5178598", "0.51617175", "0.5161661", "0.5160708", "0.5158395", "0.51457185", "0.51450795", "0.51450795", "0.51450795", "0.51450795", "0.51450795", "0.51450795", "0.51450795", "0.51450795", "0.51450795", "0.51450795", "0.51450795", "0.51450795", "0.51450795", "0.51450795", "0.51450795", "0.51450795", "0.51450795", "0.51450795", "0.51450795", "0.51403", "0.51403", "0.51403", "0.5130652", "0.509974", "0.5098427", "0.5095975", "0.5090201", "0.5083709", "0.50700736", "0.50677013", "0.50677013", "0.5057515", "0.50565535", "0.5052074", "0.504931", "0.5039449", "0.5037317", "0.5031851", "0.5031038", "0.50258714", "0.50258714", "0.50258714", "0.50258714", "0.50258714", "0.50258714", "0.5021744", "0.5019765" ]
0.7135088
0
returns the date when the flag was done
public long getFlaggingDate() { return flaggingDate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Date getDoneDate() {\n return doneDate;\n }", "public Date getDoneDate() {\n return doneDate;\n }", "public Date getDoneDate() {\n return doneDate;\n }", "public Date getDoneDate() {\n return doneDate;\n }", "Date getCheckedOut();", "public String getDateFlag() {\n return mDateFlag;\n }", "@Override\r\n\tpublic long getExitDateTime() {\n\t\treturn 0;\r\n\t}", "Date getCheckedOutDate();", "Date getEndedOn();", "long getLastBonusTicketDate();", "@Override\n\tpublic Calendar getFinishDate() {\n\t\treturn Calendar.getInstance();\n\t}", "@Override\n public int getDate() {\n return this.deadline.getDay();\n }", "Date getRequestedAt();", "public Date takeOff() {\n \t\r\n \tthis.lastTimeTookOf = new Date();\r\n \treturn lastTimeTookOf;\r\n }", "Date getDateUpdated();", "@Override\n\tpublic java.util.Date getRequestedDate() {\n\t\treturn _dmGtStatus.getRequestedDate();\n\t}", "public Date getAfterCt() {\r\n return afterCt;\r\n }", "public String getDone() {\n return (isDone ? \"1\" : \"0\");\n }", "Date getWorkfileLastChangedDate();", "public Date getFinishDate()\r\n {\r\n Date result = m_finishDate;\r\n if (result == null)\r\n {\r\n result = getParentFile().getFinishDate();\r\n }\r\n return (result);\r\n }", "Date getStartedOn();", "Date getCheckedIn();", "if (exitDateTime == adhocTicket.getExitDateTime()) {\n System.out.println(\"Exit Date Time is passed\");\n }", "public Timestamp\tgetCompletionDate();", "public Date getMakeCheckDate() {\n return makeCheckDate;\n }", "public Date getFinishDate() {\n if (this.finishDate == null) {\n return null;\n }\n return new Date(this.finishDate.getTime());\n }", "OffsetDateTime lastActionDateTime();", "long getDate() { return (act != null ? act.getDate() : 0); }", "public Date getFinishedAt() {\n\t\treturn finishedAt;\n\t}", "public Date getDealingTime()\n/* */ {\n/* 159 */ return this.dealingTime;\n/* */ }", "public abstract Date getFinalFireTime();", "public Date getGmtFinish() {\n return gmtFinish;\n }", "public void setDoneDate(Date doneDate) {\n this.doneDate = doneDate;\n }", "public void setDoneDate(Date doneDate) {\n this.doneDate = doneDate;\n }", "public void setDoneDate(Date doneDate) {\n this.doneDate = doneDate;\n }", "public void setDoneDate(Date doneDate) {\n this.doneDate = doneDate;\n }", "public String getIsDone() {\n if (isDone) {\n return \"1\";\n } else {\n return \"0\";\n }\n }", "Date getLastTime();", "public Date getRealCheckDate() {\n return realCheckDate;\n }", "Date getNextTodo();", "public Date getDATE_SETTLED() {\r\n return DATE_SETTLED;\r\n }", "public java.util.Date finishSnap()\n\t{\n\t\treturn _dtFinish;\n\t}", "Date getDueDate();", "Date getDueDate();", "public Date getFcreatetime() {\n return fcreatetime;\n }", "Date getEventFiredAt();", "LocalDateTime getCompletionDate();", "long getFetchedDate();", "@Override\n\tpublic java.util.Date getCheckpoint() {\n\t\treturn _userSync.getCheckpoint();\n\t}", "public Date getActualFinish()\r\n {\r\n return (m_actualFinish);\r\n }", "LocalDate getCheckInDate();", "public String markDone() {\n this.isDone = true;\n return String.format(\"Nice! I've marked this task as done:\\n [X] %s\", this.description);\n }", "@Override\r\n\tpublic long getEntryDateTime() {\n\t\treturn 0;\r\n\t}", "@Override\n\tpublic Date getCompleteDate() {\n\t\treturn model.getCompleteDate();\n\t}", "public Date getDeductSubmitTime() {\n return deductSubmitTime;\n }", "public abstract Date getPreviousFireTime();", "long getDate();", "public String getReturnDate();", "public Date getLastSaved()\r\n {\r\n return (m_lastSaved);\r\n }", "long getSettlementDate();", "public Date getModifiyTime() {\n return modifiyTime;\n }", "public java.util.Date getActTodate () {\n\t\treturn actTodate;\n\t}", "public Timestamp getDateFinishSchedule() {\n\t\treturn (Timestamp) get_Value(\"DateFinishSchedule\");\n\t}", "public Date getEarliestFinishingDate();", "@CheckReturnValue\n public abstract long getTimeUntilReset();", "public Date getStatusLastUpd() {\n return statusLastUpd;\n }", "public Date getDELETED_DATE() {\r\n return DELETED_DATE;\r\n }", "public Date getStatusDate()\r\n {\r\n return (m_statusDate);\r\n }", "public Date getDateofLaunch() {\n\treturn null;\n}", "public double getTimeForOpen();", "public Date getFlastupdatetime() {\n return flastupdatetime;\n }", "Date getUpdatedDate();", "public Date getTimeCreate() {\n return timeCreate;\n }", "@Override\n\tpublic Date getStatusDate();", "@Override\n public String getResumeDate() {\n return operate_time;\n }", "public int getProjectsFinishedToday() {\n\t\treturn Today;\n\t}", "public Timestamp getDateConfirm() {\n\t\treturn (Timestamp) get_Value(\"DateConfirm\");\n\t}", "@Override\n public String getEndInfo() {\n return null;\n //return dateFormatter.stringFromDate(checkOutTime!)\n }", "Date getForLastUpdate();", "long getSince();", "public String getReturningDate() {\r\n return returningDate;\r\n }", "public long getLastBonusTicketDate() {\n return lastBonusTicketDate_;\n }", "private Date computeLastDate() {\n\t\tSyncHistory history = historyDao.loadLastOk();\n\t\tif (history != null) {\n\t\t\treturn history.getTime();\n\t\t}\n\t\treturn new Date(-1);\n\t}", "public int firstSettleDate()\n\t{\n\t\treturn _iFirstSettleDate;\n\t}", "public String get_task_due_date()\n {\n return task_due_date.toString();\n }", "public void setFlaggingDate(long flaggingDate) {\n this.flaggingDate = flaggingDate;\n }", "public Date getDelTime() {\n return delTime;\n }", "public Date getRealDeadline() {\r\n return realDeadline;\r\n }", "public long getDate() {\n return date_;\n }", "public boolean getDoneStatus(){\n return isDone;\n }", "public String getLeavingDate();", "Date getDateCreated();", "public boolean recordFinish()\n\t{\n\t\t_lFinishNanos = System.nanoTime();\n\n\t\t_dtFinish = new java.util.Date();\n\n\t\treturn true;\n\t}", "public DateAdp Modified_latest() {return modified_latest;}", "public void setDateFlag(String flag) {\n this.mDateFlag = flag;\n if (null != mTextViewTime) {\n String lastDate = getStoredDateStr(mContext, getDateFlag());\n if (null != lastDate)\n mTextViewTime.setText(lastDate);\n }\n }", "@Override\n\tpublic Date getStatusDate() {\n\t\treturn model.getStatusDate();\n\t}", "java.lang.String getFoundingDate();", "public int getDate() {\n return date ;\n }", "public long getDate() {\n return date_;\n }", "public Date getDeadlineDate() {\r\n return deadlineDate;\r\n }" ]
[ "0.72482634", "0.72482634", "0.72482634", "0.72482634", "0.6753669", "0.65294254", "0.647182", "0.643566", "0.64132106", "0.63626915", "0.6306268", "0.62817144", "0.6041715", "0.6029234", "0.60233384", "0.60164046", "0.5968413", "0.5967943", "0.59658456", "0.5935194", "0.58990043", "0.5880052", "0.5864476", "0.5823134", "0.5822174", "0.5798765", "0.57932276", "0.5792207", "0.5780215", "0.5775302", "0.5774987", "0.5773977", "0.57729995", "0.57729995", "0.57729995", "0.57729995", "0.57713443", "0.57602894", "0.57525283", "0.57521516", "0.5736519", "0.5734384", "0.573237", "0.573237", "0.572231", "0.5716851", "0.5712271", "0.57087064", "0.5699267", "0.5694349", "0.5692853", "0.56824625", "0.5679457", "0.56793755", "0.56662184", "0.56661963", "0.5653412", "0.5642672", "0.56393456", "0.56392336", "0.5623441", "0.56200755", "0.5619867", "0.5612107", "0.5606223", "0.56027716", "0.5597082", "0.55948484", "0.55923796", "0.55915993", "0.5585035", "0.55782145", "0.5572553", "0.55642635", "0.5559666", "0.5559511", "0.55594116", "0.5559036", "0.5546378", "0.554605", "0.55451256", "0.5540569", "0.5538957", "0.55388904", "0.55385894", "0.5529667", "0.55268705", "0.552642", "0.55261517", "0.5526116", "0.5518059", "0.55141103", "0.5485933", "0.5485611", "0.5483273", "0.54831046", "0.5477571", "0.5477468", "0.54766387", "0.5471927" ]
0.6587476
5
sets the flagging date to flaggingDate
public void setFlaggingDate(long flaggingDate) { this.flaggingDate = flaggingDate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long getFlaggingDate() {\n return flaggingDate;\n }", "@Override\n\tpublic void setRequestedDate(java.util.Date requestedDate) {\n\t\t_dmGtStatus.setRequestedDate(requestedDate);\n\t}", "public void setDateFlag(String flag) {\n this.mDateFlag = flag;\n if (null != mTextViewTime) {\n String lastDate = getStoredDateStr(mContext, getDateFlag());\n if (null != lastDate)\n mTextViewTime.setText(lastDate);\n }\n }", "public void setBirthDate(Date inBirthDate)\n {\n birthdate = inBirthDate;\n }", "void setBirthDate(Date birthDate);", "@Override\n\tprotected void setDate() {\n\n\t}", "public void updateBDate() {\n bDate = new Date();\n }", "public void setBirthDate(GregorianCalendar newBirthDate)\r\n\t{\r\n\t\tbDate = newBirthDate;\r\n\t}", "public com.luisjrz96.streaming.birthsgenerator.models.BirthInfo.Builder setDate(long value) {\n validate(fields()[5], value);\n this.date = value;\n fieldSetFlags()[5] = true;\n return this;\n }", "public void setBirthDate(Date birthDate);", "public void setBegDate(java.lang.String value) {\n this.begDate = value;\n }", "public void SetDate(Date date);", "public void setDate() {\n this.date = new Date();\n }", "void setDate(Date data);", "public void setRequestDate(Date requestDate);", "public void setDate(Date date) {\r\n \t\tthis.startDate = date;\r\n \t}", "public void setBirth_date(Date birth_date) {\n this.birth_date = birth_date;\n }", "public void setBirth_date(Date birth_date) {\n this.birth_date = birth_date;\n }", "public void setDate(long date)\r\n/* 199: */ {\r\n/* 200:299 */ setDate(\"Date\", date);\r\n/* 201: */ }", "public void setBirthday(Date birthday);", "public void setBirthdate(Date birthdate) {\r\n this.birthdate = birthdate;\r\n }", "@Override\n\tpublic void setRequestedDate(java.util.Date requestedDate) {\n\t\t_dmGTShipPosition.setRequestedDate(requestedDate);\n\t}", "public void setStatusDate(Date statusDate)\r\n {\r\n m_statusDate = statusDate;\r\n }", "public void setBirthdate(Date birthdate)\n {\n this.birthdate = birthdate;\n }", "public void setFechaInclusion(Date fechaInclusion)\r\n/* 155: */ {\r\n/* 156:174 */ this.fechaInclusion = fechaInclusion;\r\n/* 157: */ }", "public void setShipped(){\n this.shipped = new Date();\n }", "@Override\n\tpublic void setStatusDate(Date statusDate) {\n\t\tmodel.setStatusDate(statusDate);\n\t}", "public void setRequestedDate(Date date) {\n requestedDate.setText(formatDate(date));\n }", "public void setBirthdate(Date birthdate) {\n this.birthdate = birthdate;\n }", "private void setDate() {\n\t\tthis.date = Integer.parseInt(this.year + String.format(\"%02d\", this.calenderWeek));\n\n\t}", "public void setBudgetAsToDate(Number value) {\n setAttributeInternal(BUDGETASTODATE, value);\n }", "void setFoundingDate(java.lang.String foundingDate);", "public void setDate(long value) {\n this.date = value;\n }", "public void setBudgetDate(Date value) {\n setAttributeInternal(BUDGETDATE, value);\n }", "public void setDatebldbeg( java.sql.Date newValue ) {\n __setCache(\"datebldbeg\", newValue);\n }", "public void setGigDate(String gigDate) {\n this.gigDate = gigDate;\n }", "public void setToDate(Date toDate)\r\n/* 33: */ {\r\n/* 34:39 */ this.toDate = toDate;\r\n/* 35: */ }", "public void setArrivalDate(Date arrivalDate);", "public void setDate(long date) {\r\n\t\tthis.date = new Date(date);\r\n\t}", "public void setDate(Date date) {\n\t\n\t\tthis.date = date;\n\t\n\t}", "public void setDate(java.util.Date param){\n \n this.localDate=param;\n \n\n }", "public void setJoiningDate(Date value) {\r\n setAttributeInternal(JOININGDATE, value);\r\n }", "void setDateOfBirth(LocalDate dateOfBirth);", "public static void setDate() {\r\n\t\tDate.set(DateFormat.getDateTimeInstance(DateFormat.SHORT,\r\n\t\t\t\tDateFormat.LONG, Locale.getDefault()).format(\r\n\t\t\t\tnew java.util.Date()));\r\n\t}", "public void setARRIVAL_AT_LOC_DATE(java.sql.Date value)\n {\n if ((__ARRIVAL_AT_LOC_DATE == null) != (value == null) || (value != null && ! value.equals(__ARRIVAL_AT_LOC_DATE)))\n {\n _isDirty = true;\n }\n __ARRIVAL_AT_LOC_DATE = value;\n }", "private void setCurrentDate(Date date)\n {\n date.setTime(System.currentTimeMillis());\n }", "public void setMarkDate(Date markDate) {\n this.markDate = markDate;\n }", "private String setDate() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n return sdf.format(new Date());\n }", "@Override\n\tpublic void setStatusDate(Date statusDate);", "public void setDateassemb( java.sql.Date newValue ) {\n __setCache(\"dateassemb\", newValue);\n }", "public void setRequestDate(Date requestDate) { this.requestDate = requestDate; }", "public Builder setSettlementDate(long value) {\n bitField0_ |= 0x00040000;\n settlementDate_ = value;\n onChanged();\n return this;\n }", "void setCreateDate(Date date);", "public void setDate(Date date) {\n\t\t\n\t\tdate_ = date;\n\t}", "public void setClosedDate(Date v) \n {\n \n if (!ObjectUtils.equals(this.closedDate, v))\n {\n this.closedDate = v;\n setModified(true);\n }\n \n \n }", "public void setSpecimenNumberToDate(long number) {\n specimenNumberToDate = number;\n }", "public void setBirthday(Date birthday) {\r\n this.birthday = birthday;\r\n }", "public void setBirthday(Date birthday) {\r\n this.birthday = birthday;\r\n }", "public void setGenDate(LocalDate genDate) {\n\t\tthis.genDate = genDate;\n\t}", "public Builder setDate(long value) {\n bitField0_ |= 0x00000002;\n date_ = value;\n onChanged();\n return this;\n }", "public void setGioBatDau(Date gioBatDau);", "public void setInDate(Date inDate) {\r\n this.inDate = inDate;\r\n }", "protected void setFlag() {\n flag = flagVal;\n }", "protected void setFlag() {\n flag = flagVal;\n }", "public void setBirthDate(Date birthDate) {\n\t\tthis.birthDate = birthDate;\n\t}", "@Override\n\t\t\tpublic void setValue(Date value) {\n\t\t\t\tsuper.setValue(value);\n\t\t\t\tstart_cal_date = value.getTime();\n\t\t\t\tinfo_loader.load();\n\t\t\t}", "private void setDate() {\n java.util.Date d1 = new java.util.Date();\n SimpleDateFormat df = new SimpleDateFormat(\"YYYY-MM-dd\");\n String formateDate = df.format(d1);\n lblDate.setText(formateDate); \n }", "public void setShipDate(Date shipDate) {\n _shipDate = shipDate;\n }", "public void setDate(Date newDate) {\n this.currentDate = newDate;\n }", "public void setBorndate(Date borndate) {\r\n this.borndate = borndate;\r\n }", "private void setUnpaidSongCountDate(String val) {\n\t\tref.edit().putString(COL_UNPAID_SONG_COUNT_DATE, val).commit();\n\t}", "public void setDate(Date date) {\r\n\t\tthis.date = date;\r\n\t}", "public void setDate(Date date) {\r\n\t\tthis.date = date;\r\n\t}", "public void setDate(Date date) {\r\n\t\tthis.date = date;\r\n\t}", "public void setCreateDate(java.util.Date newVal) {\n if ((newVal != null && this.createDate != null && (newVal.compareTo(this.createDate) == 0)) || \n (newVal == null && this.createDate == null && createDate_is_initialized)) {\n return; \n } \n try {\n this.createDate = (java.util.Date)newVal.clone();\n } catch (Exception e) {\n // do nothing\n }\n\n createDate_is_modified = true; \n createDate_is_initialized = true; \n }", "public void setDateFilled() {\n\t\tthis.dateFilled = new Date();\n\t\tSystem.out.println(\"DF \" + dateFilled);\n\t}", "public String getDateFlag() {\n return mDateFlag;\n }", "public void setDate(long date) {\n\t\tthis.date = date;\n\t}", "@Override\n\tpublic void setStatusDate(java.util.Date statusDate) {\n\t\t_scienceApp.setStatusDate(statusDate);\n\t}", "public void setBirthday(Date birthday) {\n this.birthday = birthday;\n }", "public void setBirthday(Date birthday) {\n this.birthday = birthday;\n }", "public void setBirthday(Date birthday) {\n this.birthday = birthday;\n }", "public void setEditDate(Date editDate)\r\n/* */ {\r\n/* 193 */ this.editDate = editDate;\r\n/* */ }", "public void setDate(Date date) {\r\n this.date = date;\r\n }", "void xsetFoundingDate(org.apache.xmlbeans.XmlString foundingDate);", "public void setDateOfExamination(java.util.Date param){\n \n this.localDateOfExamination=param;\n \n\n }", "public void setStatusdate(java.sql.Timestamp newVal) {\n if ((newVal != null && this.statusdate != null && (newVal.compareTo(this.statusdate) == 0)) || \n (newVal == null && this.statusdate == null && statusdate_is_initialized)) {\n return; \n } \n this.statusdate = newVal; \n statusdate_is_modified = true; \n statusdate_is_initialized = true; \n }", "boolean isSetFoundingDate();", "public void setgOtherCreatedate(Date gOtherCreatedate) {\n this.gOtherCreatedate = gOtherCreatedate;\n }", "public void setDATE_SETTLED(Date DATE_SETTLED) {\r\n this.DATE_SETTLED = DATE_SETTLED;\r\n }", "public void setDate(Date date) {\n mDate = date;\n }", "private void initializeDate() {\n\t\tfinal Calendar c = Calendar.getInstance();\n\t\tmYear = c.get(Calendar.YEAR);\n\t\tmMonth = c.get(Calendar.MONTH);\n\t\tmDay = c.get(Calendar.DAY_OF_MONTH);\n\t\t\n\t\texpense.setDate(c.getTime());\n\n\t\t// display the current date\n\t\tupdateDateDisplay();\n\t}", "public void xsetJobStartDate(org.apache.xmlbeans.XmlDate jobStartDate)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlDate target = null;\r\n target = (org.apache.xmlbeans.XmlDate)get_store().find_element_user(JOBSTARTDATE$0, 0);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.XmlDate)get_store().add_element_user(JOBSTARTDATE$0);\r\n }\r\n target.set(jobStartDate);\r\n }\r\n }", "public void setDate(Date date) {\n\t\tthis._date = date;\n\t}", "public void setCreateDate(Date createDate)\r\n/* */ {\r\n/* 165 */ this.createDate = createDate;\r\n/* */ }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateLabel(btnStartDate, myCalendar);\n\n //set hasCheckDate to true\n hasCheckDate = true;\n }", "public void setBirth(Date birth) {\r\n this.birth = birth;\r\n }", "public void setDateOfRequest(Date dateOfRequest) {\r\n\t\tthis.dateOfRequest = dateOfRequest;\r\n\t}", "private void setDateSetting(String dateFormat)\n\t{\n\n\t\tif (dateFormat.equals(\"dd/mm/yyyy\"))\n\t\t{\n\t\t\tthis.dateSetting = 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.dateSetting = 1;\n\t\t}\n\t}", "private void setDeltaDate(long deltaDate) {\n\t\tthis.deltaDate = deltaDate;\n\t}" ]
[ "0.71383137", "0.65199625", "0.6514316", "0.629114", "0.62352765", "0.6234683", "0.61938524", "0.6185664", "0.61757153", "0.60887337", "0.60714257", "0.60676193", "0.6050951", "0.6037031", "0.60223967", "0.6019435", "0.6014613", "0.6014613", "0.59807456", "0.5972019", "0.5965606", "0.59385353", "0.59362686", "0.59294856", "0.5926789", "0.59238666", "0.5913036", "0.5904377", "0.5902651", "0.58959395", "0.58904123", "0.5886654", "0.58861583", "0.5884658", "0.5874274", "0.5866046", "0.5865266", "0.58600974", "0.5844295", "0.58311117", "0.5822524", "0.58202374", "0.5817723", "0.5813484", "0.58077824", "0.5807433", "0.5806807", "0.58015394", "0.5794296", "0.5792706", "0.57791936", "0.577315", "0.57717055", "0.57618415", "0.57554144", "0.57537353", "0.57468355", "0.57468355", "0.5743085", "0.57352054", "0.572396", "0.5717879", "0.57168967", "0.57168967", "0.5715109", "0.5710717", "0.5708076", "0.570769", "0.5707036", "0.5702665", "0.5702154", "0.5700679", "0.5700679", "0.5700679", "0.5693217", "0.5689107", "0.5687643", "0.56737363", "0.5667487", "0.5664321", "0.5664321", "0.5664321", "0.5663385", "0.5661992", "0.56585675", "0.5656115", "0.5650985", "0.56447953", "0.564241", "0.5636411", "0.56251156", "0.562415", "0.5621605", "0.56215495", "0.5620621", "0.5606885", "0.56067073", "0.56009835", "0.5599486", "0.5598466" ]
0.8567234
0
returns the group that is flagged
public Groups getFlaggedGroup() { return flaggedGroup; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "GroupOpt getGroup();", "public long getGroup()\r\n { return group; }", "public Group getGroup() {\n return this.inGroup;\n }", "public String getGroup();", "public int getGroup() {\n return group;\n }", "public boolean getInValidGroup(){return this.inValidGroup;}", "java.lang.String getGroup();", "public String getGroup ()\n {\n return group;\n }", "public String getGroup ()\n {\n return group;\n }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public String getGroup() {\n return group;\n }", "public String getGroup() {\n return group;\n }", "public String getGroup() {\n return this.group;\n }", "public String group() { return group; }", "public String getGroup() {\n\t\treturn group;\n\t}", "Boolean groupingEnabled();", "ZigBeeGroup getGroup(int groupId);", "public Group getGroup() {\n return group;\n }", "public Group getGroup() {\n return _group;\n }", "Object getGroup(int groupPosition);", "public int getGroupID() {\n return groupID;\n }", "Object getGroupID(String groupName) throws Exception;", "public ID getGroupID() {\n\treturn groupID;\n }", "IGroup getFullGroup();" ]
[ "0.7056631", "0.70340323", "0.6996188", "0.68966365", "0.68226326", "0.68055564", "0.67891777", "0.67375064", "0.67375064", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66712326", "0.66365063", "0.66365063", "0.66239446", "0.6542366", "0.65350246", "0.64952344", "0.64842963", "0.64043593", "0.6389383", "0.633637", "0.6304998", "0.62989163", "0.62961954", "0.62777424" ]
0.82640606
0
Constructs an object to hold the data and point to null as the next node.
public Node(T theData) { this.data = theData; this.next = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Node(){\r\n\t\tdata = null;\r\n\t\tnext = null;\r\n\t}", "public Node() {\n\t\tdata = null;\n\t\tnext = null;\n\t\tprevious = null;\n\t}", "private Node(Object dataPortion) {\n\t\t\tdata = dataPortion;\n\t\t\tnext = null;\n\t\t}", "public Node()\n {\n\t this.data = 0;\n\t this.prev = null;\n\t this.next = null;\n }", "public Node()\r\n\t{\r\n\t\tnext = null;\r\n\t\tinfo = 0;\r\n\t}", "private Node(E data) {\n this.data = data;\n previous = null;\n next = null;\n }", "public Node(E data){\n\t\t\tnext = null;\n\t\t\tthis.data = data;\n\t\t}", "public Node() {\n pNext = null;\n }", "public AllOOneDataStructure() {\n\t\thead=new Node(\"\", 0);\n\t\ttail=new Node(\"\", 0);\n\t\thead.next=tail;\n\t\ttail.prev=head;\n\t\tmap=new HashMap<>();\n\t}", "private Node(E dataItem)\n {\n data = dataItem;\n next = null;\n }", "Node(T data)\n\t{\n\t\tthis.data=data;\n\t\tthis.next=null;\n\t}", "protected Node(T dataPortion) {\n data = dataPortion;\n next = null;\n }", "public Node(Object _data, Node _next) {\r\n\t\t\tnext = _next;\r\n\t\t\tdata = _data;\r\n\t\t}", "private Node() {\n \tthis.data = null;\n \tthis.pred = this;\n \tthis.succ = this;\n }", "public ObjectListNode() {\n info = null;\n next = null;\n }", "public Node(T data) {\n\t\t\tthis.data = data;\n\t\t\tthis.nextNode = null;\n\t\t}", "public LinkedNode() {\n\t myNextNode = null;\n }", "@SuppressWarnings(\"unused\")\n public Node(Object dataValue, Node nextValue) \n {\n next = nextValue;\n data = dataValue;\n }", "public Node(E data, Node next) {\n\t\t\tthis.data = data;\n\t\t\tthis.next = next;\n\t\t}", "Node(){\n\t\t\tthis.array = new Node[256];\n\t\t\tthis.val = null;\n\t\t}", "public Node()\r\n\t{\r\n\t\tnext = null;\r\n\t\tprev = null;\r\n\t\telem = 0;\r\n\t}", "Node()\r\n { // constructor for head Node \r\n prev = this;\r\n next = this;\r\n trafficEntry = new TrafficEntry();\r\n }", "public SkipListNode() {\n\t// construct a dummy node\n\tdata = null;\n\tnext = new ArrayList<SkipListNode<K>>();\n\tnext.add(null);\n }", "public Node()\n\t{\n\t\t\n\t\tdata = new IntData();\n\t\tdata.setData(Integer.MIN_VALUE);\n\t\tnext=null;\n\t}", "public Node (Object newItem) {\n next = null; // set intially to null\n item = newItem;\n }", "public Node(int data) {\n this.data = data;\n next = null;\n }", "Node(int data) {\n this.data = data;\n this.nextNode = null;\n }", "public CLinkedList() {\n \tthis.sentinel = new Node();\n \tthis.sentinel.succ = sentinel;\n \tthis.sentinel.pred = sentinel;\n \tthis.size = 0;\n }", "public Node(D d){\n\t\tdata = d;\n\t\tnext = null;\n\t}", "public DoubleNode()\n {\n next = null;\n previous = null;\n element = null;\n }", "public Node(String newdata)\n {\n previous = null;\n next = null;\n data = newdata;\n }", "Node(Object newItem){\n item = newItem; //--points to a different\n next = null;\n }", "public LinearNode() {\r\n\t\t\r\n\t\tnext = null;\r\n\t\telement = null;\r\n\t\r\n\t}", "public LinkedList(E data, Node<E> next) {\n size++;\n prev = null;\n head = new Node(data, next);\n cursor = head;\n tail = head;\n }", "Node (int data) {\n this.value = data;\n this.next = null;\n }", "public DoublyLinkedList() \r\n {\r\n sentinel = new Node<T>(null,null,null);\r\n sentinel.next = sentinel.prev = sentinel;\r\n size = 0;\r\n }", "public DoubleLinked() {\n first = null;\n last = null;\n N = 0;\n }", "public QueueNode() {\n first = null;\n last = null;\n n = 0;\n }", "public Node(E data, Node<E> link) {\r\n\t\tthis.data = data;\r\n\t\tthis.link = link;\r\n\t\tthis.counter = 0;\r\n\t}", "public Node(Object dataValue, Node nextValue, Node prevValue) \r\n\t\t{\r\n\t\t\tnext = nextValue;\r\n\t\t\tprev = prevValue;\r\n\t\t\tdata = dataValue;\r\n\t\t}", "public Node(int data) { // Just data in constructor would suffice, clients wont pass next anyways\n this.data = data;\n }", "public Node(Object data) {\n\t\t\tthis.data = data;\n\t\t}", "public MyDoublyLinkedList() {\n head.data = null;\n head.next = tail;\n tail.data = null;\n tail.prev = head;\n }", "public ListNode(E data) {\r\n\t\t\tthis.data = data;\r\n\t\t\tthis.next = null;\r\n\t\t}", "public Node(Node<D> n) {\n\t\tdata = n.getData();\n\t\tnext = n.getNext();\n\t}", "public LinkedList() {\n\t\thead = new Node(null, null);\n\t\tsize = 0;\n\t\titerator = null;\n\t}", "private Node() {\n // Start empty.\n element = null;\n }", "public LinkedList() {\n this.head = null;\n this.tail = null;\n }", "public SNode(T data, SNode<T> next) {\n this.data = data;\n this.next = next;\n }", "public LinkedList(){\n this.head = null;\n this.numNodes = 0;\n }", "public ListNode(Object d) {\n\t\tdata = d;\n\t\tnext = null;\n\t}", "public LinkedList() {\n\t\titems = lastNode = new DblListnode<E>(null);\n\t\tnumItems=0;\n\t}", "public DLList() {\n head = null;\n tail = null;\n }", "public ListNode(E data, ListNode next) {\r\n\t\t\t//this.data = data;\r\n\t\t\tthis(data);\r\n\t\t\tthis.next = next;\r\n\t\t}", "public MyLinkedList() {\n first = null;\n n = 0;\n }", "public ObjectListNode (Object o) {\n info = o;\n next = null;\n }", "public LinkedList() {\n\t\tfirst = null;\n\t}", "public LinkedList()\r\n {\r\n head = null;\r\n tail = null;\r\n }", "public LinkedList()\n {\n head = null;\n tail = null;\n }", "DListNode() {\n item[0] = 0;\n item[1] = 0;\n item[2] = 0;\n prev = null;\n next = null;\n }", "public LinkedList(){\n\t\thead = null;\n\t\ttail = null;\n\t}", "public LinkedQueue(){\n this.firstNode = null;\n this.lastNode = null;\n }", "public LinkList() {\n this.head = null;\n this.tail = null;\n }", "public Node(T data) {\n this(data, null, null, null);\n }", "Node(T data) {\n\t\t\tthis(data, null);\n\t\t}", "public DataStructure() {\r\n firstX = null;\r\n lastX = null;\r\n firstY = null;\r\n lastY = null;\r\n size = 0;\r\n }", "public LinkedListStructureofaSinglyLinkedListClass() {\n\t\theadNode=null;\n\t\tsize=0;\n\t\t\n\t}", "public Node(T data) {this.data = data;}", "public DoubleLinkedList()\n {\n \tfirst=last=null;\n }", "Node() {\r\n this.k = null;\r\n this.v = null;\r\n this.c = null;\r\n kcount = 0;\r\n }", "public DoublyLinkedList() {\r\n\t\tinitializeDataFields();\r\n\t}", "public LinkedList()\n\t{\n\t\tthis.head = new Node(null);\n\t\tsize = 0;\n\t}", "public LinkedList() {\n\t\thead = null;\n\t\ttail = null;\n\t\tsize = 0;\n\t}", "public DoubleLinkedSeq()\r\n {\r\n manyNodes = 0; \r\n head = null;\r\n tail = null;\r\n cursor = null;\r\n precursor = null; // Implemented by student.\r\n }", "private Node( T data_ )\n {\n data = data_;\n parent = this;\n }", "public MyLinkedList() {\n size = 0;\n head = null;\n tail = null;\n }", "PublicLinkedList() {\n\t\tfront = back = null;\n\t}", "public Node(int data) {\n this.data = data;\n this.next = this.random = null;\n }", "public LinkedList(){\n count = 0;\n front = rear = null;\n }", "public MyLinkedList()\n {\n head = new Node(null, null, tail);\n tail = new Node(null, head, null);\n }", "public LinkedList(){\n this.size = 0;\n first = null;\n last = null;\n }", "public LinkedList() {\n head = null;\n numElement = 0;\n }", "public LL() {\n head = null;\n }", "public LinkedList() {\n\t\thead = null;\n\t\tsize = 0;\n\t}", "Node(T theValue, Node theNext) {\n if (theValue == null)\n throw new RuntimeException(\"Null is not accepted for data\");\n value = theValue;\n next = theNext;\n }", "LinkedEntry() {\n super(null, null, 0, null);\n nxt = prv = this;\n }", "public DoubleLinkedList() {\n head = null;\n tail = null;\n }", "public MyLinkedList() {\n \thead = null;\n \ttail = null;\n }", "public ListEntry() {\n this.data = null;\n this.next = null;\n this.prev = null;\n }", "public Node(int data, Node next, char a) {\n // Call the other constructor in the list\n this(data);\n this.next = next;\n }", "public HashNode(E data, HashNode<E> next) {\n this.data = data;\n this.next = next;\n }", "public Lista()\n {\n empty=true;\n next = null;\n }", "public GenLinkedList() {\r\n\t\thead = curr = prev = null;\r\n\t}", "private void init() {\r\n head = new DLList.Node<T>(null);\r\n head.setNext(tail);\r\n tail = new DLList.Node<T>(null);\r\n tail.setPrevious(head);\r\n size = 0;\r\n }", "public ListNode(int data) {\n this.data = data;\n this.next = null;\n this.previous = null;\n }", "public LinkedList() {\r\n front = new ListNode(null);\r\n back = new ListNode(null, front, null);\r\n front.next = back;\r\n size = 0;\r\n }", "public TreeNode()\r\n\t\t{\r\n\t\t\thead = null; //no data so set head to null\r\n\t\t}", "public Node(E data) {\r\n\t\tthis.data = data;\r\n\t}", "public Node(T data) {\r\n this.data = data;\r\n }", "public Node(Integer intdata) {\n\t\tdata = new IntData();\n\t\tsetData(intdata);\n\t\tnext=null;\n\t}" ]
[ "0.8019956", "0.79114103", "0.7589935", "0.7547071", "0.73860294", "0.7325141", "0.7291513", "0.72907585", "0.72500616", "0.72286135", "0.71348023", "0.7113211", "0.71086234", "0.7104771", "0.708528", "0.6989325", "0.6984778", "0.6970106", "0.6915836", "0.687667", "0.68572026", "0.6849689", "0.68036675", "0.67934597", "0.6762535", "0.67461616", "0.6694608", "0.66943467", "0.66594476", "0.66512704", "0.66318274", "0.66272193", "0.66260564", "0.6619092", "0.661608", "0.6600681", "0.6592556", "0.6577572", "0.655892", "0.65573466", "0.65436757", "0.6542654", "0.65354973", "0.65328765", "0.65317786", "0.6526467", "0.6509068", "0.64964867", "0.6493317", "0.64760554", "0.6475148", "0.64687794", "0.6459014", "0.6450994", "0.6447119", "0.6427678", "0.6427545", "0.6414016", "0.64116794", "0.64102113", "0.64018774", "0.63933444", "0.6386114", "0.6375922", "0.6372498", "0.6369522", "0.6368497", "0.63612145", "0.6359499", "0.63547724", "0.63484186", "0.6340872", "0.63348013", "0.63331777", "0.6328232", "0.63242304", "0.6323313", "0.632323", "0.63215995", "0.63215667", "0.63211673", "0.6318264", "0.6316663", "0.6316157", "0.63143253", "0.6314303", "0.6312033", "0.63085246", "0.6308491", "0.6304369", "0.62984985", "0.6297136", "0.6295662", "0.6274371", "0.62743676", "0.6271209", "0.6269179", "0.62652075", "0.6258712", "0.62545097" ]
0.6810043
22
Constructs an object to hold the data and point to another element as the next node.
public Node(T theData, Node<T> another) { this.data = theData; this.next = another; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Node(E data, Node next) {\n\t\t\tthis.data = data;\n\t\t\tthis.next = next;\n\t\t}", "public Node(Object _data, Node _next) {\r\n\t\t\tnext = _next;\r\n\t\t\tdata = _data;\r\n\t\t}", "@SuppressWarnings(\"unused\")\n public Node(Object dataValue, Node nextValue) \n {\n next = nextValue;\n data = dataValue;\n }", "public Node(E data){\n\t\t\tnext = null;\n\t\t\tthis.data = data;\n\t\t}", "private Node(Object dataPortion) {\n\t\t\tdata = dataPortion;\n\t\t\tnext = null;\n\t\t}", "private Node(E data) {\n this.data = data;\n previous = null;\n next = null;\n }", "public Node(E element, Node prevNode, Node nextNode)\n {\n data = element;\n this.next = nextNode;\n this.prev = prevNode;\n if(nextNode != null)\n {\n nextNode.prev = this;\n }\n if(prevNode != null)\n {\n prevNode.next = this;\n }\n }", "Node(Object e, Node p, Node n) {\n element = e;\n previous = p;\n next = n;\n }", "Node(Object newItem){\n item = newItem; //--points to a different\n next = null;\n }", "public Node(Object dataValue, Node nextValue, Node prevValue) \r\n\t\t{\r\n\t\t\tnext = nextValue;\r\n\t\t\tprev = prevValue;\r\n\t\t\tdata = dataValue;\r\n\t\t}", "private Node(E dataItem)\n {\n data = dataItem;\n next = null;\n }", "public DNode(String e, DNode p, DNode n) { element = e; prev = p; next = n;}", "public LinkedList(E data, Node<E> next) {\n size++;\n prev = null;\n head = new Node(data, next);\n cursor = head;\n tail = head;\n }", "public node (int newData, node newNext){\r\n\t this.data = newData;\r\n\t this.next = newNext;\r\n\t}", "public Node(E data, Node<E> link) {\r\n\t\tthis.data = data;\r\n\t\tthis.link = link;\r\n\t\tthis.counter = 0;\r\n\t}", "public void setNext(Linkable nextObject);", "public Node(int data, Node next, char a) {\n // Call the other constructor in the list\n this(data);\n this.next = next;\n }", "public ListNode(E data, ListNode next) {\r\n\t\t\t//this.data = data;\r\n\t\t\tthis(data);\r\n\t\t\tthis.next = next;\r\n\t\t}", "public SNode(T data, SNode<T> next) {\n this.data = data;\n this.next = next;\n }", "@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\n\tpublic MyNode(E element, MyNode _next)\n\t{\n\t\tthis.data = element;\n\t\tthis.next = _next;\n\t}", "public HashNode(E data, HashNode<E> next) {\n this.data = data;\n this.next = next;\n }", "public void setNext(ObjectListNode p) {\n next = p;\n }", "public void setNext(Node<E> next) { this.next = next; }", "public Node(E element)\n {\n data = element;\n this.next = tail;\n this.prev = head;\n }", "public void addLink(E data){\n\t\t\n\t\tNode temp = new Node(data);\n\t\tNode current = head;\t\t//starting at head node and moving to end of list\t\t\t\t\n\t\t\n\t\twhile(current.getNext() != null){\n\t\t\tcurrent = current.getNext();\n\t\t}\n\t\t\n\t\tcurrent.setNext(temp);\n\t\tsize++; \t\t\t\t\t// increment the number of element\n\t}", "Node(T theValue, Node theNext) {\n if (theValue == null)\n throw new RuntimeException(\"Null is not accepted for data\");\n value = theValue;\n next = theNext;\n }", "public Node(D d){\n\t\tdata = d;\n\t\tnext = null;\n\t}", "public Node(int data) { // Just data in constructor would suffice, clients wont pass next anyways\n this.data = data;\n }", "public Node (Object newItem) {\n next = null; // set intially to null\n item = newItem;\n }", "public Node(String newdata)\n {\n previous = null;\n next = null;\n data = newdata;\n }", "public void setNext(Node<T> another)\n\t{\tthis.next = another; }", "ListNode(E data, ListNode prev, ListNode next) {\r\n this.data = data;\r\n this.next = next;\r\n this.prev = prev;\r\n }", "protected Node(T dataPortion) {\n data = dataPortion;\n next = null;\n }", "public Node(T data) {\n\t\t\tthis.data = data;\n\t\t\tthis.nextNode = null;\n\t\t}", "Node(T data)\n\t{\n\t\tthis.data=data;\n\t\tthis.next=null;\n\t}", "public AllOOneDataStructure() {\n\t\thead=new Node(\"\", 0);\n\t\ttail=new Node(\"\", 0);\n\t\thead.next=tail;\n\t\ttail.prev=head;\n\t\tmap=new HashMap<>();\n\t}", "Node(T data, Node<T> node) {\n\t\t\tthis.data = data;\n\t\t\tnextNode = node;\n\t\t}", "public DNode getNext() { return next; }", "public E next(){\r\n E data = node.getData();\r\n node = node.getNext();\r\n return data;\r\n }", "public Cell(Object value, Cell link)\n { val = value; \n next = link;\n }", "public Node setNextNode(Node node);", "public ObjectListNode (Object o, ObjectListNode p) {\n info = o;\n next = p;\n }", "public void setNext(ListElement<T> next)\n\t{\n\t\tthis.next = next;\n\t}", "public Node(Node<D> n) {\n\t\tdata = n.getData();\n\t\tnext = n.getNext();\n\t}", "public Node(E e, Node<E> n) {\r\n this.element = e;\r\n this.next = n;\r\n }", "public Node(T t, Node n) {\r\n \r\n element = t;\r\n next = n;\r\n }", "public ListNode(E data) {\r\n\t\t\tthis.data = data;\r\n\t\t\tthis.next = null;\r\n\t\t}", "public Node(D d, Node<D> n){\n\t\tdata = d;\n\t\tnext = n;\n\t}", "public Node(Content content, Node next) {\n\t\tthis.content = content;\n\t\tthis.next = next;\n\t}", "private Node(Node p, E e) {\n \tCLinkedList.this.size++;\n \tthis.data = e;\n \tthis.pred = p;\n \tthis.succ = p.succ;\n \tthis.pred.succ = this;\n \tthis.succ.pred = this;\n }", "public void setNext(DNode newNext) { next = newNext; }", "public ObjectListNode (Object o) {\n info = o;\n next = null;\n }", "public Node(String data, Node next, Node prev) {\n this.data = data;\n this.next = next;\n this.prev = prev;\n }", "public LinkedNode(final T theElement) {\n\t this();\n\t myData = theElement;\n }", "public Node(T theData) \n\t{\n\t\tthis.data = theData;\n\t\tthis.next = null;\n\t}", "public ListNode(E d, ListNode<E> node)\n { \n nextNode = node;\n data = d;\n }", "public ListNode(int data, ListNode next) {\n\t\tthis.data = data;\n\t\tthis.next = next;\n\t}", "public Node(E data) {\n this.data = data;\n }", "public Node(E data) {\r\n\t\tthis.data = data;\r\n\t}", "public void setNext(Node n) { next = n; }", "public Node(E data, Node newNode)\n\t\t{\n\t\t\tnext = newNode;\n\t\t\tthis.data = data;\n\t\t}", "public DoublyLinkedNode(E data) {\n this(null, null, data);\n }", "Link(Object it, Link inp, Link inn) { e = it; p = inp; n = inn; }", "public Node(int data) {\n this.data = data;\n next = null;\n }", "public ListNode(Object d) {\n\t\tdata = d;\n\t\tnext = null;\n\t}", "LinkedList(E data){\n\n }", "public Node(int data, Node prev, Node next)\n {\n\t this.data = data;\n\t this.prev = prev;\n\t this.next = next;\n }", "public void setNext()\n {\n\t int currentIndex = AL.indexOf(currentObject);\n\t currentObject = AL.get(currentIndex +1);\n\t \n\t// never let currentNode be null, wrap to head\n\tif (currentObject == null)\n\t\tcurrentObject = firstObject;\n }", "public LinearNode(T element) {\r\n\t\t\r\n\t\tnext = null;\r\n\t\tthis.element = element;\r\n\t\r\n\t}", "Node(){\r\n\t\tdata = null;\r\n\t\tnext = null;\r\n\t}", "public void setNext(DListNode2 next1){\r\n this.next = next1;\r\n }", "public Node(Object data) {\n\t\t\tthis.data = data;\n\t\t}", "Node (int data) {\n this.value = data;\n this.next = null;\n }", "public void setNext(SimpleNode next) {\n this.next = next;\n }", "public LinkList(String data){\n this.head = new Node(data, null);\n this.tail = this.head;\n }", "public Linkable next();", "public ListNode(E d)\n {\n nextNode = null;\n data = d;\n }", "Node()\r\n { // constructor for head Node \r\n prev = this;\r\n next = this;\r\n trafficEntry = new TrafficEntry();\r\n }", "public Node(int elem, Node prev, Node next)\r\n\t{\r\n\t\tthis.next = next;\r\n\t\tthis.prev = prev;\r\n\t\tthis.elem = elem;\r\n\t}", "public void setNext(Node<D> n){\n\t\tnext = n;\n\t}", "public HL7DataTree next() {\n final int size = Util.size(this.list), i = this.next == null ? size : this.list.indexOf(this.next) + 1;\n final HL7DataTree curr = this.next;\n \n this.next = i == size ? more() : this.list.get(i);\n \n return curr;\n }", "public void setNext(ListNode<Item> next) {\n this.next = next;\n }", "public ListNode(Object d, ListNode n) {\n\t\tdata = d;\n\t\tnext = n;\n\t}", "public Node(T data) {this.data = data;}", "Node(T data, ANode<T> next, ANode<T> prev) {\n if ((next == null) || (prev == null)) {\n throw new IllegalArgumentException(\"Cannot accept null node\");\n }\n this.data = data;\n this.next = next;\n this.prev = prev;\n prev.next = this;\n next.prev = this;\n }", "private Object getNextElement()\n {\n return __m_NextElement;\n }", "public Node(String value, Node next) {\n\t\t\tthis.value = value;\n\t\t\tthis.next = next;\n\t\t}", "public void setNext(ListElement next)\n\n\t {\n\t this.next = next;\n\t }", "public void setNext(Cell link)\n { next = link; }", "private Node( T data_ )\n {\n data = data_;\n parent = this;\n }", "public DoubleLinked() {\n first = null;\n last = null;\n N = 0;\n }", "public void setNext(Node<T> next) {\n this.next = next;\n }", "public void setNext(DoubleNode<T> node)\n {\n\n next = node;\n }", "Optional<Node<UnderlyingData>> nextNode(Node<UnderlyingData> node);", "Node(int data) {\n this.data = data;\n this.nextNode = null;\n }", "public void setNext(LinearNode<T> node) {\r\n\t\t\r\n\t\tnext = node;\r\n\t\t\r\n\t}", "public Node(Key key, Value val, Node next) {\n this.key = key;\n this.val = val;\n this.next = next;\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 }", "public Node() {\n pNext = null;\n }", "public void add(Object data) \r\n\t{\r\n\t\tif(headPointer == null)\r\n\t\t{\r\n\t\t\theadPointer = new Node(data,tail,null);\r\n\t\t}\r\n\t\telse if(tail == null)\r\n\t\t{\r\n\t\t\ttail = new Node(data, null, headPointer);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tNode t = tail;\r\n\t\t\ttail = new Node(data, null, t);\r\n\t\t\tt.setNext(tail);\r\n\t\t\tt.getPrev().setNext(t);\t\t\r\n\t\t}\r\n\t\tincrementCounter();\r\n\t}" ]
[ "0.7019737", "0.69910055", "0.6835244", "0.6771144", "0.67289037", "0.6703427", "0.66834664", "0.66828406", "0.66732424", "0.6649884", "0.6614132", "0.65582395", "0.6525295", "0.65137523", "0.651074", "0.649904", "0.64837044", "0.64831513", "0.6465155", "0.6445058", "0.64194906", "0.6365434", "0.63000596", "0.62972695", "0.62535745", "0.62512016", "0.625014", "0.6236259", "0.6209195", "0.6191143", "0.6179807", "0.6179332", "0.61683464", "0.61670285", "0.61625504", "0.6140996", "0.6124991", "0.6121575", "0.6116339", "0.6109124", "0.60978425", "0.6095669", "0.60896784", "0.60827786", "0.60812235", "0.6079962", "0.6072247", "0.60692745", "0.6059192", "0.6045313", "0.60446924", "0.60380703", "0.60360163", "0.6010648", "0.5998464", "0.59918886", "0.5983921", "0.59820575", "0.5976786", "0.5970656", "0.59696335", "0.5969395", "0.5955293", "0.59414417", "0.59393436", "0.59391093", "0.5934419", "0.5915667", "0.59131694", "0.59118426", "0.589737", "0.58870775", "0.5886564", "0.58808905", "0.5871527", "0.58703154", "0.5869614", "0.58638996", "0.5853345", "0.5851382", "0.5851369", "0.5849451", "0.5842752", "0.5839449", "0.582629", "0.58236367", "0.58131266", "0.5806691", "0.58019215", "0.5792622", "0.579232", "0.579144", "0.57908255", "0.5789555", "0.5789508", "0.5788719", "0.5786624", "0.5780443", "0.57779586", "0.57721233" ]
0.6806116
3
Checks if this node is pointing to another Node object.
public boolean isLastNode() { // Checks if I am pointing to null*. // If so, then I know I am the last node. // *Note: From the perspective of this instance of Node. if (this.next == null) { return true; } // Otherwise, I know I am not last, // because there is a next node after me. return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\t\tpublic boolean isSameNode(Node other)\r\n\t\t\t{\n\t\t\t\treturn false;\r\n\t\t\t}", "public boolean isRealNode();", "public boolean isRealNode();", "public boolean isSameNodeInfo(NodeInfo other) {\n if (!(other instanceof DocumentWrapper)) {\n return false;\n }\n return node == ((DocumentWrapper)other).node;\n }", "boolean hasIsNodeOf();", "public boolean equals(AsNode other) {\n\t\treturn this.state.getHash() == other.state.getHash();\n\t}", "public boolean isRealNode()\r\n\t\t{\r\n\t\t\tif (this.key == -1)\r\n\t\t\t\treturn false;\r\n\t\t\treturn true; \r\n\t\t}", "@Override\r\n\tpublic boolean isEqual(Node node) {\n\t\treturn false;\r\n\t}", "public boolean equals(Object obj)\n\t{\n\t\tif(obj == this)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\tif(getClass() != obj.getClass())\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\tNode node = (Node)obj;\n\n\t\treturn userObject == node.getUserObject();\n\t}", "@Override\r\n\tpublic boolean equals(Object obj) {\n\t\tNode another = (Node) obj;\r\n\t\treturn (this.id == another.getId());\r\n\t}", "@Override\r\n\t\tpublic boolean isEqualNode(Node arg)\r\n\t\t\t{\n\t\t\t\treturn false;\r\n\t\t\t}", "public boolean equals(Object other){\n if(other instanceof Node){\n return ((Node)other).getData().equals(this.data);\n } else {\n return false;\n }\n\n }", "public boolean equals(Object other) {\n return this == other\n || ((other instanceof ComponentNode) \n && (getUserObject() == ((ComponentNode)other).getUserObject()));\n }", "boolean hasNode();", "boolean hasNode();", "@Override\n public boolean equals(final Object obj) {\n if (obj == null) {\n return false;\n }\n if (getClass() != obj.getClass()) {\n return false;\n }\n return Objects.equals(this.name, ((Node) obj).name);\n }", "protected boolean traverseThisNode(iNamedObject node)\n\t{\n\t\treturn true;\n\t}", "boolean hasNode()\n/* */ {\n/* 473 */ if ((this.bn == null) && (this.mn == null)) return false;\n/* 474 */ if (this.jt == null) return false;\n/* 475 */ return true;\n/* */ }", "public boolean isSameAs( PlanNode other ) {\n if (other == null) return false;\n if (this.getType() != other.getType()) return false;\n if (!ObjectUtil.isEqualWithNulls(this.nodeProperties, other.nodeProperties)) return false;\n if (!this.getSelectors().equals(other.getSelectors())) return false;\n if (this.getChildCount() != other.getChildCount()) return false;\n Iterator<PlanNode> thisChildren = this.getChildren().iterator();\n Iterator<PlanNode> thatChildren = other.getChildren().iterator();\n while (thisChildren.hasNext() && thatChildren.hasNext()) {\n if (!thisChildren.next().isSameAs(thatChildren.next())) return false;\n }\n return true;\n }", "public boolean isNode() {\n return (kids != null);\n }", "public boolean isRealNode() {\n\t\t\tif (this.getHeight() != -1) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "@Override\r\n public boolean equals(Object o) {\r\n GraphNode n = (GraphNode) o;\r\n if (n != null && n.getX() == getX() && n.getY() == getY())\r\n return true;\r\n return false;\r\n }", "@Override\r\n public boolean equals(Object obj) {\n return this.name.equals(((Node) obj).name);\r\n }", "@Override\n public boolean equals(Object o) {\n if (this == o) {\n return true;\n }\n if (!(o instanceof Node)) {\n return false;\n }\n Node node = (Node) o;\n return Objects.equals(course, node.course) && Objects\n .equals(nextNode, node.nextNode);\n }", "@Override\n\tpublic boolean equals(Object obj) {\n\t\ttry {\n\t\t\tif (id == ((Node) obj).getId())\n\t\t\t\treturn true;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t\treturn false;\n\t}", "public boolean tooCloseToOtherNodes(Node nodeToCheck) {\n\t\tEnumeration allNodes = parent.networkManager.getNodes().elements();\n\t\tNode node = null;\n\t\tPoint centre1, centre2;\n\t\twhile (allNodes.hasMoreElements()) {\n\t\t\tnode = (Node)allNodes.nextElement();\n\t\t\tif (node != nodeToCheck) {\n\t\t\t\tcentre1 = node.getCentre();\n\t\t\t\tcentre2 = nodeToCheck.getCentre();\n\t\t\t\tif (centre1.distance(centre2) < Node.DIAMETER + Node.RADIUS)\n\t\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean equals(XObject obj2){\n if(obj2.getType()==XObject.CLASS_NODESET)\n return obj2.equals(this);\n if(null!=m_obj){\n return m_obj.equals(obj2.m_obj);\n }else{\n return obj2.m_obj==null;\n }\n }", "@Override\n\tpublic boolean equals(Object obj) {\n\tif (this.id == ((Node<?>) obj).getId()) \n\t\t\treturn true;\n\t\treturn false;\n\t}", "public boolean hasNode() {\n return nodeBuilder_ != null || node_ != null;\n }", "public boolean hasNode() {\n return nodeBuilder_ != null || node_ != null;\n }", "public boolean isDestination(Node node)\r\n {\r\n if(node == End)\r\n return true;\r\n else \r\n return false;\r\n }", "@java.lang.Override\n public boolean hasNode() {\n return node_ != null;\n }", "@java.lang.Override\n public boolean hasNode() {\n return node_ != null;\n }", "private boolean isItThisNode(KdNode kdNode, Point2D p) {\n int comparison;\n\n if (kdNode == null) return false;\n if (kdNode.point.equals(p))\n return true;\n\n if (kdNode.dimension) { // if this KdNode is vertical (root.dimension == true)\n comparison = Double.compare(p.x(), kdNode.point.x());\n if (comparison == 0) comparison = Double.compare(p.y(), kdNode.point.y());\n }\n else { // if this KdNode is horizontal (root.dimension == false)\n comparison = Double.compare(p.y(), kdNode.point.y());\n if (comparison == 0) comparison = Double.compare(p.x(), kdNode.point.x());\n }\n\n if (comparison > 0) {\n if (kdNode.right == null) {\n // dead end when searching for where point should be, it is not in the set\n return false;\n }\n else {\n return isItThisNode(kdNode.right, p);\n }\n }\n else { // comparison < 0\n if (kdNode.left == null) {\n // dead end when searching for where point should be, it is not in the set\n return false;\n }\n else {\n return isItThisNode(kdNode.left, p);\n }\n }\n }", "public abstract boolean isUsing(Long graphNode);", "@Override\n public boolean link(T dataX, T dataY) throws NodeNotFoundException { return link(dataX, dataY, 1.0); }", "private boolean isColliding(Node node1, Node node2){\n\t\tfinal int offset = 2;\n\t\tBounds bounds1 = node1.getBoundsInParent();\n\t\tBounds bounds2 = node2.getBoundsInParent();\n\t\tbounds1 = new BoundingBox(bounds1.getMinX() + offset, bounds1.getMinY() + offset,\n\t\t\t\tbounds1.getWidth() - offset * 2, bounds1.getHeight() - offset * 2);\n\t\tbounds2 = new BoundingBox(bounds2.getMinX() + offset, bounds2.getMinY() + offset,\n\t\t\t\tbounds2.getWidth() - offset * 2, bounds2.getHeight() - offset * 2);\n\t\treturn bounds1.intersects(bounds2);\n\t}", "boolean hasHasNodeID();", "public boolean equals(Node psNode)\r\n\t\t{\r\n\t\t\tif(data.equals(psNode.data))\r\n\t\t\t{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t}", "@Override\n\tpublic boolean containsNode(Object node)\n\t{\n\t\t// This is presumably faster than searching through nodeList\n\t\treturn nodeEdgeMap.containsKey(node);\n\t}", "@Test\n public void testEqualTo() {\n System.out.println(\"AbsolutePathNode - testEqualTo\");\n final AbsolutePathNode instance1 = new AbsolutePathNode();\n final AbsolutePathNode instance2 = new AbsolutePathNode();\n final TestNode testInstance = TestNode.instance;\n assertTrue(instance1.equalTo(instance2));\n assertFalse(instance1.equalTo(testInstance));\n }", "public final boolean isOwner() {\n return currentOwner == this;\n }", "protected boolean hasNode(int ID) {\n\t\treturn nodes.containsKey(ID);\n\t}", "protected boolean Exists()\n\t{\n\t\tif (identity<1) return false;\n\t\tNodeReference nodeReference = getNodeReference();\n\t\treturn (nodeReference.exists() || nodeReference.hasSubnodes());\n\t}", "@Override public boolean equalsDeep(@Nullable SqlNode node, Litmus litmus) {\n // This is the difference over super.equalsDeep. It skips\n // operands[0] the declared name fo this window. We only want\n // to check the window components.\n return node == this\n || node instanceof SqlWindow\n && SqlNode.equalDeep(\n Util.skip(getOperandList()),\n Util.skip(((SqlWindow) node).getOperandList()), litmus);\n }", "protected boolean isExternal(BTNode<E> v){\n\t\treturn (v.leftChild() == null && v.rightChild() == null); \n }", "public boolean hasNode(Node p_node) {\n\t\treturn nodes.contains(p_node);\n\t}", "public boolean sanity()\n {\n A1List p1 = this.getFirst();\n A1List p2 = this.getFirst();\n while(true){\n p1 = p1.getNext();\n p2 = p2.getNext();\n if (p2 == null) break;\n p2 = p2.getNext();\n if (p2==null) break;\n if (p1 ==p2) return false;\n }\n\n // Checkign whether the sentinel nodes are correct or not.\n A1List curr = this.getFirst();\n if (curr ==null){\n if (this.next ==null){\n if (this.prev.prev != null) return false;\n }\n else if (this.prev ==null){\n if (this.next.next !=null) return false;\n }\n }\n else {\n curr = curr.prev;\n // curr shouldd become the head sentinel;\n if (curr.prev !=null ) return false;\n while (curr.getNext() !=null ){\n curr = curr.next;\n }\n // Now curr becomes the node before tail sentinel\n if (curr.next.next !=null) return false;\n }\n\n // Checking whether the prev of the next of a node points back to that node oe not.\n curr = this.getFirst();\n while(curr!=null){\n if (curr.next.prev != curr) return false;\n curr = curr.getNext();\n }\n\n\n return true;\n }", "public boolean isConnectedTo(Node<A> n) {\n\t\t\n\t\tif (g == null) return false;\n\t\t\n\t\tif (g.contains(n)){\n\t\t\t\n\t\t\tfor (Object o: g.getEdges()) {\n\t\t\t\t\n\t\t\t\tif (((Edge<?>)o).getFrom().equals(this) && ((Edge<?>)o).getTo().equals(n)) {\n\t\t\t\t\treturn true;\n\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\n\t\t}\n\t\treturn false;\n\t}", "public synchronized boolean contains(\n Object oObject)\n {\n if (oObject == null || !this.m_GenericClass.isInstance(oObject))\n {\n return false;\n }\n\n // Assert: object != null && object instanceOf E\n E element = this.m_GenericClass.cast(oObject);\n\n return findNode(element).m_NodePointer != null;\n }", "public boolean isLinked(int axis) {\n if (axis == HORIZONTAL) {\n return horizontalMaster != null;\n }\n assert (axis == VERTICAL);\n return (verticalMaster != null);\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 boolean isEqualNode(int xcoords, int ycoords){ \n boolean ret = false;\n Node N = head;\n for (int i = 1; i < numItems; i++){\n if (xcoords == N.x && ycoords == N.y){\n ret = true;\n }else { \n ret = false;\n }\n N = N.next;\n }\n return ret;\n }", "@Override\n protected boolean doEquals(Object obj) {\n if (obj instanceof BsMemberFollowing) {\n BsMemberFollowing other = (BsMemberFollowing)obj;\n if (!xSV(_memberFollowingId, other._memberFollowingId)) { return false; }\n return true;\n } else {\n return false;\n }\n }", "@Override\n\tpublic boolean equals(Object other) {\n\t\tif (this == null || other == null) {\n\t\t\treturn false;\n\t\t}\n\t\tif (!(other instanceof TextNode)) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (!(this.toString().equals(other.toString()))) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "boolean hasNodeId();", "private boolean checkHaveThisNode(int index) {\n\t\treturn this.array[index] == null;\n\t}", "boolean contains(NetNode other) {\n\t\t\treturn mask >= other.mask && (this.address & (-1 << mask)) == (other.address & (-1 << mask));\n\t\t}", "public boolean equals(ListNode one, ListNode two){\n\t \t\treturn one.val == two.val;\n\t \t}", "public boolean belongsToTree(RBNode x){\r\n\t\twhile (x != nil) {\r\n\t\t\tif (x == root) return true;\r\n\t\t\telse x = x.p;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean equals(Object obj){\r\n\t\tDirectedEdge edge=(DirectedEdge)obj;\r\n\t\tif (source.equals(edge.getSouceNode() )&& \r\n\t\t\ttarget.equals(edge.getTargetNode()))\r\n\t\t\treturn true;\r\n\t\telse\r\n\t\t\treturn false;\r\n\t}", "@Override\n public boolean equals(Object obj) {\n if (this == obj)\n return true;\n if (obj == null)\n return false;\n if (getClass() != obj.getClass())\n return false;\n SearchNode other = (SearchNode) obj;\n if (x != other.x)\n return false;\n if (y != other.y)\n return false;\n return true;\n }", "NetworkNodeType getIsA();", "boolean usedByNode(Long id);", "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 isNodeProp() {\n \t\treturn isNodeProp;\n \t}", "private boolean hasTwo()\r\n\t\t{\r\n\t\t\treturn getLeftChild() != null && getRightChild() != null;\r\n\t\t}", "@Override\n\t\tpublic boolean addCheckNodeObject(Node node, IRdfModel rdfModelObject) {\n\t\t\treturn false;\n\t\t}", "public boolean isAdjacent(NodeTree location){\n return isAdjacent(this.head, location);\n }", "boolean hasNextNode()\r\n\t{\n\t\tif (getLink() == null) return false;\r\n\t\telse return true;\r\n\t}", "@Override\n public boolean containsNodeFor(E item) {\n if(item == null){\n throw new NullPointerException(\"Received null as value.\");\n }\n return graphNodes.containsKey(item);\n }", "@Override\n public boolean equals(Object other) {\n if (other == null) return false;\n else if (!(other instanceof MazeState)) return false;\n return this.getPawnOne().getPositionNr() == ((MazeState) other).getPawnOne().getPositionNr() &&\n this.getPawnTwo().getPositionNr() == ((MazeState) other).getPawnTwo().getPositionNr();\n }", "@Override\n\t\tpublic boolean equals(Object other) {\n\t\t\treturn Arrays.equals(state, ((MazeNode) other).state);\n\t\t}", "public boolean equals(Node testNode) {\r\n\t\tif(this.getID().equals(testNode.getID())) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public boolean inSameSet( T obj1, T obj2 )\n {\n // Find the root of each object; if either is not contained, the root\n // value will be null, and we throw an exception.\n Node root1 = getRoot(nodes.get(obj1));\n Node root2 = getRoot(nodes.get(obj2));\n if ( root1 == null && root2 == null )\n throw new NoSuchElementException( \"Sets do not contain either object: \" + obj1 + \", \" + obj2 );\n if ( root1 == null )\n throw new NoSuchElementException( \"Sets do not contain object: \" + obj1 );\n if ( root2 == null )\n throw new NoSuchElementException( \"Sets do not contain object: \" + obj2 );\n // If here, then have non-null root for each input; check if same Node.\n return root1 == root2;\n }", "@Override\n public boolean equals(Object obj) {\n if (obj == null) {\n return false;\n }\n if (getClass() != obj.getClass()) {\n return false;\n }\n \n final Point other = (Point) obj;\n if( !(Point.memeReel(this.x, other.getX()) && Point.memeReel(this.y, other.getY())) ) {\n return false;\n }\n\n return true;\n }", "public boolean hasEdge(int node1, int node2)\n{\n\tNode s=(Node)this.getNodes().get(node1);\n return s.hasNi(node2);\n\t\n}", "public static boolean isEqual(JexlNode first, JexlNode second) {\n return checkEquality(first, second).isEqual();\n }", "private boolean compatibleNodeTypes(AxiomTreeNode t1, AxiomTreeNode t2) {\n if (!t1.getNodeType().equals(t2.getNodeType())) {\n return false;\n }\n \n switch (t1.getNodeType()) {\n case CARD:\n int label1 = (Integer) t1.getLabel();\n int label2 = (Integer) t2.getLabel();\n return (label1 == label2);\n \t\n case OWLOBJECT:\n OWLObject o1 = (OWLObject) t1.getLabel();\n OWLObject o2 = (OWLObject) t2.getLabel();\n //System.out.println(o1.getClass());\n //System.out.println(o2.getClass());\n //Check for datatypes - then check datatype to see match. Else, return true if compatible.\n if(o1.getClass() == o2.getClass())\n {\n \tif(!o1.getDatatypesInSignature().isEmpty())\n \t{\n \t\t//Need to check if built in first. First check is convenience, datatypes should match\n \t\t//If one is built in, so should other. If neither is built in, this is also a viable match\n \t\t//If not equal and at least one is built in, its not a match.\n \t\tOWLDatatype dt1 = (OWLDatatype) o1.getDatatypesInSignature().toArray()[0];\n \t\t\tOWLDatatype dt2 = (OWLDatatype) o2.getDatatypesInSignature().toArray()[0];\n \t\t\t//System.out.println(\"DT1: \" + dt1);\n \t\t\t//System.out.println(\"DT2: \" + dt2);\n \t\tif(dt1.equals(dt2) && dt1.isBuiltIn())\n \t\t{\t\n \t\t\t//System.out.println(\"Standard state\");\n \t\t\t//System.out.println(o1.equals(o2));\n \t\t\treturn o1.equals(o2);\n \t\t}\n \t\telse if(!dt1.isBuiltIn() && !dt2.isBuiltIn())\n \t\t{\n \t\t\t//System.out.println(\"Unique state\");\n \t\t\treturn true;\n \t\t}\n \t\telse\n \t\t{\n \t\t\t//System.out.println(\"Rejection state\");\n \t\t\treturn false;\n \t\t}\n \n \t}\n \telse\n \t{\n \t\treturn true;\n \t}\n }\n else\n {\n \treturn false;\n }\n }\n return false;\n }", "public boolean containsNode(Node n);", "public boolean isContainNode(ServentInfo a){\n\t\tfor(int i = 0;i<serventList.size();i++){\n\t\t\tServentInfo b = serventList.get(i);\n\t\t\tif(b.IP.equals(a.IP) && b.port == a.port){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public final boolean tryOwn() {\n return own(this) == this;\n }", "public boolean isOther() {\n\t\treturn color == null;\n\t}", "public graphNode isMember(graphNode ne){\n\t\tif(this.head==null){return null;}\n\t\tgraphNode travgraphNode=this.head;\n\t\twhile(travgraphNode!=null){\n\t\t\tif(travgraphNode.equals(ne)){\n\t\t\t\treturn travgraphNode;\n\t\t\t}\n\t\t\ttravgraphNode=travgraphNode.next;\n\t\t}\n\t\treturn null;\n\t}", "@DISPID(1611006000) //= 0x60060030. The runtime will prefer the VTID if present\n @VTID(75)\n boolean externalReferencesNodeInTree();", "public boolean equals(Point other) {\n if (other == null) {\n return false;\n }\n return this.x == other.x && this.y == other.y;\n }", "@Override\n public boolean equals(@Nullable Object object) {\n // TODO: Warning - this method won't work in the case the id fields are not set\n if (!(object instanceof XBENodeTree)) {\n return false;\n }\n\n XBENodeTree other = (XBENodeTree) object;\n return this.getId() == other.getId();\n }", "public boolean contains( T obj )\n {\n if(nodes.containsKey(obj)){\n \treturn true;\n }\n return false;\n }", "@Override\n public boolean equals(Object other) {\n return Arrays.equals(state, ((CannibalNode) other).state);\n }", "public boolean equals(LinearNode<T> node) {\t\r\n\t\t\r\n\t\tboolean result = true; \r\n\r\n\t\tif (this.getElement() == node.getElement())\r\n\t\t\tresult = true;\r\n\t\telse\r\n\t\t\tresult = false;\r\n\t\t\r\n\t\treturn result;\r\n\t\r\n\t}", "public boolean isSameAs(Move comp){ \n return this.xFrom==comp.xFrom &&\n this.xTo==comp.xTo &&\n this.yFrom==comp.yFrom &&\n this.yTo==comp.yTo;\n }", "@Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (o == null || getClass() != o.getClass()) return false;\n\n Node node = (Node) o;\n\n if (position != node.position) return false;\n if (!method.equals(node.method)) return false;\n return clazz.equals(node.clazz);\n }", "private boolean checkAction() {\n if (nodes == null || nodes.length > 1) {\r\n return false;\r\n }\r\n // No parent\r\n if (nodes == null || nodes.length != 1) {\r\n JOptionPane.showMessageDialog(JZVNode.this, bundle\r\n .getString(\"dlg.error.updateWithoutParent\"),\r\n bundle.getString(\"dlg.error.title\"),\r\n JOptionPane.ERROR_MESSAGE);\r\n return false;\r\n }\r\n return true;\r\n }", "public boolean doesGoToReferenceExist(String id)\n {\n IDNode node = (IDNode)idReferences.get(id); \n return node.isThereInternalLinkGoTo();\n }", "public boolean differ(Object a, Object b) {\n Node set1 = find(getNode(a));\n Node set2 = find(getNode(b));\n\n return set1 != set2;\n }", "boolean hasIsCentralNode();", "public boolean aNodeIsHovered() {\n\t\t\treturn(isNodeHovered(getHoveredNode()));\n\t\t}", "boolean canConnect(IAgriIrrigationNode other, Direction from);", "public boolean isSame(MoveEdge other) {\n if (other == this) {\n return true;\n }\n return Objects.equals(in, other.in) && Objects.equals(out, other.out);\n }", "public boolean isGoalNode(Node node) {\n return mGoal.getX() == node.getPosition().getX() && mGoal.getY() == node.getPosition().getY();\n }", "@Override\n\tpublic boolean equals(Object o) {\n\t\treturn o instanceof PointEventNode\n\t\t\t\t&& ((PointEventNode) o).id == this.id;\n\t}" ]
[ "0.69853413", "0.6495545", "0.6495545", "0.6329205", "0.61989397", "0.61306167", "0.61061394", "0.60408926", "0.59867734", "0.59832925", "0.59787315", "0.59605676", "0.5959555", "0.5948588", "0.5948588", "0.5903176", "0.58724374", "0.58656645", "0.5844664", "0.5840904", "0.5825907", "0.5824351", "0.5819308", "0.58082324", "0.58077526", "0.5803578", "0.5792686", "0.5788867", "0.57798505", "0.57798505", "0.577676", "0.5755495", "0.5755495", "0.5706021", "0.5702184", "0.5607477", "0.55939245", "0.5584501", "0.55655825", "0.55613893", "0.55537504", "0.5519476", "0.55003023", "0.55001175", "0.54952466", "0.54912364", "0.54821116", "0.5474543", "0.5473846", "0.54693896", "0.5468188", "0.5456526", "0.545398", "0.5446806", "0.54433095", "0.54369205", "0.5429423", "0.5425422", "0.54250914", "0.5422096", "0.54174507", "0.5409071", "0.54051316", "0.5402792", "0.5398538", "0.53942615", "0.5381744", "0.5361058", "0.5357508", "0.53536624", "0.5353043", "0.5346417", "0.5344812", "0.53386945", "0.53347474", "0.5332733", "0.53264856", "0.53206366", "0.531389", "0.53003323", "0.52954084", "0.52916765", "0.5287239", "0.5283439", "0.52790445", "0.5277045", "0.52749896", "0.52730244", "0.5267099", "0.5266205", "0.5261563", "0.5256658", "0.5256293", "0.52526945", "0.5251376", "0.52473384", "0.5247065", "0.5239487", "0.5233928", "0.52307886", "0.52307796" ]
0.0
-1
Mutator method returns the data portion of the node.
public T getData() { return this.data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String data() {\n return this.data;\n }", "@Override\r\n\tpublic E getData() {\n\t\treturn data;\r\n\t}", "public Object data() {\n return this.data;\n }", "T getData() {\n\t\treturn data;\n\t}", "public Object getData()\r\n\t\t{\r\n\t\t\treturn data;\r\n\t\t}", "public T getData()\n\t{\n\t\treturn this.data;\n\t}", "public Object getData(){\n\t\treturn this.data;\n\t}", "public T getData() {\n return this.data;\n }", "public Object getData() {\r\n\t\t\treturn data;\r\n\t\t}", "public Object getData() {\n\t\treturn data;\n\t}", "public E getData() { return data; }", "public String getData() {\r\n return this.data;\r\n }", "public E getData() {\r\n\t\treturn data;\r\n\t}", "public final ByteBlock getData() { return data; }", "public T getData() {\r\n return data;\r\n }", "public Object getData() {\n\t\t\treturn null;// this.element;\n\t\t}", "public String getData()\n {\n return data;\n }", "public E getData(){\n\t\t\treturn data;\n\t\t}", "public String getData() {\n\t\treturn this.data;\n\t}", "public K data()\n {\n\treturn this.data;\n }", "public String getData() {\r\n\t\treturn data;\r\n\t}", "public T getData() {\n return mData;\n }", "public String getData() {\n\t\treturn data;\n\t}", "public String getData() {\n\t\treturn data;\n\t}", "public String getData() {\n\t\treturn data;\n\t}", "public String getData() {\n\t\treturn data;\n\t}", "public DataItem getData() {\n return data;\n }", "public String getData() {\n\treturn data;\n }", "public Data getData() {\n return data;\n }", "public Data getData() {\n return data;\n }", "public String getData() {\n return data;\n }", "public String getData() {\n return data;\n }", "public String getData() {\n return data;\n }", "public String getData() {\n return data;\n }", "@Override\r\n\t\tpublic Meta_data getData() {\n\t\t\treturn this.data;\r\n\t\t}", "public String getData() {\r\n return Data;\r\n }", "public String getData() {\r\n return Data;\r\n }", "public int getNode() {\r\n\t\t\treturn data;\r\n\t\t}", "public synchronized Object getData() {\n return data;\n }", "public E getData() {\n return data;\n }", "Object getData() { /* package access */\n\t\treturn data;\n\t}", "public String getData() {\r\n\t\t\treturn data;\r\n\t\t}", "public E getData()\n {\n return data;\n }", "public E getData()\n {\n return data;\n }", "public String getData()\n\t{\n\t\treturn data;\n\t}", "public A getData()\n\t{\n\t\treturn data;\n\t}", "public synchronized Vector getData() {\n Vector v = null;\n if (TreeData != null) {\n v = (Vector)TreeData.clone();\n }\n return v;\n }", "public byte[] getData() {\n return ByteExtensions.clone(this.data);\n }", "public java.lang.String getData() {\r\n return data;\r\n }", "public T value()\r\n {\r\n return data;\r\n }", "public T getData(){\n return this.data;\n }", "public static DataNode getDataNode() {\n return datanodeObject;\n }", "@java.lang.Override\n public godot.wire.Wire.Value getData() {\n return data_ == null ? godot.wire.Wire.Value.getDefaultInstance() : data_;\n }", "public byte[] getData() {\n return this.data;\n }", "public Object getData() \n {\n return data;\n }", "public PData getData() {\n\t\treturn data;\n\t}", "@Override\r\n\tpublic Vector<Vector<String>> getData() {\n\t\treturn this.data;\r\n\t}", "public byte[] getData() {\n return data;\n }", "public byte getData() {\n return data;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }", "public D getData(){\n\t\treturn data;\n\t}", "public D getData() {\n return data;\n }", "public D getData() {\n return data;\n }", "public long getData() {\n return data;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }", "public E getData() {\r\n\t\t//System.out.println(headNode.link.data);\r\n\t\tif(headNode.link.data != null) {\r\n\t\t\treturn headNode.link.data;\r\n\r\n\t\t}\r\n\t\telse\r\n\t\t\treturn null;\r\n\t}", "@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }", "public byte getData() {\n return this.data;\n }", "public ContentSpan getData(){\n return this.data;\n }", "public T getData() {\r\n\t\t\treturn t;\r\n\t\t}", "public byte[] getDataBlock() {\n return serialize;\n }", "public Item getData()\r\n\t{\r\n\t\treturn theItem;\r\n\t}", "public Descriptor getData() {\n return this;\n }", "public Object getData();", "public DerivedWord getData() {\n \treturn this.data;\n }", "@Override\n public Object getData() {\n return blockValues.toString();\n }", "T getData() {\n return this.data;\n }", "byte[] getData() {\n return data;\n }", "public @Override E get(int index) {\n \treturn getNode(index).data;\n }", "@Override\n public Object getData() {\n return outputData;\n }", "public IData getData() {\n return data;\n }", "public Object getElement()\n {return data;}", "public String getData() {\n\t\treturn getAttribute(DATA_TAG);\n\t}", "public GenericItemType getData() {\n return this.data;\n }", "public static StringBuilder getData() {\n return data;\n }", "public abstract Object getData();", "java.lang.String getData();", "public ByteArrayList getData() {\n return DataBuffer.this.getData();\n }", "Object getData();" ]
[ "0.70218873", "0.70195645", "0.69345623", "0.6933073", "0.69302875", "0.6924975", "0.69109553", "0.69026285", "0.68898267", "0.6888819", "0.6864459", "0.6849068", "0.6848131", "0.68228847", "0.6806641", "0.67949593", "0.6793197", "0.67927605", "0.67805207", "0.67602265", "0.67454535", "0.67310065", "0.6727144", "0.6727144", "0.6727144", "0.6727144", "0.67169636", "0.6716305", "0.6714611", "0.6714611", "0.67144614", "0.67144614", "0.67144614", "0.67144614", "0.67144376", "0.6714383", "0.6714383", "0.67125434", "0.6712459", "0.67078406", "0.6707674", "0.67056733", "0.66844153", "0.66844153", "0.66709876", "0.6670062", "0.66682637", "0.6666157", "0.6660004", "0.6617016", "0.659704", "0.6594234", "0.65892637", "0.6573638", "0.6568078", "0.65415806", "0.6539204", "0.6515953", "0.6505187", "0.65043294", "0.65043294", "0.65043294", "0.65043294", "0.6486158", "0.64691526", "0.64691526", "0.6468894", "0.64649045", "0.64649045", "0.64649045", "0.64622045", "0.64622045", "0.64622045", "0.64622045", "0.64588773", "0.6456381", "0.6456357", "0.6456357", "0.64522606", "0.64478743", "0.6439531", "0.64349043", "0.6429014", "0.6417722", "0.6412451", "0.6402398", "0.6369702", "0.6367989", "0.63343227", "0.63325167", "0.6329437", "0.6307744", "0.63045454", "0.629752", "0.6281121", "0.6279718", "0.6272575", "0.6264235", "0.6258973", "0.62529427" ]
0.69612956
2
Mutator method sets the next node.
public void setNext(Node<T> another) { this.next = another; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setNext(Node n) { next = n; }", "public void setNextNode(Node<T> next) {\n itsNext = next;\n }", "public void setNext(Node<E> next) { this.next = next; }", "public void setNext(Node<T> next) {\n this.next = next;\n }", "public void setNext(Node<T> next) {\r\n this.next = next;\r\n }", "public void setNext(Node next){\n\t\tthis.next = next;\n\t}", "public void setNext(Node<T> next) {\n\t\tthis.next = next;\n\t}", "public Node setNextNode(Node node);", "public void setNext(Node next) {\n this.next = next;\n }", "public void setNext(Node next)\r\n\t{\r\n\t\tthis.next = next;\r\n\t}", "public void setNext(Node next) {\n\t\tthis.next = next;\n\t}", "public void setNext(Node next)\n\t{\n\t\tthis.next = next;\n\t}", "public void setNextNode(Node<T> nextNode) {\n\t\tthis.nextNode = nextNode;\n\t}", "public void setNextNode(Node nextNode) {\n this.nextNode = nextNode;\n }", "public void setNext(DNode newNext) { next = newNext; }", "public void setNext(Node n) {\n next = n;\n }", "public void setNext(SimpleNode next) {\n this.next = next;\n }", "public void setNext(LinearNode<T> node) {\r\n\t\t\r\n\t\tnext = node;\r\n\t\t\r\n\t}", "public void setNext(MyNode<? super E> _next)\n\t{\n\t\tthis.next = _next;\n\t\t//this.next = _next;\n\t}", "public void setNext(LLNode<T> next) {\n this.next = next;\n }", "public void setNext(Node<D> n){\n\t\tnext = n;\n\t}", "private void setNext(Node n) {\n\t\t\tnext = n;\n\t\t}", "public void setNext(Node newNode){\n\t\t\tnext = newNode;\n\t\t}", "public void setNext(GameNode next) {\n this.next = next;\n }", "public void setNextNode(Node newnext)\n {\n next = newnext;\n }", "public void setNext(ListNode<E> next)\n {\n nextNode = next;\n }", "public void setNext(Node n)\r\n\t{\r\n\t\tnext = n;\r\n\t}", "public void setNext(ListNode<Item> next) {\n this.next = next;\n }", "void setNext(HashNode newNext){\n\t\tnext = newNext; \n\t}", "public void setNext(ListNode next)\r\n {\r\n this.next = next;\r\n }", "void setNext(Cell next) {\n if (this.next == null) {\n this.next = next;\n }\n }", "public void setNext(DoubleNode<T> node)\n {\n\n next = node;\n }", "public void setNext(ListElement<T> next)\n\t{\n\t\tthis.next = next;\n\t}", "public void setNext(Vertex next) {\n\t\tthis.next = next;\n\t}", "public void setNext(CommitNode x){\r\n\t\tnext = x;\r\n\t}", "public void setNext(final LinkedNode<T> theNode) {\n\t myNextNode = theNode;\n }", "public void setNext(DoublyLinkedNode<E> next) {\n this.nextNode = next;\n }", "@Override public void setNextNode(BTreeNode nextNode) {\n // no required in case of non leaf node\n }", "void setNext (ListNode newNext) { /* package access */ \n\t\tnext = newNext;\n\t}", "public void setNext(Variable next){\n\t\tthis.next = next;\n\t}", "public void setNext(Node n)\n {\n n.prev = this.next.prev;\n n.next = this.next;\n this.next.prev = n;\n this.next = n;\n }", "public void setNext(SortedLinkedListNode pNode) {\n next = pNode;\n }", "public void setNext(ListElement next)\n\n\t {\n\t this.next = next;\n\t }", "public void setNext()\n {\n\t int currentIndex = AL.indexOf(currentObject);\n\t currentObject = AL.get(currentIndex +1);\n\t \n\t// never let currentNode be null, wrap to head\n\tif (currentObject == null)\n\t\tcurrentObject = firstObject;\n }", "public void setNextNode(ElectionNode nextNode) {\r\n this.nextNode = nextNode;\r\n }", "public boolean setNext (\n\t\t\tfinal ListNode<V> next)\n\t\t{\n\t\t\t_next = next;\n\t\t\treturn true;\n\t\t}", "public void setNext(Cell link)\n { next = link; }", "public void setNext(Tile next){\n\t\tthis.next=next;\n\t}", "public void setNext(ObjectListNode p) {\n next = p;\n }", "public void setNext(Level next) {\n\t\tthis.next = next;\n\t}", "public void setNext(SlideNode node) {\n\t\tthis.next = node;\n\t}", "public void setNext(Version next){\n\t\tif (next == null){\n\t\t\tLog.e(NAME, \"Invalid parameters for 'setNext' method!\");\n\t\t\treturn;\n\t\t}\n\t\tthis.next = next;\n\t}", "public void setNextCell(Cell next)\r\n {\r\n this.next = next;\r\n }", "public void setNext(ListEntry next) {\n if (next != null)\n this.next = next;\n else\n this.next = null;\n }", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t\tprivate void setNext(k key, v value) {\n\t\t\tnext = new Node (key, value, null);\n\t\t}", "public void setNextElement(Element<T> nextElement) \n\t{\n\t\tthis.nextElement = nextElement;\n\t}", "void setNext(MapElement next) {\n this.next = next;\n }", "public void setNext(Node node)\n\t{\n\t\tnodeLinks.setNext(node);\n\t}", "public void setNext(Linkable nextObject);", "public void setNext(DListNode2 next1){\r\n this.next = next1;\r\n }", "public void setNode(SubscriptionYear next) {\n\t\tthis.next = next;\n\t}", "public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }" ]
[ "0.84968567", "0.8418384", "0.841007", "0.8393143", "0.83913404", "0.834861", "0.83238184", "0.83134514", "0.8311646", "0.8237957", "0.82330525", "0.82009786", "0.8158873", "0.8157342", "0.815634", "0.80638564", "0.80190206", "0.7997854", "0.7970803", "0.7967081", "0.79623365", "0.79585326", "0.7951502", "0.79238683", "0.7913793", "0.79022264", "0.7866112", "0.7723263", "0.7719667", "0.7703563", "0.76371133", "0.7614828", "0.7598327", "0.75739896", "0.75721073", "0.7562202", "0.7539603", "0.7530779", "0.75198746", "0.7490552", "0.74702054", "0.744114", "0.74377847", "0.7392443", "0.7383903", "0.73478085", "0.7346075", "0.73380023", "0.73312587", "0.7302778", "0.72984785", "0.72357595", "0.72232974", "0.7178956", "0.71341556", "0.7120898", "0.71189576", "0.71056676", "0.7095462", "0.70248055", "0.6994484", "0.6898092", "0.6898092", "0.6898092", "0.6898092", "0.6898092", "0.6898092", "0.6898092", "0.6898092", "0.6898092", "0.6898092", "0.6898092", "0.6898092", "0.6898092", "0.6898092", "0.6898092", "0.6898092", "0.6898092", "0.6898092", "0.6898092", "0.6898092", "0.6898092", "0.6898092", "0.6898092", "0.6898092", "0.6898092", "0.689654", "0.689654", "0.689654", "0.689654", "0.689654", "0.689654", "0.689654", "0.689654", "0.689654", "0.689654", "0.689654", "0.689654", "0.689654", "0.689654" ]
0.779985
27
Mutator method get the next node.
public Node<T> getNext() { return this.next; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Node getNext() { return next; }", "public Node getNext(){\n\t\t\treturn next;\n\t\t}", "public Node getNext(){\n\t\treturn next;\n\t}", "public node getNext() {\n\t\t\treturn next;\n\t\t}", "public LLNode<T> getNext() {\n return next;\n }", "public DNode getNext() { return next; }", "Node<T> getNext() {\n\t\t\treturn nextNode;\n\t\t}", "public Node getNext() {\n return next;\n }", "public Node getNext() {\n return next;\n }", "public Nodo getnext ()\n\t\t{\n\t\t\treturn next;\n\t\t\t\n\t\t}", "public Node getNext() {\n\t\treturn next;\n\t}", "public Node getNext() {\r\n\t\treturn next;\r\n\t}", "public Node<E> getNext() { return next; }", "public Node<S> getNext() { return next; }", "public Node getNext()\r\n\t{\r\n\t\treturn next;\r\n\t}", "public Node getNext()\r\n\t{\r\n\t\treturn next;\r\n\t}", "public Node<T> getNext() {\n\t\treturn next;\n\t}", "public SimpleNode getNext() {\n return next;\n }", "public LinearNode<T> getNext() {\r\n\t\t\r\n\t\treturn next;\r\n\t\r\n\t}", "public Node<T> next() {\r\n return next;\r\n }", "public Node getNext()\n\t{\n\t\treturn next;\n\t}", "public Node getNext()\n\t{\n\t\treturn next;\n\t}", "public Node getNext()\n {\n return this.next;\n }", "public Node<D> getNext(){\n\t\treturn next;\n\t}", "public Node<T> getNext() {\n return this.next;\n }", "public Node getNext() {\n\t\treturn this.next;\n\t}", "public Node<E> getNext() {\r\n\t\treturn next;\r\n\t}", "public Node getNextNode() {\n return nextNode;\n }", "protected final Node<N> getNext() {\n return this.next;\n }", "public Node getNext() {\t\t//O(1)\n\t\treturn next;\n\t}", "public MyNode<? super E> getNext()\n\t{\n\t\treturn this.next;\n\t}", "public ListNode getNext()\r\n {\r\n return next;\r\n }", "public SlideNode getNext() {\n\t\treturn next;\n\t}", "public LinkedNode<T> getNext() {\n\t return myNextNode;\n }", "public ListNode<E> getNext()\n {\n return nextNode;\n }", "@Override\n\t\tpublic Node next() {\n\t\t\tif (this.next == null) {\n\t\t\t\treturn null;\n\t\t\t} else {\n\t\t\t\tNode element = this.next;\n\t\t\t\tthis.next = (Node) this.next.getNextNode();\n\t\t\t\treturn (Node) element;\n\t\t\t}\n\t\t}", "public Node<T> getNextNode() {\n\t\treturn nextNode;\n\t}", "public ListNode<Item> getNext() {\n return this.next;\n }", "public E next(){\r\n E data = node.getData();\r\n node = node.getNext();\r\n return data;\r\n }", "public GameNode getNext() {\n return this.next;\n }", "public ElectionNode getNextNode() {\r\n return nextNode;\r\n }", "@Override\r\n\t\tpublic T next() {\r\n\t\t\tNode<T> temp = currentNode;\r\n\t\t\tcurrentNode = currentNode.nextNode;\r\n\t\t\treturn temp.content;\r\n\t\t}", "public DoubleNode<T> getNext()\n {\n\n return next;\n }", "public ListNode<V> next()\n\t\t{\n\t\t\treturn _next;\n\t\t}", "public Node<E> nextNode() {\n\t\treturn next_node;\n\t}", "public ListNode<T> getNext();", "public ShapeNode getNext()\n {\n return next;\n }", "public DoublyLinkedNode<E> getNext() {\n return nextNode;\n }", "public CommitNode getNext(){\r\n\t\treturn next;\r\n\t}", "public SortedLinkedListNode getNext() {\n return next;\n }", "public ListElement<T> getNext()\n\t{\n\t\treturn next;\n\t}", "@Override\n public Node next() {\n if (next == null) {\n throw new NoSuchElementException();\n }\n Node current = next;\n next = next.getNextSibling();\n return current;\n }", "public HL7DataTree next() {\n final int size = Util.size(this.list), i = this.next == null ? size : this.list.indexOf(this.next) + 1;\n final HL7DataTree curr = this.next;\n \n this.next = i == size ? more() : this.list.get(i);\n \n return curr;\n }", "public ListElement getNext()\n\t {\n\t return this.next;\n\t }", "ListNode getNext() { /* package access */ \n\t\treturn next;\n\t}", "public T next() {\n T temp = this.curr.next.getData();\n this.curr = this.curr.next;\n return temp;\n }", "public final Node<N> next() {\n final Node<N> sink = this.next;\n this.prepareNext();\n return sink;\n }", "public T next() {\n T temp = this.curr.getData();\n this.curr = this.curr.getNext();\n return temp;\n }", "public T next()\n {\n T data = current.item;\n current = current.next;\n return data;\n }", "@Override\n\t\tpublic Item next() {\n\t\t\tItem item=current.item;\n\t\t\tcurrent=current.next;\n\t\t\treturn item;\n\t\t}", "public T next()\n\t\t{\n\t\t\tif(hasNext())\n\t\t\t{\n\t\t\t\tT currentData = current.getData(); //the data that will be returned\n\t\t\t\t\n\t\t\t\t// must continue to keep track of the Node that is in front of\n\t\t\t\t// the current Node whose data is must being returned , in case\n\t\t\t\t// its nextNode must be reset to skip the Node whose data is\n\t\t\t\t// just being returned\n\t\t\t\tbeforePrevious = previous;\n\t\t\t\t\n\t\t\t\t// must continue keep track of the Node that is referencing the\n\t\t\t\t// data that was just returned in case the user wishes to remove()\n\t\t\t\t// the data that was just returned\n\t\t\t\t\n\t\t\t\tprevious = current; // get ready to point to the Node with the next data value\n\t\t\t\t\n\t\t\t\tcurrent = current.getNext(); // move to next Node in the chain, get ready to point to the next data item in the list\n\t\t\t\t\n\t\t\t\tthis.removeCalled = false;\n\t\t\t\t// it's now pointing to next value in the list which is not the one that may have been removed\n\t\t\t\t\n\t\t\t\treturn currentData;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\t}\n\t\t}", "public Node setNextNode(Node node);", "@Override\n public T next() {\n current = current.next;\n return current.data;\n }", "public ObjectListNode getNext() {\n return next;\n }", "@Override \r\n\tpublic LLNode<T> next() throws NoSuchElementException{\r\n\t\tLLNode<T> node = nodeptr;\r\n\t\tif (nodeptr == null)\r\n\t\t\tthrow new NoSuchElementException();\r\n\t\tnodeptr = nodeptr.getNext();\r\n\t\treturn node;\r\n\t}", "public Variable getNext(){\n\t\treturn this.next;\n\t}", "public Vertex getNext() {\n\t\treturn next;\n\t}", "public T next()\r\n { \r\n if (next == null)\r\n throw new NoSuchElementException(\"Attempt to\" +\r\n \" call next when there's no next element.\");\r\n\r\n prev = next;\r\n next = next.next;\r\n return prev.data;\r\n }", "@Override\r\n\tpublic String next() {\n\t\tString nx;\r\n\r\n\t\tnx = p.getNext();\r\n\r\n\t\tif (nx != null) {\r\n\t\t\tthisNext = true;\r\n\t\t\tinput(nx);\r\n\t\t}\r\n\t\treturn nx;\r\n\t}", "public E next() {\r\n\r\n\t\tE result = null;\r\n\t\tif (hasNext()) {\r\n\t\t\tresult = links.get(counter);\r\n\t\t\tcounter++;\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public Cell getNext()\n { return next; }", "@Override\n public NodoL next() {\n posicionActual = posicionActual.getSiguiente();\n return posicionActual;\n }", "public E next()\r\n {\r\n E valueToReturn;\r\n\r\n if (!hasNext())\r\n throw new NoSuchElementException(\"The lister is empty\");\r\n \r\n // get the string from the node\r\n valueToReturn = cursor.getData();\r\n \r\n // advance the cursor to the next node\r\n cursor = cursor.getLink();\r\n \r\n return valueToReturn;\r\n }", "private Object getNextElement()\n {\n return __m_NextElement;\n }", "public DListNode2 next(){\r\n return this.next;\r\n }", "@Override\n public Integer next() {\n if (next != null) {\n Integer next = this.next;\n this.next = null;\n return next;\n\n }\n\n return iterator.next();\n }", "public T next(){\r\n\t\t\tif (expectedModCount != modCount){\r\n\t\t\t\tthrow new ConcurrentModificationException();\r\n\t\t\t}\r\n\t\t\tT passed = current;\r\n\t\t\tif ((currentNode.next==endMarker)&&(currentNode.getLast()==current)){\r\n\t\t\t\tcurrentNode = endMarker;\r\n\t\t\t\tcurrent = null;\r\n\t\t\t\treturn passed;\r\n\t\t\t}\r\n\t\t\tif (currentNode.indexOf(current)==currentNode.getArraySize()-1){\r\n\t\t\t\tcurrentNode = currentNode.next;\r\n\t\t\t\tcurrent = currentNode.getFirst();\r\n\t\t\t\tidx = 0;\r\n\t\t\t\treturn passed;\r\n\t\t\t}\t\r\n\t\t\tidx++;\r\n\t\t\tcurrent = currentNode.get(idx);\r\n\t\t\treturn passed;\r\n\t\t}", "public Object next()\n {\n if(!hasNext())\n {\n throw new NoSuchElementException();\n //return null;\n }\n previous= position; //Remember for remove;\n isAfterNext = true; \n if(position == null) \n {\n position = first;// true == I have not called next \n }\n else\n {\n position = position.next;\n }\n return position.data;\n }", "public Wagon<T> getNext() {\n\t\treturn next;\n\t}", "public Level getNext() {\n\t\treturn next;\n\t}", "public IDLink<T> getNext(){\n \treturn npointer;\n }", "public E next() {\n\t\t\tif (mIterModCount != modCount) {\n\t\t\t\tSystem.out.println( mIterModCount + \" : \" + modCount);\n\t\t\t\tthrow new ConcurrentModificationException();\n\t\t\t}\n\t\t\tif (!hasNext())\n\t\t\t\tthrow new java.util.NoSuchElementException();\n\t\t\tmLastNodeReturned = mCurrentNode;\n\t\t\tmCurrentNode = mCurrentNode.next;\n\t\t\tmCurrentIndex++;\n\t\t\tmLastIteration = NEXT;\n\t\t\treturn mLastNodeReturned.data;\n\t\t}", "public Item next() throws XPathException {\n while (true) {\n NodeInfo next = (NodeInfo)iterator.next();\n if (next == null) {\n current = null;\n position = -1;\n return null;\n }\n if (current != null && next.isSameNodeInfo(current)) {\n continue;\n } else {\n position++;\n current = next;\n return current;\n }\n }\n }", "public com.Node<T> getNextRef() {\n\t\treturn null;\n\t}", "@Override\r\n public T next() {\r\n if (hasNext()) {\r\n node = node.next();\r\n nextCalled = true;\r\n return node.getData();\r\n }\r\n else {\r\n throw new NoSuchElementException(\"Illegal call to next(); \"\r\n + \"iterator is after end of list.\");\r\n }\r\n }", "public E next() \n {\n \tfor(int i = 0; i < size; i++)\n \t\tif(tree[i].order == next) {\n \t\t\tnext++;\n \t\t\ttree[i].position = i;\n \t\t\treturn tree[i].element;\n \t\t}\n \treturn null;\n }", "public void setNext(Node<E> next) { this.next = next; }", "public T next() {\n return cur.next();\n }", "public NodeT getNext() {\n String nextItemKey = queue.poll();\n if (nextItemKey == null) {\n return null;\n }\n return nodeTable.get(nextItemKey);\n }", "public void setNext(Node n) { next = n; }", "@Override\n public Object next() {\n Object retval = this.nextObject;\n advance();\n return retval;\n }", "@Override\n\t\tpublic int next() {\n\t\t\treturn current++;\n\t\t}", "public E next() {\r\n current++;\r\n return elem[current];\r\n }", "public BSCObject next()\n {\n if (ready_for_fetch)\n {\n // the next sibling is waiting to be returned, so just return it\n ready_for_fetch = false;\n return sibling;\n }\n else if (hasNext())\n {\n // make sure there is a next sibling; if so, return it\n ready_for_fetch = false;\n return sibling;\n }\n else\n throw new NoSuchElementException();\n }", "public E getNext() {\n\t\tif (!super.isEmpty()) {\n\t\t\tif (index >= this.size() - 1)\n\t\t\t\tindex = -1;\n\t\t\treturn this.get(++index);\n\t\t}\n\t\treturn null;\n\t}", "@Override\r\n\t\tpublic Key next() {\n\t\t\tKey i=current.item;\r\n\t\t\tcurrent=current.next;\r\n\t\t\treturn i;\r\n\t\t}", "public Tile getNext(){\n\t\treturn this.next;\n\t}", "@Override\r\n\t\tpublic E next() {\n\t\t\tcaret = caret.next();\r\n\t\t\tif (caret == null)\r\n\t\t\t\tthrow new NoSuchElementException();\r\n\t\t\tnextIndex++;\r\n\t\t\treturn caret.n.data[caret.idx];\r\n\t\t}", "public int next() {\n TreeNode iter = dq.pop();\n int val = iter.val;\n if(iter.right!=null)\n process(iter.right);\n return val;\n }", "@Override\n public E next() {\n if (this.hasNext()) {\n curr = curr.nextNode;\n return curr.getData();\n }\n else {\n throw new NoSuchElementException();\n }\n }" ]
[ "0.81066656", "0.8073717", "0.8037022", "0.8034359", "0.8033073", "0.8022699", "0.79955006", "0.7979924", "0.7962218", "0.7925701", "0.7923559", "0.7923234", "0.7920443", "0.7904178", "0.7902915", "0.7902915", "0.79006577", "0.789948", "0.787997", "0.7871084", "0.78658926", "0.78658926", "0.7864549", "0.7846439", "0.7817352", "0.78171724", "0.7810172", "0.77785957", "0.7748149", "0.77421063", "0.77215034", "0.77168703", "0.7711563", "0.77003926", "0.7683858", "0.76748717", "0.7661791", "0.7660875", "0.763451", "0.7528392", "0.7487303", "0.7479111", "0.74690104", "0.7446057", "0.743434", "0.74319476", "0.74156106", "0.7394675", "0.73889714", "0.7374304", "0.73583907", "0.7357588", "0.7333232", "0.7328498", "0.7306925", "0.72970986", "0.72963935", "0.7294209", "0.7293928", "0.7256872", "0.7254813", "0.7247081", "0.7244122", "0.72398037", "0.7209969", "0.71844727", "0.7168327", "0.7133203", "0.7120077", "0.7103301", "0.70930094", "0.70514476", "0.7026141", "0.69818544", "0.69781035", "0.69701844", "0.6934142", "0.6929853", "0.69216424", "0.69212675", "0.69074726", "0.6884227", "0.6882763", "0.6865545", "0.68273103", "0.68209916", "0.6817728", "0.68129563", "0.6804195", "0.6799204", "0.6797833", "0.6794184", "0.67922115", "0.67888117", "0.67690885", "0.67671263", "0.6762256", "0.6761985", "0.67589444", "0.6755739" ]
0.7782577
27
String representation of the node as follows: data
public String toString() { String result = ""; result += this.data; return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String toString(){\n return \"Node: \" + data;\n }", "public String toString() {\n return \"\" + data;\n }", "public String printNodeData(Node<T> node){\n return String.valueOf(node.data);\n }", "@Override\n public String toString() {\n return \" \" + this.data;\n }", "public String toString() {\n\t\treturn data.toString();\n\t}", "public String toString() {\n\t\treturn data.toString();\n\t}", "@Override\r\n\tpublic String toString() {\n\t\treturn data;\r\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn data.toString();\n\t}", "public String toString() {\n\t\treturn data.toString();\n }", "public String toString() {\n\treturn createString(data);\n }", "public String toString()\r\n\t{\r\n\t\treturn data.toString();\r\n\t}", "@Override\n public String toString() {\n return this.data.toString();\n }", "@Override\n public String toString() {\n return \"Node [id=\" + id + \", data=\" + data + \", red=\" + red + \"]\";\n }", "public String toString()\n {\n\t return \"[\" + data + \"]\";\n }", "public String toString() {\r\n\treturn data;\r\n }", "@Override\n public String toString() {\n return InternalNodeSerializer.toString(this);\n }", "public String toString() {\r\n\t\tString cad = \"\";\r\n\t\tfor (int i = 0; i < nodes_.size(); i++) {\r\n\t\t\tcad += nodes_.get(i).getVal() + \" - \";\r\n\t\t}\r\n\t\treturn cad;\r\n\t}", "@Override\n public String toString() {\n return (this.originalValue == null ? this.getValue() : this.originalValue) + (this.nodeType.getName() == null\n ? \"\" : (\":\" + this.nodeType.getName()));\n }", "public String toString() {\n if (this.data.isEmpty()) {\n return super.toString();\n }\n return BytesUtil.bytes2HexString(toBinary());\n }", "@Override\r\n public String toString(){ // toString methodu\r\n return head.data.toString();\r\n }", "public String toString()\n\t{\n\t\tNode current = head.getNext();\n\t\tString output = \"\";\n\t\t\n\t\twhile(current != null){\n\t\t\toutput += \"[\" + current.getData().toString() + \"]\\n\";\n\t\t\tcurrent = current.getNext();\n\t\t}\n\t\t\n\t\treturn output;\n\t}", "public String toString(){\n\t\treturn \"<== at \" + time + \": \" + name + \", \" + type + \", \" + data + \"==>\"; \n\t}", "public String toString()\n {\n\tif (data() == null) {\n\t return \"null\";\n\t} else {\n\t return data().toString();\n\t}\n }", "@Override\n public String toString() {\n String ret = \"\";\n Node curr = head;\n while (curr != null) {\n ret += curr.data + \" \";\n curr = curr.next;\n }\n return ret;\n }", "@Override\r\n\tpublic String toString() {\n\t\treturn (this.id + \"\\t\" + this.name + \"\\t\" + this.nodeType);\r\n\t}", "public String toString() {\r\n\t\tNode<E> current = head;\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\twhile (current != null) {\r\n\t\t\tsb.append(\",\" + current.data);\r\n\t\t\tcurrent = current.next;\r\n\t\t}\r\n\t\treturn sb.toString();\r\n\t}", "public String nodeAndElementsAsText() {\n\t\treturn \"\";\n\t}", "@Override\n public String toString() {\n StringBuilder builder = new StringBuilder();\n builder.append(\"ID:\" + this.id + \"; Data:\\n\");\n\n for (int i = 1; i <= this.data.length; i++) {\n T t = data[i - 1];\n builder.append(t.toString() + \" \");\n if (i % 28 == 0) {\n builder.append(\"\\n\");\n }\n }\n return builder.toString();\n }", "public String toString() {\n\n\t\tfinal StringBuilder buffer = new StringBuilder();\n\n\t\tbuffer.append(\"tAttrDataTypeId=[\").append(tAttrDataTypeId).append(\"] \");\n\t\tbuffer.append(\"dataTypeName=[\").append(dataTypeName).append(\"] \");\n\t\tbuffer.append(\"dataTypeDesc=[\").append(dataTypeDesc).append(\"] \");\n\t\tbuffer.append(\"activeFlag=[\").append(activeFlag).append(\"] \");\n\n\t\treturn buffer.toString();\n\t}", "public String toString() {\n\t\tString output = \"[\";\n\t\t\n\t\tfor (T nodeValue: this) {\n\t\t\tif (output.length() > 1)\t// doesn't add a \", \" at the beginning\n\t\t\t\toutput += \", \";\n\t\t\t\n\t\t\toutput += nodeValue;\n\t\t}\n\t\t\n\t\treturn output += \"]\";\n\t}", "public String toString() {\n\t\treturn Arrays.toString(data);\n\t}", "public String makeString(){\n\t\tString title = getTitle();\n\t\tString xlabel = getXLabel();\n\t\tString ylabel = getYLabel();\n\t\tString GraphableDataInfoString = (\"<\" + title + \",\" + xlabel + \",\" + ylabel + \">\");\n\t\treturn GraphableDataInfoString;\n\t}", "public String toString() { \n\t\t String str=\"\";\n\t\t for(int i=0; i< size; i++)\n\t\t\t str += data[i]+\" \";\n\t\t return str;\n\t }", "public String data() {\n return this.data;\n }", "@Override\n public final String toString() {\n final StringBuilder nodes = new StringBuilder();\n nodes.append(this.sizeNodes()).append(\" Nodes: {\");\n final StringBuilder edges = new StringBuilder();\n edges.append(this.sizeEdges()).append(\" Edges: {\");\n for (final Node<N> node : this.getNodes()) {\n nodes.append(node.toString()).append(',');\n }\n for (final Edge<N, E> edge : this.getEdges()) {\n edges.append(edge.toString()).append(',');\n }\n final String newLine = System.getProperty(\"line.separator\");\n nodes.append('}').append(newLine).append(edges).append('}').append(newLine);\n return nodes.toString();\n }", "@Override\n public Object string(Object node) {\n return ((Node<E>) node).element.toString();\n }", "public final String toString()\n\t{\n\t\tif (dataValue == null)\n\t\t{\n\t\t\tif ((stream == null) && (_blobValue == null) )\n\t\t\t{\n\t\t\t\treturn \"NULL\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (SanityManager.DEBUG)\n\t\t\t\t\tSanityManager.THROWASSERT(\n\t\t\t\t\t\t\"value is null, stream or blob is not null\");\n\t\t\t\treturn \"\";\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn org.apache.derby.iapi.util.StringUtil.toHexString(dataValue, 0, dataValue.length);\n\t\t}\n\t}", "public String getAsText()\n {\n StringWriter sw = new StringWriter();\n DOMWriter dw = new DOMWriter(sw);\n dw.print((Node)getValue());\n return sw.toString();\n }", "public String toString(){\n String result = \"{\";\n for(LinkedList<E> list : this.data){\n for(E item : list){\n result += item.toString() + \", \";\n }\n }\n result = result.substring(0, result.length() -2);\n return result + \"}\";\n }", "public String toString()\n {\n String s = \"[\";\n\n ListNode temp = first; // start from the first node\n while (temp != null)\n {\n s += temp.getValue(); // append the data\n temp = temp.getNext(); // go to next node\n if (temp != null)\n s += \", \";\n }\n s += \"]\";\n return s;\n }", "public String toString() {\n\treturn \"Key: \" + key.toString() + \"\\tData: \" + data;\n }", "public String toString ()\n {\n String str = \"\";\n Node nodeRef = head;\n for (int i = 0; i < size&& nodeRef!= null; i++) {\n str = str + nodeRef.data + \"\\n\";\n nodeRef = nodeRef.next;}\n return str;\n }", "public String toString() {\n\t\tString str = \"\";\n\t\tNode current = head;\n\t\tstr += \"[ \";\n\t\twhile (current != null) {\n\t\t\tstr += current.value;\n\t\t\tif (current.next != null) {\n\t\t\t\tstr += \", \";\n\t\t\t}\n\n\t\t\tcurrent = current.next;\n\t\t}\n\t\tstr += \" ]\";\n\n\t\treturn str;\n\t}", "@Override\r\n public String toString(){\r\n return Integer.toString(node);\r\n }", "@Override\n public String toString(){\n Node<E> headPtr = headNode;\n StringBuffer buff= new StringBuffer();\n buff.append(\"[\");\n while(headPtr!=null){\n buff.append(headPtr.data);\n headPtr=headPtr.next;\n if(headPtr!=null)\n buff.append(\",\");\n }\n buff.append(\"]\");\n return buff.toString();\n }", "public String toString() {\n//\t\tif (isEmpty()) {\n//\t\t\treturn null;\n//\t\t}\n\t\t//create a string that holds the value of the list\n\t\t//held inside curly braces for my viewing pleasure\n\t\tString s = \"\";\n\t\t//if the list is not empty\n\t\tif (isEmpty()!= true) {\n\t\t\t//create a node and set it to the head\n\t\t\tLinkedListNode<T> curNode = head;\n\t\t\t\t//while the current node isn't null\n\t\t\t\twhile (curNode != null) {\n\t\t\t\t\t//add the data in the node to my string\n\t\t\t\t\ts += curNode.getData();\n\t\t\t\t\t//set current node to be the next node\n\t\t\t\t\tcurNode = curNode.getNext();\n\t\t\t\t}\n\t\t}\n\t\t//return the final string\n\t\treturn s;\n\t}", "@Override\n public String toString(){\n Node curr=this.head;\n String str=\"\";\n while(curr!=null){\n str+=(curr.data + \" -> \");\n curr=curr.next;\n }\n return str;\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n traverseNode(sb, \"\", \"\", root, false);\n return sb.toString();\n }", "public String getDataString() {\r\n return formatoData.format(data);\r\n }", "public void displayNode() {\n\t\t\tSystem.out.println(\"{ \" + data + \" } \");\n\t\t}", "public @Override String toString() {\n String res= \"[\";\n // invariant: res = \"[s0, s1, .., sk\" where sk is the object before node n\n for (Node n = sentinel.succ; n != sentinel; n= n.succ) {\n if (n != sentinel.succ)\n res= res + \", \";\n res= res + n.data;\n }\n return res + \"]\";\n }", "public String toString() {\n\t\tStringBuilder sb = new StringBuilder(\"BNNode \" + name + \":\\n\");\n\t\tif (isEvidence)\n\t\t\tsb.append(\" EVIDENCE\\n\");\n\t\tsb.append(\" value: \" + value + \"\\n\");\n\t\tsb.append(\" parents:\");\n\t\tif (parents.length == 0)\n\t\t\tsb.append(\" (none)\");\n\t\telse\n\t\t\tfor (BNNode parent : parents) \n\t\t\t\tsb.append(\" \" + parent.name);\n\t\tsb.append(\"\\n children:\");\n\t\tif (children.length == 0)\n\t\t\tsb.append(\" (none)\");\n\t\telse\n\t\t\tfor (BNNode child : children) \n\t\t\t\tsb.append(\" \" + child.name);\n\t\tsb.append(\"\\n CPT:\");\n\t\tfor (double cp : cpt)\n\t\t\tsb.append(\" \" + cp);\n\t\treturn sb.toString();\n\t}", "@Override\n public String toString(){\n Node curr=this.head;\n String str=\"\";\n while(curr!=null){\n str+=(curr.data + \" -> \");\n curr=curr.next;\n }\n return str;\n }", "@Override\n\tpublic String toString() {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(\"node:\\n\").append(nodeJo);\n\t\tsb.append(\"\\nedges:\\n\").append(edgesJa);\n\t\treturn sb.toString();\n\t}", "public String toString() {\n\t\t// Anmerkung: StringBuffer wäre die bessere Lösung.\n\t\tString text = \"\";\n\t\tListNode<E> p = head;\n\t\twhile (p != null) {\n\t\t\ttext += p.toString() + \" \";\n\t\t\tp = p.getTail();\n\t\t}\n\t\treturn \"( \" + text + \") \";\n\t}", "@Override\n public String toString() {\n return \"GraphModelNode: \" + getText(); //$NON-NLS-1$\n }", "public String toString() {\n StringBuilder s = new StringBuilder(\"{\");\n\n Node<T> next;\n if (start != null) {\n next = start;\n s.append(next);\n next = next.next;\n while (next != null) {\n s.append(\", \" + next);\n next = next.next;\n }\n }\n s.append(\"}\");\n return s.toString();\n }", "@Override\n public String toString() {\n String result = \"\";\n byte[] data = buffer.data;\n for (int i = 0; i < (buffer.end - buffer.start) / bytes; i++) {\n if (i > 0) result += \", \";\n result += get(i).toString();\n }\n return type + \"[\" + result + \"]\";\n }", "public String toString(){\r\n\t\tString output = \"\";\r\n\t\tfor(String s: this.data){\r\n\t\t\toutput = output + s + \"\\t\";\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}", "public String toString() {\n\t\tStringBuilder temp = new StringBuilder();\n\n\t\tfor (int index = 0; index < verticesNum; index++) {\n\t\t\tif(list[index] == null)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\ttemp.append(\"node:\");\n\t\t\ttemp.append(index);\n\t\t\ttemp.append(\": \");\n\t\t\ttemp.append(list[index].toString());\n\t\t\ttemp.append(\"\\n\");\n\t\t}\n\n\t\treturn temp.toString();\n\t}", "public String toString()\n\t{\n\t\t//string to print out\n\t\tString printOut = \"\";\n\t\t//set the current node to head\n\t\tLinkedListNode<T> currentNode = head;\n\t\t//go through the list\n\t\twhile (currentNode.getNext() != null){\n\t\t\t//add to the string\n\t\t\tprintOut += currentNode.getData().toString() + \" \";\n\t\t\t//set the current node to next node\n\t\t\tcurrentNode = currentNode.getNext(); \n\t\t}\n\t\tprintOut += getLastNode().getData().toString();\n\t\treturn printOut;\n\t}", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getAddedToClusterTime() != null)\n sb.append(\"AddedToClusterTime: \").append(getAddedToClusterTime()).append(\",\");\n if (getBrokerNodeInfo() != null)\n sb.append(\"BrokerNodeInfo: \").append(getBrokerNodeInfo()).append(\",\");\n if (getInstanceType() != null)\n sb.append(\"InstanceType: \").append(getInstanceType()).append(\",\");\n if (getNodeARN() != null)\n sb.append(\"NodeARN: \").append(getNodeARN()).append(\",\");\n if (getNodeType() != null)\n sb.append(\"NodeType: \").append(getNodeType()).append(\",\");\n if (getZookeeperNodeInfo() != null)\n sb.append(\"ZookeeperNodeInfo: \").append(getZookeeperNodeInfo());\n sb.append(\"}\");\n return sb.toString();\n }", "public String toString() {\r\n\t\tString s = \"\";\r\n\t\t\r\n\t\tfor ( IntNode i = this; i!= null; i = i.link ) {\r\n\t\t\tif (i.link == null)\r\n\t\t\t\ts = s + i.data;\r\n\t\t\telse\r\n\t\t\t\ts = s + i.data + \"->\";\r\n\t\t} // end for\r\n\t\t\r\n\t\treturn s;\r\n\t}", "@Override\r\n public String toString() {\r\n String str = \"[\";\r\n if (!isEmpty()) {\r\n Node<T> current = head.next();\r\n while (current != tail) {\r\n str = str + current.getData();\r\n if (current.next != tail) {\r\n str = str + \", \";\r\n }\r\n current = current.next();\r\n }\r\n }\r\n return str + \"]\";\r\n }", "public String toString()\n {\n StringBuilder output = new StringBuilder(\"\");\n Node p = head;\n while (p != null)\n {\n if (p.data.length() > 1)\n output.append(\"\\t\");\n output.append(p.data + \"\\n\");\n p = p.next;\n }\n\n return new String(output);\n }", "public String toString() {\n\t\t\tString result = \"\";\n\t\t\tif (head == null) {\n\t\t\t\treturn result+\"\\n\";\n\t\t\t}\n\t\t\tresult = result + head.getValue();\n\t\t ElementDPtr temp = head.getNext();\n\t\t\twhile (temp != null) {\n\t\t\t\tresult = result + \"\\n\" + temp.getValue();\n\t\t\t\ttemp = temp.getNext();\n\t\t\t}\n\t\t\treturn result + \"\";\n\t\t}", "public String toString() {\r\n\t\tStringBuilder buffer = new StringBuilder();\r\n\t\t\r\n\t\tbuffer.append(\"<\" + xmltag + \" subgraph=\\\"\" + subgraph + \"\\\">\" + newline);\r\n\t\t\r\n\t\tfor (Variable currentVariable : variables) {\r\n\t\t\tbuffer.append(\"\\t\\t\\t\\t\\t\" + currentVariable);\r\n\t\t}\r\n\t\t\r\n\t\tbuffer.append(\"\\t\\t\\t\\t</\" + xmltag + \">\" + newline);\r\n\t\t\r\n\t\treturn buffer.toString();\r\n\t}", "@Override\n public Object string(Object node) {\n Node<E> myNode = (Node<E>)node;\n String parentString = \"null\";\n if (myNode.parent != null) {\n parentString = myNode.parent.element.toString();\n }\n return myNode.element + \"_p(\" + parentString + \")\"; }", "public String serialize(TreeNode root) {\n if(root == null)\n return \"N\";\n else\n return root.val + \" \"+ serialize(root.left) + \" \"+ serialize(root.right);\n \n }", "@Override\n public String toString() {\n StringBuilder outString = new StringBuilder();\n int currentTreeIndex = this.indexCorrespondingToTheFirstElement;\n if (treeSize > 0) {\n while (currentTreeIndex != -1) {\n Node<T> currentNode = getHelper(currentTreeIndex);\n outString.append(currentNode.data).append(\", \");\n currentTreeIndex = currentNode.nextIndex;\n }\n }\n\n if (outString.length() != 0) {\n outString.deleteCharAt(outString.length() - 1); // \", \"\n outString.deleteCharAt(outString.length() - 1);\n }\n return \"[\" + outString.toString() + \"]\";\n }", "@Override\n public String toString() {\n if (data == null) {\n return ZeroString;\n }\n StringBuffer uuid = new StringBuffer(36);\n for (int i = 0; i < 16; ++i) {\n byte value = data[i];\n uuid.append(String.format(\"%02x\", value & 0xFF));\n if (i == 3 || i == 5 || i == 7 || i == 9) {\n uuid.append(\"-\");\n }\n }\n return uuid.toString();\n }", "public String toString() {\n\n\t\tStringBuilder buffer = new StringBuilder();\n\n\t\t//Serialize the data into pseudo-xml to prevent problems with certain characters...\n\t\tbuffer.append(\"<westlawClusterName>\").append(westlawClusterName).append(\"</westlawClusterName>\");\n\t\tbuffer.append(\"<docketNumber>\").append(docketNumber).append(\"</docketNumber>\");\n\t\tbuffer.append(\"<scrapeType>\").append(scrapeType).append(\"</scrapeType>\");\n\t\tbuffer.append(\"<caseType>\").append(caseType).append(\"</caseType>\");\n\t\tbuffer.append(\"<subdivisionName>\").append(subdivisionName).append(\"</subdivisionName>\");\n\t\tbuffer.append(\"<docketDataFields>\").append(docketDataFields).append(\"</docketDataFields>\");\n\t\tbuffer.append(\"<lastScrapeDate>\").append(lastScrapeDate).append(\"</lastScrapeDate>\");\n\t\tbuffer.append(\"<lastSourceFilename>\").append(lastSourceFilename).append(\"</lastSourceFilename>\");\n\t\tbuffer.append(\"<year>\").append(year).append(\"</year>\");\n\t\tbuffer.append(\"<deleteFlag>\").append(deleteFlag).append(\"</deleteFlag>\");\t\t\n\t\tbuffer.append(\"<docketCompleteFlag>\").append(docketCompleteFlag).append(\"</docketCompleteFlag>\");\t\n\t\tbuffer.append(\"<legacyId>\").append(legacyId).append(\"</legacyId>\");\n\t\tbuffer.append(\"<indexNumber>\").append(indexNumber).append(\"</indexNumber>\");\t\n\t\t\n\t\treturn buffer.toString();\n\t}", "public String toString()\n\t{\n\t\tString stringList = \"\";\n\t\tNode temp = front;\n\t\twhile(temp != null)\n\t\t{\n\t\t\tstringList += String.valueOf(temp.data) + \" \"; //places the data from the Node into the empty string\n\t\t\ttemp = temp.next; //moevs onto the next Node in the list\n\t\t}\n\t\treturn stringList;\n\t}", "public String serialize(TreeNode root) {\n if (root == null) {\n \treturn \"#\";\n }\n \n return \"\" + root.val + \" \" + serialize(root.left) + \" \" + serialize(root.right);\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getPayloadData() != null)\n sb.append(\"PayloadData: \").append(getPayloadData());\n sb.append(\"}\");\n return sb.toString();\n }", "@Override\r\n public String toString() {\r\n StringBuilder buf = new StringBuilder();\r\n\r\n buf.append('[').append(getTokenName(type));\r\n if (line != -1) {\r\n buf.append('@').append(line);\r\n if (column != -1)\r\n buf.append(',').append(column);\r\n }\r\n buf.append(\"]:\");\r\n if (text != null)\r\n buf.append('\"').append(text).append('\"');\r\n else if (type > 3 && type < 256)\r\n buf.append((char) type);\r\n else\r\n buf.append('<').append(type).append('>');\r\n if (value != null)\r\n buf.append('=').append(value);\r\n return buf.toString();\r\n }", "public String serialize(Node15 root) {\n\t if(root == null) return \"\";\n\t serializeT(root);\n\t return sb.toString();\n\t }", "public String toString() {\n if (head != null) {\n String str = \"\";\n Node node = head;\n while (node.next != null) {\n str += (node.data) + \", \";\n node = node.next;\n }\n str += (node.data);\n return str;\n } else {\n return \"Steque is empty.\";\n }\n }", "public String serialize(TreeNode root) {\n StringBuilder sb = new StringBuilder();\n if (root==null) return \"#\";\n sb.append(String.valueOf(root.val));\n String left = serialize(root.left);\n String right = serialize(root.right);\n sb.append(\",\").append(left).append(\",\").append(right);\n return sb.toString();\n }", "public String toString(){\r\n\t\treturn root.toString();\r\n\t}", "public static String TNodeToString(TNode n) {\n if (n == null)\n return \"NULL\";\n else\n return n.getName() + \":\" + n.getPort();\n }", "public String toString(){\n return data+\" \"; \n }", "@Override\n public String toString() {\n \t\n \t//call method is empty to check if there is a first node\n if (isEmpty()) {\n return nameList + \" is empty\";\n }\n \n //here StringBuilder is used to make sentence: \"The (name of list) id\"\n StringBuilder buffer = new StringBuilder();\n buffer.append(\"The \").append(nameList).append(\" contains:\\n\");\n \n //create current node and assign it to first node\n Node<T> current = firstNode;\n \n \n //while current node has next node, retrieve data from current node and append a \",\" to make it readeble\n while (current != null) {\n buffer.append(current.getData()).append(\"\");\n current = current.getNext();\n }\n return buffer.toString();\n }", "public String getDataAsString()\n\t{\n\t\tString listAsString = \"\";\n\t\t\n\t\tfor (int i = 0; i < list.length; i++)\n\t\t{\n\t\t\tlistAsString += list[i] + \" \";\n\t\t}\n\t\t\n\t\tlistAsString += \"\\nFront: \" + front + \"\\nRear: \" +\n\t\t\t\trear + \"\\nEntries: \" + counter;\n\t\t\n\t\treturn listAsString;\n\t}", "@Override\n public String toString() {\n\n StringBuilder sb = new StringBuilder();\n\n sb.append(\"msg : \" + msg);\n\n sb.append(\"\\n\\n\");\n\n sb.append(\"nodeList : \" + nodeList == null ? \"null\" : nodeList.size());\n \n sb.append(\"\\n\\n\");\n\n sb.append(\"pnodeList : \" + pnodeList == null ? \"null\" : pnodeList.size());\n\n return sb.toString().trim();\n }", "public String toString() {\n\t\t//if list is empty\n\t\tif ( head == null ) {\n\t\t\treturn \"list is empty\";\n\t\t} else {\n\t\t\tString str = head.toString();\n\t\t\tfor ( DLLNode<T> node = head.getNext(); node != null; node = node.getNext() ) {\n\t\t\t\tstr += \">\" + node.getData().toString();\n\t\t\t}\n\t\t\treturn str;\n\t\t}\n\t}", "public String toString() {\n\t\tStringBuilder tmpStringBuilder = new StringBuilder(\"(\");\n\t\tint frontIndex = theFrontIndex;\n\t\tfor (int j = 0; j < theSize; j++) {\n\t\t\tif (j > 0)\n\t\t\t\ttmpStringBuilder.append(\", \");\n\t\t\ttmpStringBuilder.append(theData[frontIndex]);\n\t\t\tfrontIndex = (frontIndex + 1) % theData.length;\n\t\t}\n\t\ttmpStringBuilder.append(\")\");\n\t\treturn tmpStringBuilder.toString();\n\t}", "@SuppressWarnings(\"PMD.SystemPrintln\")\n\tprivate Object dump(SimpleNode node, Object data)\n\t{\n\t\tSystem.err.print(data);\n\t\tSystem.err.print(FormulaParserTreeConstants.jjtNodeName[node.getId()]);\n\t\tOperator operator = node.getOperator();\n\t\tif (operator != null)\n\t\t{\n\t\t\tSystem.err.print(\" \");\n\t\t\tSystem.err.print(operator);\n\t\t}\n\n\t\tif (node.getText() != null)\n\t\t{\n\t\t\tSystem.err.print(\" \");\n\t\t\tSystem.err.print(node.getText());\n\t\t}\n\t\tSystem.err.println();\n\t\tint numChildren = node.jjtGetNumChildren();\n\t\tfor (int i = 0; i < numChildren; i++)\n\t\t{\n\t\t\tNode child = node.jjtGetChild(i);\n\t\t\tchild.jjtAccept(this, data + \" \");\n\t\t}\n\t\treturn null;\n\t}", "public String toString() {\n\t\tString result = \"[\";\n\t\tif (head == null) {\n\t\t\treturn result + \"]\";\n\t\t}\n\t\tresult = result + head.getData();\n\t\tListNode temp = head.getNext();\n\t\twhile (temp != null) {\n\t\t\tresult = result + \",\" + temp.getData();\n\t\t\ttemp = temp.getNext();\n\t\t}\n\t\treturn result + \"]\";\n\t}", "public String toString() {\n\t\tString result = \"[\";\n\t\tif (head == null) {\n\t\t\treturn result + \"]\";\n\t\t}\n\t\tresult = result + head.getData();\n\t\tListNode temp = head.getNext();\n\t\twhile (temp != null) {\n\t\t\tresult = result + \",\" + temp.getData();\n\t\t\ttemp = temp.getNext();\n\t\t}\n\t\treturn result + \"]\";\n\t}", "@Override\n\tpublic java.lang.String getNode_4() {\n\t\treturn _dictData.getNode_4();\n\t}", "public String nodePath() {\r\n String path;\r\n if (this.parent == null) {\r\n path = \"(\" + this.nodeType + \"|\" + this.dataType + \"|\" + this.data + \")\";\r\n } else {\r\n path = this.parent.nodePath() + \" (\" + this.nodeType + \"|\" + this.dataType + \"|\" + this.data + \")\";\r\n }\r\n return path;\r\n }", "protected String toString(Node<T> node) {\n\t\tif (node == null) {\n\t\t\treturn \"\";\n\t\t}\n\t\treturn node.value.toString() + \" \" \n\t\t\t\t+ toString(node.left) + \" \"\n\t\t\t\t+ toString(node.right);\n\t}", "public String toString() {\n \n StringBuffer sb = new StringBuffer();\n \n SingleNode current = head;\n while (current != null) {\n sb.append(current.getData());\n sb.append(\" \");\n current = current.getNext();\n }\n return \"List = \" + sb.toString();\n }", "public String serialize(TreeNode root) {\n if (root == null) {\n return \"X\";\n }\n return \"(\" + serialize(root.left) + \")\" + root.val + \"(\" + serialize(root.right) + \")\";\n }", "public String toString() {\n\t\tString NL = \"\\n\\t\";\n\t\tString s = \"id: \" + getId();\n\t\ts += NL + \"definition: \" + getDefinition();\n\t\ts += NL + \"label: \" + getLabel();\n\t\ts += NL + \"fullText: \" + getFullText();\n\t\ts += NL + \"itemText: \" + getItemText();\n\t\ts += NL + \"isLeafNode: \" + getIsLeafNode();\n\t\treturn s;\n\t}", "public java.lang.String getData() {\r\n return data;\r\n }", "public String getData() {\r\n\t\t\treturn data;\r\n\t\t}", "public String getData() {\n\t\treturn data;\n\t}", "public String getData() {\n\t\treturn data;\n\t}" ]
[ "0.83493406", "0.76687676", "0.76638883", "0.74279207", "0.7373921", "0.7373921", "0.73596895", "0.73453194", "0.7339088", "0.72737575", "0.7264625", "0.72012126", "0.7194248", "0.7156707", "0.71254015", "0.70886964", "0.702056", "0.6965982", "0.69325864", "0.69263864", "0.6820863", "0.67538714", "0.6733095", "0.67208123", "0.6716571", "0.6686769", "0.66491145", "0.66449535", "0.6637187", "0.66111755", "0.66104716", "0.6567891", "0.6562521", "0.65564287", "0.6555678", "0.65473706", "0.65363985", "0.65283597", "0.6521752", "0.65185726", "0.65114343", "0.65076333", "0.64995074", "0.6498515", "0.6493512", "0.64931536", "0.6491841", "0.6472311", "0.6462779", "0.64517194", "0.64456445", "0.6443896", "0.64326155", "0.6407992", "0.6402054", "0.64016646", "0.6399174", "0.6398652", "0.6397793", "0.63959026", "0.6394344", "0.6375338", "0.63672954", "0.6339625", "0.6333621", "0.63314533", "0.6327715", "0.6319822", "0.6302482", "0.62972635", "0.6294742", "0.62945783", "0.6292963", "0.6287568", "0.6286771", "0.6278041", "0.6277311", "0.6276261", "0.6273149", "0.6272559", "0.62690324", "0.6265177", "0.62577885", "0.62570876", "0.62541604", "0.6252168", "0.6249096", "0.62479645", "0.6246459", "0.6246459", "0.62413526", "0.62394035", "0.6236912", "0.62340343", "0.62336016", "0.6231163", "0.62249637", "0.6222085", "0.6221545", "0.6221545" ]
0.7254019
11
2 ms 114.6 MB
public static boolean isMonotonic(int[] nums) { int length = nums.length; boolean flag = nums[0] < nums[length - 1]; for (int i = 0; i < length - 1; i++) { if (flag) { if (nums[i] > nums[i + 1]) return false; } else { if (nums[i] < nums[i + 1]) return false; } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static byte[] m2539e(Context context) {\n Throwable th;\n int i = 0;\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n byte[] bArr = new byte[0];\n String a = Log.m2547a(context, Log.f1857e);\n DiskLruCache diskLruCache = null;\n try {\n diskLruCache = DiskLruCache.m2767a(new File(a), 1, 1, 10240);\n File file = new File(a);\n if (file != null && file.exists()) {\n String[] list = file.list();\n int length = list.length;\n while (i < length) {\n String str = list[i];\n if (str.contains(\".0\")) {\n byteArrayOutputStream.write(StatisticsManager.m2535a(diskLruCache, str.split(\"\\\\.\")[0]));\n }\n i++;\n }\n }\n bArr = byteArrayOutputStream.toByteArray();\n if (byteArrayOutputStream != null) {\n try {\n byteArrayOutputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n if (diskLruCache != null) {\n try {\n diskLruCache.close();\n } catch (Throwable th2) {\n th = th2;\n }\n }\n } catch (IOException th3) {\n BasicLogHandler.m2542a(th3, \"StatisticsManager\", \"getContent\");\n if (byteArrayOutputStream != null) {\n try {\n byteArrayOutputStream.close();\n } catch (IOException e2) {\n e2.printStackTrace();\n }\n }\n if (diskLruCache != null) {\n diskLruCache.close();\n }\n } catch (Throwable th4) {\n th3 = th4;\n }\n return bArr;\n th3.printStackTrace();\n return bArr;\n }", "public abstract long mo9746k();", "long memoryUsed();", "public long estimateSize() {\n/* 1448 */ return this.est;\n/* */ }", "int memSize() {\n return super.memSize() + 4 * 4; }", "public static void main(String[] args) throws IOException {\n BufferedReader bufferedReader = new BufferedReader(new FileReader(UFTest.class.getResource(\"/\").getPath()+\"1.5/largeUF.txt\"));\n String str = bufferedReader.readLine();\n UFLJWQU uf = new UFLJWQU(Integer.parseInt(str));\n long beginTime =System.currentTimeMillis();\n while ((str = bufferedReader.readLine())!=null){\n String[] array = str.split(\" \");\n int p = Integer.parseInt(array[0]);\n int q = Integer.parseInt(array[1]);\n if(uf.connected(p,q)) continue;\n uf.union(p,q);\n// System.out.println(p+\" -- \"+q);\n }\n System.out.println(uf.count());\n System.out.println(\"cost time :\"+(System.currentTimeMillis() - beginTime));\n }", "long getSize();", "public abstract long mo9229aD();", "public abstract long mo13681c();", "long memoryUnused();", "public void testPerformance() {\n \t}", "public long estimateSize() {\n/* 1668 */ return this.est;\n/* */ }", "static long m61428a(File file) {\n long j;\n try {\n StatFs statFs = new StatFs(file.getAbsolutePath());\n j = (((long) statFs.getBlockCount()) * ((long) statFs.getBlockSize())) / 50;\n } catch (IllegalArgumentException unused) {\n j = 5242880;\n }\n return Math.max(Math.min(j, 52428800), 5242880);\n }", "public long estimateSize() {\n/* 1558 */ return this.est;\n/* */ }", "private long size() {\n\t\treturn 0;\n\t}", "private static byte[] m17790a(Bitmap bitmap) {\n int i;\n int i2;\n int i3;\n int width = bitmap.getWidth();\n int height = bitmap.getHeight();\n OutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n for (i = 0; i < 32; i++) {\n byteArrayOutputStream.write(0);\n }\n int[] iArr = new int[(width - 2)];\n bitmap.getPixels(iArr, 0, width, 1, 0, width - 2, 1);\n Object obj = iArr[0] == -16777216 ? 1 : null;\n Object obj2 = iArr[iArr.length + -1] == -16777216 ? 1 : null;\n int length = iArr.length;\n width = 0;\n int i4 = 0;\n for (i2 = 0; i2 < length; i2++) {\n if (width != iArr[i2]) {\n i4++;\n C5225r.m17788a(byteArrayOutputStream, i2);\n width = iArr[i2];\n }\n }\n if (obj2 != null) {\n i4++;\n C5225r.m17788a(byteArrayOutputStream, length);\n }\n int i5 = i4;\n int i6 = i5 + 1;\n if (obj != null) {\n i = i6 - 1;\n } else {\n i = i6;\n }\n if (obj2 != null) {\n i3 = i - 1;\n } else {\n i3 = i;\n }\n iArr = new int[(height - 2)];\n bitmap.getPixels(iArr, 0, 1, 0, 1, 1, height - 2);\n obj = iArr[0] == -16777216 ? 1 : null;\n obj2 = iArr[iArr.length + -1] == -16777216 ? 1 : null;\n length = iArr.length;\n width = 0;\n i4 = 0;\n for (i2 = 0; i2 < length; i2++) {\n if (width != iArr[i2]) {\n i4++;\n C5225r.m17788a(byteArrayOutputStream, i2);\n width = iArr[i2];\n }\n }\n if (obj2 != null) {\n i4++;\n C5225r.m17788a(byteArrayOutputStream, length);\n }\n i6 = i4 + 1;\n if (obj != null) {\n i = i6 - 1;\n } else {\n i = i6;\n }\n if (obj2 != null) {\n i--;\n }\n for (i6 = 0; i6 < i3 * i; i6++) {\n C5225r.m17788a(byteArrayOutputStream, 1);\n }\n byte[] toByteArray = byteArrayOutputStream.toByteArray();\n toByteArray[0] = (byte) 1;\n toByteArray[1] = (byte) i5;\n toByteArray[2] = (byte) i4;\n toByteArray[3] = (byte) (i * i3);\n C5225r.m17787a(bitmap, toByteArray);\n return toByteArray;\n }", "public abstract long mo24409b();", "@Override\r\n public long problem2() {\r\n ArrayList<String> arrList = new ArrayList<>();\r\n long start = System.currentTimeMillis(); \r\n for(int i = 0; i<1234567; i++){\r\n arrList.add(Integer.toString(i));\r\n }\r\n long end = System.currentTimeMillis(); \r\n return end - start; \r\n }", "public long estimateSize() {\n/* 1338 */ return this.est;\n/* */ }", "public static long m136429b() {\n StatFs statFs;\n try {\n statFs = new StatFs(Environment.getExternalStorageDirectory().getPath());\n } catch (IllegalArgumentException unused) {\n statFs = null;\n }\n long j = 0;\n if (statFs != null) {\n if (VERSION.SDK_INT >= 18) {\n j = statFs.getBlockSizeLong() * statFs.getBlockCountLong();\n } else {\n j = ((long) statFs.getBlockSize()) * ((long) statFs.getBlockCount());\n }\n }\n return (j / 1024) / 1024;\n }", "@Override\n public int getCacheSize() {\n return 4 + 20 * 88;\n }", "public byte[] mo3891a() {\n int i;\n int i2;\n int i3;\n int i4;\n int i5;\n int i6;\n int i7;\n int i8;\n int i9;\n int i10;\n int i11;\n int i12;\n int i13;\n int i14;\n int i15;\n int i16;\n int i17;\n int i18;\n byte[] b;\n int i19;\n int length;\n mo3892b();\n int i20 = 3072;\n if (this.f687G != null) {\n i20 = 3072 + this.f687G.length + 1;\n }\n byte[] bArr = new byte[i20];\n bArr[0] = Byte.parseByte(this.f688a);\n byte[] b2 = C0331cr.m1177b(this.f689b);\n System.arraycopy(b2, 0, bArr, 1, b2.length);\n int length2 = b2.length + 1;\n try {\n byte[] bytes = this.f690c.getBytes(\"GBK\");\n bArr[length2] = (byte) bytes.length;\n length2++;\n System.arraycopy(bytes, 0, bArr, length2, bytes.length);\n i = length2 + bytes.length;\n } catch (Throwable th) {\n C0310c.m956a(th, \"Req\", \"buildV4Dot2\");\n bArr[length2] = 0;\n i = length2 + 1;\n }\n try {\n byte[] bytes2 = this.f691d.getBytes(\"GBK\");\n bArr[i] = (byte) bytes2.length;\n i++;\n System.arraycopy(bytes2, 0, bArr, i, bytes2.length);\n i2 = i + bytes2.length;\n } catch (Throwable th2) {\n C0310c.m956a(th2, \"Req\", \"buildV4Dot21\");\n bArr[i] = 0;\n i2 = i + 1;\n }\n try {\n byte[] bytes3 = this.f702o.getBytes(\"GBK\");\n bArr[i2] = (byte) bytes3.length;\n i2++;\n System.arraycopy(bytes3, 0, bArr, i2, bytes3.length);\n i3 = i2 + bytes3.length;\n } catch (Throwable th3) {\n C0310c.m956a(th3, \"Req\", \"buildV4Dot22\");\n bArr[i2] = 0;\n i3 = i2 + 1;\n }\n try {\n byte[] bytes4 = this.f692e.getBytes(\"GBK\");\n bArr[i3] = (byte) bytes4.length;\n i3++;\n System.arraycopy(bytes4, 0, bArr, i3, bytes4.length);\n i4 = i3 + bytes4.length;\n } catch (Throwable th4) {\n C0310c.m956a(th4, \"Req\", \"buildV4Dot23\");\n bArr[i3] = 0;\n i4 = i3 + 1;\n }\n try {\n byte[] bytes5 = this.f693f.getBytes(\"GBK\");\n bArr[i4] = (byte) bytes5.length;\n i4++;\n System.arraycopy(bytes5, 0, bArr, i4, bytes5.length);\n i5 = i4 + bytes5.length;\n } catch (Throwable th5) {\n C0310c.m956a(th5, \"Req\", \"buildV4Dot24\");\n bArr[i4] = 0;\n i5 = i4 + 1;\n }\n try {\n byte[] bytes6 = this.f694g.getBytes(\"GBK\");\n bArr[i5] = (byte) bytes6.length;\n i5++;\n System.arraycopy(bytes6, 0, bArr, i5, bytes6.length);\n i6 = i5 + bytes6.length;\n } catch (Throwable th6) {\n C0310c.m956a(th6, \"Req\", \"buildV4Dot25\");\n bArr[i5] = 0;\n i6 = i5 + 1;\n }\n try {\n byte[] bytes7 = this.f708u.getBytes(\"GBK\");\n bArr[i6] = (byte) bytes7.length;\n i6++;\n System.arraycopy(bytes7, 0, bArr, i6, bytes7.length);\n i7 = i6 + bytes7.length;\n } catch (Throwable th7) {\n C0310c.m956a(th7, \"Req\", \"buildV4Dot26\");\n bArr[i6] = 0;\n i7 = i6 + 1;\n }\n try {\n byte[] bytes8 = this.f695h.getBytes(\"GBK\");\n bArr[i7] = (byte) bytes8.length;\n i7++;\n System.arraycopy(bytes8, 0, bArr, i7, bytes8.length);\n i8 = i7 + bytes8.length;\n } catch (Throwable th8) {\n C0310c.m956a(th8, \"Req\", \"buildV4Dot27\");\n bArr[i7] = 0;\n i8 = i7 + 1;\n }\n try {\n byte[] bytes9 = this.f703p.getBytes(\"GBK\");\n bArr[i8] = (byte) bytes9.length;\n i8++;\n System.arraycopy(bytes9, 0, bArr, i8, bytes9.length);\n i9 = i8 + bytes9.length;\n } catch (Throwable th9) {\n C0310c.m956a(th9, \"Req\", \"buildV4Dot28\");\n bArr[i8] = 0;\n i9 = i8 + 1;\n }\n try {\n byte[] bytes10 = this.f704q.getBytes(\"GBK\");\n bArr[i9] = (byte) bytes10.length;\n i9++;\n System.arraycopy(bytes10, 0, bArr, i9, bytes10.length);\n i10 = i9 + bytes10.length;\n } catch (Throwable th10) {\n C0310c.m956a(th10, \"Req\", \"buildV4Dot29\");\n bArr[i9] = 0;\n i10 = i9 + 1;\n }\n try {\n if (TextUtils.isEmpty(this.f707t)) {\n bArr[i10] = 0;\n length = i10 + 1;\n } else {\n byte[] b3 = m1034b(this.f707t);\n bArr[i10] = (byte) b3.length;\n int i21 = i10 + 1;\n System.arraycopy(b3, 0, bArr, i21, b3.length);\n length = b3.length + i21;\n }\n i11 = length;\n } catch (Throwable th11) {\n C0310c.m956a(th11, \"Req\", \"buildV4Dot219\");\n bArr[i10] = 0;\n i11 = i10 + 1;\n }\n try {\n byte[] bytes11 = this.f709v.getBytes(\"GBK\");\n bArr[i11] = (byte) bytes11.length;\n i11++;\n System.arraycopy(bytes11, 0, bArr, i11, bytes11.length);\n i12 = i11 + bytes11.length;\n } catch (Throwable th12) {\n C0310c.m956a(th12, \"Req\", \"buildV4Dot211\");\n bArr[i11] = 0;\n i12 = i11 + 1;\n }\n try {\n byte[] bytes12 = this.f710w.getBytes(\"GBK\");\n bArr[i12] = (byte) bytes12.length;\n i12++;\n System.arraycopy(bytes12, 0, bArr, i12, bytes12.length);\n i13 = i12 + bytes12.length;\n } catch (Throwable th13) {\n C0310c.m956a(th13, \"Req\", \"buildV4Dot212\");\n bArr[i12] = 0;\n i13 = i12 + 1;\n }\n try {\n byte[] bytes13 = this.f711x.getBytes(\"GBK\");\n bArr[i13] = (byte) bytes13.length;\n i13++;\n System.arraycopy(bytes13, 0, bArr, i13, bytes13.length);\n i14 = bytes13.length + i13;\n } catch (Throwable th14) {\n C0310c.m956a(th14, \"Req\", \"buildV4Dot213\");\n bArr[i13] = 0;\n i14 = i13 + 1;\n }\n bArr[i14] = Byte.parseByte(this.f712y);\n int i22 = i14 + 1;\n bArr[i22] = Byte.parseByte(this.f697j);\n int i23 = i22 + 1;\n bArr[i23] = Byte.parseByte(this.f713z);\n int i24 = i23 + 1;\n if (this.f713z.equals(\"1\")) {\n byte[] d = C0331cr.m1187d(mo3890a(\"mcc\"));\n System.arraycopy(d, 0, bArr, i24, d.length);\n int length3 = i24 + d.length;\n byte[] d2 = C0331cr.m1187d(mo3890a(\"mnc\"));\n System.arraycopy(d2, 0, bArr, length3, d2.length);\n int length4 = length3 + d2.length;\n byte[] d3 = C0331cr.m1187d(mo3890a(\"lac\"));\n System.arraycopy(d3, 0, bArr, length4, d3.length);\n int length5 = length4 + d3.length;\n byte[] e = C0331cr.m1190e(mo3890a(\"cellid\"));\n System.arraycopy(e, 0, bArr, length5, e.length);\n int length6 = e.length + length5;\n int parseInt = Integer.parseInt(mo3890a(\"signal\"));\n if (parseInt > 127) {\n parseInt = 0;\n }\n bArr[length6] = (byte) parseInt;\n int i25 = length6 + 1;\n if (this.f682B.length() == 0) {\n bArr[i25] = 0;\n i24 = i25 + 1;\n } else {\n int length7 = this.f682B.split(\"\\\\*\").length;\n bArr[i25] = (byte) length7;\n i24 = i25 + 1;\n int i26 = 0;\n while (i26 < length7) {\n byte[] d4 = C0331cr.m1187d(m1032a(\"lac\", i26));\n System.arraycopy(d4, 0, bArr, i24, d4.length);\n int length8 = i24 + d4.length;\n byte[] e2 = C0331cr.m1190e(m1032a(\"cellid\", i26));\n System.arraycopy(e2, 0, bArr, length8, e2.length);\n int length9 = e2.length + length8;\n int parseInt2 = Integer.parseInt(m1032a(\"signal\", i26));\n if (parseInt2 > 127) {\n parseInt2 = 0;\n }\n bArr[length9] = (byte) parseInt2;\n i26++;\n i24 = length9 + 1;\n }\n }\n } else if (this.f713z.equals(\"2\")) {\n byte[] d5 = C0331cr.m1187d(mo3890a(\"mcc\"));\n System.arraycopy(d5, 0, bArr, i24, d5.length);\n int length10 = i24 + d5.length;\n byte[] d6 = C0331cr.m1187d(mo3890a(\"sid\"));\n System.arraycopy(d6, 0, bArr, length10, d6.length);\n int length11 = length10 + d6.length;\n byte[] d7 = C0331cr.m1187d(mo3890a(\"nid\"));\n System.arraycopy(d7, 0, bArr, length11, d7.length);\n int length12 = length11 + d7.length;\n byte[] d8 = C0331cr.m1187d(mo3890a(\"bid\"));\n System.arraycopy(d8, 0, bArr, length12, d8.length);\n int length13 = length12 + d8.length;\n byte[] e3 = C0331cr.m1190e(mo3890a(\"lon\"));\n System.arraycopy(e3, 0, bArr, length13, e3.length);\n int length14 = length13 + e3.length;\n byte[] e4 = C0331cr.m1190e(mo3890a(C1447g.f3485ae));\n System.arraycopy(e4, 0, bArr, length14, e4.length);\n int length15 = e4.length + length14;\n int parseInt3 = Integer.parseInt(mo3890a(\"signal\"));\n if (parseInt3 > 127) {\n parseInt3 = 0;\n }\n bArr[length15] = (byte) parseInt3;\n int i27 = length15 + 1;\n bArr[i27] = 0;\n i24 = i27 + 1;\n }\n if (this.f683C.length() == 0) {\n bArr[i24] = 0;\n i15 = i24 + 1;\n } else {\n bArr[i24] = 1;\n int i28 = i24 + 1;\n try {\n String[] split = this.f683C.split(MiPushClient.ACCEPT_TIME_SEPARATOR);\n byte[] b4 = m1034b(split[0]);\n System.arraycopy(b4, 0, bArr, i28, b4.length);\n int length16 = i28 + b4.length;\n try {\n byte[] bytes14 = split[2].getBytes(\"GBK\");\n bArr[length16] = (byte) bytes14.length;\n length16++;\n System.arraycopy(bytes14, 0, bArr, length16, bytes14.length);\n i16 = length16 + bytes14.length;\n } catch (Throwable th15) {\n C0310c.m956a(th15, \"Req\", \"buildV4Dot214\");\n bArr[length16] = 0;\n i16 = length16 + 1;\n }\n int parseInt4 = Integer.parseInt(split[1]);\n if (parseInt4 > 127) {\n parseInt4 = 0;\n }\n bArr[i16] = Byte.parseByte(String.valueOf(parseInt4));\n i15 = i16 + 1;\n } catch (Throwable th16) {\n C0310c.m956a(th16, \"Req\", \"buildV4Dot216\");\n byte[] b5 = m1034b(\"00:00:00:00:00:00\");\n System.arraycopy(b5, 0, bArr, i28, b5.length);\n int length17 = b5.length + i28;\n bArr[length17] = 0;\n int i29 = length17 + 1;\n bArr[i29] = Byte.parseByte(\"0\");\n i15 = i29 + 1;\n }\n }\n String[] split2 = this.f684D.split(\"\\\\*\");\n if (TextUtils.isEmpty(this.f684D) || split2.length == 0) {\n bArr[i15] = 0;\n i17 = i15 + 1;\n } else {\n bArr[i15] = (byte) split2.length;\n int i30 = i15 + 1;\n for (String str : split2) {\n String[] split3 = str.split(MiPushClient.ACCEPT_TIME_SEPARATOR);\n try {\n b = m1034b(split3[0]);\n } catch (Throwable th17) {\n C0310c.m956a(th17, \"Req\", \"buildV4Dot2110\");\n b = m1034b(\"00:00:00:00:00:00\");\n }\n System.arraycopy(b, 0, bArr, i30, b.length);\n int length18 = i30 + b.length;\n try {\n byte[] bytes15 = split3[2].getBytes(\"GBK\");\n bArr[length18] = (byte) bytes15.length;\n length18++;\n System.arraycopy(bytes15, 0, bArr, length18, bytes15.length);\n i19 = bytes15.length + length18;\n } catch (Throwable th18) {\n C0310c.m956a(th18, \"Req\", \"buildV4Dot217\");\n bArr[length18] = 0;\n i19 = length18 + 1;\n }\n int parseInt5 = Integer.parseInt(split3[1]);\n if (parseInt5 > 127) {\n parseInt5 = 0;\n }\n bArr[i19] = Byte.parseByte(String.valueOf(parseInt5));\n i30 = i19 + 1;\n }\n byte[] b6 = C0331cr.m1177b(Integer.parseInt(this.f685E));\n System.arraycopy(b6, 0, bArr, i30, b6.length);\n i17 = i30 + b6.length;\n }\n try {\n byte[] bytes16 = this.f686F.getBytes(\"GBK\");\n if (bytes16.length > 127) {\n bytes16 = null;\n }\n if (bytes16 == null) {\n bArr[i17] = 0;\n i18 = i17 + 1;\n } else {\n bArr[i17] = (byte) bytes16.length;\n int i31 = i17 + 1;\n System.arraycopy(bytes16, 0, bArr, i31, bytes16.length);\n i18 = bytes16.length + i31;\n }\n } catch (Throwable th19) {\n C0310c.m956a(th19, \"Req\", \"buildV4Dot218\");\n bArr[i17] = 0;\n i18 = i17 + 1;\n }\n int length19 = this.f687G != null ? this.f687G.length : 0;\n byte[] b7 = C0331cr.m1177b(length19);\n System.arraycopy(b7, 0, bArr, i18, b7.length);\n int length20 = i18 + b7.length;\n if (length19 > 0) {\n System.arraycopy(this.f687G, 0, bArr, length20, this.f687G.length);\n length20 += this.f687G.length;\n }\n byte[] bArr2 = new byte[length20];\n System.arraycopy(bArr, 0, bArr2, 0, length20);\n CRC32 crc32 = new CRC32();\n crc32.update(bArr2);\n byte[] a = C0331cr.m1167a(crc32.getValue());\n byte[] bArr3 = new byte[(a.length + length20)];\n System.arraycopy(bArr2, 0, bArr3, 0, length20);\n System.arraycopy(a, 0, bArr3, length20, a.length);\n int length21 = length20 + a.length;\n m1033a(bArr3, 0);\n return bArr3;\n }", "@Override\r\n public long problem1(int size) {\r\n StringBuilder sb = new StringBuilder();\r\n long start = System.currentTimeMillis();\r\n for (int i=0; i<size; i++) {\r\n sb.append(i);\r\n }\r\n long end = System.currentTimeMillis();\r\n return end - start;\r\n }", "@Override\n\tpublic int isFast() {\n\t\treturn 2;\n\t}", "@Test(timeout = 4000)\n public void test22() throws Throwable {\n LinkedList<byte[][]> linkedList0 = new LinkedList<byte[][]>();\n XSQLVAR[] xSQLVARArray0 = new XSQLVAR[0];\n FBResultSet fBResultSet0 = new FBResultSet(xSQLVARArray0, linkedList0);\n byte[][] byteArray0 = new byte[7][0];\n byte[] byteArray1 = new byte[7];\n byteArray1[0] = (byte) (-111);\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"!3eO>|kx{3s''g6%=\");\n byteArray1[1] = (byte) (-109);\n byteArray1[2] = (byte)31;\n linkedList0.add((byte[][]) null);\n linkedList0.add(byteArray0);\n FBCachedFetcher fBCachedFetcher0 = new FBCachedFetcher(linkedList0, fBResultSet0);\n fBCachedFetcher0.next();\n fBCachedFetcher0.deleteRow();\n assertTrue(fBCachedFetcher0.isLast());\n }", "byte[] mo38566a();", "public abstract long mo9743h();", "private static void testLongLoop() {\n test(1000 * 1000 * 1000);\n //uncomment the following line to see the hand-written cache performance\n //testManual( 1000 * 1000 * 1000 );\n }", "private static void testLongLoop() {\n test(1000 * 1000 * 1000);\n //uncomment the following line to see the hand-written cache performance\n //testManual( 1000 * 1000 * 1000 );\n }", "private static long m133353n() {\n C41940c c = C35574k.m114859a().mo70094i().mo102932c();\n String str = C39811er.f103468d;\n C7573i.m23582a((Object) str, \"ShortVideoConfig2.sDir\");\n File a = c.mo102928a(str);\n long j = 0;\n if (a.exists() && a.isDirectory()) {\n Set a2 = C41911c.m133283a();\n File[] listFiles = a.listFiles();\n C7573i.m23582a((Object) listFiles, \"filesRoot.listFiles()\");\n Iterable c2 = C7519g.m23444c((T[]) listFiles);\n Collection arrayList = new ArrayList();\n Iterator it = c2.iterator();\n while (true) {\n boolean z = false;\n if (!it.hasNext()) {\n break;\n }\n Object next = it.next();\n File file = (File) next;\n if (file.exists() && file.isFile()) {\n z = true;\n }\n if (z) {\n arrayList.add(next);\n }\n }\n for (File file2 : (List) arrayList) {\n String name = file2.getName();\n C7573i.m23582a((Object) name, \"undeleted.name\");\n if (!C7634n.m23721b(name, \"synthetise_\", false)) {\n String name2 = file2.getName();\n C7573i.m23582a((Object) name2, \"undeleted.name\");\n if (!C7634n.m23723c(name2, \"-concat-v\", false)) {\n String name3 = file2.getName();\n C7573i.m23582a((Object) name3, \"undeleted.name\");\n if (!C7634n.m23723c(name3, \"-concat-a\", false)) {\n }\n }\n Iterator it2 = a2.iterator();\n int i = 0;\n while (true) {\n if (!it2.hasNext()) {\n i = -1;\n break;\n }\n Object next2 = it2.next();\n if (i < 0) {\n C7525m.m23465b();\n }\n String str2 = (String) next2;\n String path = file2.getPath();\n C7573i.m23582a((Object) path, \"undeleted.path\");\n if (C7634n.m23721b(path, str2, false)) {\n break;\n }\n i++;\n }\n if (-1 == i) {\n j += file2.length();\n }\n }\n }\n }\n return j;\n }", "int getSize ();", "public abstract long mo24410c();", "public final long mo28817a(zzjq zzjq) throws IOException {\n zzjq zzjq2;\n Long l;\n zzjq zzjq3 = zzjq;\n String str = \"ms\";\n String str2 = \"Cache connection took \";\n if (!this.f25218b) {\n this.f25218b = true;\n zzvv a = zzvv.m31316a(zzjq3.f28690a);\n if (!((Boolean) zzyt.m31536e().mo29599a(zzacu.f24194wd)).booleanValue()) {\n zzvs zzvs = null;\n if (a != null) {\n a.f29558h = zzjq3.f28692c;\n zzvs = zzk.zzlm().mo32314a(a);\n }\n if (zzvs != null && zzvs.mo32317a()) {\n this.f25217a = zzvs.mo32318c();\n return -1;\n }\n } else if (a != null) {\n a.f29558h = zzjq3.f28692c;\n if (a.f29557g) {\n l = (Long) zzyt.m31536e().mo29599a(zzacu.f24206yd);\n } else {\n l = (Long) zzyt.m31536e().mo29599a(zzacu.f24200xd);\n }\n long longValue = l.longValue();\n long a2 = zzk.zzln().mo27934a();\n zzk.zzma();\n Future a3 = zzwi.m31330a(this.f25219c, a);\n try {\n this.f25217a = (InputStream) a3.get(longValue, TimeUnit.MILLISECONDS);\n long a4 = zzk.zzln().mo27934a() - a2;\n zzbei zzbei = (zzbei) this.f25221e.get();\n if (zzbei != null) {\n zzbei.mo28180a(true, a4);\n }\n StringBuilder sb = new StringBuilder(44);\n sb.append(str2);\n sb.append(a4);\n sb.append(str);\n zzawz.m26003f(sb.toString());\n return -1;\n } catch (ExecutionException | TimeoutException e) {\n a3.cancel(true);\n long a5 = zzk.zzln().mo27934a() - a2;\n zzbei zzbei2 = (zzbei) this.f25221e.get();\n if (zzbei2 != null) {\n zzbei2.mo28180a(false, a5);\n }\n StringBuilder sb2 = new StringBuilder(44);\n sb2.append(str2);\n sb2.append(a5);\n sb2.append(str);\n zzawz.m26003f(sb2.toString());\n } catch (InterruptedException e2) {\n a3.cancel(true);\n Thread.currentThread().interrupt();\n long a6 = zzk.zzln().mo27934a() - a2;\n zzbei zzbei3 = (zzbei) this.f25221e.get();\n if (zzbei3 != null) {\n zzbei3.mo28180a(false, a6);\n }\n StringBuilder sb3 = new StringBuilder(44);\n sb3.append(str2);\n sb3.append(a6);\n sb3.append(str);\n zzawz.m26003f(sb3.toString());\n } catch (Throwable th) {\n long a7 = zzk.zzln().mo27934a() - a2;\n zzbei zzbei4 = (zzbei) this.f25221e.get();\n if (zzbei4 != null) {\n zzbei4.mo28180a(false, a7);\n }\n StringBuilder sb4 = new StringBuilder(44);\n sb4.append(str2);\n sb4.append(a7);\n sb4.append(str);\n zzawz.m26003f(sb4.toString());\n throw th;\n }\n }\n if (a != null) {\n zzjq2 = new zzjq(Uri.parse(a.f29551a), zzjq3.f28691b, zzjq3.f28692c, zzjq3.f28693d, zzjq3.f28694e, zzjq3.f28695f);\n } else {\n zzjq2 = zzjq3;\n }\n return this.f25220d.mo28817a(zzjq2);\n }\n throw new IOException(\"Attempt to open an already open CacheDataSource.\");\n }", "private void m128168k() {\n C42962b.f111525a.mo104671a(\"upload_page_duration\", C22984d.m75611a().mo59971a(\"first_selection_duration\", System.currentTimeMillis() - this.f104209S).mo59971a(\"page_stay_duration\", System.currentTimeMillis() - this.f104208R).f60753a);\n }", "public abstract long mo9755t();", "long mo25074b();", "long sizeInBytes() throws IOException;", "long storageSize();", "public long problem2b(){\r\n LinkedList<String> linkList = new LinkedList<>();\r\n long start = System.currentTimeMillis(); \r\n for(int i = 0; i<1234567; i++){\r\n linkList.add(Integer.toString(i));\r\n }\r\n long end = System.currentTimeMillis();\r\n return end - start; \r\n }", "public static void main(String[] args) {\n\t\t\n\t\tint A[]= new int[100000000];\n\t\tfor(int i = 0; i < 100000000; i++) {\n\t\t A[i] = (int)(Math.random() * 100) + 1;\n }\n double duration = 0;\n long end = 0;\n long start = 0;\n start = System.currentTimeMillis();\n System.out.println(start);\n MinValueIndex(A, 6);\n end = System.currentTimeMillis();\n\t\tduration = end-start;\n\t\tSystem.out.println(end); \n\t\tduration = duration / 5;\n\t\tSystem.out.println(duration);\n\t}", "void mo72113b();", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\tlong start=System.currentTimeMillis();\r\n\t\t\t\tHashSetAdd hsd=new HashSetAdd();\r\n\t\t\t\tHashSet<String> hs2=hsd.add();\r\n\t\t\t\tSystem.out.println(\"size2=:\"+hs2.size());\r\n\t\t\t\tIterator<String> iter = hs2.iterator();\r\n\t\t\t\twhile(iter.hasNext()){\r\n\t\t\t\t String result = iter.next();\r\n\t\t\t\t }\r\n\t\t\t\t\r\n\t\t\t\tlong end=System.currentTimeMillis();\r\n\t\t\t\tSystem.out.println(\"time2=: \"+(end-start));\r\n\t\t\t}", "private void m9023a(int i) {\n int i2;\n Object obj = null;\n AppMethodBeat.m2504i(98679);\n try {\n BufferedInputStream bufferedInputStream = new BufferedInputStream(this.f1556t.getInputStream());\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n byte[] bArr = new byte[4096];\n i2 = 0;\n do {\n try {\n int read = bufferedInputStream.read(bArr);\n if (read == -1) {\n int obj2 = 1;\n break;\n } else {\n byteArrayOutputStream.write(bArr, 0, read);\n i2 += read;\n }\n } catch (Exception e) {\n AppMethodBeat.m2505o(98679);\n return;\n } catch (OutOfMemoryError e2) {\n }\n } while (i2 <= i);\n this.f1559w.f1540a = -303;\n this.f1559w.f1541b = \"no-content-length\";\n if (obj2 != null) {\n this.f1559w.f1543d = byteArrayOutputStream.toByteArray();\n this.f1549E.f1568f = SystemClock.elapsedRealtime();\n }\n byteArrayOutputStream.close();\n AppMethodBeat.m2505o(98679);\n return;\n } catch (OutOfMemoryError e3) {\n i2 = 0;\n } catch (Exception e4) {\n this.f1559w.f1540a = -287;\n this.f1559w.f1541b = \"read without content-length error\";\n AppMethodBeat.m2505o(98679);\n return;\n }\n this.f1559w.f1540a = -306;\n this.f1559w.f1541b = \"no-content-length:\".concat(String.valueOf(i2));\n AppMethodBeat.m2505o(98679);\n }", "public void mo21877s() {\n }", "@Test\n @Tag(\"slow\")\n public void testMODSZK1() {\n CuteNetlibCase.doTest(\"MODSZK1.SIF\", \"320.6197293824883\", null, NumberContext.of(7, 4));\n }", "public int getSize(){return _size;}", "void mo33732Px();", "void mo60893b();", "private static int benchmarkedMethod() {\n return 3;\n }", "private static float tock(){\n\t\treturn (System.currentTimeMillis() - startTime);\n\t}", "private static int getBytes(long r23) {\n /*\n java.lang.ThreadLocal<byte[]> r0 = TEMP_NUMBER_BUFFER\n java.lang.Object r0 = r0.get()\n byte[] r0 = (byte[]) r0\n r1 = 20\n if (r0 != 0) goto L_0x0013\n byte[] r0 = new byte[r1]\n java.lang.ThreadLocal<byte[]> r2 = TEMP_NUMBER_BUFFER\n r2.set(r0)\n L_0x0013:\n r2 = -9223372036854775808\n r4 = 54\n r5 = 57\n r6 = 45\n r7 = 53\n r8 = 56\n r9 = 55\n r10 = 51\n r11 = 50\n r12 = 0\n r13 = 48\n r14 = 1\n int r15 = (r23 > r2 ? 1 : (r23 == r2 ? 0 : -1))\n if (r15 != 0) goto L_0x0076\n r0[r12] = r6\n r0[r14] = r5\n r2 = 2\n r0[r2] = r11\n r2 = 3\n r0[r2] = r11\n r2 = 4\n r0[r2] = r10\n r2 = 5\n r0[r2] = r10\n r2 = 6\n r0[r2] = r9\n r2 = 7\n r0[r2] = r11\n r2 = 8\n r0[r2] = r13\n r2 = 9\n r0[r2] = r10\n r2 = 10\n r0[r2] = r4\n r2 = 11\n r0[r2] = r8\n r2 = 12\n r0[r2] = r7\n r2 = 13\n r3 = 52\n r0[r2] = r3\n r2 = 14\n r0[r2] = r9\n r2 = 15\n r0[r2] = r9\n r2 = 16\n r0[r2] = r7\n r2 = 17\n r0[r2] = r8\n r2 = 18\n r0[r2] = r13\n r2 = 19\n r0[r2] = r8\n return r1\n L_0x0076:\n r1 = 0\n int r3 = (r23 > r1 ? 1 : (r23 == r1 ? 0 : -1))\n if (r3 != 0) goto L_0x007f\n r0[r12] = r13\n return r14\n L_0x007f:\n if (r3 >= 0) goto L_0x0088\n r0[r12] = r6\n long r15 = java.lang.Math.abs(r23)\n goto L_0x008b\n L_0x0088:\n r14 = 0\n r15 = r23\n L_0x008b:\n r17 = 9\n r19 = 10\n r21 = 1\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x0099\n r17 = r21\n goto L_0x017e\n L_0x0099:\n r17 = 99\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x00a3\n r17 = r19\n goto L_0x017e\n L_0x00a3:\n r17 = 999(0x3e7, double:4.936E-321)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x00ad\n r17 = 100\n goto L_0x017e\n L_0x00ad:\n r17 = 9999(0x270f, double:4.94E-320)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x00b7\n r17 = 1000(0x3e8, double:4.94E-321)\n goto L_0x017e\n L_0x00b7:\n r17 = 99999(0x1869f, double:4.9406E-319)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x00c2\n r17 = 10000(0x2710, double:4.9407E-320)\n goto L_0x017e\n L_0x00c2:\n r17 = 999999(0xf423f, double:4.94065E-318)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x00ce\n r17 = 100000(0x186a0, double:4.94066E-319)\n goto L_0x017e\n L_0x00ce:\n r17 = 9999999(0x98967f, double:4.940656E-317)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x00da\n r17 = 1000000(0xf4240, double:4.940656E-318)\n goto L_0x017e\n L_0x00da:\n r17 = 99999999(0x5f5e0ff, double:4.9406564E-316)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x00e6\n r17 = 10000000(0x989680, double:4.9406565E-317)\n goto L_0x017e\n L_0x00e6:\n r17 = 999999999(0x3b9ac9ff, double:4.940656453E-315)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x00f2\n r17 = 100000000(0x5f5e100, double:4.94065646E-316)\n goto L_0x017e\n L_0x00f2:\n r17 = 9999999999(0x2540be3ff, double:4.940656458E-314)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x0100\n r17 = 1000000000(0x3b9aca00, double:4.94065646E-315)\n goto L_0x017e\n L_0x0100:\n r17 = 99999999999(0x174876e7ff, double:4.94065645836E-313)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x0110\n r17 = 10000000000(0x2540be400, double:4.9406564584E-314)\n goto L_0x017e\n L_0x0110:\n r17 = 999999999999(0xe8d4a50fff, double:4.940656458408E-312)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x011f\n r17 = 100000000000(0x174876e800, double:4.9406564584E-313)\n goto L_0x017e\n L_0x011f:\n r17 = 9999999999999(0x9184e729fff, double:4.940656458412E-311)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x012e\n r17 = 1000000000000(0xe8d4a51000, double:4.94065645841E-312)\n goto L_0x017e\n L_0x012e:\n r17 = 99999999999999(0x5af3107a3fff, double:4.9406564584124E-310)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x013d\n r17 = 10000000000000(0x9184e72a000, double:4.9406564584125E-311)\n goto L_0x017e\n L_0x013d:\n r17 = 999999999999999(0x38d7ea4c67fff, double:4.94065645841246E-309)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x014c\n r17 = 100000000000000(0x5af3107a4000, double:4.94065645841247E-310)\n goto L_0x017e\n L_0x014c:\n r17 = 9999999999999999(0x2386f26fc0ffff, double:5.431165199810527E-308)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x015b\n r17 = 1000000000000000(0x38d7ea4c68000, double:4.940656458412465E-309)\n goto L_0x017e\n L_0x015b:\n r17 = 99999999999999999(0x16345785d89ffff, double:5.620395787888204E-302)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x016a\n r17 = 10000000000000000(0x2386f26fc10000, double:5.431165199810528E-308)\n goto L_0x017e\n L_0x016a:\n r17 = 999999999999999999(0xde0b6b3a763ffff, double:7.832953389245684E-242)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x0179\n r17 = 100000000000000000(0x16345785d8a0000, double:5.620395787888205E-302)\n goto L_0x017e\n L_0x0179:\n r17 = 1000000000000000000(0xde0b6b3a7640000, double:7.832953389245686E-242)\n L_0x017e:\n long r1 = r15 / r17\n int r3 = (int) r1\n switch(r3) {\n case 0: goto L_0x01b6;\n case 1: goto L_0x01af;\n case 2: goto L_0x01aa;\n case 3: goto L_0x01a5;\n case 4: goto L_0x019e;\n case 5: goto L_0x0199;\n case 6: goto L_0x0194;\n case 7: goto L_0x018f;\n case 8: goto L_0x018a;\n case 9: goto L_0x0185;\n default: goto L_0x0184;\n }\n L_0x0184:\n goto L_0x01bb\n L_0x0185:\n int r3 = r14 + 1\n r0[r14] = r5\n goto L_0x01ba\n L_0x018a:\n int r3 = r14 + 1\n r0[r14] = r8\n goto L_0x01ba\n L_0x018f:\n int r3 = r14 + 1\n r0[r14] = r9\n goto L_0x01ba\n L_0x0194:\n int r3 = r14 + 1\n r0[r14] = r4\n goto L_0x01ba\n L_0x0199:\n int r3 = r14 + 1\n r0[r14] = r7\n goto L_0x01ba\n L_0x019e:\n int r3 = r14 + 1\n r6 = 52\n r0[r14] = r6\n goto L_0x01ba\n L_0x01a5:\n int r3 = r14 + 1\n r0[r14] = r10\n goto L_0x01ba\n L_0x01aa:\n int r3 = r14 + 1\n r0[r14] = r11\n goto L_0x01ba\n L_0x01af:\n int r3 = r14 + 1\n r6 = 49\n r0[r14] = r6\n goto L_0x01ba\n L_0x01b6:\n int r3 = r14 + 1\n r0[r14] = r13\n L_0x01ba:\n r14 = r3\n L_0x01bb:\n int r3 = (r17 > r21 ? 1 : (r17 == r21 ? 0 : -1))\n if (r3 != 0) goto L_0x01c0\n goto L_0x01d8\n L_0x01c0:\n java.lang.Long.signum(r17)\n long r1 = r1 * r17\n long r15 = r15 - r1\n r1 = 0\n int r3 = (r15 > r1 ? 1 : (r15 == r1 ? 0 : -1))\n if (r3 != 0) goto L_0x01d9\n L_0x01cc:\n int r1 = (r17 > r21 ? 1 : (r17 == r21 ? 0 : -1))\n if (r1 <= 0) goto L_0x01d8\n int r1 = r14 + 1\n r0[r14] = r13\n long r17 = r17 / r19\n r14 = r1\n goto L_0x01cc\n L_0x01d8:\n return r14\n L_0x01d9:\n long r17 = r17 / r19\n goto L_0x017e\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.unboundid.util.ByteStringBuffer.getBytes(long):int\");\n }", "int totalWritten();", "@Override\n public int estimateSize() {\n return 8 + 8 + 1 + 32 + 64;\n }", "protected int bytesPerAtom() {\n return (2);\n }", "protected int bytesPerAtom() {\n return (2);\n }", "static int m61449a(Bitmap bitmap) {\n return bitmap.getByteCount();\n }", "static com.qiyukf.nimlib.p470f.p471a.C5826a m23369a(android.os.Parcel r4) {\n /*\n com.qiyukf.nimlib.f.a.a r0 = new com.qiyukf.nimlib.f.a.a\n r1 = 0\n r0.m50001init(r1)\n int r2 = r4.readInt()\n r0.f18499a = r2\n int r2 = r4.readInt()\n if (r2 <= 0) goto L_0x001d\n byte[] r2 = r4.createByteArray()\n java.nio.ByteBuffer r2 = java.nio.ByteBuffer.wrap(r2)\n r0.f18501c = r2\n L_0x001d:\n int r2 = r4.readInt()\n r0.f18500b = r2\n int r2 = r4.readInt()\n if (r2 <= 0) goto L_0x0061\n byte[] r4 = r4.createByteArray()\n int r3 = r0.f18500b\n if (r3 <= 0) goto L_0x005c\n int r1 = r0.f18500b\n if (r1 != r2) goto L_0x0049\n java.nio.ByteBuffer r4 = java.nio.ByteBuffer.wrap(r4)\n r0.f18502d = r4\n java.nio.ByteBuffer r4 = r0.f18502d\n r4.position(r2)\n goto L_0x0068\n L_0x0049:\n int r1 = r0.f18500b\n java.nio.ByteBuffer r1 = java.nio.ByteBuffer.allocate(r1)\n r0.f18502d = r1\n java.nio.ByteBuffer r1 = r0.f18502d\n r1.put(r4)\n goto L_0x0068\n L_0x005c:\n java.nio.ByteBuffer r4 = java.nio.ByteBuffer.wrap(r4, r1, r2)\n goto L_0x0065\n L_0x0061:\n java.nio.ByteBuffer r4 = java.nio.ByteBuffer.allocate(r1)\n L_0x0065:\n r0.f18502d = r4\n L_0x0068:\n boolean r4 = m23372b(r0)\n if (r4 == 0) goto L_0x006f\n return r0\n L_0x006f:\n int r4 = r0.f18500b\n if (r4 <= 0) goto L_0x007d\n android.util.SparseArray<com.qiyukf.nimlib.f.a.a> r4 = f18504a\n int r1 = r0.f18499a\n r4.put(r1, r0)\n goto L_0x00a2\n L_0x007d:\n android.util.SparseArray<com.qiyukf.nimlib.f.a.a> r4 = f18504a\n int r1 = r0.f18499a\n java.lang.Object r4 = r4.get(r1)\n com.qiyukf.nimlib.f.a.a r4 = (com.qiyukf.nimlib.p470f.p471a.C5826a) r4\n if (r4 == 0) goto L_0x00a2\n java.nio.ByteBuffer r1 = r4.f18502d\n java.nio.ByteBuffer r0 = r0.f18502d\n r1.put(r0)\n boolean r0 = m23372b(r4)\n if (r0 == 0) goto L_0x00a2\n android.util.SparseArray<com.qiyukf.nimlib.f.a.a> r0 = f18504a\n int r1 = r4.f18499a\n r0.remove(r1)\n return r4\n L_0x00a2:\n r4 = 0\n return r4\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.qiyukf.nimlib.p470f.p471a.C5826a.C5829b.m23369a(android.os.Parcel):com.qiyukf.nimlib.f.a.a\");\n }", "@SuppressWarnings(\"PMD\") // this will end up in unit tests soon\n\tpublic static void main(String[] args) throws IOException\n\t{\n\t\t/*\n\t\tbyte[] data = new byte[1024 * 1024];\n\t\tfor(int i = 0; i < data.length; i++)\n\t\t{\n\t\t\tdata[i] = (byte) i;\n\t\t}\n\t\t*/\n\t\t//byte[] data = DataUtils.randomData(1024 * 1024);\n\t\t//ByteArrayInputStream in = new ByteArrayInputStream(data);\n\t\tFile oldFile = new File(\"../test-4mb-old.dat\"); // also test.dat - 1 GB\n\t\tFile newFile = new File(\"../test-4mb-new.dat\");\n\t\t\n\t\tFileInputStream in = new FileInputStream(oldFile);\n\t\tObjectArrayList<Block> blocks = calculateBlocks(in, 1024);\n\t\tin.close();\n\t\t\n\t\tin = new FileInputStream(newFile);\n\t\t//in.reset();\n\t\tlong start = System.currentTimeMillis();\n\t\tcalculateDifferences(blocks, 1024, in, new NullDifferenceListener());\n\t\tlong end = System.currentTimeMillis();\n\t\tin.close();\n\t\t\n\t\tlong millis = end - start;\n\t\tdouble seconds = millis / 1000.0;\n\t\tdouble millisPer = millis / (double) (1024*1024*1024);\n\t\tdouble secondsPer = millisPer / 1000.0;\n\t\tSystem.out.printf(\"Completed in %.4f seconds (%d milliseconds) - average %f seconds (%f milliseconds) per byte%n\", seconds, millis, secondsPer, millisPer);\n\t}", "public static long getAllSize1(){\n\t\tFile path = Environment.getExternalStorageDirectory(); \n\t\t\n\t\tlong size = 0;\n\t\tStatFs stat = new StatFs(path.getPath()); \n\t\tlong blockSize = stat.getBlockSize(); \n\t\tlong availableBlocks = stat.getBlockCount();\n\t\tsize = availableBlocks * blockSize; \n\t\treturn size;\n\t}", "static final int fast_rand()\n\t{\n\t\tRz = 36969 * (Rz & 65535) + (Rz >>> 16);// ((Rz >>> 16) & 65535);\n\t\tRw = 18000 * (Rw & 65535) + (Rw >>> 16);// ((Rw >>> 16) & 65535);\n\t\treturn (Rz << 16) + Rw;\n\t}", "public abstract long mo9750o();", "int getCacheSizeInMiB();", "@Override\n public long cost() {\n return 100;\n }", "@Override\r\n public long problem0(int size) {\r\n System.out.println(\"This is just an example, but please follow this template.\");\r\n String s = \"\";\r\n long start = System.currentTimeMillis();\r\n\r\n for (int i=0; i<size; i++) {\r\n s = s + i;\r\n }\r\n \r\n long end = System.currentTimeMillis();\r\n return end - start;\r\n }", "void mo72114c();", "private void m145775e() {\n long j;\n String str;\n int i;\n if (!this.f119477j.mo115499a()) {\n if (this.f119484q != null) {\n str = \"PRAGMA cipher_page_size\";\n if (this.f119485r == null || this.f119485r.pageSize <= 0) {\n i = SQLiteGlobal.f119529a;\n } else {\n i = this.f119485r.pageSize;\n }\n j = (long) i;\n } else {\n str = \"PRAGMA page_size\";\n j = (long) SQLiteGlobal.f119529a;\n }\n if (mo115435b(str, null, null) != j) {\n StringBuilder sb = new StringBuilder();\n sb.append(str);\n sb.append(\"=\");\n sb.append(j);\n mo115433a(sb.toString(), null, null);\n }\n }\n }", "private void optimiseEVProfile()\n\t{\n\t}", "Info mo7564ix();", "public static long m136421a() {\n StatFs statFs;\n long j;\n try {\n statFs = new StatFs(Environment.getExternalStorageDirectory().getAbsolutePath());\n } catch (IllegalArgumentException unused) {\n statFs = null;\n }\n if (statFs == null) {\n j = 0;\n } else if (VERSION.SDK_INT >= 18) {\n j = statFs.getBlockSizeLong() * statFs.getAvailableBlocksLong();\n } else {\n j = ((long) statFs.getBlockSize()) * ((long) statFs.getAvailableBlocks());\n }\n return (j / 1024) / 1024;\n }", "long getMemory();", "long getMemory();", "void mo119582b();", "long size();", "long size();", "long size();", "long size();", "void m8368b();", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "byte[] mo12209b(int i);", "void mo57278c();", "public void mo21786K() {\n }", "short getCopies();", "public static void main(String[] args) {\n DGIM[] dgim = new DGIM[5];\n //从0到4分别代表2^4到2^0的位\n for (int i = 0; i < 5; i++) {\n dgim[i] = new DGIM(1000);\n }\n try (BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(\"cmsc5741_stream_data2.txt\")));) {\n while (true) {\n boolean isEnd = false;\n StringBuilder builder = new StringBuilder();\n int c1 = reader.read();\n builder.append((char) c1);\n while (true) {\n int c2 = reader.read();\n if ((char) c2 == ' ') {\n break;\n }\n if (c2 == -1) {\n isEnd = true;\n break;\n }\n builder.append((char) c2);\n }\n if (isEnd) {\n break;\n }\n char[] binary = Integer.toBinaryString(Integer.parseInt(builder.toString())).toCharArray();\n //寻找开始的位\n int start = 5 - binary.length;\n DGIM.number++;\n for (int i = 0; i < binary.length; i++) {\n if (binary[i] == '1') {\n dgim[start].add();\n }\n start++;\n }\n }\n Iterator<Bucket> iterator_16 = dgim[0].getQueue().iterator();\n Iterator<Bucket> iterator_8 = dgim[1].getQueue().iterator();\n Iterator<Bucket> iterator_4 = dgim[2].getQueue().iterator();\n Iterator<Bucket> iterator_2 = dgim[3].getQueue().iterator();\n Iterator<Bucket> iterator_1 = dgim[4].getQueue().iterator();\n\n\n while(iterator_16.hasNext()){\n System.out.println(\"Buckets for 16 :\"+iterator_16.next());\n }\n System.out.println(\"There are \"+dgim[0].getContent()+\" count of 16\");\n while(iterator_8.hasNext()){\n System.out.println(\"Buckets for 8 :\"+iterator_8.next());\n }\n System.out.println(\"There are \"+dgim[1].getContent()+\" count of 8\");\n while(iterator_4.hasNext()){\n System.out.println(\"Buckets for 4 :\"+iterator_4.next());\n }\n System.out.println(\"There are \"+dgim[2].getContent()+\" count of 4\");\n while(iterator_2.hasNext()){\n System.out.println(\"Buckets for 2 :\"+iterator_2.next());\n }\n System.out.println(\"There are \"+dgim[3].getContent()+\" count 2\");\n\n while(iterator_1.hasNext()){\n System.out.println(\"Buckets for 1 :\"+iterator_1.next());\n }\n System.out.println(\"There are \"+dgim[4].getContent()+\" times 1\");\n\n int result = (dgim[0].getContent()*16 + dgim[1].getContent()*8\n + dgim[2].getContent()*4 + dgim[3].getContent()*2 + dgim[4].getContent())/1000;\n System.out.println(\"The average price: \"+result);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "public abstract long mo20901UQ();", "@Override\n public int getCacheSize() {\n return 4 + 20 * (4 + 4 + 8);\n }", "static int size_of_ani(String passed){\n\t\treturn 2;\n\t}", "public int GetSize() \n\t{\n\t\treturn numEntries; //dummy return so file would compile\n\t}", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "private static byte[] m2536b(Context context) {\n byte[] c = StatisticsManager.m2537c(context);\n byte[] e = StatisticsManager.m2539e(context);\n byte[] bArr = new byte[(c.length + e.length)];\n System.arraycopy(c, 0, bArr, 0, c.length);\n System.arraycopy(e, 0, bArr, c.length, e.length);\n return StatisticsManager.m2534a(context, bArr);\n }" ]
[ "0.61241096", "0.6100889", "0.5777276", "0.5730346", "0.571137", "0.57110196", "0.5689911", "0.55810624", "0.5580607", "0.55334353", "0.55247504", "0.5519012", "0.5490121", "0.548662", "0.5480916", "0.5476107", "0.545837", "0.5436514", "0.54351306", "0.5426581", "0.5408991", "0.54062915", "0.54002094", "0.53844017", "0.5379007", "0.53728974", "0.5366702", "0.5349633", "0.5349633", "0.53479236", "0.5300015", "0.52965647", "0.52912164", "0.5276518", "0.5272135", "0.5252179", "0.52521515", "0.52492493", "0.5228177", "0.52269256", "0.5207753", "0.5207365", "0.5204535", "0.52032894", "0.52031446", "0.5202057", "0.5195508", "0.5195016", "0.5193759", "0.5181442", "0.5179215", "0.51786476", "0.5167769", "0.5166922", "0.5166922", "0.5162365", "0.51566124", "0.5155699", "0.5153749", "0.5153637", "0.51503134", "0.5149357", "0.51461774", "0.51449674", "0.513858", "0.5134758", "0.51331645", "0.5133145", "0.5132615", "0.51300323", "0.51300323", "0.51280695", "0.51272094", "0.51272094", "0.51272094", "0.51272094", "0.5126342", "0.5125688", "0.5125688", "0.5125688", "0.5125688", "0.5125688", "0.5125688", "0.5125688", "0.5125688", "0.5125688", "0.5125688", "0.5125688", "0.5125688", "0.5125688", "0.5122437", "0.5115945", "0.51147866", "0.51125276", "0.51112556", "0.51110744", "0.51086444", "0.51079595", "0.5106371", "0.51047325", "0.510246" ]
0.0
-1
6 ms 114.8 MB
public static boolean isMonotonic1(int[] nums) { boolean increase = true, decrease = true; for (int i = 0; i < nums.length - 1; i++) { if (nums[i] > nums[i + 1]) increase = false; if (nums[i] < nums[i + 1]) decrease = false; } return increase || decrease; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static byte[] m2539e(Context context) {\n Throwable th;\n int i = 0;\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n byte[] bArr = new byte[0];\n String a = Log.m2547a(context, Log.f1857e);\n DiskLruCache diskLruCache = null;\n try {\n diskLruCache = DiskLruCache.m2767a(new File(a), 1, 1, 10240);\n File file = new File(a);\n if (file != null && file.exists()) {\n String[] list = file.list();\n int length = list.length;\n while (i < length) {\n String str = list[i];\n if (str.contains(\".0\")) {\n byteArrayOutputStream.write(StatisticsManager.m2535a(diskLruCache, str.split(\"\\\\.\")[0]));\n }\n i++;\n }\n }\n bArr = byteArrayOutputStream.toByteArray();\n if (byteArrayOutputStream != null) {\n try {\n byteArrayOutputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n if (diskLruCache != null) {\n try {\n diskLruCache.close();\n } catch (Throwable th2) {\n th = th2;\n }\n }\n } catch (IOException th3) {\n BasicLogHandler.m2542a(th3, \"StatisticsManager\", \"getContent\");\n if (byteArrayOutputStream != null) {\n try {\n byteArrayOutputStream.close();\n } catch (IOException e2) {\n e2.printStackTrace();\n }\n }\n if (diskLruCache != null) {\n diskLruCache.close();\n }\n } catch (Throwable th4) {\n th3 = th4;\n }\n return bArr;\n th3.printStackTrace();\n return bArr;\n }", "public long estimateSize() {\n/* 1448 */ return this.est;\n/* */ }", "public abstract long mo9746k();", "long memoryUsed();", "long getSize();", "public long estimateSize() {\n/* 1668 */ return this.est;\n/* */ }", "static long m61428a(File file) {\n long j;\n try {\n StatFs statFs = new StatFs(file.getAbsolutePath());\n j = (((long) statFs.getBlockCount()) * ((long) statFs.getBlockSize())) / 50;\n } catch (IllegalArgumentException unused) {\n j = 5242880;\n }\n return Math.max(Math.min(j, 52428800), 5242880);\n }", "public long estimateSize() {\n/* 1558 */ return this.est;\n/* */ }", "public long estimateSize() {\n/* 1338 */ return this.est;\n/* */ }", "int memSize() {\n return super.memSize() + 4 * 4; }", "@Override\n public int getCacheSize() {\n return 4 + 20 * 88;\n }", "private void m128168k() {\n C42962b.f111525a.mo104671a(\"upload_page_duration\", C22984d.m75611a().mo59971a(\"first_selection_duration\", System.currentTimeMillis() - this.f104209S).mo59971a(\"page_stay_duration\", System.currentTimeMillis() - this.f104208R).f60753a);\n }", "public static long m136429b() {\n StatFs statFs;\n try {\n statFs = new StatFs(Environment.getExternalStorageDirectory().getPath());\n } catch (IllegalArgumentException unused) {\n statFs = null;\n }\n long j = 0;\n if (statFs != null) {\n if (VERSION.SDK_INT >= 18) {\n j = statFs.getBlockSizeLong() * statFs.getBlockCountLong();\n } else {\n j = ((long) statFs.getBlockSize()) * ((long) statFs.getBlockCount());\n }\n }\n return (j / 1024) / 1024;\n }", "int getCacheSizeInMiB();", "long sizeInBytes() throws IOException;", "public static void main(String[] args) throws IOException {\n BufferedReader bufferedReader = new BufferedReader(new FileReader(UFTest.class.getResource(\"/\").getPath()+\"1.5/largeUF.txt\"));\n String str = bufferedReader.readLine();\n UFLJWQU uf = new UFLJWQU(Integer.parseInt(str));\n long beginTime =System.currentTimeMillis();\n while ((str = bufferedReader.readLine())!=null){\n String[] array = str.split(\" \");\n int p = Integer.parseInt(array[0]);\n int q = Integer.parseInt(array[1]);\n if(uf.connected(p,q)) continue;\n uf.union(p,q);\n// System.out.println(p+\" -- \"+q);\n }\n System.out.println(uf.count());\n System.out.println(\"cost time :\"+(System.currentTimeMillis() - beginTime));\n }", "@Override\n public int estimateSize() {\n return 8 + 8 + 1 + 32 + 64;\n }", "private long size() {\n\t\treturn 0;\n\t}", "long storageSize();", "@Override\n public int getCacheSize() {\n return 4 + 20 * (4 + 4 + 8);\n }", "@Override\r\n public long problem1(int size) {\r\n StringBuilder sb = new StringBuilder();\r\n long start = System.currentTimeMillis();\r\n for (int i=0; i<size; i++) {\r\n sb.append(i);\r\n }\r\n long end = System.currentTimeMillis();\r\n return end - start;\r\n }", "Long diskSizeBytes();", "public byte[] mo3891a() {\n int i;\n int i2;\n int i3;\n int i4;\n int i5;\n int i6;\n int i7;\n int i8;\n int i9;\n int i10;\n int i11;\n int i12;\n int i13;\n int i14;\n int i15;\n int i16;\n int i17;\n int i18;\n byte[] b;\n int i19;\n int length;\n mo3892b();\n int i20 = 3072;\n if (this.f687G != null) {\n i20 = 3072 + this.f687G.length + 1;\n }\n byte[] bArr = new byte[i20];\n bArr[0] = Byte.parseByte(this.f688a);\n byte[] b2 = C0331cr.m1177b(this.f689b);\n System.arraycopy(b2, 0, bArr, 1, b2.length);\n int length2 = b2.length + 1;\n try {\n byte[] bytes = this.f690c.getBytes(\"GBK\");\n bArr[length2] = (byte) bytes.length;\n length2++;\n System.arraycopy(bytes, 0, bArr, length2, bytes.length);\n i = length2 + bytes.length;\n } catch (Throwable th) {\n C0310c.m956a(th, \"Req\", \"buildV4Dot2\");\n bArr[length2] = 0;\n i = length2 + 1;\n }\n try {\n byte[] bytes2 = this.f691d.getBytes(\"GBK\");\n bArr[i] = (byte) bytes2.length;\n i++;\n System.arraycopy(bytes2, 0, bArr, i, bytes2.length);\n i2 = i + bytes2.length;\n } catch (Throwable th2) {\n C0310c.m956a(th2, \"Req\", \"buildV4Dot21\");\n bArr[i] = 0;\n i2 = i + 1;\n }\n try {\n byte[] bytes3 = this.f702o.getBytes(\"GBK\");\n bArr[i2] = (byte) bytes3.length;\n i2++;\n System.arraycopy(bytes3, 0, bArr, i2, bytes3.length);\n i3 = i2 + bytes3.length;\n } catch (Throwable th3) {\n C0310c.m956a(th3, \"Req\", \"buildV4Dot22\");\n bArr[i2] = 0;\n i3 = i2 + 1;\n }\n try {\n byte[] bytes4 = this.f692e.getBytes(\"GBK\");\n bArr[i3] = (byte) bytes4.length;\n i3++;\n System.arraycopy(bytes4, 0, bArr, i3, bytes4.length);\n i4 = i3 + bytes4.length;\n } catch (Throwable th4) {\n C0310c.m956a(th4, \"Req\", \"buildV4Dot23\");\n bArr[i3] = 0;\n i4 = i3 + 1;\n }\n try {\n byte[] bytes5 = this.f693f.getBytes(\"GBK\");\n bArr[i4] = (byte) bytes5.length;\n i4++;\n System.arraycopy(bytes5, 0, bArr, i4, bytes5.length);\n i5 = i4 + bytes5.length;\n } catch (Throwable th5) {\n C0310c.m956a(th5, \"Req\", \"buildV4Dot24\");\n bArr[i4] = 0;\n i5 = i4 + 1;\n }\n try {\n byte[] bytes6 = this.f694g.getBytes(\"GBK\");\n bArr[i5] = (byte) bytes6.length;\n i5++;\n System.arraycopy(bytes6, 0, bArr, i5, bytes6.length);\n i6 = i5 + bytes6.length;\n } catch (Throwable th6) {\n C0310c.m956a(th6, \"Req\", \"buildV4Dot25\");\n bArr[i5] = 0;\n i6 = i5 + 1;\n }\n try {\n byte[] bytes7 = this.f708u.getBytes(\"GBK\");\n bArr[i6] = (byte) bytes7.length;\n i6++;\n System.arraycopy(bytes7, 0, bArr, i6, bytes7.length);\n i7 = i6 + bytes7.length;\n } catch (Throwable th7) {\n C0310c.m956a(th7, \"Req\", \"buildV4Dot26\");\n bArr[i6] = 0;\n i7 = i6 + 1;\n }\n try {\n byte[] bytes8 = this.f695h.getBytes(\"GBK\");\n bArr[i7] = (byte) bytes8.length;\n i7++;\n System.arraycopy(bytes8, 0, bArr, i7, bytes8.length);\n i8 = i7 + bytes8.length;\n } catch (Throwable th8) {\n C0310c.m956a(th8, \"Req\", \"buildV4Dot27\");\n bArr[i7] = 0;\n i8 = i7 + 1;\n }\n try {\n byte[] bytes9 = this.f703p.getBytes(\"GBK\");\n bArr[i8] = (byte) bytes9.length;\n i8++;\n System.arraycopy(bytes9, 0, bArr, i8, bytes9.length);\n i9 = i8 + bytes9.length;\n } catch (Throwable th9) {\n C0310c.m956a(th9, \"Req\", \"buildV4Dot28\");\n bArr[i8] = 0;\n i9 = i8 + 1;\n }\n try {\n byte[] bytes10 = this.f704q.getBytes(\"GBK\");\n bArr[i9] = (byte) bytes10.length;\n i9++;\n System.arraycopy(bytes10, 0, bArr, i9, bytes10.length);\n i10 = i9 + bytes10.length;\n } catch (Throwable th10) {\n C0310c.m956a(th10, \"Req\", \"buildV4Dot29\");\n bArr[i9] = 0;\n i10 = i9 + 1;\n }\n try {\n if (TextUtils.isEmpty(this.f707t)) {\n bArr[i10] = 0;\n length = i10 + 1;\n } else {\n byte[] b3 = m1034b(this.f707t);\n bArr[i10] = (byte) b3.length;\n int i21 = i10 + 1;\n System.arraycopy(b3, 0, bArr, i21, b3.length);\n length = b3.length + i21;\n }\n i11 = length;\n } catch (Throwable th11) {\n C0310c.m956a(th11, \"Req\", \"buildV4Dot219\");\n bArr[i10] = 0;\n i11 = i10 + 1;\n }\n try {\n byte[] bytes11 = this.f709v.getBytes(\"GBK\");\n bArr[i11] = (byte) bytes11.length;\n i11++;\n System.arraycopy(bytes11, 0, bArr, i11, bytes11.length);\n i12 = i11 + bytes11.length;\n } catch (Throwable th12) {\n C0310c.m956a(th12, \"Req\", \"buildV4Dot211\");\n bArr[i11] = 0;\n i12 = i11 + 1;\n }\n try {\n byte[] bytes12 = this.f710w.getBytes(\"GBK\");\n bArr[i12] = (byte) bytes12.length;\n i12++;\n System.arraycopy(bytes12, 0, bArr, i12, bytes12.length);\n i13 = i12 + bytes12.length;\n } catch (Throwable th13) {\n C0310c.m956a(th13, \"Req\", \"buildV4Dot212\");\n bArr[i12] = 0;\n i13 = i12 + 1;\n }\n try {\n byte[] bytes13 = this.f711x.getBytes(\"GBK\");\n bArr[i13] = (byte) bytes13.length;\n i13++;\n System.arraycopy(bytes13, 0, bArr, i13, bytes13.length);\n i14 = bytes13.length + i13;\n } catch (Throwable th14) {\n C0310c.m956a(th14, \"Req\", \"buildV4Dot213\");\n bArr[i13] = 0;\n i14 = i13 + 1;\n }\n bArr[i14] = Byte.parseByte(this.f712y);\n int i22 = i14 + 1;\n bArr[i22] = Byte.parseByte(this.f697j);\n int i23 = i22 + 1;\n bArr[i23] = Byte.parseByte(this.f713z);\n int i24 = i23 + 1;\n if (this.f713z.equals(\"1\")) {\n byte[] d = C0331cr.m1187d(mo3890a(\"mcc\"));\n System.arraycopy(d, 0, bArr, i24, d.length);\n int length3 = i24 + d.length;\n byte[] d2 = C0331cr.m1187d(mo3890a(\"mnc\"));\n System.arraycopy(d2, 0, bArr, length3, d2.length);\n int length4 = length3 + d2.length;\n byte[] d3 = C0331cr.m1187d(mo3890a(\"lac\"));\n System.arraycopy(d3, 0, bArr, length4, d3.length);\n int length5 = length4 + d3.length;\n byte[] e = C0331cr.m1190e(mo3890a(\"cellid\"));\n System.arraycopy(e, 0, bArr, length5, e.length);\n int length6 = e.length + length5;\n int parseInt = Integer.parseInt(mo3890a(\"signal\"));\n if (parseInt > 127) {\n parseInt = 0;\n }\n bArr[length6] = (byte) parseInt;\n int i25 = length6 + 1;\n if (this.f682B.length() == 0) {\n bArr[i25] = 0;\n i24 = i25 + 1;\n } else {\n int length7 = this.f682B.split(\"\\\\*\").length;\n bArr[i25] = (byte) length7;\n i24 = i25 + 1;\n int i26 = 0;\n while (i26 < length7) {\n byte[] d4 = C0331cr.m1187d(m1032a(\"lac\", i26));\n System.arraycopy(d4, 0, bArr, i24, d4.length);\n int length8 = i24 + d4.length;\n byte[] e2 = C0331cr.m1190e(m1032a(\"cellid\", i26));\n System.arraycopy(e2, 0, bArr, length8, e2.length);\n int length9 = e2.length + length8;\n int parseInt2 = Integer.parseInt(m1032a(\"signal\", i26));\n if (parseInt2 > 127) {\n parseInt2 = 0;\n }\n bArr[length9] = (byte) parseInt2;\n i26++;\n i24 = length9 + 1;\n }\n }\n } else if (this.f713z.equals(\"2\")) {\n byte[] d5 = C0331cr.m1187d(mo3890a(\"mcc\"));\n System.arraycopy(d5, 0, bArr, i24, d5.length);\n int length10 = i24 + d5.length;\n byte[] d6 = C0331cr.m1187d(mo3890a(\"sid\"));\n System.arraycopy(d6, 0, bArr, length10, d6.length);\n int length11 = length10 + d6.length;\n byte[] d7 = C0331cr.m1187d(mo3890a(\"nid\"));\n System.arraycopy(d7, 0, bArr, length11, d7.length);\n int length12 = length11 + d7.length;\n byte[] d8 = C0331cr.m1187d(mo3890a(\"bid\"));\n System.arraycopy(d8, 0, bArr, length12, d8.length);\n int length13 = length12 + d8.length;\n byte[] e3 = C0331cr.m1190e(mo3890a(\"lon\"));\n System.arraycopy(e3, 0, bArr, length13, e3.length);\n int length14 = length13 + e3.length;\n byte[] e4 = C0331cr.m1190e(mo3890a(C1447g.f3485ae));\n System.arraycopy(e4, 0, bArr, length14, e4.length);\n int length15 = e4.length + length14;\n int parseInt3 = Integer.parseInt(mo3890a(\"signal\"));\n if (parseInt3 > 127) {\n parseInt3 = 0;\n }\n bArr[length15] = (byte) parseInt3;\n int i27 = length15 + 1;\n bArr[i27] = 0;\n i24 = i27 + 1;\n }\n if (this.f683C.length() == 0) {\n bArr[i24] = 0;\n i15 = i24 + 1;\n } else {\n bArr[i24] = 1;\n int i28 = i24 + 1;\n try {\n String[] split = this.f683C.split(MiPushClient.ACCEPT_TIME_SEPARATOR);\n byte[] b4 = m1034b(split[0]);\n System.arraycopy(b4, 0, bArr, i28, b4.length);\n int length16 = i28 + b4.length;\n try {\n byte[] bytes14 = split[2].getBytes(\"GBK\");\n bArr[length16] = (byte) bytes14.length;\n length16++;\n System.arraycopy(bytes14, 0, bArr, length16, bytes14.length);\n i16 = length16 + bytes14.length;\n } catch (Throwable th15) {\n C0310c.m956a(th15, \"Req\", \"buildV4Dot214\");\n bArr[length16] = 0;\n i16 = length16 + 1;\n }\n int parseInt4 = Integer.parseInt(split[1]);\n if (parseInt4 > 127) {\n parseInt4 = 0;\n }\n bArr[i16] = Byte.parseByte(String.valueOf(parseInt4));\n i15 = i16 + 1;\n } catch (Throwable th16) {\n C0310c.m956a(th16, \"Req\", \"buildV4Dot216\");\n byte[] b5 = m1034b(\"00:00:00:00:00:00\");\n System.arraycopy(b5, 0, bArr, i28, b5.length);\n int length17 = b5.length + i28;\n bArr[length17] = 0;\n int i29 = length17 + 1;\n bArr[i29] = Byte.parseByte(\"0\");\n i15 = i29 + 1;\n }\n }\n String[] split2 = this.f684D.split(\"\\\\*\");\n if (TextUtils.isEmpty(this.f684D) || split2.length == 0) {\n bArr[i15] = 0;\n i17 = i15 + 1;\n } else {\n bArr[i15] = (byte) split2.length;\n int i30 = i15 + 1;\n for (String str : split2) {\n String[] split3 = str.split(MiPushClient.ACCEPT_TIME_SEPARATOR);\n try {\n b = m1034b(split3[0]);\n } catch (Throwable th17) {\n C0310c.m956a(th17, \"Req\", \"buildV4Dot2110\");\n b = m1034b(\"00:00:00:00:00:00\");\n }\n System.arraycopy(b, 0, bArr, i30, b.length);\n int length18 = i30 + b.length;\n try {\n byte[] bytes15 = split3[2].getBytes(\"GBK\");\n bArr[length18] = (byte) bytes15.length;\n length18++;\n System.arraycopy(bytes15, 0, bArr, length18, bytes15.length);\n i19 = bytes15.length + length18;\n } catch (Throwable th18) {\n C0310c.m956a(th18, \"Req\", \"buildV4Dot217\");\n bArr[length18] = 0;\n i19 = length18 + 1;\n }\n int parseInt5 = Integer.parseInt(split3[1]);\n if (parseInt5 > 127) {\n parseInt5 = 0;\n }\n bArr[i19] = Byte.parseByte(String.valueOf(parseInt5));\n i30 = i19 + 1;\n }\n byte[] b6 = C0331cr.m1177b(Integer.parseInt(this.f685E));\n System.arraycopy(b6, 0, bArr, i30, b6.length);\n i17 = i30 + b6.length;\n }\n try {\n byte[] bytes16 = this.f686F.getBytes(\"GBK\");\n if (bytes16.length > 127) {\n bytes16 = null;\n }\n if (bytes16 == null) {\n bArr[i17] = 0;\n i18 = i17 + 1;\n } else {\n bArr[i17] = (byte) bytes16.length;\n int i31 = i17 + 1;\n System.arraycopy(bytes16, 0, bArr, i31, bytes16.length);\n i18 = bytes16.length + i31;\n }\n } catch (Throwable th19) {\n C0310c.m956a(th19, \"Req\", \"buildV4Dot218\");\n bArr[i17] = 0;\n i18 = i17 + 1;\n }\n int length19 = this.f687G != null ? this.f687G.length : 0;\n byte[] b7 = C0331cr.m1177b(length19);\n System.arraycopy(b7, 0, bArr, i18, b7.length);\n int length20 = i18 + b7.length;\n if (length19 > 0) {\n System.arraycopy(this.f687G, 0, bArr, length20, this.f687G.length);\n length20 += this.f687G.length;\n }\n byte[] bArr2 = new byte[length20];\n System.arraycopy(bArr, 0, bArr2, 0, length20);\n CRC32 crc32 = new CRC32();\n crc32.update(bArr2);\n byte[] a = C0331cr.m1167a(crc32.getValue());\n byte[] bArr3 = new byte[(a.length + length20)];\n System.arraycopy(bArr2, 0, bArr3, 0, length20);\n System.arraycopy(a, 0, bArr3, length20, a.length);\n int length21 = length20 + a.length;\n m1033a(bArr3, 0);\n return bArr3;\n }", "long memoryUnused();", "public static long getAllSize1(){\n\t\tFile path = Environment.getExternalStorageDirectory(); \n\t\t\n\t\tlong size = 0;\n\t\tStatFs stat = new StatFs(path.getPath()); \n\t\tlong blockSize = stat.getBlockSize(); \n\t\tlong availableBlocks = stat.getBlockCount();\n\t\tsize = availableBlocks * blockSize; \n\t\treturn size;\n\t}", "@Test(timeout = 4000)\n public void test22() throws Throwable {\n LinkedList<byte[][]> linkedList0 = new LinkedList<byte[][]>();\n XSQLVAR[] xSQLVARArray0 = new XSQLVAR[0];\n FBResultSet fBResultSet0 = new FBResultSet(xSQLVARArray0, linkedList0);\n byte[][] byteArray0 = new byte[7][0];\n byte[] byteArray1 = new byte[7];\n byteArray1[0] = (byte) (-111);\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"!3eO>|kx{3s''g6%=\");\n byteArray1[1] = (byte) (-109);\n byteArray1[2] = (byte)31;\n linkedList0.add((byte[][]) null);\n linkedList0.add(byteArray0);\n FBCachedFetcher fBCachedFetcher0 = new FBCachedFetcher(linkedList0, fBResultSet0);\n fBCachedFetcher0.next();\n fBCachedFetcher0.deleteRow();\n assertTrue(fBCachedFetcher0.isLast());\n }", "public static long m136421a() {\n StatFs statFs;\n long j;\n try {\n statFs = new StatFs(Environment.getExternalStorageDirectory().getAbsolutePath());\n } catch (IllegalArgumentException unused) {\n statFs = null;\n }\n if (statFs == null) {\n j = 0;\n } else if (VERSION.SDK_INT >= 18) {\n j = statFs.getBlockSizeLong() * statFs.getAvailableBlocksLong();\n } else {\n j = ((long) statFs.getBlockSize()) * ((long) statFs.getAvailableBlocks());\n }\n return (j / 1024) / 1024;\n }", "static int m61449a(Bitmap bitmap) {\n return bitmap.getByteCount();\n }", "@Override\n public int getCacheSize() {\n return 4 * 1024 * 1024;\n }", "@SuppressWarnings(\"PMD\") // this will end up in unit tests soon\n\tpublic static void main(String[] args) throws IOException\n\t{\n\t\t/*\n\t\tbyte[] data = new byte[1024 * 1024];\n\t\tfor(int i = 0; i < data.length; i++)\n\t\t{\n\t\t\tdata[i] = (byte) i;\n\t\t}\n\t\t*/\n\t\t//byte[] data = DataUtils.randomData(1024 * 1024);\n\t\t//ByteArrayInputStream in = new ByteArrayInputStream(data);\n\t\tFile oldFile = new File(\"../test-4mb-old.dat\"); // also test.dat - 1 GB\n\t\tFile newFile = new File(\"../test-4mb-new.dat\");\n\t\t\n\t\tFileInputStream in = new FileInputStream(oldFile);\n\t\tObjectArrayList<Block> blocks = calculateBlocks(in, 1024);\n\t\tin.close();\n\t\t\n\t\tin = new FileInputStream(newFile);\n\t\t//in.reset();\n\t\tlong start = System.currentTimeMillis();\n\t\tcalculateDifferences(blocks, 1024, in, new NullDifferenceListener());\n\t\tlong end = System.currentTimeMillis();\n\t\tin.close();\n\t\t\n\t\tlong millis = end - start;\n\t\tdouble seconds = millis / 1000.0;\n\t\tdouble millisPer = millis / (double) (1024*1024*1024);\n\t\tdouble secondsPer = millisPer / 1000.0;\n\t\tSystem.out.printf(\"Completed in %.4f seconds (%d milliseconds) - average %f seconds (%f milliseconds) per byte%n\", seconds, millis, secondsPer, millisPer);\n\t}", "long getWorkfileSize();", "private static long m133353n() {\n C41940c c = C35574k.m114859a().mo70094i().mo102932c();\n String str = C39811er.f103468d;\n C7573i.m23582a((Object) str, \"ShortVideoConfig2.sDir\");\n File a = c.mo102928a(str);\n long j = 0;\n if (a.exists() && a.isDirectory()) {\n Set a2 = C41911c.m133283a();\n File[] listFiles = a.listFiles();\n C7573i.m23582a((Object) listFiles, \"filesRoot.listFiles()\");\n Iterable c2 = C7519g.m23444c((T[]) listFiles);\n Collection arrayList = new ArrayList();\n Iterator it = c2.iterator();\n while (true) {\n boolean z = false;\n if (!it.hasNext()) {\n break;\n }\n Object next = it.next();\n File file = (File) next;\n if (file.exists() && file.isFile()) {\n z = true;\n }\n if (z) {\n arrayList.add(next);\n }\n }\n for (File file2 : (List) arrayList) {\n String name = file2.getName();\n C7573i.m23582a((Object) name, \"undeleted.name\");\n if (!C7634n.m23721b(name, \"synthetise_\", false)) {\n String name2 = file2.getName();\n C7573i.m23582a((Object) name2, \"undeleted.name\");\n if (!C7634n.m23723c(name2, \"-concat-v\", false)) {\n String name3 = file2.getName();\n C7573i.m23582a((Object) name3, \"undeleted.name\");\n if (!C7634n.m23723c(name3, \"-concat-a\", false)) {\n }\n }\n Iterator it2 = a2.iterator();\n int i = 0;\n while (true) {\n if (!it2.hasNext()) {\n i = -1;\n break;\n }\n Object next2 = it2.next();\n if (i < 0) {\n C7525m.m23465b();\n }\n String str2 = (String) next2;\n String path = file2.getPath();\n C7573i.m23582a((Object) path, \"undeleted.path\");\n if (C7634n.m23721b(path, str2, false)) {\n break;\n }\n i++;\n }\n if (-1 == i) {\n j += file2.length();\n }\n }\n }\n }\n return j;\n }", "public static String m576f() {\r\n long j = 0;\r\n try {\r\n StatFs statFs = new StatFs(Environment.getDataDirectory().getPath());\r\n j = ((long) statFs.getBlockCount()) * ((long) statFs.getBlockSize());\r\n } catch (Exception e) {\r\n }\r\n return String.valueOf(j);\r\n }", "long getSize() throws IOException;", "public int GetSize() \n\t{\n\t\treturn numEntries; //dummy return so file would compile\n\t}", "private int bytesToGibibytes(long a){\n\t\tlong gibibytes = a >> (30);\n\t\t//If storageGigs isn't an integer number, round it up \n\t\tif(gibibytes << 30 < a) {\n\t\t\tgibibytes ++;\n\t\t}\n\t\treturn (int) gibibytes;\n\t}", "@Override\r\n protected Double doInBackground(Void... params) {\n try {\r\n double size1 = FileSizeUtil.getFileOrFilesSize(MyString.maps_cache_google_img_folder_path, FileSizeUtil.SIZETYPE_MB);\r\n double size2 = FileSizeUtil.getFileOrFilesSize(MyString.maps_cache_google_img_anno_folder_path, FileSizeUtil.SIZETYPE_MB);\r\n double storage = size1 + size2;\r\n //存入数据\r\n MySharedPreferences.putOfflineTileSize(storage);\r\n return storage;\r\n } catch (Exception e) {\r\n return 0.0;\r\n }\r\n }", "public long getDbsize()\n/* */ {\n/* 79 */ return this.dbsize;\n/* */ }", "public final long mo28817a(zzjq zzjq) throws IOException {\n zzjq zzjq2;\n Long l;\n zzjq zzjq3 = zzjq;\n String str = \"ms\";\n String str2 = \"Cache connection took \";\n if (!this.f25218b) {\n this.f25218b = true;\n zzvv a = zzvv.m31316a(zzjq3.f28690a);\n if (!((Boolean) zzyt.m31536e().mo29599a(zzacu.f24194wd)).booleanValue()) {\n zzvs zzvs = null;\n if (a != null) {\n a.f29558h = zzjq3.f28692c;\n zzvs = zzk.zzlm().mo32314a(a);\n }\n if (zzvs != null && zzvs.mo32317a()) {\n this.f25217a = zzvs.mo32318c();\n return -1;\n }\n } else if (a != null) {\n a.f29558h = zzjq3.f28692c;\n if (a.f29557g) {\n l = (Long) zzyt.m31536e().mo29599a(zzacu.f24206yd);\n } else {\n l = (Long) zzyt.m31536e().mo29599a(zzacu.f24200xd);\n }\n long longValue = l.longValue();\n long a2 = zzk.zzln().mo27934a();\n zzk.zzma();\n Future a3 = zzwi.m31330a(this.f25219c, a);\n try {\n this.f25217a = (InputStream) a3.get(longValue, TimeUnit.MILLISECONDS);\n long a4 = zzk.zzln().mo27934a() - a2;\n zzbei zzbei = (zzbei) this.f25221e.get();\n if (zzbei != null) {\n zzbei.mo28180a(true, a4);\n }\n StringBuilder sb = new StringBuilder(44);\n sb.append(str2);\n sb.append(a4);\n sb.append(str);\n zzawz.m26003f(sb.toString());\n return -1;\n } catch (ExecutionException | TimeoutException e) {\n a3.cancel(true);\n long a5 = zzk.zzln().mo27934a() - a2;\n zzbei zzbei2 = (zzbei) this.f25221e.get();\n if (zzbei2 != null) {\n zzbei2.mo28180a(false, a5);\n }\n StringBuilder sb2 = new StringBuilder(44);\n sb2.append(str2);\n sb2.append(a5);\n sb2.append(str);\n zzawz.m26003f(sb2.toString());\n } catch (InterruptedException e2) {\n a3.cancel(true);\n Thread.currentThread().interrupt();\n long a6 = zzk.zzln().mo27934a() - a2;\n zzbei zzbei3 = (zzbei) this.f25221e.get();\n if (zzbei3 != null) {\n zzbei3.mo28180a(false, a6);\n }\n StringBuilder sb3 = new StringBuilder(44);\n sb3.append(str2);\n sb3.append(a6);\n sb3.append(str);\n zzawz.m26003f(sb3.toString());\n } catch (Throwable th) {\n long a7 = zzk.zzln().mo27934a() - a2;\n zzbei zzbei4 = (zzbei) this.f25221e.get();\n if (zzbei4 != null) {\n zzbei4.mo28180a(false, a7);\n }\n StringBuilder sb4 = new StringBuilder(44);\n sb4.append(str2);\n sb4.append(a7);\n sb4.append(str);\n zzawz.m26003f(sb4.toString());\n throw th;\n }\n }\n if (a != null) {\n zzjq2 = new zzjq(Uri.parse(a.f29551a), zzjq3.f28691b, zzjq3.f28692c, zzjq3.f28693d, zzjq3.f28694e, zzjq3.f28695f);\n } else {\n zzjq2 = zzjq3;\n }\n return this.f25220d.mo28817a(zzjq2);\n }\n throw new IOException(\"Attempt to open an already open CacheDataSource.\");\n }", "int totalWritten();", "@Override\r\n public long problem0(int size) {\r\n System.out.println(\"This is just an example, but please follow this template.\");\r\n String s = \"\";\r\n long start = System.currentTimeMillis();\r\n\r\n for (int i=0; i<size; i++) {\r\n s = s + i;\r\n }\r\n \r\n long end = System.currentTimeMillis();\r\n return end - start;\r\n }", "public void testPerformance() {\n \t}", "private void m145775e() {\n long j;\n String str;\n int i;\n if (!this.f119477j.mo115499a()) {\n if (this.f119484q != null) {\n str = \"PRAGMA cipher_page_size\";\n if (this.f119485r == null || this.f119485r.pageSize <= 0) {\n i = SQLiteGlobal.f119529a;\n } else {\n i = this.f119485r.pageSize;\n }\n j = (long) i;\n } else {\n str = \"PRAGMA page_size\";\n j = (long) SQLiteGlobal.f119529a;\n }\n if (mo115435b(str, null, null) != j) {\n StringBuilder sb = new StringBuilder();\n sb.append(str);\n sb.append(\"=\");\n sb.append(j);\n mo115433a(sb.toString(), null, null);\n }\n }\n }", "public abstract long mo9229aD();", "@Override\r\n public long problem2() {\r\n ArrayList<String> arrList = new ArrayList<>();\r\n long start = System.currentTimeMillis(); \r\n for(int i = 0; i<1234567; i++){\r\n arrList.add(Integer.toString(i));\r\n }\r\n long end = System.currentTimeMillis(); \r\n return end - start; \r\n }", "public abstract long mo13681c();", "int getSize ();", "long getLocalOnHeapSizeInBytes();", "private static void testLongLoop() {\n test(1000 * 1000 * 1000);\n //uncomment the following line to see the hand-written cache performance\n //testManual( 1000 * 1000 * 1000 );\n }", "private static void testLongLoop() {\n test(1000 * 1000 * 1000);\n //uncomment the following line to see the hand-written cache performance\n //testManual( 1000 * 1000 * 1000 );\n }", "@Override\n\tpublic int computeSize() {\n\t\treturn 36;\n\t}", "public int getSize(){return _size;}", "public static void main(String[] args) {\n\t\t\n\t\tint A[]= new int[100000000];\n\t\tfor(int i = 0; i < 100000000; i++) {\n\t\t A[i] = (int)(Math.random() * 100) + 1;\n }\n double duration = 0;\n long end = 0;\n long start = 0;\n start = System.currentTimeMillis();\n System.out.println(start);\n MinValueIndex(A, 6);\n end = System.currentTimeMillis();\n\t\tduration = end-start;\n\t\tSystem.out.println(end); \n\t\tduration = duration / 5;\n\t\tSystem.out.println(duration);\n\t}", "int getTotalSize();", "public long getSize();", "long getTotalFreeSpaceInBytes();", "long getTotalFreeSpaceInBytes();", "private long getTotal(String path) {\n StatFs statFs = new StatFs(path);\n\n if (Constants.BETA)\n Log.i(\"DeviceModel\", \"Free on \"+path+\"=\"+statFs.getBlockSize());\n return (isJellyBean)\n ? statFs.getBlockCountLong() * statFs.getBlockSizeLong()\n : (long)statFs.getBlockCount() * (long)statFs.getBlockSize();\n }", "public abstract long estimateMemorySize();", "private static byte[] m17790a(Bitmap bitmap) {\n int i;\n int i2;\n int i3;\n int width = bitmap.getWidth();\n int height = bitmap.getHeight();\n OutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n for (i = 0; i < 32; i++) {\n byteArrayOutputStream.write(0);\n }\n int[] iArr = new int[(width - 2)];\n bitmap.getPixels(iArr, 0, width, 1, 0, width - 2, 1);\n Object obj = iArr[0] == -16777216 ? 1 : null;\n Object obj2 = iArr[iArr.length + -1] == -16777216 ? 1 : null;\n int length = iArr.length;\n width = 0;\n int i4 = 0;\n for (i2 = 0; i2 < length; i2++) {\n if (width != iArr[i2]) {\n i4++;\n C5225r.m17788a(byteArrayOutputStream, i2);\n width = iArr[i2];\n }\n }\n if (obj2 != null) {\n i4++;\n C5225r.m17788a(byteArrayOutputStream, length);\n }\n int i5 = i4;\n int i6 = i5 + 1;\n if (obj != null) {\n i = i6 - 1;\n } else {\n i = i6;\n }\n if (obj2 != null) {\n i3 = i - 1;\n } else {\n i3 = i;\n }\n iArr = new int[(height - 2)];\n bitmap.getPixels(iArr, 0, 1, 0, 1, 1, height - 2);\n obj = iArr[0] == -16777216 ? 1 : null;\n obj2 = iArr[iArr.length + -1] == -16777216 ? 1 : null;\n length = iArr.length;\n width = 0;\n i4 = 0;\n for (i2 = 0; i2 < length; i2++) {\n if (width != iArr[i2]) {\n i4++;\n C5225r.m17788a(byteArrayOutputStream, i2);\n width = iArr[i2];\n }\n }\n if (obj2 != null) {\n i4++;\n C5225r.m17788a(byteArrayOutputStream, length);\n }\n i6 = i4 + 1;\n if (obj != null) {\n i = i6 - 1;\n } else {\n i = i6;\n }\n if (obj2 != null) {\n i--;\n }\n for (i6 = 0; i6 < i3 * i; i6++) {\n C5225r.m17788a(byteArrayOutputStream, 1);\n }\n byte[] toByteArray = byteArrayOutputStream.toByteArray();\n toByteArray[0] = (byte) 1;\n toByteArray[1] = (byte) i5;\n toByteArray[2] = (byte) i4;\n toByteArray[3] = (byte) (i * i3);\n C5225r.m17787a(bitmap, toByteArray);\n return toByteArray;\n }", "private void m9023a(int i) {\n int i2;\n Object obj = null;\n AppMethodBeat.m2504i(98679);\n try {\n BufferedInputStream bufferedInputStream = new BufferedInputStream(this.f1556t.getInputStream());\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n byte[] bArr = new byte[4096];\n i2 = 0;\n do {\n try {\n int read = bufferedInputStream.read(bArr);\n if (read == -1) {\n int obj2 = 1;\n break;\n } else {\n byteArrayOutputStream.write(bArr, 0, read);\n i2 += read;\n }\n } catch (Exception e) {\n AppMethodBeat.m2505o(98679);\n return;\n } catch (OutOfMemoryError e2) {\n }\n } while (i2 <= i);\n this.f1559w.f1540a = -303;\n this.f1559w.f1541b = \"no-content-length\";\n if (obj2 != null) {\n this.f1559w.f1543d = byteArrayOutputStream.toByteArray();\n this.f1549E.f1568f = SystemClock.elapsedRealtime();\n }\n byteArrayOutputStream.close();\n AppMethodBeat.m2505o(98679);\n return;\n } catch (OutOfMemoryError e3) {\n i2 = 0;\n } catch (Exception e4) {\n this.f1559w.f1540a = -287;\n this.f1559w.f1541b = \"read without content-length error\";\n AppMethodBeat.m2505o(98679);\n return;\n }\n this.f1559w.f1540a = -306;\n this.f1559w.f1541b = \"no-content-length:\".concat(String.valueOf(i2));\n AppMethodBeat.m2505o(98679);\n }", "public static int size_cost() {\n return (16 / 8);\n }", "public abstract long mo9743h();", "long getLocalOffHeapSizeInBytes();", "private static float tock(){\n\t\treturn (System.currentTimeMillis() - startTime);\n\t}", "public abstract long size() throws IOException;", "private double loadFactor()\n {\n double bucketsLength = buckets.length;\n return currentSize / bucketsLength;\n }", "protected int bytesPerAtom() {\n return (2);\n }", "protected int bytesPerAtom() {\n return (2);\n }", "long dbSize();", "private static long cpio(BufferedInputStream in, BufferedOutputStream out, String wt) throws IOException {\r\n\r\n\t\tbyte[] buffer = new byte[buffSize];\r\n\r\n\t\tint c;\r\n\t\tlong tot = 0;\r\n\t\tlong s = System.nanoTime();\r\n\t\twhile ((c = in.read(buffer, 0, buffer.length)) != -1) {\r\n\t\t\tout.write(buffer, 0, c);\r\n\t\t\ttot += c;\r\n\t\t}\r\n\r\n\t\tlong tim = System.nanoTime() - s;\r\n\t\tdouble dtim = tim == 0 ? 0.5 : tim; // avg of those less than 1 nanoseconds is taken as 0.5 nanoseconds\r\n\t\tdouble bps = tot * 1000 * 1000 / dtim;\r\n\t\tSystem.out.println(bps);\r\n\t\treturn tot;\r\n\t}", "@Override\n public long estimateSize() { return Long.MAX_VALUE; }", "long getFileSize();", "public long getTotalTime() {\n/* 73 */ return this.totalTime;\n/* */ }", "long getMemory();", "long getMemory();", "private String countFileSize(long length) {\n\n if (length < UNIT) {\n return length + \" B\";\n }\n int exp = (int) (Math.log(length) / Math.log(UNIT));\n String pre = \"KMGTPE\".charAt(exp - 1) + \"i\";\n\n return String.format(\"%.1f %sB\", length / Math.pow(UNIT, exp), pre);\n\n }", "@Override public long getSimulatedSize() {\n return 1;\n }", "public abstract long mo24409b();", "byte[] mo38566a();", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "public abstract long mo9755t();", "@Test(timeout = 4000)\n public void test52() throws Throwable {\n String string0 = EWrapperMsgGenerator.tickSize(6372, 3, 2146363568);\n assertEquals(\"id=6372 askSize=2146363568\", string0);\n }", "public static int size_infos_timestamp() {\n return (32 / 8);\n }", "private static long bytesToMega(long bytes) {\n return bytes / MEGABYTE;\n }", "@Override\npublic int getTotalSize() {\n\treturn 0;\n}", "public abstract long getSize();", "int memSize() {\r\n\t\treturn BASE_NODE_SIZE + 5 * 4;\r\n\t}", "public final long mo20953WW() {\n AppMethodBeat.m2504i(60318);\n if (fXT <= 0) {\n fXT = ((ActivityManager) C4996ah.getContext().getSystemService(\"activity\")).getLargeMemoryClass();\n }\n if (fXT >= 512) {\n AppMethodBeat.m2505o(60318);\n return 41943040;\n }\n AppMethodBeat.m2505o(60318);\n return 20971520;\n }" ]
[ "0.63969433", "0.6332025", "0.61424464", "0.60513026", "0.60473", "0.6043711", "0.6014679", "0.60102683", "0.5943639", "0.59301764", "0.59278226", "0.5851695", "0.5850987", "0.573731", "0.5729703", "0.57233465", "0.57048273", "0.5701943", "0.5672105", "0.56402177", "0.5634192", "0.56033", "0.55918217", "0.5583896", "0.5573187", "0.5559365", "0.5545099", "0.55437654", "0.5533638", "0.5527337", "0.55249983", "0.55168146", "0.5512661", "0.54943216", "0.5490598", "0.54802287", "0.54767877", "0.5476438", "0.54763055", "0.54755557", "0.5468599", "0.54598874", "0.545951", "0.5454325", "0.54451704", "0.5442759", "0.54408973", "0.5436891", "0.5430745", "0.5430745", "0.5417315", "0.5406411", "0.5396627", "0.5391589", "0.53900546", "0.5386931", "0.5386931", "0.53845143", "0.537921", "0.5379002", "0.5374109", "0.5366322", "0.53592104", "0.5352965", "0.5352751", "0.5348305", "0.5343517", "0.5342969", "0.5342969", "0.53359103", "0.53357375", "0.53329057", "0.5324272", "0.5323935", "0.5319075", "0.5319075", "0.53143775", "0.5307865", "0.53034884", "0.5302555", "0.53016734", "0.53016734", "0.53016734", "0.53016734", "0.53016734", "0.53016734", "0.53016734", "0.53016734", "0.53016734", "0.53016734", "0.53016734", "0.53016734", "0.53016734", "0.5296276", "0.5295239", "0.5294974", "0.5290489", "0.52839386", "0.52785045", "0.5274799", "0.52723986" ]
0.0
-1
TODO Autogenerated method stub
@Override public void load() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void persist() { }
{ "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
/ Debug purposes: display contents of Event
public String toString() { return this.getGeoEvent().toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic String toString() {\r\n\t\treturn this.event;\r\n\t}", "protected void printEvent(Event event) {\n System.out.println(\"\\t\" + event.getName());\n System.out.println(\"\\t\" + event.getDate().getDate());\n System.out.println(\"\\t\" + event.getTime().get12HTime());\n\n if (event.getDuration() != 0) {\n System.out.println(\"\\tFor \" + event.getDuration() + \" minutes\");\n }\n }", "private void listEvents() {\n System.out.println(\"\\nEvents:\");\n for (Event event: world.getEvents()) {\n String name = event.getName();\n String coords = \" with x = \" + event.getX() + \" light seconds and t = \" + event.getTime() + \" seconds \";\n String frame = \"in \" + event.getFrame().getName() + \".\";\n System.out.println(name + coords + frame);\n }\n }", "@Override\r\n\tpublic String toString() \r\n\t{\n\t\treturn \"I am in to String DrawEvent\";\r\n\t}", "private void dumpEvent(MotionEvent event) {\n String names[] = {\"DOWN\", \"UP\", \"MOVE\", \"CANCEL\", \"OUTSIDE\", \"POINTER_DOWN\", \"POINTER_UP\", \"7?\", \"8?\", \"9?\"};\n StringBuilder sb = new StringBuilder();\n int action = event.getAction();\n int actionCode = action & MotionEvent.ACTION_MASK;\n sb.append(\"event ACTION_\").append(names[actionCode]);\n\n if (actionCode == MotionEvent.ACTION_POINTER_DOWN || actionCode == MotionEvent.ACTION_POINTER_UP) {\n sb.append(\"(pid \").append(action >> MotionEvent.ACTION_POINTER_ID_SHIFT);\n sb.append(\")\");\n }\n\n sb.append(\"[\");\n for (int i = 0; i < event.getPointerCount(); i++) {\n sb.append(\"#\").append(i);\n sb.append(\"(pid \").append(event.getPointerId(i));\n sb.append(\")=\").append((int) event.getX(i));\n sb.append(\",\").append((int) event.getY(i));\n if (i + 1 < event.getPointerCount())\n sb.append(\";\");\n }\n\n\n\n }", "private void dumpEvent(MotionEvent event) {\n String names[] = {\"DOWN\", \"UP\", \"MOVE\", \"CANCEL\", \"OUTSIDE\", \"POINTER_DOWN\", \"POINTER_UP\", \"7?\", \"8?\", \"9?\"};\n StringBuilder sb = new StringBuilder();\n int action = event.getAction();\n int actionCode = action & MotionEvent.ACTION_MASK;\n sb.append(\"event ACTION_\").append(names[actionCode]);\n\n if (actionCode == MotionEvent.ACTION_POINTER_DOWN || actionCode == MotionEvent.ACTION_POINTER_UP) {\n sb.append(\"(pid \").append(action >> MotionEvent.ACTION_POINTER_ID_SHIFT);\n sb.append(\")\");\n }\n\n sb.append(\"[\");\n for (int i = 0; i < event.getPointerCount(); i++) {\n sb.append(\"#\").append(i);\n sb.append(\"(pid \").append(event.getPointerId(i));\n sb.append(\")=\").append((int) event.getX(i));\n sb.append(\",\").append((int) event.getY(i));\n if (i + 1 < event.getPointerCount())\n sb.append(\";\");\n }\n\n sb.append(\"]\");\n Log.d(\"Touch Events ---------\", sb.toString());\n }", "@Override\n public void printDetails() {\n super.printDetails(); // uses its superclass version of the method to print the basic attributes\n System.out.print(\"Time: \" + this.getTime()); // printing the time of the event\n }", "private void dumpEvent(MotionEvent event) {\n\t\tString names[] = { \"DOWN\", \"UP\", \"MOVE\", \"CANCEL\", \"OUTSIDE\", \"POINTER_DOWN\", \"POINTER_UP\",\n\t\t\t\t\"7?\", \"8?\", \"9?\" };\n\t\tStringBuilder sb = new StringBuilder();\n\t\tint action = event.getAction();\n\t\tint actionCode = action & MotionEvent.ACTION_MASK;\n\t\tsb.append(\"event ACTION_\").append(names[actionCode]);\n\t\tif (actionCode == MotionEvent.ACTION_POINTER_DOWN\n\t\t\t\t|| actionCode == MotionEvent.ACTION_POINTER_UP) {\n\t\t\tsb.append(\"(pid \").append(action >> MotionEvent.ACTION_POINTER_INDEX_SHIFT);\n\t\t\tsb.append(\")\");\n\t\t}\n\t\tsb.append(\"[\");\n\t\tfor (int i = 0; i < event.getPointerCount(); i++) {\n\t\t\tsb.append(\"#\").append(i);\n\t\t\tsb.append(\"(pid \").append(event.getPointerId(i));\n\t\t\tsb.append(\")=\").append((int) event.getX(i));\n\t\t\tsb.append(\",\").append((int) event.getY(i));\n\t\t\tif (i + 1 < event.getPointerCount())\n\t\t\t\tsb.append(\";\");\n\t\t}\n\t\tsb.append(\"]\");\n\t\tLog.d(TAG_DUMP, sb.toString());\n\t}", "public void Print_event_value(String v)\n {\n\n System.out.println(v + \": \" + event_value);\n }", "private void viewEvents() {\n ReferenceFrame frame = selectFrame(\"What frame would you like to view the events from?\");\n List<Event> transformedEvents = new ArrayList<>();\n for (Event event: world.getEvents()) {\n transformedEvents.add(event.lorentzTransform(frame));\n }\n for (Event event: transformedEvents) {\n System.out.println(event.getName() + \" occurs at t = \" + event.getTime() + \" and x = \" + event.getX());\n }\n }", "private static void dumpEvent(MotionEvent event)\n {\n String[] names = {\"DOWN\", \"UP\", \"MOVE\", \"CANCEL\", \"OUTSIDE\",\n \"POINTER_DOWN\", \"POINTER_UP\", \"7?\", \"8?\", \"9?\"};\n StringBuilder sb = new StringBuilder();\n int action = event.getAction();\n int actionCode = action & MotionEvent.ACTION_MASK;\n sb.append(\"event ACTION_\").append(names[actionCode]);\n if (actionCode == MotionEvent.ACTION_POINTER_DOWN\n || actionCode == MotionEvent.ACTION_POINTER_UP) {\n sb.append(\"(pid \").append(\n action >> MotionEvent.ACTION_POINTER_ID_SHIFT);\n sb.append(\")\");\n }\n sb.append(\"[\");\n for (int i = 0; i < event.getPointerCount(); i++) {\n sb.append(\"#\").append(i);\n sb.append(\"(pid \").append(event.getPointerId(i));\n sb.append(\")=\").append((int) event.getX(i));\n sb.append(\",\").append((int) event.getY(i));\n if (i + 1 < event.getPointerCount())\n sb.append(\";\");\n }\n sb.append(\"]\");\n LogHelper.d(TAG, sb.toString());\n }", "private void dumpEvent(MotionEvent event) \n {\n String names[] = { \"DOWN\", \"UP\", \"MOVE\", \"CANCEL\", \"OUTSIDE\",\"POINTER_DOWN\", \"POINTER_UP\", \"7?\", \"8?\", \"9?\" };\n StringBuilder sb = new StringBuilder();\n int action = event.getAction();\n int actionCode = action & MotionEvent.ACTION_MASK;\n sb.append(\"event ACTION_\").append(names[actionCode]);\n\n if (actionCode == MotionEvent.ACTION_POINTER_DOWN || actionCode == MotionEvent.ACTION_POINTER_UP) \n {\n sb.append(\"(pid \").append(action >> MotionEvent.ACTION_POINTER_ID_SHIFT);\n sb.append(\")\");\n }\n\n sb.append(\"[\");\n for (int i = 0; i < event.getPointerCount(); i++) \n {\n sb.append(\"#\").append(i);\n sb.append(\"(pid \").append(event.getPointerId(i));\n sb.append(\")=\").append((int) event.getX(i));\n sb.append(\",\").append((int) event.getY(i));\n if (i + 1 < event.getPointerCount())\n sb.append(\";\");\n }\n\n sb.append(\"]\");\n Log.d(\"Touch Events ---------\", sb.toString());\n }", "@Override\n\tpublic String formatEvent(Event event) {\n\t\treturn event.getStartingTime() + \":00 - \"\n\t\t\t + event.getEndingTime() + \":00: \" + event.getEventName() + '\\n';\n\t}", "@SuppressWarnings(\"deprecation\")\n @TargetApi(Build.VERSION_CODES.ECLAIR)\n @SuppressLint(\"NewApi\")\n private void dumpEvent(MotionEvent event) {\n String names[] = {\"DOWN\", \"UP\", \"MOVE\", \"CANCEL\", \"OUTSIDE\",\n \"POINTER_DOWN\", \"POINTER_UP\", \"7?\", \"8?\", \"9?\"};\n StringBuilder sb = new StringBuilder();\n int action = event.getAction();\n int actionCode = action & MotionEvent.ACTION_MASK;\n sb.append(\"event ACTION_\").append(names[actionCode]);\n if (actionCode == MotionEvent.ACTION_POINTER_DOWN\n || actionCode == MotionEvent.ACTION_POINTER_UP) {\n sb.append(\"(pid \").append(\n action >> MotionEvent.ACTION_POINTER_ID_SHIFT);\n sb.append(\")\");\n }\n sb.append(\"[\");\n for (int i = 0; i < event.getPointerCount(); i++) {\n sb.append(\"#\").append(i);\n sb.append(\"(pid \").append(event.getPointerId(i));\n sb.append(\")=\").append((int) event.getX(i));\n sb.append(\",\").append((int) event.getY(i));\n if (i + 1 < event.getPointerCount())\n sb.append(\";\");\n }\n sb.append(\"]\");\n }", "@Override\n\tpublic String toString() {\n\t\treturn this.getStringEventId();\n\t}", "public String getEventName();", "java.lang.String getEventType();", "public String getEventInfo()\n {\n return \"Event ID: \" + this.hashCode() + \" | Recorded User\\n\" + String.format(\"\\tName %s \\n\\tDate of Birth %s \\n\\tEmail %s \\n\\tContact Number %s \\n\\tAge %d \\nDate %s \\nTime %s \\nParty Size %d \\nEstablishment \\n\\tName: %s \\n\\tAddress: %s\",\n user.getName(), user.getDateOfBirthAsString(), user.getEmail(), user.getPhoneNumber(), \n user.getAge(), getEventDateAsString(), getEventTimeAsString(), partyNumber, establishment.getName(), establishment.getAddress());\n }", "@Override\n public String toString() {\n StringBuilder newString = new StringBuilder();\n newString.append(\"Event{\" +\n \"eventID: \" + eventID + \", \" +\n \"descendant: \" + descendant + \", \" +\n \"personID: \" + personID + \", \" +\n \"eventType: \" + eventType + \", latitude: \" + latitude +\n \", longitude: \" + longitude +\n \", country: \" + country +\n \", city: \" + city +\n \", year: \" + year + \"}\");\n return newString.toString();\n }", "@Override\n\tpublic String toString() {\n\t\t\n\t\treturn \"[ \"+ event_code + \",\"+ insert_ts + \" ] = \" + short_description ;\n\t\t\n//\t\treturn \"[ \\\"event_code\\\" : \" + \"\\\"\" + event_code + \"\\\" , \\\"update_TS\\\" : \" + \"\\\"\" + insert_ts + \"\\\", \\\"short_Description\\\" : \\\" \"\n//\t\t\t\t+ \"\\\"\" + short_description + \"\\\"\" + \" ]\";\n\t}", "public void printEeventList() {\n PriorityQueue<Event> events = this.getEventList();\n while (!events.isEmpty()) {\n Event event = events.poll();\n if (!(event instanceof ServerRestEvent || event instanceof ServerBackEvent)) {\n System.out.println(event);\n }\n\n }\n }", "private void displayEvent(String msg) {\n //format the event with date and time before it\n String e = sdf.format(new Date()) + \" : \" + msg;\n //add the event to the chatList array\n chatList.add(e);\n //display newly formatted event in GUI\n mg.appendEvent(e + \"\\n\");\n }", "public String getEvent() {\n return this.event;\n }", "@Override\n\tpublic void fireEvent(EventObject event, boolean blocked) {\n\t\tSystem.out.println(event);\n\t}", "public void printVenueCharges (Event _event) {\n\t}", "public String toString() {\n StringBuffer buffer = new StringBuffer(\"\\t<semantic_event\");\n\n if (transactionId != null) {\n buffer.append(\" transaction_id=\\\"\");\n buffer.append(LogFormatUtils.escapeAttribute(transactionId));\n buffer.append(\"\\\"\");\n }\n\n if (name != null) {\n buffer.append(\" name=\\\"\");\n buffer.append(LogFormatUtils.escapeAttribute(name));\n buffer.append(\"\\\"\");\n }\n\n if (trigger != null) {\n buffer.append(\" trigger=\\\"\");\n buffer.append(LogFormatUtils.escapeAttribute(trigger));\n buffer.append(\"\\\"\");\n }\n\n if (subtype != null) {\n buffer.append(\" subtype=\\\"\");\n buffer.append(LogFormatUtils.escapeAttribute(subtype));\n buffer.append(\"\\\"\");\n }\n\n buffer.append(\"/>\\n\");\n\n return buffer.toString();\n }", "@Override\r\n\tpublic String toString() {\r\n\t\treturn \"EventViewForm [event=\" + event + \", eventAttender=\"\r\n\t\t\t\t+ eventAttender + \", post=\" + post + \", wallElements=\"\r\n\t\t\t\t+ wallElements + \"]\";\r\n\t}", "Event getEvent();", "public String toString() {\r\n\treturn \"DataEvent: \"\r\n\t\t+\"source=\"+getSource()\r\n\t\t+\", jobID=\"\r\n\t\t+ vcDataJobID\r\n\t\t+ \", progress=\\\"\"\r\n\t\t+ getProgress();\r\n}", "protected void displayInfo(KeyEvent e){\n\t }", "@FXML\r\n private void displayPostion(MouseEvent event) {\r\n status.setText(\"X = \" + event.getX() + \". Y = \" + event.getY() + \".\");\r\n }", "public String toString()\r\n {\r\n return e.toString();\r\n }", "public String printEventFormat() {\n return \" (;´・д・`) Doesn't match the event format.\\n\"\n + \"Please use \\\"event ... /at dd/mm/yyyy 0000\\\" (in 24hr).\\n\";\n }", "com.google.speech.logs.timeline.InputEvent.Event getEvent();", "public void Show_Item_Information(MouseEvent mouseEvent) {\n }", "public String showAllEvents() {\n String allEvents = \"\";\n for (Event e: events)\n {\n allEvents = allEvents + e.getName() + \"\\n\";\n }\n return allEvents;\n }", "void writeEvent (Event event) throws Exception {\n this.write(\"[event]\\n\");\n this.write(\"timeline \" + event.timeline.name + \"\\n\");\n this.write(\"name \" + event.name + \"\\n\");\n this.write(\"startDate \" + event.startDate[0] + \" \" + event.startDate[1] + \" \" + event.startDate[2] + \"\\n\");\n this.write(\"endDate \" + event.endDate[0] + \" \" + event.endDate[1] + \" \" + event.endDate[2] + \"\\n\");\n this.write(\"visible \" + (event.visible ? 1 : 0) + \"\\n\");\n this.write(event.notes + \"\\n[/event]\\n\");\n this.newLine();\n this.flush();\n }", "public String toString(){\n return \"Eventtype: \" + eventType + \", event time: \" + eventTime + \", Tally time: \" + tallyTime + \", cash: \" + cash;\n }", "public void listReceivedEvents() {\r\n for (Event event : receivedEvents) {\r\n System.out.print(event);\r\n }\r\n }", "@Override\r\n\tpublic void onEvent(Object e) {\n\t}", "public String toString()\n {\n Member member = getMember();\n String sSourceName = getSource() == null\n ? \"<unknown source>\"\n : getSource().getClass().getName();\n\n return new StringBuffer(\"MemberEvent{Member=\")\n .append(member == null ? \"Local\" : String.valueOf(member.getId()))\n .append(' ')\n .append(DESCRIPTIONS[getId()])\n .append(' ')\n .append(sSourceName)\n .append('}')\n .toString();\n }", "public synchronized void event(String s){\n\t\tif(printStdOut){\n\t\t\tSystem.out.println(s);\n\t\t}\n\t\tif(eventLogPath != null){\n\t\t\teventLogWriter.println(s);\n\t\t}\n\t}", "public String getEventDescription() {\n\t\treturn description;\n\t}", "com.walgreens.rxit.ch.cda.EIVLEvent getEvent();", "public String getEventInfo() {\n\t\treturn String.format(\"%s, which now has %s participant(s)\",\n\t\t\tthis.title, this.participants);\n\t}", "@Override\n public Object getEvent() {\n return eventObj;\n }", "@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tSystem.out.print(\"Action: \" + e.getActionCommand() + \"\\n\");\n\t\t\t\t}", "public String getExampleEvent() {\n return exampleEvent;\n }", "public String toString() {\n String eventString = \"\";\n DateTimeFormatter ft = DateTimeFormatter.ofPattern(\"ddMMyyyy\");\n String date = this.getDue().format(ft);\n eventString += (\"e,\" + this.getName() + \",\" + this.getDetails() + \",\" +\n date + \";\");\n return eventString;\n }", "String getEventType();", "@Override\n public String toString() {\n DateTimeFormatter dtfDate = DateTimeFormatter.ofPattern(\"MMM dd yyyy\");\n DateTimeFormatter dtfTime = DateTimeFormatter.ISO_LOCAL_TIME;\n assert dtfDate instanceof DateTimeFormatter : \"date formatter has to be of type DateTimeFormatter\";\n assert dtfTime instanceof DateTimeFormatter : \"time formatter has to be of type DateTimeFormatter\";\n final String EVENT_STRING_SHOWED_TO_USER =\n \"[E]\" + super.toString() + this.stringOfTags + \" \" + \"(at: \" + this.date.format(dtfDate) +\n \" \" + this.time.format(dtfTime) + \")\";\n return EVENT_STRING_SHOWED_TO_USER;\n }", "public Object getEvent() {\r\n return event;\r\n }", "Event () {\n // Nothing to do here.\n }", "@Override\n public String toString() {\n return \"[E]\" + super.toString() + \"(at: \" + details + \")\";\n }", "@Override\n public String toString() {\n StringBuffer buf = new StringBuffer(\"TriggerEvent{name=\");\n buf.append(name).append(\",type=\").append(type);\n if (payload != null) {\n buf.append(\",payload=\").append(payload.toString());\n }\n buf.append(\"}\");\n return String.valueOf(buf);\n }", "public String Get_event_value() \n {\n\n return event_value;\n }", "public void mousePrint(String eventDescription, MouseEvent e) {\n\t\ttextArea.append(\"Mouse \" + eventDescription + \" at (\" + \n\t\t\t\t\t e.getX() + \", \" + e.getY() + \")\" + \"\\n\");\n\t}", "static public void logEventInfo( MotionEvent oEvent )\n {\n final int iHistorySize = oEvent.getHistorySize();\n final int iPointerCount = oEvent.getPointerCount();\n String strMessage = String.format(\n \"Entering handleTouchEvent() with a event history of depth %d and %d pointers\",\n iHistorySize,\n iPointerCount );\n Logger.v( strMessage );\n\n // Look for up/down events in history\n for ( int h = 0; h < iHistorySize; h++ )\n {\n strMessage = String.format( \"Event history %d\", h );\n Logger.v( strMessage );\n\n for ( int p = 0; p < iPointerCount; p++ )\n {\n strMessage = String.format(\n \" pointer %d: (%f, %f)\",\n oEvent.findPointerIndex( p ),\n oEvent.getHistoricalX( p, h ),\n oEvent.getHistoricalY( p, h ) );\n Logger.v( strMessage );\n }\n }\n\n strMessage = String.format( \"Main event of type %d\", oEvent.getAction() );\n Logger.v( strMessage );\n\n for ( int p = 0; p < iPointerCount; p++ )\n {\n strMessage = String.format(\n \" pointer %d: (%f, %f)\",\n oEvent.findPointerIndex( p ),\n oEvent.getX( p ),\n oEvent.getY( p ) );\n Logger.v( strMessage );\n }\n }", "@Override\r\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\t// TODO Do some stuff to start debugging\r\n\t\t\t\t\tSystem.out.println(\"Debug button pressed!\");\r\n\t\t\t\t}", "@Override\r\n public void mouseClicked(MouseEvent event) {\r\n System.out.println(\"clicked\");\r\n\r\n }", "void event(Event e) throws Exception;", "public Object getInfo() {\n // from AddEventHandler\n return new String();\n }", "EventType getEvent();", "public String toString() {\n\n if(!allDay){\n return event + \": \" + startTime + \" to \" + endTime;\n } else {\n return event + \": All Day\";\n }\n }", "@Override\r\n\t\t\tpublic void seeEvent(Player p, String s) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void seeEvent(Player p, String s) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void seeEvent(Player p, String s) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t if (e.getActionCommand().startsWith(\"show\")) {\r\n\t System.out.println(e.getActionCommand());\r\n\t String mystring = e.getActionCommand().substring(9);\r\n\t System.out.println(mystring);\r\n\t \r\n\t }\r\n\r\n\t}", "public String toString() {\n\t\treturn this.getClass().getName() + \"::\" + this.Id_Event + \"::\"\n\t\t\t\t+ this.Id_User;\n\t}", "@Override\n public void mouseClicked(MouseEvent e) {\n System.out.println(\"Evento click ratón\");\n }", "public void getEventDetails() {\r\n\t\t// Query DB to get specific event information based on EventID.\r\n\t}", "public void printEvent(ICompletionEvent event) throws FileNotFoundException {\n\n\t\ttry(FileWriter fw = new FileWriter(directory+File.separator+\"Event_RunOf_\"+timeOfRun+\".txt\", true);\n\t\t\t BufferedWriter bw = new BufferedWriter(fw);\n\t\t\t PrintWriter out = new PrintWriter(bw)){\n\t\t\t\n\t\t\tout.println(event.toString());\n\t\t\tout.println(\"===================================================================\\r\\n\");\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Could not write to Event file. Exception was:\"+e.getStackTrace()); \n\t\t}\n\t}", "private static String getEventString(final JobLogEvent event)\n {\n if (event == null) {\n return \"NullJobEvent\";\n }\n final StringBuilder sb = new StringBuilder();\n if (event.getScheduler() != null) {\n sb.append(\" Scheduler=\").append(event.getScheduler()).append(\"\\n\");\n }\n // if (event.getRunner() != null) {\n // sb.append(\" Runner=\").append(event.getRunner()).append(\"\\n\");\n // }\n if (event.getJob() != null) {\n sb.append(\" Job=\").append(event.getJob()).append(\"\\n\");\n }\n if (event.getJobDefinition() != null) {\n sb.append(\" Definition=\").append(event.getJobDefinition()).append(\"\\n\");\n }\n if (event.getJobResult() != null) {\n sb.append(\" Result=\").append(event.getJobResult()).append(\"\\n\");\n }\n if (event.getJobStatus() != null) {\n sb.append(\" Status=\").append(event.getJobStatus()).append(\"\\n\");\n }\n return sb.toString();\n }", "private void printMotionEvent(final MotionEvent ev, final boolean handled) {\n//\t\tString message;\n//\t\tswitch (ev.getActionMasked()) {\n//\t\tcase MotionEvent.ACTION_DOWN:\n//\t\t\tmessage = \"DOWN\";\n//\t\t\tbreak;\n//\t\tcase MotionEvent.ACTION_MOVE:\n//\t\t\tmessage = \"MOVE\";\n//\t\t\tbreak;\n//\t\tcase MotionEvent.ACTION_UP:\n//\t\t\tmessage = \"UP\";\n//\t\t\tbreak;\n//\t\tcase MotionEvent.ACTION_CANCEL:\n//\t\t\tmessage = \"CANCEL\";\n//\t\t\tbreak;\n//\t\tdefault:\n//\t\t\treturn;\n//\t\t}\n//\t\tLog.i(TAG, message + \"\\t\" + handled);\n\t}", "public EventEntry getEventEntry();", "@Override\n\tpublic void messageToDebug(MessageEventObject o) {\n\t\ttxtDebug.append(o.getMessage());\n\t\tif (!o.getMessage().endsWith(\"\\n\")) {\n\t\t\ttxtDebug.append(\"\\n\");\n\t\t}\n\t\ttxtDebug.setCaretPosition(txtDebug.getDocument().getLength());\n\t}", "private String getEventDescription(Event event) {\n String day = getDayDescription(event);\n String typeOfEvent = getEventType(event);\n String description = day + \" \" + typeOfEvent + event.getName();\n if (description.length() > 18) {\n return description.substring(0, 16) + \"...\";\n }\n return description;\n }", "@Override\npublic String toString(@Nullable Event arg0, boolean arg1) {\n\treturn null;\n}", "private void populateUI(Event event){\n mTitle.setText(event.getTitle()); //sets title to event title\n mDescription.setText(event.getDescription());\n }", "String getEventId();", "public void runEvent();", "public void TopDreiEvent();", "@Override\n\tpublic String toString() {\n\t\treturn this.getStringEventId()+\"-\"+this.getOccurrenceMark();\n\t}", "public static void logEvent(SimulationEvent event) {\n\t\tevents.add(event);\n\t\tSystem.out.println(event);\n\t}", "public void Print(ActionEvent actionEvent) {\n //System.out.println(call.title);\n TitleDisplay.setText(\"\");\n for (int i = 0; i < call.getToDoListTitle().size(); i++) {\n text = \"Item #\" + (i + 1);\n TitleDisplay.appendText(text);\n TitleDisplay.appendText(\"\\n\");\n TitleDisplay.appendText(\"Name: \");\n TitleDisplay.appendText(call.getToDoListTitle().get(i));\n TitleDisplay.appendText(\"\\nDescription: \");\n TitleDisplay.appendText(call.getToDoListDescription().get(i));\n TitleDisplay.appendText(\"\\nDue Date: \");\n TitleDisplay.appendText(call.getToDoListDueDate().get(i));\n TitleDisplay.appendText(\"\\n\\n\");\n }\n }", "public void handleEvent(Event event) {\n\t\t\t\tprintingHandle.handlePrint(text.getText());\n\t\t\t}", "Event getE();", "private String makeEventSummary(String name) {\n return \"SUMMARY:\" + name + \"\\n\";\n }", "public Event getEvent(){\n\t\t\treturn event;\n\t\t}", "public String getEventTitle()\n {\n EventTitle = EventNameField.getText();\n return EventTitle;\n }", "@DISPID(7) //= 0x7. The runtime will prefer the VTID if present\r\n @VTID(14)\r\n visiotool.IVEventList eventList();", "public String toStringEvent(String id){\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm\");\n String speakers = \"\";\n if (getEventSpeaker(id).size() != 0){\n if (getEventSpeaker(id).size() == 1){\n speakers = \", Speaker: \";\n }\n else{speakers = \", Speakers: \";}\n for (Speaker s: getEventSpeaker(id)){\n speakers += \" \" + s.getName() + \", \";\n }\n String line = \"Event: \" + getEvent(id).getTitle() + \", Room: \" +\n getEventRoom(id).getRoomName()\n + speakers + \"Starts at: \" + getEvent(id).getStartTime().format(formatter) + \", Ends at: \" +\n getEvent(id).getEndTime().format(formatter);\n if (getEvent(id).getVIPStatus()){\n line += \", VIP restricted event\";\n }\n return line;}\n else { String line = \"Event: \" + getEvent(id).getTitle() + \", Room: \" +\n getEventRoom(id).getRoomName()\n + \", Starts at: \" + getEvent(id).getStartTime().format(formatter) + \", Ends at: \" +\n getEvent(id).getEndTime().format(formatter);\n if (getEvent(id).getVIPStatus()){\n line += \", VIP restricted event\";\n }\n return line;\n }\n }", "@Override\n public String toString() {\n return \"[E]\" + super.toString() + \" (at: \" + at + \")\";\n }", "@Override\n public String getToolTipText (final MouseEvent mEvent) {\n return getText();\n }", "void eventChanged();", "@Override\n\tpublic void handleEvent(StateEvent stateNow) {\n\t\tSystem.out.println(stateNow.getState());\n\t\tSystem.out.println(Thread.currentThread().getName());\n\t\tSystem.out.println(stateNow.source);\n\t}", "public String getEventId();", "public void logEvent(String message) {\n System.out.println(\"PC Log.listener: \"+message);\n\n }", "@Override\n\tpublic void processEvent(Event e) {\n\n\t}", "public String getEventMessage() {\n return eventMessage;\n }" ]
[ "0.7710328", "0.76706666", "0.70349133", "0.69706136", "0.6842825", "0.679413", "0.67477727", "0.6738805", "0.6734385", "0.6705707", "0.6694921", "0.66763234", "0.65889865", "0.6559425", "0.65557605", "0.65231323", "0.65060824", "0.6502849", "0.64707154", "0.64366394", "0.6429907", "0.642967", "0.6419362", "0.63943094", "0.63812727", "0.6360675", "0.6352602", "0.63158876", "0.6294037", "0.62759495", "0.626354", "0.62208754", "0.62189096", "0.6206609", "0.6197753", "0.61954236", "0.6188452", "0.6187567", "0.6165987", "0.61655253", "0.61589044", "0.6155707", "0.6133617", "0.61263925", "0.61118746", "0.61104196", "0.6080003", "0.60677874", "0.6054494", "0.60097224", "0.5997822", "0.59840995", "0.5966495", "0.5960174", "0.5957387", "0.5955763", "0.5953653", "0.59525955", "0.59355265", "0.5929638", "0.59276825", "0.5925414", "0.5915237", "0.591246", "0.5911413", "0.5911413", "0.5911413", "0.59031594", "0.58938974", "0.5883963", "0.58806485", "0.5864005", "0.5861089", "0.58561766", "0.5850986", "0.5838723", "0.58385706", "0.5834746", "0.58321786", "0.5827081", "0.5819944", "0.5818363", "0.58160067", "0.58150524", "0.5815014", "0.5814201", "0.580213", "0.5799462", "0.5798932", "0.579884", "0.57963234", "0.5786424", "0.5780367", "0.5779674", "0.5770343", "0.57585734", "0.57502484", "0.57447183", "0.5742302", "0.5737961" ]
0.6029213
49
Created by liang on 2018/5/14.
@Component @Mapper public interface LearnCurrentMapper { /** * 查询用户在这个科目下, * @param userid * @param subjectid * @return */ @Select(value = "select mcode from tb_learncurrent where userid = #{userid} and subjectid = #{subjectid} " ) long findLearnCurrentMcodeBySubjectid(long userid, String subjectid); /** * 查询用户在这个科目下的当前对象, * @param userid * @param subjectid * @return */ @Select(value = "select * from tb_learncurrent where userid = #{userid} and subjectid = #{subjectid} " ) LearnCurrent findLearnCurrentObjBySubjectid(@Param("userid") long userid,@Param("subjectid") String subjectid); /** * 查询用户在这个类型模拟年份下的当前学习的题目编号, * @param userid * @param moniname * @return */ @Select(value = "select mcode from tb_learncurrent where userid = #{userid} and subjectid = #{subjectid} and moniname = #{moniname} " ) long findLearnCurrentMcodeByMoniname(@Param("userid") long userid, @Param("subjectid") String subjectid,@Param("moniname") String moniname); /** * 查询用户在这个类型模拟年份下的当前学习的 当前对象, * @param userid * @param moniname * @return */ @Select(value = "select * from tb_learncurrent where userid = #{userid} and subjectid = #{subjectid} and moniname = #{moniname}" ) LearnCurrent findLearnCurrentObjByMoniname(@Param("userid") long userid, @Param("subjectid") String subjectid,@Param("moniname") String moniname); /** * 创建对象 * @param learnCurrent */ @Insert("insert into tb_learncurrent( userid , subjectid , mcode , createtime , moniname ) values ( #{userid} , #{subjectid} , #{mcode} , #{createtime} , #{moniname} )") void save(LearnCurrent learnCurrent); @Update("update tb_learncurrent set pkid = #{pkid} , userid = #{userid} , subjectid = #{subjectid} , mcode = #{mcode} , createtime = #{createtime} , moniname = #{moniname} where pkid= #{pkid}") void update(LearnCurrent learnCurrent); @Select("select * from tb_learncurrent where pkid = #{pkid}") LearnCurrent find(@Param("pkid") long pkid); }
{ "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 bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "private void poetries() {\n\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n public void init() {\n }", "@Override\n void init() {\n }", "public final void mo51373a() {\n }", "@Override\n protected void initialize() {\n\n \n }", "private void strin() {\n\n\t}", "private void init() {\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 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}", "@Override\n public int describeContents() { return 0; }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public void mo38117a() {\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n public void init() {}", "@Override\n protected void initialize() \n {\n \n }", "public void gored() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\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\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "private void kk12() {\n\n\t}", "@Override\r\n\tpublic void init() {}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\n protected void getExras() {\n }", "@Override\n protected 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 public void memoria() {\n \n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\n\tpublic void nghe() {\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}", "public void mo4359a() {\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}", "private void m50366E() {\n }", "@Override\n\tprotected void initialize() {\n\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n\tpublic void init() {\n\t}", "@Override\n public void initialize() { \n }", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "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 }", "private void init() {\n\n\n\n }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "Consumable() {\n\t}", "private MetallicityUtils() {\n\t\t\n\t}", "Petunia() {\r\n\t\t}", "private void init() {\n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t}" ]
[ "0.59421337", "0.5847526", "0.5662756", "0.56185156", "0.55710506", "0.55710506", "0.55706304", "0.5559844", "0.5552433", "0.55258936", "0.5454937", "0.54450685", "0.5444919", "0.54325455", "0.5421472", "0.5414356", "0.54041564", "0.53981334", "0.5390578", "0.53900284", "0.5389647", "0.5384418", "0.5381834", "0.5380523", "0.53645986", "0.53634036", "0.53634036", "0.53634036", "0.53634036", "0.53634036", "0.53517336", "0.53517336", "0.53517336", "0.53517336", "0.53517336", "0.53517336", "0.5349695", "0.53442115", "0.5327872", "0.53253126", "0.53115726", "0.5304171", "0.5292013", "0.5287372", "0.52797604", "0.52725446", "0.5270327", "0.5270327", "0.5270327", "0.5264527", "0.5264527", "0.5260532", "0.5260272", "0.5256308", "0.5256308", "0.52542526", "0.5243971", "0.5242468", "0.52399755", "0.52399755", "0.52340627", "0.52311015", "0.52298266", "0.5227355", "0.5218554", "0.5215226", "0.5215226", "0.5215226", "0.5212951", "0.5208562", "0.5208562", "0.5208562", "0.520787", "0.51991993", "0.5198708", "0.5194954", "0.5190832", "0.51896566", "0.5187544", "0.5163697", "0.5155438", "0.51455986", "0.514016", "0.514016", "0.514016", "0.51363814", "0.51363814", "0.51363814", "0.51363814", "0.51363814", "0.51363814", "0.51363814", "0.51354986", "0.5133899", "0.5130679", "0.5122562", "0.5114081", "0.51046354", "0.5091396", "0.5090485", "0.5089313" ]
0.0
-1
I want get the order count of John 1. Add a field for the back pointer. 2. Decide which class will control the association. 3. Create a helper method on the noncontrolling side of the association. Name this method to clearly indicate its restricted use. 4. If the existing modifier is on the controlling side, modify it to update the back points. 5. If the existing modifier is on the controlled side, create a controlling method on the controlling side to call it from the existing modifier.
public int countOrderByCustomerName(String name) { return customers.stream() .filter(x -> x.getName().equals(name)) .findFirst() .get() .friendOrders().size(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract int getCntOther();", "public int getOrder();", "int countAssociations();", "@VTID(10)\r\n int getOrder();", "int getOverriddenCount();", "int getAchieveInfoCount();", "public Integer getOrder();", "public int getAdvisorCount();", "public abstract int getCntPrepaid();", "@FameProperty(name = \"numberOfAccesses\", derived = true)\n public Number getNumberOfAccesses() {\n throw new UnsupportedOperationException(\"Not yet implemented!\"); \n }", "public abstract int getSelfCount();", "int countByExample(OrderExample example);", "Order getOrder();", "long countByExample(OrderDetailExample example);", "int countByExample(ClOrderInfoExample example);", "public abstract int getCntPoa();", "default int getOrder() {\n\treturn 0;\n }", "int getOrder(){\r\n\t\t\treturn this.order;\r\n\t\t}", "int getOtherIdsCount();", "public void incrementOrder() {\n mOrder++;\n }", "int newOrder(OrderBean newOrder);", "public abstract int getCntRod();", "@FameProperty(name = \"numberOfAccessingClasses\", derived = true)\n public Number getNumberOfAccessingClasses() {\n throw new UnsupportedOperationException(\"Not yet implemented!\"); \n }", "long countByExample(TNavigationExample example);", "int countByExample(PensionRoleMenuExample example);", "public int totalAllocatedOrders();", "int countByExample(OwnerExample example);", "@Override\r\n\tpublic int getRent() {\n\t\tint rent = 0;\r\n\t\tif (owner != null) {// if the instance is owned, the rent is calculated.\r\n\t\t\trent = cup.roll() * baseRent * owner.ownedTypes(this);// Gets a roll\r\n\t\t}\r\n\t\treturn rent;\r\n\t}", "public void defaultUpdateCount(AcProperty e)\n {\n }", "int getDonatoriCount();", "public long getRelationCount();", "@FameProperty(name = \"numberOfLocalAccesses\", derived = true)\n public Number getNumberOfLocalAccesses() {\n throw new UnsupportedOperationException(\"Not yet implemented!\"); \n }", "public void incCount() { }", "public abstract void setCntOther(int cntOther);", "int countByExample(AccessExample example);", "@FameProperty(name = \"numberOfInternalClients\", derived = true)\n public Number getNumberOfInternalClients() {\n throw new UnsupportedOperationException(\"Not yet implemented!\"); \n }", "int countSelective(MemberAdvisoryComment record);", "@FameProperty(name = \"numberOfAccessingMethods\", derived = true)\n public Number getNumberOfAccessingMethods() {\n throw new UnsupportedOperationException(\"Not yet implemented!\"); \n }", "int getAoisCount();", "int countByExample(ExchangeOrderExample example);", "public int getAmendmentCount(int paraId);", "public int getOrder() {\n return order;\n }", "public int getOrder() {\n return order;\n }", "long countByExample(NjOrderWork2Example example);", "private Order getOrder()\n {\n return orderController.getOrder(getOrderNumber());\n }", "int getArrowCount();", "@FameProperty(name = \"numberOfExternalClients\", derived = true)\n public Number getNumberOfExternalClients() {\n throw new UnsupportedOperationException(\"Not yet implemented!\"); \n }", "@Override\r\n public int getOrder() {\r\n return this.order;\r\n }", "private static int orderingType(){\n return ((SubjectControl.subjNumber + 3) % NUM_ORDER_TYPES) + 1;\n }", "int getAchievementsCount();", "int countByExample(UcOrderGuestInfoExample example);", "public Integer getnOrder() {\n return nOrder;\n }", "public int getOrder() {\n\t\treturn 0;\n\t}", "public int bobCount ();", "int getInCount();", "long countByExample(BusnessOrderExample example);", "public int get_count();", "public void incA() {\n this.countA++;\n }", "int getReaultCount();", "public int getOrder() {\r\n\t\treturn order;\r\n\t}", "@Override\n\tpublic int getOrder() {\n\t\treturn 1;\n\t}", "long countByExample(GroupRightDAOExample example);", "@Override\n\tpublic void getSpecificOrders() {\n\t\t\n\t}", "@Override\n\tpublic void getSpecificOrders() {\n\t\t\n\t}", "public void addCount()\n {\n \tcount++;\n }", "int getActAmountCount();", "@Override\n\tpublic void count() {\n\t\t\n\t}", "public Integer getOrder() {\n return order;\n }", "int getAuthoritiesCount();", "public int getOrder() {\n return mOrder;\n }", "@Override\n\tpublic int countOrder(SearchCriteria scri) throws Exception {\n\t\treturn session.selectOne(\"orderMapper.countOrder\",scri);\n\t}", "Order modifyDiscountToOrder(Order order, int discountToAppply);", "@Override\n\tpublic void getOrders() {\n\t\t\n\t}", "public int totalOrdersTaken();", "public Integer getOrderNumber()\n {\n return orderNum;\n }", "int countByExample(AgentLevelExample example);", "@Override\n protected int count(TopCategorySearcher searcher) {\n return 0;\n }", "int countByExample(OrderPreferentialExample example) throws SQLException;", "@FameProperty(name = \"numberOfGlobalAccesses\", derived = true)\n public Number getNumberOfGlobalAccesses() {\n throw new UnsupportedOperationException(\"Not yet implemented!\"); \n }", "abstract void takeResposibilityForConnectionOfAssociation(com.webobjects.eointerface.EOAssociation association);", "int countByExample(AdminTabExample example);", "int getContactCount();", "long getOwnedEntryCount();", "private int getCounterLimit(Game game, Player player){\n if (!game.isFrenzy()) {\n return NORMAL_ACTION_NUMBER;\n } else {\n Logger.getGlobal().info(\"is before frenzy activator: \" + player.getCharacterState().isBeforeFrenzyActivator());\n if (player.getCharacterState().isBeforeFrenzyActivator()) {\n return BEFORE_FRENZY_NUMBER;\n } else {\n return AFTER_FRENZY_NUMBER;\n }\n }\n }", "int getParentIdCount();", "public Integer getOrder() {\n return order;\n }", "public Integer getOrder() {\n return order;\n }", "public interface IOrderable {\n void setOrderNum(int orderNum);\n\n int getOrderNum();\n}", "int getPurchasableOffersCount();", "public int getOrder() {\n \treturn ord;\n }", "long countByExample(NjOrderAttachmentExample example);", "@DISPID(118)\n @PropGet\n int getCount();", "public boolean haveCount () ;", "public abstract long countByCustomer(Customer customer);", "public abstract long countByCustomer(Customer customer);", "public int getAssocCount ()\n {\n return assocCount;\n }", "long countByExample(R_orderExample example);", "public void doneOrder(){\n setId(++count);\n }", "public int getOrder() {\n\t\treturn order;\n\t}", "int getNewsindentifydetailCount();", "int countByExample(MenuInfoExample example);" ]
[ "0.61083305", "0.5787953", "0.55758476", "0.55622977", "0.5551727", "0.5547871", "0.5505667", "0.5469187", "0.5461936", "0.5438538", "0.540618", "0.539956", "0.5368925", "0.53533924", "0.5327189", "0.5307826", "0.5288957", "0.52863836", "0.5274833", "0.5249748", "0.52171683", "0.5214664", "0.51827526", "0.51544666", "0.5147573", "0.5130642", "0.51205826", "0.51109034", "0.51069903", "0.51024157", "0.50966704", "0.5091657", "0.50853646", "0.50804055", "0.50796187", "0.5071359", "0.50709516", "0.50498986", "0.5046968", "0.5044678", "0.50338066", "0.50210816", "0.50210816", "0.5002737", "0.49990562", "0.49825615", "0.4979312", "0.49779153", "0.4973807", "0.49675515", "0.49657488", "0.496546", "0.49651232", "0.49626082", "0.49613252", "0.49563462", "0.49484077", "0.49479508", "0.49376047", "0.493609", "0.49358425", "0.49349144", "0.49328586", "0.49328586", "0.49327782", "0.49220073", "0.49208283", "0.49168587", "0.491287", "0.49122795", "0.4907987", "0.4902683", "0.49008986", "0.48987448", "0.48978063", "0.48948345", "0.48946694", "0.4891542", "0.48894426", "0.48891068", "0.48859033", "0.48836043", "0.48827878", "0.48826408", "0.48799458", "0.48575097", "0.48575097", "0.48530647", "0.48516524", "0.48511258", "0.48448047", "0.484299", "0.48384324", "0.48382148", "0.48382148", "0.483687", "0.4833243", "0.48204255", "0.48194733", "0.48180348", "0.48167717" ]
0.0
-1
Finds a user by UserName.
@NotNull TUser findByUserName(String username) throws NotFoundException, ErrorConnectionException, TException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic Userinfo findbyname(String name) {\n\t\treturn userDAO.searchUserByName(name);\r\n\t}", "public User findUser(String name) {\n\t\treturn null;\r\n\t}", "public boolean findUserBYName(String name);", "User findUserByName(String name);", "@Override\n\tpublic User findUserByName(String name) {\n\t\treturn dao.findUserByName(name);\n\t}", "public User findUser(String name) {\n\n\t\ttry {\n\t\t\tConnection conn = getConnection();\n\t\t\tPreparedStatement ps = conn.prepareStatement(\"select * from users where name = ?\");\n\t\t\tps.setString(1, name);\n\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\tif (rs.next()) {\n\t\t\t\tUser foundUser = new User(rs.getInt(1), rs.getString(2), rs.getString(3), rs.getString(4),\n\t\t\t\t\t\trs.getDate(5));\n\t\t\t\tconn.close();\n\t\t\t\treturn foundUser;\n\t\t\t}\n\t\t\tconn.close();\n\n\t\t} catch (SQLException | IOException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\n\t\treturn null;\n\t}", "@Override\r\n\tpublic User findUser(String name) {\n\t\tSession session=DaoUtil.getSessionFactory().getCurrentSession();\r\n\t\tsession.\r\n\t\t\r\n\t\t\r\n\t\treturn user;\r\n\t}", "@Override\n\tpublic User findUserByUserName(String userName) throws Exception {\n\t\treturn userDao.findUserByUserName(userName);\n\t}", "public User findByUserName(String userName) {\n logger.log(Level.INFO, \"suppp it works\");\n List<User> users = entityManager.createNamedQuery(User.FIND_BY_USERNAME)\n .setParameter(\"userName\", userName)\n .getResultList();\n if (users.isEmpty()) {\n return null;\n }\n return users.get(0);\n }", "public AgtUser findUserByName(String username);", "public User findUserByNickname(final String nickname);", "public User findUser(String uname) {\n\t\treturn userRepository.searchByUname(uname);\n\t}", "User loadUserByUserName(String userName);", "User getUserByUsername(String name) throws InvalidUserException;", "@Override\n\tpublic User findByName(String username) {\n\t\treturn userDao.findByName(username);\n\t}", "public User search_userinfo(String user_name);", "@Override\r\n\tpublic User findUserByName(String userName) {\n\t\treturn null;\r\n\t}", "User findByUserName(String userName);", "User findByUserName(String userName);", "@Override\n public User getUserByName(String userName) {\n return userRepository.findUserByUserName(userName);\n }", "public User getSingleUserRealName(String name) {\n\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n try {\n\n results = session.find(\"from User as user where CONCAT_WS(' ',user.firstName, user.lastName) = ? \",\n new Object[]{name},\n new Type[]{Hibernate.STRING});\n\n\n\n } /*\n * If the object is not found, i.e., no Item exists with the\n * requested id, we want the method to return null rather\n * than throwing an Exception.\n *\n */ catch (ObjectNotFoundException onfe) {\n return null;\n } catch (HibernateException e) {\n /*\n * All Hibernate Exceptions are transformed into an unchecked\n * RuntimeException. This will have the effect of causing the\n * user's request to return an error.\n *\n */\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n if (results.isEmpty()) {\n return null;\n } else {\n return (User) results.get(0);\n }\n\n }", "public Users findUser (String userName) {\n String queryStr = \"select * from users where username = '\" + userName + \"'\";\r\n try {\r\n Users result = (Users) em.createNativeQuery(queryStr, Users.class).getSingleResult();\r\n return result;\r\n } catch (Exception e) {\r\n //log.error(e);\r\n return null;\r\n }\r\n }", "public SecurityUser findByName(String username);", "User findOneByName(String name);", "@Override\n public User getUserByUsername(String name) {\n \tSession session = this.sessionFactory.getCurrentSession(); \n \tQuery query = session.createQuery(\"from User where username=:username\");\n\t\tquery.setParameter(\"username\", name);\n\t\tUser u = (User) query.uniqueResult();\n logger.info(\"User loaded successfully, User details=\"+u);\n return u;\n }", "@Override\n public User getUserByName(final String name){\n Query query = sessionFactory.getCurrentSession().createQuery(\"from User where username = :name\");\n query.setParameter(\"name\", name);\n return (User) query.uniqueResult();\n }", "public User findByUserName(String username) throws Exception;", "User findByUsername(String userName);", "User findUserByUsername(String username);", "public User findUserName(String name)\n\t\t{\n\t\t\tfor (int i = 0; i < users.size(); i++)\n\t\t\t{\n\t\t\t\tif (name.equals(users.get(i).getUsername()))\n\t\t\t\t{\n\t\t\t\t\treturn users.get(i);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t}", "public static User findUserByName(String username) {\n\n User user = null;\n User targetUser = new User();\n IdentityMap<User> userIdentityMap = IdentityMap.getInstance(targetUser);\n\n String findUserByName = \"SELECT * FROM public.member \"\n + \"WHERE name = '\" + username + \"'\";\n\n PreparedStatement stmt = DBConnection.prepare(findUserByName);\n\n try {\n ResultSet rs = stmt.executeQuery();\n while(rs.next()) {\n user = load(rs);\n }\n DBConnection.close(stmt);\n rs.close();\n } catch (SQLException e) {\n System.out.println(\"Exception!\");\n e.printStackTrace();\n }\n if(user != null) {\n targetUser = userIdentityMap.get(user.getId());\n if(targetUser == null) {\n userIdentityMap.put(user.getId(), user);\n return user;\n }\n else\n return targetUser;\n }\n\n return user;\n }", "UserModel findByName(String name);", "@Override\n\tpublic boolean findUser(String findId) {\n\t\tif(session.selectOne(namespace + \".searchUser\", findId) != null)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public User getUserByName(String name) {\n return getDbContext().select().from(USER).where(USER.USER_NAME.eq(name)).fetchOneInto(User.class);\n }", "public User retrieveUser(String name)\r\n\t{\r\n\t\t\r\n\t\treturn users.get(name);\r\n\t}", "public Users findByName(String name) {\n\t\treturn usersDAO.findByName(name);\n\t}", "@Override\n public User findUserByName(String name) {\n User user = new User();\n user.setName(\"admin\");\n user.setPassword(\"00b3187384f2708025074f28764a4a30\");\n return user;\n }", "public User getUserByUserName(String userName);", "public User getUserByName(String username);", "public User getUserByName(String username);", "User getByName(String name);", "public int search_userid(String user_name);", "private User findByName(String username) {\r\n\t\tCriteriaBuilder cb = entityManager.getCriteriaBuilder();\r\n\t\tCriteriaQuery cq = cb.createQuery(User.class);\r\n\t\tRoot<User> user = cq.from(User.class);\r\n\t\tcq.where(user.get(User_.username).in(username));\r\n\r\n\t\tTypedQuery<User> tq = entityManager.createQuery(cq);\r\n\t\t\r\n\t\treturn tq.getSingleResult();\r\n\t}", "public User getUserByName(String name) {\n \t\tfor (User user : users) {\n \t\t\tif (user.getName().equals(name))\n \t\t\t\treturn user;\n \t\t}\n \t\treturn null;\n \t}", "public User getUserByUserName(String username);", "public User searchUserByName(String userName,Long orgId) {\n\t\treturn userMapper.findUserByName(userName,orgId);\r\n\t}", "public User getUser(String name);", "public User getUser(String name);", "public Usuarios findByName(String name) throws javax.persistence.NoResultException {\r\n return (Usuarios)EM.createNamedQuery(Usuarios.FIND_USER_BY_EMAIL)\r\n .setParameter(\"p1\", name)\r\n .getSingleResult();\r\n }", "public User findUser(String username) {\n if (userList.containsKey(username)) {\n return userList.get(username);\n } else {\n throw new NoSuchElementException(\"User Not Found.\");\n }\n }", "@Override\n\tpublic User selectUserByName(String userName) {\n\t\treturn userDao.selectUserByName(userName);\n\t}", "public Person findPersonByUsername(String name) {\n Person person = personRepository.findByUsername(name);\n Optional<Person> byId = personRepository.findById(2L);\n return person;\n }", "@Override\n\tpublic List<User> searchByUser(String userName) {\n\t\tlog.info(\"Search by username!\");\n\t\treturn userRepository.findByFirstNameRegex(userName+\".*\");\n\t}", "@Query(value = \"SELECT * FROM Users where user_name = :user_name\", nativeQuery = true) // jpql\n\tUser findUserByUserName(@Param(\"user_name\") String user_name);", "@Override\n\tpublic User getByName(String name) {\n\t\treturn userDao.getByName(name);\n\t}", "public User getUserFromUname(String u_Name){\n return userDao.getUserFromUsername(u_Name).get(0); \n }", "public User getSpecificUser(String username);", "User getByUsername(String username);", "User loadUser( String username ) throws UserNotFoundException;", "User findByUsername(String username) throws UserDaoException;", "@Override\n public User getByName(String name) {\n return ChainWrappers.lambdaQueryChain(userMapper)\n .eq(User::getName, name).one();\n }", "@Override\n\tpublic User findUserByUsername(String username) throws SQLException {\n User user = null;\n String sql = \"SELECT * FROM user WHERE username = ?\";\n \n connect();\n \n PreparedStatement statement = jdbcConnection.prepareStatement(sql);\n statement.setString(1, username);\n \n \n ResultSet resultSet = statement.executeQuery();\n \n while (resultSet.next()) {\n String usrname = resultSet.getString(\"username\");\n String pwd = resultSet.getString(\"password\");\n \n user = new User(usrname, pwd);\n }\n \n resultSet.close();\n statement.close();\n \n return user;\n\t}", "public User getByUserName(String username) {\n\t\tSession session=sessionFactory.getCurrentSession();\n\t\tString hql = \"from User WHERE emailid = :userame\";\n\t\tUser user = (User)session.createQuery(hql).setParameter(\"userame\", username).getSingleResult();\n\t\treturn user;\n\t}", "public User queryUserByUsername(String username);", "User getUser(String userName) throws UserNotFoundException;", "public SystemUser findByUserName(String userName);", "public EOSUser findUser(String login) throws EOSNotFoundException;", "public UserQueryEntity getByName(String userName);", "@Override\n\tpublic void findUserByUsername(String username) {\n\n\t}", "@Override\n\tpublic UserDetails loadUserByUsername(String arg0) throws UsernameNotFoundException {\n\t\tList <UserDetailsPojo> list=dao.getUserByName(arg0);\n\t\tif(list==null || list.size()==0){\t\t\n\t\tthrow new UsernameNotFoundException(\"No user available\");\n\t\t}\n\t\t\n\t\tUserDetailsPojo user=list.get(0);\n\t\t\n\t\treturn user;\n\t}", "private String searchForUser() {\n String userId = \"\";\n String response = given().\n get(\"/users\").then().extract().asString();\n List usernameId = from(response).getList(\"findAll { it.username.equals(\\\"Samantha\\\") }.id\");\n if (!usernameId.isEmpty()) {\n userId = usernameId.get(0).toString();\n }\n return userId;\n }", "public User findUser(String username) {\n if (activeUsers.containsKey(username)) return activeUsers.get(username);\n String fileName = username;\n try {\n return (User) loadObjFromFile(usersDirPath + fileName);\n } catch (IOException | ClassNotFoundException e) {\n e.printStackTrace();\n log(\"error finding user\");\n }\n return null;\n }", "@Override\r\n\tpublic User findByUsername(String username) throws SQLException {\n\t\tUserDao userDao = (UserDao) BeanFactory.getBean(\"userDao\");\r\n\t\treturn userDao.findByUsername(username);\r\n\t}", "@Override\n\tpublic Usuario findByName(String name) {\n\t\treturn null;\n\t}", "@SuppressWarnings(\"static-method\")\n public @NotNull LocalUser findByName(String username) throws UserNotFoundException {\n if (\"admin\".equals(username)) {\n LocalUser user = new LocalUser(\"admin\", \"struts2\");\n return user;\n }\n throw new UserNotFoundException(username);\n }", "@Test\n\tpublic void FindUserByUsername() {\n\n\t\tUser user = new User(\"moviewatcher\", \"$2a$10$37jGlxDwJK4mRpYqYvPmyu8mqQJfeQJVSdsyFY5UNAm9ckThf2Zqa\", \"USER\");\n\t\tuserRepository.save(user);\n\t\t\n\t\tString username = user.getUsername();\n\t\tUser user4 = userRepository.findByUsername(username);\n\t\n\t\tassertThat(user4).isNotNull();\n\t\tassertThat(user4).hasFieldOrPropertyWithValue(\"username\", \"moviewatcher\");\n\t\t\n\t}", "@Override\r\n\tpublic User findUserByUsername(String username) {\n\t\tSystem.out.println(\"aa\");\r\n\t\treturn dao.selectUserByUsername(username);\r\n\t}", "@Override\r\n\tpublic Users findByName(String username) {\n\t\t\r\n\t\tCriteria criteria=sessionFactory.getCurrentSession().createCriteria(Users.class);\r\n\t\t\r\n\t\tcriteria.add(Restrictions.eqOrIsNull(\"username\", username));\r\n\t\t\r\n\t\treturn (Users) criteria.uniqueResult();\r\n\t}", "User getUserByUsername(String username);", "User getUserByUsername(String username);", "User getUserByUsername(String username);", "public User getUser(String userName) {\n for (User u : users) {\n if (u.getName().equals(userName)) {\n return u;\n }\n\n }\n return null;\n }", "User findUser(String userId);", "public User loadByUsername(String userName) {\r\n\t\tUser retUser = this.userStore.get(userName);\r\n\r\n\t\treturn retUser;\r\n\t}", "User find(String username, String password);", "Login findByUserName (String username);", "public User findByUsername(String username);", "public User findByUsername(String username);", "public User findByUsername(String username);", "public User findByUsername(String username);", "public User getUserByUsername(String username);", "@Override\r\n public UserAccount findByUsernameOrOAuthToken(String userName) {\n if (userName.startsWith(SYSTEM_CONSTS.AUTHENTIFICATION_OAUTH2_USERNAME_PREFIX)) {\r\n return findUserByOAuth2UserNameToken(userName);\r\n } else {\r\n return ops.findOne(Query.query(Criteria.where(\"username\").is(userName)), UserAccount.class);\r\n }\r\n }", "public User whoIsTheUser(String name){\n boolean space5 = false;\n User userPrivate = null;\n for(int i = 0; i<MAX_USER && !space5; i++){\n userPrivate = user[i];\n if(userPrivate.getUserName().equals(name)){\n space5 = true;\n }\n }\n return userPrivate;\n }", "User findUserModelByUsername(String username);", "public User findUserByLogin(final String login);", "User findUserByLogin(String login);", "public User getUserByUserName(String userName) {\n User user = new User();\n Session session = null;\n try {\n session = openSession();\n Criteria criteria = session.createCriteria(User.class);\n criteria.add(Restrictions.eq(\"userName\", userName));\n\n } catch (HibernateException he) {\n logger.error(\"Hibernate Exception: \" + he);\n } catch (Exception e) {\n logger.error(\"Exception: \" + e);\n } finally {\n if (session != null) {\n session.close();\n }\n }\n return user;\n }", "public MsUser getUser(final String name) {\n return users.get(name);\n }", "@GetMapping(value = \"/{name}\")\r\n\tpublic Users findByName(@PathVariable final String name)\r\n\t{\r\n\t\treturn userJPARepository.findByName(name);\r\n\t}", "public User Username(String uname) {\n\t\treturn repo.findByUsername(uname);\r\n\t}", "User findByUsername(String username);" ]
[ "0.7989248", "0.7852687", "0.7756541", "0.7621454", "0.76121426", "0.75041205", "0.74616176", "0.73820186", "0.7356937", "0.72977376", "0.72917837", "0.72802377", "0.7232988", "0.7225001", "0.71777105", "0.7153229", "0.71234065", "0.71108085", "0.71108085", "0.70784926", "0.7058057", "0.705328", "0.70396054", "0.7036974", "0.7032024", "0.701026", "0.6989304", "0.69824845", "0.69820964", "0.6975132", "0.6974879", "0.69742274", "0.69710225", "0.6962703", "0.6944479", "0.6933638", "0.6924435", "0.69175977", "0.69128245", "0.69128245", "0.690297", "0.6888217", "0.68836087", "0.68834835", "0.6869126", "0.6782137", "0.6774967", "0.6774967", "0.67736715", "0.67729956", "0.67611736", "0.6756276", "0.6754347", "0.6741176", "0.6735993", "0.6716926", "0.6713313", "0.67037183", "0.6702198", "0.66996413", "0.6693225", "0.667769", "0.66771084", "0.66670704", "0.6657465", "0.665634", "0.66555405", "0.6652222", "0.6645038", "0.664453", "0.6643429", "0.6637185", "0.6632505", "0.66291916", "0.6627343", "0.6625968", "0.66192496", "0.6610753", "0.6606845", "0.6606845", "0.6606845", "0.6605802", "0.65910983", "0.6568747", "0.6560403", "0.6552274", "0.65518636", "0.65518636", "0.65518636", "0.65518636", "0.65493464", "0.6537478", "0.6523125", "0.65213823", "0.6517646", "0.6514708", "0.6514278", "0.6510794", "0.65090054", "0.6502309", "0.6486279" ]
0.0
-1
Tests if user with specified name exists.
boolean isUserExist(String username) throws ErrorConnectionException, TException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean findUserIsExist(String name) {\n\t\treturn false;\r\n\t}", "public boolean existsUser(String username);", "boolean exists(String userName);", "public boolean userNameExist(String username);", "boolean hasUserName();", "@Override\n public boolean isUserNameExists(String userName) {\n User user = getUserInfo(userName);\n return user != null && user.getUserName() != null && !user.getUserName().equals(\"\");\n }", "boolean isUserExists(Username username);", "boolean exists(String username);", "public boolean isThereSuchAUser(String username, String email) ;", "public boolean existUser(String id);", "public boolean userExists(String user){\n boolean answer = false;\n //look into the database\n try{\n statement = connection.createStatement();\n //execute SQL query and get the data from the database\n ResultSet myResult = statement.executeQuery(\"SELECT name FROM members WHERE name = '\" + user +\"'\");\n while (myResult.next()) {\n if (myResult.getString(\"name\")!= null)\n //name exists so answer = true\n answer = true;\n }\n\n }catch (SQLException ex){ex.printStackTrace();}\n return answer;\n }", "Boolean checkUserExists(String userName) throws AppException;", "public boolean findUserBYName(String name);", "public boolean isUser(String userName) throws Exception;", "private int checkUserExists(String name)\r\n\t{\r\n\t\tfor (int i = 0; i < numOfUsers; i++)\r\n\t\t{\r\n\t\t\tif (name.equals(userAccounts[0][i]))\r\n\t\t\t\treturn i;\r\n\t\t}\r\n\t\treturn -1;\r\n\t}", "public Boolean isUsernameExist(String username);", "boolean isUserExist(String username, String password);", "boolean isUsernameExist(String username);", "public boolean checkUsername(String name) {\r\n\t\ttry {\r\n\t\t\tStatement statement = connection.createStatement();\r\n\t\t\tResultSet rs = statement.executeQuery(\"SELECT count(*) FROM users where username = '\" + name + \"'\");\r\n\t\t\treturn rs.first();\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public boolean userExists(String userName) {\r\n String qr = \"from UserCredsTbl where userName like '%\" + userName + \"%'\"\r\n + \"or userName like '%\" + userName + \"%'\";\r\n List userList = crud.getObject(qr);\r\n\r\n if (userList.size() > 0) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "@Override\n\tpublic boolean checkLoginNameExists(String loginName) {\n\n\t\tUser user = userDAO.getUserByName(loginName);\n\t\tif (null != user) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "public boolean checkUserNameIsOccupied(String name) {\n \t\tif (users.size() != 0) {\n \t\t\tfor (int i = 0; i < users.size(); i++) {\n \t\t\t\tif (name.equals(users.get(i).getName())) {\n \t\t\t\t\treturn true;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\treturn false;\n \t}", "boolean hasUsername();", "boolean hasUsername();", "boolean hasUsername();", "boolean hasUsername();", "boolean hasUsername();", "boolean hasUsername();", "private boolean isUserExists() {\n\t\treturn KliqDataStore.isUserExists(this.mobileNumber, null);\r\n\t}", "boolean existsByUsername(String username);", "public boolean isRegisteredUserName(String userName);", "public static boolean userExists(String username) throws IOException, SQLException {\n ArrayList<String> user = retrieveUser(username);\n if (!user.isEmpty()) {\n if (user.get(0).equals(username)) {\n System.out.println(\"Username exists in database.\");\n return true;\n }\n }\n System.out.println(\"The user: \" + username + \" does not exist\");\n return false;\n }", "private boolean checkNameExistAdd(String userName) {\n\n\t\tUser user = this.userDAO.getUserByName(userName);\n\t\tif (null != user) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "public boolean existsByUsername(String username);", "@Override\n public boolean userExists(String name){\n\n String sql = \"SELECT count(*) FROM users WHERE name=?\";\n int count = jdbcTemplate.queryForObject(sql, Integer.class, name);\n if(count == 0) {\n return false;\n } else {\n return true;\n }\n\n }", "@Override\r\n\tpublic Boolean userExist(String username) {\n\t\treturn null;\r\n\t}", "public boolean doesTheUserExist(String user)\r\n\t {\r\n\t\t if (!users.get(user).equals(null))\r\n\t\t return true;\r\n\t\t return false;\r\n\t }", "@Override\n\tpublic boolean userExists(String user) {\n\t\tLogin login = fetchUser(user);\n\t\treturn (login != null);\n\t}", "boolean isUser(String username);", "public boolean checkUserExists(String username) {\n boolean exists = false;\n try {\n conn = dao.getConnection();\n ps = conn.prepareStatement(\"SELECT * FROM USERS WHERE USERNAME=?\");\n ps.setString(1, username);\n\n ResultSet rs = ps.executeQuery();\n\n // rs.next() is false if the set is empty\n exists = rs.next();\n\n // close stuff\n ps.close();\n conn.close();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return exists;\n }", "public boolean doesUserExist(String username) {\n\t\t\n\t\tfor(User u : users) {\n\t\t\tif(u.getUsername().equals(username)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "public boolean checkUserName(TextField userName) {\n String userNameSQL = \"SELECT * FROM user WHERE user_name = ? \";\n ResultSet rsUser;\n boolean username_exists = false;\n\n\n try {\n\n PreparedStatement userPST = connection.prepareStatement(userNameSQL);\n userPST.setString(1, userName.getText());\n rsUser = userPST.executeQuery();\n\n if (rsUser.next()) {\n username_exists = true;\n outputText.setStyle(\"-fx-text-fill: #d33232\");\n outputText.setText(\"Username Already Exists\");\n }\n\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n\n return username_exists;\n\n }", "public boolean existsUser(String userId) {\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean checkUser(String username) {\n\t\tboolean result = false;\n\n\t\tSession session = sessionFactory.getCurrentSession();\n\t\tQuery query = (Query) session.createQuery(\"from Member where username=?\");\n\n\t\tMember member = (Member) query.setString(0, username).uniqueResult();\n\t\tif (member != null) {\n\t\t\tresult = true;\n\t\t\tlogger.info(\"Member Exists\");\n\t\t} \n\n\t\treturn result;\n\n\t}", "public boolean isExistingUsername(String username) {\n boolean isExistingUser = false; \n \n List<User> retrievedUsersList = new LinkedList<User>(); \n retrievedUsersList = repo.returnAllUsers(); \n \n User aUser = null; \n for(var user : retrievedUsersList) {\n aUser = (User)user; \n \n if(aUser.username.equals(username)) {\n isExistingUser = true; \n }\n }\n \n return isExistingUser; \n }", "boolean exists(User user);", "@Override\n\tpublic boolean userExists(String email) {\n\t\treturn (searchIndex(email) >= 0);\n\t}", "private boolean userExists(Utente checkUser) {\n\t\tDB db = getDB();\n\t\tMap<Long, UtenteBase> users = db.getTreeMap(\"users\");\n\t\tfor(Map.Entry<Long, UtenteBase> user : users.entrySet())\n\t\t\tif(user.getValue() instanceof Utente && (((Utente)user.getValue()).getUsername().equals(checkUser.getUsername())))\n\t\t\t\treturn true;\n\t\treturn false;\n\t}", "public boolean checkUserExist(String userName) {\n\t\tboolean exist = true;\n\t\tString adminToken = this.loginAAA(adminUsername, adminPassword);\n\n\t\ttry {\n\t\t\t// read identity of the user\n\t\t\tString identity = this.getIdentity(userName);\n\t\t\tif (identity != null && !identity.equals(\"\")) {\n\t\t\t\t// parse the UUID from user identity, the member userUUID will\n\t\t\t\t// be\n\t\t\t\t// null if the user is not exist\n\t\t\t\tthis.userUUID = this.getUUIDByUserIdentity(identity);\n\t\t\t\tif (this.userUUID == null)\n\t\t\t\t\texist = false;\n\t\t\t} else {\n\t\t\t\texist = false;\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\texist = false;\n\t\t\tlogger.error(\"IOException: \", e);\n\t\t} catch (Exception e) {\n\t\t\texist = false;\n\t\t\tlogger.error(\"Exception: \", e);\n\t\t} finally {\n\t\t\tif (adminToken != null) {\n\t\t\t\tthis.logoutAAA(adminToken);\n\t\t\t}\n\t\t}\n\n\t\tif (exist)\n\t\t\tlogger.info(\"user {}'s UUID = {} \", userName, this.userUUID);\n\t\telse\n\t\t\tlogger.info(\"user {} is not exist\");\n\n\t\treturn exist;\n\t}", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "public boolean isUserExist(String email, String Password);", "private boolean isUserExist(String friendName)\r\n\t{\r\n\t\tlogger.debug(\"->->->->-> Inside isUserExist method ->->->->->\");\r\n\t\tif(userDAO.getParticularUserbyUserName(friendName)==null){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "private boolean isExistUserName(String userName, String userId) {\n User user = userService.findByUserNameAndStatus(userName, Constant.Status.ACTIVE.getValue());\n if (user != null && !user.getUserId().equals(userId)) {\n return true;\n }\n return false;\n }", "boolean userExists(HttpServletRequest request, String userId);", "private boolean checkUserame(String name) throws SQLException {\n\t\tcheckUserameStatement.clearParameters();\n\t\tcheckUserameStatement.setString(1, name);\n\t\tResultSet result = checkUserameStatement.executeQuery();\n\t\tresult.next();\n\t\tboolean out = result.getInt(1) == 1;\n\t\tif (DEBUG) {\n\t\t\tSystem.out.println(\"checkUserame: \"+result.getInt(1)+\"\\n\");\n\t\t}\n\t\tresult.close();\n\t\treturn out;\n\t}", "public boolean userNameExists(){\r\n boolean userNameExists = false;\r\n //reads username and password\r\n String user = signup.getUsername();\r\n String pass = signup.getFirstPassword();\r\n try{\r\n //creates statement\r\n //connects to database\r\n \r\n Connection myConn = DriverManager.getConnection(Main.URL); \r\n \r\n //creates statement\r\n Statement myStmt = myConn.createStatement();\r\n System.out.println(\"statement initiated\");\r\n //SQL query\r\n ResultSet myRs = myStmt.executeQuery(\"select * from LISTOFUSERS \");\r\n System.out.println(\"query initiated\");\r\n //process result set\r\n //checks to see if the username already exists in the database\r\n while (myRs.next()){\r\n System.out.println(\"check\");\r\n if(user.equals(myRs.getString(\"USERNAME\"))){\r\n \r\n userNameExists = true;\r\n break;\r\n }\r\n }\r\n myConn.close();\r\n \r\n \r\n \r\n } catch (Exception e) \r\n {\r\n System.err.println(e.getMessage());\r\n } \r\n return userNameExists; \r\n }", "public boolean hasUser(String username) {\n return users.containsKey(username);\n }", "private static boolean doesUserExist () {\n String sqlRetrieveAisId = \"SELECT ais_id FROM users WHERE user_id=?\";\n \n boolean valid = false;\n try (Connection conn = Database.getConnection();\n PreparedStatement pstmt = conn.prepareStatement(sqlRetrieveAisId)) {\n \n pstmt.setInt(1, userId);\n \n ResultSet rs = pstmt.executeQuery();\n \n valid = rs.next() != false;\n } catch (SQLException se) {\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(1), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n } catch (IOException ioe) {\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(0), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n } catch (Exception e) {\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(0), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n }\n \n return valid;\n }", "boolean isUserExists(RegisterData data) throws DuplicateUserException;", "public boolean userExists(String user) {\r\n return userInfo.containsKey(user);\r\n }", "public boolean userExists(String name,String pass)throws SQLException {\r\n\t\tResultSet rs;\r\n\t\tPreparedStatement stmt = null;\r\n\t\tString query = \"SELECT username,password FROM lpro.users WHERE username=? AND password=?\";\r\n\t\ttry {\r\n\t\t\tstmt = con.prepareStatement(query);\r\n\t\t\tstmt.setString(1, name);\r\n\t\t\tstmt.setString(2, pass);\r\n\t\t\trs = stmt.executeQuery();\r\n\t\t\tcon.commit();\r\n\t\t\tif(rs.next()) {\r\n\t\t\t\tString username = rs.getString(\"username\");\r\n\t\t\t\tString password = rs.getString(\"password\");\r\n\t\t\t\tif(username.equals(name) && pass.equals(password))\r\n\t\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"Error accessing database: \"+e.getMessage());\r\n\t\t\tcon.rollback();\r\n\t\t\treturn false;\r\n\t\t}\t\r\n\t\tfinally {\r\n\t\t\tif(stmt!=null)\r\n\t\t\t\tstmt.close();\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean doesUserExist(String userID) {\n String[] columns = {\n USERS_ID_COLUMN\n };\n SQLiteDatabase db = this.getReadableDatabase();\n String selection = USERS_LASTNAME_COLUMN + \" = ?\";\n String[] selectionArgs = {userID};\n\n Cursor cursor = db.rawQuery(\n \"SELECT count(*)\" +\n \" FROM \" + USERS_TABLE_NAME +\n \" WHERE \" + USERS_ID_COLUMN + \"=\" + userID,\n null\n );\n cursor.moveToFirst();\n int count = cursor.getInt(0);\n cursor.close();\n db.close();\n\n return count > 0;\n }", "private boolean existsUser(Connection con) throws SQLException {\n\t\tlog.entry();\n\t\tboolean userExists = false;\n\t\tPreparedStatement ps = con.prepareStatement(\"SELECT COUNT(*) FROM Users \"\n\t\t + \"WHERE `id`=?;\");\n\t\ttry {\n\t\t\tps.setInt(1, id);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\tif (rs.first() && rs.getInt(1) > 0) {\n\t\t\t\tuserExists = true;\n\t\t\t}\n\t\t} finally {\n\t\t\tcloseStatement(ps);\n\t\t}\n\t\tthrowSqlException();\n\t\tlog.exit();\n\t\treturn userExists;\n\t}", "private Boolean findUser(String username){\n return usersDataBase.containsKey(username);\n }", "private boolean checkNameExistModify(String userName, Integer id) {\n\n\t\tUser user = this.userDAO.getUserByName(userName);\n\t\tif (null != user && id != user.getUserId()) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "boolean exists(String nickName) {\n // To avoid file scanning\n if (this.isOnline(nickName)) return true;\n try {\n this.loadUserRegistrationInfo(nickName);\n return true;\n } catch (NoSuchElementException e) {\n return false;\n }\n }", "private boolean checkExistingUsername(String username) {\n boolean existingUsername = false;\n User user = userFacade.getUserByUsername(username);\n if (user != null) {\n existingUsername = true;\n }\n return existingUsername;\n }", "private boolean IsUserExist(){\n SignupUser user =roomDB.dao().GetUserData(et_user.getText().toString());\n if(user!=null){\n if(!user.getEmail().isEmpty()){\n Toast.makeText(this, \"User is already registered!\", Toast.LENGTH_SHORT).show();\n return true;\n }\n\n }\n return false;\n }", "public boolean exists(int userId) {\n return this.mInjector.getUserManager().exists(userId);\n }", "public boolean isUsernameExist(String un) {\n\n boolean exist = false;\n\n // accessing registeredUser table (collection)\n MongoCollection<Document> collection = db.getCollection(\"registeredUser\");\n\n // ----- get document of given username from registeredData -----\n System.out.println(\"\\nVerifying if username already exists or not\\n--------------------\\n\");\n String colUsername = \"username\"; // set key and value to look for in document\n FindIterable<Document> docOne = collection.find(Filters.eq(colUsername, un)); // find document by filters\n MongoCursor<Document> cursor1 = docOne.iterator(); // set up cursor to iterate rows of documents\n try {\n // cursor1 will only have 1 data if we found a match\n if (cursor1.hasNext()) {\n System.out.println(\"Username already exists\");\n exist = true;\n }\n else {\n System.out.println(\"Username is available to register\");\n }\n } finally {\n cursor1.close();\n }\n\n return exist;\n }", "public boolean validateUsernameExist(String username) {\n return userRepository.findUsername(username);\n }", "public Boolean user_exists (UserWS user) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tQuery i = null;\r\n\t\t\t\t\t\r\n\t\t\t\t\tiniciaOperacion();\r\n\t\t\t\t\ti = sesion.createQuery(\"SELECT u.id_user FROM User u WHERE u.mail = :login\"); \r\n\t\t\t\t i.setString(\"login\", user.getLogin());\r\n\t\t\t\t \r\n\t\t\t\t return (i.uniqueResult() != null);\r\n\t\t\t\t}", "public boolean checkUsername(String username) {\r\n // Gets the collection of users and creates a query\r\n MongoCollection<Document> users = mongoDB.getCollection(\"Users\");\r\n Document query = new Document(\"username\", username);\r\n\r\n // Returns whether at least one user with the given username exists\r\n return users.countDocuments(query) > 0;\r\n }", "public User userExists(IDatabase db) {\n\t\tUser doesExist = db.userExists(model);\n\t\treturn doesExist;\n\t}", "private static boolean verificaUser(String username) {\n String user = null;\r\n try {\r\n PreparedStatement stmt = c.prepareStatement(\"SELECT * FROM utilizador where nome=?;\");\r\n stmt.setString(1, username);\r\n ResultSet rs = stmt.executeQuery();\r\n rs.next();\r\n user = rs.getString(\"nome\");\r\n if (user.equals(username)) {\r\n return true;\r\n }\r\n } catch (SQLException e) {\r\n System.out.println(e);\r\n }\r\n return false;\r\n }", "public boolean getUser(String name) {\r\n PomoServer server = new PomoServer();\r\n String parameters = PomoServer.MODE_SELECT + \"&\" + \"name=\" + name;\r\n String url = PomoServer.DOMAIN_URL + PomoServer.SERVLET_USER;\r\n String data = server.get(url, parameters);\r\n return data.equals(\"1\");\r\n }", "private void testUserName(){\r\n\t\t//get user with the 'test' userName\r\n\t\tString command = \"SELECT userName FROM users \"\r\n\t\t\t\t+ \"WHERE userName = \\\"\" + commandList.get(1) + \"\\\";\";\r\n\t\tSystem.out.println(command);//print command\r\n\t\ttry {//send command\r\n\t\t\trs = stmt.executeQuery(command);\r\n\t\t\t\r\n\t\t\tif(rs.next()){//if it returns user, userName exists\r\n\t\t\t\tout.println(\"exists\");\r\n\t\t\t} else {//no results returned, empty\r\n\t\t\t\tout.println(\"free\");\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\tout.println(e.getMessage());//send back error message\r\n\t\t}\r\n\t\t\r\n\r\n\t}", "@Override\n public boolean userExists(User user) {\n return DATABASE.getUsers().stream()\n .anyMatch(currentUser -> user.equals(currentUser));\n }", "public static boolean checkUserExists(List<UserAccount> users, String name) {\n\t\tboolean isUserExists = false;\n\t\tfor (UserAccount user : users) {\n\t\t\tif (user.getUserFirstName().equals(name)) {\n\t\t\t\tisUserExists = true;\n\t\t\t}\n\t\t}\n\t\treturn isUserExists;\n\t}", "public boolean checkUser(String name) {\n String[] columns = {\n PDF_NAME\n };\n SQLiteDatabase db = this.getReadableDatabase();\n\n // selection criteria\n String selection = PDF_NAME + \" = ?\";\n\n // selection argument\n String[] selectionArgs = {name};\n\n // query user table with condition\n /**\n * Here query function is used to fetch records from user table this function works like we use sql query.\n * SQL query equivalent to this query function is\n * SELECT user_id FROM user WHERE user_email = '[email protected]';\n */\n Cursor cursor = db.query(TABLE_NAME, //Table to query\n columns, //columns to return\n selection, //columns for the WHERE clause\n selectionArgs, //The values for the WHERE clause\n null, //group the rows\n null, //filter by row groups\n null); //The sort order\n int cursorCount = cursor.getCount();\n cursor.close();\n db.close();\n\n if (cursorCount > 0) {\n return true;\n }\n\n return false;\n }", "public synchronized boolean hasUser(String username) {\r\n\t\tif (!mapping.containsKey(username)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public boolean exists(final Long id) {\n return userRepository.existsById(id);\n }", "public boolean isUserExisted(String _fbEmail);", "public boolean userExists(TIdentifiable user) {\r\n return (m_users.getIndex(user) >= 0);\r\n }", "public boolean hasAccount(String user);", "public static boolean userExist(String username){\n boolean exist = false;\n try{\n Class.forName(\"com.mysql.jdbc.Driver\");\n connection = DriverManager.getConnection(\"RDS_HOST\",\"RDS_USERNAME\",\"RDS_PASSWORD\");\n String query = \"SELECT username FROM users WHERE username = ?\";\n PreparedStatement preparedStatement = connection.prepareStatement(query);\n preparedStatement.setString(1,username);\n resultSet = preparedStatement.executeQuery();\n if(resultSet.next()){\n exist = true;\n }\n\n }\n finally {\n close();\n return exist;\n }\n }", "public boolean checkUserExist(String user) {\n\t\treturn userSessions.containsKey(user);\n\t}", "private boolean knownUser(String roleName,\n String currentUser,\n LanguageConnectionContext lcc,\n DataDictionary dd,\n TransactionController tc)\n throws StandardException {\n \tSpliceLogUtils.trace(LOG, \"knownUser called with role %s and currentUser %s\",roleName, currentUser);\n //\n AuthenticationService s = lcc.getDatabase().getAuthenticationService();\n\n if (currentUser.equals(roleName)) {\n return true;\n }\n\n if (s instanceof BasicAuthenticationServiceImpl) {\n // Derby builtin authentication\n\n if (PropertyUtil.existsBuiltinUser(tc,roleName)) {\n return true;\n }\n } else {\n // Does LDAP offer a way to ask if a user exists?\n // User supplied authentication?\n // See DERBY-866. Would be nice to have a dictionary table of users\n // synchronized against external authentication providers.\n }\n\n // Goto through all grants to see if there is a grant to an\n // authorization identifier which is not a role (hence, it\n // must be a user).\n if (dd.existsGrantToAuthid(roleName, tc)) {\n return true;\n }\n\n // Go through all schemas to see if any one of them is owned by a authid\n // the same as the proposed roleName.\n if (dd.existsSchemaOwnedBy(roleName, tc)) {\n return true;\n }\n\n return false;\n }", "boolean existsByName(String name);", "public boolean existsByUsername(String username) {\n return userRepository.existsByUsername(username);\n }", "public boolean usernameExists(String username){\r\n\t\tCursor mCursor =\r\n \t this.mDb.query(true, DATABASE_TABLE, new String[] {USERNAME,PASSWORD,FIRSTNAME,FAMILYNAME,\r\n \t \t\tMAIL,RELIABILITY,POSITION,CITY,BIRTHDATE, ROW_ID, IMGPATH}, \r\n \t \t\tUSERNAME + \"= '\" + username+ \"'\", null, null, null, null, null);\r\n \t if (mCursor != null ) {\r\n \t mCursor.moveToFirst();\r\n \t }\r\n \tboolean res = mCursor.isAfterLast();\r\n \tmCursor.close();\r\n \treturn res;\r\n\t}", "public static boolean userExists(String user)\n\t{\t\t\n\t\tKeyspace keyspace = Connection.getKeyspace();\n\t\tStringSerializer se = StringSerializer.get();\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\t// given Keyspace keyspace and StringSerializer se\n\t\t\t\tSliceQuery<String, String, String> q = HFactory.createSliceQuery(keyspace, se, se, se);\n\t\t\t\tq.setColumnFamily(\"Users\") .setKey(user).setColumnNames(\"fullname\");\n\t\t\t\tQueryResult<ColumnSlice<String, String>> r = q.execute();\n\n\t\t\t\tr.get().getColumnByName(\"fullname\").getValue();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tcatch (Exception e)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t}", "public static boolean checkRegisteredUsername(String username){\n \tboolean found = false;\n \ttry {\n\t\t\tfound = DBHandler.isUsernameTaken(username, c); \n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n \treturn found;\n }", "public boolean exists(String username) {\n\t\tfor(User user : users) {\n\t\t\tif(user.getUsername().equals(username)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "boolean hasUserId();" ]
[ "0.86495924", "0.81908435", "0.79088444", "0.7766535", "0.7765986", "0.7660523", "0.7659331", "0.76564324", "0.76147395", "0.75853103", "0.7560996", "0.75445145", "0.7512195", "0.75035024", "0.74982214", "0.7446861", "0.74372226", "0.7423691", "0.741504", "0.74051976", "0.73880714", "0.7384181", "0.73674554", "0.73674554", "0.73674554", "0.73674554", "0.73674554", "0.73674554", "0.7340214", "0.733216", "0.7319198", "0.73061067", "0.7305115", "0.7286702", "0.7251235", "0.7248905", "0.72462237", "0.7224224", "0.72118014", "0.7187782", "0.7166967", "0.7164541", "0.7163435", "0.71603495", "0.71601635", "0.7156414", "0.7152975", "0.7139528", "0.7115654", "0.7090542", "0.7090542", "0.7090542", "0.7090542", "0.7090542", "0.7090542", "0.7090542", "0.7062476", "0.7055642", "0.70387554", "0.7035731", "0.7033616", "0.7011085", "0.7002778", "0.6997168", "0.69533384", "0.6948082", "0.6924567", "0.6911025", "0.68937415", "0.6877239", "0.6857974", "0.68563837", "0.68414354", "0.6829963", "0.6823039", "0.6821595", "0.68164015", "0.6809716", "0.6797164", "0.67950416", "0.6774403", "0.67660993", "0.67587274", "0.67287123", "0.6722704", "0.67117417", "0.67029595", "0.66959476", "0.66900814", "0.66810733", "0.6679886", "0.6663806", "0.6653745", "0.6647724", "0.6644418", "0.66443205", "0.66348237", "0.66271967", "0.65923184", "0.6587072", "0.6584026" ]
0.0
-1
Puts all elements to ComboBox to see visual
private void putElementsToComboBox(HashMap<String, Map<String, String>> projectsInfo) { for ( String key : projectsInfo.keySet() ) { this.comboBox.addItem(key); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tprotected void InitComboBox() {\n\t\t\r\n\t}", "private void initCombobox() {\n comboConstructeur = new ComboBox<>();\n comboConstructeur.setLayoutX(100);\n comboConstructeur.setLayoutY(250);\n\n\n BDDManager2 bddManager2 = new BDDManager2();\n bddManager2.start(\"jdbc:mysql://localhost:3306/concession?characterEncoding=utf8\", \"root\", \"\");\n listeConstructeur = bddManager2.select(\"SELECT * FROM constructeur;\");\n bddManager2.stop();\n for (int i = 0; i < listeConstructeur.size(); i++) {\n comboConstructeur.getItems().addAll(listeConstructeur.get(i).get(1));\n\n\n }\n\n\n\n\n\n\n }", "private void initializeComboboxes() {\n ObservableList<Integer> options = FXCollections.observableArrayList(vertexesCurrentlyOnScreen);\n startingVertex = new ComboBox<>(options);\n finalVertex = new ComboBox<>(options);\n startingVertex.setBorder((new Border(new BorderStroke(Color.LIGHTGRAY, BorderStrokeStyle.SOLID, new CornerRadii(2), new BorderWidths(1.5)))));\n finalVertex.setBorder(new Border(new BorderStroke(Color.LIGHTGRAY, BorderStrokeStyle.SOLID, new CornerRadii(2), new BorderWidths(1.5))));\n }", "private void fillComboBox() {\n jComboBoxFilterChains.setModel(new DefaultComboBoxModel(ImageFilterManager.getObject().getListOfFilters().toArray()));\n }", "private void renderCombobox(){\r\n\r\n\t\tCollection<String> sitesName= new ArrayList<String>();\r\n\t\t\tfor(SiteDto site : siteDto){\r\n\t\t\t\tsitesName.add(site.getSiteName());\r\n\t\t\t}\r\n\t\t\r\n\t\tComboBox siteComboBox = new ComboBox(\"Select Site\",sitesName);\r\n\t\tsiteName = sitesName.iterator().next();\r\n\t\tsiteComboBox.setValue(siteName);\r\n\t\tsiteComboBox.setImmediate(true);\r\n\t\tsiteComboBox.addValueChangeListener(this);\r\n\t\tverticalLayout.addComponent(siteComboBox);\r\n\t}", "private void fillComboBox() {\n List<String> times = this.resultSimulation.getTimes();\n this.timesComboBox.getItems().addAll(times);\n this.timesComboBox.getSelectionModel().select(0);\n }", "public ComboBox1() {\n initComponents();\n agregarItems();\n\n }", "private void buildComboBoxes() {\n buildCountryComboBox();\n buildDivisionComboBox();\n }", "private void setupComboBox(){\n\n //enhanced for loop populates book comboBox with books\n for(Book currentBook : books){ //iterates through books array\n bookCB.addItem(currentBook.getTitle()); //adds book titles to comboBox\n }\n\n //enhanced for loop populates audio comboBox with audio materials\n for(AudioVisualMaterial currentAudio : audio){ //iterates through audio array\n audioCB.addItem(currentAudio.getAuthor()); //adds audio authors to comboBox\n }\n\n //enhanced for loop populates video comboBox with video materials\n for(AudioVisualMaterial currentVideo : video){ //iterates through video array\n videoCB.addItem(currentVideo.getTitle()); //adds video titles to comboBox\n }\n }", "private void initComboBoxes()\n\t{\n\t\tsampling_combobox.getItems().clear();\n\t\tsampling_combobox.getItems().add(\"Random\");\n\t\tsampling_combobox.getItems().add(\"Cartesian\");\n\t\tsampling_combobox.getItems().add(\"Latin Hypercube\");\n\n\t\t// Set default value.\n\t\tsampling_combobox.setValue(\"Random\");\n\t}", "public void combo(){\r\n // Define rendering of the list of values in ComboBox drop down. \r\n cbbMedicos.setCellFactory((comboBox) -> {\r\n return new ListCell<Usuario>() {\r\n @Override\r\n protected void updateItem(Usuario item, boolean empty) {\r\n super.updateItem(item, empty);\r\n if (item == null || empty) {\r\n setText(null);\r\n } else {\r\n setText(item.getNombre_medico()+ \" \" + item.getApellido_medico()+\" \"+item.getApMaterno_medico());\r\n }\r\n }\r\n };\r\n });\r\n\r\n // Define rendering of selected value shown in ComboBox.\r\n cbbMedicos.setConverter(new StringConverter<Usuario>() {\r\n @Override\r\n public String toString(Usuario item) {\r\n if (item == null) {\r\n return null;\r\n } else {\r\n return item.getNombre_medico()+ \" \" + item.getApellido_medico()+\" \"+item.getApMaterno_medico();\r\n }\r\n }\r\n\r\n @Override\r\n public Usuario fromString(String string) {\r\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\r\n }\r\n });\r\n }", "public void listarIgrejaComboBox() {\n\n IgrejasDAO dao = new IgrejasDAO();\n List<Igrejas> lista = dao.listarIgrejas();\n cbIgrejas.removeAllItems();\n\n for (Igrejas c : lista) {\n cbIgrejas.addItem(c);\n }\n }", "public void plannerDisplayComboBoxs(){\n Days dm = weekList.getSelectionModel().getSelectedItem();\n if (dm.isBreakfastSet()){\n //find Recipe set for breakfast in the Days in the comboBox and display it in the comboBox\n Recipe breakfast = findRecipeFromID(dm.getBreakfast().getId(), breakfastCombo);\n breakfastCombo.getSelectionModel().select(breakfast);\n }\n\n if (dm.isLunchSet()){\n //find Recipe set for lunch in the Days in the comboBox and display it in the comboBox\n Recipe lunch = findRecipeFromID(dm.getLunch().getId(), lunchCombo);\n lunchCombo.getSelectionModel().select(lunch);\n }\n\n if (dm.isDinnerSet()){\n //find Recipe set for dinner in the Days in the comboBox and display it in the comboBox\n Recipe dinner = findRecipeFromID(dm.getDinner().getId(), dinnerCombo);\n dinnerCombo.getSelectionModel().select(dinner);\n }\n }", "private void ComboBoxLoader (){\n try {\n if (obslistCBOCategory.size()!=0)\n obslistCBOCategory.clear();\n /*add the records from the database to the ComboBox*/\n rset = connection.createStatement().executeQuery(\"SELECT * FROM category\");\n while (rset.next()) {\n String row =\"\";\n for(int i=1;i<=rset.getMetaData().getColumnCount();i++){\n row += rset.getObject(i) + \" \";\n }\n obslistCBOCategory.add(row); //add string to the observable list\n }\n\n cboCategory.setItems(obslistCBOCategory); //add observable list into the combo box\n //text alignment to center\n cboCategory.setButtonCell(new ListCell<String>() {\n @Override\n public void updateItem(String item, boolean empty) {\n super.updateItem(item, empty);\n if (item != null) {\n setText(item);\n setAlignment(Pos.CENTER);\n Insets old = getPadding();\n setPadding(new Insets(old.getTop(), 0, old.getBottom(), 0));\n }\n }\n });\n\n //listener to the chosen list in the combo box and displays it to the text fields\n cboCategory.getSelectionModel().selectedItemProperty().addListener((obs, oldValue, newValue)->{\n if(newValue!=null){\n Scanner textDisplay = new Scanner((String) newValue);\n txtCategoryNo.setText(textDisplay.next());\n txtCategoryName.setText(textDisplay.nextLine());}\n\n });\n\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n\n }", "public void fillCompBox() {\n\t\tcomboBoxName.removeAllItems();\n\t\tint counter = 0;\n\t\tif (results.getResults() != null) {\n\t\t\tList<String> scenarios = new ArrayList<String>(results.getResults().keySet());\n\t\t\tCollections.sort(scenarios);\n\t\t\tfor (String s : scenarios) {\n\t\t\t\tcomboBoxName.insertItemAt(s, counter);\n\t\t\t\tcounter++;\n\t\t\t}\n\t\t}\n\t}", "private void BuildingCombo() {\n \n }", "public static void fillComboBox() {\r\n\t\ttry {\r\n\t\t\tStatement statement = connection.createStatement();\r\n\t\t\tresults = statement.executeQuery(\"Select PeopleName from people \");\r\n\t\t\twhile (results.next()) {\r\n\t\t\t\tString peopleName = results.getString(\"PeopleName\");\r\n\t\t\t\tcomboBox.addItem(peopleName);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t \te.printStackTrace();\r\n\t\t}\r\n\t}", "private void setupComboBox() {\n nodeSelectComboBox.setEditable(true);\n\n getNodes();\n\n // Set to all nodes\n nodeSelectComboBox.setItems(FXCollections.observableList(new LinkedList<String>(nodeIDs.keySet())));\n nodeSelectComboBox.setOnAction(param -> {\n longName = nodeSelectComboBox.getValue();\n nodeID = nodeIDs.get(longName);\n if(eventHandler != null) {\n eventHandler.handle(param);\n }\n });\n // Filter nodes based on user input\n nodeSelectComboBox.setOnKeyReleased(param -> {\n nodeSelectComboBox.setItems(FXCollections.observableList(new LinkedList<String>(nodeIDs.keySet()).stream()\n .filter(longName -> showNode(longName, nodeSelectComboBox.getValue())).collect(Collectors.toList())));\n });\n }", "private void initComboBox() {\n jComboBox1.removeAllItems();\n listaDeInstrutores = instrutorDao.recuperarInstrutor();\n listaDeInstrutores.forEach((ex) -> {\n jComboBox1.addItem(ex.getNome());\n });\n }", "public void llenarComboBox(){\n TipoMiembroComboBox.removeAllItems();\n TipoMiembroComboBox.addItem(\"Administrador\");\n TipoMiembroComboBox.addItem(\"Editor\");\n TipoMiembroComboBox.addItem(\"Invitado\");\n }", "private void cargarCmbColores(){\n MapaColores.getMap().forEach((k,v)->cmbColores.getItems().add(k));\n cmbColores.getSelectionModel().selectFirst();\n }", "protected void displayComboBox() {\n openingLine = new JLabel(\"Select \" + type + \":\");\n window = new JFrame(frameTitle);\n chooseBox = new JComboBox(range);\n chooseBox.addActionListener(this);\n window.setVisible(true);\n window.setLayout(new BoxLayout(window.getContentPane(), BoxLayout.PAGE_AXIS));\n window.setMinimumSize(new Dimension(300, 100));\n window.setLocationRelativeTo(null);\n confirm = new JButton(\"Confirm\");\n confirm.addActionListener(this);\n confirm.setActionCommand(\"confirm\");\n openingLine = new JLabel(\"Select \" + type + \":\");\n JPanel chooseBoxPane = new JPanel();\n chooseBoxPane.add(openingLine);\n chooseBoxPane.add(chooseBox);\n window.add(chooseBoxPane);\n window.add(confirm);\n\n }", "public void datosCombobox() {\n listaColegios = new ColegioDaoImp().listar();\n for (Colegio colegio : listaColegios) {\n cbColegio.addItem(colegio.getNombre());\n }\n }", "private void combo() {\n cargaCombo(combo_habitacion, \"SELECT hh.descripcion\\n\" +\n \"FROM huespedes h\\n\" +\n \"LEFT JOIN estadia_huespedes eh ON eh.huespedes_id = h.id\\n\" +\n \"LEFT JOIN estadia_habitaciones ehh ON eh.id_estadia = ehh.id_estadia\\n\" +\n \"LEFT JOIN estadia e ON e.id = ehh.id_estadia \\n\" +\n \"LEFT JOIN habitaciones hh ON hh.id = ehh.id_habitacion\\n\" +\n \"WHERE eh.huespedes_id = \"+idd+\" AND e.estado ='A'\\n\" +\n \"ORDER BY descripcion\\n\" +\n \"\",\"hh.descripcion\");\n cargaCombo(combo_empleado, \"SELECT CONCAT(p.nombre, ' ',p.apellido) FROM persona p\\n\" +\n \"RIGHT JOIN empleado e ON e.persona_id = p.id\", \"empleado\");\n cargaCombo(combo_producto, \"SELECT producto FROM productos order by producto\", \"producto\");\n }", "public void iniciar_combo() {\n try {\n Connection cn = DriverManager.getConnection(mdi_Principal.BD, mdi_Principal.Usuario, mdi_Principal.Contraseña);\n PreparedStatement psttt = cn.prepareStatement(\"select nombre from proveedor \");\n ResultSet rss = psttt.executeQuery();\n\n cbox_proveedor.addItem(\"Seleccione una opción\");\n while (rss.next()) {\n cbox_proveedor.addItem(rss.getString(\"nombre\"));\n }\n \n PreparedStatement pstt = cn.prepareStatement(\"select nombre from sucursal \");\n ResultSet rs = pstt.executeQuery();\n\n \n cbox_sucursal.addItem(\"Seleccione una opción\");\n while (rs.next()) {\n cbox_sucursal.addItem(rs.getString(\"nombre\"));\n }\n \n PreparedStatement pstttt = cn.prepareStatement(\"select id_compraE from compra_encabezado \");\n ResultSet rsss = pstttt.executeQuery();\n\n \n cbox_compra.addItem(\"Seleccione una opción\");\n while (rsss.next()) {\n cbox_compra.addItem(rsss.getString(\"id_compraE\"));\n }\n \n PreparedStatement ps = cn.prepareStatement(\"select nombre_moneda from moneda \");\n ResultSet r = ps.executeQuery();\n\n \n cbox_moneda.addItem(\"Seleccione una opción\");\n while (r.next()) {\n cbox_moneda.addItem(r.getString(\"nombre_moneda\"));\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n \n }", "public void Bindcombo() {\n\n MyQuery1 mq = new MyQuery1();\n HashMap<String, Integer> map = mq.populateCombo();\n for (String s : map.keySet()) {\n\n jComboBox1.addItem(s);\n\n }\n\n }", "public void addItemsCitas(){\n cmbPacientes.removeAllItems();\n cmbPacientes.addItem(\"Seleccione una opcion\");\n cmbPacientes.addItem(\"Paciente\");\n cmbPacientes.addItem(\"Doctor\");\n cmbPacientes.addItem(\"Mostrar todo\");\n }", "private void CBFakture() {\n try {\n cmbFakture.removeAllItems();\n List<Faktura> fakture = Controller.getInstance().vratiFaktureView();\n for (Faktura fak : fakture) {\n cmbFakture.addItem(fak);\n }\n } catch (Exception ex) {\n Logger.getLogger(ProizvodUpdate.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel2 = new javax.swing.JLabel();\n nameLabel = new javax.swing.JLabel();\n performButton = new javax.swing.JButton();\n availableNames = new javax.swing.JComboBox<>();\n\n setMaximumSize(new java.awt.Dimension(435, 600));\n setMinimumSize(new java.awt.Dimension(435, 600));\n setPreferredSize(new java.awt.Dimension(435, 600));\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel2.setText(\"Знайти за назвою\");\n jLabel2.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\n nameLabel.setText(\"Назва:\");\n\n performButton.setText(\"Виконати\");\n performButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n performButtonActionPerformed(evt);\n }\n });\n\n availableNames.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\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 .addGroup(layout.createSequentialGroup()\n .addGap(140, 140, 140)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(40, 40, 40)\n .addComponent(nameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(10, 10, 10)\n .addComponent(availableNames, javax.swing.GroupLayout.PREFERRED_SIZE, 290, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(150, 150, 150)\n .addComponent(performButton, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(10, 10, 10)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(30, 30, 30)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(nameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(availableNames, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(40, 40, 40)\n .addComponent(performButton))\n );\n\n nameLabel.getAccessibleContext().setAccessibleName(\"id\");\n\n getAccessibleContext().setAccessibleParent(this);\n }", "protected void setComboBoxes() { Something was changed in the row.\n //\n final Map<String, Integer> fields = new HashMap<>();\n\n // Add the currentMeta fields...\n fields.putAll(inputFields);\n\n Set<String> keySet = fields.keySet();\n List<String> entries = new ArrayList<>(keySet);\n\n String[] fieldNames = entries.toArray(new String[entries.size()]);\n Const.sortStrings(fieldNames);\n // Key fields\n ciKey[2].setComboValues(fieldNames);\n ciKey[3].setComboValues(fieldNames);\n }", "private void setComboBox(JComboBox<String> comboBox) {\n comboBox.addItem(\"Select an item\");\n for (Product product : restaurant.getProducts()) {\n comboBox.addItem(product.getName());\n }\n }", "void fillCombo_name(){\n combo_name.setItems(FXCollections.observableArrayList(listComboN));\n }", "private void tampil_kereta() {\n kereta_combo.addItem (\"Argo Parahyangan\");\n kereta_combo.addItem (\"Argo Jati\");\n kereta_combo.addItem (\"Bangun Karta\");\n kereta_combo.addItem (\"Bima\");\n kereta_combo.addItem (\"Kahuripan\");\n kereta_combo.addItem (\"Lodaya\"); \n kereta_combo.addItem (\"Sembari\");\n kereta_combo.addItem (\"Turangga\");\n \n }", "public void initialize() {\n fillCombobox();\n }", "public void setComboBoxValues() {\n String sql = \"select iName from item where iActive=? order by iName asc\";\n \n cbo_iniName.removeAllItems();\n try {\n pst = conn.prepareStatement(sql);\n pst.setString(1,\"Yes\");\n rs = pst.executeQuery();\n \n while (rs.next()) {\n cbo_iniName.addItem(rs.getString(1));\n }\n \n }catch(Exception e) {\n JOptionPane.showMessageDialog(null,\"Item list cannot be loaded\");\n }finally {\n try{\n rs.close();\n pst.close();\n \n }catch(Exception e) {}\n }\n }", "public L5MyList() {\n \n window.setLayout(new BorderLayout());\n window.setDefaultCloseOperation(EXIT_ON_CLOSE);\n\n panel = new JPanel();\n\n cBox = new JComboBox(colorNames);\n cBox.setMaximumRowCount(5);\n cBox.addItemListener(this);\n\n panel.add(cBox);\n window.add(panel, BorderLayout.CENTER);\n\n window.setSize(500, 300);\n window.setVisible(true);\n }", "protected void repaint()\r\n {\r\n if (null != comboBox && null != comboBox.getParent())\r\n {\r\n comboBox.getParent().repaint(comboBox.getX() - 5, comboBox.getY() - 5, comboBox.getWidth() + 10,\r\n comboBox.getHeight() + 10);\r\n }\r\n }", "private void rebuildIDSComboBox(){\n\t\tfinal List<OWLNamedIndividual> IDSes = ko.getIDSes();\n\t\t\n\t\tcomboBox.setModel(new DefaultComboBoxModel() {\n\t\t\t@Override\n\t\t\tpublic Object getElementAt(int index){\n\t\t\t\treturn IDSes.get(index);\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic int getSize(){\n\t\t\t\treturn IDSes.size();\n\t\t\t}\n\t\t});\n\t\t\n\t}", "private void initControlList() {\n this.controlComboBox.addItem(CONTROL_PANELS);\n //this.controlComboBox.addItem(PEER_TEST_CONTROL);\n //this.controlComboBox.addItem(DISAGGREGATION_CONTROL);\n this.controlComboBox.addItem(AXIS_CONTROL);\n this.controlComboBox.addItem(DISTANCE_CONTROL);\n this.controlComboBox.addItem(SITES_OF_INTEREST_CONTROL);\n this.controlComboBox.addItem(CVM_CONTROL);\n this.controlComboBox.addItem(X_VALUES_CONTROL);\n }", "public void initComponents() {\n//metoda gatherBrandSet z klasy CarManager przyjmuje polaczenie do bazy\n carManager.gatherBrandSet(connectionManager.getStatement());\n//petla iterujaca po elementach zbioru marek i dodajaca elementy do listy\n carBrandList.removeAll(carBrandList);\n for(String o: carManager.getBrandSet()){\n\n carBrandList.add(o);\n }\n\n//ustawianie listy jako ChoiceBox w GUI\n brandCBox.setItems(carBrandList);\n\n//Marka Box wrazliwa na zmiany\n brandCBox.getSelectionModel().selectedItemProperty().addListener(new ChangeListener() {\n @Override\n public void changed(ObservableValue observable, Object oldValue, Object newValue) {\n//przesylanie wyboru Marki do CarManager\n carManager.setBrandChoice((String) brandCBox.getValue());\n carManager.gatherModelSet(connectionManager.getStatement());\n//Czyszczenie listy i dodawanie nowych obiektow z ModelSet do ModelList\n carModelList.removeAll(carModelList);\n for (String p : carManager.getModelSet())\n carModelList.add(p);\n\n modelCBox.setItems(carModelList);\n// Listener do zmiany Modelu\n modelCBox.getSelectionModel().selectedItemProperty().addListener(new ChangeListener() {\n @Override\n public void changed(ObservableValue observable, Object oldValue, Object newValue) {\n//Ustawianie wartosci wybranej z przycisku\n carManager.setMarkaChoice((String) modelCBox.getValue());\n// Mechaniz wyboru silnika\n carManager.gatherEngineSet(connectionManager.getStatement());\n\n\n carEngineList.removeAll(carEngineList);\n for(String p: carManager.getEngineSet())\n carEngineList.add(p);\n\n engineCBox.setItems(carEngineList);\n engineCBox.getSelectionModel().selectedItemProperty().addListener(new ChangeListener() {\n @Override\n public void changed(ObservableValue observable, Object oldValue, Object newValue) {\n carManager.setEngineChoice(String.valueOf(engineCBox.getValue()));\n }\n });\n\n\n }\n });\n\n }\n });\n//Pobieranie Elementow z bazy\n elementManager.gatherElementSet(connectionManager.getStatement());\n\n servActivities.setItems(carActivityList);\n servActivities.getSelectionModel().selectedItemProperty().addListener(new ChangeListener() {\n @Override\n public void changed(ObservableValue observable, Object oldValue, Object newValue) {\n\n\n }\n });\n\n carElementList.removeAll(carModelList);\n for(String p: elementManager.getElementSet())\n carElementList.add(p);\n\n elementActivities.setItems(carElementList);\n elementActivities.getSelectionModel().selectedItemProperty().addListener(new ChangeListener() {\n @Override\n public void changed(ObservableValue observable, Object oldValue, Object newValue) {\n elementManager.setElementChoice(String.valueOf(elementActivities.getValue()));\n\n }\n });\n//Ustawianie lat\n yearList.removeAll(yearList);\n for(int i = 2017; i> 1970; i--){\n yearList.add(i);\n }\n yearCBox.setItems(yearList);\n //Przypisywanie do zmiennej\n yearCBox.getSelectionModel().selectedItemProperty().addListener(new ChangeListener() {\n @Override\n public void changed(ObservableValue observable, Object oldValue, Object newValue) {\n carManager.setYearChoice(0);\n carManager.setYearChoice(Integer.valueOf(String.valueOf(yearCBox.getValue())));\n }\n });\n\n}", "private void llenarCombo() {\n cobOrdenar.removeAllItems();\n cobOrdenar.addItem(\"Fecha\");\n cobOrdenar.addItem(\"Nro Likes\");\n cobOrdenar.setSelectedIndex(-1); \n }", "private void initialize()\n {\n this.setPreferredSize(new com.ulcjava.base.application.util.Dimension(549,426));\n this.add(getComboBox(), com.ulcjava.base.application.ULCBorderLayoutPane.NORTH);\n }", "public void fillCombobox() {\n List<String> list = new ArrayList<String>();\n list.add(\"don't link\");\n if (dataHandler.persons.size() == 0) {\n list.add(\"No Persons\");\n ObservableList obList = FXCollections.observableList(list);\n cmb_linkedPerson.setItems(obList);\n cmb_linkedPerson.getSelectionModel().selectFirst();\n } else {\n for (int i = 0; i < dataHandler.persons.size(); i++) {\n list.add(dataHandler.persons.get(i).getName());\n ObservableList obList = FXCollections.observableList(list);\n cmb_linkedPerson.setItems(obList);\n cmb_linkedPerson.getSelectionModel().selectFirst();\n }\n }\n }", "private void initComponents(String label, Object[] items) {\r\n\t\tFormLayout layout = new FormLayout(\"3dlu, 21px, p:g, 21px, 3dlu\", \"3dlu, t:16px, 3dlu\");\r\n\t\t\r\n\t\tthis.setLayout(layout);\r\n\t\t\r\n\t\tthis.add(new JLabel(label), CC.xyw(2, 2, 2));\r\n\t\t\r\n\t\tint row = 2;\r\n\t\t\r\n\t\tif (items != null) {\r\n\t\t\tlayout.appendRow(RowSpec.decode(\"f:21px\"));\r\n\t\t\tlayout.appendRow(RowSpec.decode(\"3dlu\"));\r\n\t\t\t\r\n\t\t\tJComboBox comboBox = new JComboBox(items);\r\n\t\t\tcomboBox.addPopupMenuListener(new BoundsPopupMenuListener(true, false));\r\n\t\t\t((JTextField) comboBox.getEditor().getEditorComponent()).setMargin(new Insets(1, 3, 2, 1));\r\n\t\t\t\r\n\t\t\tthis.add(comboBox, CC.xyw(2, 4, 2));\r\n\t\t\t\r\n\t\t\trow += 2;\r\n\t\t}\r\n\r\n\t\tfinal JToggleButton blockBtn = new JToggleButton(IconConstants.PLUGIN_ICON);\r\n\t\tblockBtn.setRolloverIcon(IconConstants.PLUGIN_ROLLOVER_ICON);\r\n\t\tblockBtn.setPressedIcon(IconConstants.PLUGIN_PRESSED_ICON);\r\n\t\tblockBtn.setOpaque(false);\r\n\t\tblockBtn.setContentAreaFilled(false);\r\n\t\tblockBtn.setBorder(null);\r\n\t\tblockBtn.setFocusPainted(false);\r\n\t\tblockBtn.setToolTipText(\"Append/Remove \" + label + \" Block\");\r\n\r\n\t\tfinal JPopupMenu blockPop = new JPopupMenu();\r\n\t\t\r\n\t\tappendItem = new JMenuItem(\"Append \" + label + \" Block\", IconConstants.ADD_ICON);\r\n\t\tappendItem.setRolloverIcon(IconConstants.ADD_ROLLOVER_ICON);\r\n\t\tappendItem.setPressedIcon(IconConstants.ADD_PRESSED_ICON);\r\n\t\t\r\n\t\tremoveItem = new JMenuItem(\"Remove \" + label + \" Block\", IconConstants.DELETE_ICON);\r\n\t\tremoveItem.setRolloverIcon(IconConstants.DELETE_ROLLOVER_ICON);\r\n\t\tremoveItem.setPressedIcon(IconConstants.DELETE_PRESSED_ICON);\r\n\t\tremoveItem.setEnabled(false);\r\n\t\t\r\n\t\tremoveItem.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\r\n\t\t\t\tremoveBlock();\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tappendItem.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\r\n\t\t\t\tappendBlock();\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tblockPop.add(appendItem);\r\n\t\tblockPop.add(removeItem);\r\n\t\t\r\n\t\tblockBtn.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tblockPop.show(blockBtn, -3, blockBtn.getSize().height / 2 + 11);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tthis.add(blockBtn, CC.xy(4, row));\r\n\t}", "@SuppressWarnings(\"unchecked\")\n\tprivate void switchFrontEnd() {\n\t\tfor(ABoat b : ABmap.instance().boats) {\n\t\t\t((JComboBox<String>)components.get(\"nameComboBox\")).addItem(b.name);\n\t\t}\n\t\t((JPanel)components.get(\"initPanel\")).setVisible(false);\n\t\t((JPanel)components.get(\"controlPanel\")).setBounds(931, 11, 253, 185);\n\t\t((JPanel)components.get(\"controlPanel\")).setVisible(true);\n\t\t((JPanel)components.get(\"generalInfoPanel\")).setBounds(931, 230, 253, 208);\n\t\t((JPanel)components.get(\"generalInfoPanel\")).setVisible(true);\n\t\t((JPanel)components.get(\"boatInfoPanel\")).setBounds(931, 450, 253, 252);\n\t\t((JPanel)components.get(\"boatInfoPanel\")).setVisible(true);\n\t}", "private void RenderCombo()\r\n\t{\r\n\t\tSystem.out.println(\"Setup\");\r\n\t\tList<ProductionOrder> productionOrders = null;\r\n\t\t\t\t\r\n \ttry {\r\n \t\tproductionOrders = this.getProductionOrderService().findProductionOrders(); \r\n \t\tif(productionOrders==null)\r\n \t\t\tSystem.out.println(\"productoinOrders is null\");\r\n\t \t_productionOrderSelect = null;\r\n\t \t_productionOrderSelect = new GenericSelectModel<ProductionOrder>(productionOrders,ProductionOrder.class,\"FormattedDocNo\",\"id\",_access);\r\n\t \tif(_productionOrderSelect==null){\r\n\t \t\tSystem.out.println(\"Setuprender productionOrderselect is null\");\r\n\t \t}\r\n \t}\r\n \tcatch(Exception e)\r\n \t{\r\n \t\t\r\n \t}\r\n \tfinally {\r\n \t\t\r\n \t}\r\n\t}", "void configureComboViewer(ComboViewer comboViewer, EStructuralFeature feature);", "void populateLittlesComboBox(JComboBox box) {\n box.addItem(\"Clear\");\n TreeMap<String, ArrayList<String>> sortedlittles = new TreeMap<>();\n sortedlittles.putAll(matching.littlesPreferences);\n for (Map.Entry lilprefs : sortedlittles.entrySet()) {\n String littleName = lilprefs.getKey().toString();\n box.addItem(littleName);\n }\n }", "public void makeDropDowns() {\n\t\tString[] hoursArray = new String[24];\n\t\tObservableList<Object> hours = FXCollections.observableArrayList();\n\t\tfor (int i = 0; i < hoursArray.length; i++) {\n\t\t\thoursArray[i] = i + \"\";\n\t\t\t\n\t\t\t//Formats the hours to always have two digits\n\t\t\tif (i < 10)\n\t\t\t\thoursArray[i] = \"0\" + i;\n\t\t\t\n\t\t\thours.add(hoursArray[i]);\n\t\t}\n\t\thourDropDown.setItems(hours);\n\n\t\t// Make the minuteDropDown box\n\t\tString[] minutesArray = new String[12];\n\t\tObservableList<Object> minutes = FXCollections.observableArrayList();\n\t\tfor (int i = 0; i < minutesArray.length; i++) {\n\t\t\tminutesArray[i] = i * 5 + \"\";\n\t\t\t\n\t\t\t//Formats the minutes to always have two digits\n\t\t\tif ((i * 5) < 10)\n\t\t\t\tminutesArray[i] = \"0\" + minutesArray[i];\n\t\t\t\n\t\t\tminutes.add(minutesArray[i]);\n\t\t}\n\t\tminuteDropDown.setItems(minutes);\n\t}", "public pansiyon() {\n initComponents();\n for (int i =1900; i <2025; i++) {\n \n cmbkayıtyılı.addItem(Integer.toString(i));\n \n }\n for (int i =1900; i <2025; i++) {\n \n cmbayrılısyılı.addItem(Integer.toString(i));\n \n }\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jTextField1 = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n jButton1 = new javax.swing.JButton();\n jLabel3 = new javax.swing.JLabel();\n jTextField2 = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n jTextField3 = new javax.swing.JTextField();\n jButton2 = new javax.swing.JButton();\n jButton3 = new javax.swing.JButton();\n jButton4 = new javax.swing.JButton();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTextArea1 = new javax.swing.JTextArea();\n jButton5 = new javax.swing.JButton();\n jLabel5 = new javax.swing.JLabel();\n jComboBox1 = new javax.swing.JComboBox<>();\n\n addInternalFrameListener(new javax.swing.event.InternalFrameListener() {\n public void internalFrameActivated(javax.swing.event.InternalFrameEvent evt) {\n formInternalFrameActivated(evt);\n }\n public void internalFrameClosed(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameClosing(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameDeactivated(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameDeiconified(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameIconified(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameOpened(javax.swing.event.InternalFrameEvent evt) {\n }\n });\n\n jLabel1.setFont(new java.awt.Font(\"Arial\", 1, 10)); // NOI18N\n jLabel1.setText(\"* Vehiculo\");\n\n jTextField1.setFont(new java.awt.Font(\"Arial\", 0, 10)); // NOI18N\n\n jLabel2.setFont(new java.awt.Font(\"Arial\", 1, 10)); // NOI18N\n jLabel2.setText(\"Color\");\n\n jButton1.setBackground(new java.awt.Color(255, 255, 255));\n jButton1.setFont(new java.awt.Font(\"Arial\", 1, 10)); // NOI18N\n jButton1.setText(\" \");\n jButton1.setFocusable(false);\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jLabel3.setFont(new java.awt.Font(\"Arial\", 1, 10)); // NOI18N\n jLabel3.setText(\"* Serie\");\n\n jTextField2.setFont(new java.awt.Font(\"Arial\", 0, 10)); // NOI18N\n\n jLabel4.setFont(new java.awt.Font(\"Arial\", 1, 10)); // NOI18N\n jLabel4.setText(\"Placas\");\n\n jTextField3.setFont(new java.awt.Font(\"Arial\", 0, 10)); // NOI18N\n\n jButton2.setBackground(new java.awt.Color(255, 255, 255));\n jButton2.setFont(new java.awt.Font(\"Arial\", 1, 10)); // NOI18N\n jButton2.setText(\"Agregar\");\n jButton2.setFocusable(false);\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jButton3.setBackground(new java.awt.Color(255, 255, 255));\n jButton3.setFont(new java.awt.Font(\"Arial\", 1, 10)); // NOI18N\n jButton3.setText(\"Cancelar\");\n jButton3.setFocusable(false);\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n\n jButton4.setBackground(new java.awt.Color(255, 255, 255));\n jButton4.setFont(new java.awt.Font(\"Arial\", 1, 10)); // NOI18N\n jButton4.setText(\"Actualizar\");\n jButton4.setFocusable(false);\n jButton4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton4ActionPerformed(evt);\n }\n });\n\n jTextArea1.setColumns(20);\n jTextArea1.setFont(new java.awt.Font(\"Dialog\", 0, 10)); // NOI18N\n jTextArea1.setLineWrap(true);\n jTextArea1.setRows(5);\n jTextArea1.setWrapStyleWord(true);\n jTextArea1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, \"Comentario\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Dialog\", 1, 8))); // NOI18N\n jScrollPane1.setViewportView(jTextArea1);\n\n jButton5.setBackground(new java.awt.Color(255, 255, 255));\n jButton5.setFont(new java.awt.Font(\"Arial\", 1, 10)); // NOI18N\n jButton5.setText(\"Eliminar\");\n jButton5.setFocusable(false);\n\n jLabel5.setFont(new java.awt.Font(\"Dialog\", 1, 10)); // NOI18N\n jLabel5.setText(\"Agencia\");\n\n jComboBox1.setFont(new java.awt.Font(\"Dialog\", 1, 10)); // NOI18N\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel3)\n .addGap(29, 29, 29)))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel5)\n .addGap(22, 22, 22)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jTextField1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 230, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 230, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 406, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jButton5)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton2))))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel4)\n .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton4)\n .addComponent(jButton3)\n .addComponent(jButton2)\n .addComponent(jButton5))\n .addContainerGap(15, Short.MAX_VALUE))\n );\n\n pack();\n }", "public void toggleComboBoxes() {\n this.toggleBookComboBoxes();\n this.toggleCharacterComboBoxes();\n }", "public void setupPlannerMealComboboxs(ComboBox<Recipe> genericCombo){\n genericCombo.setCellFactory(new Callback<ListView<Recipe>, ListCell<Recipe>>() {\n @Override\n public ListCell<Recipe> call(ListView<Recipe> recipeListView) {\n return new ListCell<Recipe>() {\n @Override\n protected void updateItem(Recipe recipe, boolean b) {\n super.updateItem(recipe, b);\n if (!b) {\n setText(recipe.getName());\n setFont(InterfaceStyling.textFieldFont);\n }\n }\n };\n }\n });\n\n genericCombo.setButtonCell(new ListCell<>() {\n @Override\n protected void updateItem(Recipe recipe, boolean b) {\n System.out.println(\"From: \" + genericCombo.getId() + \" B: \" + b);\n super.updateItem(recipe, b);\n if (b) {\n setText(\"\");\n } else {\n setText(recipe.getName());\n setFont(InterfaceStyling.textFieldFont);\n System.out.println(\"From: \" + genericCombo.getId() + \" Recipe: \" + recipe.getName() + \" \" + recipe.toString());\n }\n\n }\n });\n }", "private void initComponents() {\r\n\r\n jLabel1 = new javax.swing.JLabel();\r\n manageCompoundJButton = new javax.swing.JButton();\r\n enterpriseLabel = new javax.swing.JLabel();\r\n valueLabel = new javax.swing.JLabel();\r\n drugComboBox = new javax.swing.JComboBox();\r\n\r\n setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\r\n\r\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 24)); // NOI18N\r\n jLabel1.setText(\"My Work Area -Supplier Role\");\r\n add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 40, -1, -1));\r\n\r\n manageCompoundJButton.setText(\"Manage Compound\");\r\n manageCompoundJButton.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n manageCompoundJButtonActionPerformed(evt);\r\n }\r\n });\r\n add(manageCompoundJButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(200, 290, -1, -1));\r\n\r\n enterpriseLabel.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\r\n enterpriseLabel.setText(\"EnterPrise :\");\r\n add(enterpriseLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 90, 120, 30));\r\n\r\n valueLabel.setText(\"<value>\");\r\n add(valueLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 100, 130, -1));\r\n\r\n drugComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\r\n add(drugComboBox, new org.netbeans.lib.awtextra.AbsoluteConstraints(170, 210, 210, -1));\r\n }", "public void populateQualityCombo() {\n\n // Making a list of poster qualities\n List<KeyValuePair> qualityList = new ArrayList<KeyValuePair>() {{\n\n add(new KeyValuePair(Constants.MEDIA_QUALITY_w92, \"Thumbnail\\t[ 92x138 ]\"));\n add(new KeyValuePair(Constants.MEDIA_QUALITY_w154, \"Tiny\\t\\t\\t[ 154x231 ]\"));\n add(new KeyValuePair(Constants.MEDIA_QUALITY_w185, \"Small\\t\\t[ 185x278 ]\"));\n add(new KeyValuePair(Constants.MEDIA_QUALITY_w342, \"Medium\\t\\t[ 342x513 ]\"));\n add(new KeyValuePair(Constants.MEDIA_QUALITY_w500, \"Large\\t\\t[ 500x750 ]\"));\n add(new KeyValuePair(Constants.MEDIA_QUALITY_w780, \"xLarge\\t\\t[ 780x1170 ]\"));\n add(new KeyValuePair(Constants.MEDIA_QUALITY_original, \"xxLarge\\t\\t[ HD ]\"));\n }};\n\n // Converting the list to an observable list\n ObservableList<KeyValuePair> obList = FXCollections.observableList(qualityList);\n\n // Filling the ComboBox\n cbPosterQuality.setItems(obList);\n\n // Setting the default value for the ComboBox\n cbPosterQuality.getSelectionModel().select(preferences.getInt(\"mediaQuality\", 3));\n }", "@SuppressWarnings(\"unchecked\")\n private void addComboBox() throws Exception{\n\n Connection con = Coagent.getConnection();\n PreparedStatement query = con.prepareStatement(\"SELECT Publisher_Name FROM publishers;\");\n ResultSet result = query.executeQuery();\n\n while(result.next()){\n jComboBoxAdd.addItem(result.getString(1));\n }\n }", "public void dropDownInventory(ComboBox combo) throws SQLException {\r\n dataAccess = new Connection_SQL(\"jdbc:mysql://localhost:3306/items\", \"root\", \"P@ssword123\");\r\n combo.setItems(dataAccess.menuInventory());\r\n }", "public FrmEjemploCombo() {\n initComponents();\n \n cargarAutos();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n lblPlanEstudio = new javax.swing.JLabel();\n comboBox = new ComboBoxPlanEstudios();\n btnAceptar = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"Planes de estudio\");\n setIconImage(new javax.swing.ImageIcon(getClass().getResource(\"/GUI/iconos/calendario.png\")).getImage());\n setResizable(false);\n\n lblPlanEstudio.setText(\"Plan de estudio:\");\n\n btnAceptar.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/GUI/iconos/aceptarPeque.png\"))); // NOI18N\n btnAceptar.setText(\"Aceptar\");\n btnAceptar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnAceptarActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(lblPlanEstudio)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(comboBox, 0, 319, Short.MAX_VALUE)\n .addContainerGap())\n .addGroup(layout.createSequentialGroup()\n .addGap(165, 165, 165)\n .addComponent(btnAceptar)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(19, 19, 19)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(lblPlanEstudio)\n .addComponent(comboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 15, Short.MAX_VALUE)\n .addComponent(btnAceptar)\n .addContainerGap())\n );\n\n pack();\n setLocationRelativeTo(null);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jPanel1 = new javax.swing.JPanel();\n jPanel2 = new javax.swing.JPanel();\n jPanel3 = new javax.swing.JPanel();\n combo_races = new javax.swing.JComboBox<>();\n scroll_flavor = new javax.swing.JScrollPane();\n txt_pane_flavor = new javax.swing.JTextPane();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n lbl_languages = new javax.swing.JLabel();\n lbl_attribute_bonuses = new javax.swing.JLabel();\n\n setLayout(new java.awt.BorderLayout());\n\n jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/ico_race_deck_title.png\"))); // NOI18N\n add(jLabel1, java.awt.BorderLayout.PAGE_START);\n\n jPanel1.setLayout(new java.awt.BorderLayout());\n\n jPanel2.setLayout(new java.awt.BorderLayout());\n jPanel1.add(jPanel2, java.awt.BorderLayout.PAGE_START);\n\n jPanel3.setLayout(null);\n\n combo_races.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"None\" }));\n combo_races.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n combo_racesItemStateChanged(evt);\n }\n });\n jPanel3.add(combo_races);\n combo_races.setBounds(20, 40, 250, 20);\n\n txt_pane_flavor.setEditable(false);\n scroll_flavor.setViewportView(txt_pane_flavor);\n\n jPanel3.add(scroll_flavor);\n scroll_flavor.setBounds(20, 72, 250, 380);\n\n jLabel2.setText(\"Select your Race here...\");\n jPanel3.add(jLabel2);\n jLabel2.setBounds(20, 10, 250, 14);\n\n jLabel3.setText(\"Attributes:\");\n jPanel3.add(jLabel3);\n jLabel3.setBounds(20, 460, 60, 14);\n\n jLabel4.setText(\"Languages: \");\n jPanel3.add(jLabel4);\n jLabel4.setBounds(20, 480, 70, 14);\n\n lbl_languages.setText(\"None\");\n jPanel3.add(lbl_languages);\n lbl_languages.setBounds(90, 480, 200, 14);\n\n lbl_attribute_bonuses.setText(\"None\");\n jPanel3.add(lbl_attribute_bonuses);\n lbl_attribute_bonuses.setBounds(90, 460, 200, 14);\n\n jPanel1.add(jPanel3, java.awt.BorderLayout.CENTER);\n\n add(jPanel1, java.awt.BorderLayout.CENTER);\n }", "private void loadCustomerCombo() {\n ArrayList<CustomerDTO> allCustomers;\n try {\n allCustomers = ctrlCustomer.get();\n for (CustomerDTO customer : allCustomers) {\n custIdCombo.addItem(customer.getId());\n }\n } catch (Exception ex) {\n Logger.getLogger(PlaceOrderForm.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n }", "public TableComboBox() {}", "private void setClientsIntoComboBox() {\n if (mainModel.getClientList() != null) {\n try {\n mainModel.loadClients();\n cboClients.getItems().clear();\n cboClients.getItems().addAll(mainModel.getClientList());\n } catch (ModelException ex) {\n alertManager.showAlert(\"Could not get the clients.\", \"An error occured: \" + ex.getMessage());\n }\n }\n }", "private void actualizarComboboxCursos() {\n\t\tint curso;\n\n\t\tDefaultComboBoxModel dcbm = new DefaultComboBoxModel();\n\t\tdcbm.removeAllElements();\n\n\t\tLinkedHashSet<Integer> resultado = modelo.obtenerCursos();\n\t\tIterator it = resultado.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tcurso = (int) it.next();\n\n\t\t\tdcbm.addElement(curso);\n\t\t}\n\t\tjfad.cBCursos.setModel(dcbm);\n\t\tjfad.cBCursosMod.setModel(dcbm);\n\t\tSystem.out.println(dcbm.getSelectedItem());\n\t}", "private static void createAndShowGUI() {\n JFrame frame = new JFrame(\"Combo box editabel\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n //2. kreirati kontrole i pobacati kako nam kaže neki manager LayoutManager\n JComponent comboBoxPanel = new ComboBoxPanel2();\n comboBoxPanel.setOpaque(true);\n frame.setContentPane(comboBoxPanel);\n\n //3. prikazati prozor\n frame.pack();\n frame.setVisible(true);\n }", "public ItemsControl() {\t\t\t\t\n\t\tlistListener = new SourceListChangeListener();\n\n\t\tBoxLayout boxLayout = new BoxLayout(this, BoxLayout.Y_AXIS);\n\t\tsetLayout(boxLayout);\t\t\t\t\n\t\tif (Beans.isDesignTime()) {\t\t\t\n\t\t\tJLabel designTimeCaptionLbl = new JLabel(\"<ItemsControl>\");\t\t\t\t\t\t\n\t\t\tthis.add(designTimeCaptionLbl);\n\t\t}\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jComboBox1 = new javax.swing.JComboBox<>();\n jPanel1 = new javax.swing.JPanel();\n jPanel2 = new javax.swing.JPanel();\n jPanel3 = new javax.swing.JPanel();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jButton3 = new javax.swing.JButton();\n jPanel4 = new javax.swing.JPanel();\n jButton4 = new javax.swing.JButton();\n jButton5 = new javax.swing.JButton();\n jButton6 = new javax.swing.JButton();\n jPanel7 = new javax.swing.JPanel();\n jButton13 = new javax.swing.JButton();\n jButton14 = new javax.swing.JButton();\n jButton15 = new javax.swing.JButton();\n jPanel8 = new javax.swing.JPanel();\n jButton16 = new javax.swing.JButton();\n jButton17 = new javax.swing.JButton();\n jButton18 = new javax.swing.JButton();\n jPanel9 = new javax.swing.JPanel();\n jButton19 = new javax.swing.JButton();\n jButton20 = new javax.swing.JButton();\n jButton21 = new javax.swing.JButton();\n jPanel10 = new javax.swing.JPanel();\n jButton22 = new javax.swing.JButton();\n jButton23 = new javax.swing.JButton();\n jButton24 = new javax.swing.JButton();\n jPanel11 = new javax.swing.JPanel();\n jButton25 = new javax.swing.JButton();\n jButton26 = new javax.swing.JButton();\n jButton27 = new javax.swing.JButton();\n jPanel12 = new javax.swing.JPanel();\n jButton28 = new javax.swing.JButton();\n jButton29 = new javax.swing.JButton();\n jButton30 = new javax.swing.JButton();\n jPanel13 = new javax.swing.JPanel();\n jButton31 = new javax.swing.JButton();\n jButton32 = new javax.swing.JButton();\n jButton33 = new javax.swing.JButton();\n jLabel2 = new javax.swing.JLabel();\n jPanel14 = new javax.swing.JPanel();\n jPanel15 = new javax.swing.JPanel();\n jButton34 = new javax.swing.JButton();\n jPanel16 = new javax.swing.JPanel();\n jButton37 = new javax.swing.JButton();\n jPanel17 = new javax.swing.JPanel();\n jButton35 = new javax.swing.JButton();\n jButton36 = new javax.swing.JButton();\n jButton38 = new javax.swing.JButton();\n jButton39 = new javax.swing.JButton();\n jButton40 = new javax.swing.JButton();\n jButton41 = new javax.swing.JButton();\n jPanel18 = new javax.swing.JPanel();\n jTextField2 = new javax.swing.JTextField();\n jTextField3 = new javax.swing.JTextField();\n jTextField4 = new javax.swing.JTextField();\n jTextField5 = new javax.swing.JTextField();\n jTextField6 = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jPanel19 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n jTextField1 = new javax.swing.JTextField();\n jPanel20 = new javax.swing.JPanel();\n jPanel5 = new javax.swing.JPanel();\n jButton7 = new javax.swing.JButton();\n jButton8 = new javax.swing.JButton();\n jButton9 = new javax.swing.JButton();\n jButton10 = new javax.swing.JButton();\n\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setUndecorated(true);\n\n jPanel2.setBackground(new java.awt.Color(204, 204, 204));\n\n jButton1.setText(\"3\");\n jButton1.setFocusPainted(false);\n\n jButton2.setText(\"2\");\n jButton2.setFocusPainted(false);\n\n jButton3.setText(\"1\");\n jButton3.setFocusPainted(false);\n\n javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);\n jPanel3.setLayout(jPanel3Layout);\n jPanel3Layout.setHorizontalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton1)\n .addComponent(jButton2)\n .addComponent(jButton3))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel3Layout.setVerticalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()\n .addContainerGap(33, Short.MAX_VALUE)\n .addComponent(jButton1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton3)\n .addContainerGap())\n );\n\n jButton4.setText(\"6\");\n jButton4.setFocusPainted(false);\n\n jButton5.setText(\"5\");\n jButton5.setFocusPainted(false);\n\n jButton6.setText(\"4\");\n jButton6.setFocusPainted(false);\n\n javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);\n jPanel4.setLayout(jPanel4Layout);\n jPanel4Layout.setHorizontalGroup(\n jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton4)\n .addComponent(jButton5)\n .addComponent(jButton6))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel4Layout.setVerticalGroup(\n jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton5)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton6)\n .addContainerGap())\n );\n\n jButton13.setText(\"9\");\n jButton13.setFocusPainted(false);\n\n jButton14.setText(\"8\");\n jButton14.setFocusPainted(false);\n\n jButton15.setText(\"7\");\n jButton15.setFocusPainted(false);\n\n javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);\n jPanel7.setLayout(jPanel7Layout);\n jPanel7Layout.setHorizontalGroup(\n jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel7Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton13)\n .addComponent(jButton14)\n .addComponent(jButton15))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel7Layout.setVerticalGroup(\n jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel7Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton13)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton14)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton15)\n .addContainerGap())\n );\n\n jPanel8.setBackground(new java.awt.Color(255, 204, 204));\n jPanel8.setBorder(new javax.swing.border.MatteBorder(null));\n\n jButton16.setText(\"12\");\n jButton16.setFocusPainted(false);\n\n jButton17.setText(\"11\");\n jButton17.setFocusPainted(false);\n\n jButton18.setText(\"10\");\n jButton18.setFocusPainted(false);\n\n javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);\n jPanel8.setLayout(jPanel8Layout);\n jPanel8Layout.setHorizontalGroup(\n jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel8Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton16)\n .addComponent(jButton17)\n .addComponent(jButton18))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel8Layout.setVerticalGroup(\n jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel8Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton16)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton17)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton18)\n .addContainerGap())\n );\n\n jPanel9.setBackground(new java.awt.Color(255, 204, 204));\n jPanel9.setBorder(new javax.swing.border.MatteBorder(null));\n\n jButton19.setText(\"15\");\n jButton19.setFocusPainted(false);\n\n jButton20.setText(\"14\");\n jButton20.setFocusPainted(false);\n\n jButton21.setText(\"13\");\n jButton21.setFocusPainted(false);\n\n javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);\n jPanel9.setLayout(jPanel9Layout);\n jPanel9Layout.setHorizontalGroup(\n jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel9Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton19)\n .addComponent(jButton20)\n .addComponent(jButton21))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel9Layout.setVerticalGroup(\n jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel9Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton19)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton20)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton21)\n .addContainerGap())\n );\n\n jPanel10.setBackground(new java.awt.Color(255, 204, 204));\n jPanel10.setBorder(new javax.swing.border.MatteBorder(null));\n\n jButton22.setText(\"18\");\n jButton22.setFocusPainted(false);\n\n jButton23.setText(\"17\");\n jButton23.setFocusPainted(false);\n\n jButton24.setText(\"16\");\n jButton24.setFocusPainted(false);\n\n javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10);\n jPanel10.setLayout(jPanel10Layout);\n jPanel10Layout.setHorizontalGroup(\n jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel10Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton22)\n .addComponent(jButton23)\n .addComponent(jButton24))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel10Layout.setVerticalGroup(\n jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel10Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton22)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton23)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton24)\n .addContainerGap())\n );\n\n jPanel11.setBackground(new java.awt.Color(153, 153, 255));\n jPanel11.setBorder(new javax.swing.border.MatteBorder(null));\n\n jButton25.setText(\"21\");\n jButton25.setFocusPainted(false);\n\n jButton26.setText(\"20\");\n jButton26.setFocusPainted(false);\n\n jButton27.setText(\"19\");\n jButton27.setFocusPainted(false);\n\n javax.swing.GroupLayout jPanel11Layout = new javax.swing.GroupLayout(jPanel11);\n jPanel11.setLayout(jPanel11Layout);\n jPanel11Layout.setHorizontalGroup(\n jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel11Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton25)\n .addComponent(jButton26)\n .addComponent(jButton27))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel11Layout.setVerticalGroup(\n jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel11Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton25)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton26)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton27)\n .addContainerGap())\n );\n\n jPanel12.setBackground(new java.awt.Color(153, 153, 255));\n jPanel12.setBorder(new javax.swing.border.MatteBorder(null));\n\n jButton28.setText(\"24\");\n jButton28.setFocusPainted(false);\n\n jButton29.setText(\"23\");\n jButton29.setFocusPainted(false);\n\n jButton30.setText(\"22\");\n jButton30.setFocusPainted(false);\n\n javax.swing.GroupLayout jPanel12Layout = new javax.swing.GroupLayout(jPanel12);\n jPanel12.setLayout(jPanel12Layout);\n jPanel12Layout.setHorizontalGroup(\n jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel12Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton28)\n .addComponent(jButton29)\n .addComponent(jButton30))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel12Layout.setVerticalGroup(\n jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel12Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton28)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton29)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton30)\n .addContainerGap())\n );\n\n jButton31.setText(\"27\");\n jButton31.setFocusPainted(false);\n\n jButton32.setText(\"26\");\n jButton32.setFocusPainted(false);\n\n jButton33.setText(\"25\");\n jButton33.setFocusPainted(false);\n\n javax.swing.GroupLayout jPanel13Layout = new javax.swing.GroupLayout(jPanel13);\n jPanel13.setLayout(jPanel13Layout);\n jPanel13Layout.setHorizontalGroup(\n jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel13Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton31)\n .addComponent(jButton32)\n .addComponent(jButton33))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel13Layout.setVerticalGroup(\n jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel13Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton31)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton32)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton33)\n .addContainerGap())\n );\n\n jLabel2.setText(\"Hospitalización\");\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jPanel11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jPanel12, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jPanel13, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jLabel2))\n .addContainerGap(22, Short.MAX_VALUE))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(9, 9, 9)\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel13, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel12, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel11, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel10, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jPanel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap())\n );\n\n jPanel14.setBackground(new java.awt.Color(204, 204, 204));\n\n jButton34.setText(\"A-2\");\n jButton34.setBorder(null);\n jButton34.setFocusPainted(false);\n\n javax.swing.GroupLayout jPanel15Layout = new javax.swing.GroupLayout(jPanel15);\n jPanel15.setLayout(jPanel15Layout);\n jPanel15Layout.setHorizontalGroup(\n jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel15Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jButton34, javax.swing.GroupLayout.DEFAULT_SIZE, 44, Short.MAX_VALUE)\n .addContainerGap())\n );\n jPanel15Layout.setVerticalGroup(\n jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel15Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton34, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(38, 38, 38))\n );\n\n jButton37.setText(\"A-1\");\n jButton37.setBorder(null);\n jButton37.setFocusPainted(false);\n\n javax.swing.GroupLayout jPanel16Layout = new javax.swing.GroupLayout(jPanel16);\n jPanel16.setLayout(jPanel16Layout);\n jPanel16Layout.setHorizontalGroup(\n jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel16Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jButton37, javax.swing.GroupLayout.DEFAULT_SIZE, 44, Short.MAX_VALUE)\n .addContainerGap())\n );\n jPanel16Layout.setVerticalGroup(\n jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel16Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton37, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(37, 37, 37))\n );\n\n javax.swing.GroupLayout jPanel14Layout = new javax.swing.GroupLayout(jPanel14);\n jPanel14.setLayout(jPanel14Layout);\n jPanel14Layout.setHorizontalGroup(\n jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel14Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel16, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jPanel15, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n jPanel14Layout.setVerticalGroup(\n jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel14Layout.createSequentialGroup()\n .addGap(11, 11, 11)\n .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel14Layout.createSequentialGroup()\n .addComponent(jPanel16, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 1, Short.MAX_VALUE))\n .addComponent(jPanel15, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addContainerGap())\n );\n\n jPanel17.setBackground(new java.awt.Color(204, 204, 204));\n\n jButton35.setText(\"Masculino\");\n jButton35.setBorder(null);\n jButton35.setFocusPainted(false);\n jButton35.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton35ActionPerformed(evt);\n }\n });\n\n jButton36.setText(\"Femenino\");\n jButton36.setBorder(null);\n jButton36.setFocusPainted(false);\n\n jButton38.setText(\"Pediatrico\");\n jButton38.setBorder(null);\n jButton38.setFocusPainted(false);\n\n jButton39.setText(\"Ginecologia\");\n jButton39.setBorder(null);\n jButton39.setFocusPainted(false);\n jButton39.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton39ActionPerformed(evt);\n }\n });\n\n jButton40.setText(\"C. General\");\n jButton40.setBorder(null);\n jButton40.setFocusPainted(false);\n jButton40.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton40ActionPerformed(evt);\n }\n });\n\n jButton41.setText(\"M. General\");\n jButton41.setBorder(null);\n jButton41.setFocusPainted(false);\n jButton41.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton41ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel17Layout = new javax.swing.GroupLayout(jPanel17);\n jPanel17.setLayout(jPanel17Layout);\n jPanel17Layout.setHorizontalGroup(\n jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel17Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel17Layout.createSequentialGroup()\n .addGroup(jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jButton36, javax.swing.GroupLayout.DEFAULT_SIZE, 61, Short.MAX_VALUE)\n .addComponent(jButton35, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton39, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton40, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(jPanel17Layout.createSequentialGroup()\n .addComponent(jButton38, javax.swing.GroupLayout.PREFERRED_SIZE, 61, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton41, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(158, Short.MAX_VALUE))\n );\n jPanel17Layout.setVerticalGroup(\n jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel17Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton35, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton39, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton36, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton40, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton38, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton41, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap())\n );\n\n jPanel18.setBackground(new java.awt.Color(204, 204, 204));\n\n jLabel3.setText(\"Nombre (s):\");\n\n jLabel4.setText(\"Primer Apellido:\");\n\n jLabel5.setText(\"Segundo apellido:\");\n\n jLabel6.setText(\"Edad:\");\n\n jLabel7.setText(\"Diagnostico:\");\n\n javax.swing.GroupLayout jPanel18Layout = new javax.swing.GroupLayout(jPanel18);\n jPanel18.setLayout(jPanel18Layout);\n jPanel18Layout.setHorizontalGroup(\n jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel18Layout.createSequentialGroup()\n .addGap(26, 26, 26)\n .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 187, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, 187, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, 187, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, 187, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, 187, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3)\n .addComponent(jLabel4)\n .addComponent(jLabel5)\n .addComponent(jLabel6)\n .addComponent(jLabel7))\n .addContainerGap(40, Short.MAX_VALUE))\n );\n jPanel18Layout.setVerticalGroup(\n jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel18Layout.createSequentialGroup()\n .addGap(25, 25, 25)\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel4)\n .addGap(1, 1, 1)\n .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jLabel5)\n .addGap(1, 1, 1)\n .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel6)\n .addGap(2, 2, 2)\n .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel7)\n .addGap(2, 2, 2)\n .addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n jPanel19.setBackground(new java.awt.Color(204, 204, 204));\n\n jLabel1.setText(\"Busqueda paciente hospitalizado:\");\n\n javax.swing.GroupLayout jPanel19Layout = new javax.swing.GroupLayout(jPanel19);\n jPanel19.setLayout(jPanel19Layout);\n jPanel19Layout.setHorizontalGroup(\n jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel19Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 241, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel19Layout.setVerticalGroup(\n jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel19Layout.createSequentialGroup()\n .addContainerGap(14, Short.MAX_VALUE)\n .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap())\n );\n\n jPanel20.setBackground(new java.awt.Color(204, 204, 204));\n\n jButton7.setText(\"U-1\");\n jButton7.setBorder(null);\n jButton7.setFocusPainted(false);\n\n jButton8.setText(\"U-2\");\n jButton8.setBorder(null);\n jButton8.setFocusPainted(false);\n\n jButton9.setText(\"U-3\");\n jButton9.setBorder(null);\n jButton9.setFocusPainted(false);\n\n jButton10.setText(\"U-4\");\n jButton10.setBorder(null);\n jButton10.setFocusPainted(false);\n\n javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);\n jPanel5.setLayout(jPanel5Layout);\n jPanel5Layout.setHorizontalGroup(\n jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addGap(32, 32, 32)\n .addComponent(jButton7, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(41, 41, 41)\n .addComponent(jButton8, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(41, 41, 41)\n .addComponent(jButton9, javax.swing.GroupLayout.PREFERRED_SIZE, 116, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton10, javax.swing.GroupLayout.PREFERRED_SIZE, 118, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(41, 41, 41))\n );\n jPanel5Layout.setVerticalGroup(\n jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addGap(10, 10, 10)\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton10, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton9, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jButton7, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(4, 4, 4)))\n .addContainerGap(12, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout jPanel20Layout = new javax.swing.GroupLayout(jPanel20);\n jPanel20.setLayout(jPanel20Layout);\n jPanel20Layout.setHorizontalGroup(\n jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel20Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n jPanel20Layout.setVerticalGroup(\n jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel20Layout.createSequentialGroup()\n .addContainerGap(12, Short.MAX_VALUE)\n .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jPanel19, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jPanel20, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel17, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jPanel14, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanel18, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap())\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel19, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanel14, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jPanel17, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jPanel20, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n .addComponent(jPanel18, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addContainerGap())\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n );\n\n pack();\n }", "private void resetComboBoxes() {\n // empty dropdowns\n boxPlayer1.getItems().clear();\n boxPlayer2.getItems().clear();\n boxPlayer3.getItems().clear();\n boxPlayer4.getItems().clear();\n\n // create list for dropdowns\n if (!dbAccess.openConn()) {\n showAlertDBError();\n return;\n }\n ObservableList<String> playersBox1 = FXCollections.observableArrayList();\n ObservableList<String> playersBox2 = FXCollections.observableArrayList();\n ObservableList<String> playersBox3 = FXCollections.observableArrayList();\n ObservableList<String> playersBox4 = FXCollections.observableArrayList();\n\n // VERSION 1 (at least one game finished)\n // get all players that have at least one finished game\n // selecting just all players would reduce time to open window a lot\n// List<Map<String, Object>> resultList = dbAccess.selectSQL(\"SELECT * FROM players \" +\n// \"INNER JOIN participants ON participants.player = players.id \" +\n// \"INNER JOIn games ON participants.game = games.id \" +\n// \"WHERE games.end_time IS NOT null GROUP BY players.name;\");\n\n // VERSION 2 (all players)\n List<Map<String, Object>> resultList = dbAccess.selectSQL(\"SELECT * FROM players\");\n if (resultList == null) {\n showAlertDBError();\n return;\n } else {\n for (Map<String, Object> row : resultList) {\n playersBox1.add((String) row.get(\"name\"));\n playersBox2.add((String) row.get(\"name\"));\n playersBox3.add((String) row.get(\"name\"));\n playersBox4.add((String) row.get(\"name\"));\n }\n }\n // sort lists\n Collections.sort(playersBox1);\n Collections.sort(playersBox2);\n Collections.sort(playersBox3);\n Collections.sort(playersBox4);\n playersBox1.add(0, \"None\");\n playersBox2.add(0, \"None\");\n playersBox3.add(0, \"None\");\n playersBox4.add(0, \"None\");\n // fill comboBoxes\n boxPlayer1.getItems().addAll(playersBox1);\n boxPlayer1.getSelectionModel().selectFirst();\n boxPlayer2.getItems().addAll(playersBox2);\n boxPlayer2.getSelectionModel().selectFirst();\n boxPlayer3.getItems().addAll(playersBox3);\n boxPlayer3.getSelectionModel().selectFirst();\n boxPlayer4.getItems().addAll(playersBox4);\n boxPlayer4.getSelectionModel().selectFirst();\n }", "public void buildConsultantComboBox(){\r\n combo_user.getSelectionModel().selectFirst(); // Select the first element\r\n \r\n // Update each timewindow to show the string representation of the window\r\n Callback<ListView<User>, ListCell<User>> factory = lv -> new ListCell<User>(){\r\n @Override\r\n protected void updateItem(User user, boolean empty) {\r\n super.updateItem(user, empty);\r\n setText(empty ? \"\" : user.getName());\r\n }\r\n };\r\n \r\n combo_user.setCellFactory(factory);\r\n combo_user.setButtonCell(factory.call(null)); \r\n }", "public void addLocationToComboBox() throws Exception{}", "private void buildComboPanel(){\n //Create the combo panel\n comboPanel = new JPanel();\n \n //Combo box\n laneType = new JComboBox(lanes);\n \n //Allow the user to type input into combo field\n laneType.setEditable(true);\n \n comboLabel = new JLabel(\"Lane: \");\n \n //Add the components to the panel\n comboPanel.add(comboLabel);\n comboPanel.add(laneType);\n }", "private void initComponents() {\n java.awt.GridBagConstraints gridBagConstraints;\n\n lblPlatform = new javax.swing.JLabel();\n platformComboBox = new javax.swing.JComboBox();\n btnManagePlatforms = new javax.swing.JButton();\n filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 100), new java.awt.Dimension(0, 0));\n progressLabel = new javax.swing.JLabel();\n progressPanel = new javax.swing.JPanel();\n\n setLayout(new java.awt.GridBagLayout());\n\n lblPlatform.setLabelFor(platformComboBox);\n lblPlatform.setText(org.openide.util.NbBundle.getMessage(PanelOptionsVisual.class, \"LBL_Platform_ComboBox\")); // NOI18N\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.BASELINE_LEADING;\n gridBagConstraints.insets = new java.awt.Insets(5, 0, 5, 12);\n add(lblPlatform, gridBagConstraints);\n lblPlatform.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PanelOptionsVisual.class, \"ACSN_labelPlatform\")); // NOI18N\n lblPlatform.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PanelOptionsVisual.class, \"ACSD_labelPlatform\")); // NOI18N\n\n platformComboBox.setModel(platformsModel);\n platformComboBox.setRenderer(platformsCellRenderer);\n platformComboBox.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n platformComboBoxItemStateChanged(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.BASELINE_LEADING;\n gridBagConstraints.weightx = 0.1;\n gridBagConstraints.insets = new java.awt.Insets(5, 0, 5, 0);\n add(platformComboBox, gridBagConstraints);\n\n org.openide.awt.Mnemonics.setLocalizedText(btnManagePlatforms, org.openide.util.NbBundle.getMessage(PanelOptionsVisual.class, \"LBL_PanelOptions_Manage_Button\")); // NOI18N\n btnManagePlatforms.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnManagePlatformsActionPerformed(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.BASELINE_TRAILING;\n gridBagConstraints.insets = new java.awt.Insets(5, 10, 5, 0);\n add(btnManagePlatforms, gridBagConstraints);\n btnManagePlatforms.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PanelOptionsVisual.class, \"ACSN_buttonManagePlatforms\")); // NOI18N\n btnManagePlatforms.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PanelOptionsVisual.class, \"ACSD_buttonManagePlatforms\")); // NOI18N\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;\n gridBagConstraints.weighty = 0.1;\n add(filler1, gridBagConstraints);\n\n progressLabel.setText(org.openide.util.NbBundle.getMessage(PanelOptionsVisual.class, \"LBL_Platform_Progress\")); // NOI18N\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 3;\n gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;\n add(progressLabel, gridBagConstraints);\n progressLabel.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PanelOptionsVisual.class, \"ACSN_platformProgress\")); // NOI18N\n progressLabel.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PanelOptionsVisual.class, \"ACSD_platformProgress\")); // NOI18N\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 4;\n gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.weightx = 0.1;\n add(progressPanel, gridBagConstraints);\n }", "private void populateMyLocationsBox(){\n\t\t\t//locBar.removeActionListener(Jcombo);\n\t\t\tlocBar.removeAllItems();\n\t\t\tfor (int i = 0; i < app.getMyLocations().length; i ++){\n\t\t\t\tlocation tempLoc = app.getMyLocations()[i];\n\t\t\t\tif (tempLoc.getCityID() != 0){\n\t\t\t\t\tString val = tempLoc.getName() + \", \" + tempLoc.getCountryCode() + \" Lat: \" + tempLoc.getLatitude() + \" Long: \" + tempLoc.getLongitude();\n\t\t\t\t\tlocBar.addItem(val);\n\t\t\t\t} \n\t\t\t}\n\t\t\tif (locBar.getItemCount() == 0){\n\t\t\t\tlocBar.addItem(\"--Empty--\");\n\t\t\t} else {\n\t\t\t\tlocBar.addItem(\"--Remove?--\");\n\t\t\t}\n\t\t\tlocBar.addActionListener(Jcombo);\n\t\t}", "private void fillPanel(){\n populateLittlesComboBox(littlesRankingsBox);\n populateLittlesComboBox(whoRanksLittleBox);\n populateBigsComboBox(bigsRankingsBox);\n populateBigsComboBox(whoRanksBigBox);\n\n }", "@FXML\n void loadComboBoxLocationValues() {\n ArrayList<Location> locations = LocationDAO.LocationSEL(-1);\n comboBoxLocation.getItems().clear();\n if (!locations.isEmpty())\n for (Location location : locations) {\n comboBoxLocation.getItems().addAll(location.getLocationID());\n }\n }", "private void setUpGUI() {\n \n removePrecursorPeakCombo.setRenderer(new com.compomics.util.gui.renderers.AlignedListCellRenderer(SwingConstants.CENTER));\n enzymeTypeCmb.setRenderer(new com.compomics.util.gui.renderers.AlignedListCellRenderer(SwingConstants.CENTER));\n useFlankingCmb.setRenderer(new com.compomics.util.gui.renderers.AlignedListCellRenderer(SwingConstants.CENTER));\n removePrecursorPeakCombo.setRenderer(new com.compomics.util.gui.renderers.AlignedListCellRenderer(SwingConstants.CENTER));\n monoPrecursorCmb.setRenderer(new com.compomics.util.gui.renderers.AlignedListCellRenderer(SwingConstants.CENTER));\n peptideListCmb.setRenderer(new com.compomics.util.gui.renderers.AlignedListCellRenderer(SwingConstants.CENTER));\n decoyFormatCombo.setRenderer(new com.compomics.util.gui.renderers.AlignedListCellRenderer(SwingConstants.CENTER));\n keepTerminalAaCombo.setRenderer(new com.compomics.util.gui.renderers.AlignedListCellRenderer(SwingConstants.CENTER));\n removeMethionineCmb.setRenderer(new com.compomics.util.gui.renderers.AlignedListCellRenderer(SwingConstants.CENTER));\n exactPvalueCombo.setRenderer(new com.compomics.util.gui.renderers.AlignedListCellRenderer(SwingConstants.CENTER));\n spScoreCombo.setRenderer(new com.compomics.util.gui.renderers.AlignedListCellRenderer(SwingConstants.CENTER));\n chargesCombo.setRenderer(new com.compomics.util.gui.renderers.AlignedListCellRenderer(SwingConstants.CENTER));\n useNeutralLossCmb.setRenderer(new com.compomics.util.gui.renderers.AlignedListCellRenderer(SwingConstants.CENTER));\n outputFormatCombo.setRenderer(new com.compomics.util.gui.renderers.AlignedListCellRenderer(SwingConstants.CENTER));\n removeTempFoldersCmb.setRenderer(new com.compomics.util.gui.renderers.AlignedListCellRenderer(SwingConstants.CENTER));\n \n minPepLengthTxt.setEditable(editable);\n minPepLengthTxt.setEnabled(editable);\n maxPepLengthTxt.setEditable(editable);\n maxPepLengthTxt.setEnabled(editable);\n minPrecursorMassTxt.setEditable(editable);\n minPrecursorMassTxt.setEnabled(editable);\n maxPrecursorMassTxt.setEditable(editable);\n maxPrecursorMassTxt.setEnabled(editable);\n monoPrecursorCmb.setEnabled(editable);\n removeMethionineCmb.setEnabled(editable);\n //minPtmsPerPeptideTxt.setEditable(editable);\n //minPtmsPerPeptideTxt.setEnabled(editable);\n maxPtmsPerPeptideTxt.setEditable(editable);\n maxPtmsPerPeptideTxt.setEnabled(editable);\n maxVariablePtmsPerTypeTxt.setEditable(editable);\n maxVariablePtmsPerTypeTxt.setEnabled(editable);\n enzymeTypeCmb.setEnabled(editable);\n peptideListCmb.setEnabled(editable);\n decoyFormatCombo.setEnabled(editable);\n keepTerminalAaCombo.setEnabled(editable);\n decoySeedTxt.setEditable(editable);\n decoySeedTxt.setEnabled(editable);\n removeTempFoldersCmb.setEnabled(editable);\n exactPvalueCombo.setEnabled(editable);\n spScoreCombo.setEnabled(editable);\n minSpectrumMzTxt.setEditable(editable);\n minSpectrumMzTxt.setEnabled(editable);\n maxSpectrumMzTxt.setEditable(editable);\n maxSpectrumMzTxt.setEnabled(editable);\n minPeaksTxt.setEditable(editable);\n minPeaksTxt.setEnabled(editable);\n chargesCombo.setEnabled(editable);\n removePrecursorPeakCombo.setEnabled(editable);\n removePrecursorPeakToleranceTxt.setEditable(editable);\n removePrecursorPeakToleranceTxt.setEnabled(editable);\n useFlankingCmb.setEnabled(editable);\n useNeutralLossCmb.setEnabled(editable);\n mzBinWidthTxt.setEditable(editable);\n mzBinWidthTxt.setEnabled(editable);\n mzBinOffsetTxt.setEditable(editable);\n mzBinOffsetTxt.setEnabled(editable);\n numberMatchesTxt.setEditable(editable);\n numberMatchesTxt.setEnabled(editable);\n outputFormatCombo.setEnabled(editable);\n \n }", "private void buildCountryComboBox() {\n ResultSet rs = DatabaseConnection.performQuery(\n session.getConn(),\n Path.of(Constants.QUERY_SCRIPT_PATH_BASE + \"SelectCountryByID.sql\"),\n Collections.singletonList(Constants.WILDCARD)\n );\n\n ObservableList<Country> countries = FXCollections.observableArrayList();\n try {\n if (rs != null) {\n while (rs.next()) {\n int id = rs.getInt(\"Country_ID\");\n String name = rs.getString(\"Country\");\n countries.add(new Country(id, name));\n }\n }\n } catch (Exception e) {\n Common.handleException(e);\n }\n\n countryComboBox.setItems(countries);\n\n countryComboBox.setConverter(new StringConverter<>() {\n @Override\n public String toString(Country item) {\n return item.getCountryName();\n }\n\n @Override\n public Country fromString(String string) {\n return null;\n }\n });\n }", "private void fillComboBox(ServiceManager serviceManager){\n for (String vendingMachineName : serviceManager.getVmManager().getVendingMachineNames()) {\n getItems().add(vendingMachineName); \n }\n }", "private void initComponents() {\r\n\r\n goHomeButton = ViewManager.createGoHomeButton();\r\n jScrollPane1 = new javax.swing.JScrollPane();\r\n jTable1 = ViewUtil.createUneditableTable();\r\n addNewButton = new javax.swing.JButton();\r\n deleteButton = new javax.swing.JButton();\r\n modifyButton = new javax.swing.JButton();\r\n searchButton = new javax.swing.JButton();\r\n searchTxtArea = new javax.swing.JTextField();\r\n jComboBox1 = new javax.swing.JComboBox<>();\r\n \r\n jScrollPane1.setViewportView(jTable1);\r\n\r\n addNewButton.setText(\"Add\");\r\n\r\n deleteButton.setText(\"Delete\");\r\n\r\n modifyButton.setText(\"Modify\");\r\n \r\n modifyButton.addActionListener(this);\r\n \r\n searchButton.setText(\"Search\");\r\n \r\n searchButton.addActionListener(this);\r\n searchTxtArea.setText(\"\");\r\n\r\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel<>(NameConverter.getTitleArr(\"Discount\")));\r\n\r\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\r\n this.setLayout(layout);\r\n layout.setHorizontalGroup(\r\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(layout.createSequentialGroup()\r\n .addContainerGap(70, Short.MAX_VALUE)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\r\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 664, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(layout.createSequentialGroup()\r\n .addComponent(searchTxtArea, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGroup(layout.createSequentialGroup()\r\n .addComponent(addNewButton)\r\n .addGap(33, 33, 33)\r\n .addComponent(deleteButton)))\r\n .addGap(37, 37, 37)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(modifyButton, javax.swing.GroupLayout.Alignment.TRAILING)\r\n .addComponent(searchButton, javax.swing.GroupLayout.Alignment.TRAILING))))\r\n .addGap(66, 66, 66))\r\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\r\n .addComponent(goHomeButton, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addContainerGap())))\r\n );\r\n layout.setVerticalGroup(\r\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(layout.createSequentialGroup()\r\n .addContainerGap()\r\n .addComponent(goHomeButton, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addGap(30,30,30)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(searchTxtArea, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(searchButton)\r\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGap(29, 29, 29)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(addNewButton)\r\n .addComponent(deleteButton)\r\n .addComponent(modifyButton))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\r\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 339, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addGap(49, 49, 49))\r\n );\r\n\r\n searchButton.getAccessibleContext().setAccessibleName(\"searchButton\");\r\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n ClinicaFprojectPUEntityManager = java.beans.Beans.isDesignTime() ? null : javax.persistence.Persistence.createEntityManagerFactory(\"ClinicaFprojectPU\").createEntityManager();\n pacienteQuery = java.beans.Beans.isDesignTime() ? null : ClinicaFprojectPUEntityManager.createQuery(\"SELECT p FROM Paciente p\");\n pacienteList = java.beans.Beans.isDesignTime() ? java.util.Collections.emptyList() : pacienteQuery.getResultList();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jComboBox1 = new javax.swing.JComboBox<>();\n\n setClosable(true);\n\n jButton1.setText(\"jButton1\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton2.setText(\"jButton2\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n jComboBox1.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n jComboBox1ItemStateChanged(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(356, Short.MAX_VALUE)\n .addComponent(jButton2)\n .addGap(34, 34, 34)\n .addComponent(jButton1)\n .addGap(155, 155, 155))\n .addGroup(layout.createSequentialGroup()\n .addGap(153, 153, 153)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(134, 134, 134)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 174, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton1)\n .addComponent(jButton2))\n .addGap(49, 49, 49))\n );\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n Prov = new javax.swing.JComboBox<>();\n Ko = new javax.swing.JComboBox<>();\n Kec = new javax.swing.JComboBox<>();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n Prov.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n Prov.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n ProvItemStateChanged(evt);\n }\n });\n Prov.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n ProvActionPerformed(evt);\n }\n });\n\n Ko.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n Kec.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(79, 79, 79)\n .addComponent(Prov, javax.swing.GroupLayout.PREFERRED_SIZE, 142, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(Ko, javax.swing.GroupLayout.PREFERRED_SIZE, 135, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(31, 31, 31)\n .addComponent(Kec, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(79, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(247, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(Prov, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(Ko, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(Kec, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(108, 108, 108))\n );\n\n pack();\n }", "@FXML\n\tprivate void initialize() {\n\t\tlistNomType = FXCollections.observableArrayList();\n\t\tlistIdType=new ArrayList<Integer>();\n\t\ttry {\n\t\t\tfor (Type type : typeDAO.recupererAllType()) {\n listNomType.add(type.getNomTypeString());\n listIdType.add(type.getIdType());\n }\n\t\t} catch (ConnexionBDException e) {\n\t\t\tnew Popup(e.getMessage());\n\t\t}\n\t\tcomboboxtype.setItems(listNomType);\n\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n panelColores = new javax.swing.JPanel();\n jScrollPane1 = new javax.swing.JScrollPane();\n jList1 = new javax.swing.JList<>();\n cboColores = new javax.swing.JComboBox<>();\n cboRojo = new javax.swing.JComboBox<>();\n cboVerde = new javax.swing.JComboBox<>();\n cboAzul = new javax.swing.JComboBox<>();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n panelColores.setBackground(new java.awt.Color(255, 204, 204));\n\n jList1.setModel(new javax.swing.AbstractListModel<String>() {\n String[] strings = { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\", \"Item 5\" };\n public int getSize() { return strings.length; }\n public String getElementAt(int i) { return strings[i]; }\n });\n jScrollPane1.setViewportView(jList1);\n\n cboColores.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"-selecciona opción-\", \"Rojo\", \"Azul\", \"Verde\", \"Amarillo\", \"Rosa\", \"Negro\", \"Blanco\" }));\n cboColores.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n cboColoresItemStateChanged(evt);\n }\n });\n cboColores.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cboColoresActionPerformed(evt);\n }\n });\n cboColores.addPropertyChangeListener(new java.beans.PropertyChangeListener() {\n public void propertyChange(java.beans.PropertyChangeEvent evt) {\n cboColoresPropertyChange(evt);\n }\n });\n\n cboRojo.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"-selecciona opcion-\", \"10\", \"20\", \"30\", \"40\", \"50\", \"60\", \"70\", \"80\", \"90\", \"100\" }));\n cboRojo.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n cboRojoItemStateChanged(evt);\n }\n });\n cboRojo.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cboRojoActionPerformed(evt);\n }\n });\n\n cboVerde.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"-selecciona opcion-\", \"10\", \"20\", \"30\", \"40\", \"50\", \"60\", \"70\", \"80\", \"90\", \"100\" }));\n cboVerde.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n cboVerdeItemStateChanged(evt);\n }\n });\n\n cboAzul.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"-selecciona opcion-\", \"10\", \"20\", \"30\", \"40\", \"50\", \"60\", \"70\", \"80\", \"90\", \"100\" }));\n cboAzul.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n cboAzulItemStateChanged(evt);\n }\n });\n\n jLabel1.setText(\"rojo\");\n\n jLabel2.setText(\"verde\");\n\n jLabel3.setText(\"azul\");\n\n javax.swing.GroupLayout panelColoresLayout = new javax.swing.GroupLayout(panelColores);\n panelColores.setLayout(panelColoresLayout);\n panelColoresLayout.setHorizontalGroup(\n panelColoresLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelColoresLayout.createSequentialGroup()\n .addGroup(panelColoresLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panelColoresLayout.createSequentialGroup()\n .addGap(39, 39, 39)\n .addComponent(cboColores, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(panelColoresLayout.createSequentialGroup()\n .addGap(20, 20, 20)\n .addGroup(panelColoresLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel1)\n .addComponent(jLabel2)\n .addComponent(jLabel3))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(panelColoresLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(cboVerde, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(cboRojo, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(cboAzul, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 120, Short.MAX_VALUE)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(22, 22, 22))\n );\n panelColoresLayout.setVerticalGroup(\n panelColoresLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panelColoresLayout.createSequentialGroup()\n .addGap(28, 28, 28)\n .addGroup(panelColoresLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panelColoresLayout.createSequentialGroup()\n .addComponent(cboColores, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addGroup(panelColoresLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(cboRojo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1))\n .addGap(13, 13, 13)\n .addGroup(panelColoresLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(cboVerde, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(panelColoresLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(cboAzul, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3)))\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 162, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(110, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(panelColores, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(panelColores, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n }", "private void updateKeyComboBox() {\n keyPairDropDown.removeAllItems();\n for (Identity pair : keyLoader.getLoadedPairs()) {\n keyPairDropDown.addItem(pair.getName());\n }\n }", "public Voznje() {\n initComponents();\n lstPodaci.setCellRenderer(new VoznjaCellRenderer());\n obrada = new ObradaVoznja();\n setTitle(Aplikacija.operater.getIme() + \" \" + Aplikacija.operater.getPrezime() + \" - Vožnje\");\n btnObrisi.setText(\"\\u274C\"+ \" Obriši\");\n btnPromijeni.setText(\"\\u2611\\uFE0F\" + \" Promijeni\");\n btnDodaj.setText(\"\\u2795\" + \" Dodaj\");\n ucitajPodatke(); \n \n DefaultComboBoxModel<Vozac> v = new DefaultComboBoxModel<>();\n new ObradaVozac().getPodaci().forEach(s -> {\n v.addElement(s);\n });\n cmbVozaci.setRenderer(new VozacCellRenderer());\n cmbVozaci.setModel(v);\n ucitajPodatke();\n \n \n \n }", "private void initialize() {\r\n\t\t\r\n\t\tfinal List<Caixa> listaCaixa = new CaixaService(JPAUtil.createEntityManager()).getList();\r\n\t\t\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(100, 100, 321, 190);\r\n\t\tframe.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\t\r\n\t\tfinal JComboBox cmbCaixa = new JComboBox();\r\n\t\tcmbCaixa.setBounds(10, 11, 285, 20);\r\n\t\tframe.getContentPane().add(cmbCaixa);\r\n\t\t\r\n\t\tString[] itensCombo = new String[listaCaixa.size()];\r\n\t\tfor(int i=0;i<listaCaixa.size();i++) {\r\n\t\t\titensCombo[i]=listaCaixa.get(i).getNome();\r\n\t\t}\r\n\t\t\r\n\t\tDefaultComboBoxModel<String> comboBoxModel = new DefaultComboBoxModel<String>(itensCombo);\r\n\t\tcmbCaixa.setModel(comboBoxModel);\r\n\t\t\r\n\t\t\r\n\t\tJButton btnVerTodos = new JButton(\"Ver todos os caixas\");\r\n\t\tbtnVerTodos.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tTelaCaixaVendaRelatorio tela = new TelaCaixaVendaRelatorio();\r\n\t\t\t\ttela.getFrame().setVisible(true);\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnVerTodos.setBounds(10, 117, 285, 23);\r\n\t\tframe.getContentPane().add(btnVerTodos);\r\n\t\t\r\n\t\tJButton btnVerCaixaSelecionado = new JButton(\"Ver caixa selecionado\");\r\n\t\tbtnVerCaixaSelecionado.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tTelaCaixaVendaRelatorio telaCaixaVendaRelatorio = new TelaCaixaVendaRelatorio(listaCaixa.get(cmbCaixa.getSelectedIndex()));\r\n\t\t\t\t\ttelaCaixaVendaRelatorio.getFrame().setVisible(true);\r\n\t\t\t\t}catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, e.getMessage());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnVerCaixaSelecionado.setBounds(10, 83, 285, 23);\r\n\t\tframe.getContentPane().add(btnVerCaixaSelecionado);\r\n\t}", "private void loadDisplayScreen() {\r\n wells = xmlreader.getWells();\r\n \r\n for (int i = 0; i < wells.size(); i++) {\r\n opName.add(new Well(i, wells.get(i).getName()));\r\n \r\n }\r\n Iterator<Well> iterate = opName.iterator();\r\n \r\n while (iterate.hasNext()) {\r\n arrName.add(iterate.next().getName());\r\n }\r\n aModel = new DefaultComboBoxModel<>(arrName);\r\n wellCombo.setModel(aModel);\r\n\r\n }", "private void displayEmployee()\n {\n employeeJComboBox.removeAllItems();\n int location = employeeJComboBox.getSelectedIndex();\n String[] namesArray = new String[employees.size()];\n for(int i = 0; i < employees.size(); i++)\n {\n namesArray[i] = employees.get(i).getName();\n employeeJComboBox.addItem(namesArray[i]);\n }\n if(location < 0)\n {\n employeeJComboBox.setSelectedIndex(0);\n }\n else\n {\n employeeJComboBox.setSelectedIndex(location);\n }\n }", "private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jComboBox1 = new javax.swing.JComboBox();\n jPanel1 = new javax.swing.JPanel();\n\n org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(UnitConverterTopComponent.class, \"UnitConverterTopComponent.jLabel1.text\")); // NOI18N\n\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n jComboBox1.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n jComboBox1ItemStateChanged(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 0, Short.MAX_VALUE)\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 331, Short.MAX_VALUE)\n );\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 .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 457, Short.MAX_VALUE)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n }", "private void preencherComboEstados() {\n\t\tList<Estado> listEstado;\n\t\tObservableList<Estado> oListEstado;\n\t\tEstadosDAO estadosDao;\n\n\t\t//Instancia a DAO estados\n\t\testadosDao = new EstadosDAO();\n\n\t\t//Chama o metodo para listar todos os estados\n\t\tlistEstado = estadosDao.selecionar();\n\n\t\t//Verifica se a lista de estados está vazia\n\t\tif(listEstado.isEmpty()) \n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t//Atribui a lista retornada ao observablearray\n\t\toListEstado = FXCollections.observableArrayList(listEstado);\n\n\t\t//Adiciona os itens no combobx\n\t\tcboEstado.setItems(oListEstado);\n\n\t\t//Seleciona o primeio item do combobox\n\t\tcboEstado.getSelectionModel().select(0);\n\t}", "public void populateBigsComboBox(JComboBox box){\n box.addItem(\"Clear\");\n TreeMap<String, ArrayList<String>> sortedbigs = new TreeMap<>();\n sortedbigs.putAll(matching.bigsPreferences);\n for (Map.Entry bigprefs: sortedbigs.entrySet()){\n String bigName = bigprefs.getKey().toString();\n box.addItem(bigName);\n }\n }", "public void setCombo(Object newValue);", "public void clearComboBox() {\n\t\tremove(QueryCombo);\n\t\tQueryCombo = new JComboBox();\n\t\tQueryCombo.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tMObjQueryResult qr = null;\n\t\t\t\tqr = (MObjQueryResult) QueryCombo.getSelectedItem();\n\t\t\t\tif (qr != null) {\n\t\t\t\t\tqr.clearSelection();\n\t\t\t\t\tQueryScrollPane.setViewportView(qr);\n\t\t\t\t} else\n\t\t\t\t\tQueryScrollPane.setViewportView(dummy);\n\t\t\t}\n\t\t});\n\t\tadd(QueryCombo, BorderLayout.NORTH);\n\t}", "public BrandsPanel()\n {\n initComponents();\n\n listBrands.setCellRenderer(new BrandsListCellRenderer());\n listBrands.getSelectionModel().addListSelectionListener(new ListSelectionListener()\n {\n @Override\n public void valueChanged(ListSelectionEvent e)\n {\n loadSelectedValue();\n }\n });\n\n panelBrandEdit.setVisible(false);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jTextField1 = new javax.swing.JTextField();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jTextField2 = new javax.swing.JTextField();\n jTextField3 = new javax.swing.JTextField();\n jComboBox1 = new javax.swing.JComboBox<>();\n\n setToolTipText(\"\");\n setPreferredSize(new java.awt.Dimension(600, 500));\n\n jTextField1.setEditable(false);\n jTextField1.setBackground(new java.awt.Color(141, 141, 157));\n jTextField1.setFont(new java.awt.Font(\"Modern No. 20\", 0, 36)); // NOI18N\n jTextField1.setForeground(new java.awt.Color(255, 255, 255));\n jTextField1.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n jTextField1.setText(\"Criar Professor\");\n jTextField1.setToolTipText(\"\");\n jTextField1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField1ActionPerformed(evt);\n }\n });\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n jLabel1.setText(\"Nome: \");\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n jLabel2.setText(\"Grau Académico:\");\n\n jLabel3.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n jLabel3.setText(\"Idade: \");\n\n jButton1.setText(\"Criar Professor\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/GUI/undo.png\"))); // NOI18N\n jButton2.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));\n jButton2.setDebugGraphicsOptions(javax.swing.DebugGraphics.NONE_OPTION);\n jButton2.setDefaultCapable(false);\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jTextField2.setName(\"Nome\"); // NOI18N\n jTextField2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField2ActionPerformed(evt);\n }\n });\n\n jTextField3.setName(\"Idade\"); // NOI18N\n\n jComboBox1.setName(\"Grau académico\"); // 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 .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jTextField1))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(197, 197, 197)\n .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, 216, Short.MAX_VALUE)\n .addGap(88, 88, 88)\n .addComponent(jButton2)\n .addGap(22, 22, 22)))\n .addContainerGap())\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(0, 76, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.TRAILING))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jTextField2, javax.swing.GroupLayout.DEFAULT_SIZE, 338, Short.MAX_VALUE)\n .addComponent(jTextField3)\n .addComponent(jComboBox1, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(72, 72, 72))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(139, 139, 139)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jTextField2))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextField3)\n .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jComboBox1))\n .addGap(113, 113, 113)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(44, 44, 44))\n );\n }", "private void postInit() {\n // start with compact form\n detailledToggleButtonActionPerformed(null);\n\n colorMappingComboBox.setRenderer(ColorMappingListCellRenderer.getListCellRenderer());\n\n // Fill colorMapping combobox\n for (ColorMapping cm : ColorMapping.values()) {\n if (cm != ColorMapping.OBSERVATION_DATE) { // not implemented\n colorMappingComboBox.addItem(cm);\n }\n }\n\n xAxisEditor = new AxisEditor(this);\n xAxisPanel.add(xAxisEditor);\n\n if (ENABLE_EXPRESSION_EDITOR) {\n expressionEditor = new ExpressionEditor(this);\n expressionEditor.setVisible(false);\n\n this.jPanelOtherEditors.add(expressionEditor, BorderLayout.CENTER);\n } else {\n jToggleButtonExprEditor.setVisible(false);\n }\n\n // Adjust fonts:\n final Font fixedFont = new Font(Font.MONOSPACED, Font.PLAIN, SwingUtils.adjustUISize(12));\n this.jToggleButtonAuto.setFont(fixedFont);\n this.jToggleButtonDefault.setFont(fixedFont);\n this.jToggleButtonFixed.setFont(fixedFont);\n }", "public NderroPass() {\n initComponents();\n loadComboBox();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jButton1 = new javax.swing.JButton();\n txtUrunSeriNo = new javax.swing.JTextField();\n txtSatisFiyati = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n txtUrunModel = new javax.swing.JTextField();\n txtUrunIsmi = new javax.swing.JTextField();\n txtAlisFiyati = new javax.swing.JTextField();\n txtAdet = new javax.swing.JTextField();\n jPanel2 = new javax.swing.JPanel();\n jLabel9 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n comboDepo = new javax.swing.JComboBox<>();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"Stok Ekle | Stok Otomasyonu |\");\n setFocusTraversalPolicyProvider(true);\n setLocation(new java.awt.Point(0, 0));\n setResizable(false);\n setType(java.awt.Window.Type.UTILITY);\n\n jButton1.setText(\"EKLE\");\n jButton1.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jButton1MouseClicked(evt);\n }\n });\n\n txtSatisFiyati.setCursor(new java.awt.Cursor(java.awt.Cursor.TEXT_CURSOR));\n txtSatisFiyati.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n txtSatisFiyatiKeyTyped(evt);\n }\n });\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jLabel2.setText(\"Ürün Seri No : \");\n\n jLabel3.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jLabel3.setText(\"Ürün İsmi :\");\n\n jLabel4.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jLabel4.setText(\"Ürün Model :\");\n\n jLabel5.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jLabel5.setText(\"Adet :\");\n\n jLabel6.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jLabel6.setText(\"Alış Fiyatı :\");\n\n jLabel7.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jLabel7.setText(\"Satış Fiyatı :\");\n\n txtAlisFiyati.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n txtAlisFiyatiKeyTyped(evt);\n }\n });\n\n txtAdet.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n txtAdetKeyTyped(evt);\n }\n });\n\n jPanel2.setBackground(new java.awt.Color(48, 66, 105));\n\n jLabel9.setFont(new java.awt.Font(\"Tahoma\", 1, 24)); // NOI18N\n jLabel9.setForeground(new java.awt.Color(255, 255, 255));\n jLabel9.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel9.setText(\"# Ürün Ekle #\");\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(40, 40, 40)\n .addComponent(jLabel9, javax.swing.GroupLayout.DEFAULT_SIZE, 234, Short.MAX_VALUE)\n .addGap(32, 32, 32))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel9)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n jLabel8.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jLabel8.setText(\"Depo :\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel8)\n .addComponent(jLabel7)\n .addComponent(jLabel6)\n .addComponent(jLabel5)\n .addComponent(jLabel4)\n .addComponent(jLabel3)\n .addComponent(jLabel2))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(comboDepo, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(txtAlisFiyati, javax.swing.GroupLayout.DEFAULT_SIZE, 190, Short.MAX_VALUE)\n .addComponent(txtAdet)\n .addComponent(txtUrunModel)\n .addComponent(txtUrunIsmi)\n .addComponent(txtUrunSeriNo)\n .addComponent(txtSatisFiyati, javax.swing.GroupLayout.Alignment.TRAILING))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addComponent(jPanel2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 276, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtUrunSeriNo, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtUrunIsmi, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtUrunModel, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel4))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtAdet, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel5))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtAlisFiyati, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtSatisFiyati, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(comboDepo, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel8))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n }", "public RegisterCashierFrame() {\n initComponents();\n lblUsername.setText(\"Hello \"+UserProfile.getUserName());\n super.setLocationRelativeTo(null);\n try {\n EmpList = Empdao.getCashierData();\n \n for (Object a : EmpList.keySet())\n jComboBox1.addItem((String) a);\n \n \n }\n catch(SQLException ex) {\n JOptionPane.showMessageDialog(null, \"Error in SQl\"+ex, \"Input Error\",JOptionPane.ERROR_MESSAGE);\n ex.printStackTrace();\n\n }\n \n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n cbplaca = new javax.swing.JComboBox<>();\n cbdia = new javax.swing.JComboBox<>();\n cbcolor = new javax.swing.JComboBox<>();\n imprimirtxt = new javax.swing.JTextField();\n jButton1 = new javax.swing.JButton();\n revisar = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n cbplaca.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n cbdia.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n cbcolor.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n imprimirtxt.setText(\"jTextField1\");\n\n jButton1.setText(\"jButton1\");\n\n revisar.setText(\"jButton2\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(124, 124, 124)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(cbplaca, 0, 146, Short.MAX_VALUE)\n .addComponent(cbdia, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(cbcolor, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 210, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(imprimirtxt, javax.swing.GroupLayout.PREFERRED_SIZE, 191, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(44, 44, 44))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jButton1)\n .addGap(106, 106, 106))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(revisar)\n .addGap(103, 103, 103))))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(61, 61, 61)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(cbplaca, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton1))\n .addGap(59, 59, 59)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(cbdia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(imprimirtxt, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(65, 65, 65)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(cbcolor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(revisar))\n .addContainerGap(140, Short.MAX_VALUE))\n );\n\n pack();\n }", "void hienThi() {\n LoaiVT.Open();\n ArrayList<LoaiVT> DSSP = LoaiVT.DSLOAIVT;\n VatTu PX = VatTu.getPX();\n \n try {\n txtMaVT.setText(PX.getMaVT());\n txtTenVT.setText(PX.getTenVT());\n txtDonVi.setText(PX.getDVT());\n DefaultComboBoxModel cb = new DefaultComboBoxModel();\n for(LoaiVT SP: DSSP){ \n cb.addElement(SP.getMaLoai());\n if(SP.getMaLoai().equals(PX.getMaLoai())){\n cb.setSelectedItem(SP.getMaLoai());\n }\n }\n cbMaloai.setModel(cb);\n } catch (Exception ex) {\n txtMaVT.setText(\"\");\n txtTenVT.setText(\"\");\n txtDonVi.setText(\"\");\n DefaultComboBoxModel cb = new DefaultComboBoxModel();\n cb.setSelectedItem(\"\");\n cbMaloai.setModel(cb);\n }\n \n \n }" ]
[ "0.7363104", "0.72475445", "0.7005399", "0.69072306", "0.6900577", "0.68813115", "0.68370503", "0.6836307", "0.6757864", "0.6746214", "0.6670709", "0.6668609", "0.6582156", "0.6575993", "0.65615886", "0.6514692", "0.65145636", "0.65103555", "0.6480709", "0.6467189", "0.645796", "0.6456009", "0.642923", "0.6406165", "0.63979477", "0.63874745", "0.6370747", "0.6365175", "0.6360553", "0.63533866", "0.63408905", "0.63245755", "0.6319506", "0.6316425", "0.62936145", "0.6263072", "0.6246134", "0.62424964", "0.62224454", "0.62219423", "0.6221817", "0.6219457", "0.6205296", "0.61941576", "0.61795163", "0.61787426", "0.6174052", "0.61674553", "0.61637956", "0.61622864", "0.61538404", "0.6153207", "0.6145416", "0.612276", "0.611974", "0.61142695", "0.6109265", "0.6108649", "0.6108238", "0.6098908", "0.60927916", "0.60919064", "0.60845095", "0.6078627", "0.60685647", "0.6061426", "0.60614127", "0.6046773", "0.60461974", "0.60360706", "0.6028082", "0.6027366", "0.60267216", "0.60215545", "0.5999865", "0.59970516", "0.59956753", "0.59933543", "0.598778", "0.5983391", "0.59800565", "0.5979847", "0.5971506", "0.5971207", "0.59684587", "0.5960708", "0.5958002", "0.59573513", "0.59489393", "0.59489125", "0.5947418", "0.5946309", "0.593597", "0.59284407", "0.5924168", "0.5923686", "0.5922659", "0.59200436", "0.5912905", "0.59063774", "0.5903251" ]
0.0
-1
Returns a state of this frame
public boolean isActive() { return this.state; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public State getState();", "public State getState();", "public State getState() {\n\t\treturn state;\n\t}", "public State getState() {\n\t\treturn state;\n\t}", "public STATE getState() {\n\t\n\t\treturn state;\n\t}", "public S getState() {\r\n\t\treturn state;\r\n\t}", "public State getState()\r\n\t{\r\n\t\treturn this.state;\r\n\t}", "public Byte getState() {\n return state;\n }", "public Byte getState() {\n return state;\n }", "public State getState() {\n return state;\n }", "public State getState() {\n return state;\n }", "public State getState() {\n return state;\n }", "public State getState() {\n return state;\n }", "public State getState() {\n return state;\n }", "State getState();", "State getState();", "State getState();", "State getState();", "public int getState() {return state;}", "public int getState() {return state;}", "public int getState();", "public int getState();", "public int getState();", "public int getState();", "public State getState() {\n return state.get();\n }", "public byte getState() {\n return myState;\n }", "Object getState();", "public int getState(){\n\t\treturn state;\n\t}", "public State state() {\n return state;\n }", "public int getState() {\n return state;\n }", "public int getState() {\n return state;\n }", "public int getState(){\n return state;\n }", "int getState();", "int getState();", "int getState();", "int getState();", "int getState();", "int getState();", "public int getState() {\n\t\treturn state;\n\t}", "public Integer getState() {\r\n return state;\r\n }", "public Integer getState() {\r\n return state;\r\n }", "public T getState() {\r\n\t\treturn state;\r\n\t}", "public int getState() {\n \t\treturn state;\n \t}", "public int getState() {\n return state;\n }", "public Integer getState() {\n return state;\n }", "public Integer getState() {\n return state;\n }", "public Integer getState() {\n return state;\n }", "public Integer getState() {\n return state;\n }", "public Integer getState() {\n return state;\n }", "public Integer getState() {\n return state;\n }", "public State state() {\n return _state;\n }", "public int getState() {\n return state.getValue();\n }", "public int getState() {\n return state_;\n }", "public int getState() {\n return state_;\n }", "public int getState() {\n return state_;\n }", "public int getState() {\n return state_;\n }", "public int getState() {\n return state_;\n }", "public int getState() {\n return state_;\n }", "public int getState() {\n return state_;\n }", "public int getState() {\n return state_;\n }", "public int getState() {\n return state_;\n }", "public int getState() {\n return state_;\n }", "public State GetState()\n {\n return this.state;\n }", "public String state() {\n return this.state;\n }", "public String state() {\n return this.state;\n }", "ESMFState getState();", "public int getState() {\n return m_state;\n }", "private State getState()\n {\n return state;\n }", "public AeBpelState getState();", "public GameState getState() {\n\t\treturn state;\n\t}", "protected S state() {\n return state;\n }", "public int getState() {\n return this.mState;\n }", "public int getState()\r\n\t{\r\n\t\treturn currentstate;\r\n\t}", "public boolean getState( ) { return state; }", "public State getState(){return this.state;}", "public State getState () {\n synchronized (this) {\n return state;\n }\n }", "public SimulationState getState() {\n\t\treturn state;\n\t}", "public int getState() {\n return _state;\n }", "public S getCurrentState();", "public GameState GetState(){\n\t\treturn this.state;\n\t}", "public String getState()\r\n\t{\r\n\t\treturn state;\r\n\t}", "public String getState()\r\n\t{\r\n\t\treturn state;\r\n\t}", "public String getState() \n\t{\n\t\treturn state;\n\t}", "public IState getState();", "public S getState() {\n return currentState;\n }", "public int getState()\n {\n return m_state.getState();\n }", "public String getState()\n\t{\n\t\treturn state;\n\t}", "public int getState() {\n return mState;\n }", "public String getState() {\r\n\t\treturn state;\r\n\t}", "public String getState() {\r\n\t\treturn state;\r\n\t}", "public String getState() {\r\n\t\treturn state;\r\n\t}", "public TState getState() {\n return state;\n }", "public String getState() {\r\n\t\treturn state;\t\t\r\n\t}", "@Override\n public float getState() {\n return state;\n }", "public String getState() {\n return this.state;\n }", "public String getState() {\n return this.state;\n }", "public String getState() {\n return this.state;\n }", "public String getState() {\n return this.state;\n }", "public GraphicsState getState(\n )\n {return state;}", "public Integer getaState() {\n return aState;\n }", "public String getState() {\n\t\treturn state;\n\t}" ]
[ "0.7932356", "0.7932356", "0.78500044", "0.78500044", "0.78493893", "0.7841364", "0.7810028", "0.77829844", "0.77829844", "0.7770838", "0.7770838", "0.7770838", "0.7770838", "0.7770838", "0.7770292", "0.7770292", "0.7770292", "0.7770292", "0.7744589", "0.7744589", "0.7731174", "0.7731174", "0.7731174", "0.7731174", "0.7692755", "0.76909614", "0.76906747", "0.76749706", "0.76739097", "0.7652328", "0.7652328", "0.76498866", "0.76372916", "0.76372916", "0.76372916", "0.76372916", "0.76372916", "0.76372916", "0.76285505", "0.76273113", "0.76273113", "0.7626136", "0.76022786", "0.7592297", "0.7576517", "0.7576517", "0.7576517", "0.7576517", "0.7576517", "0.7576517", "0.75755316", "0.75619334", "0.75471187", "0.75471187", "0.75471187", "0.75471187", "0.75471187", "0.75391585", "0.75391585", "0.75391585", "0.75391585", "0.7538516", "0.7533679", "0.7523969", "0.7523969", "0.7499431", "0.74977297", "0.7497328", "0.74867713", "0.74832726", "0.7473587", "0.7467117", "0.7466237", "0.7465676", "0.7462477", "0.74568707", "0.7454892", "0.74527013", "0.7451536", "0.74492854", "0.74454945", "0.74454945", "0.7443527", "0.7438597", "0.74381435", "0.74247086", "0.7420511", "0.74033064", "0.7401376", "0.7401376", "0.7401376", "0.7399162", "0.7397572", "0.7397271", "0.7391166", "0.7391166", "0.7391166", "0.7391166", "0.7389211", "0.73788744", "0.737844" ]
0.0
-1
When the send button is clicked
public void send(View v) { if(staticSpinner.getSelectedItemPosition() == 0) { TextView errorText = (TextView)staticSpinner.getSelectedView(); errorText.setError(""); errorText.setTextColor(Color.RED);//just to highlight that this is an error errorText.setText("Harap Pilih Kategori"); } else if(msgTextField.getText().toString().equals("") ){ msgTextField.setError("required"); msgTextField.setHintTextColor(Color.RED);//just to highlight that this is an error msgTextField.setHint("Harap Diisi"); } else { if (staticSpinner.getSelectedItem().equals("Nama Produk")) { spinK = "nama_produk"; } else if (staticSpinner.getSelectedItem().equals("Nama Produsen")) { spinK = "nama_produsen"; } else { spinK = "nomor_sertifikat"; } String msgSearch = msgTextField.getText().toString(); Intent searchIntent = new Intent(MainActivity.this, HasilCari.class); Bundle extras = new Bundle(); extras.putString("spinKat", spinK); extras.putString("msgSearch", msgSearch); searchIntent.putExtras(extras); startActivity(searchIntent); Log.v(TAG, spinK); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void handleSendButton(ActionEvent event) {\n\n messageController.setMessageSystem(this.message.getText(), this.toUsername.getText(),this.sender);\n if (messageController.sendMessage()){\n sentValid.setVisible(true);\n sentInvalid.setVisible(false);\n\n }\n else{\n sentInvalid.setVisible(true);\n sentValid.setVisible(false);\n\n }\n\n\n }", "public void handleSendBtn(ActionEvent actionEvent) throws IOException {\n Socket socket = ConnSocket.getInstance();\n InputStream inputStream = socket.getInputStream();\n OutputStream outputStream = socket.getOutputStream();\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream, true);\n //String [] userInfo = {textField.getText(), nameLabel.getText()};\n out.println(textField.getText());\n\n }", "public void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\tSystem.out.println(\"Sent\");\n\t\t\t\t\t}", "@Override\n public void onClick(View view) {\n send();\n }", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif (btn1==e.getSource()) { //만약 버튼(btn1)클릭 시 동작\n\t\t\tto = tfphone.getText(); //텍스트필드(전화번호) 값가져와서 String to로 변형\n\t\t\ttext = tftext.getText(); //텍스트 필드(텍스트) 값자겨와서 String text로 변형 \n\t\t\t\t\t\t\t\t\t\t\t\t//문자전송(인자)가 String 이기때문에 String으로 변형해줘야함\n\t\t\tExampleSend ex = new ExampleSend(); //ExampleSend클래스 객체 생성\n\t\t\tex.문자전송(to, text);\n\t\t}\n\t\tif (btn2 == e.getSource()) {\n\t\t\ttfphone.setText(\"\");\n\t\t\ttftext.setText(\"\");\n\t\t}\n\t}", "private void b_sendActionPerformed(java.awt.event.ActionEvent evt) { \r\n\t\tString nothing = \"\";\r\n\t\tif ((b_sendText.getText()).equals(nothing)) {\r\n\t\t\tb_sendText.setText(\"\");\r\n\t\t\tb_sendText.requestFocus();\r\n\t\t}\r\n\t\telse {\r\n\t\t\ttry {\r\n\t\t\t\ttellEveryone(\"Server\" + \":\" + b_sendText.getText() + \":\" + \"Chat\");\r\n\t\t\t\tPrint_Writer.flush(); // flushes the buffer\r\n\t\t\t} catch (Exception ex) {\r\n\t\t\t}\r\n\t\t\tb_sendText.setText(\"\");\r\n\t\t\tb_sendText.requestFocus();\r\n\t\t}\r\n\r\n\t\tb_sendText.setText(\"\");\r\n\t\tb_sendText.requestFocus();\r\n\r\n\t}", "public void sendClick(View view) {\n String message = input.getText().toString();\n uart.send(message);\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tString message= txtMessage.getText();\n\t\t\t\tsend(message);\n\t\t\t}", "private void sendButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_sendButtonActionPerformed\n String str = requestCommand.getText();\n sC.sendCommand(str); \n requestCommand.requestFocus();\n }", "private void createSendArea() {\n\t\tthis.btnSend = new Button(\"Envoyer\");\n\t\tthis.btnSend.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent event) {\n\t\t\t\tboolean sent = window.sendMessage(message.getText());\n\t\t\t\tif(sent) {\n\t\t\t\t\tmessage.setText(\"\");\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tJOptionPane.showMessageDialog(\n\t\t\t\t\t\tnew JFrame(),\n\t\t\t\t\t\t\"Erreur lors de l'envoi du message...\",\n\t\t\t\t\t\t\"Dialog\",\n\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tmConnectedThread.write(\"send\");\n\t\t\t\t\tmConnectedThread.writeFile();\n\t\t\t\t}", "public void onClickSend(View view) {\n //String string = editText.getText().toString();\n //serialPort.write(string.getBytes());\n //tvAppend(txtResponse, \"\\nData Sent : \" + string + \"\\n\");\n }", "@OnClick(R.id.enter_chat1)\n public void sendMessage() {\n if (getView() == null) {\n return;\n }\n EditText editText = getView().findViewById(R.id.chat_edit_text1);\n sendMessageBackend(editText.getText().toString(), utils.getChatUser());\n updateListAdapter();\n editText.setText(\"\");\n }", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif (e.getSource() == jb)// 发送消息\r\n\t\t{\r\n\t\t\tMessage m = new Message();\r\n\t\t\tm.setMesType(\"20\");// MessageType.message_comm_mes\r\n\t\t\tm.setSender(this.ownerId);\r\n\t\t\tm.setGetter(\"\");\r\n\t\t\tm.setCon(jtf.getText());\r\n\t\t\tthis.jta.append(\"我说:\" + jtf.getText() + \"\\r\\n\");\r\n\t\t\ttry {\r\n\t\t\t\tObjectOutputStream oos = new ObjectOutputStream(\r\n\t\t\t\t\t\tManageClientConServerThread\r\n\t\t\t\t\t\t\t\t.getClientConServerThread(ownerId).getS()\r\n\t\t\t\t\t\t\t\t.getOutputStream());\r\n\t\t\t\toos.writeObject(m);\r\n\t\t\t} catch (Exception e1) {\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}", "public void sendMessage()\r\n {\r\n MessageScreen messageScreen = new MessageScreen(_lastMessageSent);\r\n pushScreen(messageScreen);\r\n }", "private void send() {\n Toast.makeText(this, getString(R.string.message_sent, mBody, Contact.byId(mContactId).getName()),\n Toast.LENGTH_LONG).show();\n finish(); // back to DirectShareActivity\n }", "@Then(\"^Click On Send Button$\")\r\n\tpublic void click_On_Send_Button() {\n\t\tnop.click(\"//*[@id=\\\"submitMessage\\\"]/span\"); \r\n\t \r\n\t}", "@Override\r\n public void onClick(View v)\r\n {\n if (\"\" != mSendOnBoardEdit.getText().toString()){\r\n DJIDrone.getDjiMainController().sendDataToExternalDevice(mSendOnBoardEdit.getText().toString().getBytes(),new DJIExecuteResultCallback(){\r\n\r\n @Override\r\n public void onResult(DJIError result)\r\n {\r\n // TODO Auto-generated method stub\r\n \r\n }\r\n \r\n });\r\n }\r\n }", "@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tSendToServer(ph);\n\t\t\t\t\t\t} catch (UnsupportedEncodingException 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\t\t\n\t\t\t\t\t}", "public void onClickSend(View view) {\n String string = editText.getText().toString();\n serialPort.write(string.getBytes());\n tvAppend(textView, \"\\nData Sent : \" + string + \"\\n\");\n\n }", "public void handleSend(ActionEvent actionEvent) {\r\n String to=textFieldTo.getText();\r\n try{\r\n Long idto = Long.parseLong(to);\r\n\r\n FriendshipRequest request = new FriendshipRequest();\r\n Tuple<Long,Long> f = new Tuple<>(user.getId(), idto);\r\n request.setId(f);\r\n\r\n service.addRequest(request);\r\n showMessage(Alert.AlertType.CONFIRMATION,\"Request sent!\",\"Request is now pending!\");\r\n\r\n textFieldTo.clear();\r\n\r\n\r\n }catch(NumberFormatException exception){\r\n showMessage(Alert.AlertType.ERROR,\"Error\",exception.toString());\r\n }catch (ServiceException exception){\r\n showMessage(Alert.AlertType.ERROR,\"Error\",exception.toString());\r\n }\r\n }", "public void handleSend() {\n model.sendMail();\n view.getChildren().clear();//it \"hides the display\" of the previous view\n }", "@Override\n public void onClick(View view) {\n\n runOnUiThread(\n new Runnable() {\n @Override\n public void run() {\n MainActivity\n .this\n .connectionManager.getTo().println(\n MainActivity\n .this\n .send_text.getText().toString()\n );\n }\n }\n );\n\n }", "@Override\n public void onClick(View v) {\n \n switch (v.getId()) {\n case R.id.sendBtn:\n //Log.d(\"XXX\", \"SEND BTN\");\n if (validateFields() == false) {\n // mostro avviso errore\n CharSequence text = \"Per favore completa i campi richiesti correttamente\";\n Toast toast = Toast.makeText(getActivity(), text, Toast.LENGTH_SHORT);\n toast.show();\n }\n else {\n sendRequestToServer();\n }\n break;\n case R.id.surname:\n // Log.d(\"XXX\", \"COGNOME EDIT TEXT\");\n break;\n case R.id.email:\n break;\n case R.id.tel:\n break;\n default:\n break;\n }\n \n }", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif(e.getSource()==sendButton){\n\t\t\tif(!inputField.getText().trim().isEmpty()){\n\t\t\t\ttry{\n\t\t\t\t\tclient.sendRequest(inputField.getText().trim());\n\t\t\t\t}catch(Exception ee){\n\t\t\t\t\tee.printStackTrace();\n\t\t\t\t}\n\t\t\t\toutputArea.append(client.getResponse()+\"\\n\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\tJOptionPane.showConfirmDialog(this, \"输入不能为空!\");\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tinputField.setText(\"\");\n\t\t\toutputArea.setText(\"\");\n\t\t}\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif (e.getSource() == bt1) {\n\t\t\ttry {\n\t\t\t\tString s = tfnhap.getText();\n\t\t\t\tsenddata = new byte[s.length()];\n\t\t\t\treceivedata = new byte[1024];\n\t\t\t\tsenddata = s.getBytes();\n\t\t\t\tDatagramPacket send = new DatagramPacket(senddata, senddata.length, inet, 8892);\n\t\t\t\tmoi.send(send);\n\t\t\t\tDatagramPacket receive = new DatagramPacket(receivedata, receivedata.length);\n\t\t\t\tmoi.receive(receive);\n\t\t\t\tString kq = new String(receive.getData());\n\t\t\t\ttfkq.setText(kq);\n\n\t\t\t} catch (UnknownHostException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t} catch (IOException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\n\t\t}\n\t\tif (e.getSource() == bt2)\n\t\t\tSystem.exit(0);\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\tif (!Window.Linksign) {\n\t\t\tif (BeganSign == 0) {\n\t\t\t\tBeganSign = 1;\n\t\t\t\taccept.append(\"已准备\\n\");\n\t\t\t\tWindow.f3listener.F3();\n\t\t\t\tbattleSend.Mistake = 0;\n\t\t\t} else {\n\t\t\t\tBeganSign = 0;\n\t\t\t\taccept.append(\"取消准备\\n\");\n\t\t\t\tsendText.setText(\"\");\n\t\t\t\tsendText.setEditable(false);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tout = new DataOutputStream(client.socket.getOutputStream());\n\t\t\t\tString message = \"%\" + BeganSign + \"%\" + sendText.getText()\n\t\t\t\t\t\t+ \"%\" + RegexText.duan1 + \"#\" + Window.wenben.getText()\n\t\t\t\t\t\t+ \"%0\" + \"%\" + Login.zhanghao.getText();\n\t\t\t\tQQZaiwenListener.wenbenstr = Window.wenben.getText();\n\t\t\t\tout.writeUTF(message);// 向服务器发送信息\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} else {\n\t\t\taccept.append(\"请先加入一个房间\\n\");\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 }", "@FXML\n private void sendMessage(ActionEvent actionEvent) {\n String playerName = RiskMain.getInstance().getDomain().getPlayerName();\n System.out.println(messageInput.getText());\n String text = playerName + \": \" + messageInput.getText();\n if (RiskMain.getInstance().getDomain().isServer()) {\n this.serverInterface = RiskMain.getInstance().getDomain().getServer();\n this.serverInterface\n .sendMessageChat(RiskMain.getInstance().getDomain().getPlayerName(),\n messageInput.getText(), recipientList.getValue());\n } else {\n this.clientPlayerInterface = RiskMain.getInstance().getDomain().getClient();\n this.clientPlayerInterface.sendMessageChat(RiskMain.getInstance().getDomain().getPlayerName(),\n messageInput.getText(), recipientList.getValue());\n }\n }", "@Override\n public void onClick(View view) {\n intent.putExtra(SEND_KEY,sendText.getText().toString());\n\n //Start next Activity/No data is passed back to this activity\n startActivity(intent);\n\n }", "public void updateSendButtonText() {\r\n sendButton.setText(topModel.getSendButtonText());\r\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n client.sendMessage(new QuestionAnsweredMessage(answerField.getText()));\n //mainGUI.showMainPanel();\n }", "@FXML\n public void sendAmessage(ActionEvent event) throws SQLException{\n DBConnect db = DBConnect.getInstance();\n db.sendMessage(message.getText(), selectedCustomer.getChat_id());\n message.setText(\"\");\n updateChat();\n }", "public void sendMessage(View view) {\n Intent intent = new Intent(this, DisplayMessageActivity.class);\n String message = \"You pressed the button!\";\n intent.putExtra(EXTRA_MESSAGE, message);\n startActivity(intent);\n\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n chat.receiveMessage();\n }", "@Override\r\n public void onClick(View v) {\n String msg = ed_msg.getText().toString();\r\n try {\r\n\t\t\t\t\tsend(HOST, PORT, msg.getBytes());\r\n\t\t\t\t\t\r\n\t \tmHandler.sendMessage(mHandler.obtainMessage()); \r\n\t \tcontent =HOST +\":\"+ msg +\"\\n\";\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tString text = getCurUser() + \" : \" + textField.getText();\n\t\t\t\ttextField.setText(\"\");\n\t\t\t\tfinal ChatMessage msg = new ChatMessage();\n\t\t\t\tmsg.setMessage(text);\n\t\t\t\tmainFrame.sendMessage(msg);\n\t\t\t\t\n\t\t\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tSendEmailFrame f = new SendEmailFrame();\r\n\t\t\t\tf.setVisible(true);\r\n\t\t\t}", "public void actionPerformed( ActionEvent ae )\n {\n if( ae.getSource() == sendButton )\n \tprocessMail(message);\n }", "public JButton getSend() {\n\t\treturn send;\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\ttry {\n\t\t\t\t\tString body = etBody.getText().toString();\n\t\t\t\t\tTApplicatioin.multiUserChat.sendMessage(body);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t// TODO: handle exception\n\t\t\t\t}\n\t\t\t}", "private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed\r\n sendMessage(jTextField1.getText());\r\n }", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\n\t\tString name = e.getActionCommand();\n\t\tswitch (name) {\n\t\tcase \"开始聊天\":\n\t\t\tif (!(Boolean.logicalXor((textIP.getText().equals(\"\")), (textGroup.getText().equals(\"\"))))\n\t\t\t\t\t|| (textPort.getText().equals(\"\"))) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"地址或端口不能为空\");\n\t\t\t} else if (textGroup.getText().equals(\"\")) {\n\t\t\t\trespond = false;\n\t\t\t\tconnectedToSocket();\n\t\t\t} else if (textIP.getText().equals(\"\")) {\n\n\t\t\t}\n\n\t\t\tbreak;\n\t\tcase \"断开\":\n\t\t\ttry {\n\t\t\t\tclient.close();\n\t\t\t\tChangeButtonSta(true, false);\n\t\t\t} catch (Exception e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\n\t\t\tbreak;\n\t\tcase \"清屏\":\n\t\t\ttextList.removeAll();\n\t\t\tbreak;\n\t\tcase \"发送\":\n\t\t\tif ((chat.isEnabled() || client.isClosed())&&!respond) {\n\t\t\t\tSystem.out.println(\"chat.isEnabled:\"+chat.isEnabled());\n\t\t\t\tSystem.out.println(\"client.isclosed:\"+client.isClosed());\n\t\t\t\tSystem.out.println(\"respond:\"+respond);\n\n\t\t\t\tJOptionPane.showMessageDialog(null, \"还没连接,发送消息失败\");\n\n\t\t\t} else {\n\t\t\t\tsendMsg(sendContext.getText());\n\t\t\t}\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tSystem.out.println(\"--------3------\");\n\t\t\tbreak;\n\n\t\t}\n\n\t}", "public void sendMessage(View buttonView)\n {\n state = 0;\n Intent intent = new Intent(this, DisplayMessageActivity.class);\n EditText editText = (EditText) findViewById(R.id.Message);\n EditText editTextPhoneNumber = (EditText) findViewById(R.id.Phone);\n String message = editText.getText().toString();\n String phoneNumberMessage = editTextPhoneNumber.getText().toString();\n intent.putExtra(EXTRA_MESSAGE, message);\n intent.putExtra(EXTRA_PHONEMESSAGE, phoneNumberMessage);\n startActivity(intent);\n }", "public void sendMessage(View view) {\n\t\t// Do something in response to button\n\t\tIntent intent = new Intent(this, DisplayMessageActivity.class);\n\t\tstartActivity(intent);\n\n\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tEnviarMailVisMed mail = new EnviarMailVisMed();\r\n\t\t\t\tmail.setVisible(true);\r\n\t\t\t}", "private void customSendBlueButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_customSendBlueButtonActionPerformed\n String custom = customMessageField.getText();\n Msg.send(\"Clicked - message: \" + custom);\n sendCustomMessage(custom, \"B\");\n }", "public void onSendMessage(View view) {\n // get the EditText view of the layout with the id: message\n EditText messageView = (EditText) findViewById(R.id.message);\n // get the text added by the user in the EditText\n String messageText = messageView.getText().toString();\n // Create a new Intent with an action of SEND\n Intent intent = new Intent(Intent.ACTION_SEND);\n // set the MIME type for the Intent\n intent.setType(\"text/plain\");\n // Add to the Intent the text from the EditText view\n intent.putExtra(Intent.EXTRA_TEXT, messageText);\n // get the text form a string resource\n String chooserTitle = getString(R.string.chooser);\n // wrap the Intent in a chooser so Android always ask for with app to choose\n Intent chosenIntent = Intent.createChooser(intent, chooserTitle);\n // Start the activity of whatever app is available\n startActivity(chosenIntent);\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tsendSmsNew(phoneNum);\r\n\t\t\t\tsetTextSend();\r\n\t\t\t}", "@Override\n\tpublic void onMessagePlayCompleted() {\n\t\tbtnSend.setEnabled(true);\n\t}", "public void sendMessage (View view)\r\n\t{\r\n\t\t// Respond to the button click\r\n\t\tIntent intent = new Intent(this, DisplayMessageActivity.class);\r\n\t\tEditText editText = (EditText) findViewById(R.id.edit_message);\r\n\t\tString message = editText.getText().toString();\r\n\t\tintent.putExtra(EXTRA_MESSAGE, message);\r\n\t\tstartActivity(intent);\r\n\t}", "@Override\n\t public void onClick(View v) {\n\t \t SendReqToPebble();\n\t }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tif(chat_field.getText().equals(\"\")) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"채팅을 입력해주세요.\", \"warning\",JOptionPane.WARNING_MESSAGE);\n\t\t\t\t}\n\t\t\t\tchat_area.append(\"[\" + id + \"]\" + chat_field.getText() + \"\\n\");\n\t\t\t\twt.sendMsg();\n\t\t\t\tchat_field.setText(\"\");\n\t\t\t}", "void sendMessage() {\n\n\t}", "public void clickButton(View v) {\n\n // Get the text we want to send.\n EditText et = (EditText) findViewById(R.id.editText);\n String msg = et.getText().toString();\n\n // Then, we start the call.\n PostMessageSpec myCallSpec = new PostMessageSpec();\n\n\n myCallSpec.url = SERVER_URL_PREFIX + \"post_msg.json\";\n myCallSpec.context = ChatActivity.this;\n // Let's add the parameters.\n HashMap<String,String> m = new HashMap<String,String>();\n m.put(\"app_id\", MY_APP_ID);\n m.put(\"msg\", msg);\n myCallSpec.setParams(m);\n\n startSpinner();\n\n // Actual server call.\n if (uploader != null) {\n // There was already an upload in progress.\n uploader.cancel(true);\n }\n uploader = new ServerCall();\n //startSpinner();\n uploader.execute(myCallSpec);\n }", "@Override\n\tpublic void sendMessage() {\n\t\t\n\t}", "@Override\r\n\tpublic void onClick(View v) {\n\t\tswitch (v.getId()) {\r\n case R.id.sendd:\r\n buffer = new byte[]{'d'};\r\n if (sendMessage(buffer) == -1) {\r\n Toast.makeText(getActivity(), \"失败,请检查连接!\", Toast.LENGTH_SHORT).show();\r\n } else {\r\n Toast.makeText(getActivity(), \"正在关闭,请稍后...\", Toast.LENGTH_SHORT).show();\r\n }\r\n break;\r\n case R.id.sendz:\r\n buffer = new byte[]{'z'};\r\n if (sendMessage(buffer) == -1) {\r\n Toast.makeText(getActivity(), \"失败,请检查连接!\", Toast.LENGTH_SHORT).show();\r\n } else {\r\n Toast.makeText(getActivity(), \"正在关闭,请稍后...\", Toast.LENGTH_SHORT).show();\r\n }\r\n break;\r\n case R.id.sendrclear:\r\n byte[] a = new byte[]{60,0,0};\r\n sendR(a);\r\n break;\r\n case R.id.sendrcloud:\r\n byte[] b = new byte[]{0,2,0};\r\n sendR(b);\r\n break;\r\n\r\n case R.id.sendrcloud2:\r\n byte[] c = new byte[]{127,2,0};\r\n sendR(c);\r\n break;\r\n\r\n case R.id.sendrrain:\r\n byte[] d = new byte[]{60,1,1};\r\n sendR(d);\r\n break;\r\n\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t}", "@Override\n\tpublic void onClick(View v) {\n\t\tif(v.getId() == R.id.bSend){\n\t\t\tif(text.getText().toString()!=null){\n\t\t\t\tmsg = text.getText().toString();\n\t\t\t\tchat.append(user+\": \"+msg+\"\\n\");\n\t\t\t\tmyGame.sendPrivateChat(challenged, msg);\n\t\t\t\ttext.setText(\"\");\n\t\t\t}else{\n\t\t\t\tToast.makeText(ChatActivity.this, \"Pls Enter Text\", Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t//\t}else if(v.getId()==R.id){\n\t\t\t\n\t\t}\n\t}", "@Override\n public void send() {\n System.out.println(\"send message by SMS\");\n }", "private void sendTextInBox() {\n\t\tmodelAdapter.send(textFieldMessage.getText());\n\t textFieldMessage.setText(\"\");\n\t }", "public void actionPerformed(ActionEvent e) {\n\n if (inputField.getText().trim().length() == 0) {\n return;\n }\n try {\n\n String input = inputField.getText();\n \n inputField.setText(\"\");\n clientMessage = new Message(getName(), Message.ALL, input, Message.DATA);\n clientMessage.setID(manager.getNextMessageID());\n //JOptionPane.showMessageDialog(null, input);\n //JOptionPane.showMessageDialog(null, clientMessage.getContent());\n sendMessage(clientMessage);\n\n } catch (IOException err) {\n System.err.println(err.getMessage());\n err.printStackTrace();\n }\n }", "@Override\n public void onClick(View view) {\n String msg = mSendView.getText().toString();\n currMessage = msg;\n mSendView.setText(\"\");\n sendMessage(msg);\n refresh();\n\n }", "private JButton initializeSendButton() {\r\n\t\tJButton sendButton = new JButton(\"Send\");\r\n\t\tsendButton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t// send message which taken from text field.\r\n\t\t\t\ttry {\r\n\t\t\t\t\tnotifyMessageFromUI();\r\n\t\t\t\t\tchatArea.append(messageField.getText() + \"\\n\");\r\n\t\t\t\t\tmessageField.setText(\"\");\r\n\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\treturn sendButton;\r\n\t}", "@Override\r\n\tpublic void onClick(View arg0) {\n\t\tIntent myobj=new Intent(Intent.ACTION_SENDTO,Uri.parse(\"smsto:\"+e2.getText().toString()));\r\n\t\tmyobj.putExtra(\"sms_body\",e1.getText().toString());\r\n\t\tstartActivity(myobj);\r\n\t}", "public boolean send() {\n\t\tif (!isValid())\n\t\t\treturn false;\n\t\tif (ActionBar.sendKey(getSlot()))\n\t\t\treturn true;\n\t\tWidgetChild main = SlotData.getMainChild(getSlot());\n\t\treturn WidgetUtil.visible(main) && EntityUtil.interact(false, main);\n\t}", "private void sendMessage(JTextField text){\n \t\tString message = text.getText();\n \t\tfor(int i = 0; i < listeners.size(); i++)\n \t\t{\n \t\t\tboolean b = listeners.get(i).sendMessage(userName, message);\n \t\t\tif(b == false)\n \t\t\t\tSystem.out.println(\"Error, could not send\");\n \t\t}\n \t\t\n \t\ttext.setText(\"\");\n \t}", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\ttry {\n\t\t\t\ttextfield.setEditable(false);\n\t\t\t\tconnectButton.setEnabled(false); // username can be sent only once\n\t\t\t\tclient.sendUsername(textfield.getText()); //sends the username to the server\n\t\t\t}catch(Exception a){\n\t\t\t\ta.printStackTrace();\n\t\t\t}\n\t\t}", "public void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\tif (e.getActionCommand().equals(\"Envoyer un mail au support\")) {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tHistorique.ecrire(\"Ouverture de : \"+e);\r\n\t\t\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tnew FEN_SendMail();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tSendEmailManager mng = new SendEmailManager(course, section);\r\n\t\t\t\ttry {\r\n\t\t\t\tfor (Student student : StudentArray) {\r\n\t\t\t\t\tif(mng.sendFromGMail(student.getEmail(), student.getName(), student.getCode(), student.getGrade())) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\tthrow new SendFailedException(\"send failed\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Send Successed\");\r\n\t\t\t\t}catch(SendFailedException ex) {\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Error\");\r\n\t\t\t\t}\r\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tsendEmail();\n\t\t\t}", "private void customSendRedButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_customSendRedButtonActionPerformed\n String custom = customMessageField.getText();\n Msg.send(\"Clicked - message: \" + custom);\n sendCustomMessage(custom, \"R\");\n }", "public void sendButtonClick(View v){\n String title = getText(R.string.mail_title).toString();\n String mailto = \"mailto:\" + emailAdress;\n Intent openEmailApp = new Intent(Intent.ACTION_SENDTO);\n openEmailApp.setType(\"plain/text\");\n openEmailApp.setData(Uri.parse(mailto));\n openEmailApp.putExtra(Intent.EXTRA_SUBJECT, userName + title);\n openEmailApp.putExtra(Intent.EXTRA_TEXT, evaluationMessage);\n startActivity(openEmailApp);\n }", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tString name = \"temporary place holder\";\n\t\ttry {\n\t\t\tString address = tfIP.getText();\n\t\t\tInetAddress senderAddress = DatagramSnR.createInetObj(address);\n\t\t\n\t\t\tint senderPort = Integer.parseInt(tfPort.getText());\n\t\t\n\t\t\tChatFrame mFrame = new ChatFrame(mSocket, senderAddress, senderPort, name);\n\t\t\tDatagramSnR.addToList(mFrame);\n\t\t}\n\t\tcatch (NullPointerException nl) {\n\t\t\tnl.printStackTrace();\n\t\t}\n\n\t}", "public void sendMsg(){\r\n\t\tsuper.getPPMsg(send);\r\n\t}", "private void jTextFieldTelefoneActionPerformed(java.awt.event.ActionEvent evt) {\n }", "public void goToSendCommand(View view){\n Log.i(tag, \"About to launch SendCommand\");\n Intent i = new Intent(this, SendCommand.class);\n startActivity(i);\n }", "private void setSendDataButton() {\n\t\tsetDataInDB();\n\t\tif (!alreadyPushed)\n\t\t\tsendDataToServer();\n\t\treturnOnWorkoutList();\n\t}", "public void sendMessage(View view) {\n Intent intent = new Intent(this, DisplayMessageActivity.class);\n //EditText editText = (EditText) findViewById(R.id.edit_message);\n //String message = editText.getText().toString();\n //intent.putExtra(EXTRA_MESSAGE, message);\n\n startActivity(intent);\n }", "public void send() {\n\t}", "public void sendMessage(String message, JButton b1, JButton b2, JTextField corn){\n port +=1;\n serverConnect.sendMessage(message);\n if(\"prepare\".equals(message)){\n serverConnect.sendMessage(parameters);\n }\n new CCWorker(b1, b2, port, corn).execute();\n }", "void messageSent();", "protected javax.swing.JButton getJButtonSend() {\n\t\tif(jButton == null) {\n\t\t\tjButton = new javax.swing.JButton();\n\t\t\tjButton.setPreferredSize(new java.awt.Dimension(85,25));\n\t\t\tjButton.setText(\"Send\");\n\t\t\tjButton.setName(\"Send\");\n\t\t\tjButton.setMnemonic(java.awt.event.KeyEvent.VK_S);\n\t\t\t\n\t\t\tjButton.setToolTipText(\"Send the play list file and save it locally\");\n\n\t\t\tjButton.addActionListener(new java.awt.event.ActionListener() { \n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\t\n\t\t\t\t\tString msg = getInvalidMsg();\n\t\t\t\t\tif( msg != null ) {\t\t\t\t\t\t\t\n\t\t\t\t\t\tJOptionPane.showMessageDialog(PlayListDialog.this,\n\t\t\t\t\t\t\tmsg,\n\t\t\t\t\t\t\t\"Invalid Input\", JOptionPane.OK_OPTION);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\twriteToPropFile( LMMUtils.PLAYER_FILE );\n\t\n\t\t\t\t\t\t\tsendFileMsg();\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch( IOException ioe ) {\n\t\t\t\t\t\t\tLMMLogger.error( \"Unable to write & send play list file\", ioe );\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\tdispose();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn jButton;\n\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t\ttry {\r\n\t\t\t\t\tnotifyMessageFromUI();\r\n\t\t\t\t\tchatArea.append(messageField.getText() + \"\\n\");\r\n\t\t\t\t\tmessageField.setText(\"\");\r\n\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}", "public void clickOnSendNotification() {\r\n\r\n\t\treportStep(\"About to click on Send Notification button \", \"INFO\");\r\n\r\n\t\tif(clickAfterWait(sendNotificationButton)) {\r\n\r\n\t\t\treportStep(\"Successfully clicked on the Send notification Button \", \"PASS\");\r\n\r\n\t\t}else {\r\n\r\n\t\t\treportStep(\"Failed to click onn the Send Notificationn Buttonn \", \"FAIL\");\r\n\t\t}\r\n\t}", "@Override\r\n\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\tsendmes(e.getActionCommand());\r\n\t\t\t\t\t\tusertext.setText(\"\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}", "@Step\n public void clickSendSMSButton(){\n actionWithWebElements.clickOnElement(sendSMSButton);\n }", "@Override\r\n\tpublic void actionPerformed(ActionEvent e)\r\n\t{\r\n\t\t\r\n\r\n\t\t// Get input from GUI window\r\n\t\tString input = m_GUI.getInput();\r\n\r\n\t\tif (input.isEmpty())\r\n\t\t\treturn;\r\n\r\n\t\tString message = new String();\r\n\r\n\t\tif (input.startsWith(\"/\"))\r\n\t\t{\r\n\t\t\t// Input is a command\r\n\t\t\tString command = new String(input.split(\" \")[0].trim().toLowerCase());\r\n\r\n\t\t\tswitch (command)\r\n\t\t\t{\r\n\t\t\tcase \"/connect\":\r\n\t\t\tcase \"/c\":\r\n\t\t\t\tString hostname = input.split(\" \")[1];\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\tm_connection.connect(hostname);\r\n\t\t\t\t} catch (IOException e1)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.err.println(\"Error: IO exception when conencting to server\");\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"/disconnect\":\r\n\t\t\tcase \"/dc\":\r\n\t\t\t\tm_connection.disconnect();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"/whisper\":\r\n\t\t\tcase \"/w\":\r\n\t\t\t\tString recepient = input.split(\" \")[1];\r\n\t\t\t\tmessage = input.split(\" \", 3)[2];\r\n\t\t\t\tm_connection.whisper(recepient, message);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"/list\":\r\n\t\t\tcase \"/l\":\r\n\t\t\t\tm_connection.list();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t} else\r\n\t\t{\r\n\t\t\t// Type is broadcast\r\n\t\t\tmessage = input;\r\n\t\t\tm_connection.broadcast(message);\r\n\t\t}\r\n\t\tm_GUI.clearInput();\r\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif(e.getSource()==send){\n\t\t\tif (inputArea.getText() != null || inputArea.getText() != \"\") {\n\t\t\t\tmessage = new Message();\n\t\t\t\t// message.setIp(adress.getText());\n\t\t\t\t// message.setPort(port.getText());\n\t\t\t\tmessage.setContain(inputArea.getText());\n\t\t\t\tmessage.setFlag(\"single_chat\");\n\t\t\t\tmessage.setIp(ip);\n\t\t\t\tmessage.setPort(\"\");\n\n\t\t\t\ttry {\n\t\t\t\t\tos = socket.getOutputStream();\n\t\t\t\t\toos = new MyObjectOutputStream(os);\n\t\t\t\t\toos.writeObject(message);\n\t\t\t\t\toos.flush();\n\n\t\t\t\t\tThread.sleep(200);\n\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t} catch (InterruptedException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\tdlmClinetMessage.addElement(message.getContain());\n\t\t\t\tinputArea.setText(\"\");\n\t\t\t} else {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"发送消息不能为空!\", \"错误\",\n\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t\t}\n\t\t}else if(e.getSource()==sendFile){\n\t\t\tJFileChooser jfc = new JFileChooser();\n\t\t\tjfc.setFileSelectionMode(JFileChooser.FILES_ONLY);\n\t\t\tjfc.showDialog(new JLabel(), \"选择\");\n\t\t\tFile file = jfc.getSelectedFile();\n\n\t\t\tif (file != null) {\n\t\t\t\tname = ou.queryOnlineUserNameByIp(\"/\" + ip\n\t\t\t\t\t\t );\n\t\t\t\tsetTitle(\"与\" + name + \"聊天中\");\n\n\t\t\t\tmessage = new Message();\n\t\t\t\t// message.setIp(adress.getText());\n\t\t\t\t// message.setPort(port.getText());\n\t\t\t\tmessage.setFlag(\"send_File\");\n\t\t\t\tmessage.setContain(file.getName());\n\t\t\t\tSystem.out.println(file.getFreeSpace());\n\t\t\t\tSystem.out.println(file.getTotalSpace());\n\t\t\t\tSystem.out.println(file.getUsableSpace());\n\t\t\t\t\n\t\t\t\tmessage.setIp(ip);\n\t\t\t\tmessage.setPort(\"\");\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tos = socket.getOutputStream();\n\t\t\t\t\toos = new MyObjectOutputStream(os);\n\t\t\t\t\toos.writeObject(message);\n\t\t\t\t\toos.flush();\n\t\t\t\t\tDataInputStream dis=new DataInputStream(new FileInputStream(file)); \n\t\t DataOutputStream dos=new DataOutputStream(socket.getOutputStream()); \n\t\t //ObjectOutputStream oos=new ObjectOutputStream(s.getOutputStream()); \n\t\t //oos.writeObject(f); \n\t\t dos.writeLong(file.length()); \n\t\t dos.writeUTF(file.getName()); \n\t\t System.out.println(\"长度:\"+file.length()); \n\t\t int count=-1,sum=0;\n\t\t byte[] buffer=new byte[1024*1024]; \n\t\t while((count=dis.read(buffer))!=-1){ \n\t\t dos.write(buffer,0,count); \n\t\t sum+=count; \n\t\t System.out.println(\"以传输\"+sum+\"byte\"); \n\t\t } \n\t\t System.out.println(\"发送完毕!\"); \n\t\t dos.flush();\n\t\t\t\t} catch (IOException e2) {\n\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\te2.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n//\t\t\t\tbyte[] buffer = new byte[1024];\n//\t\t\t\tFileInputStream fis = null;\n//\n//\t\t\t\t// 这里要重新new一个os\n//\n//\t\t\t\ttry {\n//\t\t\t\t\tos = socket.getOutputStream();\n//\t\t\t\t\toos = new MyObjectOutputStream(os);\n//\t\t\t\t\toos.writeObject(message);\n//\t\t\t\t\toos.flush();\n//\n//\t\t\t\t\tfis = new FileInputStream(file);\n//\n//\t\t\t\t\twhile (fis.read(buffer) > 0) {\n//\t\t\t\t\t\tos.write(buffer);\n//\t\t\t\t\t\tos.flush();\n//\t\t\t\t\t}\n//\t\t\t\t\t\n//\t\t\t\t} catch (IOException e1) {\n//\t\t\t\t\t// TODO Auto-generated catch block\n//\t\t\t\t\te1.printStackTrace();\n//\t\t\t\t}\n//\t\t\t\tdlmClinetMessage.addElement(\"成功发送:\" + file.getName());\n\t\t\t}\n\t\t}else if(e.getSource()==snake){\n\t\t\tnew Thread(new Runnable() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tfor (int i = 0; i < 20; i++) {// 使用for循环让窗体震动20次\n\t\t\t\t\t\tint newPoint = (int) (100 + Math.pow(-1, i) * 10);// 根据循环次数计算新点的位置\n\t\t\t\t\t\tsetLocation(newPoint, newPoint);// 设置窗体的显示位置\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tThread.sleep(50);// 线程休眠0.05秒来实现动态效果\n\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t}).start();// 启动新线程\n\t\t\t\n\t\t\tmessage = new Message();\n\t\t\t// message.setIp(adress.getText());\n\t\t\t// message.setPort(port.getText());\n\t\t\tmessage.setContain(\"发送了一个抖动!\");\n\t\t\tmessage.setFlag(\"snake\");\n\t\t\tmessage.setIp(ip);\n\t\t\tmessage.setPort(\"\");\n\n\t\t\ttry {\n\t\t\t\tos = socket.getOutputStream();\n\t\t\t\toos = new MyObjectOutputStream(os);\n\t\t\t\toos.writeObject(message);\n\t\t\t\toos.flush();\n\n\t\t\t\tThread.sleep(200);\n\t\t\t} catch (IOException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t} catch (InterruptedException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\tdlmClinetMessage.addElement(\"你发送了一个抖动!\");\n\t\t}\n\t}", "@Override\n\tpublic void send() {\n\t\tSystem.out.println(\"this is send\");\n\t}", "@Override\r\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tIntent i = new Intent(Intent.ACTION_SEND);\r\n\r\n\t\t\t\t\t\ti.setType(\"message/rfc822\");\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * i.setClassName(\"com.google.android.gm\",\r\n\t\t\t\t\t\t * \"com.google.android.gm.ComposeActivityGmail\");\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\ti.putExtra(Intent.EXTRA_EMAIL,\r\n\t\t\t\t\t\t\t\tnew String[] { \"[email protected]\" });\r\n\r\n\t\t\t\t\t\tstartActivity(i);\r\n\r\n\t\t\t\t\t}", "@Override\r\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tIntent i = new Intent(Intent.ACTION_SEND);\r\n\r\n\t\t\t\t\t\ti.setType(\"message/rfc822\");\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * i.setClassName(\"com.google.android.gm\",\r\n\t\t\t\t\t\t * \"com.google.android.gm.ComposeActivityGmail\");\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\ti.putExtra(Intent.EXTRA_EMAIL,\r\n\t\t\t\t\t\t\t\tnew String[] { \"[email protected]\" });\r\n\r\n\t\t\t\t\t\tstartActivity(i);\r\n\r\n\t\t\t\t\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent event) {\n\t\t\t\tsendData(event.getActionCommand());//调用sendData方法,响应操作。\t将信息发送给客户\r\n\t\t\t\tenterField.setText(\"\"); //将输入区域置空\r\n\t\t\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif(EmailSender.fr.getText().equals(\"\"))\r\n\t\t{\r\n\t\t\tJOptionPane.showMessageDialog(EmailSender.ES,\"Please Enter A Valid Email Address To Send From!\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif(EmailSender.t.getText().equals(\"\"))\r\n\t\t{\r\n\t\t\tJOptionPane.showMessageDialog(EmailSender.ES, \"Please Enter A Valid Email Address To Send To!\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif(EmailSender.subj.getText().contentEquals(\"\"))\r\n\t\t{\r\n\t\t\tint b = JOptionPane.showConfirmDialog(EmailSender.ES, \"Are you sure you want to send this without a subject?\");\r\n\t\t\t\r\n\t\t\tif(b==0)\r\n\t\t\t\tJOptionPane.showMessageDialog(EmailSender.ES, \"Email Sent\");\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tint a = JOptionPane.showConfirmDialog(EmailSender.ES, \"Are you sure you want to send?\");\r\n\t\tif(a==0)// If yes button is pressed a is 0\r\n\t\tJOptionPane.showMessageDialog(EmailSender.ES, \"Email Sent\");\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n\t\tpublic void onClick(View v) {\n\t\t\tC2DMessaging.register(getBaseContext(), \"[email protected]\");\t\t\t\n\t\t}", "public void sendLog() {\n\t\tcommon.waitFor(5000);\n\t\tcommon.isElementDiplayed(sendButton);\n\t\tsendButton.click();\n\t\tcommon.isElementDiplayed(sucessMessage);\n\t\tsendButton.click();\n\n\t}", "abstract void botonEnviar_actionPerformed(ActionEvent e);", "@Override\r\n\t\t\tpublic void onClick(DialogInterface dialog, int which)\r\n\t\t\t{\n\t\t\t\tif (!internetConnection)\r\n\t\t\t\t{\r\n\t\t\t\t\tshowNoConnectionDialog();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\t\r\n\t\t\t\t\r\n\t\t\t\t// Get phoneId to attend in message\r\n\t\t\t TelephonyManager telephonyManager = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);\r\n\t\t\t\tString phoneId = telephonyManager.getDeviceId(); \r\n\t\t\t \r\n\t\t\t\t// Send mail without blocking the GUI\r\n\t\t\t\tif (dataModel == null)\r\n\t\t\t\t{\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tSendEmail sendEmail = new SendEmail(\"[email protected]\", \r\n\t\t\t \t\t\t\t\t\t\t\t\t\"AskMeAgain\", \r\n\t\t\t \t\t\t\t\t\t\t\t\tdataModel.getRecipientMail(),\r\n\t\t\t \t\t\t\t\t\t\t\t\tgetResources().getString(R.string.fogot_id_mail_subject),\r\n\t\t\t \t\t\t\t\t\t\t\t\tgetResources().getString(R.string.fogot_id_mail_text) + \" \" + phoneId + \".\");\r\n\t\t\t sendEmail.execute();\r\n\t\t\t}", "@Override\n public void onClick(View v) {\n sendMessage(phone_from_intent);\n }", "@Override\n public void onClick(View v) {\n if (v == mBtnSendSms) {\n String strMobileNumber = mEditTextMobileNumber.getText().toString().trim();\n String strSmeBody = mEditTextSmsBody.getText().toString().trim();\n sendSms(strMobileNumber, strSmeBody);// Send SMS Method\n }\n\n }", "private void sendSignal(){\n\t\tSystem.out.println(inputLine + \"test\");\n\t\tMessageContent messageContent = new MessageContent(0, Constants.REMOTE_CONTROL_AGENT, Constants.PLACE_RANDOM);\n\t\tif(inputLine.equals(Constants.BUTTON_1_OFF)){\n\t\t\tmessageContent = new MessageContent(0, Constants.REMOTE_CONTROL_AGENT, Constants.PLACE_BEDROOM, \"0\");\n\t\t}else if(inputLine.equals(Constants.BUTTON_1_ON)){\n\t\t\tmessageContent = new MessageContent(1, Constants.REMOTE_CONTROL_AGENT, Constants.PLACE_BEDROOM, \"0\");\n\t\t}else if(inputLine.equals(Constants.BUTTON_2_OFF)){\n\t\t\tmessageContent = new MessageContent(0, Constants.REMOTE_CONTROL_AGENT, Constants.PLACE_KITCHEN, \"0\");\n\t\t}else if(inputLine.equals(Constants.BUTTON_2_ON)){\n\t\t\tmessageContent = new MessageContent(1, Constants.REMOTE_CONTROL_AGENT, Constants.PLACE_KITCHEN, \"0\");\n\t\t}else if(inputLine.equals(Constants.BUTTON_3_OFF)){\n\t\t\tmessageContent = new MessageContent(0, Constants.REMOTE_CONTROL_AGENT, Constants.PLACE_LIVINGROOM, \"0\");\n\t\t}else if(inputLine.equals(Constants.BUTTON_3_ON)){\n\t\t\tmessageContent = new MessageContent(1, Constants.REMOTE_CONTROL_AGENT, Constants.PLACE_LIVINGROOM, \"0\");\n\t\t}else if(inputLine.equals(Constants.BUTTON_4_OFF)){\n\t\t\tmessageContent = new MessageContent(0, Constants.REMOTE_CONTROL_AGENT, Constants.PLACE_RANDOM, \"0\");\n\t\t}else if(inputLine.equals(Constants.BUTTON_4_ON)){\n\t\t\tmessageContent = new MessageContent(1, Constants.REMOTE_CONTROL_AGENT, Constants.PLACE_RANDOM, \"0\");\n\t\t\tSystem.out.println(\"oh yeah\");\n\t\t}else if(inputLine.equals(Constants.BUTTON_5_ON)){\n\t\t\tmessageContent = new MessageContent(1, Constants.SHUTTER, Constants.PLACE_LIVINGROOM);\n\t\t}else if(inputLine.equals(Constants.BUTTON_5_OFF)){\n\t\t\tmessageContent = new MessageContent(0, Constants.SHUTTER, Constants.PLACE_LIVINGROOM);\n\t\t}\n\t\t\t\t\n\t\tString json = messageContent.toJSON();\n\t\tDFAgentDescription template = new DFAgentDescription();\n ServiceDescription sd = new ServiceDescription();\n if (inputLine.equals(Constants.BUTTON_5_ON) || inputLine.equals(Constants.BUTTON_5_OFF)) {\n\t\tsd.setType(Constants.SHUTTER);\n\t\tsd.setName(Constants.PLACE_LIVINGROOM);\n } else {\n\t\tsd.setType(Constants.AUTO_SWITCH);\n\t\tsd.setName(Constants.AUTO_SWITCH_AGENT);\n }\n template.addServices(sd);\n try {\n DFAgentDescription[] result = DFService.search(myAgent, template);\n if (result.length > 0) {\n ACLMessage request = new ACLMessage(ACLMessage.REQUEST);\n if (inputLine.equals(Constants.BUTTON_5_ON) || inputLine.equals(Constants.BUTTON_5_OFF)) {\n\t\t\t\trequest.setPerformative(ACLMessage.INFORM);\n }\n for (DFAgentDescription receiver : result) {\n if (!receiver.getName().equals(myAgent.getAID())) {\n request.addReceiver(receiver.getName());\n \n }\n }\n request.setContent(json);\n myAgent.send(request);\n }\n } catch(FIPAException fe) {\n fe.printStackTrace();\n }\n\n\n\t}", "public void actionPerformed(ActionEvent e) \n //if connect button is clicked\n {if (e.getSource() == connect) {\n connect(); // for ActionListener\n return;}\n \n //if user did not enter data\n data = tf.getText();\n if (data == null || data.trim().length() == 0) { \n \t// if the text field is empty\n JOptionPane.showMessageDialog(null, \"Enter data to send\"); \n data = null;\n return; }\n \n //send data to server\n try {\n if (data != null) { // if the text is not empty\n output.write(data + \"\\n\");// write it into socket server\n output.flush();} //close\n \t} \t \n catch (IOException ioe) {\n display(\"Sending error: \" + ioe.getMessage());} \n }" ]
[ "0.7801247", "0.7663302", "0.7551979", "0.74780583", "0.744195", "0.74034566", "0.7368098", "0.7288597", "0.7276684", "0.7211354", "0.71925884", "0.7176486", "0.70755976", "0.7041639", "0.7030029", "0.6994377", "0.69611", "0.69581205", "0.6955976", "0.6942012", "0.693272", "0.692516", "0.69191575", "0.69172263", "0.68874687", "0.6878532", "0.6876653", "0.6871525", "0.6870981", "0.6857565", "0.6854298", "0.6809194", "0.6809097", "0.6805687", "0.6790923", "0.6788313", "0.67853695", "0.6778741", "0.67696226", "0.67657614", "0.67553824", "0.67470485", "0.67467844", "0.6742739", "0.67202795", "0.6719652", "0.6713509", "0.6689839", "0.66889274", "0.6680968", "0.667606", "0.6673816", "0.66637355", "0.6640278", "0.66334635", "0.66295606", "0.6628986", "0.66233313", "0.66103953", "0.65992934", "0.6590717", "0.6586464", "0.657835", "0.6568858", "0.6568423", "0.6567864", "0.6560319", "0.6543931", "0.65408987", "0.65326726", "0.6531902", "0.6528821", "0.6513564", "0.6510384", "0.65004224", "0.6497973", "0.64844537", "0.64806265", "0.6476273", "0.6469555", "0.64654356", "0.64652866", "0.64625114", "0.6457248", "0.6447548", "0.644622", "0.64336354", "0.641737", "0.64170474", "0.6411326", "0.6411326", "0.6408151", "0.6407605", "0.64040834", "0.64032525", "0.6400934", "0.6399867", "0.6394815", "0.6392057", "0.63820726", "0.6371305" ]
0.0
-1
Get current time as Unix timestamp.
public static long getTime() { return (long)(new Date()).getTime(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static long currentTimeInSecond() {\n return Instant.now().getEpochSecond();\n }", "public static long longTimestamp() {\n return now().getTime();\n }", "public static long time() {\n return date().getTime();\n }", "private static long getCurrentTime() {\n return (new Date()).getTime();\n }", "public static String getCurrentTime()\n\t{\n\t\treturn getTime(new Date());\n\t}", "public long getCurrentSystemTime() {\n return getSystemTime() - startSystemTimeNano;\n }", "private long timeNow()\n {\n // The value of 3506716800000000L is the BAT as at midnight on\n // 1-Jan-1970, which is the base of the time that the system\n // gives us. It has to be adjusted for leap seconds though.\n return (System.currentTimeMillis() * 1000L) + DUTC.get() * 1000000L + 3506716800000000L;\n }", "public static long getTime() {\n\t\treturn (Sys.getTime() * 1000) / Sys.getTimerResolution();\n\t}", "public static long getCurrentUTCTime() {\n final Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone(DEFAULT_TIMEZONE));\n return calendar.getTimeInMillis();\n }", "public static long getSystemTime () {\n\n ThreadMXBean bean = ManagementFactory.getThreadMXBean();\n return bean.isCurrentThreadCpuTimeSupported()?\n (bean.getCurrentThreadCpuTime() - bean.getCurrentThreadUserTime()): 0L;\n }", "public long getCurrentTimeMillis() {\n return System.currentTimeMillis();\n }", "public static long getTime() {\r\n\t\treturn System.currentTimeMillis();\r\n\t}", "Long timestamp();", "public static String getCurrentTime() {\r\n\t\tDate date = new Date();\r\n\t\treturn date.toString();\r\n\t}", "public float getCurrentTime()\r\n\t{\r\n\t\tcurrenttime = Calendar.getInstance();\r\n\t\treturn currenttime.getTimeInMillis();\r\n\t}", "public final long getLocalTimeStamp()\n {\n return getTimeStamp( TimeZone.getDefault());\n }", "public static long getUserTime () {\n\n ThreadMXBean bean = ManagementFactory.getThreadMXBean();\n return bean.isCurrentThreadCpuTimeSupported()?\n bean.getCurrentThreadUserTime(): 0L;\n }", "public static long getSystemTime( ) {\n ThreadMXBean bean = ManagementFactory.getThreadMXBean( );\n return bean.isCurrentThreadCpuTimeSupported( ) ?\n (bean.getCurrentThreadCpuTime( ) - bean.getCurrentThreadUserTime( )) : 0L;\n\n }", "protected long getCurrentTime() {\n return System.currentTimeMillis();\n }", "public Date getCurrentTime() {\r\n return currentTime.getTime();\r\n }", "public static final long getTimeStem() {\n\t\tlong unix_time = Instant.now().getEpochSecond();\n\t\treturn unix_time;\n\t}", "public long getCurrentUserTime() {\n return getUserTime() - startUserTimeNano;\n }", "public long getCurrentTime() {\n return currentTime;\n }", "public static long getUserTime( ) {\n ThreadMXBean bean = ManagementFactory.getThreadMXBean( );\n return bean.isCurrentThreadCpuTimeSupported( ) ?\n bean.getCurrentThreadUserTime( ) : 0L;\n }", "long getCurrentTimeMs();", "public long getTimeStamp() {\n return 1370918376296L;\n }", "public long now() {\n return System.currentTimeMillis();\n }", "public static int getNowTime() {\n\t\tSimpleDateFormat timeFormat = new SimpleDateFormat(\"HHmmss\");\n\t\treturn Integer.parseInt(timeFormat.format(new Date()));\n\t}", "public static long getSecondsSinceEpoch() {\n return System.currentTimeMillis() / 1000L;\n }", "@ExecFunction(name = \"unix_timestamp\", argTypes = {}, returnType = \"INT\")\n public static Expression unixTimestamp() {\n return new IntegerLiteral((int) (System.currentTimeMillis() / 1000L));\n }", "public static Timestamp getNowTimestamp() {\n return new Timestamp(System.currentTimeMillis());\n }", "public static String timestamp()\n\t{\n\t\t/**\n\t\t * Get the current time formatted as HH:mm:ss.\n\t\t */\t\t\n\t\treturn new SimpleDateFormat(\"HH:mm:ss\").format(new Date());\n\t}", "public static Timestamp getNowTimestamp()\n {\n return new Timestamp(System.currentTimeMillis());\n }", "public long getTime();", "long getCurrentTimeMs() {\n return System.currentTimeMillis();\n }", "public long getCurrentDate() {\n\t\treturn LocalDate.now().atStartOfDay(ZONE).toInstant().toEpochMilli();\n\t}", "public long getTime() {\n\t\treturn (Sys.getTime() * 1000) / Sys.getTimerResolution();\n\t}", "long getCurrentTime() {\n if (dm == null) {\n return -1;\n }\n return DLockService.getLockTimeStamp(dm);\n }", "private long getSystemTime() {\n ThreadMXBean bean = ManagementFactory.getThreadMXBean();\n return bean.isCurrentThreadCpuTimeSupported() ? (bean.getCurrentThreadCpuTime() - bean.getCurrentThreadUserTime()) : 0L;\n }", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "public static long nowEpochMilli() {\n\n return\n ZonedDateTime\n .now(\n UTC)\n .toInstant()\n .toEpochMilli();\n\n }", "public int getSystemTime() {\n\t\treturn this.systemTime;\n\t}", "public String getSystemTime() {\n return DateFormat.getDateTimeInstance().format(new Date().getTime());\n }", "public static long now() {\n return System.nanoTime();\n }", "public static String currentTimestamp()\n {\n \n long currentTime = System.currentTimeMillis();\n sCalendar.setTime(new Date(currentTime));\n \n String str = \"\";\n str += sCalendar.get(Calendar.YEAR) + \"-\";\n \n final int month = sCalendar.get(Calendar.MONTH) + 1;\n if (month < 10)\n {\n str += 0;\n }\n str += month + \"-\";\n \n final int day = sCalendar.get(Calendar.DAY_OF_MONTH);\n if (day < 10)\n {\n str += 0;\n }\n str += day;\n \n str += \"T\";\n \n final int hour = sCalendar.get(Calendar.HOUR_OF_DAY);\n if (hour < 10)\n {\n str += 0;\n }\n str += hour + \":\";\n \n final int minute = sCalendar.get(Calendar.MINUTE);\n if (minute < 10)\n {\n str += 0;\n }\n str += minute + \":\";\n \n final int second = sCalendar.get(Calendar.SECOND);\n if (second < 10)\n {\n str += 0;\n }\n str += second + \".\";\n \n final int milli = sCalendar.get(Calendar.MILLISECOND);\n str += milli;\n \n str += \"Z\";\n \n return str;\n }", "private long getUserTime() {\n ThreadMXBean bean = ManagementFactory.getThreadMXBean();\n return bean.isCurrentThreadCpuTimeSupported() ? bean.getCurrentThreadUserTime() : 0L;\n }", "public static long timestampMicros()\n {\n return currentTimeMillis() * 1000;\n }", "public static LocalTime UTCTimeNow() {\n return TimeService.UTCTimeNow();\n }", "@Override\n\tpublic long getCurrentTime() {\n\t\treturn 0;\n\t}", "public String getCurrentTime() {\n return currentTime;\n }", "public static final String CurrentTime() {\n\t\t\n\t\tfinal SimpleDateFormat DF = new SimpleDateFormat(\"HH:mm:ss\");\n\t\treturn DF.format(new Date());\n\t}", "public static String getTimestamp() {\r\n\t\t\r\n\t\treturn new SimpleDateFormat(\"yyyyMMddHHmmss\").format(new Date());\r\n\t}", "public static int getTime() {\n\t\treturn time;\n\t}", "public static String fn_GetCurrentTimeStamp() {\n\t\tDate dte = new Date();\n\t\tDateFormat df = DateFormat.getDateTimeInstance();\n\t\tString strdte = df.format(dte);\n\t\tstrdte = strdte.replaceAll(\":\", \"_\");\n\t\treturn strdte;\n\t}", "public org.ros.message.Time getCurrentTime() {\n return time.getCurrentTime();\n }", "public long getCurrentThreadUserTime() {\n\t\tThreadMXBean bean = ManagementFactory.getThreadMXBean();\n\t\treturn bean.isCurrentThreadCpuTimeSupported() ? bean.getCurrentThreadUserTime() : -1L;\n\t}", "public static String getCurrentTimeStamp(){\n try {\n\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\n // Find todays date\n String currentDateTime = dateFormat.format(new Date());\n\n return currentDateTime;\n } catch (Exception e) {\n e.printStackTrace();\n\n return null;\n }\n }", "public long getTimestamp()\r\n {\r\n return safeConvertLong(getAttribute(\"timestamp\"));\r\n }", "long getTimeStamp();", "public final long getTime () {\n return time;\n }", "private String getcurrentTimeStamp() {\n\t\tDateTimeFormatter format = DateTimeFormatter\n\t\t\t\t.ofPattern(RidGeneratorPropertyConstant.TIMESTAMP_FORMAT.getProperty());\n\t\treturn LocalDateTime.now().format(format);\n\t}", "public long getCurrentWallClockTime() {\n return System.currentTimeMillis() - startWallClockTime;\n }", "private long makeTimestamp() {\n return new Date().getTime();\n }", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "public double getCurrentTime() {\n\t\treturn currentTime;\n\t}", "public long getTime() {\r\n\t\treturn time;\r\n\t}", "public static long CLOCK() {\n return java.lang.System.currentTimeMillis();\n }", "public long getTimestampMillisecUTC();", "public float getCurrentTime()\n\t{\n\t\treturn currentTime;\n\t}", "private static String currentTimestamp()\r\n {\n \r\n long currentTime = System.currentTimeMillis();\r\n sCalendar.setTime(new Date(currentTime));\r\n \r\n String str = \"\";\r\n str += sCalendar.get(Calendar.YEAR) + \"-\";\r\n \r\n final int month = sCalendar.get(Calendar.MONTH) + 1;\r\n if (month < 10)\r\n {\r\n str += 0;\r\n }\r\n str += month + \"-\";\r\n \r\n final int day = sCalendar.get(Calendar.DAY_OF_MONTH);\r\n if (day < 10)\r\n {\r\n str += 0;\r\n }\r\n str += day;\r\n \r\n str += \"T\";\r\n \r\n final int hour = sCalendar.get(Calendar.HOUR_OF_DAY);\r\n if (hour < 10)\r\n {\r\n str += 0;\r\n }\r\n str += hour + \":\";\r\n \r\n final int minute = sCalendar.get(Calendar.MINUTE);\r\n if (minute < 10)\r\n {\r\n str += 0;\r\n }\r\n str += minute + \":\";\r\n \r\n final int second = sCalendar.get(Calendar.SECOND);\r\n if (second < 10)\r\n {\r\n str += 0;\r\n }\r\n str += second + \".\";\r\n \r\n final int milli = sCalendar.get(Calendar.MILLISECOND);\r\n str += milli;\r\n \r\n str += \"Z\";\r\n \r\n return str;\r\n }", "public long getTimeStampL() {\n\t\treturn Long.parseLong(timeStamp);\n\t}", "public static String getNowTime(){\r\n\t\tDate date = new Date();\r\n\t\tDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\r\n\t\tString time = format.format(date);\r\n\t\treturn time;\r\n\t}", "public long getTime() {\n return time;\n }", "public final long getUTCTimeStamp()\n {\n // 86,400,000 = 1000 * 60 * 60 * 24 = milliseconds per day\n return ordinal == NULL_ORDINAL ? NULL_TIMESTAMP : (ordinal * 86400000L);\n }" ]
[ "0.73148227", "0.7289958", "0.72009444", "0.7056558", "0.7034741", "0.69962037", "0.69244534", "0.68846023", "0.6839329", "0.6828704", "0.68178445", "0.6814224", "0.68080175", "0.6792859", "0.67718595", "0.6743478", "0.6733347", "0.67020816", "0.6679852", "0.6676371", "0.6662144", "0.66560525", "0.6648985", "0.6638246", "0.6635636", "0.6630231", "0.66024554", "0.6592001", "0.65913856", "0.6575165", "0.6570237", "0.656857", "0.6560244", "0.6509336", "0.6502785", "0.65018505", "0.64724594", "0.64697236", "0.6467792", "0.64626676", "0.64626676", "0.64626676", "0.64626676", "0.64626676", "0.64626676", "0.64626676", "0.64626676", "0.64626676", "0.64626676", "0.64626676", "0.64626676", "0.6444451", "0.64344263", "0.64269733", "0.6420502", "0.6411742", "0.63671607", "0.6351156", "0.6342235", "0.63289183", "0.6320225", "0.63168234", "0.63163173", "0.6306051", "0.6305522", "0.628442", "0.627697", "0.6272864", "0.6267645", "0.6260352", "0.6255322", "0.6255179", "0.6251976", "0.6239862", "0.62269384", "0.62269384", "0.62269384", "0.62269384", "0.62269384", "0.62269384", "0.62269384", "0.62269384", "0.62269384", "0.62269384", "0.62269384", "0.62269384", "0.62269384", "0.62269384", "0.62269384", "0.62269384", "0.6217099", "0.62143016", "0.62083477", "0.62014955", "0.61975634", "0.6192821", "0.6188183", "0.6172386", "0.6171844", "0.61691" ]
0.71665907
3
Get time as Unix timestamp.
public static long getTime(String $timeString/* = null*/) { if ($timeString == null) { return getTime(); } try { return (new SimpleDateFormat(SQL_DTS)).parse($timeString).getTime(); } catch (Exception ex) { return 0; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Long timestamp();", "public static long getTime() {\n return (long)(new Date()).getTime();\n }", "public static long time() {\n return date().getTime();\n }", "public static long longTimestamp() {\n return now().getTime();\n }", "@ExecFunction(name = \"unix_timestamp\", argTypes = {}, returnType = \"INT\")\n public static Expression unixTimestamp() {\n return new IntegerLiteral((int) (System.currentTimeMillis() / 1000L));\n }", "public static final long getTimeStem() {\n\t\tlong unix_time = Instant.now().getEpochSecond();\n\t\treturn unix_time;\n\t}", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "public long getTime();", "public static long getTime() {\n\t\treturn (Sys.getTime() * 1000) / Sys.getTimerResolution();\n\t}", "public long getTimeStampL() {\n\t\treturn Long.parseLong(timeStamp);\n\t}", "public static long currentTimeInSecond() {\n return Instant.now().getEpochSecond();\n }", "public long getTimestampMillisecUTC();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "public static long getSecondsSinceEpoch() {\n return System.currentTimeMillis() / 1000L;\n }", "public long getTimestamp()\r\n {\r\n return safeConvertLong(getAttribute(\"timestamp\"));\r\n }", "public long getTimeStamp() {\n return 1370918376296L;\n }", "long getTimeStamp();", "long getTimestamp();", "public static long getTime() {\r\n\t\treturn System.currentTimeMillis();\r\n\t}", "public final long getTime () {\n return time;\n }", "public static int getTime() {\n\t\treturn time;\n\t}", "public long getTime() {\r\n \treturn time;\r\n }", "public long getTime() {\r\n\t\treturn time;\r\n\t}", "public long getTime() {\n return time;\n }", "public Long getTime() {\n return time;\n }", "long getTimeInMilliSeconds();", "public long getTimestamp();", "public long getTimestamp();", "Time getTime();", "long getTime() throws Exception;", "public long getTime() {\n\t\treturn (Sys.getTime() * 1000) / Sys.getTimerResolution();\n\t}", "public static long timestampMicros()\n {\n return currentTimeMillis() * 1000;\n }", "java.lang.String getTime();", "int getTime();", "int getTime();", "UtcT time_stamp () throws BaseException;", "@MavlinkFieldInfo(\n position = 1,\n unitSize = 8,\n description = \"Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number.\"\n )\n public final BigInteger timeUsec() {\n return this.timeUsec;\n }", "public final long getUTCTimeStamp()\n {\n // 86,400,000 = 1000 * 60 * 60 * 24 = milliseconds per day\n return ordinal == NULL_ORDINAL ? NULL_TIMESTAMP : (ordinal * 86400000L);\n }", "public long getTimeStamp() {return attributes.getLongValue(TIMESTAMP,-1);}", "public static long getSystemTime () {\n\n ThreadMXBean bean = ManagementFactory.getThreadMXBean();\n return bean.isCurrentThreadCpuTimeSupported()?\n (bean.getCurrentThreadCpuTime() - bean.getCurrentThreadUserTime()): 0L;\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public static String getTimestamp() {\r\n\t\t\r\n\t\treturn new SimpleDateFormat(\"yyyyMMddHHmmss\").format(new Date());\r\n\t}", "public long getTimestamp() {\n return ((long)(buffer.get(4) & 0xff) << 24) |\n ((long)(buffer.get(5) & 0xff) << 16) |\n ((long)(buffer.get(6) & 0xff) << 8) |\n ((long)(buffer.get(7) & 0xff));\n }", "public static long getUserTime () {\n\n ThreadMXBean bean = ManagementFactory.getThreadMXBean();\n return bean.isCurrentThreadCpuTimeSupported()?\n bean.getCurrentThreadUserTime(): 0L;\n }", "@javax.annotation.Nullable\n public Long getTime() {\n return time;\n }", "private long makeTimestamp() {\n return new Date().getTime();\n }", "public java.lang.Integer getTime() {\n return time;\n }", "public static long getSystemTime( ) {\n ThreadMXBean bean = ManagementFactory.getThreadMXBean( );\n return bean.isCurrentThreadCpuTimeSupported( ) ?\n (bean.getCurrentThreadCpuTime( ) - bean.getCurrentThreadUserTime( )) : 0L;\n\n }", "public long getReceiveTimeL() {\n\t\treturn Long.parseLong(receiveTime);\n\t}", "public static long getUserTime( ) {\n ThreadMXBean bean = ManagementFactory.getThreadMXBean( );\n return bean.isCurrentThreadCpuTimeSupported( ) ?\n bean.getCurrentThreadUserTime( ) : 0L;\n }", "int getTimestamp();", "public java.lang.Integer getTime() {\n return time;\n }", "public long getTime(){\n\n formatDate(mCalendar.getTimeInMillis());\n\n return mCalendar.getTimeInMillis();\n\n }", "public static int getNowTime() {\n\t\tSimpleDateFormat timeFormat = new SimpleDateFormat(\"HHmmss\");\n\t\treturn Integer.parseInt(timeFormat.format(new Date()));\n\t}", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public static String timestamp()\n\t{\n\t\t/**\n\t\t * Get the current time formatted as HH:mm:ss.\n\t\t */\t\t\n\t\treturn new SimpleDateFormat(\"HH:mm:ss\").format(new Date());\n\t}", "java.lang.String getTimestamp();", "java.lang.String getTimestamp();", "double getTime();", "public int getTime() {\n return time;\n }", "public int getTime() {\n return time;\n }", "public int getTime() {\n return time;\n }", "public long getTime() {\n return _time;\n }", "public int getTime() {\r\n return time;\r\n }", "private long timeNow()\n {\n // The value of 3506716800000000L is the BAT as at midnight on\n // 1-Jan-1970, which is the base of the time that the system\n // gives us. It has to be adjusted for leap seconds though.\n return (System.currentTimeMillis() * 1000L) + DUTC.get() * 1000000L + 3506716800000000L;\n }", "public static String getTimestamp() {\n\t\tCalendar cal = Calendar.getInstance();\n\t\t//define the format of time stamp\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\treturn sdf.format(cal.getTime());\n\n\t}" ]
[ "0.7007096", "0.6943016", "0.6934163", "0.6922427", "0.689584", "0.6865777", "0.67375124", "0.67375124", "0.67375124", "0.67375124", "0.67375124", "0.67375124", "0.67375124", "0.67375124", "0.67375124", "0.67375124", "0.67375124", "0.67375124", "0.6670614", "0.6665592", "0.659986", "0.6578032", "0.6501176", "0.646849", "0.646849", "0.646849", "0.646849", "0.646849", "0.646849", "0.646849", "0.646849", "0.646849", "0.646849", "0.646849", "0.646849", "0.646849", "0.646849", "0.646849", "0.646849", "0.6463151", "0.64338404", "0.63907933", "0.6390273", "0.63662434", "0.6342067", "0.63243395", "0.6318873", "0.63031155", "0.6280605", "0.62737674", "0.6270026", "0.6247494", "0.6247493", "0.6247493", "0.62356216", "0.62171125", "0.6212487", "0.6207864", "0.6204825", "0.6186909", "0.6186909", "0.6171025", "0.6159115", "0.6147986", "0.61401695", "0.6137883", "0.6127141", "0.6127141", "0.6123032", "0.6123032", "0.6123032", "0.6123032", "0.6123032", "0.6123032", "0.61136264", "0.6103544", "0.6099596", "0.60779005", "0.6074188", "0.60484415", "0.60464287", "0.60293907", "0.60191786", "0.60187316", "0.60187304", "0.60175693", "0.60152155", "0.6014582", "0.6014582", "0.6014582", "0.60064435", "0.60036176", "0.60036176", "0.59982926", "0.59955597", "0.59955597", "0.59955597", "0.5993119", "0.59853375", "0.5976632", "0.5955381" ]
0.0
-1
Get Unix timestamp from date/time extracted from RSSfeed.
public static long fromRss(String $timeString) { try { return (new SimpleDateFormat(RSS_DTS)).parse($timeString).getTime(); } catch (Exception ex) { return 0; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long getTimestamp()\r\n {\r\n return safeConvertLong(getAttribute(\"timestamp\"));\r\n }", "Long timestamp();", "public long getTimeStamp() {return attributes.getLongValue(TIMESTAMP,-1);}", "public long DateStringToUnixTimeStamp(String sDateTime) {\n DateFormat formatter;\n Date date = null;\n long unixtime = 0;\n formatter = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss\");\n\n try {\n date = formatter.parse(sDateTime);\n unixtime = date.getTime() / 1000L;\n } catch (Exception ex) {\n ex.printStackTrace();\n unixtime = 0;\n }\n\n return unixtime;\n }", "public long getTimeStampL() {\n\t\treturn Long.parseLong(timeStamp);\n\t}", "@ExecFunction(name = \"unix_timestamp\", argTypes = {}, returnType = \"INT\")\n public static Expression unixTimestamp() {\n return new IntegerLiteral((int) (System.currentTimeMillis() / 1000L));\n }", "public static final long getTimeStem() {\n\t\tlong unix_time = Instant.now().getEpochSecond();\n\t\treturn unix_time;\n\t}", "public static long convertToTimestamp(String timestamp) {\n return LocalDateTime.parse(timestamp, FORMATTER).toInstant(ZoneOffset.UTC).toEpochMilli();\n }", "public static long getSecondsSinceEpoch() {\n return System.currentTimeMillis() / 1000L;\n }", "protected long readTimestampFromString(String value) {\r\n\t\t return Long.parseLong(value);\r\n\t\t }", "public long get_infos_timestamp() {\n return (long)getUIntBEElement(offsetBits_infos_timestamp(), 32);\n }", "long getTimeStamp();", "@Override\n \tpublic long extractTimestamp(Row element, long previousElementTimestamp) {\n \t\tlong timestamp= 0;\n \t\ttimestamp = ((Timestamp) element.getField(0)).getTime();\n \t\t//timestamp = (Long)element.getField(1);\n \t\tcurrentMaxTimestamp = timestamp;\n \t\treturn timestamp;\n \t}", "public java.lang.String getFeedTime() {\n java.lang.Object ref = feedTime_;\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 feedTime_ = s;\n return s;\n }\n }", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "public static long extractTimestampFromAccessLog(String timestamp) {\n // e.g. \"timestamp\": \"2017-04-28T10:59:58.907784163Z\" or \"2017-06-28T10:21:29Z\"\n timestamp = timestamp.replace(\"T\", \" \").replace(\"Z\", \"\");\n try {\n return DATE_TIME_NANOS_FORMAT.parseDateTime(timestamp).getMillis();\n } catch (IllegalArgumentException e) {\n return DATE_TIME_FORMAT.parseDateTime(timestamp).getMillis();\n }\n }", "Date getTimeStamp();", "public long getTimestamp() {\n return ((long)(buffer.get(4) & 0xff) << 24) |\n ((long)(buffer.get(5) & 0xff) << 16) |\n ((long)(buffer.get(6) & 0xff) << 8) |\n ((long)(buffer.get(7) & 0xff));\n }", "public long getTimeStamp() {\n return 1370918376296L;\n }", "long getTimestamp();", "public java.lang.String getFeedTime() {\n java.lang.Object ref = feedTime_;\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 feedTime_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "int getTimestamp();", "public long getReceivedSecondsTimestamp() {\n try {\n return Long.parseLong(receivedSecondsTimestamp);\n } catch (Exception anyE) {\n final String errorMessage = \"Error parsing received timestamp to long value\";\n log.error(errorMessage, anyE);\n throw new RuntimeException(errorMessage, anyE);\n }\n }", "private long getCurrentTimeSetting() {\n String\n dateString = mTextDate.getText().toString(),\n timeString = mTextClock.getText().toString();\n return DatetimeUtils.parseEpochTime(dateString, timeString);\n }", "public static int getDayFromTimestamp(long unixtime){\n \tCalendar c = Calendar.getInstance();\n \tc.setTimeInMillis(unixtime);\n \treturn c.get(Calendar.DATE);\n }", "@Override\n\tpublic long extractTimestamp(T element, long previousElementTimestamp) {\n\t\tfinal long now = Math.max(System.currentTimeMillis(), maxTimestamp);\n\t\tmaxTimestamp = now;\n\t\treturn now;\n\t}", "public static long longTimestamp() {\n return now().getTime();\n }", "public static long dateToTime(String s) {\n\t\tSimpleDateFormat simpledateformat = new SimpleDateFormat(\"yyyyMMddHHmmss\");\n\t\tlong l;\n\t\ttry {\n\t\t\tl = simpledateformat.parse(s).getTime();\n\t\t} catch (ParseException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tl = System.currentTimeMillis();\n\t\t}\n\n\t\treturn l;\n\n\t}", "Date getTimestamp();", "public long getTimestamp();", "public long getTimestamp();", "void fromUnixtime(HplsqlParser.Expr_func_paramsContext ctx) {\n int cnt = getParamCount(ctx);\n if (cnt == 0) {\n evalNull();\n return;\n }\n long epoch = evalPop(ctx.func_param(0).expr()).longValue();\n String format = \"yyyy-MM-dd HH:mm:ss\";\n if (cnt > 1) {\n format = evalPop(ctx.func_param(1).expr()).toString();\n }\n evalString(new SimpleDateFormat(format).format(new Date(epoch * 1000)));\n }", "private long makeTimestamp() {\n return new Date().getTime();\n }", "private static String getTimeStamp()\r\n\t{\r\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd_HH.mm.ss\");\r\n\t\tDate date = new Date();\r\n\t\treturn dateFormat.format(date);\r\n\t}", "public final long getLocalTimeStamp()\n {\n return getTimeStamp( TimeZone.getDefault());\n }", "private static long getDateInMillis(String formattedDate) {\n SimpleDateFormat simpleDateFormat =\n new SimpleDateFormat(\"MMM d, yyyy h:mm a\");\n long dateInMillis;\n Date dateObject;\n try {\n dateObject = simpleDateFormat.parse(formattedDate);\n dateInMillis = dateObject.getTime();\n return dateInMillis;\n } catch (ParseException e) {\n Log.e(\"Problem parsing date\", e.getMessage());\n e.printStackTrace();\n }\n return 0;\n }", "Long getMessageTimestamp(String msgId);", "public Date getPubTime() {\n return (Date) getAttributeInternal(PUBTIME);\n }", "public long getTimestampMillisecUTC();", "public abstract long getTimestampMillis();", "public static String getTimeStamp() {\n\t\tDate date = new Date();\n\t\treturn date.toString().replaceAll(\":\", \"_\").replaceAll(\" \", \"_\");\n\n\t}", "public static long iso8601ToEpochMillis(String time) {\n Instant strToDate = Instant.parse(time);\n return strToDate.toEpochMilli();\n }", "private long getNow()\n {\n // no need to convert to collection if had an Iterables.max(), but not present in standard toolkit, and not worth adding\n List<SSTableReader> list = new ArrayList<>();\n Iterables.addAll(list, cfs.getSSTables(SSTableSet.LIVE));\n if (list.isEmpty())\n return 0;\n return Collections.max(list, (o1, o2) -> Long.compare(o1.getMaxTimestamp(), o2.getMaxTimestamp()))\n .getMaxTimestamp();\n }", "static public String getTimeStamp(long timestamp) {\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy.MM.dd-HH:mm:ss\", Locale.US);\n return sdf.format(new Date(timestamp));\n }", "private long getLatestTimestamp(long defaultTimestamp) throws IOException {\n if (Files.notExists(LATEST_TIMESTAMP_PATH)) {\n Files.createFile(LATEST_TIMESTAMP_PATH);\n return defaultTimestamp;\n }\n\n // Read the latest timestamp\n String timestampString = new String(Files.readAllBytes(LATEST_TIMESTAMP_PATH), StandardCharsets.UTF_8);\n\n long timestamp = 0;\n if (timestampString.isEmpty()) {\n // Create the file for the first time\n return defaultTimestamp;\n }\n\n // Convert timestamp string to timestamp\n return Long.parseLong(timestampString);\n }", "private static long makeEpoch() {\n Calendar c = Calendar.getInstance(TimeZone.getTimeZone(\"GMT-0\"));\n c.set(Calendar.YEAR, 1582);\n c.set(Calendar.MONTH, Calendar.OCTOBER);\n c.set(Calendar.DAY_OF_MONTH, 15);\n c.set(Calendar.HOUR_OF_DAY, 0);\n c.set(Calendar.MINUTE, 0);\n c.set(Calendar.SECOND, 0);\n c.set(Calendar.MILLISECOND, 0);\n return c.getTimeInMillis();\n }", "String getDate() { return epoch; }", "public String getTimeStamp() {\n Calendar instance = Calendar.getInstance();\n SimpleDateFormat sdf = new SimpleDateFormat(\"MMM-dd-yyyy-HH:mm:ss:ms\");\n return sdf.format(instance.getTime());\n }", "void unixTimestamp(HplsqlParser.Expr_func_paramsContext ctx) {\n evalVar(new Var(System.currentTimeMillis()/1000));\n }", "UtcT time_stamp () throws BaseException;", "private String getSmsTimeStamp(Context context) {\n SharedPreferences sp = context.getSharedPreferences(\"sms_time_stamp\", Context.MODE_PRIVATE);\n return sp.getString(\"sms_time_stamp\", \"0\");\n }", "public static String getTimestamp() {\n\t\tCalendar cal = Calendar.getInstance();\n\t\t//define the format of time stamp\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\treturn sdf.format(cal.getTime());\n\n\t}", "long getPublishTime();", "public final long getUTCTimeStamp()\n {\n // 86,400,000 = 1000 * 60 * 60 * 24 = milliseconds per day\n return ordinal == NULL_ORDINAL ? NULL_TIMESTAMP : (ordinal * 86400000L);\n }", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "public static long getRelativeTimeAgo(String rawJsonDate) {\n String twitterFormat = \"EEE MMM dd HH:mm:ss ZZZZZ yyyy\";\n SimpleDateFormat sf = new SimpleDateFormat(twitterFormat, Locale.ENGLISH);\n sf.setLenient(true);\n\n long dateMillis = 0;\n try {\n dateMillis = sf.parse(rawJsonDate).getTime();\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n return dateMillis;\n }", "java.lang.String getTimestamp();", "java.lang.String getTimestamp();", "public long getReceiveTimeL() {\n\t\treturn Long.parseLong(receiveTime);\n\t}", "String getTimestamp();", "String getTimestamp();", "public long getTimestamp_() {\n return timestamp_;\n }", "public long getLastUpdateDate() {\n return (Long)content.get(LAST_UPDATE_DATE);\n }", "public int getTimestamp(){\r\n\t\treturn timestamp;\r\n\t}", "public static long getManifestPublishTimeMsInEmsg(EventMessage eventMessage) {\n try {\n return Util.parseXsDateTime(Util.fromUtf8Bytes(eventMessage.messageData));\n } catch (ParserException unused) {\n return -9223372036854775807L;\n }\n }", "public static long time() {\n return date().getTime();\n }", "void get_timestamp (int reversed)\n{\n BytePtr str = new BytePtr(20);\n int i;\n\n if (timestamp != 0) return;\n str.at(19, (byte)0);\n if (reversed != 0)\n for (i=19; i-- != 0; ) str.at(i, (byte)CTOJ.fgetc(ifp));\n else\n CTOJ.fread (str, 19, 1, ifp);\n\n int year = ( str.at(0) - '0')*1000 + (str.at(1) - '0')*100 + (str.at(2) - '0' )*10 + str.at(3) - '0';\n int mon = (str.at(5) - '0')*10 + str.at(6)-'0';\n int day = (str.at(8) - '0')*10 + str.at(9)-'0';\n int hour = (str.at(11) - '0')*10 + str.at(12)-'0';\n int min = (str.at(14) - '0')*10 + str.at(15)-'0';\n int sec = (str.at(17) - '0')*10 + str.at(18)-'0';\n \n Calendar cal = new GregorianCalendar();\n cal.set(year,mon-1,day,hour,min,sec);\n timestamp = cal.getTimeInMillis();\n}", "public static long getTime() {\n return (long)(new Date()).getTime();\n }", "public long getTime(){\n\n formatDate(mCalendar.getTimeInMillis());\n\n return mCalendar.getTimeInMillis();\n\n }", "public String unixTimeToDate(String unixSeconds)\n {\n Date date = new java.util.Date(Long.parseLong(unixSeconds)*1000L);\n // the format of your date\n SimpleDateFormat sdf = new java.text.SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss z\");\n // give a timezone reference for formatting (see comment at the bottom)\n sdf.setTimeZone(java.util.TimeZone.getTimeZone(\"GMT+7\"));\n String formattedDate = sdf.format(date);\n System.out.println(formattedDate);\n\n return formattedDate;\n }", "public Date getEpochDateAsDate() {\n if ( mEpochDateAsDate == null ) {\n SimpleDateFormat dateFormat = new SimpleDateFormat( getEpochDatePattern() );\n mEpochDateAsDate = dateFormat.parse( getEpochDate(), \n new ParsePosition(0) );\n }\n \n return mEpochDateAsDate;\n }", "public int getTimestamp() {\n return timestamp_;\n }", "public static String getNowAsTimestamp() {\r\n\r\n DateFormat dateFormat = new SimpleDateFormat(DATE_FORMAT_PATTERN);\r\n dateFormat.setTimeZone(TimeZone.getTimeZone(\"UTC\"));\r\n return dateFormat.format(new Date()).replaceAll(\"\\\\+0000\", \"Z\").replaceAll(\"([+-][0-9]{2}):([0-9]{2})\", \"$1$2\");\r\n }", "public static long nowEpochMilli() {\n\n return\n ZonedDateTime\n .now(\n UTC)\n .toInstant()\n .toEpochMilli();\n\n }" ]
[ "0.6135207", "0.5932446", "0.58647454", "0.58531517", "0.5834907", "0.5806603", "0.5787275", "0.56482285", "0.55978847", "0.5597689", "0.5594928", "0.55897427", "0.55386573", "0.5513634", "0.5497332", "0.5497332", "0.5497332", "0.5497332", "0.5497332", "0.5497332", "0.5497332", "0.5497332", "0.5497332", "0.5497332", "0.5497332", "0.5497332", "0.5497332", "0.5497332", "0.5497332", "0.5497332", "0.54783154", "0.54647464", "0.5416888", "0.5393403", "0.5386188", "0.53782076", "0.53775626", "0.5337589", "0.53316075", "0.5300736", "0.52930295", "0.5266382", "0.52659845", "0.5265098", "0.52103543", "0.52103543", "0.5207113", "0.5195507", "0.5191098", "0.51664495", "0.51549506", "0.51506114", "0.5142288", "0.51403195", "0.51194197", "0.51121044", "0.51079375", "0.50872767", "0.50860757", "0.5077169", "0.50760585", "0.5073124", "0.5070498", "0.5068016", "0.50579906", "0.50431466", "0.5024367", "0.5004906", "0.50044954", "0.5004251", "0.5004251", "0.5004251", "0.5004251", "0.5004251", "0.5004251", "0.5004251", "0.5004251", "0.5004251", "0.5004251", "0.5004251", "0.5004251", "0.4997034", "0.49959382", "0.49959382", "0.49906984", "0.49899384", "0.49899384", "0.4977491", "0.4962237", "0.49523842", "0.49427402", "0.4930806", "0.4922317", "0.49177352", "0.49134785", "0.48990476", "0.4896403", "0.4894816", "0.4894309", "0.48918" ]
0.6955063
0
Format to string presentation.
public static String format(String $formatString) { return format($formatString, 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract String format();", "@VTID(8)\r\n java.lang.String format();", "void format();", "public String getPrintableFormat() {\n String output = new String(\"Articoli del gruppo \" + groupName + \":\\n\");\n for (int i = 0; i < list.size(); i++) {\n Article article = list.get(i);\n output += String.format(\"%2d %s\\n\",i,article.getPrintableFormat());\n }\n return output;\n }", "public String toDisplay(){\n\t\treturn String.format(\"%s | %c | %.2f | %.2f\",name ,gender ,taxableIncome ,taxAmount);\n\t}", "public String format () {\n\t\treturn format;\n\t}", "protected String formatField() {\n \tif(!updated) return \"No record set.\";\n \t\n \tif(firstFieldP.getText() != null && lastFieldP.getText() != null) {\n\t \tfirstNameString = firstFieldP.getText();\n\t \tlastNameString = lastFieldP.getText();\n \t} else\t{\n \tfirstNameString = firstFieldC.getText();\n \tlastNameString = lastFieldC.getText();\n \ttribeString = tribeField.getText();\t\n \t}\n\n \tStringBuffer sb = new StringBuffer();\n \tsb.append(\"<html><p align=center>\");\n \tsb.append(firstNameString);\n \tsb.append(\" \");\n \tsb.append(lastNameString);\n \tsb.append(\"<br>\");\n \tsb.append(tribeString);\n \tsb.append(\"</p></html>\");\n \t\n \treturn sb.toString(); \t\n }", "public void formatPrint() {\n\t\tSystem.out.printf(\"%8d \", codigo);\n\t\tSystem.out.printf(\"%5.5s \", clase);\n\t\tSystem.out.printf(\"%5.5s \", par);\n\t\tSystem.out.printf(\"%5.5s \", nombre);\n\t\tSystem.out.printf(\"%8d \", comienza);\n\t\tSystem.out.printf(\"%8d\", termina);\n\t}", "public String format(Object value);", "public String toString()\n {\n return toString((Format) null);\n }", "R format(O value);", "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 String format() {\n return \"Mood is sad :[\";\n }", "public abstract String format(T t);", "@Override\n\tpublic String toString()\n\t{\n\t\treturn toString(Locale.getDefault(Locale.Category.FORMAT));\n\t}", "@Override\n public String toString(){\n String format = \"%1$-30s %2$-20s %3$-20s %4$-12s %5$-3s %6$-12s\";\n return String.format(format, this.title, this.stream, this.type,\n this.start_date.format(DateTimeFormatter.ofPattern(data.daTiFormat)), \"-\", this.end_date.format(DateTimeFormatter.ofPattern(data.daTiFormat)));}", "@Override\n\tpublic String format() {\n\t\treturn \"Mood is: Sad...\";\n\t}", "public String toString() {\n\t\tString fin = String.format(\"%-15d | %-20s | %-15d | %-15s | %-15s |\"\n\t\t\t\t, ID, name, age, organ,\n\t\t\t\tbloodType.getBloodType() );\n\t\treturn fin;\n\t}", "@Override\n\tprotected String formatted(Walue _) {\n\t\treturn \"\";\n\t}", "public String print(int format);", "String getFormat();", "String getFormat();", "String getFormat();", "public String printFormat(){\n return \"The workout: \" + getName() + \" should be done for \" + getSets() + \" sets and in each set should be \"\n + getReps() + \" reps.\";\n }", "@Override\n public String toString(){\n return String.format(\"%-8s %-8s %4d %7d %8.1f %s\",\n name, nationality, birthYear, yearsServed, height, validate());\n }", "public String toString(){\r\n return String.format(\"%-15s%-15s%-30s%,8.2f\", this.employeeFirstName, \r\n this.employeeLastName, this.employeeEmail, getBiweeklySalary());\r\n }", "public String toString ()\r\n\t{\r\n\t\tString format = \r\n\t\t\t\t\"*****************************************************************\" + \"\\n\" +\r\n\t\t\t\t\t\t\"\\t\" + \"The name of the contact is \"+ firstName + \" \" + surname + \". \" + \"\\n\" +\r\n\t\t\t\t\t\t\"\\t\" + \"The ID number of the contact is \" + uniqueID + \". \" + \"\\n\" +\r\n\t\t\t\t\t\t\"\\t\" + \"The phone number of the contact is \" + phoneNumber + \".\" + \"\\n\" +\r\n\t\t\t\t\t\t\"*****************************************************************\" + \"\\n\";\r\n\r\n\t\treturn format;\r\n\t}", "public String toString() {\n\t\t\tStringBuilder sb = new StringBuilder(\"%\");\n\t\t\t// Flags.UPPERCASE is set internally for legal conversions.\n\t\t\tFlags dupFlag = flag.dup().remove(Flags.UPPERCASE);\n\t\t\tsb.append(dupFlag.toString());\n\t\t\tif (index > 0) {\n\t\t\t\tsb.append(index).append('$');\n\t\t\t}\n\t\t\tif (width != -1) {\n\t\t\t\tsb.append(width);\n\t\t\t}\n\t\t\tif (precision != -1) {\n\t\t\t\tsb.append('.').append(precision);\n\t\t\t}\n\t\t\tif (isDateConversion) {\n\t\t\t\tsb.append(flag.contains(Flags.UPPERCASE) ? 'T' : 't');\n\t\t\t}\n\t\t\tsb.append(flag.contains(Flags.UPPERCASE)\n\t\t\t\t\t? Character.toUpperCase(conversionChar) : conversionChar);\n\t\t\treturn sb.toString();\n\t\t}", "public String fomatToPrint() {\n\t\treturn String.format(FORMAT_FOR_PRINT, author, ibn, year);\n\t}", "public String toDisplayString() {\r\n String ret = null;\r\n try {\r\n ret = this.toString(\"DMY.\");\r\n } catch (Exception ex) {/* Exception kann nicht auftreten */\r\n }\r\n return ret;\r\n }", "public String toString(){ \n\t\tString s = String.format(\"%s: %d, rating: %f, price:%f\", TITLE, YEAR_RELEASED, user_rating, getPrice());\n\t\treturn s; \n\t}", "public String toString()\n\t{\n\t\treturn String.format(\"%-25s%-15s\\n%-25s%-15s\\n%-25s%-15s\\n%-25s%-15d\\n%-25s%-15s\\n%-25s$%,-13.2f\", \n\t\t\t\t \t\t \t \"Name\", this.getName(), \"Address:\", this.getAddress(), \"Telephone number:\", this.getTelephone(), \n\t\t\t\t \t\t \t \"Customer Number:\", this.getCustNum(), \"Email notifications:\", this.getSignedUp() == true ? \"Yes\" : \"No\",\n\t\t\t\t \t\t \t \"Purchase amount:\", this.getCustomerPurchase());\n\t}", "String getFormattedString(IRenamable f);", "String format(T value);", "public String Formatting(){\n\t\t\t return String.format(\"%03d-%02d-%04d\", getFirstSSN(),getSecondSSN(),getThirdSSN());\n\t\t }", "@Override\n public String toString() {\n String leftAlignFormat = \"| %-10s | %-40s |%n\";\n String line = String.format(\"+------------+------------------------------------------+%n\");\n return line + String.format(leftAlignFormat,\"A.ID\", appointmentID)\n + line + String.format(leftAlignFormat,\"P.ID\", patientID)\n + line + String.format(leftAlignFormat,\"Title\", title)\n + line + String.format(leftAlignFormat,\"Date\", date)\n + line + String.format(leftAlignFormat,\"Start\", startTime)\n + line + String.format(leftAlignFormat,\"End\", endTime)\n + line;\n }", "protected String getToStringFormat()\n {\n return getClass().getSimpleName() + \"@\"\n + Integer.toHexString(hashCode()) + \": { \"\n + \"offset = 0x\" + Integer.toHexString(offset) + \"; \"\n + \"size = \" + size + \"; \"\n + \"%s\"\n + \"value = \" + getValue() + \"; \"\n + \"isAccessible = \" + isAccessible() + \"; \"\n + \"checksum = 0x\" + Integer.toHexString(checksum()) + \"; \"\n + \"}\";\n }", "@Override //indicates that this method overrides a superclass method\n public String toString(){\n\n return String.format(\"%s: %s %s%n%s : %s%n%s: %.2f%n%s: %.2f\",\"commission employee\",firstName,lastName,\n \"pan number\",panCardNumber,\"gross sales\",grossSales,\"commission rate\",commissionRate);\n }", "public String getFormattedString(String format, Object... objects) {\n return (String.format(format, objects));\n }", "public String print() {\n\t\tString offID = getID();\n\t\tString offName = getName();\n\t\tint offAge = getAge();\n\t\tString offState = getState();\n\t\tString data = String.format(\"ID: %-15s \\t Name: %-35s \\t Age: %-15s \\t State: %s\", offID, offName, offAge, offState);\n\t\treturn data;\n\t}", "public String getOutput() {\n return String.format(\"DCode: %-7.0f \\\"%-9s\\\" \\t - %5.3fmm x %5.3fmm - \\t Area: %6.3fmm² \\t Area Ratio: %5.2f \\t Transfer Effeciency: %2.1f \\t Number of apertures: %-5.0f\"\n , (double) dCode\n , shape\n , x\n , y\n , getArea()\n , getAreaRatio()\n , getTransferEffeciency()\n , (double) numbOfApertures);\n }", "public String toString(){\n return String.format(\"%s, %s, %s, %s, %s, %s\",make,model,variant, year, quantity,price);\n }", "void format(Printer printer);", "public String getStringRepresentation() {\n StringJoiner joiner = new StringJoiner(STRING_FORMAT_DELIMITER);\n\n joiner.add(this.getCaller())\n .add(this.getCallee())\n .add(SIMPLE_DATE_FORMAT.format(startTime))\n .add(SIMPLE_DATE_FORMAT.format(endTime));\n\n return joiner.toString();\n }", "public String format(TemporalAccessor temporal) {\n StringBuilder buf = new StringBuilder(32);\n formatTo(temporal, buf);\n return buf.toString();\n }", "public String toString() {\r\n//\t\treturn String.format(\"| %-18s | %-3d | %-12s | %-6s | \",\r\n//\t\t\t\tname, age, organ, bloodtype.getBloodType());\r\n\t\treturn String.format(\"%5d | %-18s | %-3d | %-12s | %-6s | \",\r\n\t\t\t\tpatientID, name, age, organ, bloodtype.getBloodType());\r\n\t}", "public String toPrint() {\n if (respuesta) {\n return \"La respuesta es: \" + String.valueOf(monto) + \"\\n\";\n }\n else {\n return \"La solicitud es: \" + String.valueOf(valor) + \",\" + String.valueOf(porcentaje) + \",\" + String.valueOf(peso) + \"\\n\";\n }\n }", "public String toString(){\n return \"Format: \" + format +\", \" + super.toString(); \n }", "public String format(Object... args) {\n\t\treturn format(new StringBuilder(), args).toString();\n\t}", "String documentFormat();", "public final String getFormatString() {\n final Exp formatExp =\n (Exp) getProperty(Property.FORMAT_EXP_PARSED.name, null);\n if (formatExp == null) {\n return \"Standard\";\n }\n final Calc formatCalc = root.getCompiled(formatExp, true, null);\n final Object o = formatCalc.evaluate(this);\n if (o == null) {\n return \"Standard\";\n }\n return o.toString();\n }", "public String toString(String fmt) {\n StringBuffer sb = new StringBuffer(\"[\");\n sb.append(\"[ \");\n for (int i = 0; i < numElements; i++) {\n sb.append(String.format(fmt, get(i)) + \" \");\n }\n sb.append(\"]\");\n return sb.toString();\n }", "private String formatDirections(RouteFormatter formatter)\n {\n \tif(currDirections == null){\n \t\tthrow new IllegalStateException(\"directions object should not be null at this point\");\n \t}\n \t\n\t\t// start the string\n \tStringBuilder instruct = new StringBuilder();\n\t\tinstruct.append(\"Start at \"+currDirections.getStart()+\"\\n\");\n\t\t\n\t\tIterator<String> iter = currDirections.iterator();\n\t\twhile(iter.hasNext()){\n\t\t\tinstruct.append(iter.next()+\"\\n\");\n\t\t}\n\t\t//distinguish between miles and minutes\n\t\tif(formatter instanceof WalkingRouteFormatter){\n\t\t\t//output.println(\"Trip time: \" + (Math.round(navigate.getLength()) * 20) + \" minutes\");\n\t\t\t\n\t\t\tinstruct.append(\"Trip time: \"+Math.round(currDirections.getLength()*20)+\" minutes\\n\\n\\n\");\n\t\t}else if(formatter instanceof DrivingRouteFormatter){\n\t\t\t//DecimalFormat printer = new DecimalFormat(\"#.#\"); // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n\t\t\t\n\t\t\tinstruct.append(\"Trip length: \"+(Math.round(currDirections.getLength()*10))/10.0+\" miles\\n\\n\\n\");\n\t\t}else{\n\t\t\tthrow new IllegalArgumentException(\"Directions implementor class not recognized\");\n\t\t}\n\t\treturn instruct.toString();\n }", "public String toString()\n\t{\n\t\treturn String.format(Locale.getDefault(), \"{Width:%1$ Height:%2$ Format:%3$ AspectRatio:%4$}\", new Object[] { this._width, this._height, this._format, this.getAspectRatio() });\n\t}", "@Override\r\n\tpublic String toStringFormat() {\n\t\treturn transactionId + \" \" + merhcantId\r\n\t\t\t\t+ \" \" + transactionVolume + \" \" + transactionAmount\r\n\t\t\t\t+ \" \" + transactionDate+\"\\n\";\r\n\t}", "public String toString(){\n return String.format(\n \"Width: %.2f\\nLength: %.2f\\nArea: %.2f\\nPerimeter: %.2f\\n\",\n getLength(), getWidth(), getArea(), getPerimeter());\n }", "@NotNull\n protected String format(@NotNull final Object value) {\n return value != null\n ? value.toString()\n : \"\";\n }", "public String toString(){\n\n\t\t/*\n\t\t *Puts the rental and due dates into two nicely formated\n\t\t *Strings.\n\t\t */\n\t\tdf.setCalendar(bought);\n\t\tString jazz = df.format(bought.getTime());\n\t\tdf.setCalendar(boughtReturn);\n\t\tString jazz2 = df.format(boughtReturn.getTime());\n\n\t\t/*\n\t\t * Returns the components of the DVD class. Categories are \n\t\t * highlighted in red using html codes.\n\t\t */\n\t\treturn \"<html><font color='red'>Name: </font>\" + \n\t\t getNameofRenter() + \", <font color='red'>Title: </font>\" + \n\t\tgetTitle() + \", <font color='red'>Rented On: </font>\"+ jazz + \n\t\t\", \" + \"<font color='red'>Due Back On: </font>\"+ jazz2;\n\n\t}", "public String print(){\r\n\t\t\r\n\t\treturn String.format(\"%9d\\t%-5s\\t\\t%-3d\\t\\t%-15s\",\r\n\t\t\t\tthis.engineNumber, \r\n\t\t\t\tthis.companyName, \r\n\t\t\t\tthis.numberOfRailCars, \r\n\t\t\t\tthis.destinationCity);\r\n\t}", "public String toPrettyFormatedString() {\n StringBuilder strBuilder = new StringBuilder();\n String NEW_LINE = System.getProperty(\"line.separator\");\n \n strBuilder.append(\"Status: \" + status + NEW_LINE);\n strBuilder.append(\"Data: \" + Arrays.toString(data) + NEW_LINE);\n \n return strBuilder.toString();\n }", "public String format(String format, Object... objects){\n return format(String.format(format, objects));\n }", "public String format(String key) {\r\n return getString(key);\r\n }", "public String getFormatString() {\r\n if (format == null) { return \"\"; }\r\n if (format.equals(ImportQueueItem.FORMAT_TAB)) {\r\n return FORMAT_TAB_DISPLAY;\r\n } else if (format.equals(ImportQueueItem.FORMAT_XML)) {\r\n return FORMAT_XML_DISPLAY;\r\n } else if (format.equals(ImportQueueItem.FORMAT_DISCOURSE)) {\r\n return FORMAT_DISCOURSE_DISPLAY;\r\n } else {\r\n return format + \" format\";\r\n }\r\n }", "public String format()\n {\n return String.format(\"%/t%/t/\", grassPatches.length, walkers.size());\n }", "public String toString(int format)\n {\n StringBuilder outString = new StringBuilder();\n\n //outString.ensureCapacity();\n\n outString.ensureCapacity(3*(cardAry.length+2));\n\n for (int i=0; i<cardAry.length; i++)\n {\n if (i%13 == 0 )\n outString.append(\"\\n\");\n\n //System.err.println(\"cardNum is \" + i);\n if( cardAry[i] != null) {\n\n if(i>0 && cardAry[i-1].hashCode() > cardAry[i].hashCode())\n outString.append(\"*\");\n\n outString.append(cardAry[i].toString(format));\n if (format == Card.VERBOSE)\n outString.append(\"\\n\");\n else if (format == Card.SHORT)\n outString.append(\", \");\n }\n\n else \n {\n outString.append(\" nul \");\n }\n }\n\n return new String( outString);\n }", "public String toString()\r\n\t{\r\n\t\tString output = \" \";\r\n\t\tString specialModifier = \" \";\r\n\t\tif(this.isSpecial())\r\n\t\t{\r\n\t\t\tspecialModifier = \" *\";\r\n\t\t}\r\n\t\t\t\r\n\t\toutput = String.format(\"%-9s%-5s%-19s%s%.2f\",getType(), specialModifier, this.getName(),\"$ \", this.getPrice());\r\n\t\t//code to be done here\r\n\t\t\r\n\t\t\r\n\t\treturn output;\r\n\t}", "public String toString()\n\t{\n\t\tString result\t= \"\";\n\n\t\tif ( isBold )\n\t\t{\n\t\t\tresult\t= \"bold\";\n\t\t}\n\n\t\tif ( isItalic )\n\t\t{\n\t\t\tif ( result.length() > 0 )\n\t\t\t{\n\t\t\t\tresult\t+= \" \";\n\t\t\t}\n\n\t\t\tresult\t+= \"italic\";\n\t\t}\n\n\t\tif ( result.length() == 0 )\n\t\t{\n\t\t\tresult\t= \"normal\";\n\t\t}\n\n\t\treturn result;\n\t}", "@Override\r\n\tpublic String toString() {\r\n\t\treturn String.format(\"%s: %s %s%n%s: %s%n%s: %.2f%n%s: %.2f%n%s: %.2f\", \"base-salaried commission employee\", getFirstName(),\r\n\t\t\t\tgetLastName(), \"social security number\", getSocialSecurityNumber(), \"gross sales\", getGrossSales(),\r\n\t\t\t\t\"commission rate\", getCommissionRate(), \"base salary\", getBaseSalary());\r\n\t}", "@Override\n public String toString(){\n \n return String.format(\"%-8d%-10s%-10s%-10s %.2f\\t%-6b\", getCustNumber(), getFirstName(), getSurname(),\n getPhoneNum(), getCredit(), canRent);\n }", "public synchronized String format(LogRecord record) {\r\n\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\tdat.setTime(record.getMillis());\r\n\t\tStringBuffer text = new StringBuffer();\r\n\t\tif (formatter == null) {\r\n\t\t\tformatter = new MessageFormat(FORMAT);\r\n\t\t}\r\n\t\tsb.append(new Date(record.getMillis()));\r\n\t\tsb.append(text);\r\n\t\tsb.append(\" \");\r\n\t\tsb.append(record.getLevel().getName());\r\n\t\tsb.append(\" \");\r\n\t\tif (record.getSourceClassName() == null) {\r\n\t\t\tsb.append(record.getLoggerName());\r\n\t\t}\r\n\t\tif (record.getSourceMethodName() != null) {\r\n\t\t\tsb.append(\" \");\r\n\t\t}\r\n\r\n\t\tString message = formatMessage(record);\r\n\t\tsb.append(message);\r\n\t\tif (record.getThrown() != null) {\r\n\t\t\ttry {\r\n\t\t\t\tStringWriter sw = new StringWriter();\r\n\t\t\t\tPrintWriter pw = new PrintWriter(sw);\r\n\t\t\t\trecord.getThrown().printStackTrace(pw);\r\n\t\t\t\tpw.close();\r\n\t\t\t\tsb.append(sw.toString());\r\n\t\t\t} catch (Exception ex) {\r\n\t\t\t\tJenkinsPlugInLogger.severe(\"Exception in executing format(LogRecord record) : \" + ex.getMessage());\r\n\t\t\t}\r\n\t\t}\r\n\t\tsb.append(\"\\n\");\r\n\t\treturn sb.toString();\r\n\t}", "public String toString() {\n\t\treturn String.format( \"%s: %s\\n%s: $%,.2f; %s:%.2f\",\r\n\t\t\t\t \"commission employee\", super.toString(),\r\n\t\t\t\t \"gross sales\", getGrossSales(),\r\n\t\t\t\t \"commission rate\", getCommissionRate() );\r\n\t}", "public String toString()\n {\n\t\t //Local Constants\n\n\t\t //Local Variables\n DecimalFormat fmt = new DecimalFormat(\"0.00\");\n\n //creates a string and stores it in strDisplay\n\t\tsemDisplay = Util.setLeft(14, sTerm) + \"\\n\";\n\t\tsemDisplay += Util.setLeft(15, \" Name \\t\" + \" Grade \\t\" + \" Credit Hours \\t\" + \" Grade Points \\t\") + \"\\n\";\n\n\n\n for(int i = 0; i<courseCount; i++)\n {\n\t\t semDisplay += courses[i].toString() + \"\\n\";\n\t }\n\n\t semDisplay += \"\\n\";\n\n\t //semDisplay += Util.setLeft(15, \" Total Hours \\t\" + \" Total Grade Points \\t\" + \" Semester GPA\") + \"\\n\";\n\n\t semDisplay += Util.setLeft(16,\"ttlCrHrs : \" +tlHours ) + Util.setLeft(3,\"ttlGrdPts : \" +\n\t fmt.format(grPts) + Util.setLeft(4,\"GPA: \"+ fmt.format(sGpa)));\n\n\t //semDisplay += Util.setLeft(16,\"ttlGrdPts : \" + fmt.format(grPts));\n\t //semDisplay += Util.setLeft(16,\"GPA: \"+ fmt.format(sGpa));\n\n\t //returns strDisplay\n return semDisplay;\n\n }", "@Override\n public String toString() {\n String result = (negative)\n ? \"-P\"\n : \"P\";\n\n if ((years > 0) || (months > 0) || (days > 0)) {\n if (years > 0) {\n result += years + \"Y\";\n }\n\n if (months > 0) {\n result += months + \"M\";\n }\n\n if (days > 0) {\n result += days + \"D\";\n }\n } else {\n result += \"0D\";\n }\n\n if ((hours > 0) || (minutes > 0) || (seconds > 0)) {\n result += \"T\";\n\n if (hours > 0) {\n result += hours + \"H\";\n }\n\n if (minutes > 0) {\n result += minutes + \"M\";\n }\n\n if (seconds > 0) {\n result += seconds + \"S\";\n }\n }\n\n return result;\n }", "public String getFormattedReceiptLabel() {\t \n\t String receiptLabel = res.getString(getReceiptLabel().getKey());\t \n\t int numberOfSpaces = ((totalLength - receiptLabel.length()) / 2);\t \n\t String prefix = \"\";\n\t String postfix = \"\";\n\t for(int i = 0; i < numberOfSpaces; i++) {\n\t\t prefix += \" \";\n\t\t postfix += \" \";\n\t }\n\t receiptLabel = prefix + receiptLabel + postfix;\t \n\t return receiptLabel;\n }", "public String toString()\n {\n String str = \"\";\n switch (align)\n {\n case LEFT :\n str = \",align=left\";\n break;\n case CENTER :\n str = \",align=center\";\n break;\n case RIGHT :\n str = \",align=right\";\n break;\n }\n return getClass().getName() + \"[hgap=\" + hgap + \",vgap=\" + vgap + str + \"]\";\n }", "public String format(INDArray arr, boolean summarize) {\n if(arr.isEmpty())\n return EMPTY_ARRAY_STR;\n this.scientificFormat = \"0.\";\n int addPrecision = this.precision;\n while (addPrecision > 0) {\n this.scientificFormat += \"#\";\n addPrecision -= 1;\n }\n this.scientificFormat = this.scientificFormat + \"E0\";\n if (this.scientificFormat.length() + 2 > this.padding) this.padding = this.scientificFormat.length() + 2;\n this.maxToPrintWithoutSwitching = Math.pow(10,this.precision);\n this.minToPrintWithoutSwitching = 1.0/(this.maxToPrintWithoutSwitching);\n return format(arr, 0, summarize && arr.length() > localMaxPrintElements);\n }", "@Override\n public String toString()\n {\n return String.format(\"%-20s\\t\\t%-30s%-30s\",number, name, party);\n}", "public String toString() {\n return String.format(\"%s:%n\\t%-10s: %s%n\\t%-10s: %s%n\\t%-10s: $%.2f%n\\t%-10s: %s%n\\t%-10s: %s%n\", \n \"Boat\", \"Model\", getVehicleModel(), \"Color\", getVehicleColor(), \"Cost\", getVehicleCost(), \n \"Type\", getBoatType(), \"Made of\", getBoatConstruct());\n }", "public String toString() {\n DecimalFormat f1 = new DecimalFormat(\"#,###\");\n if (gender) {\n return \"\" + f1.format(numsBaby) + \" girls named \" + name + \" in \" + year;\n } else {\n return \"\" + f1.format(numsBaby) + \" boys named \" + name + \" in \" + year;\n\n }\n }", "public String toString() {\n\t\tStringBuilder bld = new StringBuilder();\n\t\tFormatter fmt = new Formatter(bld);\n\t\tfor (int yPos = 0; yPos < getSlotCount(); yPos++) {\n\t\t\tint xBeanPos = getInFlightBeanXPos(yPos);\n\t\t\tfor (int xPos = 0; xPos <= yPos; xPos++) {\n\t\t\t\tint spacing = (xPos == 0) ? getIndent(yPos) : (xspacing + 1);\n\t\t\t\tString format = \"%\" + spacing + \"d\";\n\t\t\t\tif (xPos == xBeanPos) {\n\t\t\t\t\tfmt.format(format, 1);\n\t\t\t\t} else {\n\t\t\t\t\tfmt.format(format, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfmt.format(\"%n\");\n\t\t}\n\t\tfmt.close();\n\t\treturn bld.toString() + getSlotString();\n\t}", "@Override\n public String formatSave() {\n return \"BI\" + \" | \"\n + people + \" | \"\n + amount + \" | \"\n + amount / people + \" | \"\n + nameString(nameList);\n }", "private static String formatFamily (FamilyCard fc) {\n\t\tString res = \"\";\n\n\t\tFamilyHeadGuest fhg = fc.getCapoFamiglia();\n\t\tres += FamilyHeadGuest.CODICE;\n\t\tres += DateUtils.format(fc.getDate());\n\t\tres += String.format(\"%02d\", fc.getPermanenza());\n\t\tres += padRight(fhg.getSurname().trim().toUpperCase(),50);\n\t\tres += padRight(fhg.getName().trim().toUpperCase(),30);\n\t\tres += fhg.getSex().equals(\"M\") ? 1 : 2;\n\t\tres += DateUtils.format(fhg.getBirthDate());\n\n\t\t//Setting luogo et other balles is a bit more 'na rottura\n\t\tres += formatPlaceOfBirth(fhg.getPlaceOfBirth());\n\n\t\tPlace cita = fhg.getCittadinanza(); //banana, box\n\t\tres += cita.getId();\n\n\t\tres += fhg.getDocumento().getDocType().getCode();\n\t\tres += padRight(fhg.getDocumento().getCodice(),20);\n\t\tres += fhg.getDocumento().getLuogoRilascio().getId();\n\t\t//Assert.assertEquals(168,res.length()); //if string lenght is 168 we are ok\n\t\tres += \"\\r\\n\";\n\n\t\tfor (FamilyMemberGuest fmg : fc.getFamiliari()){\n\t\t\tres += formatFamilyMember(fmg, fc.getDate(), fc.getPermanenza());\n\t\t\t//res += \"\\r\\n\";\n\t\t}\n\n\t\treturn res;\n\t}", "String getValueFormat();", "public String toString (){\r\n \r\n DecimalFormat formatter = new DecimalFormat(\"$###,###.00\");\r\n String formatTotal = formatter.format(total);\r\n \r\n String spacer = \"--------------------\";\r\n String printName = \"Name: \" + this.name;\r\n String printTriage = \"Urgency of visit (1 = urgent, 5 = routine): \" + this.triage;\r\n String printCoverage = \"Percent of bill covered by insurance: \" + this.coverage;\r\n String printTotal = \"Amount owed to hospital before insurance: \" + formatTotal;\r\n String combined = spacer + \"\\n\\n\" + printName + \"\\n\\n\" + printTriage + \"\\n\\n\" + printCoverage + \"\\n\\n\" + printTotal + \"\\n\\n\" + spacer;\r\n return combined;\r\n }", "String format(double balance);", "protected String formatValue (Object value)\n {\n return String.valueOf(value);\n }", "public String toString() {\n return \"\" + year + \" \" + make + \" \" + model + \", \" + color + \", \" + getTrans() + \", $\" + price;\n }", "public String print(){\r\n\t\treturn String.format(\"%9d\\t%-5s\\t\\t%-3d\\t\\t%-15s\",\r\n\t\t\t\tthis.trackNumber, \r\n\t\t\t\tthis.engineNumber, \r\n\t\t\t\tthis.numRailCars, \r\n\t\t\t\tthis.destCity);\r\n\t\t}", "public String objectToString() {\n \n StringBuilder s = new StringBuilder(new String(\"\"));\n if(aggressor instanceof Town) {\n s.append(((Town) aggressor).getName()).append(\" \");\n } else {\n s.append(((Nation) aggressor).getName()).append(\" \");\n }\n if(defender instanceof Town) {\n s.append(((Town) defender).getName()).append(\" \");\n } else {\n s.append(((Nation) defender).getName()).append(\" \");\n }\n s.append(aggressorPoints).append(\" \");\n s.append(defenderPoints).append(\" \");\n for (Town town : towns.keySet()) {\n s.append(town.getName()).append(\" \");\n s.append(towns.get(town)).append(\" \");\n }\n\n if (rebelwar != null)\n s.append(\" \").append(rebelwar.getName());\n else\n s.append(\" \" + \"n u l l\");\n\n return s.toString();\n }", "public static String format(boolean value, int format) {\n \n switch (format) {\n \n case BooleanToText.YES_NO_FORMAT: \n if (value == true) return \"Yes\"; \n else return \"No\";\n \n case BooleanToText.ON_OFF_FORMAT:\n if (value == true) return \"On\"; \n else return \"Off\";\n \n case BooleanToText.GENDER_FORMAT:\n if (value == true) return \"Male\";\n else return \"Female\";\n \n case BooleanToText.ACTIVE_INACTIVE_FORMAT:\n if (value == true) return \"Active\";\n else return \"Inactive\";\n \n default: return null;\n }\n \n }", "String getValueFormatted();", "@Override\r\n public @Nullable String getFormattedText(RenderContext ctx)\r\n {\n String oorPrefix = getOORPrefix(ctx);\r\n String formattedValue = \"\";\r\n Object value = getDisplayValue(ctx);\r\n if (null != value)\r\n {\r\n formattedValue = super.getFormattedText(ctx);\r\n if (null == formattedValue)\r\n formattedValue = ConvertUtils.convert(value);\r\n }\r\n assert null != formattedValue;\r\n return oorPrefix + formattedValue;\r\n }", "public String format(String mformat, Object... args) {\n if(args.length==0){//expedite frequent case\n if (view != null) {\n view.append(mformat);\n }\n return mformat;\n }\n String ess = MessageFormat.format(mformat, args);\n if (view != null) {\n view.append(ess);\n }\n return ess;\n }", "public String formatTags() {\n String toPrint = \" \";\n for (String tag : tags) {\n toPrint += (\"#\" + tag + \" \");\n }\n return toPrint;\n }", "public String toString() {\n\t\tString str = \"\";\n\t\tstr = String.format(\"%.2f lbs. @ %.2f /lbs.\\n%s\\t%.2f \", this.getWeight(), getPrice(), this.getName(), this.getCost());\n\t\treturn str;\n\t}", "@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 getFormatString() {\n\t\treturn formatString;\n\t}", "@Override\n public String toString(){\n \n String result = (year + \" \" + preTB + \" \" + postTB + \" \" + Total + \"\\n\");\n return result;\n }", "public String format(double number);", "public java.lang.String toString() {\n\t\tString s=\"\";\n\t\ts+=String.format(\"%.2f\", weight);\n\t\t//s+=Double.toString(weight);\n\t\ts+=\" lbs. @ \";\n\t\ts+=DessertShoppe.cents2dollarsAndCents(price_per_pound);\n\t\ts+=\" /lb.\\t \\n\";\n\t\ts+=String.format(\"%-25s%6s\\n\",name, DessertShoppe.cents2dollarsAndCents(this.getCost()));\n\t\treturn s;\n\t}", "public String toString(){\r\n\t\tString a, b, c, d;\r\n\r\n\t\ta = \"Book ID: \" + (new Integer(id)).toString() + \"\\n\";\r\n\t\tb = \"Book Title: \" + title + \"\\n\";\r\n\t\tc = \"Book Author: \" + author + \"\\n\";\r\n\t\td = \"Book Date: \" + dateToString(dateOfPublication) + \"\\n\";\r\n\t\t\r\n\t\treturn a + b + c + d;\r\n\t}" ]
[ "0.7910927", "0.76226306", "0.73320925", "0.69361115", "0.6813091", "0.67925334", "0.67416304", "0.6694869", "0.66909456", "0.6686788", "0.66796035", "0.66385764", "0.6534323", "0.6519079", "0.6507877", "0.64754087", "0.64729005", "0.6448094", "0.6422495", "0.63922054", "0.638168", "0.638168", "0.638168", "0.6359017", "0.6318942", "0.63121384", "0.6299007", "0.6295378", "0.628626", "0.6270889", "0.6268214", "0.6247884", "0.6207396", "0.6190787", "0.6189749", "0.61872196", "0.61786187", "0.6169097", "0.61573756", "0.61528075", "0.61498874", "0.6125613", "0.61025953", "0.6099081", "0.60910165", "0.60906184", "0.60899585", "0.60827464", "0.60777247", "0.60714406", "0.60707444", "0.6069393", "0.6057328", "0.60524243", "0.6041248", "0.6032", "0.6029962", "0.6023009", "0.60125726", "0.60090065", "0.59802353", "0.5971884", "0.59690374", "0.59617394", "0.5951921", "0.59488016", "0.5947501", "0.59459305", "0.5928311", "0.59270585", "0.5925491", "0.5921176", "0.58871084", "0.5883697", "0.5883249", "0.58766496", "0.5875574", "0.5867338", "0.5864775", "0.5863604", "0.5857967", "0.58436364", "0.5837348", "0.5836871", "0.58351684", "0.5832338", "0.58296394", "0.58253986", "0.5819055", "0.5817708", "0.58135813", "0.5812747", "0.5810473", "0.5798831", "0.5797325", "0.57972413", "0.57897216", "0.57886297", "0.5781153", "0.57806087", "0.5776918" ]
0.0
-1
Format time from Unix timestamp to string presentation.
public static String format(String $formatString, long $timeValue /*= 0*/) { return (new SimpleDateFormat($formatString)).format($timeValue == 0 ? new Date() : new Date($timeValue)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String formatToString(long unixTimeInSecond) {\n LocalDateTime dateTime = LocalDateTime.ofInstant(Instant.ofEpochSecond(unixTimeInSecond), ZoneOffset.systemDefault());\n return DateTimeFormatter.ofPattern(DEFAULT_TIME_PATTERN).format(dateTime);\n }", "public static String getFormattedTime(long unixSec) {\n Date date = new Date(unixSec * 1000L); // convert seconds to milliseconds\n SimpleDateFormat sdf = new SimpleDateFormat(\"h:mm a\");\n sdf.setTimeZone(TimeZone.getTimeZone(\"GMT-5\"));\n String formattedTime = sdf.format(date);\n return formattedTime;\n }", "private static String timeFormat(long t, String format) {\n SimpleDateFormat sdf = new SimpleDateFormat(format, Locale.US);\n try {sdf.setTimeZone(TimeZone.getTimeZone(\"UTC\"));} catch (Exception e) {}\n return sdf.format(new Date(t));\n }", "public static String formatTime(long time) {\n long tmp = time;\n int hour = (int) (time / 3600);\n tmp -= hour * 3600;\n int min = (int) (tmp / 60);\n int sec = (int) (tmp - min * 60);\n\n String hourText = hour < 10 ? \"0\" + hour : \"\" + hour;\n String minText = min < 10 ? \"0\" + min : \"\" + min;\n String secText = sec < 10 ? \"0\" + sec : \"\" + sec;\n\n\n return hourText + \":\" + minText + \":\" + secText;\n }", "public String formatTime() {\n if ((myGameTicks / 16) + 1 != myOldGameTicks) {\n myTimeString = \"\";\n myOldGameTicks = (myGameTicks / 16) + 1;\n int smallPart = myOldGameTicks % 60;\n int bigPart = myOldGameTicks / 60;\n myTimeString += bigPart + \":\";\n if (smallPart / 10 < 1) {\n myTimeString += \"0\";\n }\n myTimeString += smallPart;\n }\n return (myTimeString);\n }", "public static String formattedDate(long timestamp) {\n Calendar cal = Calendar.getInstance();\n cal.setTimeInMillis(timestamp*1000);\n DateFormat dateFormat = new SimpleDateFormat(\"dd.MM.yyyy HH:mm:ss\");\n return dateFormat.format(cal.getTime());\n\n }", "public static String convertTimestampToReadable(long timestamp) {\n java.text.DateFormat formatter = new SimpleDateFormat(\"dd.MM.yy HH:mm\");\n formatter.setTimeZone(TimeZone.getTimeZone(\"UTC\"));\n String dateFormatted = formatter.format(timestamp);\n\n return dateFormatted;\n }", "public static String getFormattedTime(long timestamp){\n\t\tif(timestamp != -1){\t\t\t\n\t\t\tDate date = new Date(timestamp); // *1000 is to convert seconds to milliseconds\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"dd.MM.YYYY - HH:mm:ss\"); // the format of your date\n\t\t\tsdf.setTimeZone(TimeZone.getTimeZone(\"GMT\")); // give a timezone reference for formating (see comment at the bottom\n\t\t\tString formattedDate = sdf.format(date);\n\t\t\treturn formattedDate;\n\t\t} \n\t\treturn \"no date available\";\n\t}", "private String formatTime(final long time) {\n if ( time == 0 ) {\n return \"-\";\n }\n if ( time < 1000 ) {\n return time + \" ms\";\n } else if ( time < 1000 * 60 ) {\n return time / 1000 + \" secs\";\n }\n final long min = time / 1000 / 60;\n final long secs = (time - min * 1000 * 60);\n return min + \" min \" + secs / 1000 + \" secs\";\n }", "public static String TimeConverter(long t)\r\n {\r\n int h, m, s, ms;\r\n ms = (int)t;\r\n h = ms / 3600000;\r\n ms = ms % 3600000;\r\n m = ms / 60000;\r\n ms = ms % 60000;\r\n s = ms / 1000;\r\n ms = ms % 1000;\r\n return h + \" :: \" + m + \" :: \" + s + \" :: \" + ms;\r\n }", "public static String getPrintToTextTime() {\n @SuppressLint(\"SimpleDateFormat\") SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n return sdf.format(System.currentTimeMillis());\n }", "private String unixToHHMMSS(String unixTime){\r\n\t\tlong unixSeconds = Long.parseLong(unixTime);\r\n\t\tDate date = new Date(unixSeconds*1000L); // convert seconds to milliseconds\r\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"HH:mm:ss\"); // date format\r\n\r\n\t\tString formattedDate = sdf.format(date);\r\n\t\treturn formattedDate;\r\n\t}", "public static String formatToString(long unixTimeInSecond, String pattern) {\n if (StringUtils.isBlank(pattern)) {\n pattern = DEFAULT_TIME_PATTERN;\n }\n LocalDateTime dateTime = LocalDateTime.ofInstant(Instant.ofEpochSecond(unixTimeInSecond), ZoneOffset.systemDefault());\n return DateTimeFormatter.ofPattern(pattern).format(dateTime);\n }", "public static String format(long seconds) {\n\t\tlong minutes = seconds / SECONDS_PER_MINUTE;\n\t\tlong hours = 0;\n\t\tif (minutes > MINUTES_PER_HOUR) {\n\t\t\thours = minutes / MINUTES_PER_HOUR;\n\t\t\tminutes = minutes % MINUTES_PER_HOUR;\n\t\t}\n\t\tseconds = seconds % SECONDS_PER_MINUTE;\n\t\treturn doFormat(hours, minutes, seconds);\n\t}", "public String getFormattedTime(){\r\n\t\tlong timestampInMs = ((long) timestamp * 1000);\r\n\t\tmessageTimestampTimeFormat = new SimpleDateFormat(messageTimestampTimeFormatString, Locale.getDefault()); \t//Initialise the time object we will use\r\n\t\tmessageTimestampTimeFormat.setTimeZone(TimeZone.getDefault());\r\n\t\tString messageSentString = messageTimestampTimeFormat.format(new Date(timestampInMs));\r\n\t\treturn messageSentString;\r\n\t}", "public StringBuffer format(long t_sec, StringBuffer toAppendTo, FieldPosition pos){\n\t\tlong t_l = 1000 * t_sec;\n\t\treturn dateFormat.format(new java.util.Date(t_l), toAppendTo, pos);\n\t}", "static String formatString(Timestamp value) {\n return formatString(value, null, true, true, 0);\n }", "static public String getTimeStamp(long timestamp) {\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy.MM.dd-HH:mm:ss\", Locale.US);\n return sdf.format(new Date(timestamp));\n }", "public static String getAppropriateFormat(long timestamp) {\n String str = \"\";\n long now = System.currentTimeMillis();\n str = \"\" + DateUtils.getRelativeTimeSpanString(timestamp, now, 0);\n return str;\n }", "private String formatTime(long nanoSeconds)\n {\n int hours, minutes, remainder, totalSecondsNoFraction;\n double totalSeconds, seconds;\n\n totalSeconds = (double) nanoSeconds / 1000000000.0;\n\n hours = (int) totalSeconds / 3600;\n totalSeconds -= hours * 3600;\n\n minutes = (int) totalSeconds / 60;\n totalSeconds -= minutes * 60;\n\n seconds = totalSeconds;\n\n // Formatting the string that conatins hours, minutes and seconds\n StringBuilder result = new StringBuilder(\"\");\n if (hours > 0) {\n if (hours < 10)\n result.append(\"0\");\n result.append(hours);\n }\n else\n result.append(\"00\");\n result.append(\":\");\n if (minutes > 0) {\n if (minutes < 10)\n result.append(\"0\");\n result.append(minutes);\n }\n else\n result.append(\"00\");\n result.append(\":\");\n if (seconds > 0) {\n if (seconds < 10)\n result.append(\"0\");\n DecimalFormat df = new DecimalFormat(\"##.00\");\n result.append(df.format(seconds));\n }\n else\n result.append(\"00\");\n return result.toString();\n }", "public static String convertToString(long value) {\r\n Date date = convertToDate(value);\r\n\r\n String dateFormat = ResourceUtil.getMessageResourceString(\"application.pattern.timestamp\");\r\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(dateFormat);\r\n String result = simpleDateFormat.format(date);\r\n\r\n return result;\r\n }", "public String getFormattedTimestamp() {\n\t\tDateFormat dateFormat = SimpleDateFormat.getDateTimeInstance();\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.setTimeInMillis(timestamp);\n\t\treturn dateFormat.format(cal.getTime());\n\t}", "String formatTime(int time) {\r\n\t\tint h = time / 3600;\r\n\t\ttime %= 3600;\r\n\t\tint m = time / 60;\r\n\t\ttime %= 60;\r\n\t\tint s = time;\r\n\t\treturn String.format(\"%02d:%02d:%02d\", h, m, s);\r\n\t}", "public static String formattime(long millis) {\n\t\treturn String.format(\"%02d:%02d:%02d:%03d\", //This formats the time correctly\n\t\t\t\tTimeUnit.MILLISECONDS.toHours(millis),\n\t\t\t TimeUnit.MILLISECONDS.toMinutes(millis) -\n\t\t\t TimeUnit.HOURS.toMinutes(TimeUnit.MILLISECONDS.toHours(millis)),\n\t\t\t TimeUnit.MILLISECONDS.toSeconds(millis) -\n\t\t\t TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS.toMinutes(millis)),\n\t\t\t millis -\n\t\t\t TimeUnit.SECONDS.toMillis(TimeUnit.MILLISECONDS.toSeconds(millis)));\n\t\t\n\t}", "public static String formatTime(long timeDiff){\n StringBuilder buf = new StringBuilder();\n long hours = timeDiff / (60*60*1000);\n long rem = (timeDiff % (60*60*1000));\n long minutes = rem / (60*1000);\n rem = rem % (60*1000);\n long seconds = rem / 1000;\n\n if (hours != 0){\n buf.append(hours);\n buf.append(\" hrs, \");\n }\n if (minutes != 0){\n buf.append(minutes);\n buf.append(\" mins, \");\n }\n\n if (seconds != 0) {\n buf.append(seconds);\n buf.append(\" sec\");\n }\n\n if (timeDiff < 1000) {\n buf.append(timeDiff);\n buf.append(\" msec\");\n }\n return buf.toString();\n }", "private String getFormattedDate(Integer format) {\n Date date = new Date(format * 1000L);\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss.SSS\");\n dateFormat.setTimeZone(TimeZone.getTimeZone(\"Etc/UTC\"));\n Log.e(\"time\",dateFormat.format(date));\n return dateFormat.format(date);\n }", "private String formatTime(int seconds){\n return String.format(\"%02d:%02d\", seconds / 60, seconds % 60);\n }", "public static String formatTime(final long ms){\n long s = ms / 1000, m = s / 60, h = m / 60;\n s %= 60; m %= 60; h %= 24;\n return String.format(\"%02d:%02d:%02d\", h, m, s);\n }", "public static String formatTime(long elapsed) {\n int[] convConst = {100, 60, 60, 24};\n int[] formatValues = new int[convConst.length];\n\n for (int i = 0; i < (convConst.length & formatValues.length); i++) {\n if (i > 0) elapsed /= convConst[i - 1];\n formatValues[i] = (int) (elapsed % convConst[i]);\n }\n\n int[] trimmed = ArrayUtils.autobox(ArrayUtils.reverse(ArrayUtils.trimBack(ArrayUtils.autobox(formatValues), 0)));\n String[] filled = new String[trimmed.length];\n\n for (int i = 0; i < (trimmed.length & filled.length); i++)\n filled[i] = i > 0 ? StringUtils.fillLeading(\"\" + trimmed[i], '0', 2) : \"\" + trimmed[i];\n\n List<String> filledList = new ArrayList<>(Arrays.asList(filled));\n if (filledList.size() <= 1) filledList.add(0, \"0\");\n\n return String.join(\".\", String.join(\":\", filledList.subList(0, filledList.size() - 1)), filledList.get(filledList.size() - 1));\n }", "private static String formatTime(String time) {\n\t\treturn String.format(\"%s:%s\", time.substring(0, 2), time.substring(2));\n\t}", "public static String formatTime(int seconds){\n\t\tTimeZone tz = TimeZone.getTimeZone(\"UTC\");\n\t SimpleDateFormat df = new SimpleDateFormat(\"HH:mm:ss\");\n\t df.setTimeZone(tz);\n\t return df.format(new Date((long)(seconds * 1000)));\n\t}", "private String prettyTime() {\n String[] dt = time.split(\"T\");\n String[] ymd = dt[0].split(\"-\");\n String[] hms = dt[1].split(\":\");\n\n int hour = Integer.parseInt(hms[0]);\n\n String date = getMonth(Integer.parseInt(ymd[1])) + \" \" + ymd[2] + \", \" + ymd[0];\n String time = (hour > 12 ? hour - 12 : hour) + \":\" + hms[1] + \":\" + hms[2].substring(0, hms[2].indexOf(\".\"));\n return date + \" at \" + time;\n }", "private String formatTime(long ms) {\n String format = String.format(\"%%.%df s\", decimals);\n return String.format(format, ms > 0 ? ms/1000f : 0f);\n }", "private String formatTime(LocalDateTime time){\n return time.getYear() + \"-\" + time.getMonthValue() + \"-\" + time.getDayOfMonth()\n + \" \" + time.getMinute() + \":\" + time.getSecond();\n }", "private String intTime(long l){\r\n String s=\"\";\r\n s+=(char)(((l/1000)/60)+'0')+\":\"+(char)((((l/1000)%60)/10)+'0')+(char)((((l/1000)%60)%10)+'0'); \r\n return s;\r\n }", "@SuppressLint(\"SimpleDateFormat\")\n\tpublic static String getStringTime(Long time){\n\t\tSimpleDateFormat dateaf = new SimpleDateFormat(\"MM-dd\"); \n\t\tSimpleDateFormat timef = new SimpleDateFormat(\"HH:mm\"); \n\t\tString date = dateaf.format(time);\n\t\tString times = timef.format(time);\n\t\tString result = date+\" \"+times;\n\t\treturn result;\n\t}", "public static String formatDate(String format, long timestamp) {\n return DateFormat.format(format, new Date(timestamp)).toString();\n }", "public static String timestampToString(int timestamp, String format) {\r\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(format);\r\n\t\tfinal Calendar c = Calendar.getInstance();\r\n\t\tc.setTimeInMillis((long) timestamp * 1000);\r\n\t\treturn sdf.format(c.getTime());\r\n\t}", "public static String timestamp(){\n\t\tDate date = new Date();\n\t\tDateFormat hourdateFormat = new SimpleDateFormat(\"dd/MM/yyyy HH:mm:ss \");\n\t\treturn hourdateFormat.format(date);\n\t}", "private String formatTime(long length) {\n\t\tString hms = \"\";\n\t\tif(length < 3600000) {\n\t\t\thms = String.format(\"%02d:%02d\",\n\t\t\t\t\tTimeUnit.MILLISECONDS.toMinutes(length) - TimeUnit.HOURS.toMinutes(TimeUnit.MILLISECONDS.toHours(length)),\n\t\t\t\t\tTimeUnit.MILLISECONDS.toSeconds(length) - TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS.toMinutes(length)));\n\t\t} else {\n\t\t\thms = String.format(\"%02d:%02d:%02d\", TimeUnit.MILLISECONDS.toHours(length),\n\t\t\t\t\tTimeUnit.MILLISECONDS.toMinutes(length) - TimeUnit.HOURS.toMinutes(TimeUnit.MILLISECONDS.toHours(length)),\n\t\t\t\t\tTimeUnit.MILLISECONDS.toSeconds(length) - TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS.toMinutes(length)));\n\t\t}\n\n\t\treturn hms;\n\t}", "public String getYYYYMMDDhhmmssTime(Long time) {\n\t\tString result = \"\";\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"YYYYMMDDhhmmss\");\n\t\tresult = sdf.format(new Date(time));\n\t\treturn result;\n\t}", "private void updateTimeTxtV()\n {\n String timeFormat =\"hh:mm aaa\";//12:08 PM\n SimpleDateFormat stf = new SimpleDateFormat(timeFormat, Locale.CANADA);\n timeStr = stf.format(cal.getTime());\n timeTxtV.setText(timeStr);\n\n //unix datetime for saving in db\n dateTimeUnix = cal.getTimeInMillis() / 1000L;\n }", "private static String getTimeStamp()\r\n\t{\r\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd_HH.mm.ss\");\r\n\t\tDate date = new Date();\r\n\t\treturn dateFormat.format(date);\r\n\t}", "private static String dateFormatLocal(Long timestamp) {\n DateFormat df = dateFormatLocal.get(); \n if (timestamp == null) {\n timestamp = System.currentTimeMillis();\n }\n \n return df.format(new Date(timestamp));\n }", "public static String formatDate(java.sql.Timestamp timestamp) {\n if (timestamp == null)\n return \"\";\n DateFormat df = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.FULL);\n java.util.Date date = timestamp;\n return df.format(date);\n }", "public static String getTimeAsString(String format, long time) {\n Calendar cal = Calendar.getInstance();\n cal.setTimeInMillis(time);\n SimpleDateFormat sdf = new SimpleDateFormat(format);\n return sdf.format(cal.getTime());\n }", "private static String timeLine()\n {\n return String.format(STR_FORMAT_1 + STR_FORMAT_2, TIME_STR, TIME);\n }", "public static String timestamp()\n\t{\n\t\t/**\n\t\t * Get the current time formatted as HH:mm:ss.\n\t\t */\t\t\n\t\treturn new SimpleDateFormat(\"HH:mm:ss\").format(new Date());\n\t}", "public String getTimestamp() \n{\n Calendar now = Calendar.getInstance();\n return String.format(\"20%1$ty-%1$tm-%1$td_%1$tHh%1$tMm%1$tSs\", now);\n}", "public static String timeAsLabelStr(long totalTime) {\n long second = totalTime / 1000 % 60;\n long minute = totalTime / (1000 * 60) % 60;\n long hour = totalTime / (1000 * 60 * 60);\n\n // build string (checking for zeroes)\n String str = String.format(\"%d sec\", second);\n if (minute > 0) str = String.format(\"%d min \", minute) + str;\n if (hour > 0) str = String.format(\"%d hrs \", hour) + str;\n\n return str;\n }", "public String getTimeInString() {\n int minutes = (time % 3600) / 60;\n int seconds = time % 60;\n String timeString = String.format(\"%02d:%02d\", minutes, seconds);\n\n return timeString;\n }", "void fromUnixtime(HplsqlParser.Expr_func_paramsContext ctx) {\n int cnt = getParamCount(ctx);\n if (cnt == 0) {\n evalNull();\n return;\n }\n long epoch = evalPop(ctx.func_param(0).expr()).longValue();\n String format = \"yyyy-MM-dd HH:mm:ss\";\n if (cnt > 1) {\n format = evalPop(ctx.func_param(1).expr()).toString();\n }\n evalString(new SimpleDateFormat(format).format(new Date(epoch * 1000)));\n }", "private static String doFormat(long hours, long minutes, long seconds) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tif (hours != 0) {\n\t\t\tsb.append(hours);\n\t\t\tsb.append(\"h\");\n\t\t}\n\t\tif (minutes != 0) {\n\t\t\tsb.append(minutes);\n\t\t\tsb.append(\"m\");\n\t\t}\n\t\tif (seconds != 0 || sb.length() == 0) {\n\t\t\tsb.append(seconds);\n\t\t\tsb.append(\"s\");\n\t\t}\n\t\treturn sb.toString();\n\t}", "public static String getPrintToFileTime() {\n @SuppressLint(\"SimpleDateFormat\") SimpleDateFormat sdf = new SimpleDateFormat(\"yyyyMMdd_HHmmss\");\n return sdf.format(System.currentTimeMillis());\n }", "private void formatTime() {\r\n\t\tDate date = new Date();\r\n\t\tSimpleDateFormat ft = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\");\r\n\t\tm_timeSent = ft.format(date).toString();\r\n\t}", "public static String formatTime(String userTime, String date) {\r\n\r\n\t\t\tint n = Integer.parseInt(userTime.substring(0, 2)) + 5;\r\n\r\n\t\t\tswitch (n) {\r\n\r\n\t\t\tcase 24:\r\n\t\t\t\tn = 0;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 25:\r\n\t\t\t\tn = 1;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 26:\r\n\t\t\t\tn = 2;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 27:\r\n\t\t\t\tn = 3;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t}\r\n\r\n\t\t\t// extracting hour\r\n\t\t\tString hourChange = String.valueOf(n);\r\n\r\n\t\t\tStringBuilder time = new StringBuilder(userTime);\r\n\r\n\t\t\tif (hourChange.length() == 1) {\r\n\r\n\t\t\t\ttime.replace(0, 2, \"0\" + hourChange);\r\n\r\n\t\t\t} else {\r\n\r\n\t\t\t\ttime.replace(0, 2, hourChange);\r\n\r\n\t\t\t}\r\n\r\n\t\t\tString formattedString = date + \" \" + time + \":00\";\r\n\r\n\t\t\treturn formattedString;\r\n\r\n\t\t}", "@org.jetbrains.annotations.NotNull()\n public static final java.lang.String getFormattedTime(long $this$getFormattedTime, @org.jetbrains.annotations.NotNull()\n java.lang.String format) {\n return null;\n }", "public synchronized String toString() {\n int trailingZeros = 0;\n int tmpNanos = this.getNanos();\n if (tmpNanos == 0) {\n trailingZeros = 8;\n } else {\n while (tmpNanos % 10 == 0) {\n tmpNanos /= 10;\n trailingZeros++;\n }\n }\n final String baseFormat = \"uuuu-MM-dd HH:mm:ss.\";\n StringBuilder buf = new StringBuilder(baseFormat.length() + 9 - trailingZeros);\n buf.append(baseFormat);\n for (int i = 0; i < 9 - trailingZeros; ++i) {\n buf.append(\"S\");\n }\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(buf.toString());\n\n LocalDateTime ldt =\n LocalDateTime.ofEpochSecond(this.getTime() / 1000, this.getNanos(), ZoneOffset.UTC);\n return ldt.format(formatter);\n }", "public static String getTimeStamp() {\r\n\r\n\t\tlong now = (System.currentTimeMillis() - startTime) / 1000;\r\n\r\n\t\tlong hours = (now / (60 * 60)) % 24;\r\n\t\tnow -= (hours / (60 * 60)) % 24;\r\n\r\n\t\tlong minutes = (now / 60) % 60;\r\n\t\tnow -= (minutes / 60) % 60;\r\n\r\n\t\tlong seconds = now % 60;\r\n\r\n\t return String.format(\"%02d:%02d:%02d\", hours, minutes, seconds);\r\n\t}", "public static String getTimeString(long time, int format){\n\t\tif(time == Long.MIN_VALUE)\n\t\t\treturn \"\";\n\t\tCalendar cal = Calendar.getInstance(SimulationTime.timezone, SimulationTime.locale);\n\t\tcal.setTimeInMillis(time);\n\t\tString out = \"\";\n\t\tint\t\tv\t= 0;\n\t\tif((format & 8) == 8){\n\t\t\tout += getDayName(cal)+\", \";\n\t\t}\n\t\tif((format & 1) == 1){\n\t\t\tv \t= \tcal.get(Calendar.DATE);\n\t\t\tout\t+=\tString.format(\"%02d\", v)+\".\";\n\t\t\tv \t= \tcal.get(Calendar.MONTH)+1;\n\t\t\tout\t+=\tString.format(\"%02d\", v)+\".\";\n\t\t\tv \t= \tcal.get(Calendar.YEAR);\n\t\t\tout\t+=\tString.format(\"%04d\", v);\n\t\t\tout += \" \";\n\t\t}\n\t\tif((format & 2) == 2){\n\t\t\tv \t= \tcal.get(Calendar.HOUR_OF_DAY);\n\t\t\tout\t+=\tString.format(\"%02d\", v);\n\t\t\tv \t= \tcal.get(Calendar.MINUTE);\n\t\t\tout\t+=\t\":\"+String.format(\"%02d\", v);\n\t\t\tv \t= \tcal.get(Calendar.SECOND);\n\t\t\tout\t+=\t\":\"+String.format(\"%02d\", v);\n\t\t}\n\t\tif((format & 4) == 4){\n\t\t\tv \t= \tcal.get(Calendar.MILLISECOND);\n\t\t\tout\t+=\t\".\"+String.format(\"%03d\", v);\n\t\t}\n\t\tif((format & 16) == 16){\n\t\t\tif(cal.getTimeZone().inDaylightTime(cal.getTime()))\n\t\t\t\tout\t+=\t\" DST\";\n\t\t}\n\t\tif((format & 32) == 32){\n\t\t\tout += \" \"+cal.getTimeZone().getDisplayName();\n\t\t}\n\t\treturn out.trim();\n\t}", "public static String getTimeString() {\n\t\treturn getTimeString(time);\n\t}", "public StringBuffer format(double t_sec, StringBuffer toAppendTo, FieldPosition pos){\n\t\treturn format( (long)t_sec, toAppendTo, pos );\n }", "public static String getDisplayTimeFormat(Date val) {\n\n\t\tif (val != null) {\n\n\t\t\tSimpleDateFormat format = new SimpleDateFormat(\"hh:mm a\");\n\t\t\treturn \"\" + format.format(val);\n\n\t\t} else {\n\n\t\t\treturn null;\n\n\t\t}\n\n\t}", "public static String longToYYYYMMDDHHMM(long longTime)\r\n/* 157: */ {\r\n/* 158:232 */ SimpleDateFormat formatter = new SimpleDateFormat(\"yyyyMMdd HH:mm\");\r\n/* 159:233 */ Date strtodate = new Date(longTime);\r\n/* 160:234 */ return formatter.format(strtodate);\r\n/* 161: */ }", "public String formatTimeStamp(String timeStamp) {\n\t\treturn timeStamp.replaceAll(TIME_REGEX, SYMBOL_QUOTA);\n\t}", "public static String getTimeStamp() {\n\t\tDate date = new Date();\n\t\treturn date.toString().replaceAll(\":\", \"_\").replaceAll(\" \", \"_\");\n\n\t}", "public static String getReadableTime(long time_ms) {\n String output = \"\";\n long time_delta = time_ms;\n\n int milliseconds = (int) (time_delta % 1000);\n time_delta /= 1000;\n int seconds = (int) (time_delta % 60);\n time_delta /= 60;\n int minutes = (int) (time_delta % 60);\n time_delta /= 60;\n int hours = (int) (time_delta % 24);\n int days = (int) (time_delta / 24);\n\n if (days != 0) {\n output += String.format(\"%d day\", days);\n if (days > 1) {\n output += \"s\";\n }\n if ((hours != 0) || (minutes != 0) || (seconds != 0)) {\n output += \" \";\n }\n }\n if ((hours != 0) || (minutes != 0)) {\n return output + String.format(\"%d:%02d:%02d\", hours, minutes, seconds);\n }\n if (seconds != 0) {\n return output + String.format(\"%d.%d seconds\", seconds, milliseconds);\n }\n if (milliseconds != 0) {\n return output + String.format(\"%d ms\", milliseconds);\n }\n\n return (output.length() == 0 ? \"0\" : output);\n }", "public static String getPrintToDirectoryTime() {\n @SuppressLint(\"SimpleDateFormat\") SimpleDateFormat sdf = new SimpleDateFormat(\"MMdd\");\n return sdf.format(System.currentTimeMillis());\n }", "public static String timeStamp()\n {\n DateFormat format = new SimpleDateFormat(\"ddMMyyHHmmSS\");\n return format.format(new Date());\n }", "public static String format( long elapsedMillis ) {\n String s = \"\";\n int hours = (int) ( elapsedMillis / ( 1000 * 60 * 60 ) );\n int minutes = (int) ( ( elapsedMillis % ( 1000 * 60 * 60 ) ) / ( 1000 * 60 ) );\n int seconds = (int) ( ( ( elapsedMillis % ( 1000 * 60 * 60 ) ) % ( 1000 * 60 ) ) / 1000 );\n if ( hours > 0 ) {\n // hours:minutes:seconds\n Object[] args = { ONE_DIGIT_TIME_FORMAT.format( hours ), TWO_DIGIT_TIME_FORMAT.format( minutes ), TWO_DIGIT_TIME_FORMAT.format( seconds ) };\n s = MessageFormat.format( \"{0}:{1}:{2}\", args );\n }\n else {\n // minutes:seconds\n Object[] args = { ONE_DIGIT_TIME_FORMAT.format( minutes ), TWO_DIGIT_TIME_FORMAT.format( seconds ) };\n s = MessageFormat.format( \"{0}:{1}\", args );\n }\n return s;\n }", "public String formatCompletionTime(long completionTime) {\r\n\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"MM/dd/yyyy HH:mm:ss\");\r\n\t\treturn dateFormat.format(new Date(completionTime));\r\n\t}", "java.lang.String getTime();", "public static String timestampTilStrengForKalender(Timestamp timestamp) {\r\n\t\tString dato = timestamp.toString();\r\n\t\tif (dato == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tString[] datoOgKlokke = dato.split(\" \");\r\n\t\tString[] fiksdatoen = datoOgKlokke[0].split(\"-\");\r\n\t\tString str = String.join(\"-\", fiksdatoen);\r\n\t\tString finalDato = str + \"T\" + datoOgKlokke[1];\r\n\t\treturn finalDato.substring(0, 16) + \":00\";\r\n\t}", "private String syncTimeStamp(String timestamp){\r\n StringBuilder dateBuilder = new StringBuilder(timestamp);\r\n String time = dateBuilder.toString().split(\"T\")[1].substring(0, 8);\r\n String[] timeArr = time.split(\":\");\r\n String seconds = timeArr[2];\r\n String dd = dateBuilder.toString().split(\"T\")[0].split(\"-\")[2];\r\n String mm = dateBuilder.toString().split(\"T\")[0].split(\"-\")[1];\r\n String yyyy = dateBuilder.toString().split(\"T\")[0].split(\"-\")[0];\r\n int hour = Integer.parseInt(timeArr[0]);\r\n int minutes = Integer.parseInt(timeArr[1]);\r\n minutes += 30;\r\n hour+=5;\r\n if (minutes>=60){\r\n hour += 1;\r\n minutes -= 60;\r\n }\r\n if (hour >= 24){\r\n hour -= 24;\r\n dd = Integer.toString(Integer.parseInt(dd) + 1);\r\n if (Integer.parseInt(dd) < 10)\r\n dd = \"0\" + dd;\r\n }\r\n String minutesString;\r\n if (minutes < 10)\r\n minutesString = \"0\" + Integer.toString(minutes);\r\n else\r\n minutesString = Integer.toString(minutes);\r\n\r\n String hoursString;\r\n if (hour < 10)\r\n hoursString = \"0\" + Integer.toString(hour);\r\n else\r\n hoursString = Integer.toString(hour);\r\n String finalTime = hoursString + \":\" + minutesString + \":\" + seconds;\r\n String finalDate = dd + \"-\" + mm + \"-\" + yyyy;\r\n\r\n return (finalDate + \" \" + finalTime);\r\n }", "public static String getNowAsTimestamp() {\r\n\r\n DateFormat dateFormat = new SimpleDateFormat(DATE_FORMAT_PATTERN);\r\n dateFormat.setTimeZone(TimeZone.getTimeZone(\"UTC\"));\r\n return dateFormat.format(new Date()).replaceAll(\"\\\\+0000\", \"Z\").replaceAll(\"([+-][0-9]{2}):([0-9]{2})\", \"$1$2\");\r\n }", "public static String displayTime(long milliseconds) {\n String displayTime = \"\";\n double seconds = milliseconds / 1000.0;\n int minute = (int) (seconds / 60);\n double second = seconds % 60;\n displayTime = String.format(\"%02d:%06.3f\", minute, second);\n\n return displayTime;\n }", "public String getFormatedTime() {\n DateFormat displayFormat = new SimpleDateFormat(\"HH:mm\", Locale.GERMAN);\n return displayFormat.format(mEvent.getTime());\n }", "public static String buildTimeString(long time) {\r\n\t\t\r\n\t\t// Days\r\n\t\tlong days = time / (1000 * 60 * 60 * 24);\r\n\t\ttime = time % (1000 * 60 * 60 * 24);\r\n\t\t\r\n\t\tlong hours = time / (1000 * 60 * 60);\r\n\t\ttime = time % (1000 * 60 * 60);\r\n\t\t\r\n\t\tlong mins = time / (1000 * 60);\r\n\t\ttime = time % (1000 * 60);\r\n\t\t\r\n\t\tlong secs = time / 1000;\r\n\t\t\r\n\t\tStringBuilder builder = new StringBuilder();\r\n\t\tif (days>0) {\r\n\t\t\tbuilder.append(days + \" d : \");\r\n\t\t}\r\n\t\tbuilder.append(String.format(\"%02d h : \", hours));\r\n\t\tbuilder.append(String.format(\"%02d m : \", mins));\r\n\t\tbuilder.append(String.format(\"%02d s\", secs));\r\n\r\n\t\treturn builder.toString();\r\n\t}", "public static String formatTimeStamp(Date dateTime, String format)\n {\n SimpleDateFormat formatter = new SimpleDateFormat(format);\n return formatter.format(dateTime);\n }", "public static String getDateTimeForFeedback(long unixTime) throws Exception {\n StringBuilder builder = new StringBuilder();\n Date quakeTime = new Date((long) unixTime);\n SimpleDateFormat dateTimeFormatter = new SimpleDateFormat(\"MM/dd/yyyy HH:mm:ss\");\n if (quakeTime != null) {\n String quakeTimeS = dateTimeFormatter.format(quakeTime);\n if (quakeTimeS != null) {\n builder.append(quakeTimeS);\n }\n }\n return builder.toString();\n }", "public String toString() {\n return this.time != null ? this.time.format(TIME_FORMATTER) : \"\";\n }", "private String computeTime(long l_time){\n \tString studyTime = \" \";\n \tlong hours, mins, secs;\n \t\n \tif (l_time > 3600) {\n \t\thours = l_time / 3600;\n \t\tl_time = l_time % 3600;\n \t\tmins = l_time / 60;\n \t\tsecs = l_time % 60;\n \t\tif (hours > 1) {\n \t\t\tstudyTime = Long.toString(hours) + \" hours \" + Long.toString(mins) + \" minutes and \" + Long.toString(secs) + \" seconds\";\n \t\t} else {\n \t\t\tstudyTime = Long.toString(hours) + \" hour \" + Long.toString(mins) + \" minutes and \" + Long.toString(secs) + \" seconds\";\n \t\t}\n \t} else if (l_time > 60 ){\n \t\tmins = l_time / 60;\n \t\tsecs = l_time % 60;\n \t\tif (mins > 1) {\n \t\t\tstudyTime = Long.toString(mins) + \" minutes and \" + Long.toString(secs) + \" seconds\";\n \t\t} else {\n \t\t\tstudyTime = Long.toString(mins) + \" minute and \" + Long.toString(secs) + \" seconds\";\n \t\t}\n \t} else {\n \t\tif (l_time > 1) {\n \t\t\tstudyTime = Long.toString(l_time) + \" seconds\";\n \t\t} else {\n \t\t\tstudyTime = Long.toString(l_time) + \" second\";\n \t\t}\n \t}\n \treturn studyTime;\n }", "public String timeToString() {\n\t\tString start = \"\";\n\t\tString hmSep = \":\";\n\t\tString msSep = \":\";\n\t\tif (hour < 10)\n\t\t\tstart = new String(\"0\");\n\t\tif (minute < 10)\n\t\t\thmSep = new String(\":0\");\n\t\tif (second < 10)\n\t\t\tmsSep = new String(\":0\");\n\t\treturn new String(start\n\t\t\t\t+ hour + hmSep\n\t\t\t\t+ minute + msSep\n\t\t\t\t+ second);\n\t}", "public static String longToHHMM(long longTime)\r\n/* 150: */ {\r\n/* 151:219 */ SimpleDateFormat formatter = new SimpleDateFormat(\"HH:mm\");\r\n/* 152:220 */ Date strtodate = new Date(longTime);\r\n/* 153:221 */ return formatter.format(strtodate);\r\n/* 154: */ }", "public static String timeStampToString(long timeStamp, Locale locale) {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd-MM-yyyy HH:mm:ss\", locale);\n return dateFormat.format(new Date(timeStamp));\n }", "private static String format(double elapsedSec) {\n\t\tint elapsedMs = (int) Math.round(elapsedSec * 1000);\n\t\treturn Integer.toString(elapsedMs) + \" ms\";\n\t}", "public static String getTimeString(int t) {\n\t\tint hours = t / 3600;\n\t\tint minutes = (t / 60) % 60;\n\t\tint seconds = t % 60;\n\t\treturn (hours < 10 ? \"0\" : \"\")\n\t\t\t+ hours\n\t\t\t+ (minutes < 10 ? \":0\" : \":\")\n\t\t\t+ minutes\n\t\t\t+ (seconds < 10 ? \":0\" : \":\")\n\t\t\t+ seconds;\n\t}", "private static String timeConversion(long totalSeconds) {\n\n final int MINUTES_IN_AN_HOUR = 60;\n final int SECONDS_IN_A_MINUTE = 60;\n\n long seconds = totalSeconds % SECONDS_IN_A_MINUTE;\n long totalMinutes = totalSeconds / SECONDS_IN_A_MINUTE;\n long minutes = totalMinutes % MINUTES_IN_AN_HOUR;\n long hours = totalMinutes / MINUTES_IN_AN_HOUR;\n\n StringBuilder time = new StringBuilder();\n time.append(totalSeconds < 0 ? \"-\" : \"\");\n time.append(hours < 10 ? \"0\" : \"\");\n time.append(Math.abs(hours) + \":\");\n time.append(minutes < 10 ? \"0\" : \"\");\n time.append(Math.abs(minutes) + \":\");\n time.append(seconds < 10 ? \"0\" : \"\");\n time.append(Math.abs(seconds));\n\n return time.toString();\n }", "public static String time_str(double t) {\n int hours = (int) t/3600;\n int rem = (int) t - hours*3600;\n int mins = rem / 60;\n int secs = rem - mins*60;\n return String.format(\"%02d:%02d:%02d\", hours, mins, secs);\n //return hoursMinutesSeconds(t);\n }", "public String getGUITimestampFormat();", "public String timeFormatter(String time) throws ParseException {\n\t\tfinal String oldFormat = \"HH mm\";\n\t\tfinal String newFormat = \"HH:mm:ss\";\n\t\tString newTimeString;\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(oldFormat);\n\t\tDate d = sdf.parse(time);\n\t\tsdf.applyPattern(newFormat);\n\t\tnewTimeString = sdf.format(d);\n\t\treturn newTimeString;\t\n\t}", "private String getPlayTimeString() {\n double fltPlayPositionInFrames = (fltPlayPercent/100.0f) * lngTimelineDataAmountInRmsFrames;\n double fltTime = (double)(fltPlayPositionInFrames * fltRmsFramePeriodInMs)/1000.0f;\n return new DecimalFormat(\"000.00\").format(fltTime); // String.format(\"%3.1f\", fltTime);\n }", "protected String toXSTime() {\n\t\treturn String.format(\"%s,%s,%s,%s\",\"{0:00}:{1:00}:{2:00}\",\n\t\t\t\tthis.getHours(), this\n\t\t\t\t.getMinutes(), this.getSeconds());\n\t}", "public static String millisToStr(long time) {\r\n long ms = time;\r\n long h = ms / 3600000;\r\n ms = ms % 3600000;\r\n long m = ms / 60000;\r\n ms = ms % 60000;\r\n long s = ms / 1000;\r\n ms = ms % 1000;\r\n return String.format(\"%02d:%02d:%02d.%03d\", h, m, s, ms);\r\n }", "public String toUniversalString() {\n return String.format(\"%02d:%02d:%02d\", hour, minutes, seconds);\n\n }", "private String formatTime(final long elapsedTicks) {\n\t\tString formattedTime = \"\";\n\t\t// should be hh:mm:ss.SSS, but 00 starts with 01\n\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"00:mm:ss.SSS\");\n\t\tCalendar calendar = Calendar.getInstance();\n\n\t\tif (elapsedTicks <= 9999) {\n\t\t\tcalendar.setTimeInMillis(0);\n\t\t\tformattedTime = formatter.format(calendar.getTime()) + String.valueOf(String.format(\"%04d\", elapsedTicks));\n\t\t} else {\n\t\t\tcalendar.setTimeInMillis(elapsedTicks * nsPerTick / nsPerMs);\n\t\t\tString formattedTicks = String.format(\"%07d\", elapsedTicks);\n\t\t\tformattedTicks = formattedTicks.substring(formattedTicks.length() - 4);\n\t\t\tformattedTime = formatter.format(calendar.getTime()) + formattedTicks;\n\t\t}\n\t\treturn formattedTime;\n\t}", "private String createTimeString(int value)\n\t {\n\t\tif(value<0){\n\t\t\treturn \"00:00:00,000\";\n\t\t}\n\t int sec = value % 60;\n\t int min = (value / 60) % 60;\n\t int hr = value / 3600;\n\t String fmtHr = \"\"+hr;\n\t String fmtMin = \"\"+min;\n\t String fmtSec = \"\" + sec;\n\t if(hr<10){\n\t \tfmtHr = \"0\"+hr;\n\t }\n\t if(min<10){\n\t \tfmtMin = \"0\"+min;\n\t }\n\t if(sec<10){\n\t \tfmtSec = \"0\"+sec;\n\t }\n\n\t return fmtHr+\":\"+fmtMin+\":\"+fmtSec+\",\"+\"000\";\n\t }", "public static String m34537a(long j) {\n Formatter format;\n if (j <= 0 || j >= LogBuilder.MAX_INTERVAL) {\n return \"00:00\";\n }\n long j2 = j / 1000;\n int i = (int) (j2 % 60);\n int i2 = (int) ((j2 / 60) % 60);\n int i3 = (int) (j2 / 3600);\n Formatter formatter = new Formatter(new StringBuilder(), Locale.getDefault());\n if (i3 > 0) {\n format = formatter.format(\"%d:%02d:%02d\", Integer.valueOf(i3), Integer.valueOf(i2), Integer.valueOf(i));\n } else {\n format = formatter.format(\"%02d:%02d\", Integer.valueOf(i2), Integer.valueOf(i));\n }\n return format.toString();\n }", "public static String getTimeString() {\n SimpleDateFormat formatter = new SimpleDateFormat(\"EEE MMM dd HH:mm:ss yyyy\");\n return formatter.format(new java.util.Date());\n }", "public static String time(int time) {\n return time((long)time);\n }", "String timeStamp() {\n\n\t\tCalendar now = Calendar.getInstance();\n\n\t\t String y = String.valueOf(now.get(now.YEAR));\n\t\t String mo = String.valueOf(now.get(now.MONTH)+1);\n\t\t String d = String.valueOf(now.get(now.DAY_OF_MONTH));\n\t\t String h = String.valueOf(now.get(now.HOUR_OF_DAY));\n\t\t String m = String.valueOf(now.get(now.MINUTE));\n\t\t String s = String.valueOf(now.get(now.SECOND));\n\t\t String ms = String.valueOf(now.get(now.MILLISECOND));\n\n\n\t return h + m + s + ms;\n\n\n\n }" ]
[ "0.720883", "0.7146743", "0.71207285", "0.7020374", "0.6883249", "0.6736519", "0.6718424", "0.67170084", "0.67164946", "0.6704075", "0.6696275", "0.6657817", "0.6614772", "0.6589241", "0.65610886", "0.65608", "0.65262645", "0.6503809", "0.6500612", "0.64845204", "0.6471354", "0.64677763", "0.64520466", "0.6445829", "0.6421089", "0.6410498", "0.6380025", "0.63766396", "0.6341102", "0.6327837", "0.6314653", "0.6299214", "0.62952536", "0.6271467", "0.62580425", "0.62564874", "0.62487817", "0.6231118", "0.6224801", "0.62093395", "0.61924565", "0.6191711", "0.61805445", "0.6174102", "0.6173169", "0.61383665", "0.6133978", "0.61271185", "0.61263525", "0.6125784", "0.61232644", "0.6114725", "0.61112684", "0.6100671", "0.60998654", "0.60985696", "0.6093896", "0.6084343", "0.6079297", "0.606654", "0.60510087", "0.6036114", "0.6033487", "0.60323745", "0.60128456", "0.6006478", "0.59968346", "0.59967744", "0.59868103", "0.5984267", "0.5979379", "0.5977046", "0.5966389", "0.59642726", "0.5958145", "0.59495056", "0.5946681", "0.5940657", "0.59383523", "0.5935779", "0.59357506", "0.5929724", "0.5926436", "0.5914449", "0.5913269", "0.591229", "0.58986753", "0.58916533", "0.5874048", "0.5865175", "0.5860162", "0.5859838", "0.58535737", "0.5853386", "0.5848076", "0.5833889", "0.58312947", "0.5830986", "0.5826911", "0.58262265", "0.58209693" ]
0.0
-1
Format current time to GMT string presentation.
public static String gmtFormat(String $formatString) { return gmtFormat($formatString, 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String getGMTTime(String format) {\r\n\t\tfinal Date currentTime = new Date();\r\n\r\n\t\tfinal SimpleDateFormat sdf = new SimpleDateFormat(format);\r\n\r\n\t\tsdf.setTimeZone(TimeZone.getTimeZone(\"GMT\"));\r\n\t\treturn sdf.format(currentTime);\r\n\t}", "public static String getGMTTime() {\r\n\t\treturn getGMTTime(\"HH:mm:ss\");\r\n\t}", "public static String ShowTimeinGMT(Calendar cal) {\n\t\tCalendar calendar = cal;\n\t\tStringBuilder _ret = new StringBuilder();\n\n\t\tif (cal == null) {\n\t\t\tcalendar = Calendar.getInstance(TimeZone.getTimeZone(\"GMT\"));\n\t\t}\n\n\t\t_ret.append(calendar.get(Calendar.DATE) + \"-\" + (calendar.get(Calendar.MONTH) + 1) + \"-\"\n\t\t\t\t+ calendar.get(Calendar.YEAR) + \" T \" + calendar.get(Calendar.HOUR_OF_DAY) + \":\"\n\t\t\t\t+ calendar.get(Calendar.MINUTE) + \":\" + calendar.get(Calendar.SECOND));\n\t\treturn _ret.toString();\n\t}", "private static String getFormattedCurrentDateAndTime(){\n StringBuilder dateAndTime = new StringBuilder();\n LocalDateTime now = LocalDateTime.now();\n\n String hour = Integer.toString(now.getHour());\n String minute = Integer.toString(now.getMinute());\n\n if (hour.length() == 1){\n hour = \"0\" + hour;\n }\n if (minute.length() == 1){\n minute = \"0\" + minute;\n }\n\n //Creates \"XX/XX/XX @ XX:XX\" format (24 hours)\n dateAndTime.append(now.getMonthValue()).append(\"/\").\n append(now.getDayOfMonth()).append(\"/\").\n append(now.getYear()).append(\" @ \").\n append(hour).append(\":\").\n append(minute);\n\n return dateAndTime.toString();\n }", "public String getGMTString() {\n\t\treturn \"test GMT timezone\";\n\t}", "public String getTimeString() {\n int hour = date.get(Calendar.HOUR);\n int minute = date.get(Calendar.MINUTE);\n\n String AM_PM = \"PM\";\n if (date.get(Calendar.AM_PM) == Calendar.AM) AM_PM = \"AM\";\n\n String hour_fixed = String.valueOf(hour);\n if (hour == 0) hour_fixed = \"12\";\n\n String minute_fixed = String.valueOf(minute);\n while (minute_fixed.length() < 2) {\n minute_fixed = \"0\" + minute_fixed;\n }\n\n return hour_fixed + \":\" + minute_fixed + ' ' + AM_PM;\n }", "public String formatTime() {\n if ((myGameTicks / 16) + 1 != myOldGameTicks) {\n myTimeString = \"\";\n myOldGameTicks = (myGameTicks / 16) + 1;\n int smallPart = myOldGameTicks % 60;\n int bigPart = myOldGameTicks / 60;\n myTimeString += bigPart + \":\";\n if (smallPart / 10 < 1) {\n myTimeString += \"0\";\n }\n myTimeString += smallPart;\n }\n return (myTimeString);\n }", "public static String getTimeString() {\n SimpleDateFormat formatter = new SimpleDateFormat(\"EEE MMM dd HH:mm:ss yyyy\");\n return formatter.format(new java.util.Date());\n }", "public String getFormatedTime() {\n DateFormat displayFormat = new SimpleDateFormat(\"HH:mm\", Locale.GERMAN);\n return displayFormat.format(mEvent.getTime());\n }", "public static String getPrintToTextTime() {\n @SuppressLint(\"SimpleDateFormat\") SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n return sdf.format(System.currentTimeMillis());\n }", "public String toString() {\n synchronized (FORMATTER) {\n return FORMATTER.format(_calendar.getTime());\n }\n }", "public static String getDateTime() {\n Calendar cal = Calendar.getInstance(TimeZone.getTimeZone(\"UTC\"));\n Date currentLocalTime = cal.getTime();\n SimpleDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss.SSS\");\n df.setTimeZone(TimeZone.getTimeZone(\"UTC\"));\n String date = df.format(currentLocalTime);\n return date;\n }", "public String getSystemTime() {\n\t\tSimpleDateFormat dateTimeInGMT = new SimpleDateFormat(\"dd-MMM-yyyy hh\");\n\t\t// Setting the time zoneS\n\t\tdateTimeInGMT.setTimeZone(TimeZone.getTimeZone(\"America/New_York\"));\n\t\tString timeZone = dateTimeInGMT.format(new Date());\n\t\treturn timeZone;\n\n\t}", "public String getSystemDateTime() {\n\t\tjava.text.SimpleDateFormat sdfDate = new java.text.SimpleDateFormat(\"yyyy/MM/dd\");\n java.text.SimpleDateFormat sdfTime = new java.text.SimpleDateFormat(\"HH:mm\");\n Date now = new Date();\n String strDate = sdfDate.format(now);\n String strTime = sdfTime.format(now);\n System.out.println(\"Date: \" + strDate);\n System.out.println(\"Time: \" + strTime); \n return \"date\"+strDate+\" \"+strTime;\n\t}", "public String getCurrentDateAndTime(){\n return dateTimeFormatter.format(current);\n }", "private static String timeFormat(long t, String format) {\n SimpleDateFormat sdf = new SimpleDateFormat(format, Locale.US);\n try {sdf.setTimeZone(TimeZone.getTimeZone(\"UTC\"));} catch (Exception e) {}\n return sdf.format(new Date(t));\n }", "private String formatTime(Date dateObject)\n {\n SimpleDateFormat timeFormat = new SimpleDateFormat(\"h:mm a\");\n timeFormat.setTimeZone(Calendar.getInstance().getTimeZone());\n return timeFormat.format(dateObject);\n }", "private void formatTime() {\r\n\t\tDate date = new Date();\r\n\t\tSimpleDateFormat ft = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\");\r\n\t\tm_timeSent = ft.format(date).toString();\r\n\t}", "public static String currentDateTime() {\r\n Calendar c = Calendar.getInstance();\r\n return String.format(\"%tB %te, %tY%n%tl:%tM %tp%n\", c, c, c, c, c, c);\r\n }", "private String getFormattedDate(Integer format) {\n Date date = new Date(format * 1000L);\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss.SSS\");\n dateFormat.setTimeZone(TimeZone.getTimeZone(\"Etc/UTC\"));\n Log.e(\"time\",dateFormat.format(date));\n return dateFormat.format(date);\n }", "public static String gmtFormat(String $formatString, long $timeValue /*= 0*/) {\n SimpleDateFormat df = new SimpleDateFormat($formatString);\n df.setTimeZone(TimeZone.getTimeZone(\"UTC\"));\n return df.format($timeValue == 0 ? new Date() : new Date($timeValue));\n }", "public String getTime() {\n boolean pastNoon = hour >= 12;\n if(pastNoon && hour == 12) {\n return hour + \"pm\";\n }\n else if(pastNoon) {\n return (hour - 12) + \"pm\";\n }\n else if(hour == 0) {\n return \"12am\";\n }\n else {\n return hour + \"am\";\n }\n }", "public String getFormattedTime(){\r\n\t\tlong timestampInMs = ((long) timestamp * 1000);\r\n\t\tmessageTimestampTimeFormat = new SimpleDateFormat(messageTimestampTimeFormatString, Locale.getDefault()); \t//Initialise the time object we will use\r\n\t\tmessageTimestampTimeFormat.setTimeZone(TimeZone.getDefault());\r\n\t\tString messageSentString = messageTimestampTimeFormat.format(new Date(timestampInMs));\r\n\t\treturn messageSentString;\r\n\t}", "public static String displayTimeDate(Calendar cal)\n\t{\n\t\tString out = \"\";\n\t\tint year = cal.get(Calendar.YEAR);\n\t\tint month = cal.get(Calendar.MONTH) + 1;\n\t\tint day = cal.get(Calendar.DAY_OF_MONTH);\n\t\tint hour = cal.get(Calendar.HOUR_OF_DAY);\n\t\tint minute = cal.get(Calendar.MINUTE);\n\t\tint second = cal.get(Calendar.SECOND);\n\t\tint zone = cal.get(Calendar.ZONE_OFFSET) / (60 * 60 * 1000) * 4;\n\t\t\n\t\tString year_str = String.valueOf(year);\n\t\tString month_str = String.valueOf(month);\n\t\tString day_str = String.valueOf(day);\n\t\tString hour_str = String.valueOf(hour);\n\t\tString minute_str = String.valueOf(minute);\n\t\tString second_str = String.valueOf(second);\n\t\tString zone_str = String.valueOf(zone);\n\t\t\n\t\tif (year_str.length() < 2) year_str = \"0\" + year_str;\n\t\tif (month_str.length() < 2) month_str = \"0\" + month_str;\n\t\tif (day_str.length() < 2) day_str = \"0\" + day_str;\n\t\tif (hour_str.length() < 2) hour_str = \"0\" + hour_str;\n\t\tif (minute_str.length() < 2) minute_str = \"0\" + minute_str;\n\t\tif (second_str.length() < 2) second_str = \"0\" + second_str;\n\t\t\n\t\tout = hour_str + \":\" + minute_str + \":\" + second_str + \" \";\n\t\tout = out + day_str + \"-\" + month_str + \"-\" + year_str; //+\" GMT\"+zone_str ;\n\t\treturn out;\n\t}", "public String getTimeString() {\n DateFormat format = new SimpleDateFormat(\"HH:mm\");\n return format.format(mDate);\n }", "public static String now() {\n return dateTimeFormatZ.format(new Date());\n }", "public String getDateTimeFormated(Context context){\n SimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/yyyy HH:mm:ss\"\n , context.getResources().getConfiguration().locale);\n sdf.setTimeZone(TimeZone.getDefault());\n return sdf.format(new Date(mDateTime));\n //setting the dateformat to dd/MM/yyyy HH:mm:ss which is how the date is displayed when a dream is saved\n }", "public String DateFormatted(){\n\t\tSimpleDateFormat simDate = new SimpleDateFormat(\"E, dd/MM/yy hh:mm:ss a\");\n\t\treturn simDate.format(date.getTime());\n\t}", "@Deprecated\n public static String getGMTToLocalTime(String argDateTime, String argInFormat, String argOutFormat) {\n DateFormat dateFormat = new SimpleDateFormat(argInFormat, Locale.getDefault());\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(argOutFormat);\n //simpleDateFormat.setTimeZone(TimeZone.getTimeZone(Locale));\n //simpleDateFormat.setTimeZone(TimeZone.getDefault());\n dateFormat.setTimeZone(TimeZone.getTimeZone(\"GMT\"));\n simpleDateFormat.setTimeZone(TimeZone.getDefault());\n //System.out.println(\"-----+ \" + TimeZone.getDefault());\n try {\n Date date = dateFormat.parse(argDateTime);\n return simpleDateFormat.format(date);\n } catch (ParseException ex) {\n //ex.printStackTrace();\n return null;\n }\n //https://medium.com/@kosta.palash/converting-date-time-considering-time-zone-android-b389ff9d5c49\n //https://www.tutorialspoint.com/java/util/calendar_settimezone.htm\n //writeDate.setTimeZone(TimeZone.getTimeZone(\"GMT+04:00\"));\n //https://vectr.com/tmp/a1hCr4Gvwc/aaegiGLyoI\n //http://inloop.github.io/svg2android/\n }", "String getTime(){\n\t\tCalendar c = Calendar.getInstance();\n int mseconds = c.get(Calendar.MILLISECOND);\n String currentDateandTime = mDateFormat.format(new Date()) + String.format(\"-%04d\", mseconds);\n \n return currentDateandTime;\n\t}", "public static String getNowTime(){\r\n\t\tDate date = new Date();\r\n\t\tDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\r\n\t\tString time = format.format(date);\r\n\t\treturn time;\r\n\t}", "public String gmt_to_local_timezone(String local) {\n\n\t\ttry {\n\t\t\n\t\t\tif ( local == null ) {\n\t\t\t\treturn \"\";\n\t\t\t}\n\t\t\tdate = new Date();\n\t\t\t\n\t\t\tint getTimezoneoffset = date.getTimezoneOffset() * 60 * 1000;\n\t\t\t\n\t\t\t\n\t\t\tlong currenttime = date.getTime();\n\t\t\t\n\t\t\tlong offset = currenttime + getTimezoneoffset;\n\t\t\t\n\t\t\tdateFormatYMDHMS = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss'Z'\");\n\t\t//\tdateObj = dateFormatYMDHMS.parse(local);\n\t\t\tdateObj = parseDate(local,false);\n\t\t\n\t\t\tlong msgPostTime = dateObj.getTime();\n\t\t\t\n\t\t\tlong actualTime = offset - msgPostTime;\n\t\t\tlong diffMinutes = actualTime / (60 * 1000);\n\t\t\t\n\t\t\t\n\t\t\tcurrentTime = Calendar.getInstance();\n\t\t\tString postedTime = gmtToLocal(local);\n\t\t\t//dateObj = dateFormatYMDHMS.parse(postedTime);\n\t\t\tdateObj = parseDate(postedTime,false);\n\t\t\t\n\t\t\tif (diffMinutes <= 59) {\n\t\t\t\t\n\t\t\t\tStringBuilder postTime = new StringBuilder(Integer\n\t\t\t\t\t\t.toString((int) diffMinutes));\n\t\t\t\n\t\t\t\tif (diffMinutes < 1) {\n\t\t\t\n\t\t\t\t\tpostTime = new StringBuilder(\" \"+resource.getString(R.string.justNow));\n\t\t\t\t\treturn postTime.toString();\n\t\t\t\t} else if (diffMinutes < 2) {\n\t\t\t\t\tpostTime.append(\" \"+resource.getString(R.string.min));\n\t\t\t\t} else {\n\t\t\t\t\tpostTime.append(\" \"+resource.getString(R.string.mins));\n\t\t\t\t}\n\n\t\t\t\treturn postTime.toString();\n\n\t\t\t} else if (diffMinutes >= 60 && diffMinutes <= 1439) {\n\n\t\t\t\tint hour = (int) diffMinutes / 60;\n\n\t\t\t\tStringBuilder postTime = new StringBuilder(Integer\n\t\t\t\t\t\t.toString(hour));\n\n\t\t\t\tif (hour < 2) {\n\t\t\t\t\tpostTime.append(\" \"+resource.getString(R.string.hour));\n\t\t\t\t} else {\n\t\t\t\t\tpostTime.append(\" \"+resource.getString(R.string.hours));\n\t\t\t\t}\n\n\t\t\t\treturn postTime.toString();\n\n\t\t\t} else if (diffMinutes >= 1440 && diffMinutes <= 2880) {\n\t\t\t\treturn resource.getString(R.string.yesterday);\n\t\t\t} else if (diffMinutes < (7 * 24 * 60)) {\n\n\t\t\t\tint days = (int) diffMinutes / 60 / 24;\n\t\t\t\treturn days + \" \"+resource.getString(R.string.days);\n\n\t\t\t\t// SimpleDateFormat dateFormat = new\n\t\t\t\t// SimpleDateFormat(\"dd-MM-yyyy HH:mm:ss\");\n\t\t\t\t// return dateFormat.format(dateObj);\n\t\t\t} else if (diffMinutes < (2 * 7 * 24 * 60)) {\n\t\t\t\treturn resource.getString(R.string.lastWeek);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tint months=(currentTime.get(Calendar.YEAR)-(dateObj.getYear()+1900))*12\n\t\t\t\t\t\t +(currentTime.get(Calendar.MONTH)-dateObj.getMonth());\n\t\t\t\tif((currentTime.get(Calendar.DATE)<dateObj.getDate())||\n\t\t\t\t ((currentTime.get(Calendar.HOUR_OF_DAY)<dateObj.getHours())&&\n\t\t\t\t (currentTime.get(Calendar.DATE)==dateObj.getDate())))\n\t\t\t\t\tmonths--;\n\t\t\t\t\n\t\t\t\tif(months<1)\n\t\t\t\t{\n\t\t\t\t\tint weeks=( int ) diffMinutes/ 60 / 24 / 7; \n\t\t\t\t\treturn weeks + \" \"+resource.getString(R.string.weeks);\n\t\t\t\t}\n\t\t\t\telse if(months<2)\n\t\t\t\t{\n\t\t\t\t\treturn resource.getString(R.string.lastMonth);\n\t\t\t\t}\n\t\t\t\telse if(months<12)\n\t\t\t\t{\n\t\t\t\t\treturn months+\" \"+resource.getString(R.string.months);\n\t\t\t\t}\n\t\t\t\telse if(months<24)\n\t\t\t\t{\n\t\t\t\t\treturn resource.getString(R.string.lastYear);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn months/12+\" \"+resource.getString(R.string.years);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t//Logs.show(e);\n\t\t} finally {\n\t\t\tdate = null;\n\t\t}\n\t\treturn \"\";\n\n\t}", "static String createNormalDateTimeString() {\n return NORMAL_STROOM_TIME_FORMATTER.format(ZonedDateTime.now(ZoneOffset.UTC));\n }", "public String getPrintFormattedTime() {\n return this.optionalTime.map(x -> x.format(DateTimeFormatter.ofPattern(\"HHmma\"))).orElse(\"\");\n }", "public String toString() {\n return this.time != null ? this.time.format(TIME_FORMATTER) : \"\";\n }", "public static String getNowAsTimestamp() {\r\n\r\n DateFormat dateFormat = new SimpleDateFormat(DATE_FORMAT_PATTERN);\r\n dateFormat.setTimeZone(TimeZone.getTimeZone(\"UTC\"));\r\n return dateFormat.format(new Date()).replaceAll(\"\\\\+0000\", \"Z\").replaceAll(\"([+-][0-9]{2}):([0-9]{2})\", \"$1$2\");\r\n }", "public String getTime(){\r\n\t\tDate date = new GregorianCalendar().getTime();\r\n\r\n\t\tString time= new SimpleDateFormat(\"HH:mm:ss\").format(date.getTime());\r\n\t\t\r\n\t\treturn time;\r\n\t}", "private String getFecha() {\n\t\tLocalDateTime myDateObj = LocalDateTime.now();\n\t\tDateTimeFormatter myFormatObj = DateTimeFormatter.ofPattern(\"dd-MM-yyyy HH:mm:ss\");\n\t\tString formattedDate = myDateObj.format(myFormatObj);\n \n\t\treturn formattedDate;\n }", "public String getTimeAndDate() {\n\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"dd MMM hh:mm\");\n\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\tString dateAndTime = dateFormat.format(cal.getTime());\n\t\t\treturn dateAndTime;\n\t\t}", "public String getFormattedArrivalTime() {\n return arrivalTime == null ? null : arrivalTime.getFormattedDateTime();\n }", "public String toString()\n {\n return String.format(\"%d:%02d:%02d %s %d/%d/%d\", \n ((getHour() == 0 || getHour() == 12) ? 12 : getHour() % 12),\n getMinute(), getSecond(), (getHour() < 12 ? \"AM\" : \"PM\"), \n \tmonth, day, year);\n }", "public static String ShowDate(){\n Date date = new Date();\n SimpleDateFormat sdf = new SimpleDateFormat(\"HH:mm:ss.SS a\");\n String HH_MM = sdf.format(date);\n return HH_MM;\n }", "private String getDate() {\n\t\tSimpleDateFormat parseFormat = new SimpleDateFormat(\"hh:mm a\");\n\t\tDate date = new Date();\n\t\tString s = parseFormat.format(date);\n\t\treturn s;\n\t}", "private static String currentTimestamp()\r\n {\n \r\n long currentTime = System.currentTimeMillis();\r\n sCalendar.setTime(new Date(currentTime));\r\n \r\n String str = \"\";\r\n str += sCalendar.get(Calendar.YEAR) + \"-\";\r\n \r\n final int month = sCalendar.get(Calendar.MONTH) + 1;\r\n if (month < 10)\r\n {\r\n str += 0;\r\n }\r\n str += month + \"-\";\r\n \r\n final int day = sCalendar.get(Calendar.DAY_OF_MONTH);\r\n if (day < 10)\r\n {\r\n str += 0;\r\n }\r\n str += day;\r\n \r\n str += \"T\";\r\n \r\n final int hour = sCalendar.get(Calendar.HOUR_OF_DAY);\r\n if (hour < 10)\r\n {\r\n str += 0;\r\n }\r\n str += hour + \":\";\r\n \r\n final int minute = sCalendar.get(Calendar.MINUTE);\r\n if (minute < 10)\r\n {\r\n str += 0;\r\n }\r\n str += minute + \":\";\r\n \r\n final int second = sCalendar.get(Calendar.SECOND);\r\n if (second < 10)\r\n {\r\n str += 0;\r\n }\r\n str += second + \".\";\r\n \r\n final int milli = sCalendar.get(Calendar.MILLISECOND);\r\n str += milli;\r\n \r\n str += \"Z\";\r\n \r\n return str;\r\n }", "public static Date currentDate() {\n Date currentDate = new Date();\n SimpleDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n format.setTimeZone(TimeZone.getTimeZone(\"gmt\"));\n String strTime = format.format(currentDate);\n\n SimpleDateFormat formatLocal = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\n try {\n currentDate = formatLocal.parse(strTime);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n return currentDate;\n }", "public String toString() {\n return String.format(\"%d: %02d: %02d %s\",\n ((hour == 0 || hour == 12) ? 12 :hour % 12 ),\n minutes, seconds, (hour < 12 ? \"AM\" : \"PM\"));\n\n }", "public String getTimeZoneGmt() {\n return timeZoneGmt;\n }", "public String getFormattedTime() {\n return formattedTime;\n }", "private String formatTime(Date dateObject) {\n SimpleDateFormat timeFormat = new SimpleDateFormat(\"h:mm a\", Locale.getDefault());\n return timeFormat.format(dateObject);\n }", "public static String getCurrentTime(String format) {\n\t\tString dateString = \"0000\";\n\t\ttry {\n\t\t\tSimpleDateFormat formatter = new SimpleDateFormat(format);\n\t\t\tDate d = new Date();\n\t\t\tdateString = formatter.format(d);\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\treturn dateString;\n\t}", "public static String getCurrentDateTime() {\n String format = null;\n format = sdfNormal.format(new Date());\n return format;\n }", "private String currentDateTime() {\n DateFormat df = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss.SSSZ\");\n String date = df.format(Calendar.getInstance().getTime());\n return date;\n }", "public static final String CurrentTime() {\n\t\t\n\t\tfinal SimpleDateFormat DF = new SimpleDateFormat(\"HH:mm:ss\");\n\t\treturn DF.format(new Date());\n\t}", "public static String getTime() {\r\n\r\n\t\t//Gets current date and time\r\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\r\n\t\tDate date = new Date();\r\n\t\tcurrDateTime = dateFormat.format(date);\r\n\t\treturn currDateTime;\r\n\t}", "public String getTime() {\n String pattern = \"yyyy-MM-dd HH:mm:ss\";\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(pattern);\n\n String date = simpleDateFormat.format(new Date());\n return date;\n }", "public String getSystemTime() {\n return DateFormat.getDateTimeInstance().format(new Date().getTime());\n }", "private String prettyTime() {\n String[] dt = time.split(\"T\");\n String[] ymd = dt[0].split(\"-\");\n String[] hms = dt[1].split(\":\");\n\n int hour = Integer.parseInt(hms[0]);\n\n String date = getMonth(Integer.parseInt(ymd[1])) + \" \" + ymd[2] + \", \" + ymd[0];\n String time = (hour > 12 ? hour - 12 : hour) + \":\" + hms[1] + \":\" + hms[2].substring(0, hms[2].indexOf(\".\"));\n return date + \" at \" + time;\n }", "public String toString()\r\n {\r\n DecimalFormat twoDigits = new DecimalFormat( \"00\" );\r\n\r\n return ( this.getHour() == 12 || this.getHour() == 0 ?\r\n 12 : this.getHour() % 12 ) + \":\" +\r\n twoDigits.format( this.getMinute() ) + \":\" +\r\n twoDigits.format( this.getSecond() ) +\r\n ( this.getHour() < 12 ? \" AM\" : \" PM\" );\r\n }", "public String toString() {\n\t\tdouble hour = getHour();\n\t\tString h = (hour < 10 ? \" \" : \"\") + (int) hour + \":\";\n\t\thour = 60 * (hour - (int) hour);\n\t\th += (hour < 10 ? \"0\" : \"\") + (int) hour + \":\";\n\t\thour = 60 * (hour - (int) hour);\n\t\th += (hour < 10 ? \"0\" : \"\") + hour;\n\n\t\treturn \"(YYYY/MM/DD) \" + getYear() + \"/\" + (getMonth() < 10 ? \"0\" : \"\") + getMonth() + \"/\"\n\t\t\t\t+ (getDay() < 10 ? \"0\" : \"\") + getDay() + \", \" + h + \"h \" + (getCalendarType() ? \"(greg)\" : \"(jul)\")\n\t\t\t\t+ \"\\n\" + \"Jul. Day: \" + getJulDay() + \"; \" + \"DeltaT: \" + getDeltaT();\n\t}", "public static String formatDateToDefault(Date date)\n\t{\n\t\tDateFormat format = new SimpleDateFormat(\"MMM dd, yyyy hh:mm a\", Locale.getDefault());\n\t\tformat.setTimeZone(TimeZone.getDefault());\n\t\tString rv = format.format(date);\n\t\treturn rv;\n\t}", "private String formatTime(LocalDateTime time){\n return time.getYear() + \"-\" + time.getMonthValue() + \"-\" + time.getDayOfMonth()\n + \" \" + time.getMinute() + \":\" + time.getSecond();\n }", "public static String getDateTimeGMT(String format, String timeZone) throws Exception {\n SimpleDateFormat dateFormatGmt = new SimpleDateFormat(format);\n dateFormatGmt.setTimeZone(TimeZone.getTimeZone(timeZone));\n return dateFormatGmt.format(new Date());\n }", "public String toString () {\n String dayTime;\n\n if (isPM == true)\n dayTime = \"PM\";\n\n else\n dayTime = \"AM\";\n\n String hourString = String.format(\"%02d\", hour);\n String minString = String.format(\"%02d\", minute);\n return (hourString + \":\" + minString + \" \" + dayTime);\n }", "public String gmtToLocal(String gmtTime) {\n\t\tString localTime = \"\";\n\t\tcurrentFormat = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss'Z'\");\n\t\tcurrentFormat.setTimeZone(TimeZone.getTimeZone(\"UTC\"));\n\t\tDate date = null;\n\t\t\n\t\ttry {\n\t\t\t//date = currentFormat.parse(gmtTime);\n\t\t\tdate = parseDate(gmtTime,true);\n\t\t\n\t\t\n\t\t} catch (Exception e) {\n\t\t\tLogs.show(e);\n\t\t\t \n\t\t}\n\t\tcalendar = Calendar.getInstance();\n\t\tcurrentFormat.setTimeZone(calendar.getTimeZone());\n\t\tlocalTime = currentFormat.format(date);\n\t\treturn localTime;\n\t}", "public static String getTime()\n {\n Date time = new Date();\n SimpleDateFormat timeFormat = new SimpleDateFormat(\"HH:mm:ss\");\n return timeFormat.format(time);\n }", "private String getCurrentTime() {\n DateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy HH:mm:ss\");\n Date date = new Date();\n return dateFormat.format(date);\n }", "public String getCurrentDateTime(){\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\n \"yyyy-MM-dd HH:mm:ss\", Locale.getDefault()\n );\n Date date = new Date();\n return simpleDateFormat.format(date);\n }", "public static String now() {\n // TODO: move this method to DateUtils\n return fromCalendar(GregorianCalendar.getInstance());\n }", "public String toString() {\n StringBuilder output = new StringBuilder();\n LocalDateTime currentTime = getCurrentTime();\n output.append(currentTime.getYear()).append(\":\").append(currentTime.getMonthValue()).append(\":\")\n .append(currentTime.getDayOfMonth());\n return output.toString();\n }", "private static String getTime() {\n\t\tDate getDate = new Date();\n\t\tString timeFormat = \"M/d/yy hh:mma\";\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(timeFormat);\n\t\treturn \"[\" + sdf.format(getDate) + \"]\\t\";\n\t}", "protected final static String getDateStamp() {\n\n\t\treturn\n\n\t\tnew SimpleDateFormat(\"MMM d, yyyy h:mm:ss a zzz\").format(new Date());\n\n\t}", "public LocalDateTime convertToGMT(ZonedDateTime time){\n ZoneId gmtZoneID = ZoneId.of(\"Etc/UTC\");\n ZonedDateTime gmtTime = time.withZoneSameInstant(gmtZoneID);\n return gmtTime.toLocalDateTime();\n }", "public synchronized static DateFormat getTimeZoneDateTimeFormat()\n\t{\n\t\treturn TIME_ZONE_DATE_TIME_FORMAT;\n\t}", "public static String now(){\n return now(DATE_FORMAT_PATTERN);\n }", "String getDateString(Context context) {\n int flags = DateUtils.FORMAT_NO_NOON_MIDNIGHT | DateUtils.FORMAT_SHOW_TIME |\n DateUtils.FORMAT_ABBREV_ALL | DateUtils.FORMAT_SHOW_DATE |\n DateUtils.FORMAT_CAP_AMPM;\n return DateUtils.formatDateTime(context, mDeliveryTime, flags);\n }", "static String getCurrentDateTimeInUTC() {\n TimeZone utcTimeZone = TimeZone.getTimeZone(\"UTC\");\n Date now = Calendar.getInstance(utcTimeZone).getTime();\n DateFormat formatter = new SimpleDateFormat(\"yyyy-MM-DD HH:mm:ss z\");\n formatter.setTimeZone(utcTimeZone);\n return formatter.format(now);\n }", "public static String getDateTime() {\n\t\tString sDateTime=\"\";\n\t\ttry {\n\t\t\tSimpleDateFormat sdfDate = new SimpleDateFormat(\"dd-MM-yyyy\");\n\t\t\tSimpleDateFormat sdfTime = new SimpleDateFormat(\"HH:mm:ss\");\n\t\t\tDate now = new Date();\n\t\t\tString strDate = sdfDate.format(now);\n\t\t\tString strTime = sdfTime.format(now);\n\t\t\tstrTime = strTime.replace(\":\", \"-\");\n\t\t\tsDateTime = \"D\" + strDate + \"_T\" + strTime;\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(e);\n\t\t}\n\t\treturn sDateTime;\n\t}", "public static String getCurrentTime(){\n Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone(\"Asia/Singapore\"));\n Date currentDate = calendar.getTime();\n return currentDate.toString();\n }", "public static String getCurrentDateTimeFull() {\n\t\t\t\t// DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\t\t\t// need to change after the date format is decided\n\t\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\t\t\tDate date = new Date();\n\t\t\t\treturn dateFormat.format(date);\n\t\t\t}", "public static String formatDate(Date time) {\n\t\tSimpleDateFormat df = new SimpleDateFormat(PreferenceProperties.JMS_DATE_FORMAT);\n\t\treturn df.format(time);\n\t}", "private String formatTime(Date dateObject) {\n @SuppressLint(\"SimpleDateFormat\") SimpleDateFormat timeFormat = new SimpleDateFormat(\"h:mm a\");\n return timeFormat.format(dateObject);\n }", "private static String formatDate(long date) {\n Date systemDate = new java.util.Date(date * 1000L);\n // the format of your date\n SimpleDateFormat sdf = new java.text.SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n // give a timezone reference for formatting (see comment at the bottom)\n sdf.setTimeZone(java.util.TimeZone.getTimeZone(\"GMT-4\"));\n String formattedDate = sdf.format(systemDate);\n return formattedDate;\n }", "public static String getTimeString() {\n\t\treturn getTimeString(time);\n\t}", "public String getTime()\n {\n SimpleDateFormat newDateFormat = new SimpleDateFormat(\"HH:mm\");\n String MySDate = newDateFormat.format(this.dueDate);\n return MySDate;\n }", "private String formatTime(Date dateObject) {\r\n SimpleDateFormat timeFormat = new SimpleDateFormat(\"h:mm a\");\r\n return timeFormat.format(dateObject);\r\n }", "public static String getFormattedTime(Context context, Calendar time) {\n final String skeleton = DateFormat.is24HourFormat(context) ? \"EHm\" : \"Ehma\";\n final String pattern = DateFormat.getBestDateTimePattern(Locale.getDefault(), skeleton);\n return (String) DateFormat.format(pattern, time);\n }", "public static String timeToString(Date date)\r\n/* 24: */ {\r\n/* 25: 31 */ return sdfTime.format(date);\r\n/* 26: */ }", "public String getTimeString()\n\t{\n\t\treturn TimeUtils.getTimeString(this.timesCurrentMillis);\n\t}", "public String getDateTime() {\n\t\t\n\t\tDateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern(\"yyyy/MM/dd HH:mm:ss\"); \n\t\t\n\t\tLocalDateTime currentDateTime = LocalDateTime.now(); \n\t\t\n\t\treturn dateTimeFormatter.format(currentDateTime);\n\t}", "public synchronized static DateFormat getTimeFormat()\n\t{\n\t\treturn TIME_FORMAT;\n\t}", "public static DateFormat defaultFormat() {\n return convertFormat(Locale.getDefault(), \"dd/MM/yyyy hh:mma\");\n }", "public String getCurrentTime() {\r\n DateTimeFormatter dtf = DateTimeFormatter.ofPattern(\"dd/MM/yyyy HH:mm:ss\"); //https://www.javatpoint.com/java-get-current-date\r\n LocalDateTime now = LocalDateTime.now();\r\n return dtf.format(now);\r\n }", "public String getTime() {\n return String.format(\"%02d\", hours) + \":\" + String.format(\"%02d\", minutes);\n }", "private String getcurrentTimeStamp() {\n\t\tDateTimeFormatter format = DateTimeFormatter\n\t\t\t\t.ofPattern(RidGeneratorPropertyConstant.TIMESTAMP_FORMAT.getProperty());\n\t\treturn LocalDateTime.now().format(format);\n\t}", "public String getTimeString() {\n // Converts slot to the minute it starts in the day\n int slotTimeMins =\n SlopeManagerApplication.OPENING_TIME * 60 + SESSION_LENGTHS_MINS * getSlot();\n\n Calendar cal = Calendar.getInstance();\n cal.set(Calendar.HOUR_OF_DAY, slotTimeMins/60);\n cal.set(Calendar.MINUTE, slotTimeMins % 60);\n cal.set(Calendar.SECOND, 0);\n cal.set(Calendar.MILLISECOND, 0);\n @SuppressLint(\"SimpleDateFormat\") SimpleDateFormat sdf = new SimpleDateFormat(\"HH:mm\");\n return sdf.format(cal.getTime());\n }", "public static String getDateString(){\n\t\t\tCalendar now = Calendar.getInstance();\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd__HH-mm-ss\");\n\t\t\treturn sdf.format(now.getTime());\n\t }", "private String formatDate(Date date){\n SimpleDateFormat format = new SimpleDateFormat(\"dd-MM-yyyy HH:mm\", Locale.getDefault());\n\n return format.format(date);\n }", "public String getTime() {\n\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"HH:mm:ss\");\n\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\tString time = dateFormat.format(cal.getTime());\n\t\t\treturn time;\n\t\t}", "public static String formatDate(Date date, String userId)\n\t{\n\t\tDateFormat format = new SimpleDateFormat(\"MMM dd, yyyy hh:mm a\", getPreferredLocale(userId));\n\t\tformat.setTimeZone(getPreferredTimeZone(userId));\n\t\tString rv = format.format(date);\n\t\treturn rv;\n\t}", "public static long getCurrentGMTTime() {\n\n\t\tTimeZone timezone = TimeZone.getTimeZone(STANDARD_TIME_ZONE);\n\t\tlong currentTime = System.currentTimeMillis();\n\t\treturn currentTime - timezone.getOffset(currentTime);\n\t}", "public String toString() {\n return String.format(\"%02d:%02dZ%02d%s%d\", hour, minute, day, months[month - 1], year);\n }" ]
[ "0.7057051", "0.68414843", "0.6704763", "0.6537466", "0.6496604", "0.6491955", "0.641445", "0.6403537", "0.639927", "0.639721", "0.6364635", "0.6357162", "0.6318541", "0.6298944", "0.62988293", "0.62626934", "0.6209832", "0.6186879", "0.6178881", "0.617677", "0.6147893", "0.6131927", "0.609542", "0.60911924", "0.60811937", "0.60611117", "0.6012454", "0.600714", "0.60046285", "0.59826714", "0.5979465", "0.59680897", "0.59645677", "0.5959645", "0.5934592", "0.59152615", "0.59140414", "0.5902059", "0.5899481", "0.5887404", "0.5884424", "0.5883978", "0.5876227", "0.5870571", "0.58701897", "0.5865904", "0.5865697", "0.58623415", "0.5861728", "0.585633", "0.58556503", "0.58528453", "0.58495367", "0.58306617", "0.5825363", "0.5825174", "0.581352", "0.5802849", "0.5802041", "0.5798455", "0.57936513", "0.5791651", "0.57915556", "0.578995", "0.57733166", "0.5769618", "0.57682896", "0.57607055", "0.5758811", "0.57558614", "0.5750895", "0.5748709", "0.57247293", "0.5715489", "0.57153106", "0.57112736", "0.5709842", "0.57024676", "0.5701579", "0.569946", "0.56955665", "0.568845", "0.5686669", "0.5673926", "0.56691307", "0.56682855", "0.5651206", "0.56509423", "0.56484413", "0.56430787", "0.5641937", "0.5634269", "0.56301755", "0.56280494", "0.5626043", "0.56244844", "0.5619551", "0.5617615", "0.5611471", "0.5610557", "0.56043464" ]
0.0
-1
Format time from timestamp to GMT string presentation.
public static String gmtFormat(String $formatString, long $timeValue /*= 0*/) { SimpleDateFormat df = new SimpleDateFormat($formatString); df.setTimeZone(TimeZone.getTimeZone("UTC")); return df.format($timeValue == 0 ? new Date() : new Date($timeValue)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getFormattedTime(){\r\n\t\tlong timestampInMs = ((long) timestamp * 1000);\r\n\t\tmessageTimestampTimeFormat = new SimpleDateFormat(messageTimestampTimeFormatString, Locale.getDefault()); \t//Initialise the time object we will use\r\n\t\tmessageTimestampTimeFormat.setTimeZone(TimeZone.getDefault());\r\n\t\tString messageSentString = messageTimestampTimeFormat.format(new Date(timestampInMs));\r\n\t\treturn messageSentString;\r\n\t}", "public static String getGMTTime(String format) {\r\n\t\tfinal Date currentTime = new Date();\r\n\r\n\t\tfinal SimpleDateFormat sdf = new SimpleDateFormat(format);\r\n\r\n\t\tsdf.setTimeZone(TimeZone.getTimeZone(\"GMT\"));\r\n\t\treturn sdf.format(currentTime);\r\n\t}", "private static String timeFormat(long t, String format) {\n SimpleDateFormat sdf = new SimpleDateFormat(format, Locale.US);\n try {sdf.setTimeZone(TimeZone.getTimeZone(\"UTC\"));} catch (Exception e) {}\n return sdf.format(new Date(t));\n }", "public static String getFormattedTime(long timestamp){\n\t\tif(timestamp != -1){\t\t\t\n\t\t\tDate date = new Date(timestamp); // *1000 is to convert seconds to milliseconds\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"dd.MM.YYYY - HH:mm:ss\"); // the format of your date\n\t\t\tsdf.setTimeZone(TimeZone.getTimeZone(\"GMT\")); // give a timezone reference for formating (see comment at the bottom\n\t\t\tString formattedDate = sdf.format(date);\n\t\t\treturn formattedDate;\n\t\t} \n\t\treturn \"no date available\";\n\t}", "public String getFormattedTimestamp() {\n\t\tDateFormat dateFormat = SimpleDateFormat.getDateTimeInstance();\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.setTimeInMillis(timestamp);\n\t\treturn dateFormat.format(cal.getTime());\n\t}", "public static String getGMTTime() {\r\n\t\treturn getGMTTime(\"HH:mm:ss\");\r\n\t}", "public static String formattedDate(long timestamp) {\n Calendar cal = Calendar.getInstance();\n cal.setTimeInMillis(timestamp*1000);\n DateFormat dateFormat = new SimpleDateFormat(\"dd.MM.yyyy HH:mm:ss\");\n return dateFormat.format(cal.getTime());\n\n }", "public String formatTime() {\n if ((myGameTicks / 16) + 1 != myOldGameTicks) {\n myTimeString = \"\";\n myOldGameTicks = (myGameTicks / 16) + 1;\n int smallPart = myOldGameTicks % 60;\n int bigPart = myOldGameTicks / 60;\n myTimeString += bigPart + \":\";\n if (smallPart / 10 < 1) {\n myTimeString += \"0\";\n }\n myTimeString += smallPart;\n }\n return (myTimeString);\n }", "public static String getPrintToTextTime() {\n @SuppressLint(\"SimpleDateFormat\") SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n return sdf.format(System.currentTimeMillis());\n }", "private String formatTime(Date dateObject)\n {\n SimpleDateFormat timeFormat = new SimpleDateFormat(\"h:mm a\");\n timeFormat.setTimeZone(Calendar.getInstance().getTimeZone());\n return timeFormat.format(dateObject);\n }", "public String getFormatedTime() {\n DateFormat displayFormat = new SimpleDateFormat(\"HH:mm\", Locale.GERMAN);\n return displayFormat.format(mEvent.getTime());\n }", "public static String timestampTilStrengForKalender(Timestamp timestamp) {\r\n\t\tString dato = timestamp.toString();\r\n\t\tif (dato == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tString[] datoOgKlokke = dato.split(\" \");\r\n\t\tString[] fiksdatoen = datoOgKlokke[0].split(\"-\");\r\n\t\tString str = String.join(\"-\", fiksdatoen);\r\n\t\tString finalDato = str + \"T\" + datoOgKlokke[1];\r\n\t\treturn finalDato.substring(0, 16) + \":00\";\r\n\t}", "private static String dateFormatLocal(Long timestamp) {\n DateFormat df = dateFormatLocal.get(); \n if (timestamp == null) {\n timestamp = System.currentTimeMillis();\n }\n \n return df.format(new Date(timestamp));\n }", "public String getTimeString() {\n int hour = date.get(Calendar.HOUR);\n int minute = date.get(Calendar.MINUTE);\n\n String AM_PM = \"PM\";\n if (date.get(Calendar.AM_PM) == Calendar.AM) AM_PM = \"AM\";\n\n String hour_fixed = String.valueOf(hour);\n if (hour == 0) hour_fixed = \"12\";\n\n String minute_fixed = String.valueOf(minute);\n while (minute_fixed.length() < 2) {\n minute_fixed = \"0\" + minute_fixed;\n }\n\n return hour_fixed + \":\" + minute_fixed + ' ' + AM_PM;\n }", "public static String ShowTimeinGMT(Calendar cal) {\n\t\tCalendar calendar = cal;\n\t\tStringBuilder _ret = new StringBuilder();\n\n\t\tif (cal == null) {\n\t\t\tcalendar = Calendar.getInstance(TimeZone.getTimeZone(\"GMT\"));\n\t\t}\n\n\t\t_ret.append(calendar.get(Calendar.DATE) + \"-\" + (calendar.get(Calendar.MONTH) + 1) + \"-\"\n\t\t\t\t+ calendar.get(Calendar.YEAR) + \" T \" + calendar.get(Calendar.HOUR_OF_DAY) + \":\"\n\t\t\t\t+ calendar.get(Calendar.MINUTE) + \":\" + calendar.get(Calendar.SECOND));\n\t\treturn _ret.toString();\n\t}", "public static String convertTimestampToReadable(long timestamp) {\n java.text.DateFormat formatter = new SimpleDateFormat(\"dd.MM.yy HH:mm\");\n formatter.setTimeZone(TimeZone.getTimeZone(\"UTC\"));\n String dateFormatted = formatter.format(timestamp);\n\n return dateFormatted;\n }", "private String getFormattedDate(Integer format) {\n Date date = new Date(format * 1000L);\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss.SSS\");\n dateFormat.setTimeZone(TimeZone.getTimeZone(\"Etc/UTC\"));\n Log.e(\"time\",dateFormat.format(date));\n return dateFormat.format(date);\n }", "private String prettyTime() {\n String[] dt = time.split(\"T\");\n String[] ymd = dt[0].split(\"-\");\n String[] hms = dt[1].split(\":\");\n\n int hour = Integer.parseInt(hms[0]);\n\n String date = getMonth(Integer.parseInt(ymd[1])) + \" \" + ymd[2] + \", \" + ymd[0];\n String time = (hour > 12 ? hour - 12 : hour) + \":\" + hms[1] + \":\" + hms[2].substring(0, hms[2].indexOf(\".\"));\n return date + \" at \" + time;\n }", "public static String formatDate(String format, long timestamp) {\n return DateFormat.format(format, new Date(timestamp)).toString();\n }", "private void formatTime() {\r\n\t\tDate date = new Date();\r\n\t\tSimpleDateFormat ft = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\");\r\n\t\tm_timeSent = ft.format(date).toString();\r\n\t}", "public static String getNowAsTimestamp() {\r\n\r\n DateFormat dateFormat = new SimpleDateFormat(DATE_FORMAT_PATTERN);\r\n dateFormat.setTimeZone(TimeZone.getTimeZone(\"UTC\"));\r\n return dateFormat.format(new Date()).replaceAll(\"\\\\+0000\", \"Z\").replaceAll(\"([+-][0-9]{2}):([0-9]{2})\", \"$1$2\");\r\n }", "public static String getTimeString() {\n SimpleDateFormat formatter = new SimpleDateFormat(\"EEE MMM dd HH:mm:ss yyyy\");\n return formatter.format(new java.util.Date());\n }", "public static String displayTimeInJakarta(long timestamp, String pattern) {\n SimpleDateFormat formatOutgoing = new SimpleDateFormat(pattern);\n TimeZone tz = TimeZone.getTimeZone(\"Asia/Jakarta\");\n// System.out.println(tz.getDisplayName(false, TimeZone.SHORT, Locale.ENGLISH)); // WIB\n\n formatOutgoing.setTimeZone(tz);\n String ss = formatOutgoing.format(new Date(timestamp));\n\n return ss;\n// String ss = formatOutgoing.format(formatIncoming.parse(\"Tue Mar 03 00:00:00 WIB 2015\"));\n\n }", "static String formatString(Timestamp value) {\n return formatString(value, null, true, true, 0);\n }", "private String formatTime(Date dateObject) {\n SimpleDateFormat timeFormat = new SimpleDateFormat(\"h:mm a\", Locale.getDefault());\n return timeFormat.format(dateObject);\n }", "private String formatTime(Date dateObject) {\n @SuppressLint(\"SimpleDateFormat\") SimpleDateFormat timeFormat = new SimpleDateFormat(\"h:mm a\");\n return timeFormat.format(dateObject);\n }", "public static String formatDateForDetails(Timestamp date) {\n SimpleDateFormat format = new SimpleDateFormat(\"dd MMM yyyy | hh:mm aaa\", Locale.getDefault());\n return format.format(new Date(date.getTime()));\n }", "private String syncTimeStamp(String timestamp){\r\n StringBuilder dateBuilder = new StringBuilder(timestamp);\r\n String time = dateBuilder.toString().split(\"T\")[1].substring(0, 8);\r\n String[] timeArr = time.split(\":\");\r\n String seconds = timeArr[2];\r\n String dd = dateBuilder.toString().split(\"T\")[0].split(\"-\")[2];\r\n String mm = dateBuilder.toString().split(\"T\")[0].split(\"-\")[1];\r\n String yyyy = dateBuilder.toString().split(\"T\")[0].split(\"-\")[0];\r\n int hour = Integer.parseInt(timeArr[0]);\r\n int minutes = Integer.parseInt(timeArr[1]);\r\n minutes += 30;\r\n hour+=5;\r\n if (minutes>=60){\r\n hour += 1;\r\n minutes -= 60;\r\n }\r\n if (hour >= 24){\r\n hour -= 24;\r\n dd = Integer.toString(Integer.parseInt(dd) + 1);\r\n if (Integer.parseInt(dd) < 10)\r\n dd = \"0\" + dd;\r\n }\r\n String minutesString;\r\n if (minutes < 10)\r\n minutesString = \"0\" + Integer.toString(minutes);\r\n else\r\n minutesString = Integer.toString(minutes);\r\n\r\n String hoursString;\r\n if (hour < 10)\r\n hoursString = \"0\" + Integer.toString(hour);\r\n else\r\n hoursString = Integer.toString(hour);\r\n String finalTime = hoursString + \":\" + minutesString + \":\" + seconds;\r\n String finalDate = dd + \"-\" + mm + \"-\" + yyyy;\r\n\r\n return (finalDate + \" \" + finalTime);\r\n }", "@Deprecated\n public static String getGMTToLocalTime(String argDateTime, String argInFormat, String argOutFormat) {\n DateFormat dateFormat = new SimpleDateFormat(argInFormat, Locale.getDefault());\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(argOutFormat);\n //simpleDateFormat.setTimeZone(TimeZone.getTimeZone(Locale));\n //simpleDateFormat.setTimeZone(TimeZone.getDefault());\n dateFormat.setTimeZone(TimeZone.getTimeZone(\"GMT\"));\n simpleDateFormat.setTimeZone(TimeZone.getDefault());\n //System.out.println(\"-----+ \" + TimeZone.getDefault());\n try {\n Date date = dateFormat.parse(argDateTime);\n return simpleDateFormat.format(date);\n } catch (ParseException ex) {\n //ex.printStackTrace();\n return null;\n }\n //https://medium.com/@kosta.palash/converting-date-time-considering-time-zone-android-b389ff9d5c49\n //https://www.tutorialspoint.com/java/util/calendar_settimezone.htm\n //writeDate.setTimeZone(TimeZone.getTimeZone(\"GMT+04:00\"));\n //https://vectr.com/tmp/a1hCr4Gvwc/aaegiGLyoI\n //http://inloop.github.io/svg2android/\n }", "public static String getDateTimeGMT(String format, String timeZone) throws Exception {\n SimpleDateFormat dateFormatGmt = new SimpleDateFormat(format);\n dateFormatGmt.setTimeZone(TimeZone.getTimeZone(timeZone));\n return dateFormatGmt.format(new Date());\n }", "private String formatTime(long length) {\n\t\tString hms = \"\";\n\t\tif(length < 3600000) {\n\t\t\thms = String.format(\"%02d:%02d\",\n\t\t\t\t\tTimeUnit.MILLISECONDS.toMinutes(length) - TimeUnit.HOURS.toMinutes(TimeUnit.MILLISECONDS.toHours(length)),\n\t\t\t\t\tTimeUnit.MILLISECONDS.toSeconds(length) - TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS.toMinutes(length)));\n\t\t} else {\n\t\t\thms = String.format(\"%02d:%02d:%02d\", TimeUnit.MILLISECONDS.toHours(length),\n\t\t\t\t\tTimeUnit.MILLISECONDS.toMinutes(length) - TimeUnit.HOURS.toMinutes(TimeUnit.MILLISECONDS.toHours(length)),\n\t\t\t\t\tTimeUnit.MILLISECONDS.toSeconds(length) - TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS.toMinutes(length)));\n\t\t}\n\n\t\treturn hms;\n\t}", "public static String formatTime(long time) {\n long tmp = time;\n int hour = (int) (time / 3600);\n tmp -= hour * 3600;\n int min = (int) (tmp / 60);\n int sec = (int) (tmp - min * 60);\n\n String hourText = hour < 10 ? \"0\" + hour : \"\" + hour;\n String minText = min < 10 ? \"0\" + min : \"\" + min;\n String secText = sec < 10 ? \"0\" + sec : \"\" + sec;\n\n\n return hourText + \":\" + minText + \":\" + secText;\n }", "static public String getTimeStamp(long timestamp) {\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy.MM.dd-HH:mm:ss\", Locale.US);\n return sdf.format(new Date(timestamp));\n }", "public static String epochToTimeGMT(long epoch)\n\t{\n\t\tSimpleDateFormat dateFormatGmt = new SimpleDateFormat(\"HHmm\");\n\t\tdateFormatGmt.setTimeZone(TimeZone.getTimeZone(\"GMT\"));\n\t\treturn dateFormatGmt.format(epoch);\n\t}", "private String formatTime(LocalDateTime time){\n return time.getYear() + \"-\" + time.getMonthValue() + \"-\" + time.getDayOfMonth()\n + \" \" + time.getMinute() + \":\" + time.getSecond();\n }", "public static String formatDate(java.sql.Timestamp timestamp) {\n if (timestamp == null)\n return \"\";\n DateFormat df = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.FULL);\n java.util.Date date = timestamp;\n return df.format(date);\n }", "private String formatTime(Date dateObject) {\r\n SimpleDateFormat timeFormat = new SimpleDateFormat(\"h:mm a\");\r\n return timeFormat.format(dateObject);\r\n }", "public static String formatString(Timestamp timestamp,\n String pattern,\n boolean withZoneUTC) {\n return formatString(timestamp, pattern, withZoneUTC, false, 0);\n }", "public static String getFormattedTime(long unixSec) {\n Date date = new Date(unixSec * 1000L); // convert seconds to milliseconds\n SimpleDateFormat sdf = new SimpleDateFormat(\"h:mm a\");\n sdf.setTimeZone(TimeZone.getTimeZone(\"GMT-5\"));\n String formattedTime = sdf.format(date);\n return formattedTime;\n }", "@SuppressWarnings(\"deprecation\")\r\n\tpublic String format(Date date,boolean time){\n\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyyMMdd\");\r\n\tString timestamp=dateFormat.format(date)+\"T\";\r\n\tif(time){\r\n\t\tdateFormat = new SimpleDateFormat(\"HH:mm:ssZ\");\r\n\t\ttimestamp+=dateFormat.format(date);\r\n\t}\r\n else{\r\n \tdate.setHours(12);\r\n \tdate.setMinutes(0);\r\n \tdate.setSeconds(0);\r\n \tdateFormat = new SimpleDateFormat(\"HH:mm:ss\");\r\n \ttimestamp+=dateFormat.format(date);\r\n \ttimestamp+=\"+0000\";\r\n }\r\n\treturn timestamp;\r\n }", "public static String formatTimeStamp(Date dateTime, String format)\n {\n SimpleDateFormat formatter = new SimpleDateFormat(format);\n return formatter.format(dateTime);\n }", "public String getPrintFormattedTime() {\n return this.optionalTime.map(x -> x.format(DateTimeFormatter.ofPattern(\"HHmma\"))).orElse(\"\");\n }", "public static String getHoraMinutoSegundoTimestamp(Timestamp timestamp) {\r\n\t\tLong time = timestamp.getTime();\r\n\r\n\t\tString retorno = new SimpleDateFormat(\"HH:mm:ss\", new Locale(\"pt\", \"BR\")).format(new Date(time));\r\n\r\n\t\treturn retorno;\r\n\t}", "public String gmtToLocal(String gmtTime) {\n\t\tString localTime = \"\";\n\t\tcurrentFormat = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss'Z'\");\n\t\tcurrentFormat.setTimeZone(TimeZone.getTimeZone(\"UTC\"));\n\t\tDate date = null;\n\t\t\n\t\ttry {\n\t\t\t//date = currentFormat.parse(gmtTime);\n\t\t\tdate = parseDate(gmtTime,true);\n\t\t\n\t\t\n\t\t} catch (Exception e) {\n\t\t\tLogs.show(e);\n\t\t\t \n\t\t}\n\t\tcalendar = Calendar.getInstance();\n\t\tcurrentFormat.setTimeZone(calendar.getTimeZone());\n\t\tlocalTime = currentFormat.format(date);\n\t\treturn localTime;\n\t}", "public static String getAppropriateFormat(long timestamp) {\n String str = \"\";\n long now = System.currentTimeMillis();\n str = \"\" + DateUtils.getRelativeTimeSpanString(timestamp, now, 0);\n return str;\n }", "public String getGMTString() {\n\t\treturn \"test GMT timezone\";\n\t}", "public static String timestamp()\n\t{\n\t\t/**\n\t\t * Get the current time formatted as HH:mm:ss.\n\t\t */\t\t\n\t\treturn new SimpleDateFormat(\"HH:mm:ss\").format(new Date());\n\t}", "public static String getUtcDateStringFromTimestamp(Date timeStamp) {\n DateFormat df = new SimpleDateFormat(UTC_DATE_FORMAT);\n df.setTimeZone(TimeZone.getTimeZone(\"GMT\"));\n return df.format(timeStamp);\n }", "public String formatTimeStamp(String timeStamp) {\n\t\treturn timeStamp.replaceAll(TIME_REGEX, SYMBOL_QUOTA);\n\t}", "public static String timestamp(){\n\t\tDate date = new Date();\n\t\tDateFormat hourdateFormat = new SimpleDateFormat(\"dd/MM/yyyy HH:mm:ss \");\n\t\treturn hourdateFormat.format(date);\n\t}", "public static String timestampToString(int timestamp, String format) {\r\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(format);\r\n\t\tfinal Calendar c = Calendar.getInstance();\r\n\t\tc.setTimeInMillis((long) timestamp * 1000);\r\n\t\treturn sdf.format(c.getTime());\r\n\t}", "private String formatTime(String dateObject){\n\n SimpleDateFormat input = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss'Z'\"); // format kita \"HARUS SAMA TIDAK BOLEH FORMATNYA BEDA BAHKAN 1 CHAR PUN\n SimpleDateFormat output= new SimpleDateFormat(\"h:mm a\");\n Date jam = null;\n try {\n jam = input.parse(dateObject);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n return output.format(jam);\n }", "public String getTimeString() {\n DateFormat format = new SimpleDateFormat(\"HH:mm\");\n return format.format(mDate);\n }", "public String getTimestamp() \n{\n Calendar now = Calendar.getInstance();\n return String.format(\"20%1$ty-%1$tm-%1$td_%1$tHh%1$tMm%1$tSs\", now);\n}", "public static String formatDate(Date time) {\n\t\tSimpleDateFormat df = new SimpleDateFormat(PreferenceProperties.JMS_DATE_FORMAT);\n\t\treturn df.format(time);\n\t}", "public static String formatDatetime(java.sql.Timestamp timeStamp) {\n\t\tif (timeStamp == null) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\n\t\t\t\t\t\"dd/MM/yyyy HH:mm:ss\");\n\t\t\treturn dateFormat.format(timeStamp);\n\t\t}\n\t}", "private String timeConversion() {\n Calendar local = Calendar.getInstance();\n Calendar GMT = Calendar.getInstance(TimeZone.getTimeZone(\"GMT\"));\n\n //Time from the PINPoint\n int hours, minutes, seconds, day, month, year;\n hours = (record[10] & 0xF8) >> 3;\n minutes = ((record[10] & 0x07) << 3) + ((record[11] & 0xE0) >> 5);\n seconds = ((record[11] & 0x1F) << 1) + ((record[12] & 0x80) >> 7);\n seconds += (record[12] & 0x7F) / 100;\n day = (record[13] & 0xF8) >> 3;\n month = ((record[13] & 0x07) << 1) + ((record[14] & 0x80) >> 7);\n year = (record[14] & 0x7F) + 2000;\n \n month--; //Months in java are 0-11, PINPoint = 1-12;\n\n //Set GMTs time to be the time from the PINPoint\n GMT.set(Calendar.DAY_OF_MONTH, day);\n GMT.set(Calendar.MONTH, month);\n GMT.set(Calendar.YEAR, year);\n GMT.set(Calendar.HOUR_OF_DAY, hours);\n GMT.set(Calendar.MINUTE, minutes);\n GMT.set(Calendar.SECOND, seconds);\n\n //Local is set to GMTs time but with the correct timezone\n local.setTimeInMillis(GMT.getTimeInMillis());\n\n //Set Local time to be the time converted from GMT\n int lHours, lMinutes, lSeconds, lDay, lMonth, lYear;\n lHours = local.get(Calendar.HOUR_OF_DAY);\n lMinutes = local.get(Calendar.MINUTE);\n lSeconds = local.get(Calendar.SECOND);\n lDay = local.get(Calendar.DAY_OF_MONTH);\n lMonth = local.get(Calendar.MONTH);\n\n lMonth++; //Months in java are 0-11, humans read 1-12\n\n lYear = local.get(Calendar.YEAR);\n\n return hR(lMonth) + \"/\" + hR(lDay) + \"/\" + lYear + \" \" + hR(lHours) + \":\" + hR(lMinutes) + \":\" + hR(lSeconds);\n }", "public static String TimeConverter(long t)\r\n {\r\n int h, m, s, ms;\r\n ms = (int)t;\r\n h = ms / 3600000;\r\n ms = ms % 3600000;\r\n m = ms / 60000;\r\n ms = ms % 60000;\r\n s = ms / 1000;\r\n ms = ms % 1000;\r\n return h + \" :: \" + m + \" :: \" + s + \" :: \" + ms;\r\n }", "private String getNewTimestamp(String originTimestamp, String originFormat, int timezoneOffset, String destinationFormat) {\n final ZoneId originZoneId = ZoneId.ofOffset(\"UTC\", ZoneOffset.ofHours(timezoneOffset));\n final Instant originTimeAsInstant = Instant.from(DateTimeFormatter\n .ofPattern(originFormat)\n .withZone(originZoneId)\n .parse(originTimestamp));\n\n /* configure target time format and time zone (all times should be in UTC) */\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(destinationFormat);\n final ZoneId destinationZoneId = ZoneId.ofOffset(\"UTC\", ZoneOffset.UTC); //always UTC\n\n /* format timestamp from its origin form to destination form (form = format + time zone) */\n return formatter.format(ZonedDateTime.ofInstant(originTimeAsInstant, destinationZoneId));\n }", "public String getFormattedTime() {\n return formattedTime;\n }", "private static String formatDate(long date) {\n Date systemDate = new java.util.Date(date * 1000L);\n // the format of your date\n SimpleDateFormat sdf = new java.text.SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n // give a timezone reference for formatting (see comment at the bottom)\n sdf.setTimeZone(java.util.TimeZone.getTimeZone(\"GMT-4\"));\n String formattedDate = sdf.format(systemDate);\n return formattedDate;\n }", "public String getTime() {\n boolean pastNoon = hour >= 12;\n if(pastNoon && hour == 12) {\n return hour + \"pm\";\n }\n else if(pastNoon) {\n return (hour - 12) + \"pm\";\n }\n else if(hour == 0) {\n return \"12am\";\n }\n else {\n return hour + \"am\";\n }\n }", "public String formatTime(Date date) {\n String result = \"\";\n if (date != null) {\n result = DateUtility.simpleFormat(date, MEDIUM_TIME_FORMAT);\n }\n return result;\n }", "public String toString() {\n synchronized (FORMATTER) {\n return FORMATTER.format(_calendar.getTime());\n }\n }", "static String createNormalDateTimeString() {\n return NORMAL_STROOM_TIME_FORMATTER.format(ZonedDateTime.now(ZoneOffset.UTC));\n }", "public StringBuffer format(long t_sec, StringBuffer toAppendTo, FieldPosition pos){\n\t\tlong t_l = 1000 * t_sec;\n\t\treturn dateFormat.format(new java.util.Date(t_l), toAppendTo, pos);\n\t}", "private static String zuluFormat(String beginTimestamp) {\n\t\tStringBuffer buf = new StringBuffer(beginTimestamp);\n\t\tbuf.insert(4, '-');\n\t\tbuf.insert(7, '-');\n\t\tbuf.insert(10, 'T');\n\t\tbuf.insert(13, ':');\n\t\tbuf.insert(16, ':');\n\t\tbuf.append('Z');\n\t\treturn buf.toString();\n\t}", "public String getDateTimeFormated(Context context){\n SimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/yyyy HH:mm:ss\"\n , context.getResources().getConfiguration().locale);\n sdf.setTimeZone(TimeZone.getDefault());\n return sdf.format(new Date(mDateTime));\n //setting the dateformat to dd/MM/yyyy HH:mm:ss which is how the date is displayed when a dream is saved\n }", "public String toString() {\n return String.format(\"%d: %02d: %02d %s\",\n ((hour == 0 || hour == 12) ? 12 :hour % 12 ),\n minutes, seconds, (hour < 12 ? \"AM\" : \"PM\"));\n\n }", "private String stringFormattedTime(Instant instant){\n ZonedDateTime zonedDateTime = instant.atZone(ZoneOffset.UTC);\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"yyyy-MM-dd'T'HH:mm:ss'Z'\");\n return formatter.format(zonedDateTime);\n }", "public static String formatDateTime(Calendar calendar) {\n return String.format(\"%1$ty%1$tm%1$td%1$tH%1$tM%1$tS\", calendar);\n }", "public String toString() {\n return this.time != null ? this.time.format(TIME_FORMATTER) : \"\";\n }", "public String eval(Timestamp timestamp, String timeZone, String dateFormat) {\n Date date = new Date(timestamp.getTime());\n DateFormat format = new SimpleDateFormat(dateFormat);\n format.setTimeZone(TimeZone.getTimeZone(timeZone));\n return format.format(date);\n }", "public static String getLogUtcDateStringFromTimestamp(Date timeStamp) {\n DateFormat df = new SimpleDateFormat(LOG_UTC_DATE_FORMAT);\n df.setTimeZone(TimeZone.getTimeZone(\"GMT\"));\n return df.format(timeStamp);\n }", "java.lang.String getTime();", "public static String formatDate(Date date, String userId)\n\t{\n\t\tDateFormat format = new SimpleDateFormat(\"MMM dd, yyyy hh:mm a\", getPreferredLocale(userId));\n\t\tformat.setTimeZone(getPreferredTimeZone(userId));\n\t\tString rv = format.format(date);\n\t\treturn rv;\n\t}", "java.lang.String getTimestamp();", "java.lang.String getTimestamp();", "private static String getTimeStamp()\r\n\t{\r\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd_HH.mm.ss\");\r\n\t\tDate date = new Date();\r\n\t\treturn dateFormat.format(date);\r\n\t}", "public static String ShowDate(){\n Date date = new Date();\n SimpleDateFormat sdf = new SimpleDateFormat(\"HH:mm:ss.SS a\");\n String HH_MM = sdf.format(date);\n return HH_MM;\n }", "public static String getDisplayTimeFormat(Date val) {\n\n\t\tif (val != null) {\n\n\t\t\tSimpleDateFormat format = new SimpleDateFormat(\"hh:mm a\");\n\t\t\treturn \"\" + format.format(val);\n\n\t\t} else {\n\n\t\t\treturn null;\n\n\t\t}\n\n\t}", "public String getTimeStamp() {\n Calendar instance = Calendar.getInstance();\n SimpleDateFormat sdf = new SimpleDateFormat(\"MMM-dd-yyyy-HH:mm:ss:ms\");\n return sdf.format(instance.getTime());\n }", "private String getTimeText(LocalDateTime dateTime) {\n return dateTime.format(DateTimeFormatter.ofPattern(FORMAT_TIME));\n }", "private void updateTimeTxtV()\n {\n String timeFormat =\"hh:mm aaa\";//12:08 PM\n SimpleDateFormat stf = new SimpleDateFormat(timeFormat, Locale.CANADA);\n timeStr = stf.format(cal.getTime());\n timeTxtV.setText(timeStr);\n\n //unix datetime for saving in db\n dateTimeUnix = cal.getTimeInMillis() / 1000L;\n }", "public static String format(Date dateTime) {\r\n String dot = new SimpleDateFormat(\"yyyy-MM-dd.HH:mm:ss\").format(dateTime);\r\n return dot.replaceAll(\"[.]\", \"T\");\r\n }", "public String timeFormatter(String time) throws ParseException {\n\t\tfinal String oldFormat = \"HH mm\";\n\t\tfinal String newFormat = \"HH:mm:ss\";\n\t\tString newTimeString;\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(oldFormat);\n\t\tDate d = sdf.parse(time);\n\t\tsdf.applyPattern(newFormat);\n\t\tnewTimeString = sdf.format(d);\n\t\treturn newTimeString;\t\n\t}", "@Override\n\tpublic String getTimestamp()\n\t{\n\t\treturn new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss.SSS\").format(new Date());\n\t}", "private static String formatTime(String time) {\n\t\treturn String.format(\"%s:%s\", time.substring(0, 2), time.substring(2));\n\t}", "public static String getDateTime() {\n Calendar cal = Calendar.getInstance(TimeZone.getTimeZone(\"UTC\"));\n Date currentLocalTime = cal.getTime();\n SimpleDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss.SSS\");\n df.setTimeZone(TimeZone.getTimeZone(\"UTC\"));\n String date = df.format(currentLocalTime);\n return date;\n }", "public static String getTimeStamp() {\r\n\r\n\t\tlong now = (System.currentTimeMillis() - startTime) / 1000;\r\n\r\n\t\tlong hours = (now / (60 * 60)) % 24;\r\n\t\tnow -= (hours / (60 * 60)) % 24;\r\n\r\n\t\tlong minutes = (now / 60) % 60;\r\n\t\tnow -= (minutes / 60) % 60;\r\n\r\n\t\tlong seconds = now % 60;\r\n\r\n\t return String.format(\"%02d:%02d:%02d\", hours, minutes, seconds);\r\n\t}", "public LocalDateTime convertToGMT(ZonedDateTime time){\n ZoneId gmtZoneID = ZoneId.of(\"Etc/UTC\");\n ZonedDateTime gmtTime = time.withZoneSameInstant(gmtZoneID);\n return gmtTime.toLocalDateTime();\n }", "public String getSystemTime() {\n\t\tSimpleDateFormat dateTimeInGMT = new SimpleDateFormat(\"dd-MMM-yyyy hh\");\n\t\t// Setting the time zoneS\n\t\tdateTimeInGMT.setTimeZone(TimeZone.getTimeZone(\"America/New_York\"));\n\t\tString timeZone = dateTimeInGMT.format(new Date());\n\t\treturn timeZone;\n\n\t}", "public static String displayTimeDate(Calendar cal)\n\t{\n\t\tString out = \"\";\n\t\tint year = cal.get(Calendar.YEAR);\n\t\tint month = cal.get(Calendar.MONTH) + 1;\n\t\tint day = cal.get(Calendar.DAY_OF_MONTH);\n\t\tint hour = cal.get(Calendar.HOUR_OF_DAY);\n\t\tint minute = cal.get(Calendar.MINUTE);\n\t\tint second = cal.get(Calendar.SECOND);\n\t\tint zone = cal.get(Calendar.ZONE_OFFSET) / (60 * 60 * 1000) * 4;\n\t\t\n\t\tString year_str = String.valueOf(year);\n\t\tString month_str = String.valueOf(month);\n\t\tString day_str = String.valueOf(day);\n\t\tString hour_str = String.valueOf(hour);\n\t\tString minute_str = String.valueOf(minute);\n\t\tString second_str = String.valueOf(second);\n\t\tString zone_str = String.valueOf(zone);\n\t\t\n\t\tif (year_str.length() < 2) year_str = \"0\" + year_str;\n\t\tif (month_str.length() < 2) month_str = \"0\" + month_str;\n\t\tif (day_str.length() < 2) day_str = \"0\" + day_str;\n\t\tif (hour_str.length() < 2) hour_str = \"0\" + hour_str;\n\t\tif (minute_str.length() < 2) minute_str = \"0\" + minute_str;\n\t\tif (second_str.length() < 2) second_str = \"0\" + second_str;\n\t\t\n\t\tout = hour_str + \":\" + minute_str + \":\" + second_str + \" \";\n\t\tout = out + day_str + \"-\" + month_str + \"-\" + year_str; //+\" GMT\"+zone_str ;\n\t\treturn out;\n\t}", "public String gmt_to_local_timezone(String local) {\n\n\t\ttry {\n\t\t\n\t\t\tif ( local == null ) {\n\t\t\t\treturn \"\";\n\t\t\t}\n\t\t\tdate = new Date();\n\t\t\t\n\t\t\tint getTimezoneoffset = date.getTimezoneOffset() * 60 * 1000;\n\t\t\t\n\t\t\t\n\t\t\tlong currenttime = date.getTime();\n\t\t\t\n\t\t\tlong offset = currenttime + getTimezoneoffset;\n\t\t\t\n\t\t\tdateFormatYMDHMS = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss'Z'\");\n\t\t//\tdateObj = dateFormatYMDHMS.parse(local);\n\t\t\tdateObj = parseDate(local,false);\n\t\t\n\t\t\tlong msgPostTime = dateObj.getTime();\n\t\t\t\n\t\t\tlong actualTime = offset - msgPostTime;\n\t\t\tlong diffMinutes = actualTime / (60 * 1000);\n\t\t\t\n\t\t\t\n\t\t\tcurrentTime = Calendar.getInstance();\n\t\t\tString postedTime = gmtToLocal(local);\n\t\t\t//dateObj = dateFormatYMDHMS.parse(postedTime);\n\t\t\tdateObj = parseDate(postedTime,false);\n\t\t\t\n\t\t\tif (diffMinutes <= 59) {\n\t\t\t\t\n\t\t\t\tStringBuilder postTime = new StringBuilder(Integer\n\t\t\t\t\t\t.toString((int) diffMinutes));\n\t\t\t\n\t\t\t\tif (diffMinutes < 1) {\n\t\t\t\n\t\t\t\t\tpostTime = new StringBuilder(\" \"+resource.getString(R.string.justNow));\n\t\t\t\t\treturn postTime.toString();\n\t\t\t\t} else if (diffMinutes < 2) {\n\t\t\t\t\tpostTime.append(\" \"+resource.getString(R.string.min));\n\t\t\t\t} else {\n\t\t\t\t\tpostTime.append(\" \"+resource.getString(R.string.mins));\n\t\t\t\t}\n\n\t\t\t\treturn postTime.toString();\n\n\t\t\t} else if (diffMinutes >= 60 && diffMinutes <= 1439) {\n\n\t\t\t\tint hour = (int) diffMinutes / 60;\n\n\t\t\t\tStringBuilder postTime = new StringBuilder(Integer\n\t\t\t\t\t\t.toString(hour));\n\n\t\t\t\tif (hour < 2) {\n\t\t\t\t\tpostTime.append(\" \"+resource.getString(R.string.hour));\n\t\t\t\t} else {\n\t\t\t\t\tpostTime.append(\" \"+resource.getString(R.string.hours));\n\t\t\t\t}\n\n\t\t\t\treturn postTime.toString();\n\n\t\t\t} else if (diffMinutes >= 1440 && diffMinutes <= 2880) {\n\t\t\t\treturn resource.getString(R.string.yesterday);\n\t\t\t} else if (diffMinutes < (7 * 24 * 60)) {\n\n\t\t\t\tint days = (int) diffMinutes / 60 / 24;\n\t\t\t\treturn days + \" \"+resource.getString(R.string.days);\n\n\t\t\t\t// SimpleDateFormat dateFormat = new\n\t\t\t\t// SimpleDateFormat(\"dd-MM-yyyy HH:mm:ss\");\n\t\t\t\t// return dateFormat.format(dateObj);\n\t\t\t} else if (diffMinutes < (2 * 7 * 24 * 60)) {\n\t\t\t\treturn resource.getString(R.string.lastWeek);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tint months=(currentTime.get(Calendar.YEAR)-(dateObj.getYear()+1900))*12\n\t\t\t\t\t\t +(currentTime.get(Calendar.MONTH)-dateObj.getMonth());\n\t\t\t\tif((currentTime.get(Calendar.DATE)<dateObj.getDate())||\n\t\t\t\t ((currentTime.get(Calendar.HOUR_OF_DAY)<dateObj.getHours())&&\n\t\t\t\t (currentTime.get(Calendar.DATE)==dateObj.getDate())))\n\t\t\t\t\tmonths--;\n\t\t\t\t\n\t\t\t\tif(months<1)\n\t\t\t\t{\n\t\t\t\t\tint weeks=( int ) diffMinutes/ 60 / 24 / 7; \n\t\t\t\t\treturn weeks + \" \"+resource.getString(R.string.weeks);\n\t\t\t\t}\n\t\t\t\telse if(months<2)\n\t\t\t\t{\n\t\t\t\t\treturn resource.getString(R.string.lastMonth);\n\t\t\t\t}\n\t\t\t\telse if(months<12)\n\t\t\t\t{\n\t\t\t\t\treturn months+\" \"+resource.getString(R.string.months);\n\t\t\t\t}\n\t\t\t\telse if(months<24)\n\t\t\t\t{\n\t\t\t\t\treturn resource.getString(R.string.lastYear);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn months/12+\" \"+resource.getString(R.string.years);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t//Logs.show(e);\n\t\t} finally {\n\t\t\tdate = null;\n\t\t}\n\t\treturn \"\";\n\n\t}", "public static String formatTime(int seconds){\n\t\tTimeZone tz = TimeZone.getTimeZone(\"UTC\");\n\t SimpleDateFormat df = new SimpleDateFormat(\"HH:mm:ss\");\n\t df.setTimeZone(tz);\n\t return df.format(new Date((long)(seconds * 1000)));\n\t}", "public static String getTimeString() {\n\t\treturn getTimeString(time);\n\t}", "public static String timeToString(Date date)\r\n/* 24: */ {\r\n/* 25: 31 */ return sdfTime.format(date);\r\n/* 26: */ }", "public static String getTime()\n {\n Date time = new Date();\n SimpleDateFormat timeFormat = new SimpleDateFormat(\"HH:mm:ss\");\n return timeFormat.format(time);\n }", "public static String timeStampToString(long timeStamp, Locale locale) {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd-MM-yyyy HH:mm:ss\", locale);\n return dateFormat.format(new Date(timeStamp));\n }", "static String formatString(Timestamp timestamp,\n String pattern,\n boolean withZoneUTC,\n boolean optionalFracSecond,\n int nFracSecond) {\n\n String fmt = (pattern == null) ? TimestampDef.DEFAULT_PATTERN : pattern;\n try {\n ZonedDateTime zdt = toUTCDateTime(timestamp);\n return zdt.format(getDateTimeFormatter(fmt, withZoneUTC,\n optionalFracSecond,\n false, nFracSecond));\n } catch (IllegalArgumentException iae) {\n throw new IllegalArgumentException(\"Failed to format the \" +\n \"timestamp with pattern '\" + fmt + \"': \" + iae.getMessage(),\n iae);\n } catch (DateTimeException dte) {\n throw new IllegalArgumentException(\"Failed to format the \" +\n \"timestamp with pattern '\" + fmt + \"': \" + dte.getMessage(),\n dte);\n }\n }" ]
[ "0.6753627", "0.6727799", "0.67220026", "0.655605", "0.647452", "0.6460203", "0.63420093", "0.61786544", "0.6149091", "0.6130439", "0.6108766", "0.6041088", "0.6039809", "0.60337186", "0.6015197", "0.60083824", "0.5998245", "0.59851533", "0.5984308", "0.59821147", "0.59218496", "0.5915053", "0.5862272", "0.58503646", "0.5849428", "0.584238", "0.5839643", "0.5837413", "0.58150065", "0.5810786", "0.57935715", "0.57916826", "0.57853115", "0.577668", "0.576609", "0.57537436", "0.5748748", "0.5746457", "0.5742522", "0.5685367", "0.567088", "0.56698406", "0.5661773", "0.56604964", "0.56579095", "0.5657327", "0.5654626", "0.5648654", "0.56482625", "0.56354845", "0.5633664", "0.5626555", "0.55787915", "0.5578001", "0.5575683", "0.557556", "0.5568011", "0.5566478", "0.5559175", "0.55520546", "0.5541396", "0.55302656", "0.551122", "0.55075765", "0.5494325", "0.548949", "0.54726166", "0.5470427", "0.5467708", "0.54657364", "0.5462345", "0.5456253", "0.5450799", "0.54458797", "0.5443878", "0.54408365", "0.5437412", "0.5437412", "0.5437053", "0.54280907", "0.54251665", "0.5420402", "0.54088545", "0.53984195", "0.538915", "0.53849155", "0.5384781", "0.5383091", "0.53808004", "0.5377997", "0.5377004", "0.53708947", "0.5367574", "0.5367007", "0.53608793", "0.53582287", "0.5357275", "0.53564715", "0.5348147", "0.5348142" ]
0.6249192
7
TODO Autogenerated method stub
@Override public void windowActivated(WindowEvent arg0) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void windowDeactivated(WindowEvent arg0) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void windowDeiconified(WindowEvent arg0) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void windowIconified(WindowEvent arg0) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void windowOpened(WindowEvent arg0) { }
{ "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